MSpin-JCoupling  2.1
Public Member Functions | List of all members
magnes::Molecule Class Reference

Public Member Functions

 Molecule ()
 
 Molecule (const Molecule &mol)
 
Moleculeoperator= (const Molecule &mol)
 
Molecule At (size_t frame) const
 
const std::vector< Frame > & Frames () const
 
std::vector< Frame > & Frames ()
 
const FrameCurrentFrame () const
 
FrameCurrentFrame ()
 
size_t CurrentFrameIndex () const
 
void SetCurrentFrame (size_t i)
 
const std::vector< Atom > & Atoms () const
 
std::vector< Atom > & Atoms ()
 
const std::vector< Bond > & Bonds () const
 
std::vector< Bond > & Bonds ()
 
size_t NBonds (size_t i, size_t j) const
 
const std::vector< double > & Populations () const
 
std::vector< double > & Populations ()
 
double Weight () const
 
void MoveToCentroid ()
 
std::vector< std::vector< size_t > > Rings (size_t size=0) const
 
std::vector< std::vector< size_t > > EssentialRings (size_t size=0) const
 
bool IsRingTied (const std::vector< size_t > &ring) const
 
std::vector< size_t > ShortestPath (size_t i, size_t j) const
 
std::vector< int > FindAtomByName (const std::string &name) const
 
double CalculateWeight () const
 
Atom::hybridization Hybridization (size_t atom) const
 
void SetBonds (bool eachframe=false)
 
const std::vector< PDBResidue * > & Residues () const
 
std::vector< PDBResidue * > & Residues ()
 
std::list< int > Elements () const
 
std::list< std::string > ElementSymbols () const
 
std::vector< size_t > Neighbours (size_t i) const
 
size_t IndexFromPDB (const std::string &pdbname, const std::string &resname, const std::string &resindex) const
 
std::vector< std::vector< double > > SuperImposeMackay (size_t reframe, const std::vector< size_t > &atoms)
 
std::vector< std::vector< double > > SuperImpose (size_t reframe, const std::vector< size_t > &atoms, bool massweighted=false)
 
std::vector< std::vector< double > > EckartTransform (size_t reframe, const std::vector< size_t > &atoms)
 
bool CheckConformersSanity () const
 
void ReparentFrames ()
 
const std::string & FileName () const
 
void SetFileName (const std::string &filename)
 

Constructor & Destructor Documentation

§ Molecule() [1/2]

magnes::Molecule::Molecule ( )

Build an empty molecule

§ Molecule() [2/2]

magnes::Molecule::Molecule ( const Molecule mol)

copy constructor

Member Function Documentation

§ At()

Molecule magnes::Molecule::At ( size_t  frame) const

return frame i as a complete new molecule

§ Atoms() [1/2]

const std::vector<Atom>& magnes::Molecule::Atoms ( ) const
Returns
a const stl vector of atoms in this molecule

§ Atoms() [2/2]

std::vector<Atom>& magnes::Molecule::Atoms ( )
Returns
a const stl vector of atoms in this molecule

§ Bonds() [1/2]

const std::vector<Bond>& magnes::Molecule::Bonds ( ) const
Returns
a const stl vector of bonds in this molecule

§ Bonds() [2/2]

std::vector<Bond>& magnes::Molecule::Bonds ( )
Returns
a const stl vector of bonds in this molecule

§ CalculateWeight()

double magnes::Molecule::CalculateWeight ( ) const

Calculate Molecular Weight

§ CheckConformersSanity()

bool magnes::Molecule::CheckConformersSanity ( ) const

Check Conformers Sanity

§ CurrentFrame() [1/2]

const Frame& magnes::Molecule::CurrentFrame ( ) const
Returns
a const reference to the current conformer

§ CurrentFrame() [2/2]

Frame& magnes::Molecule::CurrentFrame ( )
Returns
a reference to the current conformer

§ CurrentFrameIndex()

size_t magnes::Molecule::CurrentFrameIndex ( ) const

return the index of the current conformer

§ EckartTransform()

std::vector< std::vector< double > > magnes::Molecule::EckartTransform ( size_t  reframe,
const std::vector< size_t > &  atoms 
)

superimpose all frames to reference frame f, minimizing the displacements for atoms,using mass weighted coordinate and Kersley algorithms

§ Elements()

