Simpatico  v1.10
List of all members | Public Types | Public Member Functions | Static Public Attributes
McMd::Molecule Class Reference

Detailed Description

A physical molecule (a set of covalently bonded Atoms).

Definition at line 42 of file mcMd/chemistry/Molecule.h.

#include <Molecule.h>

Public Types

typedef ArrayIterator< AtomAtomIterator
 Iterator for Atoms within a Molecule. More...
 
typedef ConstArrayIterator< AtomConstAtomIterator
 Iterator for const Atoms within a Molecule. More...
 
typedef ArrayIterator< BondBondIterator
 Iterator for Bonds within a Molecule. More...
 
typedef ConstArrayIterator< BondConstBondIterator
 Iterator for const Bonds within a Molecule. More...
 
typedef ArrayIterator< AngleAngleIterator
 Iterator for Angles within a Molecule. More...
 
typedef ConstArrayIterator< AngleConstAngleIterator
 Iterator for const Angles within a Molecule. More...
 
typedef ArrayIterator< DihedralDihedralIterator
 Iterator for Dihedrals within a Molecule. More...
 
typedef ConstArrayIterator< DihedralConstDihedralIterator
 Iterator for const Dihedrals within a Molecule. More...
 

Public Member Functions

 Molecule ()
 Constructor. More...
 
Mutators
void setSpecies (Species &species)
 Set the parent Species. More...
 
void setSystem (System &system)
 Set the parent System. More...
 
void unsetSystem ()
 Set the parent System pointer to null (no System). More...
 
void setId (int id)
 Set the integer index for this molecule. More...
 
void setFirstAtom (Atom &atom)
 Set the first Atom. More...
 
void setNAtom (int nAtom)
 Set the number of Atoms per molecule. More...
 
void setFirstBond (Bond &bond)
 Set the first Bond. More...
 
void setNBond (int nBond)
 Set the number of Bonds per molecule. More...
 
void setFirstAngle (Angle &angle)
 Set the first Angle. More...
 
void setNAngle (int nAngle)
 Set the number of Angles per molecule. More...
 
void setFirstDihedral (Dihedral &dihedral)
 Set the first Dihedral. More...
 
void setNDihedral (int nDihedral)
 Set the number of Dihedrals per molecule. More...
 
Accessors
Speciesspecies () const
 Get the molecular Species by reference. More...
 
Systemsystem () const
 Get the parent System. More...
 
int id () const
 Get the index for this Molecule (unique in species). More...
 
int nAtom () const
 Get the number of Atoms in this Molecule. More...
 
int nBond () const
 Get the number of Bonds in this Molecule. More...
 
int nAngle () const
 Get the number of Angles in this Molecule. More...
 
int nDihedral () const
 Get the number of Dihedrals in this Molecule. More...
 
const Atomatom (int localId) const
 Get a specific Atom in this Molecule. More...
 
Atomatom (int localId)
 Get a specific Atom in this Molecule. More...
 
Bondbond (int localId)
 Get a specific Bond in this Molecule by non-const reference. More...
 
const Bondbond (int localId) const
 Get a specific Bond in this Molecule by const reference. More...
 
Angleangle (int localId)
 Get a specific Angle in this Molecule by non-const reference. More...
 
const Angleangle (int localId) const
 Get a specific Angle in this Molecule by const reference. More...
 
Dihedraldihedral (int localId)
 Get a specific Dihedral in this Molecule by reference. More...
 
const Dihedraldihedral (int localId) const
 Get a specific Dihedral in this Molecule by const reference. More...
 
Iterator Interface
void begin (AtomIterator &iterator)
 Set an Molecule::AtomIterator to first Atom in this Molecule. More...
 
void begin (ConstAtomIterator &iterator) const
 Set an Molecule::ConstAtomIterator to first Atom in this Molecule. More...
 
void begin (BondIterator &iterator)
 Set a Molecule::BondIterator to first Bond in this Molecule. More...
 
void begin (ConstBondIterator &iterator) const
 Set a Molecule::ConstBondIterator to first Bond in this Molecule. More...
 
void begin (AngleIterator &iterator)
 Set a Molecule::AngleIterator to first Angle in this Molecule. More...
 
void begin (ConstAngleIterator &iterator) const
 Set a Molecule::ConstAngleIterator to first Angle in this Molecule. More...
 
void begin (DihedralIterator &iterator)
 Set a Molecule::DihedralIterator to first Dihedral in this Molecule. More...
 
void begin (ConstDihedralIterator &iterator) const
 Set a Molecule::ConstDihedralIterator to first Dihedral in this Molecule. More...
 

