GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  CHEMISTRY::FILE::SDF (3)

.ds Aq ’

NAME

Chemistry::File::SDF - MDL Structure Data File reader/writer

CONTENTS

SYNOPSIS



    use Chemistry::File::SDF;

    # Simple interface (all at once)
    # read all the molecules in the file
    my @mols = Chemistry::Mol->read(myfile.sdf);

    # assuming that the file includes a <PKA> data item...
    print $mols[0]->attr("sdf/data")->{PKA};

    # write a bunch of molecules to an SDF file
    Chemistry::Mol->write(myfile.sdf, mols => \@mols);

    # or write just one molecule
    $mol->write(myfile.sdf);


    # Low level interface (one at a time)
    # create reader
    my $reader = Chemistry::Mol->file(myfile.sdf);
    $reader->open(<);
    while (my $mol = $reader->read_mol($reader->fh)) {
        # do something with $mol
    }



DESCRIPTION

MDL SDF (V2000) reader.

This module automatically registers the ’sdf’ format with Chemistry::Mol.

The parser returns a list of Chemistry::Mol objects. SDF data can be accessed by the $mol->attr method. Attribute names are stored as a hash ref at the sdf/data attribute, as shown in the synopsis. When a data item has a single line in the SDF file, the attribute is stored as a string; when there’s more than one line, they are stored as an array reference. The rest of the information on the line that holds the field name is ignored.

This module is part of the PerlMol project, <http://www.perlmol.org>.

CAVEATS

Note that by storing the SDF data as a hash, there can be only one field with a given name. The SDF format description is not entirely clear in this regard. Also note that SDF data field names are considered to be case-sensitive.

VERSION

0.21

SEE ALSO

Chemistry::Mol

The MDL file format specification. <http://www.mdl.com/downloads/public/ctfile/ctfile.pdf> or Arthur Dalby et al., J. Chem. Inf. Comput. Sci, 1992, 32, 244-255.

The PerlMol website <http://www.perlmol.org/>

AUTHOR

Ivan Tubert-Brohman <itub@cpan.org>

COPYRIGHT

Copyright (c) 2009 Ivan Tubert-Brohman. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 SDF (3) 2009-05-10

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.