Simpatico
v1.10
|
Static member functions to de-active and re-active atoms.
This class has only 3 static member functions, and no member variables. It provides functions that can de-activate and re-activate individual atoms or activate all atoms in a molecule. The implementation consistently modifies the count of inactive atoms in all associated covalent group objects, i.e., in all bonds, angle, and dihedral groups that contain an atom.
This set of functions is defined as class (rather than simply a set of functions) to allow use of friend class declarations: Class Activate is declared a friend of the Atom class and the Group<N> class template. This allows access to private member functions that can modify the Atom::isActive_ bool flag and the Group<N>::nInActive_ integer counter. By allowing these private functions to be called only by members of Activate, we can guarantee that associated Atom and Group<N> objects maintain consistent states.
Definition at line 41 of file Activate.h.
#include <Activate.h>
Static Public Member Functions | |
static void | deactivate (Atom &atom) |
Temporarily de-activate one atom and update associated groups. More... | |
static void | reactivate (Atom &atom) |
Re-activate a temporarily de-activated atom and update groups. More... | |
static void | activate (Molecule &molecule) |
Activate all atoms and groups in one molecule. More... | |
|
static |
Temporarily de-activate one atom and update associated groups.
atom | Atom object to be de-activated |
Definition at line 31 of file Activate.cpp.
References McMd::Molecule::angle(), McMd::Molecule::atom(), Simp::Species::atomAngleIds(), Simp::Species::atomBondIds(), Simp::Species::atomDihedralIds(), McMd::Molecule::bond(), McMd::Group< NAtom >::checkInactive(), McMd::Molecule::dihedral(), McMd::Atom::isActive(), McMd::Atom::molecule(), Simp::Species::nAngle(), Simp::Species::nBond(), Simp::Species::nDihedral(), Util::FSArray< Data, Capacity >::size(), McMd::Molecule::species(), and UTIL_THROW.
|
static |
Re-activate a temporarily de-activated atom and update groups.
atom | Atom object to be re-activated |
Definition at line 77 of file Activate.cpp.
References McMd::Molecule::angle(), McMd::Molecule::atom(), Simp::Species::atomAngleIds(), Simp::Species::atomBondIds(), Simp::Species::atomDihedralIds(), McMd::Molecule::bond(), McMd::Group< NAtom >::checkInactive(), McMd::Molecule::dihedral(), McMd::Atom::isActive(), McMd::Atom::molecule(), Simp::Species::nAngle(), McMd::Molecule::nAtom(), Simp::Species::nBond(), Simp::Species::nDihedral(), Util::FSArray< Data, Capacity >::size(), McMd::Molecule::species(), and UTIL_THROW.
|
static |
Activate all atoms and groups in one molecule.
Marks all atoms as active and sets the number of inactive atoms to zero for all groups in the molecule.
molecule | Molecule object to be fully activated |
Definition at line 126 of file Activate.cpp.
References McMd::Molecule::angle(), McMd::Molecule::atom(), McMd::Molecule::bond(), McMd::Molecule::dihedral(), McMd::Molecule::nAngle(), McMd::Molecule::nAtom(), McMd::Molecule::nBond(), and McMd::Molecule::nDihedral().
Referenced by McMd::Simulation::getMolecule().