Chemistry.parsing package

Submodules

Chemistry.parsing.CheML module

Parser and builder for CML files. On the path to deprecation.

class Chemistry.parsing.CheML.CMLBuilder(molecule_dict)[source]

Bases: object

Object used to build a CML file.

Parameters:

molecule_dict : dict

Dictionary storing all of the molecular information.

Methods

from_compound(comp) Generates a CMLBuilder object from a Compound object.
to_file(cml_file) Writes the data in the builder object to file.
classmethod from_compound(comp)[source]

Generates a CMLBuilder object from a Compound object.

Parameters:

comp : Compound

The compound to be written to file.

Returns:

CMLBuilder

The builder object with the relevant information.

to_file(cml_file)[source]

Writes the data in the builder object to file.

Parameters:

cml_file : file-like

The open file to which the compound should be written.

class Chemistry.parsing.CheML.CMLParser(CML_file)[source]

Bases: object

Parser for CML files.

Parameters:

CML_file : file-like object

The (open) file that contains the data.

Notes

Pretty limited on what it can actually handle; it expects that things are formatted the way I do and not more generically. I want to eventually make this more generalizable.

Module contents

Collection of modules used to parse various chemical data files into formats suitable for conversion into Compound objects. Deprecated, and will be removed OpenBabel support is fully integrated.