chemaxon.io.importer

def import_mol(mol: str, options: str = '') -> chemaxon.molecule.Molecule:

Molecule import

You can find more information about file formats and options on the following link: https://docs.chemaxon.com/display/docs/formats_index.md

Here you can find the supported formats: https://docs.chemaxon.com/display/docs/python-api_limitations.md

Parameters

mol : str Input molecule string options : str This option is to specify the input format and options for the import

Raises

RuntimeError If the molecule contains more than 800 atoms / bonds

Returns

molecule : Molecule The imported molecule

class MolImporter:

Class for importing molecules from a file. More info about file formats and options: https://docs.chemaxon.com/display/docs/formats_index.md Here you can find the supported formats: https://docs.chemaxon.com/display/docs/python

Attributes

_file_path: str For internal use only, path of the file to be imported _native_handle: ctypes.c_longlong For internal use only, native handle of the molecule importer

MolImporter(file_path)
def read(self) -> chemaxon.molecule.Molecule:

Read next molecule with the importer. Doesn't need to be called if using iterator.

Returns

molecule : Molecule or None The next molecule in the file, or None if there are no more molecules.

def close(self):

Close the importer and free resources. Doesn't need to be called if using the context manager.