PDB atomic model¶
-
class mdk::pdb::Model
PDB model object. As opposed to
Model
, here we store atomic data, chiefly for the use in the derivation of full-atomic contact maps. Also, non-full-atomic contact maps may be derived;Model
doesn’t contain such a method because it’s ill-defined for models obtained fromSequence
file, which doesn’t have native residue positions.Public Functions
-
Atom &addAtom(int serial, Residue *res = nullptr)
Add an atom to a residue.
- Parameters
serial – Serial number of an atom
res – Parent residue, or
nullptr
- Returns
Reference to the added atom.
-
Residue &addResidue(int serial, Chain *chain = nullptr)
Add a residue to a chain.
- Parameters
serial – Serial number of a residue to add.
chain – Parent chain or
nullptr
- Returns
Reference to the added residue.
-
Chain &addChain(char serial)
Add a chain with a specified serial character.
- Parameters
serial – Serial character of the chain.
- Returns
Reference to the added chain.
-
Contact &addContact()
Add a new contact.
- Returns
Reference to the added contact.
-
Model() = default
-
explicit Model(mdk::Model const &coarse)
Construct a
pdb::Model
from aModel
. Doesn’t extrapolate extra atoms, i.e. only CA atoms are in the final model.- Parameters
coarse –
Model
from which to construct the PDB model.
-
void addContactsFromAtomOverlap()
Adds contacts based on the overlap of atoms. This method also derives types of contacts based on whether the atoms are in the backbone or the sidechain of an amino acid.
-
void addContactsFromResOverlap(param::Parameters const ¶ms)
Adds contacts based on approximate residue overlap, given the
aminoAcidRadii
data from the parameter file.- Parameters
params – Parameter file with amino acid radii data.
-
mdk::Model coarsen()
Construct a
mdk::Model
from the PDB model. Collapses residues to a singleModel
residue and copies the contacts (if two atoms are connected, the residues containing them are connected in the final model).- Returns
A reduced (“coarsened”) model.
Public Members
-
std::unordered_map<int, Atom> atoms
A map from the serial number of an atom to the
Atom
structure. Note that the order of serial numbers is (1) not necessarily consecutive, (2) not starting from 0, in some degenerate cases. Also, adding new atoms doesn’t invalidate pointers or references.
-
std::unordered_map<int, Residue> residues
A map from residue serial number to Residue struct. Note that the order of serial numbers is (1) not necessarily consecutive, (2) not starting from 0, in some degenerate cases. Also, adding new residues doesn’t invalidate pointers or references.
-
std::vector<Contact> contacts
A vector of contacts. Note that references are (potentially) invalidated when adding new contacts.
-
Topology top
“Topology”, i.e. box shape for PBC.
-
struct Atom
A struct containing data for a single atom.
Public Members
-
int serial
PDB serial number of an atom. Zero-indexed.
-
int idxInRes
Index of an atom in the
Residue::atoms
list of the parent residue, or -1 if it’s not a part of any residue.
-
Residue *res
Parent residue.
-
Eigen::Vector3d r
(Native) position of the atom.
-
std::string type
Type of an atom (in the
std::string
form).
-
int serial
-
struct Chain
A struct containing PDB chain data.
-
struct Contact
A struct containing contacts. Technically this isn’t represented 1-to-1 in the PDB data, but an unification of SSBONDs and LINKs is useful, especially for the reduction of the
pdb::Model
intoModel
.
-
struct Residue
A struct containing data for a PDB residue.
Public Functions
Public Members
-
int serial
Serial number of a residue. 0-indexed.
-
int idxInChain
Index in the
Chain::residues
of the parent chain, or -1 if it’s not in any chain.
-
Chain *chain
Parent chain.
-
std::string type
Type of residue (in
std::string
form)
-
int serial
-
Atom &addAtom(int serial, Residue *res = nullptr)