Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

ObjCryst::MolBond Class Reference

Bond between two atoms, also a restraint on the associated bond length. More...

Inheritance diagram for ObjCryst::MolBond:

Inheritance graph
[legend]
Collaboration diagram for ObjCryst::MolBond:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 MolBond (MolAtom &atom1, MolAtom &atom2, const REAL length, const REAL sigma, const REAL delta, Molecule &parent, const REAL bondOrder=1.)
 Constructor.

virtual ~MolBond ()
 Destructor.

const MoleculeGetMolecule () const
MoleculeGetMolecule ()
string GetName () const
 Name of the bond, e.g. "C3-O4".

virtual void XMLOutput (ostream &os, int indent=0) const
virtual void XMLInput (istream &is, const XMLCrystTag &tag)
virtual REAL GetLogLikelihood () const
 Get -ln(likelihood) for this restraint.

REAL GetLogLikelihood (const bool calcDeriv, const bool recalc) const
REAL GetDeriv (const std::map< const MolAtom *, XYZ > &m, const bool llk=false) const
 Get the derivative of the bond length, given the derivatives of the atom positions This requires that GetLogLikelihood(calcDeriv=true) be called first.

const MolAtomGetAtom1 () const
const MolAtomGetAtom2 () const
MolAtomGetAtom1 ()
MolAtomGetAtom2 ()
void SetAtom1 (MolAtom &at1)
void SetAtom2 (MolAtom &at2)
REAL GetLength () const
REAL GetLength0 () const
REAL GetLengthDelta () const
REAL GetLengthSigma () const
REAL GetBondOrder () const
REAL & Length0 ()
REAL & LengthDelta ()
REAL & LengthSigma ()
REAL & BondOrder ()
void SetLength0 (const REAL length)
void SetLengthDelta (const REAL length)
void SetLengthSigma (const REAL length)
void SetBondOrder (const REAL length)
bool IsFreeTorsion () const
void SetFreeTorsion (const bool isInRing)

Private Attributes

pair< MolAtom *, MolAtom * > mAtomPair
REAL mLength0
REAL mDelta
REAL mSigma
REAL mBondOrder
bool mIsFreeTorsion
MoleculempMol
 Parent Molecule.

REAL mLLK
 Stored log(likelihood).

XYZ mDerivAtom1
 Derivatives of the bond length with respect to the coordinates of the atoms.

XYZ mDerivAtom2
 Derivatives of the bond length with respect to the coordinates of the atoms.

REAL mDerivLLKCoeff
 The factor used to change the derivative of the length/angle, to the derivative of the log(likelihood).


Detailed Description

Bond between two atoms, also a restraint on the associated bond length.


Constructor & Destructor Documentation

ObjCryst::MolBond::MolBond MolAtom atom1,
MolAtom atom2,
const REAL  length,
const REAL  sigma,
const REAL  delta,
Molecule parent,
const REAL  bondOrder = 1.
 

Constructor.

Both atoms of the bond are told of the creation of the bond, so that they can keep a list of bonds they are involved in.

Parameters:
atom1,atom2: the atoms of the bond
length: the expected bond length
sigma,delta: depending on the calculated length, the log(likelihood) is equal to:
  • within $[length_{0}-\delta;length_{0}+\delta]$: $ -\log(likelihood)= \log\left(2\delta+\sqrt{2\pi\sigma^2}\right)$
  • if $length > length_{0}+\delta$: $ -\log(likelihood)= \log\left(2\delta+\sqrt{2\pi\sigma^2}\right) + \left(\frac{(length-\delta)-length_{0}}{\sigma} \right)^2$
  • if $length < length_{0}-\delta$: $ -\log(likelihood)= \log\left(2\delta+\sqrt{2\pi\sigma^2}\right) + \left(\frac{(length+\delta)-length_{0}}{\sigma} \right)^2$

virtual ObjCryst::MolBond::~MolBond  )  [virtual]
 

Destructor.

Notifies the atoms that the bond has disappeared.


Member Function Documentation

REAL& ObjCryst::MolBond::BondOrder  ) 
 

MolAtom& ObjCryst::MolBond::GetAtom1  ) 
 

