Victor
|
Implements a "Spacer" for a protein chain. Includes methods to obtain values from the atoms and its pdb information. More...
Public Member Functions | |
Spacer () | |
Spacer (const Spacer &orig) | |
virtual | ~Spacer () |
virtual void | acceptCalculator (EnergyVisitor *v) |
virtual void | acceptOptimizer (OptimizationVisitor *v) |
void | addGap (int index) |
void | addRot (vgMatrix3< double > r) |
void | addTrans (vgVector3< double > t) |
virtual void | bindIn (Atom &_this, Bond &c, Atom &_other) |
virtual void | bindIn (SimpleBond &c) |
virtual void | bindOut (Atom &_this, Bond &c, Atom &_other) |
virtual void | bindOut (SimpleBond &c) |
virtual Component * | clone () |
bool | collides (Component &other, double dist=0.0) |
void | copy (const Bond &orig) |
void | copy (const Polymer &orig) |
virtual void | copy (const SimpleBond &orig) |
void | copy (const Component &orig) |
void | copy (const Spacer &orig) |
void | deleteComponent (Component *c) |
AminoAcid & | getAmino (unsigned int n) |
const AminoAcid & | getAmino (unsigned int n) const |
vector< pair< unsigned int, unsigned int > > | getHelixData () |
vector< pair< int, int > > | getHoles () |
const Spacer & | getInBond (unsigned int n) const |
Spacer & | getInBond (unsigned int n) |
virtual Atom & | getInBondRef (unsigned int n) |
int | getIndexFromPdbNumber (int index) |
virtual vgVector3< double > | getLowerBound (double dist=0.0) |
unsigned int | getMaxInBonds () const |
unsigned int | getMaxOutBonds () const |
virtual const Atom & | getOpenInBondRef (unsigned int n=0) const |
virtual Atom & | getOpenInBondRef (unsigned int n=0) |
virtual const Atom & | getOpenOutBondRef (unsigned int n=0) const |
virtual Atom & | getOpenOutBondRef (unsigned int n=0) |
const Spacer & | getOutBond (unsigned int n) const |
Spacer & | getOutBond (unsigned int n) |
virtual Atom & | getOutBondRef (unsigned int n) |
int | getPdbNumberFromIndex (int index) |
Spacer & | getSpacer (unsigned int n) |
const Spacer & | getSpacer (unsigned int n) const |
vector< pair< unsigned int, unsigned int > > | getStrandData () |
virtual string | getType () const |
virtual vgVector3< double > | getUpperBound (double dist=0.0) |
void | groupLikeStateCode () |
void | insertAminoAfter (string code, unsigned int n=9999, double phi=-62, double psi=-41, double omega=180, double NToCaLen=1.458, double CaToCLen=1.52, double CToOLen=1.231, double atCaToCAng=111.6, double CaToOAng=120.80, double CtoNLen=1.33, double atCToNAng=116.4, double OToNAng=123.2, double atNToCaAng=121.9) |
void | insertAminoAfterWithGaps (string code, unsigned int n=9999, double phi=-62, double psi=-41, double omega=180, int beginHole=0, int endHole=0, vgVector3< double > ca1=vgVector3< double >(), vgVector3< double > ca2=vgVector3< double >(), string target="", Spacer *refSpacer=0, Spacer *pOriginalSpacer=0, double NToCaLen=1.458, double CaToCLen=1.52, double CToOLen=1.231, double atCaToCAng=111.6, double CaToOAng=120.80, double CtoNLen=1.33, double atCToNAng=116.4, double OToNAng=123.2, double atNToCaAng=121.9) |
void | insertAminoBefore (string code, unsigned int p=0, double phi=-62, double psi=-41, double omega=180, double NToCaLen=1.458, double CaToCLen=1.52, double CToOLen=1.231, double atCaToCAng=111.6, double CaToOAng=120.80, double CtoNLen=1.33, double atCToNAng=116.4, double OToNAng=123.2, double atNToCaAng=121.9) |
void | insertComponent (Component *c) |
void | insertFirstSpacer (Spacer *sp) |
void | insertSubSpacerAfter (Spacer *sp, unsigned int pos) |
bool | inSync () |
bool | isBond (const SimpleBond &c) const |
bool | isGap (int index) |
bool | isInBond (const SimpleBond &c) const |
bool | isIndirectBond (const SimpleBond &c) const |
bool | isIndirectInBond (const SimpleBond &c) const |
bool | isIndirectOutBond (const SimpleBond &c) const |
bool | isOutBond (const SimpleBond &c) const |
bool | isTorsionBond (const SimpleBond &c) const |
void | load (Loader &l) |
void | makeFlat () |
void | mergeSpacer (Spacer *s) |
Spacer & | operator= (const Spacer &orig) |
void | printComponents () |
void | printGaps () |
void | printSubSpacerList () |
void | removeAllGaps () |
void | removeComponent (Component *c) |
void | removeComponentFromIndex (unsigned int i) |
void | removeGap (int index) |
void | save (Saver &s) |
void | setAtomStartOffset (int _offset) |
void | setDSSP (bool verbose) |
void | setMaxInBonds (unsigned int m) |
void | setMaxOutBonds (unsigned int m) |
void | setRot (vgMatrix3< double > r) |
void | setStartOffset (int _offset) |
void | setStateFromSecondary (string sec) |
void | setStateFromTorsionAngles () |
void | setTrans (vgVector3< double > t) |
virtual void | setType (string _name) |
const unsigned int | sizeAmino () const |
unsigned int | sizeInBonds () const |
unsigned int | sizeOpenInBonds () const |
unsigned int | sizeOpenOutBonds () const |
unsigned int | sizeOutBonds () const |
const unsigned int | sizeSpacer () const |
Spacer * | splitSpacer (unsigned int index, unsigned int count) |
void | sync () |
virtual void | unbindIn (Bond &c) |
virtual void | unbindIn (SimpleBond &c) |
virtual void | unbindOut (Bond &c) |
virtual void | unbindOut (SimpleBond &c) |
Static Public Member Functions | |
static bool | NMRGetMinimumCADistanceVector (const string &strFileName, vector< double > *pNMR) |
Protected Member Functions | |
void | getBackboneHbonds () |
pair< unsigned int, unsigned int > | getSubSpacerListEntry (unsigned int) |
pair< unsigned int, unsigned int > | getSubSpacerListEntry (unsigned int) const |
void | modifySubSpacerList (Spacer *, int) |
virtual void | pUnbindIn (SimpleBond &c) |
virtual void | pUnbindOut (SimpleBond &c) |
void | resetBoundaries () |
void | updateSubSpacerList () |
Implements a "Spacer" for a protein chain. Includes methods to obtain values from the atoms and its pdb information.
***Attention*** The current implementation allows for "1 to 1" spacers, ie. spacers composed of a single aminoacid chain. Class that develop the virtual methods from the parent class Polymer.
Spacer | ( | ) |
Basic constructor
constructor based in another object
orig,reference | to the original object to copy |
|
virtual |
Basic destructor
|
virtual |
|
virtual |
void addGap | ( | int | index | ) |
Modifier used to add a gap into the list of gaps.
index,amino | acid number from on the pdb file |
|
virtual |
|
virtual |
In-going bond from this to c, from this' atom _this to c's _other atom.
atom | reference, bond reference, atom reference |
|
virtualinherited |
Sets and in-bond from this to c.
Reimplemented in Atom.
Out-going bond from this to c, from this' atom _this to c's _other atom.
atom | reference, bond reference, atom reference |
|
virtualinherited |
Sets and out-bond from this to c
Reimplemented in Atom.
|
virtual |
|
inherited |
Is other within dist of this' bounding box?
other | (Component) |
dist | (double) |
|
inherited |
Copy operator. Attention: copy() strips orig from its bonds and attaches them to the new bond.
bond | reference |
|
inherited |
|
virtualinherited |
Copy operator. Attention: copy() strips orig from its bonds and attaches them to the new bond.
|
inherited |
Copy the component. Attention: new elements have to be copied also in Monomer::copy() since it does NOT invoke this function (segmentation fault if it does).
orig |
void copy | ( | const Spacer & | orig | ) |
Copies the given the spacer
orig,reference | to the spacer to copy |
|
virtual |
AminoAcid & getAmino | ( | unsigned int | n | ) |
const AminoAcid & getAmino | ( | unsigned int | n | ) | const |
|
protected |
Set the state from H bonds. H bond definition: Kabsch, Sander, Biopolymers. 1983 Dec;22(12):2577-637.
vector< pair< unsigned int, unsigned int > > getHelixData | ( | ) |
Predicate used to get the range for the Helix amino acids
vector< pair< int, int > > getHoles | ( | ) |
This function returs a pair array that define holes into the PDB numbering. NOTE: The function returns exactly where an hole starts and ends.
|
virtual |
Returns the reference to the spacer that contains the inBond for the n Atom
n,index | of the atom |
Reimplemented from SimpleBond.
|
virtual |
Returns the reference to the spacer that contains the inBond for the n Atom
n,index | of the atom |
Reimplemented from SimpleBond.
|
virtualinherited |
int getIndexFromPdbNumber | ( | int | index | ) |
Predicate used to get the internal array number corresponding to a given PDB aminoacid number (Residue sequence number, columns 23-26 of a pdb file).
index,pdb | number |
|
virtualinherited |
Return the lower bound coordinates.
dist |
|
inherited |
Get maximum of in-bonds.
|
inherited |
Get maximum of out-bonds.
|
virtual |
used to obtain the corresponding reference to the InBond of the n amino acid
n,index | of the atom |
Reimplemented from Bond.
|
virtual |
used to obtain the corresponding reference to the InBond of the n amino acid
n,index | of the atom |
Reimplemented from Bond.
|
virtual |
used to obtain the corresponding reference to the OutBond of the n amino acid
n,index | of the atom |
Reimplemented from Bond.
|
virtual |
used to obtain the corresponding reference to the OutBond of the n amino acid
n,index | of the atom |
Reimplemented from Bond.
|
virtual |
Returns the reference to the spacer that contains the outBond for the n Atom
n,index | of the atom |
Reimplemented from SimpleBond.
|
virtual |
Returns the reference to the spacer that contains the outBond for the n Atom
n,index | of the atom |
Reimplemented from SimpleBond.
|
virtualinherited |
int getPdbNumberFromIndex | ( | int | index | ) |
Predicate used to get the PDB aminoacid number (Residue sequence number, columns 23-26 of a pdb file) corresponding to a given internal array number
index,internal | array number |
Spacer & getSpacer | ( | unsigned int | n | ) |
const Spacer & getSpacer | ( | unsigned int | n | ) | const |
vector< pair< unsigned int, unsigned int > > getStrandData | ( | ) |
Predicate used to get the range for the Strand amino acids
|
protected |
Returns the first and last aminoacid indexes from the sub-spacer in a <pair>. The difference (last - first) is the count of amino acids in the whole sub-spacer structure.
n,corresponding | index |
|
protected |
Returns the first and last aminoacid index from the sub-spacer in a <pair>. The difference (last - first) is the count of amino acids in the whole sub-spacer structure.
n,corresponding | index |
|
virtualinherited |
Is c bonded to this ?
Reimplemented in SideChain.
|
virtualinherited |
Return the upper bound coordinates.
dist |
void groupLikeStateCode | ( | ) |
Group the spacer (and his sub-spacers) like the state codes of the aminoacids. After this the aminoacid structure is grouped in HELIX-spacer,STRANDS-spacer,COIL-spacer and TURN-spacer.
void insertAminoAfter | ( | string | code, |
unsigned int | n = 9999 , |
||
double | phi = -62 , |
||
double | psi = -41 , |
||
double | omega = 180 , |
||
double | NToCaLen = 1.458 , |
||
double | CaToCLen = 1.52 , |
||
double | CToOLen = 1.231 , |
||
double | atCaToCAng = 111.6 , |
||
double | CaToOAng = 120.80 , |
||
double | CtoNLen = 1.33 , |
||
double | atCToNAng = 116.4 , |
||
double | OToNAng = 123.2 , |
||
double | atNToCaAng = 121.9 |
||
) |
Insert a new aminoacid of type 'code' after position 'n'. Atoms are set according to lenght and angle cristallographic values. Torsion angles are given in input (DEFAULT: -62', -41') WARNING: This function is only implemented for 'flat' spacers. Ie. no subspacers can be handled. NB: This function is invoked by the Nazgul module to temporarily (!!!) fill gaps.
code | |
n | |
phi | |
psi | |
omega | |
NToCaLen | |
CaToCLen | |
CToOLen | |
atCaToCAng | |
CaToOAng | |
CtoNLen | |
atCToNAng | |
OToNAng | |
atNToCaAng |
void insertAminoAfterWithGaps | ( | string | code, |
unsigned int | n = 9999 , |
||
double | phi = -62 , |
||
double | psi = -41 , |
||
double | omega = 180 , |
||
int | beginHole = 0 , |
||
int | endHole = 0 , |
||
vgVector3< double > | ca1 = vgVector3<double>() , |
||
vgVector3< double > | ca2 = vgVector3<double>() , |
||
string | target = "" , |
||
Spacer * | refSpacer = 0 , |
||
Spacer * | pOriginalSpacer = 0 , |
||
double | NToCaLen = 1.458 , |
||
double | CaToCLen = 1.52 , |
||
double | CToOLen = 1.231 , |
||
double | atCaToCAng = 111.6 , |
||
double | CaToOAng = 120.80 , |
||
double | CtoNLen = 1.33 , |
||
double | atCToNAng = 116.4 , |
||
double | OToNAng = 123.2 , |
||
double | atNToCaAng = 121.9 |
||
) |
Used to insert an amino after a GAP. The general idea is to develop a mixed function between inserting a new amino and connecting aminoacids in the spacer). The difference is placed into the parameters beginHole & endHole. They represent those two indices such that (beginHole+1..endHole-1) is an hole. We need these parameters for deciding how to change the internal numbering
code | |
n | |
phi | |
psi | |
omega | |
beginHole | |
endHole | |
ca1 | |
ca2 | |
target | |
refSpacer | |
pOriginalSpacer | |
NToCaLen | |
CaToCLen | |
CToOLen | |
atCaToCAng | |
CaToOAng | |
CtoNLen | |
atCToNAng | |
OToNAng | |
atNToCaAng |
void insertAminoBefore | ( | string | code, |
unsigned int | p = 0 , |
||
double | phi = -62 , |
||
double | psi = -41 , |
||
double | omega = 180 , |
||
double | NToCaLen = 1.458 , |
||
double | CaToCLen = 1.52 , |
||
double | CToOLen = 1.231 , |
||
double | atCaToCAng = 111.6 , |
||
double | CaToOAng = 120.80 , |
||
double | CtoNLen = 1.33 , |
||
double | atCToNAng = 116.4 , |
||
double | OToNAng = 123.2 , |
||
double | atNToCaAng = 121.9 |
||
) |
This function is only implemented for 'flat' spacers. Ie. no subspacers can be handled. NB: This function is invoked by the Nazgul module to temporarily (!!!) fill gaps. WARNING: this method still requires to be corrected: problems are found in positioning the O atom.
code | |
p | |
phi | |
psi | |
omega | |
NToCaLen | |
CaToCLen | |
CToOLen | |
atCaToCAng | |
CaToOAng | |
CtoNLen | |
atCToNAng | |
OToNAng | |
atNToCaAng |
|
virtual |
Insert a component(only an Amino acid or Sapacer class type are allowed) in the spacer at the back side. It doesn't connect the components.
c,pointer | to the component to insert |
Reimplemented from Polymer.
void insertFirstSpacer | ( | Spacer * | sp | ) |
insert a new sub spacer inside an empty spacer structure WARNING: this method works only with superior spacers which are made of other subspacers only (child components must be all spacers, the presence of aminoacids is not considered) (This assumption is sufficient for the Thor module)
sp,spacer | reference |
void insertSubSpacerAfter | ( | Spacer * | sp, |
unsigned int | pos | ||
) |
insert a new sub spacer inside a spacer structure. N.B. spacers are not positioned, they maintain original coordinates WARNING: this method works only with superior spacers which are made of other subspacers only (child components must be all spacers, the presence of aminoacids is not considered) (This assumption is sufficient for the Thor module)
sp,Spacer | reference |
pos |
|
inherited |
Checks the "Modified" flag in the component.
|
inherited |
Is c bonded to this ?
bool isGap | ( | int | index | ) |
Predicate used to determine if there is a gap in a given position/PDB aminoacid number
index,given | position to evaluate |
|
inherited |
Is c in-bonded to this ?
|
inherited |
Checks if this is indirectly bonded to c. (ie. A to C if A bond B and B bond C)
|
inherited |
Checks if this is indirectly bonded to c. (ie. A to C if A bond B and B bond C)
|
inherited |
Checks if this is indirectly bonded to c. (ie. A to C if A bond B and B bond C)
|
inherited |
Is c out-bonded to this ?
|
inherited |
Checks if this is torsion bond to c. (ie. A to D if A indirect bond C and C bond D)
|
virtual |
void makeFlat | ( | ) |
Rearrange the spacer (and all sub-spacers) as a flat tree. After this there are no more sub-spacers..
void mergeSpacer | ( | Spacer * | s | ) |
Merge the components of the sub-spacer <s> at the place of <s> in the spacer <this>..
s,spacer | reference |
|
protected |
If something has changed in the spacer structure, this method updates the spacer given as a parameter .
s,pointer | to the spacer to modify(Spacer*), |
count,number | of aminoacids which has inserted (positive value) or deleted (negativ value) |
|
static |
This helper function, is used to implement an optimization to mjollnir. What it does is simple and it works only for NMR PDB files. We load it and we read the number of different models stored. After it, we load every single model and once we did it, we calculate every single distance between Ca atoms. We return a position-related array, where each position is the minimum distance between each pair of Ca.
strFileName,PDB | file name |
pNMR,the | reference vector for the result values |
Assign the spacer to another spacer.
orig,reference | for the original spacer |
void printComponents | ( | ) |
Prints the components.
void printGaps | ( | ) |
Predicate used to a list of the positions/pdb amino acid numbers where a gap is present
void printSubSpacerList | ( | ) |
Prints the subspacer list.
|
protectedvirtualinherited |
Private method to find the matching in-bond from c to this to remove.
|
protectedvirtualinherited |
Private method to find the matching out-bond from c to this to remove.
void removeAllGaps | ( | ) |
Modifier used to remove all gaps from the gap list.
|
virtual |
Removes the corresponding component
c,pointer | to the component to remove, usually the object that is calling the method. |
Reimplemented from Polymer.
|
virtual |
Removes the corresponding component in the corresponding index
i,index | to the component to remove, usually the index of the object that is calling the method. |
Reimplemented from Polymer.
void removeGap | ( | int | index | ) |
Modifier used to remove a specific gap from the gaps list created.
index,amino | acid number |
|
protectedvirtual |
Reset the amino acids boundaries
Reimplemented from Polymer.
|
virtual |
void setAtomStartOffset | ( | int | _offset | ) |
Set the atom offset
_offset |
void setDSSP | ( | bool | verbose | ) |
Set the secondary structure (states) from H bonds.
SS definition: Kabsch, Sander, Biopolymers. 1983 Dec;22(12):2577-637.
n-Turn: T = (i,i+n) n=3,4,5 3 = (n = 3) 4 = (n = 4) 5 = (n = 5)
Bridge: B = (i-1,i,i+1) (j-1,j,j+1) nonoverlapping P = parallel (i-1,j) && (j,i+1) || (j-1,i) && (i,j+1) A = anti (i,j) && (j,i) || (i-1,j+1) && (j-1,i+1)
Helices at least 2 consecutive n-Turns (longer helices by overlapping) G = 3-helix : (i-1,i+2) && (i,i+3) H = 4-helix at i: (i-1,i+3) && (i,i+4) I = 5-helix : (i-1,i+4) && (i,i+5)
Ladder: B = Consecutive bridges of identical type Sheet: E = One or more ladders connected by shared residues Bend: S = angle { CA(i)-CA(i-2), CA(i+2)-CA(i) } > 70
Structure Priority (switched E and B): H E B G I T S
TODO: check for chain breaks. TODO: remove small helices. TODO: check for bulges.
|
inherited |
Sets maximum of in-bonds.
|
inherited |
Sets maximum of out-bonds.
|
virtual |
void setStartOffset | ( | int | _offset | ) |
Set the start offset, considers the first amino acid number in the pdb file
_offset,value | for the offset |
void setStateFromSecondary | ( | string | sec | ) |
Set the state (HELIX or STRAND ...) from the string sec which may be generated for example by DSSP.
sec,secondary | structure sequence |
void setStateFromTorsionAngles | ( | ) |
Set the state (HELIX or STRAND ...) from the torsion angles of the aminoacids (phi/psi angles).
|
virtual |
|
virtualinherited |
Sets type (eg. C atom, GLY amino acid, etc.) of this.
Reimplemented in AminoAcid, Atom, and Nucleotide.
const unsigned int sizeAmino | ( | ) | const |
Returns the count of all aminoacids in the spacer
|
inherited |
How many in-bonds are there ?
|
inherited |
Returns the number of open in-bonds, ie. how many in-bonds can still be added.
void |
|
inherited |
Returns the number of open out-bonds, ie. how many out-bonds can still be added.
void |
|
inherited |
How many out-bonds are there ?
const unsigned int sizeSpacer | ( | ) | const |
Allows to know if there is a spacer in the protein or not.
Spacer * splitSpacer | ( | unsigned int | start, |
unsigned int | end | ||
) |
Create a new sub-spacer at the place of <start> and put all components between <start> and <end> in the new sub-spacer. The method returns the pointer at the new sub-spacer.
start | |
end |
|
virtual |
Synchronizes coords with structure
Reimplemented from Polymer.
|
virtualinherited |
Remove in-going bond from this to c.
bond | reference |
|
virtualinherited |
Removes an in-bond from this to c.
Reimplemented in Atom.
|
virtualinherited |
Remove out-going bond from this to c.
bond | reference |
|
virtualinherited |
Removes an out-bond from this to c.
Reimplemented in Atom.
|
protected |
Update the internal structure of a spacer after a change in the structure of a spacer.