Static Public Attributes

static const int NullIndex = -1
 Null value for molecule id. More...
 

Member Typedef Documentation

Iterator for Atoms within a Molecule.

Definition at line 50 of file mcMd/chemistry/Molecule.h.

Iterator for const Atoms within a Molecule.

Definition at line 53 of file mcMd/chemistry/Molecule.h.

Iterator for Bonds within a Molecule.

Definition at line 57 of file mcMd/chemistry/Molecule.h.

Iterator for const Bonds within a Molecule.

Definition at line 60 of file mcMd/chemistry/Molecule.h.

Iterator for Angles within a Molecule.

Definition at line 65 of file mcMd/chemistry/Molecule.h.

Iterator for const Angles within a Molecule.

Definition at line 68 of file mcMd/chemistry/Molecule.h.

Iterator for Dihedrals within a Molecule.

Definition at line 73 of file mcMd/chemistry/Molecule.h.

Iterator for const Dihedrals within a Molecule.

Definition at line 76 of file mcMd/chemistry/Molecule.h.

Constructor & Destructor Documentation

McMd::Molecule::Molecule ( )

Constructor.

Definition at line 21 of file mcMd/chemistry/Molecule.cpp.

Member Function Documentation

void McMd::Molecule::setSpecies ( Species species)
inline

Set the parent Species.

Parameters
speciesparent Species object.

Definition at line 660 of file mcMd/chemistry/Molecule.h.

Referenced by McMd::Simulation::save().

void McMd::Molecule::setSystem ( System system)
inline

Set the parent System.

Parameters
systemparent System object.

Definition at line 666 of file mcMd/chemistry/Molecule.h.

Referenced by McMd::System::addMolecule().

void McMd::Molecule::unsetSystem ( )
inline

Set the parent System pointer to null (no System).

Definition at line 672 of file mcMd/chemistry/Molecule.h.

Referenced by McMd::System::removeMolecule().

void McMd::Molecule::setId ( int  id)
inline

Set the integer index for this molecule.

Parameters
idinteger array index.

Definition at line 732 of file mcMd/chemistry/Molecule.h.

Referenced by McMd::Simulation::save().

void McMd::Molecule::setFirstAtom ( Atom atom)
inline

Set the first Atom.

Parameters
atomfirst Atom in molecule.

Definition at line 678 of file mcMd/chemistry/Molecule.h.

Referenced by McMd::Simulation::save().

void McMd::Molecule::setNAtom ( int  nAtom)
inline

Set the number of Atoms per molecule.

Parameters
nAtomnumber of Atoms in the molecule.

Definition at line 684 of file mcMd/chemistry/Molecule.h.

Referenced by McMd::Simulation::save().

void McMd::Molecule::setFirstBond ( Bond bond)
inline

Set the first Bond.

Parameters
bondfirst Bond in molecule.

Definition at line 691 of file mcMd/chemistry/Molecule.h.

Referenced by McMd::Simulation::save().

void McMd::Molecule::setNBond ( int  nBond)
inline

Set the number of Bonds per molecule.

Parameters
nBondnumber of Bonds in the molecule.

Definition at line 697 of file mcMd/chemistry/Molecule.h.

Referenced by McMd::Simulation::save().

void McMd::Molecule::setFirstAngle ( Angle angle)
inline

Set the first Angle.

Parameters
anglefirst Angle in molecule.

Definition at line 705 of file mcMd/chemistry/Molecule.h.

Referenced by McMd::Simulation::save().

void McMd::Molecule::setNAngle ( int  nAngle)
inline

Set the number of Angles per molecule.

Parameters
nAnglenumber of Angles in molecule.

Definition at line 711 of file mcMd/chemistry/Molecule.h.

Referenced by McMd::Simulation::save().

void McMd::Molecule::setFirstDihedral ( Dihedral dihedral)
inline

Set the first Dihedral.

Parameters
dihedralfirst Dihedral in molecule.

Definition at line 719 of file mcMd/chemistry/Molecule.h.

Referenced by McMd::Simulation::save().

void McMd::Molecule::setNDihedral ( int  nDihedral)
inline

Set the number of Dihedrals per molecule.

Parameters
nDihedralnumber of Dihedrals in molecule.

Definition at line 725 of file mcMd/chemistry/Molecule.h.

Referenced by McMd::Simulation::save().

Species & McMd::Molecule::species ( ) const
inline
System & McMd::Molecule::system ( ) const
inline

Get the parent System.

Definition at line 427 of file mcMd/chemistry/Molecule.h.

