4.7. Primitive PDB topology parser¶
This topology parser uses a standard PDB file to build a minimum internal structure representation (list of atoms).
The topology reader reads a PDB file line by line and ignores atom
numbers but only reads residue numbers up to 9,999 correctly. If you
have systems containing at least 10,000 residues then you need to use
a different file format (e.g. the “extended” PDB, XPDB format, see
ExtendedPDBParser
) that can handle residue
numbers up to 99,999.
Note
The parser processes atoms and their names. Masses are guessed and set to 0
if unknown. Partial charges are not set. Bond connectivity can be guessed if
the bonds=True
keyword is set for
Universe
.
See also
4.7.1. Classes¶
-
class
MDAnalysis.topology.PrimitivePDBParser.
PrimitivePDBParser
(filename, **kwargs)[source]¶ Parser that obtains a list of atoms from a standard PDB file.
New in version 0.8.
-
close
()¶ Close the trajectory file.
-
close_trajectory
()¶ Specific implementation of trajectory closing.
-
convert_forces_from_native
(force, inplace=True)¶ In-place conversion of forces array force from native units to base units.
By default, the input force is modified in place and also returned.
New in version 0.7.7.
-
convert_forces_to_native
(force, inplace=True)¶ In-place conversion of force array force from base units to native units.
By default, the input force is modified in place and also returned.
New in version 0.7.7.
-
convert_pos_from_native
(x, inplace=True)¶ In-place conversion of coordinate array x from native units to base units.
By default, the input x is modified in place and also returned.
Changed in version 0.7.5: Keyword inplace can be set to
False
so that a modified copy is returned unless no conversion takes place, in which case the reference to the unmodified x is returned.
-
convert_pos_to_native
(x, inplace=True)¶ Conversion of coordinate array x from base units to native units.
By default, the input x is modified in place and also returned.
Changed in version 0.7.5: Keyword inplace can be set to
False
so that a modified copy is returned unless no conversion takes place, in which case the reference to the unmodified x is returned.
-
convert_time_from_native
(t, inplace=True)¶ Convert time t from native units to base units.
By default, the input t is modified in place and also returned (although note that scalar values t are passed by value in Python and hence an in-place modification has no effect on the caller.)
Changed in version 0.7.5: Keyword inplace can be set to
False
so that a modified copy is returned unless no conversion takes place, in which case the reference to the unmodified x is returned.
-
convert_time_to_native
(t, inplace=True)¶ Convert time t from base units to native units.
By default, the input t is modified in place and also returned. (Also note that scalar values t are passed by value in Python and hence an in-place modification has no effect on the caller.)
Changed in version 0.7.5: Keyword inplace can be set to
False
so that a modified copy is returned unless no conversion takes place, in which case the reference to the unmodified x is returned.
-
convert_velocities_from_native
(v, inplace=True)¶ In-place conversion of velocities array v from native units to base units.
By default, the input v is modified in place and also returned.
New in version 0.7.5.
-
convert_velocities_to_native
(v, inplace=True)¶ In-place conversion of coordinate array v from base units to native units.
By default, the input v is modified in place and also returned.
New in version 0.7.5.
-
parse
()[source]¶ Parse atom information from PDB file filename.
Returns: MDAnalysis internal structure dict See also
The structure dict is defined in MDAnalysis.topology and the file is read with
MDAnalysis.coordinates.PDB.PrimitivePDBReader
.
-