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.

  • datas (Iterator[IOData]) – An iterator over IOData instances 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

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, bonds.

Notes

load_many(lit)[source]

Load multiple frames from a PDB 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, atffparams, extra. The following may be loaded if present in the file: title.

Return type:

Iterator[dict]

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:

result – 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, bonds.

Return type:

dict

Notes