56 void setAtom(
int i,
Atom &atom);
63 void setTypeId(
int typeId);
81 const Atom& atom(
int i)
const;
95 bool isActive()
const;
100 int nInActive()
const;
107 bool checkInactive()
const;
132 void incrementInactive();
137 void decrementInactive();
153 for (
int i=0; i < NAtom; ++i) {
163 { atoms_[i] = &
atom; }
206 {
return (nInActive_ == 0); }
213 {
return nInActive_; }
222 for (
int i=0; i < NAtom; ++i) {
224 if (!atoms_[i]->
isActive()) ++counter;
226 if (counter != nInActive_) {
227 UTIL_THROW(
"Inconsistent number of inactive atoms");
247 assert(nInActive_ < NAtom);
257 assert(nInActive_ > 0);
void setAtom(int i, Atom &atom)
Add an atom to this group.
void setTypeId(int typeId)
Set the group type id for this group.
bool checkInactive() const
Check consistency of number of inactive atoms.
bool isActive() const
Is this group active?
int typeId() const
Get the typeId for this covalent group.
Static member functions to de-active and re-active atoms.
int nInActive() const
Return number of inactive atoms.
#define UTIL_THROW(msg)
Macro for throwing an Exception, reporting function, file and line number.
A point particle within a Molecule.
Utility classes for scientific computation.
Atom & atom(int i)
Get a specific Atom in the Group by reference.
Single-processor Monte Carlo (MC) and molecular dynamics (MD).
A sequence of NAtom covalently interacting atoms.