ample.util.pdb_model module

Created on 7 Aug 2013

@author: jmht

Classes for holding data from PDB files

class CrystalInfo(line=None)[source]

Bases: object

fromLine(line)[source]
class OriginInfo(spaceGroupLabel=None)[source]

Bases: object

isFloating(spaceGroupLabel=None)[source]
nonRedundantAlternateOrigins(spaceGroupLabel=None)[source]
redundantAlternateOrigins(spaceGroupLabel=None)[source]
spaceGroup()[source]
class PdbAtom(line=None)[source]

Bases: object

COLUMNS DATA TYPE FIELD DEFINITION
1 - 6 Record name “ATOM ” 7 - 11 Integer serial Atom serial number.

13 - 16 Atom name Atom name. 17 Character altLoc Alternate location indicator. 18 - 20 Residue name resName Residue name. 22 Character chainID Chain identifier. 23 - 26 Integer resSeq Residue sequence number. 27 AChar iCode Code for insertion of residues. 31 - 38 Real(8.3) x Orthogonal coordinates for X in Angstroms. 39 - 46 Real(8.3) y Orthogonal coordinates for Y in Angstroms. 47 - 54 Real(8.3) z Orthogonal coordinates for Z in Angstroms. 55 - 60 Real(6.2) occupancy Occupancy. 61 - 66 Real(6.2) tempFactor Temperature factor. 73 - 76 LString(4) segID Segment identifier, left-justified. 77 - 78 LString(2) element Element symbol, right-justified. 79 - 80 LString(2) charge Charge on the atom.

fromHetatm(hetatm)[source]

Create Atom from Hetatm

fromLine(line)[source]

Initialise from the line from a PDB

toLine()[source]

Create a line suitable for printing to a PDB file

class PdbHetatm(line=None)[source]

Bases: ample.util.pdb_model.PdbAtom

Identical to PdbAtom but just with a different _atomType

class PdbInfo[source]

Bases: object

A class to hold information extracted from a PDB file

getSequence()[source]

Return the sequence for the first model/chain

numAtoms(modelIdx=0)[source]

Return the total number of ATOM atoms in the model

numCalpha(modelIdx=0)[source]

Return the total number of CA ATOM atoms in the model

numChains(modelIdx=0)[source]

Return the total number of chains in the model

class PdbModel[source]

Bases: object

A class to hold information on a single model in a PDB file

class PdbModres(line)[source]

Bases: object

1 - 6 Record name “MODRES” 8 - 11 IDcode idCode ID code of this entry.

13 - 15 Residue name resName Residue name used in this entry. 17 Character chainID Chain identifier. 19 - 22 Integer seqNum Sequence number. 23 AChar iCode Insertion code. 25 - 27 Residue name stdRes Standard residue name. 30 - 70 String comment Description of the residue modification.

fromLine(line)[source]

Initialise from the line from a PDB

toLine()[source]

Create a line suitable for printing to a PDB file