65 DeclareParameter(Name, std::string);
81 std::size_t getNAtoms() {
return atomStamps_.size(); }
82 std::size_t getNBonds() {
return bondStamps_.size(); }
83 std::size_t getNBends() {
return bendStamps_.size(); }
84 std::size_t getNTorsions() {
return torsionStamps_.size(); }
85 std::size_t getNInversions() {
return inversionStamps_.size(); }
86 std::size_t getNRigidBodies() {
return rigidBodyStamps_.size(); }
87 std::size_t getNCutoffGroups() {
return cutoffGroupStamps_.size(); }
88 std::size_t getNConstraints() {
return constraintStamps_.size(); }
90 std::size_t getNNodes() {
return nodesStamps_.size(); }
92 AtomStamp* getAtomStamp(
int index) {
return atomStamps_[index]; }
93 BondStamp* getBondStamp(
int index) {
return bondStamps_[index]; }
94 BendStamp* getBendStamp(
int index) {
return bendStamps_[index]; }
95 TorsionStamp* getTorsionStamp(
int index) {
return torsionStamps_[index]; }
97 return inversionStamps_[index];
100 return rigidBodyStamps_[index];
103 return cutoffGroupStamps_[index];
106 return constraintStamps_[index];
108 NodesStamp* getNodesStamp(
int index) {
return nodesStamps_[index]; }
110 bool isBondInSameRigidBody(
BondStamp* bond);
111 bool isAtomInRigidBody(
int atomIndex);
112 bool isAtomInRigidBody(
int atomIndex,
int& whichRigidBody,
114 std::vector<std::pair<int, int>> getJointAtoms(
int rb1,
int rb2);
116 std::size_t getNFreeAtoms() {
return freeAtoms_.size(); }
117 virtual void validate();
118 int getIndex() {
return index_; }
125 void checkTorsions();
126 void checkInversions();
127 void checkRigidBodies();
128 void checkCutoffGroups();
130 void checkConstraints();
132 template<
class Cont,
class T>
133 bool addIndexSensitiveStamp(Cont& cont, T* stamp) {
135 unsigned int index = stamp->getIndex();
137 size_t size = cont.size();
139 if (size >= index + 1) {
140 if (cont[index] != NULL) {
147 cont.insert(cont.end(), index - cont.size() + 1, NULL);
156 std::vector<AtomStamp*> atomStamps_;
157 std::vector<int> freeAtoms_;
158 std::vector<BondStamp*> bondStamps_;
159 std::vector<BendStamp*> bendStamps_;
160 std::vector<TorsionStamp*> torsionStamps_;
161 std::vector<InversionStamp*> inversionStamps_;
162 std::vector<RigidBodyStamp*> rigidBodyStamps_;
163 std::vector<CutoffGroupStamp*> cutoffGroupStamps_;
164 std::vector<ConstraintStamp*> constraintStamps_;
165 std::vector<NodesStamp*> nodesStamps_;
166 std::vector<int> nodeAtoms_;
167 std::vector<int> atom2Rigidbody;