Referenced by McMd::System::isValid(), and McMd::System::removeMolecule().

int McMd::Molecule::id ( ) const
inline
int McMd::Molecule::nAtom ( ) const
inline
int McMd::Molecule::nBond ( ) const
inline

Get the number of Bonds in this Molecule.

Definition at line 443 of file mcMd/chemistry/Molecule.h.

Referenced by McMd::Activate::activate(), McMd::getAtomBonds(), and McMd::Simulation::isValid().

int McMd::Molecule::nAngle ( ) const
inline

Get the number of Angles in this Molecule.

Definition at line 451 of file mcMd/chemistry/Molecule.h.

Referenced by McMd::Activate::activate(), McMd::getAtomAngles(), and McMd::Simulation::isValid().

int McMd::Molecule::nDihedral ( ) const
inline

Get the number of Dihedrals in this Molecule.

Definition at line 459 of file mcMd/chemistry/Molecule.h.

Referenced by McMd::Activate::activate(), McMd::getAtomDihedrals(), and McMd::Simulation::isValid().

const Atom & McMd::Molecule::atom ( int  localId) const
inline

Get a specific Atom in this Molecule.

Returns the atom with local integer index 0 <= localId < nAtom.

Parameters
localIdlocal index of desired atom within this Molecule.

Definition at line 477 of file mcMd/chemistry/Molecule.h.

Referenced by McMd::Activate::activate(), McMd::PointGenerator::attemptPlaceMolecule(), McMd::LinearGenerator::attemptPlaceMolecule(), McMd::Activate::deactivate(), McMd::CfbLinear::deleteAtom(), McMd::getAtomAngles(), McMd::getAtomBonds(), McMd::getAtomDihedrals(), McMd::Simulation::isValid(), McMd::McNVTChemicalPotential::load(), McMd::McPairPotentialImpl< Interaction >::moleculeEnergy(), McMd::Sliplinker::move(), McMd::GcSliplinkMove::move(), McMd::SliplinkerAll::move(), McMd::SliplinkMove::move(), McMd::SliplinkerEnd::move(), McMd::RingTetraRebridgeMove::move(), McMd::AtomDisplaceMove::move(), McMd::CfbDoubleRebridgeMove::move(), McMd::CfbEndMove::move(), McMd::RingOctaRebridgeMove::move(), McMd::CfbLinearEndMove::move(), McMd::CfbRebridgeMove::move(), McMd::CfbReptationMove::move(), McMd::EndSwapMove::move(), McMd::CfbRingRebridgeMove::move(), McMd::CfbReptateMove::move(), McMd::RigidDisplaceMove::move(), McMd::ComMSD::output(), McMd::Activate::reactivate(), McMd::McMdConfigIo::read(), McMd::G1MSD::sample(), McMd::McNVTChemicalPotential::sample(), McMd::AtomMSD::sample(), McMd::ComMSD::sample(), McMd::RingRouseAutoCorr::sample(), McMd::EndtoEndXYZ::sample(), McMd::LinearRouseAutoCorr::sample(), McMd::EndtoEnd::sample(), McMd::BlockRadiusGyration::sample(), McMd::IntraPairAutoCorr::sample(), McMd::RadiusGyration::sample(), McMd::Simulation::save(), McMd::RingOctaRebridgeMove::scanBridge(), McMd::RingTetraRebridgeMove::scanBridge(), McMd::HomopolymerSG::setMoleculeState(), McMd::LinearSG::setMoleculeState(), McMd::G1MSD::setup(), McMd::AtomMSD::setup(), and McMd::ComMSD::setup().

Atom & McMd::Molecule::atom ( int  localId)
inline

Get a specific Atom in this Molecule.

Returns the atom with local integer index 0 <= localId < nAtom.

Parameters
localIdlocal index of desired atom within this Molecule.

Definition at line 466 of file mcMd/chemistry/Molecule.h.

Bond & McMd::Molecule::bond ( int  localId)
inline
const Bond & McMd::Molecule::bond ( int  localId) const
inline

Get a specific Bond in this Molecule by const reference.

Returns the bond with local integer index 0 <= localId < nBond.

Parameters
localIdlocal index of desired bond within this Molecule.

Definition at line 500 of file mcMd/chemistry/Molecule.h.

Angle & McMd::Molecule::angle ( int  localId)
inline

Get a specific Angle in this Molecule by non-const reference.

Returns the angle with local integer index 0 <= localId < nAngle.

Parameters
localIdlocal index of desired angle within this Molecule.

