iodata.formats.pdb module¶
PDB file format.
There are different formats of pdb files. The convention used here is the last updated one and is described in this link: http://www.wwpdb.org/documentation/file-format-content/format33/v3.3.html
-
dump_many
(f, datas)[source]¶ Dump multiple frames into a PDB file.
- Parameters
f (
Textio
) – A writeable file object.data – An IOData instance which must have the following attributes initialized:
atcoords
,atnums
,extra
. If the following attributes are present, they are also dumped into the file:atffparams
,title
.
None
-
dump_one
(f, data)[source]¶ Dump a single frame into a PDB file.
- Parameters
f (
Textio
) – A writeable file object.data (
IOData
) – An IOData instance which must have the following attributes initialized:atcoords
,atnums
,extra
. If the following attributes are present, they are also dumped into the file:atffparams
,title
.
Notes
None
-
load_many
(lit)[source]¶ Load a single frame from a PDB 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
,atffparams
,extra
. 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 PDB 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
,atffparams
,extra
. The following may be loaded if present in the file:title
.- Return type
data
Notes