The ONEBEAD coarse-grained mapping of an all-atom structure. More...
#include <OnebeadMapping.h>

Public Types | |
| enum | { TRP , TYR , PHE , HIS , HIP , ARG , LYS , CYS , CYX , ASP , GLU , ILE , LEU , MET , ASN , PRO , GLN , SER , THR , VAL , ALA , GLY , BB_PO2 , BB_PO3 , BB_DNA , BB_DNA_5 , BB_DNA_3 , BB_RNA , BB_RNA_5 , BB_RNA_3 , BASE_A , BASE_C , BASE_T , BASE_G , BASE_U , GLYC_FUC , GLYC_MAN , GLYC_BMA , GLYC_GAL , GLYC_GLC , GLYC_NAG , GLYC_NGA , GLYC_SIA , OB_NA , OB_K , OB_CL , OB_CA , OB_MG , OB_ZN , OB_FE2 , OB_FE3 , OB_MN , NONEBEAD } |
| Bead types of the ONEBEAD model. More... | |
| enum | { ION_NA , ION_K , ION_CL , ION_CA , ION_MG , ION_ZN , ION_FE2 , ION_FE3 , ION_MN , NIONS } |
| Canonical ion identifiers. More... | |
| typedef std::function< void(const std::string &)> | ErrorHandler |
| Called with a message when the input is not valid. | |
Public Member Functions | |
| OnebeadMapping (const PDB &tmpl, const std::vector< AtomNumber > &atoms, Log &log, const ErrorHandler &error) | |
| Build the mapping of atoms. | |
| double | getAtomMass (unsigned a) const |
| The mass of atom a (g/mol), from its element. | |
| const std::string & | getAtomName (unsigned a) const |
| The atom name of atom a, as in the template. | |
| double | getAtomWeight (unsigned a) const |
| The mass of atom a divided by the mass of its bead: the derivative of the bead position with respect to the position of the atom. | |
| unsigned | getBead (unsigned a) const |
| The bead of atom a. | |
| const std::vector< unsigned > & | getBeadAtoms () const |
| const std::vector< unsigned > & | getBeadOffsets () const |
| The atoms of bead b are getBeadAtoms()[k] for getBeadOffsets()[b] <= k < getBeadOffsets()[b+1], in increasing order. | |
| void | getBeadPositions (const std::vector< Vector > &pos, std::vector< Vector > &beads) const |
| The positions of the beads (centres of mass) from those of the atoms. | |
| unsigned | getBeadType (unsigned b) const |
| The bead type (TRP, ..., OB_MN) of bead b. | |
| int | getGlycanType (unsigned a) const |
| The GLYC_* bead type of atom a, or -1 if the atom is not in a monosaccharide. | |
| unsigned | getNumberOfAtoms () const |
| unsigned | getNumberOfBeads () const |
| const std::string & | getResidueName (unsigned a) const |
| The residue name of atom a, after onebeadResidueAlias(). | |
| bool | isGlycanBridge (unsigned a) const |
| True for the oxygens bound to two heavy atoms in a monosaccharide (ring and glycosidic oxygens), and for the protein or nucleic-acid atoms that carry a glycan. | |
Static Public Member Functions | |
| static int | glycanTypeFromResname (const std::string &resname, bool hasN) |
| The GLYC_* bead type of a monosaccharide residue name, or -1 if the residue is not a supported glycan. | |
| static double | ionMass (unsigned ion) |
| The atomic mass (g/mol) of an ion. | |
| static int | ionTypeFromResname (const std::string &resname) |
| The canonical ION_* id for a residue name, or -1 if it is not a known ion. | |
| static bool | isOnebeadProteinResidue (const PDB &pdb, const std::string &resname) |
| True when the residue is an amino acid (a single bead), CYX included. | |
| static bool | isUnsupportedGlycan (const std::string &resname) |
| True for monosaccharides that are recognised but not parameterised. | |
| static unsigned | obSlot (unsigned ion) |
| The ONEBEAD bead type of an ion. | |
| static std::string | onebeadResidueAlias (const std::string &resname) |
| The canonical name of a residue whose name encodes a glycosylation site (e.g. | |
Private Member Functions | |
| void | assignBeadTypes (const PDB &tmpl, const std::vector< AtomNumber > &atoms, const ErrorHandler &error) |
Private Attributes | |
| std::vector< std::string > | atom_name_ |
| std::vector< double > | atom_weight_ |
| std::vector< unsigned > | bead_atoms_ |
| std::vector< double > | bead_inv_mass_ |
| std::vector< unsigned > | bead_of_ |
| std::vector< unsigned > | bead_off_ |
| std::vector< unsigned > | bead_type_ |
| std::vector< bool > | glyc_bridge_ |
| std::vector< int > | glyc_type_ |
| std::vector< double > | mass_ |
| std::vector< std::string > | residue_name_ |
The ONEBEAD coarse-grained mapping of an all-atom structure.
Every amino acid is one bead, every nucleotide is two or three beads (sugar, base and, when present, phosphate), every monosaccharide is one bead and every monoatomic ion is one bead. A bead is the centre of mass of its atoms.
The mapping is built from an all-atom PDB (the template), read chain by chain and, within a chain, residue by residue. The template must contain exactly the atoms of the list passed to the constructor, in the same order. Atom indices in this class are positions in that list.
| typedef std::function<void(const std::string &)> PLMD::isdb::OnebeadMapping::ErrorHandler |
Called with a message when the input is not valid.
It must not return (e.g. Action::error); if it does, the constructor throws.
|
inherited |
Bead types of the ONEBEAD model.
|
inherited |
Canonical ion identifiers.
The ATOMISTIC (AFF_*) and ONEBEAD (OB_*) ion slots of SAXS are listed in this same order.
| Enumerator | |
|---|---|
| ION_NA | |
| ION_K | |
| ION_CL | |
| ION_CA | |
| ION_MG | |
| ION_ZN | |
| ION_FE2 | |
| ION_FE3 | |
| ION_MN | |
| NIONS | |
| PLMD::isdb::OnebeadMapping::OnebeadMapping | ( | const PDB & | tmpl, |
| const std::vector< AtomNumber > & | atoms, | ||
| Log & | log, | ||
| const ErrorHandler & | error ) |
Build the mapping of atoms.
The template must be read with scale 1 (Angstrom). A summary of the residue-name aliases and of the glycans is written to log.
|
private |
|
inline |
The mass of atom a (g/mol), from its element.
|
inline |
The atom name of atom a, as in the template.
|
inline |
The mass of atom a divided by the mass of its bead: the derivative of the bead position with respect to the position of the atom.
|
inline |
The bead of atom a.
|
inline |
|
inline |
The atoms of bead b are getBeadAtoms()[k] for getBeadOffsets()[b] <= k < getBeadOffsets()[b+1], in increasing order.
| void PLMD::isdb::OnebeadMapping::getBeadPositions | ( | const std::vector< Vector > & | pos, |
| std::vector< Vector > & | beads ) const |
The positions of the beads (centres of mass) from those of the atoms.
The sums are done in the order of the atoms, so the result does not depend on the number of threads.
|
inline |
The bead type (TRP, ..., OB_MN) of bead b.
|
inline |
The GLYC_* bead type of atom a, or -1 if the atom is not in a monosaccharide.
|
inline |
|
inline |
|
inline |
The residue name of atom a, after onebeadResidueAlias().
|
staticinherited |
The GLYC_* bead type of a monosaccharide residue name, or -1 if the residue is not a supported glycan.
hasN must be true when the residue carries an amide nitrogen: that is what distinguishes GlcNAc from Glc and GalNAc from Gal when the input file names an N-acetylhexosamine after its parent hexose.
|
staticinherited |
The atomic mass (g/mol) of an ion.
|
staticinherited |
The canonical ION_* id for a residue name, or -1 if it is not a known ion.
|
inline |
True for the oxygens bound to two heavy atoms in a monosaccharide (ring and glycosidic oxygens), and for the protein or nucleic-acid atoms that carry a glycan.
|
staticinherited |
True when the residue is an amino acid (a single bead), CYX included.
|
staticinherited |
True for monosaccharides that are recognised but not parameterised.
|
inlinestaticinherited |
The ONEBEAD bead type of an ion.
|
staticinherited |
The canonical name of a residue whose name encodes a glycosylation site (e.g.
NLN -> ASN); other names are returned unchanged.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Hosted by GitHub
|
1.13.2
|