iodata.formats.mol2 module¶
MOL2 file format.
There are different formats of mol2 files. Here the compatibility with AMBER software was the main objective to write out files with atomic charges used by antechamber.
-
dump_many
(f, datas)[source]¶ Dump multiple frames into a MOL2 file.
- Parameters
f (
Textio
) – A writeable file object.data – An IOData instance which must have the following attributes initialized:
atcoords
,atnums
,atcharges
. If the following attributes are present, they are also dumped into the file:title
.
None
-
dump_one
(f, data)[source]¶ Dump a single frame into a MOL2 file.
- Parameters
f (
Textio
) – A writeable file object.data (
IOData
) – An IOData instance which must have the following attributes initialized:atcoords
,atnums
. If the following attributes are present, they are also dumped into the file:atcharges
,atffparams
,title
.
Notes
None
-
load_many
(lit)[source]¶ Load a single frame from a MOL2 file.
- Parameters
lit (
LineIterator
) – The line iterator to read the data from.- Returns
A dictionary with IOData attributes. The following attributes are guaranteed to be loaded:
atcoords
,atnums
,atcharges
,atffparams
. The following may be loaded if present in the file:title
.- Return type
data
Notes
-
load_one
(lit)[source]¶ Load a single frame from a MOL2 file.
- Parameters
lit (
LineIterator
) – The line iterator to read the data from.- Returns
A dictionary with IOData attributes. The following attributes are guaranteed to be loaded:
atcoords
,atnums
,atcharges
,atffparams
. The following may be loaded if present in the file:title
.- Return type
data
Notes