Definition at line 513 of file mcMd/chemistry/Molecule.h.

Referenced by McMd::Activate::activate(), McMd::Activate::deactivate(), McMd::getAtomAngles(), McMd::Simulation::isValid(), McMd::McNVTChemicalPotential::load(), McMd::Activate::reactivate(), and McMd::McNVTChemicalPotential::sample().

const Angle & McMd::Molecule::angle ( int  localId) const
inline

Get a specific Angle in this Molecule by const reference.

Returns the angle with local integer index 0 <= localId < nAngle.

Parameters
localIdlocal index of desired angle within this Molecule.

Definition at line 524 of file mcMd/chemistry/Molecule.h.

Dihedral & McMd::Molecule::dihedral ( int  localId)
inline

Get a specific Dihedral in this Molecule by reference.

Returns the dihedral with local integer index 0 <= localId < nDihedral.

Parameters
localIdlocal index of desired dihedral within this Molecule.

Definition at line 537 of file mcMd/chemistry/Molecule.h.

Referenced by McMd::Activate::activate(), McMd::Activate::deactivate(), McMd::getAtomDihedrals(), McMd::Simulation::isValid(), McMd::McNVTChemicalPotential::load(), and McMd::Activate::reactivate().

const Dihedral & McMd::Molecule::dihedral ( int  localId) const
inline

Get a specific Dihedral in this Molecule by const reference.

Returns the dihedral with local integer index 0 <= localId < nDihedral.

Parameters
localIdlocal index of desired dihedral within this Molecule.

Definition at line 548 of file mcMd/chemistry/Molecule.h.

void McMd::Molecule::begin ( AtomIterator iterator)
inline
void McMd::Molecule::begin ( ConstAtomIterator iterator) const
inline

Set an Molecule::ConstAtomIterator to first Atom in this Molecule.

Parameters
iteratoron output, points to first Atom.

Definition at line 577 of file mcMd/chemistry/Molecule.h.

References Util::ConstArrayIterator< Data >::setCurrent(), and Util::ConstArrayIterator< Data >::setEnd().

void McMd::Molecule::begin ( BondIterator iterator)
inline

Set a Molecule::BondIterator to first Bond in this Molecule.

Parameters
iteratoron output, points to first Bond.

Definition at line 589 of file mcMd/chemistry/Molecule.h.

References Util::ArrayIterator< Data >::setCurrent(), and Util::ArrayIterator< Data >::setEnd().

void McMd::Molecule::begin ( ConstBondIterator iterator) const
inline

Set a Molecule::ConstBondIterator to first Bond in this Molecule.

Parameters
iteratoron output, points to first Bond.

Definition at line 600 of file mcMd/chemistry/Molecule.h.

References Util::ConstArrayIterator< Data >::setCurrent(), and Util::ConstArrayIterator< Data >::setEnd().

void McMd::Molecule::begin ( AngleIterator iterator)
inline

Set a Molecule::AngleIterator to first Angle in this Molecule.

Parameters
iteratoron output, points to first Angle.

Definition at line 613 of file mcMd/chemistry/Molecule.h.

References Util::ArrayIterator< Data >::setCurrent(), and Util::ArrayIterator< Data >::setEnd().

void McMd::Molecule::begin ( ConstAngleIterator iterator) const
inline

Set a Molecule::ConstAngleIterator to first Angle in this Molecule.

Parameters
iteratoron output, points to first Angle.

Definition at line 624 of file mcMd/chemistry/Molecule.h.

References Util::ConstArrayIterator< Data >::setCurrent(), and Util::ConstArrayIterator< Data >::setEnd().

void McMd::Molecule::begin ( DihedralIterator iterator)
inline

Set a Molecule::DihedralIterator to first Dihedral in this Molecule.

Parameters
iteratoron output, points to first Dihedral.

Definition at line 637 of file mcMd/chemistry/Molecule.h.

References Util::ArrayIterator< Data >::setCurrent(), and Util::ArrayIterator< Data >::setEnd().

void McMd::Molecule::begin ( ConstDihedralIterator iterator) const
inline

Set a Molecule::ConstDihedralIterator to first Dihedral in this Molecule.

Parameters
iteratoron output, points to first Dihedral.

Definition at line 648 of file mcMd/chemistry/Molecule.h.

References Util::ConstArrayIterator< Data >::setCurrent(), and Util::ConstArrayIterator< Data >::setEnd().

Member Data Documentation

const int McMd::Molecule::NullIndex = -1
static

Null value for molecule id.

Definition at line 80 of file mcMd/chemistry/Molecule.h.


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