iodata.formats.sdf module¶
SDF file format.
Usually, the different frames in a trajectory describe different geometries of the same
molecule, with atoms in the same order. The load_many
and dump_many
functions
below can also handle an SDF file with different molecules, e.g. a molecular database.
The SDF format is somewhat documented on the following page: http://www.nonlinear.com/progenesis/sdf-studio/v0.9/faq/sdf-file-format-guidance.aspx
This format is one of the chemical table file formats: https://en.wikipedia.org/wiki/Chemical_table_file
- load_many(lit)[source]¶
Load multiple frames from a SDF file.
- Parameters:
lit (
LineIterator
) – The line iterator to read the data from.- Yields:
result (dict) – A dictionary with IOData attributes. The following attribtues are guaranteed to be loaded:
atcoords
,atnums
,bonds
,title
.- Return type:
- load_one(lit)[source]¶
Load a single frame from a SDF file.
- Parameters:
lit (
LineIterator
) – The line iterator to read the data from.- Return type:
- Returns:
result (dict) – A dictionary with IOData attributes. The following attributes are guaranteed to be loaded:
atcoords
,atnums
,bonds
,title
.