Simpatico  v1.10
List of all members | Public Member Functions
McMd::Group< NAtom > Class Template Reference

Detailed Description

template<int NAtom>
class McMd::Group< NAtom >

A sequence of NAtom covalently interacting atoms.

An ordered group of atoms that interact via a permanent (covalent) NAtom atom potential energy. A Group<NAtom> object has an array of pointers to Atoms in the group. Specializations of Group<NAtom> with NAtom=2, 3, and 4 are used to represent covalent bond, angle and dihedral interaction groups, respectively. The Bond, Angle, and Dihedral typedefs are aliases for these template specializations.

A Group<NAtom> object also has an integer type id. Different parameters may be used in the corresponding covalent potential for groups with different type Ids.

Definition at line 37 of file mcMd/chemistry/Group.h.

#include <Group.h>

Public Member Functions

 Group ()
 Constructor. More...
 
Initialization
void setAtom (int i, Atom &atom)
 Add an atom to this group. More...
 
void setTypeId (int typeId)
 Set the group type id for this group. More...
 
Accessors
Atomatom (int i)
 Get a specific Atom in the Group by reference. More...
 
const Atomatom (int i) const
 Get a specific Atom in the Group by const reference. More...
 
int typeId () const
 Get the typeId for this covalent group. More...
 
bool isActive () const
 Is this group active? More...
 
int nInActive () const
 Return number of inactive atoms. More...
 
bool checkInactive () const
 Check consistency of number of inactive atoms. More...
 

Constructor & Destructor Documentation

template<int NAtom>
McMd::Group< NAtom >::Group ( )

Constructor.

Definition at line 149 of file mcMd/chemistry/Group.h.

Member Function Documentation

template<int NAtom>
void McMd::Group< NAtom >::setAtom ( int  i,
Atom atom 
)
inline

Add an atom to this group.

Parameters
iindex of atom within group.
atomatom to be added.

Definition at line 162 of file mcMd/chemistry/Group.h.

References McMd::Group< NAtom >::atom().

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

template<int NAtom>
void McMd::Group< NAtom >::setTypeId ( int  typeId)
inline

Set the group type id for this group.

Parameters
typeIdvalue of covalent group typeId

Definition at line 169 of file mcMd/chemistry/Group.h.

References McMd::Group< NAtom >::typeId().

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

template<int NAtom>
Atom & McMd::Group< NAtom >::atom ( int  i)
inline
template<int NAtom>
const Atom & McMd::Group< NAtom >::atom ( int  i) const
inline

Get a specific Atom in the Group by const reference.

Parameters
iindex within group (0,...,N-1)

Definition at line 188 of file mcMd/chemistry/Group.h.

template<int NAtom>
int McMd::Group< NAtom >::typeId ( ) const
inline
template<int NAtom>
bool McMd::Group< NAtom >::isActive ( ) const
inline

Is this group active?

A group is active iff all associated atoms are active. Atoms can be temporarily de-activated during some Monte Carlo moves that remove and regrow parts of a molecule.

Definition at line 205 of file mcMd/chemistry/Group.h.

Referenced by McMd::Group< NAtom >::checkInactive(), and McMd::Simulation::isValid().

template<int NAtom>
int McMd::Group< NAtom >::nInActive ( ) const
inline

Return number of inactive atoms.

Definition at line 212 of file mcMd/chemistry/Group.h.

template<int NAtom>
bool McMd::Group< NAtom >::checkInactive ( ) const

Check consistency of number of inactive atoms.

Returns true if consistent, or throws Exception.

Definition at line 219 of file mcMd/chemistry/Group.h.

References McMd::Group< NAtom >::isActive(), and UTIL_THROW.

Referenced by McMd::Activate::deactivate(), and McMd::Activate::reactivate().


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