iodata.formats.molekel module

Molekel file format.

This format is used by two programs: Molekel and Orca.

dump_one(f, data)[source]

Dump a single frame into a Molekel file.

  • f (TextIO) – A writeable file object.

  • data (IOData) – An IOData instance which must have the following attributes initialized: atcoords, atnums, mo, obasis. If the following attributes are present, they are also dumped into the file: atcharges.


load_one(lit, norm_threshold=0.0001)[source]

Load a single frame from a Molekel file.

  • lit (LineIterator) – The line iterator to read the data from.

  • norm_threshold (float) – When the normalization of one of the orbitals exceeds norm_threshold, a correction is attempted or an error is raised when no suitable correction can be found.

Return type:



result (dict) – A dictionary with IOData attributes. The following attributes are guaranteed to be loaded: atcoords, atnums, mo, obasis. The following may be loaded if present in the file: atcharges.



Check the compatibility of the IOData object with the Molekel format.


data (IOData) – The IOData instance to be checked.