PROFASI  Version 1.5
Public Member Functions | List of all members
prf::Node Class Reference

A Node is (like in graph theory) a meeting point of a few bonds. More...

#include <Node.hh>

Inheritance diagram for prf::Node:
Inheritance graph

Public Member Functions

virtual void Initialize ()
 Initialize the node, possibly pre-calculate anything that can be.
virtual void Create ()
 Assign coordinates to atoms attached to outgoing bonds.
void ReCreate ()
 Recursive Create. Self followed by subnodes.
virtual void AssignPhi (double)
 assign to the dof of the Node.
double Phi ()
 retrieve the torsional angle
void LockPhi (double xx)
 Lock the torsional dof of the Node to value xx.
int Locked () const
 if it is really a dof
AtomATOM (int i)
 Reference to i'th atom.
Atomatom (int i)
 Reference to i'th atom.
void AddSubnode (Node *nd)
 Make another node a subnode.
void AtomOffset (int i)
void RevertPhi (double)
 Revert the torsional angle to a given value.
virtual void ExportConnections (ConnectionsMatrix &aa)
 Export connection information to an external ConnectionsMatrix.
virtual void LocPairs (std::deque< std::pair< int, int > > &lcp)
 List pairs of member atoms which are connected by 3 covalent bonds.
virtual void BuildConnections ()
 Assign proper Bases to subnodes and call BuildConnections on them.
virtual void SetBase (Atom &ap)
 Set a new atom as one Base.
void SetBase (Atom &, Atom &, Atom &)
 be careful: This actually means set Base, Root and Junction
void set_bases (Atom &b1, Atom &b2, Atom &b3)
 And this means set all bases.
void MobileAtoms (int &r1, int &r2)
 Atoms that move when the node turns.
void SetMobileAtoms (int i, int j)
 Set what range should be returned as the mobile atoms.
Atom assignment to nodes

The AssignAtoms series of functions is a means of allowing an an external routine to associate a node with any pre-defined set of atoms. Exactly how the atoms are to be organized inside a node to facilitate calculations is left for the inheritted classes to implement, according to the nature of the involved node. By default, it is assumed that you pass the Base,Root,Junction followed by a reference to an external atom array with an index from which to start reading the rest of the atoms. This behaviour is sufficient for simple short node types where the atoms in the node are simply covalently connected to the junction atom.

virtual void AssignAtoms (Atom &a0, Atom &a1, Atom &a2, std::vector< Atom > &att, int st)
virtual void AssignAtoms (Atom &a0, Atom &a1, Atom &a2, Atom &a3)
virtual void AssignAtoms (Atom &a0, Atom &a1, Atom &a2, Atom &a3, Atom &a4)
virtual void AssignAtoms (Atom &a0, Atom &a1, Atom &a2, Atom &a3, Atom &a4, Atom &a5)
Bond length assignments

The following four functions refer to the maximum number of such parameters that one might need, assuming there are at most 3 out-going bonds.

virtual void SetBondLengths (double, double, double, double, double)
virtual void SetBondAngles (double, double, double, double)
virtual void SetRelPhi (double, double)
virtual void SetBranchLength (int i, double x)
- Public Member Functions inherited from prf::Named
 Named ()
 Create an object with name "unnamed".
 Named (const char *st)
 Create an object with name st given as a C string.
 Named (std::string st)
 Create an object with a name given as a string.
std::string Name () const
 Retrive the name of an object.
void Name (std::string gnm)
 Assign a new name to an object.

Detailed Description

The Node class is used to facilitate implementation of different kinds molecules. A Node has one incoming bond, and a few out going bonds. There is of course one atom sitting at the node junction, and one atom attached to the incoming and each of the out going bonds. All these atoms are regarded as members of a node. By definition, a Node can have at most one degree of freedom: rotation about its incoming bond. This degree of freedom can sometimes be frozen or locked, if the molecule can not rotate about the incoming bond of the junction. The outgoing bonds can themselves lead to other nodes, which will be called subnodes of the parent node.

The atom located at the junction of bonds will be referred to as "Junction". The atom connected to it by the incoming bond is the "Root". Atoms connected to the Root (other than Junction) can serve as the reference direction to define a torsional angle about the incoming bond. Such an atom is called a "Base". There is one primary Base and upto two additional "alternative" Bases.

Member Function Documentation

void Node::AtomOffset ( int  i)

Offset UniqueIds of all atoms by i

void Node::Create ( )

*Using the position of Base, Root and Junction, and the state of the degree of freedom associated with the node, find the coordinates of all other atoms in the node.

Reimplemented in prf::TetrahedralGroup, prf::ATetGroup, prf::ATriGroup, prf::TrigonalGroup, prf::DihedralGroup, prf::PhenylGroup, prf::MPhenylGroup, prf::ArginineTip, prf::HistidineTip, and prf::TryptophanTip.

void Node::MobileAtoms ( int &  r1,
int &  r2 

Returns an inclusive range between r1 and r2. This means all atoms with unique_ids between r1 and r2 (inclusive) should be assumed to have moved.

void Node::RevertPhi ( double  x)

Unlike AssignPhi, RevertPhi does not implicitly calculate the coordinates of all attached atoms. This function is meant to be called when an Update is rejected, and assumes that the atom coordinates have been restored from the backup values externally.

void Node::set_bases ( Atom b1,
Atom b2,
Atom b3 

Any previously stored bases will be forgotten, and only the values given here will be used.

The documentation for this class was generated from the following files:

PROFASI: Protein Folding and Aggregation Simulator, Version 1.5
© (2005-2016) Anders Irbäck and Sandipan Mohanty
Documentation generated on Mon Jul 18 2016 using Doxygen version 1.8.2