| 35 |
|
* |
| 36 |
|
* [1] Meineke, et al., J. Comp. Chem. 26, 252-271 (2005). |
| 37 |
|
* [2] Fennell & Gezelter, J. Chem. Phys. 124, 234104 (2006). |
| 38 |
< |
* [3] Sun, Lin & Gezelter, J. Chem. Phys. 128, 24107 (2008). |
| 38 |
> |
* [3] Sun, Lin & Gezelter, J. Chem. Phys. 128, 234107 (2008). |
| 39 |
|
* [4] Kuang & Gezelter, J. Chem. Phys. 133, 164101 (2010). |
| 40 |
|
* [5] Vardeman, Stocker & Gezelter, J. Chem. Theory Comput. 7, 834 (2011). |
| 41 |
|
*/ |
| 107 |
|
|
| 108 |
|
/** |
| 109 |
|
* Sets the global index of this stuntDouble. |
| 110 |
< |
* @param new global index to be set |
| 110 |
> |
* @param index new global index to be set |
| 111 |
|
*/ |
| 112 |
|
void setGlobalIndex(int index) { |
| 113 |
|
globalIndex_ = index; |
| 904 |
|
/** |
| 905 |
|
* Sets the previous fluctuating charge of this stuntDouble |
| 906 |
|
* @param charge new fluctuating charge |
| 907 |
< |
* @see #getflucQPos |
| 907 |
> |
* @see #getFlucQPos |
| 908 |
|
*/ |
| 909 |
|
void setPrevFlucQPos(RealType charge) { |
| 910 |
|
((snapshotMan_->getPrevSnapshot())->*storage_).flucQPos[localIndex_] = charge; |
| 922 |
|
* Sets the fluctuating charge of this stuntDouble in specified snapshot |
| 923 |
|
* @param charge fluctuating charge to be set |
| 924 |
|
* @param snapshotNo |
| 925 |
< |
* @see #getflucQPos |
| 925 |
> |
* @see #getFlucQPos |
| 926 |
|
*/ |
| 927 |
|
void setFlucQPos(RealType charge, int snapshotNo) { |
| 928 |
|
((snapshotMan_->getSnapshot(snapshotNo))->*storage_).flucQPos[localIndex_] = charge; |
| 931 |
|
/** |
| 932 |
|
* Adds fluctuating charge into the previous fluctuating charge of this stuntDouble |
| 933 |
|
* @param charge new fluctuating charge |
| 934 |
< |
* @see #getflucQPos |
| 934 |
> |
* @see #getFlucQPos |
| 935 |
|
*/ |
| 936 |
|
void addPrevFlucQPos(RealType charge) { |
| 937 |
|
((snapshotMan_->getPrevSnapshot())->*storage_).flucQPos[localIndex_] += charge; |
| 947 |
|
|
| 948 |
|
/** |
| 949 |
|
* Adds fluctuating charge into the fluctuating charge of this stuntDouble in specified snapshot |
| 950 |
< |
* @param value fluctuating charge to be add |
| 950 |
> |
* @param charge fluctuating charge to be add |
| 951 |
|
* @param snapshotNo |
| 952 |
< |
* @see #getflucQPos |
| 952 |
> |
* @see #getFlucQPos |
| 953 |
|
*/ |
| 954 |
|
void addflucQPos(RealType charge, int snapshotNo) { |
| 955 |
|
((snapshotMan_->getSnapshot(snapshotNo))->*storage_).flucQPos[localIndex_] += charge; |
| 984 |
|
/** |
| 985 |
|
* Sets the previous charge velocity of this stuntDouble |
| 986 |
|
* @param cvel new charge velocity |
| 987 |
< |
* @see #getflucQVel |
| 987 |
> |
* @see #getFlucQVel |
| 988 |
|
*/ |
| 989 |
|
void setPrevFlucQVel(RealType cvel) { |
| 990 |
|
((snapshotMan_->getPrevSnapshot())->*storage_).flucQVel[localIndex_] = cvel; |
| 1002 |
|
* Sets the charge velocity of this stuntDouble in specified snapshot |
| 1003 |
|
* @param cvel charge velocity to be set |
| 1004 |
|
* @param snapshotNo |
| 1005 |
< |
* @see #getflucQVel |
| 1005 |
> |
* @see #getFlucQVel |
| 1006 |
|
*/ |
| 1007 |
|
void setFlucQVel(RealType cvel, int snapshotNo) { |
| 1008 |
|
((snapshotMan_->getSnapshot(snapshotNo))->*storage_).flucQVel[localIndex_] = cvel; |
| 1011 |
|
/** |
| 1012 |
|
* Adds charge velocity into the previous charge velocity of this stuntDouble |
| 1013 |
|
* @param cvel new charge velocity |
| 1014 |
< |
* @see #getflucQVel |
| 1014 |
> |
* @see #getFlucQVel |
| 1015 |
|
*/ |
| 1016 |
|
void addPrevFlucQVel(RealType cvel) { |
| 1017 |
|
((snapshotMan_->getPrevSnapshot())->*storage_).flucQVel[localIndex_] += cvel; |
| 1027 |
|
|
| 1028 |
|
/** |
| 1029 |
|
* Adds charge velocity into the charge velocity of this stuntDouble in specified snapshot |
| 1030 |
< |
* @param value charge velocity to be add |
| 1030 |
> |
* @param cvel charge velocity to be add |
| 1031 |
|
* @param snapshotNo |
| 1032 |
< |
* @see #getflucQVel |
| 1032 |
> |
* @see #getFlucQVel |
| 1033 |
|
*/ |
| 1034 |
|
void addflucQVel(RealType cvel, int snapshotNo) { |
| 1035 |
|
((snapshotMan_->getSnapshot(snapshotNo))->*storage_).flucQVel[localIndex_] += cvel; |
| 1064 |
|
/** |
| 1065 |
|
* Sets the previous charge force of this stuntDouble |
| 1066 |
|
* @param cfrc new charge force |
| 1067 |
< |
* @see #getflucQFrc |
| 1067 |
> |
* @see #getFlucQFrc |
| 1068 |
|
*/ |
| 1069 |
|
void setPrevFlucQFrc(RealType cfrc) { |
| 1070 |
|
((snapshotMan_->getPrevSnapshot())->*storage_).flucQFrc[localIndex_] = cfrc; |
| 1082 |
|
* Sets the charge force of this stuntDouble in specified snapshot |
| 1083 |
|
* @param cfrc charge force to be set |
| 1084 |
|
* @param snapshotNo |
| 1085 |
< |
* @see #getflucQFrc |
| 1085 |
> |
* @see #getFlucQFrc |
| 1086 |
|
*/ |
| 1087 |
|
void setFlucQFrc(RealType cfrc, int snapshotNo) { |
| 1088 |
|
((snapshotMan_->getSnapshot(snapshotNo))->*storage_).flucQFrc[localIndex_] = cfrc; |
| 1090 |
|
|
| 1091 |
|
/** |
| 1092 |
|
* Adds charge force into the previous charge force of this stuntDouble |
| 1093 |
< |
* @param cfrc new charge force |
| 1094 |
< |
* @see #getflucQFrc |
| 1093 |
> |
* @param cfrc charge force to be added |
| 1094 |
> |
* @see #getFlucQFrc |
| 1095 |
|
*/ |
| 1096 |
|
void addPrevFlucQFrc(RealType cfrc) { |
| 1097 |
|
((snapshotMan_->getPrevSnapshot())->*storage_).flucQFrc[localIndex_] += cfrc; |
| 1099 |
|
|
| 1100 |
|
/** |
| 1101 |
|
* Adds charge force into the current charge force of this stuntDouble |
| 1102 |
< |
* @param cfrc new charge force |
| 1102 |
> |
* @param cfrc charge force to be added |
| 1103 |
|
*/ |
| 1104 |
|
void addFlucQFrc(RealType cfrc) { |
| 1105 |
|
((snapshotMan_->getCurrentSnapshot())->*storage_).flucQFrc[localIndex_] += cfrc; |
| 1107 |
|
|
| 1108 |
|
/** |
| 1109 |
|
* Adds charge force into the charge force of this stuntDouble in specified snapshot |
| 1110 |
< |
* @param value charge force to be add |
| 1110 |
> |
* @param cfrc charge force to be added |
| 1111 |
|
* @param snapshotNo |
| 1112 |
< |
* @see #getflucQFrc |
| 1112 |
> |
* @see #getFlucQFrc |
| 1113 |
|
*/ |
| 1114 |
|
void addflucQFrc(RealType cfrc, int snapshotNo) { |
| 1115 |
|
((snapshotMan_->getSnapshot(snapshotNo))->*storage_).flucQFrc[localIndex_] += cfrc; |
| 1142 |
|
} |
| 1143 |
|
|
| 1144 |
|
/** |
| 1145 |
< |
* Sets the previous electric field of this stuntDouble |
| 1146 |
< |
* @param pos new electric field |
| 1145 |
> |
* Sets the previous electric field of this stuntDouble |
| 1146 |
> |
* @param eField new electric field |
| 1147 |
|
* @see #getElectricField |
| 1148 |
|
*/ |
| 1149 |
< |
void setPrevElectricField(const Vector3d& pos) { |
| 1150 |
< |
((snapshotMan_->getPrevSnapshot())->*storage_).electricField[localIndex_] = pos; |
| 1149 |
> |
void setPrevElectricField(const Vector3d& eField) { |
| 1150 |
> |
((snapshotMan_->getPrevSnapshot())->*storage_).electricField[localIndex_] = eField; |
| 1151 |
|
} |
| 1152 |
|
|
| 1153 |
|
/** |
| 1154 |
< |
* Sets the current electric field of this stuntDouble |
| 1155 |
< |
* @param pos new electric field |
| 1154 |
> |
* Sets the current electric field of this stuntDouble |
| 1155 |
> |
* @param eField new electric field |
| 1156 |
|
*/ |
| 1157 |
< |
void setElectricField(const Vector3d& pos) { |
| 1158 |
< |
DataStorage& data = snapshotMan_->getCurrentSnapshot()->*storage_; |
| 1159 |
< |
data.electricField[localIndex_] = pos; |
| 1160 |
< |
//((snapshotMan_->getCurrentSnapshot())->*storage_).electricField[localIndex_] = pos; |
| 1157 |
> |
void setElectricField(const Vector3d& eField) { |
| 1158 |
> |
((snapshotMan_->getCurrentSnapshot())->*storage_).electricField[localIndex_] = eField; |
| 1159 |
|
} |
| 1160 |
|
|
| 1161 |
|
/** |
| 1162 |
< |
* Sets the electric field of this stuntDouble in specified snapshot |
| 1163 |
< |
* @param pos electric field to be set |
| 1162 |
> |
* Sets the electric field of this stuntDouble in specified snapshot |
| 1163 |
> |
* @param eField electric field to be set |
| 1164 |
|
* @param snapshotNo |
| 1165 |
|
* @see #getElectricField |
| 1166 |
|
*/ |
| 1167 |
< |
void setElectricField(const Vector3d& pos, int snapshotNo) { |
| 1167 |
> |
void setElectricField(const Vector3d& eField, int snapshotNo) { |
| 1168 |
> |
((snapshotMan_->getSnapshot(snapshotNo))->*storage_).electricField[localIndex_] = eField; |
| 1169 |
> |
} |
| 1170 |
|
|
| 1171 |
< |
((snapshotMan_->getSnapshot(snapshotNo))->*storage_).electricField[localIndex_] = pos; |
| 1172 |
< |
|
| 1171 |
> |
/** |
| 1172 |
> |
* Adds electric field into the previous electric field of this |
| 1173 |
> |
* stuntDouble |
| 1174 |
> |
* |
| 1175 |
> |
* @param eField new electric field |
| 1176 |
> |
* @see #getElectricField |
| 1177 |
> |
*/ |
| 1178 |
> |
void addPrevEelectricField(const Vector3d& eField) { |
| 1179 |
> |
((snapshotMan_->getPrevSnapshot())->*storage_).electricField[localIndex_] += eField; |
| 1180 |
|
} |
| 1181 |
+ |
|
| 1182 |
+ |
/** |
| 1183 |
+ |
* Adds electric field into the current electric field of this stuntDouble |
| 1184 |
+ |
* @param eField new electric field |
| 1185 |
+ |
*/ |
| 1186 |
+ |
void addElectricField(const Vector3d& eField) { |
| 1187 |
+ |
((snapshotMan_->getCurrentSnapshot())->*storage_).electricField[localIndex_] += eField; |
| 1188 |
+ |
} |
| 1189 |
|
|
| 1190 |
+ |
/** |
| 1191 |
+ |
* Adds electric field into the electric field of this stuntDouble in specified snapshot |
| 1192 |
+ |
* |
| 1193 |
+ |
* @param eField electric field to be added |
| 1194 |
+ |
* @param snapshotNo |
| 1195 |
+ |
* @see #getElectricField |
| 1196 |
+ |
*/ |
| 1197 |
+ |
void addElectricField(const Vector3d& eField, int snapshotNo) { |
| 1198 |
+ |
((snapshotMan_->getSnapshot(snapshotNo))->*storage_).electricField[localIndex_] += eField; |
| 1199 |
+ |
} |
| 1200 |
|
|
| 1201 |
+ |
|
| 1202 |
|
/** Set the force of this stuntDouble to zero */ |
| 1203 |
|
void zeroForcesAndTorques(); |
| 1204 |
|
/** |