Mercurial > repos > deepakjadmin > mayatool3_test2
comparison docs/modules/txt/SDFileIO.txt @ 0:4816e4a8ae95 draft default tip
Uploaded
| author | deepakjadmin |
|---|---|
| date | Wed, 20 Jan 2016 09:23:18 -0500 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:4816e4a8ae95 |
|---|---|
| 1 NAME | |
| 2 SDFileIO | |
| 3 | |
| 4 SYNOPSIS | |
| 5 use FileIO::SDFileIO; | |
| 6 | |
| 7 use FileIO::SDFileIO qw(:all); | |
| 8 | |
| 9 DESCRIPTION | |
| 10 SDFIleIO class provides the following methods: | |
| 11 | |
| 12 new, GenerateMoleculeString, IsSDFile, ParseMoleculeString, | |
| 13 ReadMolecule, ReadMoleculeString, WriteMolecule | |
| 14 | |
| 15 The following methods can also be used as functions: | |
| 16 | |
| 17 GenerateMoleculeString, IsSDFile, ParseMoleculeString | |
| 18 | |
| 19 Data specific to SDFileIO class not directly used by Molecule, Atom and | |
| 20 Bond objects - data label/value pairs, atom SteroParity and so on - is | |
| 21 associated to and retrieved from approptiate objects using following | |
| 22 methods: | |
| 23 | |
| 24 SetMDL<PropertyName> | |
| 25 GetMDL<PropertyName>. | |
| 26 | |
| 27 SD data label and values are attached to Molecule object as a refernece | |
| 28 to a hash using SetDataFieldLabelAndValues and can be retrieved using | |
| 29 GetDataFieldLabelAndValues method. | |
| 30 | |
| 31 SDFileIO class is derived from *FileIO* class and uses its methods to | |
| 32 support generic file related functionality. | |
| 33 | |
| 34 METHODS | |
| 35 new | |
| 36 $NewSDFileIO = new FileIO::SDFileIO(%NamesAndValues); | |
| 37 | |
| 38 Using specified *SDFileIO* property names and values hash, new | |
| 39 method creates a new object and returns a reference to newly created | |
| 40 SDFileIO object. | |
| 41 | |
| 42 GenerateMoleculeString | |
| 43 $MoleculeString = $SDFileIO->GenerateMoleculeString($Molecule); | |
| 44 $MoleculeString = FileIO::SDFileIO::GenerateMoleculeString($Molecule); | |
| 45 | |
| 46 Returns a MoleculeString in SD format corresponding to *Molecule*. | |
| 47 | |
| 48 IsSDFile | |
| 49 $Status = $SDFileIO->IsSDFile($FileName); | |
| 50 $Status = FileIO::SDFileIO::IsSDFile($FileName); | |
| 51 | |
| 52 Returns 1 or 0 based on whether *FileName* is a SD file. | |
| 53 | |
| 54 ParseMoleculeString | |
| 55 $Molecule = $SDFileIO->ParseMoleculeString($MoleculeString); | |
| 56 $Molecule = FileIO::SDFileIO::ParseMoleculeString($MoleculeString); | |
| 57 | |
| 58 Parses *MoleculeString* and returns a Molecule object. SD data field | |
| 59 label and value pairs are associated to Molecule object as a | |
| 60 reference to a hash using: | |
| 61 | |
| 62 $Molecule->SetDataFieldLabelAndValues(\%DataLabelsAndValues) | |
| 63 | |
| 64 The reference to hash can be retrieved by: | |
| 65 | |
| 66 $DataLabelsAndValues = $Molecule->GetDataFieldLabelAndValues(); | |
| 67 for $DataLabel (sort keys %{$DataLabelsAndValues}) { | |
| 68 $DataValue = $DataLabelsAndValues->{$DataLabel}; | |
| 69 } | |
| 70 | |
| 71 ReadMolecule | |
| 72 $Molecule = $SDFileIO->ReadMolecule($FileHandle); | |
| 73 | |
| 74 Reads data for the next compound in a file using already opened | |
| 75 *FileHandle*, creates, and returns a Molecule object. | |
| 76 | |
| 77 ReadMoleculeString | |
| 78 $MoleculeString = $SDFileIO->ReadMoleculeString($FileHandle); | |
| 79 | |
| 80 Reads data for the next compound in a file using already opened | |
| 81 *FileHandle* and returns a MoleculeString corresponding to compound | |
| 82 structure and other associated data. | |
| 83 | |
| 84 WriteMolecule | |
| 85 $SDFileIO->WriteMolecule($Molecule); | |
| 86 | |
| 87 Writes *Molecule* data to a file in MDLMol format and returns | |
| 88 SDFileIO. | |
| 89 | |
| 90 AUTHOR | |
| 91 Manish Sud <msud@san.rr.com> | |
| 92 | |
| 93 SEE ALSO | |
| 94 MoleculeFileIO.pm, MDLMolFileIO.pm | |
| 95 | |
| 96 COPYRIGHT | |
| 97 Copyright (C) 2015 Manish Sud. All rights reserved. | |
| 98 | |
| 99 This file is part of MayaChemTools. | |
| 100 | |
| 101 MayaChemTools is free software; you can redistribute it and/or modify it | |
| 102 under the terms of the GNU Lesser General Public License as published by | |
| 103 the Free Software Foundation; either version 3 of the License, or (at | |
| 104 your option) any later version. | |
| 105 |
