9 #include <mcMd/chemistry/Atom.h> 10 #include <mcMd/chemistry/Molecule.h> 11 #include <simp/species/Species.h> 13 #include <mcMd/chemistry/Bond.h> 16 #include <mcMd/chemistry/Angle.h> 19 #include <mcMd/chemistry/Dihedral.h> 39 atom.setIsActive(
false);
45 const int atomId = int( &atom - &molecule.
atom(0) );
46 if (species.
nBond()) {
48 for (
int i = 0; i < groupIds.
size(); ++i) {
49 molecule.
bond(groupIds[i]).incrementInactive();
56 for (
int i = 0; i < groupIds.
size(); ++i) {
57 molecule.
angle(groupIds[i]).incrementInactive();
65 for (
int i = 0; i < groupIds.
size(); ++i) {
66 molecule.
dihedral(groupIds[i]).incrementInactive();
71 #endif // ifdef SIMP_BOND 85 atom.setIsActive(
true);
91 const int atomId = int( &atom - &molecule.
atom(0) );
93 assert(atomId < molecule.
nAtom());
94 if (species.
nBond()) {
96 for (
int i = 0; i < groupIds.
size(); ++i) {
97 molecule.
bond(groupIds[i]).decrementInactive();
104 for (
int i = 0; i < groupIds.
size(); ++i) {
105 molecule.
angle(groupIds[i]).decrementInactive();
113 for (
int i = 0; i < groupIds.
size(); ++i) {
114 molecule.
dihedral(groupIds[i]).decrementInactive();
119 #endif // ifdef SIMP_BOND 129 for (i = 0; i < molecule.
nAtom(); ++i) {
130 molecule.
atom(i).setIsActive(
true);
133 for (i = 0; i < molecule.
nBond(); ++i) {
134 molecule.
bond(i).activate();
138 for (i = 0; i < molecule.
nAngle(); ++i) {
139 molecule.
angle(i).activate();
143 for (i = 0; i < molecule.
nDihedral(); ++i) {
Bond & bond(int localId)
Get a specific Bond in this Molecule by non-const reference.
Molecule & molecule() const
Get the parent Molecule by reference.
const AtomDihedralIdArray & atomDihedralIds(int atomId) const
Get array of ids for dihedrals that contain one Atom.
int nDihedral() const
Get the number of Dihedrals in this Molecule.
int nAngle() const
Get the number of Angles in this Molecule.
Dihedral & dihedral(int localId)
Get a specific Dihedral in this Molecule by reference.
bool checkInactive() const
Check consistency of number of inactive atoms.
Species & species() const
Get the molecular Species by reference.
static void activate(Molecule &molecule)
Activate all atoms and groups in one molecule.
Classes used by all simpatico molecular simulations.
A fixed capacity (static) contiguous array with a variable logical size.
int nDihedral() const
Get number of dihedrals per molecule for this Species.
static void reactivate(Atom &atom)
Re-activate a temporarily de-activated atom and update groups.
#define UTIL_THROW(msg)
Macro for throwing an Exception, reporting function, file and line number.
bool isActive() const
Get the isActive flag.
int nBond() const
Get the number of Bonds in this Molecule.
const AtomAngleIdArray & atomAngleIds(int atomId) const
Get array of ids for angles that contain one Atom.
A point particle within a Molecule.
Utility classes for scientific computation.
Single-processor Monte Carlo (MC) and molecular dynamics (MD).
const AtomBondIdArray & atomBondIds(int atomId) const
Get array of ids for Bonds that contain one Atom.
const Atom & atom(int localId) const
Get a specific Atom in this Molecule.
A physical molecule (a set of covalently bonded Atoms).
A Species represents a set of chemically similar molecules.
int nBond() const
Get number of bonds per molecule for this Species.
int nAngle() const
Get number of angles per molecule for this Species.
Angle & angle(int localId)
Get a specific Angle in this Molecule by non-const reference.
int size() const
Return logical size of this array (i.e., number of elements).
int nAtom() const
Get the number of Atoms in this Molecule.
static void deactivate(Atom &atom)
Temporarily de-activate one atom and update associated groups.