| Home | Trees | Indices | Help |
|
|---|
|
|
pybel - A Cinfony module for accessing OpenBabel from CPython Global variables: ob - the underlying SWIG bindings for OpenBabel informats - a dictionary of supported input formats outformats - a dictionary of supported output formats descs - a list of supported descriptors fps - a list of supported fingerprint types forcefields - a list of supported forcefields
| Classes | |
|
Outputfile Represent a file to which *output* is to be sent. |
|
|
Molecule Represent a Pybel Molecule. |
|
|
Atom Represent a Pybel atom. |
|
|
Fingerprint A Molecular Fingerprint. |
|
|
Smarts A Smarts Pattern Matcher |
|
|
MoleculeData Store molecule data in a dictionary-type object |
|
| Functions | |||
|
|||
|
|||
| Variables | |
informats = A dictionary of supported input formats |
|
outformats = A dictionary of supported output formats |
|
descs = A list of supported descriptors |
|
fps = A list of supported fingerprint types |
|
forcefields = A list of supported forcefields |
|
operations = A list of supported operations |
|
| Function Details |
Iterate over the molecules in a file.
Required parameters:
format - see the informats variable for a list of available
input formats
filename
You can access the first molecule in a file using the next() method
of the iterator:
mol = readfile("smi", "myfile.smi").next()
You can make a list of the molecules in a file using:
mols = list(readfile("smi", "myfile.smi"))
You can iterate over the molecules in a file as shown in the
following code snippet:
>>> atomtotal = 0
>>> for mol in readfile("sdf", "head.sdf"):
... atomtotal += len(mol.atoms)
...
>>> print atomtotal
43
|
Read in a molecule from a string.
Required parameters:
format - see the informats variable for a list of available
input formats
string
Example:
>>> input = "C1=CC=CS1"
>>> mymol = readstring("smi", input)
>>> len(mymol.atoms)
5
|
| Variables Details |
informatsA dictionary of supported input formats
|
outformatsA dictionary of supported output formats
|
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Thu Aug 07 14:57:57 2008 | http://epydoc.sourceforge.net |