std::list<int> magnes::Molecule::Elements ( ) const

return a ordered list with the different element atomic numbers present in the molecule

§ ElementSymbols()

std::list<std::string> magnes::Molecule::ElementSymbols ( ) const

return a ordered list with the different element atomic numbers present in the molecule

§ EssentialRings()

std::vector< std::vector<size_t> > magnes::Molecule::EssentialRings ( size_t  size = 0) const

Get the essential rings of size size

§ FileName()

const std::string& magnes::Molecule::FileName ( ) const

return the filename of the molecule

§ FindAtomByName()

std::vector<int> magnes::Molecule::FindAtomByName ( const std::string &  name) const

obsolete

§ Frames() [1/2]

const std::vector<Frame>& magnes::Molecule::Frames ( ) const
Returns
a const stl vector with all conformers

§ Frames() [2/2]

std::vector<Frame>& magnes::Molecule::Frames ( )
Returns
a stl vector with all conformers

§ Hybridization()

Atom::hybridization magnes::Molecule::Hybridization ( size_t  atom) const

Get Hybridization type for atom i

§ IndexFromPDB()

size_t magnes::Molecule::IndexFromPDB ( const std::string &  pdbname,
const std::string &  resname,
const std::string &  resindex 
) const

return the index of the atom from its pdb name

§ IsRingTied()

bool magnes::Molecule::IsRingTied ( const std::vector< size_t > &  ring) const

return true if ring is a tied ring

§ MoveToCentroid()

void magnes::Molecule::MoveToCentroid ( )

move molecule to the centroid

§ NBonds()

size_t magnes::Molecule::NBonds ( size_t  i,
size_t  j 
) const
Returns
the number of bonds between atoms i and j

§ Neighbours()

std::vector<size_t> magnes::Molecule::Neighbours ( size_t  i) const
Returns
a vector with the indexes of the atoms connected to atom i

§ operator=()

Molecule& magnes::Molecule::operator= ( const Molecule mol)

assignment operator

§ Populations() [1/2]

const std::vector<double>& magnes::Molecule::Populations ( ) const
Returns
populations

§ Populations() [2/2]

std::vector<double>& magnes::Molecule::Populations ( )
Returns
populations

§ ReparentFrames()

void magnes::Molecule::ReparentFrames ( )

reparent all frames in the molecule

§ Residues() [1/2]

const std::vector<PDBResidue*>& magnes::Molecule::Residues ( ) const

return a list of PDB residues

§ Residues() [2/2]

std::vector<PDBResidue*>& magnes::Molecule::Residues ( )

return a list of PDB residues

§ Rings()

std::vector< std::vector<size_t> > magnes::Molecule::Rings ( size_t  size = 0) const

Get the rings of size size

§ SetBonds()

void magnes::Molecule::SetBonds ( bool  eachframe = false)

automatically setup bonds based on atomic distances

§ SetCurrentFrame()

void magnes::Molecule::SetCurrentFrame ( size_t  i)

set the active conformer to i

§ SetFileName()

void magnes::Molecule::SetFileName ( const std::string &  filename)

set the filename for the molecule

§ ShortestPath()

std::vector<size_t> magnes::Molecule::ShortestPath ( size_t  i,
size_t  j 
) const

return the shortest path between atoms of indexes i and j

§ SuperImpose()

std::vector< std::vector<double> > magnes::Molecule::SuperImpose ( size_t  reframe,
const std::vector< size_t > &  atoms,
bool  massweighted = false 
)

superimpose all frames to reference frame f, minimizing the displacements for atoms, returns a list with the rmsd for the atomlist using Kearsley quaternion algorithm Kearsley, S. K. Acta Crystallographica 1989, A45, 208–210. doi: 10.1107/S0108767388010128

§ SuperImposeMackay()

std::vector< std::vector<double> > magnes::Molecule::SuperImposeMackay ( size_t  reframe,
const std::vector< size_t > &  atoms 
)

superimpose all frames to reference frame f, minimizing the displacements for atoms, returns a list with squared distnces for the atomlist using Mackay quaternion SVD algorithm Mackay, A. L. QActa Crystallographica 1984, A40, 165–166. The default implementation seems to have problems when theta/2=45

§ Weight()

double magnes::Molecule::Weight ( ) const
inline

returns molecular weight

References magnes::operator<<().


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