22 #ifndef __PLUMED_tools_AtomNumber_h
23 #define __PLUMED_tools_AtomNumber_h
50 unsigned index()
const;
95 plumed_massert(i>0,
"serial of an atom cannot be zero");
96 plumed_massert(i<std::numeric_limits<unsigned>::max()/2,
"serial cannot be negative");
109 plumed_massert(i>0,
"serial of an atom cannot be zero");
110 plumed_massert(i<std::numeric_limits<unsigned>::max()/2,
"serial cannot be negative");
Simple class to store the index of an atom.
AtomNumber()
Initialize to index=0 (serial=1)
bool operator<=(const AtomNumber &a, const AtomNumber &b)
unsigned serial() const
Returns the serial number.
bool operator==(const AtomNumber &a, const AtomNumber &b)
friend bool operator==(const AtomNumber &, const AtomNumber &)
Comparison operators.
friend bool operator<=(const AtomNumber &, const AtomNumber &)
Comparison operators.
bool operator!=(const AtomNumber &a, const AtomNumber &b)
friend bool operator>=(const AtomNumber &, const AtomNumber &)
Comparison operators.
bool operator>=(const AtomNumber &a, const AtomNumber &b)
friend bool operator<(const AtomNumber &, const AtomNumber &)
Comparison operators.
friend bool operator>(const AtomNumber &, const AtomNumber &)
Comparison operators.
bool operator<(const AtomNumber &a, const AtomNumber &b)
unsigned index() const
Returns the index number.
AtomNumber & setIndex(unsigned)
Sets the atom number by index, returning a reference to the AtomNumber itself.
friend bool operator!=(const AtomNumber &, const AtomNumber &)
Comparison operators.
AtomNumber & setSerial(unsigned)
Sets the atom number by serial, returning a reference to the AtomNumber itself.
bool operator>(const AtomNumber &a, const AtomNumber &b)