63 DeclareParameter(Name, std::string);
64 DeclareParameter(ConstrainTotalCharge,
bool);
80 void setRegion(
int r) { region_ = r; }
81 int getRegion() {
return region_; }
82 std::size_t getNAtoms() {
return atomStamps_.size(); }
83 std::size_t getNBonds() {
return bondStamps_.size(); }
84 std::size_t getNBends() {
return bendStamps_.size(); }
85 std::size_t getNTorsions() {
return torsionStamps_.size(); }
86 std::size_t getNInversions() {
return inversionStamps_.size(); }
87 std::size_t getNRigidBodies() {
return rigidBodyStamps_.size(); }
88 std::size_t getNCutoffGroups() {
return cutoffGroupStamps_.size(); }
89 std::size_t getNConstraints() {
return constraintStamps_.size(); }
90 int getNIntegrable() {
return nintegrable_; }
91 std::size_t getNFreeAtoms() {
return freeAtoms_.size(); }
92 virtual void validate();
94 AtomStamp* getAtomStamp(
int index) {
return atomStamps_[index]; }
95 BondStamp* getBondStamp(
int index) {
return bondStamps_[index]; }
96 BendStamp* getBendStamp(
int index) {
return bendStamps_[index]; }
97 TorsionStamp* getTorsionStamp(
int index) {
return torsionStamps_[index]; }
99 return inversionStamps_[index];
102 return rigidBodyStamps_[index];
105 return cutoffGroupStamps_[index];
108 return fragmentStamps_[index];
111 return constraintStamps_[index];
114 bool isBondInSameRigidBody(
BondStamp* bond);
115 bool isAtomInRigidBody(
int atomIndex);
116 bool isAtomInRigidBody(
int atomIndex,
int& whichRigidBody,
118 std::vector<std::pair<int, int>> getJointAtoms(
int rb1,
int rb2);
125 void checkTorsions();
126 void checkInversions();
127 void checkRigidBodies();
128 void checkCutoffGroups();
129 void checkFragments();
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);
155 std::vector<AtomStamp*> atomStamps_;
156 std::vector<int> freeAtoms_;
157 std::vector<BondStamp*> bondStamps_;
158 std::vector<BendStamp*> bendStamps_;
159 std::vector<TorsionStamp*> torsionStamps_;
160 std::vector<InversionStamp*> inversionStamps_;
161 std::vector<RigidBodyStamp*> rigidBodyStamps_;
162 std::vector<CutoffGroupStamp*> cutoffGroupStamps_;
163 std::vector<FragmentStamp*> fragmentStamps_;
164 std::vector<ConstraintStamp*> constraintStamps_;
165 std::vector<int> atom2Rigidbody;