Simpatico
v1.10
|
A Group of covalently interacting atoms within any molecule of one Species.
Class SpeciesGroup is used in the implementation of class Species to define the covalent chemical structure for any molecule of a particular species. The chemical structure of a Species is defined by a set of SpeciesGroup<2> (bond), SpeciesGroup<3> (angle), and SpeciesGroup<4> (dihedral) objects. Each SpeciesGroup<NAtom> object contains an array of NAtom local integer atom indices, which identities a group of atoms that are involved in a an NAtom-body covalent interaction. Each local atom index i must lie in the range 0 <= i < nAtom. A local atom index identifies the position of of an Atom within a generic molecule of the associated species. Each SpeciesGroup also has an integer group type index to distinguish different types of bonds, angles, and dihedrals, with different potential parameters.
The difference between a SpeciesGroup and a Group is that a Group contains an array of pointers to specific Atom objects that all belong to a specific Molecule. Each SpeciesGroup is thus a prototype for constructing one Group for each Molecule within a Species.
A SpeciesGroup<N> object can be input or output to file using overloaded inserter (<<) and extractor (>>) operators, like a built in type. The text representation contains a sequence of atom ids followed by the group type id, as described in a separate file.
Definition at line 20 of file SpeciesGroup.h.
#include <SpeciesGroup.h>
Public Member Functions | |
SpeciesGroup () | |
Constructor. More... | |
void | setAtomId (int i, int atomId) |
Set index for one atom in the group. More... | |
void | setTypeId (int typeId) |
Set the group type id for this group. More... | |
int | atomId (int i) const |
Get the local id for a specific Atom. More... | |
int | typeId () const |
Get the type id for this covalent group. More... | |
Static Public Member Functions | |
static void | commitMpiType () |
Commit associated MPI DataType. More... | |
Static Public Attributes | |
static const int | NullIndex = -1 |
Null (unknown) value for non-negative atom and group type indices. More... | |
Friends | |
std::istream & | operator>> (std::istream &in, SpeciesGroup< NAtom > &speciesGroup) |
istream extractor for a SpeciesGroup. More... | |
std::ostream & | operator<< (std::ostream &out, const SpeciesGroup< NAtom > &speciesGroup) |
ostream inserter for a SpeciesGroup. More... | |
template<class Archive > | |
void | serialize (Archive &ar, SpeciesGroup< NAtom > &speciesGroup, const unsigned int version) |
Serialize one SpeciesGroup<NAtom>. More... | |
template<class Archive > | |
void | serialize (Archive &ar, SpeciesGroup< NAtom > &speciesGroup, const unsigned int version) |
Serialize one SpeciesGroup<NAtom>. More... | |
|
inline |
Constructor.
Definition at line 156 of file SpeciesGroup.h.
References Simp::SpeciesGroup< NAtom >::NullIndex.
|
inline |
Set index for one atom in the group.
i | index of atom within group (0, .., NAtom - 1) |
atomId | index of atom to be added. |
Definition at line 168 of file SpeciesGroup.h.
References Simp::SpeciesGroup< NAtom >::atomId().
|
inline |
Set the group type id for this group.
typeId | value of covalent group typeId |
Definition at line 175 of file SpeciesGroup.h.
References Simp::SpeciesGroup< NAtom >::typeId().
|
inline |
Get the local id for a specific Atom.
i | index within group (0, ..., NAtom - 1) |
Definition at line 182 of file SpeciesGroup.h.
Referenced by Simp::Species::initializeAtomGroupIdArrays(), Simp::Species::isValid(), McMd::Simulation::isValid(), McMd::Simulation::save(), and Simp::SpeciesGroup< NAtom >::setAtomId().
|
inline |
Get the type id for this covalent group.
Definition at line 189 of file SpeciesGroup.h.
References Simp::SpeciesGroup< NAtom >::operator>>, and Simp::SpeciesGroup< NAtom >::serialize.
Referenced by McMd::Simulation::isValid(), McMd::CfbReptationMove::loadParameters(), McMd::CfbReptateMove::loadParameters(), McMd::CfbReptationMove::readParameters(), McMd::Simulation::save(), and Simp::SpeciesGroup< NAtom >::setTypeId().
|
static |
Commit associated MPI DataType.
Commit MPI Datatype.
Definition at line 57 of file SpeciesGroup.tpp.
References Util::MpiStructBuilder::addMember(), Util::MpiStructBuilder::commit(), and Util::MpiStructBuilder::setBase().
Referenced by Simp::commitMpiSpeciesGroupTypes().
|
friend |
istream extractor for a SpeciesGroup.
The format is as follows:
atomIds[0] atomIds[1] ... atomId[NAtom-1] typeId
in | input stream |
speciesGroup | SpeciesGroup to be read from stream |
Definition at line 27 of file SpeciesGroup.tpp.
Referenced by Simp::SpeciesGroup< NAtom >::typeId().
|
friend |
ostream inserter for a SpeciesGroup.
The format is as follows, output one one line with no line break:
atomIds[0] atomIds[1] ... atomId[NAtom-1] typeId
out | output stream |
speciesGroup | SpeciesGroup to be written to stream |
Definition at line 41 of file SpeciesGroup.tpp.
|
friend |
Serialize one SpeciesGroup<NAtom>.
Default implementation calls serialize member function of data object. Can be overridden by any explicit specialization.
ar | archive object |
speciesGroup | object to be serialized |
version | archive version id |
Referenced by Simp::SpeciesGroup< NAtom >::typeId().
|
friend |
Serialize one SpeciesGroup<NAtom>.
Default implementation calls serialize member function of data object. Can be overridden by any explicit specialization.
ar | archive object |
speciesGroup | object to be serialized |
version | archive version id |
|
static |
Null (unknown) value for non-negative atom and group type indices.
Definition at line 83 of file SpeciesGroup.h.
Referenced by Simp::SpeciesGroup< NAtom >::SpeciesGroup().