const MolAtom& ObjCryst::MolBond::GetAtom1  )  const
 

MolAtom& ObjCryst::MolBond::GetAtom2  ) 
 

const MolAtom& ObjCryst::MolBond::GetAtom2  )  const
 

REAL ObjCryst::MolBond::GetBondOrder  )  const
 

REAL ObjCryst::MolBond::GetDeriv const std::map< const MolAtom *, XYZ > &  m,
const bool  llk = false
const
 

Get the derivative of the bond length, given the derivatives of the atom positions This requires that GetLogLikelihood(calcDeriv=true) be called first.

If llk=true, this will return the derivative of the llk rather than the derivative of the length or angle

REAL ObjCryst::MolBond::GetLength  )  const
 

REAL ObjCryst::MolBond::GetLength0  )  const
 

REAL ObjCryst::MolBond::GetLengthDelta  )  const
 

REAL ObjCryst::MolBond::GetLengthSigma  )  const
 

REAL ObjCryst::MolBond::GetLogLikelihood const bool  calcDeriv,
const bool  recalc
const
 

virtual REAL ObjCryst::MolBond::GetLogLikelihood  )  const [virtual]
 

Get -ln(likelihood) for this restraint.

Reimplemented from ObjCryst::Restraint.

Molecule& ObjCryst::MolBond::GetMolecule  ) 
 

const Molecule& ObjCryst::MolBond::GetMolecule  )  const
 

string ObjCryst::MolBond::GetName  )  const
 

Name of the bond, e.g. "C3-O4".

bool ObjCryst::MolBond::IsFreeTorsion  )  const
 

REAL& ObjCryst::MolBond::Length0  ) 
 

REAL& ObjCryst::MolBond::LengthDelta  ) 
 

REAL& ObjCryst::MolBond::LengthSigma  ) 
 

void ObjCryst::MolBond::SetAtom1 MolAtom at1  ) 
 

void ObjCryst::MolBond::SetAtom2 MolAtom at2  ) 
 

void ObjCryst::MolBond::SetBondOrder const REAL  length  ) 
 

void ObjCryst::MolBond::SetFreeTorsion const bool  isInRing  ) 
 

void ObjCryst::MolBond::SetLength0 const REAL  length  ) 
 

void ObjCryst::MolBond::SetLengthDelta const REAL  length  ) 
 

void ObjCryst::MolBond::SetLengthSigma const REAL  length  ) 
 

virtual void ObjCryst::MolBond::XMLInput istream &  is,
const XMLCrystTag tag
[virtual]
 

virtual void ObjCryst::MolBond::XMLOutput ostream &  os,
int  indent = 0
const [virtual]
 


Member Data Documentation

pair<MolAtom*,MolAtom*> ObjCryst::MolBond::mAtomPair [private]
 

REAL ObjCryst::MolBond::mBondOrder [private]
 

REAL ObjCryst::MolBond::mDelta [private]
 

XYZ ObjCryst::MolBond::mDerivAtom1 [mutable, private]
 

Derivatives of the bond length with respect to the coordinates of the atoms.

The derivatives are calculated in MolBond::GetLogLikelihood(true)

XYZ ObjCryst::MolBond::mDerivAtom2 [mutable, private]
 

Derivatives of the bond length with respect to the coordinates of the atoms.

The derivatives are calculated in MolBond::GetLogLikelihood(true)

REAL ObjCryst::MolBond::mDerivLLKCoeff [mutable, private]
 

The factor used to change the derivative of the length/angle, to the derivative of the log(likelihood).

e.g. (for mDelta=0) $ mDerivLLKCoeff = \frac{L-L_0}{\sigma^2} $

bool ObjCryst::MolBond::mIsFreeTorsion [private]
 

REAL ObjCryst::MolBond::mLength0 [private]
 

REAL ObjCryst::MolBond::mLLK [mutable, private]
 

Stored log(likelihood).

Molecule* ObjCryst::MolBond::mpMol [private]
 

Parent Molecule.

REAL ObjCryst::MolBond::mSigma [private]
 


The documentation for this class was generated from the following file:
Generated on Tue Nov 14 15:03:54 2006 for ObjCryst++ by doxygen 1.3.6