8 #include "getAtomGroups.h" 9 #include <mcMd/chemistry/Atom.h> 10 #include <mcMd/chemistry/Molecule.h> 25 if (molecule.
nBond()) {
27 const int atomId = int( &atom - &molecule.
atom(0) );
29 const int nGroup = groupIds.
size();
30 const Bond* firstPtr = &molecule.
bond(0);
31 for (
int i = 0; i < nGroup; ++i) {
32 groups.
append(firstPtr + groupIds[i]);
48 const int atomId = int( &atom - &molecule.
atom(0) );
50 const int nGroup = groupIds.
size();
52 for (
int i = 0; i < nGroup; ++i) {
53 groups.
append(firstPtr + groupIds[i]);
69 const int atomId = int( &atom - &molecule.
atom(0) );
71 const int nGroup = groupIds.
size();
73 for (
int i = 0; i < nGroup; ++i) {
74 groups.
append(firstPtr + groupIds[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.
void clear()
Set logical size to zero.
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.
Species & species() const
Get the molecular Species by reference.
void append(const Data &data)
Append data to the end of the array.
void getAtomDihedrals(const Atom &atom, AtomDihedralArray &groups)
Fill an array of pointers to Dihedrals that contain an Atom.
A fixed capacity (static) contiguous array with a variable logical size.
void getAtomAngles(const Atom &atom, AtomAngleArray &groups)
Fill an array of pointers to Angles that contain an Atom.
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).
A sequence of NAtom covalently interacting atoms.
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.
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).
void getAtomBonds(const Atom &atom, AtomBondArray &groups)
Fill an array of pointers to Bonds that contain an Atom.