6 #define sptr boost::shared_ptr
63 virtual flt energy(
Box &box)=0;
64 virtual void set_forces(
Box &box)=0;
70 std::string s = std::string(
"set_forces_get_pressure not defined for class ");
71 s.append(
typeid(*this).name());
72 throw std::runtime_error(s);
84 virtual flt pressure(
Box &box)=0;
94 std::string s = std::string(
"stress not defined for class ");
95 s.append(
typeid(*this).name());
96 throw std::runtime_error(s);
106 virtual flt energy(
const Vec diff)=0;
107 virtual Vec forces(
const Vec diff)=0;
111 static const flt LJr0 = pow(2.0, 1.0/6.0);
112 static const flt LJr0sq = pow(2.0, 1.0/3.0);
120 epsilon(epsilon), sigma(sigma){};
122 flt rsq = diff.squaredNorm()/(sig*sig);
123 if(rsq > 1)
return 0;
124 flt rsix = rsq*rsq*rsq;
126 flt mid = (1-1/rsix);
127 return eps*(mid*mid);
131 flt dsq = diff.squaredNorm();
132 flt rsq = dsq/(sig*sig);
133 if(rsq > 1)
return Vec::Zero();
134 flt rsix = rsq*rsq*rsq;
136 flt fmagTimesR = 12*eps/rsix*(1/rsix - 1);
142 return diff * (fmagTimesR / dsq);
153 epsilon(epsilon), sigma(sigma){};
155 flt rsq = diff.squaredNorm()/(sig*sig);
156 if(rsq < 1)
return -eps;
157 flt rsix = rsq*rsq*rsq;
159 flt mid = (1-1/rsix);
160 return eps*(mid*mid-1);
163 if(rsig < 1)
return -1;
164 flt rsq = rsig * rsig;
165 flt rsix = rsq*rsq*rsq;
166 flt mid = (1-1/rsix);
172 flt dsq = diff.squaredNorm();
173 flt rsq = dsq/(sig*sig);
174 if(rsq < 1)
return Vec::Zero();
175 flt rsix = rsq*rsq*rsq;
176 flt fmagTimesR = 12*eps/rsix*(1/rsix - 1);
177 return diff * (fmagTimesR / dsq);
180 if(rsig < 1)
return 0;
182 flt rsix = rsq*rsq*rsq;
183 flt fmagTimesR = 12/rsix*(1/rsix - 1);
184 return fmagTimesR / rsig;
197 epsilon(epsilon), sigma(sigma), cut_distance(cutsig),
198 cut_energy(
LJAttract::energy(cut_distance) * epsilon){};
200 const flt sig,
const flt cutsig){
201 if(eps == 0)
return 0;
202 if(diff.squaredNorm() > (cutsig*cutsig*sig*sig))
return 0;
207 if(epsilon == 0)
return 0;
208 if(diff.squaredNorm() > (cut_distance*cut_distance*sigma*sigma))
return 0;
212 const flt sig,
const flt cutsig){
213 if(eps == 0)
return Vec::Zero();
214 flt dsq = diff.squaredNorm();
215 flt rsq = dsq/(sig*sig);
216 if(rsq < 1 or rsq > (cutsig*cutsig))
return Vec::Zero();
217 flt rsix = rsq*rsq*rsq;
218 flt fmagTimesR = 12*eps/rsix*(1/rsix - 1);
219 return diff * (fmagTimesR / dsq);
222 return forces(diff, epsilon, sigma, cut_distance);};
235 epsilon(epsilon), sigma(sigma), cut_distance(cutsig){
236 flt rsix = pow(cut_distance, 6);
237 flt mid = (1-1/rsix);
238 cut_energy = epsilon*(mid*mid-1);
241 flt rsq = diff.squaredNorm()/(sigma*sigma);
242 if(rsq > (cut_distance*cut_distance))
return 0;
243 flt rsix = rsq*rsq*rsq;
244 flt mid = (1-1/rsix);
245 return epsilon*(mid*mid-1) - cut_energy;
248 flt dsq = diff.squaredNorm();
249 flt rsq = dsq/(sig*sig);
250 if(rsq > (cutsig*cutsig))
return Vec::Zero();
251 flt rsix = rsq*rsq*rsq;
252 flt fmagTimesR = 12*eps/rsix*(1/rsix - 1);
253 return diff * (fmagTimesR / dsq);
256 if(rsig > cutsig)
return 0;
258 flt rsix = rsq*rsq*rsq;
259 flt fmagTimesR = 12/rsix*(1/rsix - 1);
260 return fmagTimesR / rsig;
271 flt energy(
const Vec diff);
272 Vec forces(
const Vec diff);
285 :springk(k), theta0(theta), usecos(cosine){};
287 flt costheta = r1.dot(r2) / r1.norm() / r2.norm();
288 if(costheta > 1) costheta = 1;
289 else if(costheta < -1) costheta = -1;
290 return acos(costheta);
292 flt energy(
const Vec& diff1,
const Vec& diff2);
293 array<Vec,3> forces(
const Vec& diff1,
const Vec& diff2);
309 flt dU_dcostheta_cos(
const flt costheta)
const;
312 const vector<flt> sinvals = vector<flt>(),
314 static flt get_cos(
const Vec& diff1,
const Vec& diff2,
const Vec& diff3);
315 static flt get_angle(
const Vec& diff1,
const Vec& diff2,
const Vec& diff3);
320 flt dU_dcostheta(
const flt theta)
const;
323 return energy(get_angle(diff1, diff2, diff3));
325 flt energy(
flt ang)
const;
326 array<Vec,4> forces(
const Vec& diff1,
const Vec& diff2,
const Vec& diff3)
const;
338 const flt q2,
const flt cutoff);
340 static flt energy(
const flt r,
const flt qaqb,
const flt screen,
const flt cutoff=0);
342 static Vec forces(
const Vec r,
const flt qaqb,
const flt screen,
const flt cutoff=0);
369 FixedForce(vector<FixedForceAtom> atoms = vector<FixedForceAtom>()) : atoms(atoms){};
380 for(vector<FixedForceAtom>::iterator it = atoms.begin(); it < atoms.end(); ++it)
381 E += it->energy(box);
385 for(vector<FixedForceAtom>::iterator it = atoms.begin(); it < atoms.end(); ++it)
400 void set_force(
Box &box);
418 for(vector<FixedForceRegionAtom>::iterator it = atoms.begin(); it < atoms.end(); ++it)
419 E += it->energy(box);
423 for(vector<FixedForceRegionAtom>::iterator it = atoms.begin(); it < atoms.end(); ++it)
435 loc(loc), k(k), a(a) {
441 Vec diffx = a->x - loc;
442 for(
uint i=0; i<2; ++i){
443 if(!usecoord[i]) diffx[i] = 0;
445 return k*diffx.squaredNorm()/2;
448 Vec diffx = a->x - loc;
449 for(
uint i=0; i<2; ++i){
450 if(!usecoord[i]) diffx[i] = 0;
460 FixedSpring(vector<FixedSpringAtom> atoms = vector<FixedSpringAtom>()) : atoms(atoms){};
469 for(vector<FixedSpringAtom>::iterator it = atoms.begin(); it < atoms.end(); ++it)
470 E += it->energy(box);
474 for(vector<FixedSpringAtom>::iterator it = atoms.begin(); it < atoms.end(); ++it)
488 g1(g1), g2(g2), k(k), x0(x0), m1(g1->mass()), m2(g2->mass()){};
490 flt dx = (g1->
com() - g2->
com()).norm() - x0;
491 return k/2 * dx * dx;
495 flt comdist = comvec.norm();
496 flt fmag = -k * (comdist - x0);
497 Vec a1 = comvec * (fmag / m1 / comdist);
503 Vec a2 = comvec * (-fmag / m2 / comdist);
513 flt comdist = comvec.norm();
514 flt fmag = -k * (comdist - x0);
516 Vec a12 = comvec * (fmag / m1 / m2 / comdist);
523 Vec fij = a12 * (atm1.
m * atm2.
m);
548 AtomRef(a), force_mag(force_mag), freq(freq), force_type(force_type){};
558 for(
uint i=0; i<agroup.
size(); ++i){
572 void set_forces(
Box &box);
603 return ((a1 == other.
a1) and (a2 == other.
a2)) or ((a1 == other.
a2) and (a2 == other.
a1));
614 BondPairs(vector<BondGrouping> pairs,
bool zeropressure=
true);
625 flt x0 = (a1->x - a2->x).norm();
631 flt mean_dists(
Box &box)
const;
632 flt std_dists(
Box &box)
const;
634 void set_forces(
Box &box);
636 flt set_forces_get_pressure(
Box &box);
643 k(k),x0(x0), a1(a1), a2(a2), a3(a3){};
645 if(a2 != other.
a2)
return false;
646 return ((a1 == other.
a1) and (a3 == other.
a3)) or ((a1 == other.
a3) and (a3 == other.
a1));
655 AngleTriples(vector<AngleGrouping> triples = vector<AngleGrouping>());
668 void set_forces(
Box &box);
671 flt mean_dists()
const;
672 flt std_dists()
const;
682 dih(cos_coefficients, sincoeffs, usepow), a1(a1),
683 a2(a2), a3(a3), a4(a4){};
690 Dihedrals(vector<DihedralGrouping> pairs = vector<DihedralGrouping>());
694 inline void add(vector<flt> cos_coefficients, vector<flt> sincoeffs,
699 vector<flt> cos_coefficients(2,k);
700 cos_coefficients[1] = -k*cos(theta0);
701 vector<flt> sincoeffs(2,0);
702 sincoeffs[1] = -k*sin(theta0);
716 flt mean_dists()
const;
719 void set_forces(
Box &box);
770 epsilon(epsilon), sigma(sigma){};
772 epsilon(other.epsilon), sigma(other.sigma){};
787 epsilon(sqrt(LJ1.epsilon * LJ2.epsilon)),
788 sigma((LJ1.sigma + LJ2.sigma) / 2),
789 atom1(LJ1), atom2(LJ2){};
806 sigcut(other.sigcut){};
825 AtomID(a), epsilons(epsilons), sigmas(sigmas), indx(indx),
827 assert(sigmas.size() == epsilons.size());
830 sigmas(other.sigmas), indx(other.indx), sigcut(other.sigcut){};
832 assert(other.
indx < epsilons.size());
833 flt myeps = epsilons[other.
indx];
839 assert(other.
indx < sigmas.size());
840 flt myeps = sigmas[other.
indx];
846 flt sigma = sigmas[0];
847 for(
uint i=1; i<sigmas.size(); ++i){
848 if(sigma < sigmas[i]) sigma = sigmas[i];
865 inter(sqrt(a1.epsilon * a2.epsilon),
866 (a1.sigma + a2.sigma) / 2,
867 max(a1.sigcut, a2.sigcut)),
868 atom1(a1), atom2(a2){};
870 inter(a1.get_epsilon(a2),
872 max(a1.sigcut, a2.sigcut)),
873 atom1(a1), atom2(a2){};
888 AtomID(a), epsilons(epsilons), indx(indx), sigma(sigma),
891 indx(other.indx), sigma(other.sigma), sigcut(other.sigcut){};
893 assert(other.
indx < epsilons.size());
894 flt myeps = epsilons[other.
indx];
895 assert(indx < other.
epsilons.size());
896 assert(other.
epsilons[indx] == myeps);
906 inter(sqrt(a1.epsilon * a2.epsilon),
907 (a1.sigma + a2.sigma) / 2,
908 max(a1.sigcut, a2.sigcut)),
909 atom1(a1), atom2(a2){};
911 inter(a1.get_epsilon(a2),
913 max(a1.sigcut, a2.sigcut)),
914 atom1(a1), atom2(a2){};
916 inter(a1.get_epsilon(a2),
917 (a1.sigma + a2.sigma) / 2,
918 max(a1.sigcut, a2.sigcut)),
919 atom1(a1), atom2(a2){};
941 AtomID(a), epsilons(epsilons), repeps(repeps), sigma(sigma),
942 exponent(n), indx(indx), sigcut(cut){
943 assert(indx < epsilons.size());
947 AtomID(a), epsilons(other.epsilons), repeps(other.repeps),
948 sigma(other.sigma), exponent(other.exponent), indx(other.indx),
949 sigcut(other.sigcut){
954 assert(other.
indx < epsilons.size());
955 flt myeps = epsilons[other.
indx];
959 return (sigma + other.
sigma)/2.0;
966 flt epsilon, repeps,
sigma, n, cut_distance, cut_energy;
969 epsilon(LJ1.get_epsilon(LJ2)),
970 repeps(sqrt(LJ1.repeps * LJ2.repeps)),
971 sigma(LJ1.get_sigma(LJ2)),
972 n((LJ1.exponent + LJ2.exponent) / 2),
973 cut_distance(max(LJ1.sigcut, LJ2.sigcut)),
974 atom1(LJ1), atom2(LJ2){
981 flt mid = (1-pow(cut_distance,-n));
982 cut_energy = epsilon*(mid*mid);
985 Vec rij = box.
diff(atom1->x, atom2->x);
986 flt rsq = rij.squaredNorm()/(sigma*sigma);
987 if(rsq > cut_distance * cut_distance){
992 flt mid = (1-pow(rsq,-n/2));
994 if (rsq > 1)
return epsilon*(mid*mid) - cut_energy;
995 return repeps*(mid*mid) - cut_energy;
998 Vec rij = box.
diff(atom1->x, atom2->x);
999 flt dsq = rij.squaredNorm();
1000 flt rsq = dsq/(sigma*sigma);
1001 if(rsq > cut_distance * cut_distance)
return Vec::Zero();
1002 flt rmid = pow(rsq,-n/2);
1003 flt fmagTimesR = 2*n*rmid*(rmid - 1);
1004 if (rsq < 1)
return rij * (repeps * fmagTimesR / dsq);
1005 return rij * (epsilon * fmagTimesR / dsq);
1020 eps(a1.get_epsilon(a2)), sig((a1.sigma + a2.sigma)/2.0),
1021 cut_distance(max(a1.sigcut, a2.sigcut)),
1022 atom1(a1), atom2(a2){
1029 flt mid = (1-pow(cut_distance,-6));
1030 cut_energy = eps*(mid*mid);
1033 Vec rij = box.
diff(atom1->x, atom2->x);
1034 flt rsq = rij.squaredNorm()/(sig*sig);
1035 if(rsq > cut_distance*cut_distance) {
1040 flt mid = (1-pow(rsq,-3));
1045 return eps*(mid*mid) - cut_energy;
1048 if(eps == 0)
return Vec::Zero();
1049 Vec rij = box.
diff(atom1->x, atom2->x);
1050 flt dsq = rij.squaredNorm();
1051 flt rsq = dsq/(sig*sig);
1052 if(rsq > (cut_distance*cut_distance))
return Vec::Zero();
1053 flt rsix = pow(rsq,-3);
1054 flt fmagTimesR = 12*eps*rsix*(rsix - 1);
1055 return rij * (fmagTimesR / dsq);
1073 AtomID(a), epsilons(epsilons), repeps(repeps), sig(sigma),
1074 indx(indx), sigcut(cut){
1075 assert(indx < epsilons.size());
1078 AtomID(a), epsilons(other.epsilons),
1079 repeps(other.repeps), sig(other.sig), indx(other.indx), sigcut(other.sigcut){};
1081 assert(other.
indx < epsilons.size());
1082 flt myeps = epsilons[other.
indx];
1100 eps(abs(a1.get_epsilon(a2))), repeps(sqrt(a1.repeps * a2.repeps)),
1101 sig((a1.sig + a2.sig)/2.0),
1102 cut_distance(max(a1.sigcut, a2.sigcut)), attract(a1.get_epsilon(a2) > 0),
1103 atom1(a1), atom2(a2){
1104 if(!attract or eps == 0){
1111 flt mid = (1-pow(cut_distance,-6.0));
1112 cut_energy = eps*(mid*mid);
1115 Vec rij = box.
diff(atom1->x, atom2->x);
1116 flt rsq = rij.squaredNorm()/(sig*sig);
1117 if(rsq > cut_distance*cut_distance) {
1122 flt mid = (1-pow(rsq,-3));
1125 if (rsq > 1)
return eps*(mid*mid) - cut_energy;
1126 return repeps*(mid*mid) - cut_energy;
1136 Vec rij = box.
diff(atom1->x, atom2->x);
1137 flt dsq = rij.squaredNorm();
1138 flt rsq = dsq/(sig*sig);
1139 if(rsq > (cut_distance*cut_distance))
return Vec::Zero();
1140 flt rsix = pow(rsq,-3);
1141 flt fmagTimesR = 12*rsix*(rsix - 1);
1142 if (rsq < 1)
return rij * (repeps * fmagTimesR / dsq);
1143 return rij * (eps * fmagTimesR / dsq);
1158 dist(dist), sigmai(sigmai){};
1160 dist(other.dist), sigmai(other.sigmai){};
1170 c0(-M_PI*(a1.sigmai*a2.dist - a2.sigmai*a1.dist)
1171 * (a1.dist*a1.dist - a2.dist*a2.dist)),
1172 c1(-2*M_PI*(a1.sigmai*a2.dist*a2.dist + a2.sigmai*a1.dist*a1.dist)),
1173 c2(M_PI*(a1.sigmai*a2.dist + a2.sigmai*a1.dist)),
1174 cutoff(a1.dist + a2.dist),
1175 atom1(a1), atom2(a2){};
1177 Vec rij = box.
diff(atom1->x, atom2->x);
1179 if (R > cutoff)
return 0;
1180 return c0/R + c1 + c2*R;
1183 Vec rij = box.
diff(atom1->x, atom2->x);
1184 flt dsq = rij.squaredNorm();
1185 if(dsq > (cutoff*cutoff))
return Vec::Zero();
1187 return rij * ((c0/dsq-c2)/R);
1195 eps(eps), sigma(sigma), exponent(exponent){};
1197 eps(other.eps), sigma(other.sigma), exponent(other.exponent){};
1221 uint indx,
flt exponent=2.5) :
1222 AtomID(a), epsilons(epsilons), sigmas(sigmas), exponent(exponent),
1224 assert(sigmas.size() == epsilons.size());
1227 sigmas(other.sigmas), indx(other.indx){};
1229 assert(other.
indx < epsilons.size());
1230 flt myeps = epsilons[other.
indx];
1236 assert(other.
indx < sigmas.size());
1237 flt myeps = sigmas[other.
indx];
1243 flt sigma = sigmas[0];
1244 for(
uint i=1; i<sigmas.size(); ++i){
1245 if(sigma < sigmas[i]) sigma = sigmas[i];
1260 eps(sqrt(a1.eps * a2.eps)), sig((a1.sigma + a2.sigma)/2.0),
1261 exponent((a1.exponent + a2.exponent)/2.0), atom1(a1), atom2(a2){};
1263 eps(a1.get_epsilon(a2)), sig(a1.get_sigma(a2)),
1264 exponent((a1.exponent + a2.exponent)/2.0), atom1(a1), atom2(a2){};
1266 Vec rij = box.
diff(atom1->x, atom2->x);
1267 flt dsq = rij.squaredNorm();
1268 if(dsq > sig*sig)
return 0.0;
1270 return eps * pow(1.0 - (R/sig), exponent) / exponent;
1273 Vec rij = box.
diff(atom1->x, atom2->x);
1274 flt dsq = rij.squaredNorm();
1275 if(dsq > sig*sig)
return Vec::Zero();
1277 return rij * (eps * pow(1.0 - (R/sig), exponent-1) /sig/R);
1280 Vec rij = box.
diff(atom1->x, atom2->x);
1281 flt dsq = rij.squaredNorm();
1282 if(dsq > sig*sig)
return EnergyForce(Vec::Zero(),0);
1285 Vec f = rij * (eps * pow(1.0 - (R/sig), exponent-1) /sig/R);
1286 flt E = eps * pow(1.0 - (R/sig), exponent) / exponent;
1299 Vec rij = box.
diff(atom1->x, atom2->x);
1300 flt dsq = rij.squaredNorm();
1302 fpair.
fij = Vec::Zero();
1307 fpair.
fij = rij * (eps*pow(1.0 - (R/sig), exponent-1) /sig/R);
1309 fpair.
xij = -Rs*eps*pow(1.0 - (R/sig), exponent-2)*(1-exponent*Rs);
1323 eps(eps), sigma(sigma), exponent(exponent), gamma(gamma){};
1325 eps(other.eps), sigma(other.sigma), exponent(other.exponent), gamma(other.gamma){};
1333 eps(sqrt(a1.eps * a2.eps)), sig((a1.sigma + a2.sigma)/2.0),
1334 exponent((a1.exponent + a2.exponent)/2.0),
1335 gamma((a1.gamma + a2.gamma)/2), atom1(a1), atom2(a2){};
1337 Vec rij = box.
diff(atom1->x, atom2->x);
1338 flt dsq = rij.squaredNorm();
1339 if(dsq > sig*sig)
return 0.0;
1341 return eps * pow(1.0 - (R/sig), exponent) / exponent;
1344 Vec rij = box.
diff(atom1->x, atom2->x);
1345 Vec vij = atom1->v - atom2->v;
1346 flt dsq = rij.squaredNorm();
1347 if(dsq > sig*sig)
return Vec::Zero();
1349 Vec v_perp = rij * (vij.dot(rij)) / dsq;
1350 return rij * (eps * pow(1.0 - (R/sig), exponent-1) /sig/R) -
1392 eps(eps), sigma(sigma), C(C), l(l){};
1394 eps(other.eps), sigma(other.sigma), C(other.C), l(other.l){};
1402 eps(sqrt(a1.eps * a2.eps)), sig((a1.sigma + a2.sigma)/2.0),
1403 C((a1.C + a2.C)/2.0), l((a1.l + a2.l)/2.0), sigcut(sig*(1+C+l)),
1404 atom1(a1), atom2(a2){};
1406 eps(eps), sig(sig), C(C), l(l), sigcut(sig*(1+C+l)),
1407 atom1(a1), atom2(a2){};
1409 Vec rij = box.
diff(atom1->x, atom2->x);
1410 flt dsq = rij.squaredNorm();
1412 if(dsq >= sigcut*sigcut)
return 0.0;
1413 flt R = sqrt(dsq)/sig;
1417 return -eps*sig/2*(C*(C+l) - dR*dR);
1420 flt dR2 = C+l+1 - R;
1421 return -C*eps*sig/2/l*dR2*dR2;
1425 Vec rij = box.
diff(atom1->x, atom2->x);
1426 flt dsq = rij.squaredNorm();
1427 if(dsq >= sigcut*sigcut)
return Vec::Zero();
1433 return rij*(-eps*dR/R);
1436 flt dR2 = rsig-(C+l+1);
1437 return rij*(C*eps/l*dR2/R);
1446 (a1.sigma + a2.sigma)/2.0,
1447 (a1.C < a2.C ? a1.C : a2.C),
1448 (a1.l < a2.l ? a1.l : a2.l)){};
1466 eps(eps), sigma(sigma), f(width > 0 ? depth/width : 0), l(width){};
1468 eps(other.eps), sigma(other.sigma), f(other.f), l(other.l){};
1476 eps(sqrt(a1.eps * a2.eps)), sig((a1.sigma + a2.sigma)/2.0),
1477 f((a1.f + a2.f)/2.0), l((a1.l + a2.l)/2.0), sigcut(sig +l),
1478 atom1(a1), atom2(a2){};
1480 eps(eps), sig(sig), f(f), l(l), sigcut(sig+l),
1481 atom1(a1), atom2(a2){};
1483 Vec rij = box.
diff(atom1->x, atom2->x);
1484 flt dsq = rij.squaredNorm();
1486 if(dsq >= sigcut*sigcut)
return 0.0;
1490 flt dR = 1.0 - (R/sig);
1491 return eps/2 * dR*dR - f*l;
1494 return -f*(sig + l - R);
1498 Vec rij = box.
diff(atom1->x, atom2->x);
1499 flt dsq = rij.squaredNorm();
1500 if(dsq >= sigcut*sigcut)
return Vec::Zero();
1504 flt dR = 1.0 - (R/sig);
1505 return rij * (eps * dR /sig/R);
1515 (a1.sigma + a2.sigma)/2.0,
1516 (a1.f < a2.f ? a1.f : a2.f),
1517 (a1.l < a2.l ? a1.l : a2.l)){};
1520 template <
class A,
class P>
1528 : box(box), atoms(atomv){};
1529 inline void add(A atm){group.push_back(atm);};
1532 void set_forces(
Box &box);
1533 flt set_forces_get_pressure(
Box &box);
1537 template <
class A,
class P>
1544 inline void add(A atm){atoms.push_back(atm);};
1550 void set_forces(
Box &box);
1551 flt set_forces_get_pressure(
Box &box);
1557 template <
class A,
class P>
1583 atoms(vec->size()), neighbors(neighbors), last_update(0){};
1585 neighbors->add(atm, atm.max_size());
1587 atoms[atm.n()] = atm;
1590 atoms(atomv->size()),
1591 neighbors(new
NeighborList(box, atomv, skin)), last_update(0){};
1592 void update_pairs();
1594 return P(atoms[pair.
first().
n()], atoms[pair.
last().
n()]);}
1600 unsigned long long contacts(
Box &box);
1602 unsigned long long overlaps(
Box &box);
1607 void set_forces(
Box &box);
1608 flt set_forces_get_pressure(
Box &box);
1619 template <
class A,
class P>
1625 nlisted(vec, neighbors){};
1629 virtual flt setForcesGetEnergy(
Box &box);
1636 template <
class A,
class P>
1642 typename vector<A>::iterator it;
1643 for(it = group.begin(); it != group.end(); ++it){
1645 Vec edger = box->edge_dist(r0);
1646 wallatom.
x = r0 + (edger*2);
1652 template <
class A,
class P>
1657 typename vector<A>::iterator it;
1658 for(it = group.begin(); it != group.end(); ++it){
1660 Vec edger = box->edge_dist(r0);
1661 wallatom.
x = r0 + (edger*2);
1663 Vec f = pair.forces(*box);
1668 template <
class A,
class P>
1674 typename vector<A>::iterator it;
1675 for(it = group.begin(); it != group.end(); ++it){
1677 Vec dr = box->edge_dist(r0) * 2;
1678 wallatom.
x = r0 + dr;
1680 Vec f = pair.forces(*box);
1687 template <
class A,
class P>
1693 typename vector<A>::iterator it;
1694 for(it = group.begin(); it != group.end(); ++it){
1696 Vec dr = box->edge_dist(r0) * 2;
1697 wallatom.
x = r0 + dr;
1699 Vec f = pair.forces(*box);
1705 template <
class A,
class P>
1708 typename vector<A>::iterator it1;
1709 typename vector<A>::iterator it2;
1710 for(it1 = atoms.begin(); it1 != atoms.end(); ++it1){
1711 for(it2 = it1+1; it2 != atoms.end(); ++it2){
1712 E += P(*it1, *it2).energy(box);
1718 template <
class A,
class P>
1720 typename vector<A>::iterator it1;
1721 typename vector<A>::iterator it2;
1722 for(it1 = atoms.begin(); it1 != atoms.end(); ++it1){
1723 for(it2 = it1+1; it2 != atoms.end(); ++it2){
1724 P pair = P(*it1, *it2);
1725 Vec f = pair.forces(box);
1732 template <
class A,
class P>
1735 typename vector<A>::iterator it1;
1736 typename vector<A>::iterator it2;
1737 for(it1 = atoms.begin(); it1 != atoms.end(); ++it1){
1738 for(it2 = it1+1; it2 != atoms.end(); ++it2){
1739 P pair = P(*it1, *it2);
1740 Vec f = pair.forces(box);
1743 Vec r = box.
diff((*it1)->x, (*it2)->x);
1751 template <
class A,
class P>
1754 typename vector<A>::iterator it1;
1755 typename vector<A>::iterator it2;
1756 for(it1 = atoms.begin(); it1 != atoms.end(); ++it1){
1757 for(it2 = it1+1; it2 != atoms.end(); ++it2){
1758 P pair = P(*it1, *it2);
1759 Vec f = pair.forces(box);
1760 Vec r = box.
diff((*it1)->x, (*it2)->x);
1767 template <
class A,
class P>
1769 if(last_update == neighbors->which())
return;
1771 last_update = neighbors->which();
1773 vector<IDPair>::iterator pairit;
1774 for(pairit = neighbors->begin(); pairit != neighbors->end(); ++pairit){
1777 A firstatom = atoms[pairit->first().n()];
1778 A secondatom = atoms[pairit->last().n()];
1779 pairs.push_back(P(firstatom, secondatom));
1783 template <
class A,
class P>
1786 P Epair = P(atoms[pair.
first().
n()],atoms[pair.
last().
n()]);
1788 return energy_pair(Epair, box);
1791 template <
class A,
class P>
1793 unsigned long long Nc = 0;
1795 typename vector<P>::iterator it;
1796 for(it = pairs.begin(); it != pairs.end(); ++it){
1797 flt E = energy_pair(*it, box);
1798 if(E != 0.0){Nc++;};
1803 template <
class A,
class P>
1805 unsigned long long Nc = 0;
1807 typename vector<P>::iterator it;
1808 for(it = pairs.begin(); it != pairs.end(); ++it){
1809 flt E = energy_pair(*it, box);
1815 template <
class A,
class P>
1819 typename vector<P>::iterator it;
1820 for(it = pairs.begin(); it != pairs.end(); ++it){
1822 E += energy_pair(*it, box);
1827 template <
class A,
class P>
1830 typename vector<P>::iterator it;
1831 for(it = pairs.begin(); it != pairs.end(); ++it){
1832 Vec f = forces_pair(*it, box);
1839 template <
class A,
class P>
1841 nlisted.update_pairs();
1843 vector<P> & pairs = nlisted.pair_iter();
1844 for(
typename vector<P>::iterator it = pairs.begin(); it != pairs.end(); ++it){
1846 it->atom1->
f += EF.
f;
1847 it->atom2->f -= EF.
f;
1874 template <
class A,
class P>
1876 nlisted.update_pairs();
1878 typename vector<P>::iterator it;
1879 for(it = nlisted.pair_iter().begin(); it != nlisted.pair_iter().end(); ++it){
1880 it->fill(box, myfpair);
1882 funct->
run(&myfpair);
1883 it->atom1->f += myfpair.
fij;
1884 it->atom2->f -= myfpair.
fij;
1889 template <
class A,
class P>
1893 typename vector<P>::iterator it;
1894 for(it = pairs.begin(); it != pairs.end(); ++it){
1895 Vec f = forces_pair(*it, box);
1898 Vec r = box.
diff(it->atom1->x, it->atom2->x);
1905 template <
class A,
class P>
1910 typename vector<P>::iterator it;
1911 for(it = pairs.begin(); it != pairs.end(); ++it){
1912 Vec f = forces_pair(*it, box);
1913 Vec r = box.
diff(it->atom1->x, it->atom2->x);
1921 template <
class A,
class P>
1924 Matrix stress = Matrix::Zero();
1925 typename vector<P>::iterator it;
1926 for(it = pairs.begin(); it != pairs.end(); ++it){
1927 Vec f = forces_pair(*it, box);
1930 Vec r = box.
diff(it->atom1->x, it->atom2->x);
1931 stress += r * f.transpose();
1937 template <
class A,
class P>
1940 Matrix stress = Matrix::Zero();
1941 typename vector<P>::iterator it;
1942 for(it = pairs.begin(); it != pairs.end(); ++it){
1943 Vec f = forces_pair(*it, box);
1944 Vec r = box.
diff(it->atom1->x, it->atom2->x);
1945 stress += r * f.transpose();
1960 Charges(
flt screenlength,
flt k=1, vector<Charged> atms=vector<Charged>());
1967 ignore(get_id(a),get_id(b));};
1972 void set_forces(
Box &box);
1985 AtomRef(a), sigma(sigma), epsilon(epsilon){};
1997 loc(loc), norm(norm.normalized()), expt(expt), lastf(NAN){};
2000 void set_forces(
Box &box);
2001 flt set_forces_get_pressure(
Box &box);
2022 loc(loc), axis(axis.normalized()), radius(radius), expt(expt), lastf(NAN){};
2024 if(a.
sigma > radius*2)
2025 throw std::invalid_argument(
"SoftWallCylinder::add: sigma must be less than cylinder diameter");
2029 void set_forces(
Box &box);
2030 flt set_forces_get_pressure(
Box &box);
2047 OriginBox(size), xwalls(xwalled), ywalls(ywalled){
2050 Vec(-size[0]/2.0, 0),
Vec(1, 0), expt));
2052 Vec(size[0]/2.0, 0),
Vec(-1, 0), expt));
2056 Vec(0, -size[0]/2.0),
Vec(0, 1), expt));
2058 Vec(0, size[0]/2.0),
Vec(0, -1), expt));
2063 if(!xwalls) dr[0] = remainder(r1[0], boxsize[0]);
2064 if(!ywalls) dr[1] = remainder(r1[1], boxsize[1]);
2069 if(!xwalls) dr[0] -= boxes[0]*boxsize[0];
2070 if(!ywalls) dr[1] -= boxes[1]*boxsize[1];
2073 flt V(){
return boxsize[0] * boxsize[1];};
2074 flt L(){
return (boxsize[0] + boxsize[1])/2.0;};
2078 vector<SoftWall*>::iterator it;
2079 for(it = walls.begin(); it != walls.end(); ++it){
2080 (*it)->set_location((*it)->get_location() * factor);
2086 return resize(pow(newV/curV,
OVERNDIM));
2089 Vec bxvec = boxsize;
2090 if(xwalls) bxvec[0] -= walldist/2.0;
2091 if(ywalls) bxvec[1] -= walldist/2.0;
2096 return diff(v, Vec::Zero());
2100 for(vector<SoftWall*>::iterator it = walls.begin(); it != walls.end(); ++it){
2108 if(val <= minimum)
return minimum;
2109 if(val >= maximum)
return maximum;
2120 for(
uint i=0; i < masses.size(); ++i){
2121 atoms[2*i].m = masses[i]/2;
2122 atoms[2*i+1].m = masses[i]/2;
2150 p1(p1), p2(p2), l1(l1), l2(l2){};
2152 p1(p1), p2(p2), l1(l), l2(l){};
2154 l1(other.l1), l2(other.l2){}
2158 return apply_force(box, f, diff, I, I);
2167 SCPair(p1, p2, l1, l2), eps(eps), sig(sig){};
2169 SCPair(p1, p2, l), eps(eps), sig(sig){};
2175 flt dsq = diff.
delta.squaredNorm();
2176 if(dsq > sig*sig)
return 0;
2179 return dsig*dsig*eps/2;
2182 flt dsq = diff.
delta.squaredNorm();
2183 if(dsq > sig*sig)
return Vec::Zero();
2184 flt dmag = sqrt(dsq);
2187 return dhat * (eps * (sig - dmag));
2197 set<array<uint, 2> > ignore_list;
2202 scs(scs), eps(eps), sig(sig), ls(scs->pairs(), l){};
2204 scs(scs), eps(eps), sig(sig), ls(ls){};
2206 void set_forces(
Box &box);
2207 flt set_forces_get_pressure(
Box &box);
2212 if(n1 > n2){
uint n3=n1; n1=n2; n2=n3;}
2213 array<uint, 2> pair;
2216 ignore_list.insert(pair);
void ignore(AtomID a, AtomID b)
Definition: interaction.hpp:1965
LJAttractCutPair(EpsSigCutAtom a1, EpsSigCutAtom a2)
Definition: interaction.hpp:905
Vec com() const
center of mass
Definition: box.cpp:222
virtual void run(ForcePairX *)=0
flt get_epsilon(IEpsISigExpAtom &other)
Definition: interaction.hpp:1228
void set_axis(Vec new_axis)
Definition: interaction.hpp:2035
flt radius
Definition: interaction.hpp:2016
void add(A atm)
Definition: interaction.hpp:1529
AtomVec & vec()
Definition: interaction.hpp:2126
Vec rand_loc(flt walldist)
Definition: interaction.hpp:2088
Definition: interaction.hpp:686
void add_forced(AngleGrouping b)
Definition: interaction.hpp:664
Definition: interaction.hpp:392
Vec vec()
A one-liner for creating a Vec object, occasionally useful from within Python.
Definition: vecrand.hpp:72
uint indx
Definition: interaction.hpp:819
uint n() const
Definition: box.hpp:279
flt l2
Definition: interaction.hpp:2148
flt sig
Definition: interaction.hpp:1016
vector< A > atoms
Definition: interaction.hpp:1574
vector< flt > epsilons
Definition: interaction.hpp:817
~SCSpringList()
Definition: interaction.hpp:2222
The basic class for representing each particle.
Definition: box.hpp:229
Vec forces(Box &box, SpheroCylinderDiff diff)
Definition: interaction.hpp:2181
static Vec forces(const Vec diff, const flt eps, const flt sig, const flt cutsig)
Definition: interaction.hpp:247
flt pressure(Box &box)
Partial pressure due to this Interaction.
Definition: interaction.hpp:1688
uint size()
Definition: interaction.hpp:1605
AtomID get_id(cuint n)
Definition: interaction.hpp:2129
SCSpringPair(IDPair &p1, IDPair &p2, flt eps, flt sig, flt l1, flt l2)
Definition: interaction.hpp:2166
void set_normal(Vec newNorm)
Definition: interaction.hpp:2006
flt cut_energy
Definition: interaction.hpp:1017
flt confine_range(flt minimum, flt val, flt maximum)
Definition: interaction.hpp:2107
Definition: interaction.hpp:536
LJAttractRepulsePair(IEpsSigCutAtom a1, IEpsSigCutAtom a2)
Definition: interaction.hpp:1019
bool attract
Definition: interaction.hpp:1096
IEpsISigCutAtom(AtomID a, IEpsISigCutAtom other)
Definition: interaction.hpp:829
Definition: interaction.hpp:365
LennardJonesCut(const flt epsilon, const flt sigma, const flt cutsig)
Definition: interaction.hpp:234
virtual flt pressure(Box &box)
Partial pressure due to this Interaction.
Definition: interaction.hpp:1631
IEpsRepsSigExpCutAtom(AtomID a, IEpsRepsSigExpCutAtom other)
Definition: interaction.hpp:946
IDPair & p1
Definition: interaction.hpp:2146
void add(FixedForceAtom a)
Definition: interaction.hpp:370
LennardJonesCut inter
Definition: interaction.hpp:862
LJAttractCut(const flt epsilon, const flt sigma, const flt cutsig)
Definition: interaction.hpp:196
void set_force(Box &box)
Definition: interaction.hpp:447
flt epsilon
Definition: interaction.hpp:192
vector< WallAtom > group
Definition: interaction.hpp:2019
Vec axis
Definition: interaction.hpp:2015
flt energy(Box &box)
Potential energy due to this Interaction.
Definition: interaction.hpp:1637
flt sigcut
Definition: interaction.hpp:1399
RandomForceAtom(AtomID a, flt force_mag, flt freq, RandomForceType force_type=UNIFORM)
Definition: interaction.hpp:547
flt resize(flt factor)
Definition: interaction.hpp:2076
flt exponent
Definition: interaction.hpp:1215
Repulsion potential, with ε = √(ε₁ ε₂) and σ = (σ₁ + σ₂)/2 Potential is V(r) = ε/n (1 - r/σ)^n...
Definition: interaction.hpp:1256
IEpsISigExpAtom()
Definition: interaction.hpp:1219
vector< flt > sigmas
Definition: interaction.hpp:818
flt energy(Box &box)
Definition: interaction.hpp:984
vector< flt > epsilons
Definition: interaction.hpp:930
FixedForceAtom(Vec F, AtomID a)
Definition: interaction.hpp:360
void set_location(Vec new_loc)
Definition: interaction.hpp:2033
flt m
mass
Definition: box.hpp:243
void add(flt k, flt theta0, AtomID a1, AtomID a2, AtomID a3, AtomID a4)
Add 4 atoms with the potential .
Definition: interaction.hpp:698
IEpsSigCutAtom(AtomID a, IEpsSigCutAtom other)
Definition: interaction.hpp:890
uint size() const
Definition: interaction.hpp:377
LennardJonesCutPair(EpsSigCutAtom a1, EpsSigCutAtom a2)
Definition: interaction.hpp:864
a group of atoms, such as all of them (AtomVec), or a smaller group such as a molecule, sidebranch, etc.
Definition: box.hpp:312
void add(flt k, AtomID a1, AtomID a2, AtomID a3, AtomID a4)
Add 4 atoms with the potential , where is set to match the current positions of the atoms...
Definition: interaction.hpp:709
EnergyForce(Vec f, flt E)
Definition: interaction.hpp:1204
void add_forced(BondGrouping b)
Definition: interaction.hpp:622
Definition: interaction.hpp:114
Definition: interaction.hpp:1558
A & getatom(uint n)
Definition: interaction.hpp:1595
uint indx
Definition: interaction.hpp:933
EpsSigExpAtom()
Definition: interaction.hpp:1193
uint last_update
Definition: interaction.hpp:1580
SCPair(IDPair &p1, IDPair &p2, flt l1, flt l2)
Definition: interaction.hpp:2149
flt cut_energy
Definition: interaction.hpp:1095
AtomID a1
Definition: interaction.hpp:595
Atom a2
Definition: interaction.hpp:728
Definition: interaction.hpp:590
void set_forces(Box &box)
Definition: interaction.hpp:493
void ignore(uint n1, uint n2)
Definition: interaction.hpp:2211
void ignore(Atom *a, Atom *b)
Definition: interaction.hpp:1966
void add(FixedForceRegionAtom a)
Definition: interaction.hpp:411
flt cutoffE
Definition: interaction.hpp:335
Definition: interaction.hpp:593
Maintains a Verlet list of "neighbors": molecules within a 'skin radius' of each other.
Definition: trackers.hpp:118
flt sigma
Definition: interaction.hpp:1320
FixedSpringAtom(AtomID a, Vec loc, flt k, bool usex=true, bool usey=true, bool usez=true)
Definition: interaction.hpp:434
Repulsion potential with drag, with ε = √(ε₁ ε₂) and σ = (σ₁ + σ₂)/2 Potential is V(r) = ε/n (1 ...
Definition: interaction.hpp:1319
void set_forces(Box &box)
Definition: interaction.hpp:473
NListed(sptr< Box > box, sptr< AtomVec > atomv, const flt skin)
Definition: interaction.hpp:1589
flt pressure(Box &box)
Partial pressure due to this Interaction.
Definition: interaction.hpp:1906
flt L()
Definition: interaction.hpp:2074
virtual ~InteractPair()
Definition: interaction.hpp:108
uint size() const
Definition: interaction.hpp:715
flt max_size()
Definition: interaction.hpp:1395
LennardJonesCutPair(IEpsISigCutAtom a1, IEpsISigCutAtom a2)
Definition: interaction.hpp:869
Vec fij
Definition: interaction.hpp:729
flt sigcut
Definition: interaction.hpp:1069
Vec forces(const Vec &diff)
Definition: interaction.hpp:144
The main class for representing particles.
Definition: box.hpp:412
unsigned int uint
Definition: vec.hpp:20
array< Vec, 4 > derivs
Definition: interaction.hpp:299
flt max_delta()
Definition: interaction.hpp:2172
LoisOhernAtom(AtomID a, flt eps, flt sigma, flt C, flt l)
Definition: interaction.hpp:1391
vector< SoftWall * > get_walls()
Definition: interaction.hpp:2098
Vec x
location.
Definition: box.hpp:231
Definition: interaction.hpp:480
void set_forces(Box &box)
Definition: interaction.hpp:384
flt max_size()
Definition: interaction.hpp:899
EpsSigExpAtom(AtomID a, flt eps, flt sigma, flt exponent)
Definition: interaction.hpp:1194
flt energy(Box &box)
Definition: interaction.hpp:875
Vec delta
Definition: interaction.hpp:2141
flt epsilon
Definition: interaction.hpp:149
double flt
The basic floating point type used in the simulations.
Definition: vecrand.hpp:45
AtomID atom2
Definition: interaction.hpp:1018
flt k
Definition: interaction.hpp:1956
sptr< NeighborList > neighbor_list()
Definition: interaction.hpp:1633
AtomID a2
Definition: interaction.hpp:595
SCPair(IDPair &p1, IDPair &p2, flt l)
Definition: interaction.hpp:2151
Definition: interaction.hpp:303
BondAngle(const flt k, const flt theta, const bool cosine=false)
Definition: interaction.hpp:284
Definition: interaction.hpp:2041
Definition: interaction.hpp:1472
LJAttractFixedRepulsePair()
Definition: interaction.hpp:1098
uint indx
Definition: interaction.hpp:1068
LoisLinPair(LoisLinAtom a1, LoisLinAtom a2)
Definition: interaction.hpp:1475
Vec forces(const Vec &diff)
Definition: interaction.hpp:221
LoisLinAtom()
Definition: interaction.hpp:1464
WallAtom(AtomID a, flt sigma, flt epsilon=1.0)
Definition: interaction.hpp:1984
void add(AtomID a, flt q)
Definition: interaction.hpp:1964
bool add(flt k, flt x0, AtomID a1, AtomID a2, bool replace=true)
Definition: interaction.hpp:620
Definition: interaction.hpp:456
IEpsRepsSigCutAtom()
Definition: interaction.hpp:1070
Vec loc
Definition: interaction.hpp:430
sptr< NeighborList > neighbors
Definition: interaction.hpp:1579
LoisOhernPair(LoisOhernAtom a1, LoisOhernAtom a2, flt eps, flt sig, flt C, flt l)
Definition: interaction.hpp:1405
vector< FixedForceAtom > atoms
Definition: interaction.hpp:367
IEpsISigCutAtom()
Definition: interaction.hpp:823
~SimpleListed()
Definition: interaction.hpp:1554
flt pressure(Box &box)
Partial pressure due to this Interaction.
Definition: interaction.hpp:667
vector< A > & atom_list()
Definition: interaction.hpp:1534
Definition: interaction.hpp:298
flt cutoff
Definition: interaction.hpp:1167
BondDiffType
Definition: interaction.hpp:587
Definition: interaction.hpp:1398
flt max_size()
Definition: interaction.hpp:961
flt phi(Box &box)
Definition: interaction.hpp:2219
flt energy(Box &box)
Definition: interaction.hpp:1176
LoisOhernAtom(AtomID a, LoisOhernAtom other)
Definition: interaction.hpp:1393
uint size() const
Definition: interaction.hpp:629
A rectilinear Box, with periodic boundary conditions.
Definition: box.hpp:98
virtual flt V()=0
Volume. Can return NaN.
Atom & operator[](cuint n)
Definition: interaction.hpp:2127
sptr< AtomVec > atoms
Definition: interaction.hpp:1524
Definition: interaction.hpp:650
Definition: interaction.hpp:1212
AtomID a4
Definition: interaction.hpp:679
Definition: interaction.hpp:929
flt energy(Box &box)
Definition: interaction.hpp:1482
Vec forces(const Vec &diff)
Definition: interaction.hpp:186
uint size() const
Number of atoms in the group.
Definition: interaction.hpp:2131
flt x0
Definition: interaction.hpp:640
flt max_size()
Definition: interaction.hpp:773
Definition: interaction.hpp:589
Definition: interaction.hpp:1164
Definition: interaction.hpp:760
Definition: interaction.hpp:1191
void add(vector< flt > cos_coefficients, vector< flt > sincoeffs, AtomID a1, AtomID a2, AtomID a3, AtomID a4, bool usepow=true)
Definition: interaction.hpp:694
flt epsilon
Definition: interaction.hpp:1982
flt max_dist()
Definition: interaction.hpp:2171
AtomID atom2
Definition: interaction.hpp:1331
Vec f
Definition: interaction.hpp:1202
flt sigma
Definition: interaction.hpp:117
flt max_size()
Definition: interaction.hpp:1242
A mapping of Atom -> [list of Atom], used by NeighborList to keep track of what atoms are near what o...
Definition: trackers.hpp:29
Definition: interaction.hpp:1093
SCAtomVec(vector< double > masses)
Definition: interaction.hpp:2119
flt energy(const Vec r)
Definition: interaction.hpp:339
Matrix set_forces_get_stress(Box &box)
Definition: interaction.hpp:1922
flt pressure(Box &box)
Partial pressure due to this Interaction.
Definition: interaction.hpp:426
void add(AtomID a, Vec dir, vector< flt > bound, vector< flt > F)
Definition: interaction.hpp:412
static flt energy(const Vec diff, const flt eps, const flt sig)
Definition: interaction.hpp:121
flt energy(const Vec &diff1, const Vec &diff2, const Vec &diff3) const
Definition: interaction.hpp:322
flt expt
Definition: interaction.hpp:2017
AtomID atom2
Definition: interaction.hpp:1474
bool add(flt k, AtomID a1, AtomID a2, bool replace=true)
Add a pair of atoms with the current distance.
Definition: interaction.hpp:624
static Vec diff(Vec r1, Vec r2)
Definition: interaction.hpp:677
~SCAtomVec()
Definition: interaction.hpp:2137
Vec get_location()
Definition: interaction.hpp:2005
SCPair(const SCPair &other)
Definition: interaction.hpp:2153
void update_pairs()
Definition: interaction.hpp:1768
EisMclachlanAtom()
Definition: interaction.hpp:1156
static Vec diff(Vec r1, Vec r2)
Definition: interaction.hpp:653
Vec forces(Box &box)
Definition: interaction.hpp:1497
~WalledBox2D()
Definition: interaction.hpp:2099
flt sigma
Definition: interaction.hpp:1463
Definition: interaction.hpp:766
LJAttractCut inter
Definition: interaction.hpp:903
virtual uint size() const =0
Number of atoms in the group.
flt E
Definition: interaction.hpp:1203
flt screen
Definition: interaction.hpp:332
A pointer to an Atom, that also knows its own index in an AtomVec.
Definition: box.hpp:270
Definition: interaction.hpp:538
vector< WallAtom > group
Definition: interaction.hpp:1993
flt max_size()
Definition: interaction.hpp:845
IEpsISigCutAtom(AtomID a, vector< flt > epsilons, vector< flt > sigmas, uint indx, flt cut)
Definition: interaction.hpp:824
Vec fij
Definition: interaction.hpp:735
static Vec forces(const Vec diff, const flt eps, const flt sig)
Definition: interaction.hpp:171
flt energy(Box &box)
Potential energy due to this Interaction.
Definition: interaction.hpp:571
unsigned long long overlaps(Box &box)
number of Atom pairs with E > 0
Definition: interaction.hpp:1804
Definition: interaction.hpp:1065
flt max_size()
Definition: interaction.hpp:807
static flt forces(const flt rsig)
Definition: interaction.hpp:179
RepulsionPair(IEpsISigExpAtom a1, IEpsISigExpAtom a2)
Definition: interaction.hpp:1262
~NListed()
Definition: interaction.hpp:1616
flt energy(Box &box)
Potential energy due to this Interaction.
Definition: interaction.hpp:467
uint indx
Definition: interaction.hpp:881
vector< flt > boundaries
Definition: interaction.hpp:394
Vec forces(Box &box)
Definition: interaction.hpp:921
flt energy(Box &box)
Definition: interaction.hpp:920
Vec r
Definition: interaction.hpp:2141
flt energy(const Vec &diff)
Definition: interaction.hpp:129
~Spring()
Definition: interaction.hpp:273
EpsSigExpDragAtom()
Definition: interaction.hpp:1321
AtomID a
Definition: interaction.hpp:433
RepulsionDragPair(EpsSigExpDragAtom a1, EpsSigExpDragAtom a2)
Definition: interaction.hpp:1332
void set_forces(Box &box)
Definition: interaction.hpp:1626
void add(Vec F, AtomID a)
Definition: interaction.hpp:371
AtomID atom2
Definition: interaction.hpp:863
RandomForce()
Definition: interaction.hpp:556
flt energy_pair(P pair, Box &box)
Definition: interaction.hpp:1606
void add(DihedralGrouping b)
Definition: interaction.hpp:691
vector< flt > sincoeffs
Definition: interaction.hpp:307
void add(A atm)
Definition: interaction.hpp:1632
flt epsilon
Definition: interaction.hpp:116
Charged(flt q, AtomID a)
Definition: interaction.hpp:757
Definition: interaction.hpp:816
LJAttract(const flt epsilon, const flt sigma)
Definition: interaction.hpp:152
bool zeropressure
Definition: interaction.hpp:609
Vec forces(Box &box)
Definition: interaction.hpp:1343
flt freq
Definition: interaction.hpp:544
flt springk
Definition: interaction.hpp:267
AtomID a2
Definition: interaction.hpp:641
Atom & operator[](cuint n) const
Definition: interaction.hpp:2128
flt sigcut
Definition: interaction.hpp:801
LoisOhernPair(LoisOhernAtom a1, LoisOhernAtom a2)
Definition: interaction.hpp:1401
static flt get_angle(const Vec &r1, const Vec &r2)
Definition: interaction.hpp:286
Vec forces(Box &box)
Definition: interaction.hpp:876
uint pairs() const
Definition: interaction.hpp:2132
uint size() const
Number of atoms in the group.
Definition: box.hpp:444
void add(flt x, flt y, flt z, AtomID a)
Definition: interaction.hpp:373
LJRepulsive(const flt epsilon, const flt sigma)
Definition: interaction.hpp:119
IEpsRepsSigExpCutAtom(AtomID a, vector< flt > epsilons, flt repeps, flt sigma, flt n, uint indx, flt cut)
Definition: interaction.hpp:939
Definition: interaction.hpp:1462
flt V()
Volume. Can return NaN.
Definition: interaction.hpp:2073
AtomID atom2
Definition: interaction.hpp:1168
flt theta0
Definition: interaction.hpp:280
flt max_size()
Definition: interaction.hpp:1198
static flt energy(const Vec diff, const flt eps, const flt sig, const flt cutsig)
Definition: interaction.hpp:199
void add(WallAtom a)
Definition: interaction.hpp:1998
vector< flt > cos_coefficients
Definition: interaction.hpp:306
uint size() const
Definition: interaction.hpp:1969
flt force_mag
Definition: interaction.hpp:543
void set_force(Box &box)
Definition: interaction.hpp:362
LoisOhernPairMinCLs(LoisOhernAtom a1, LoisOhernAtom a2)
Definition: interaction.hpp:1444
SoftWall(Vec loc, Vec norm, flt expt=2.0)
Definition: interaction.hpp:1996
RandomForceType force_type
Definition: interaction.hpp:545
Charged()
Definition: interaction.hpp:756
EisMclachlanAtom(AtomID a, EisMclachlanAtom other)
Definition: interaction.hpp:1159
void add(A atm)
Definition: interaction.hpp:1584
flt resize_to_V(flt newV)
Definition: interaction.hpp:2084
flt sig
Definition: interaction.hpp:1257
flt get_last_f()
Definition: interaction.hpp:2037
flt sigma
Definition: interaction.hpp:150
flt epsilon
Definition: interaction.hpp:230
Definition: interaction.hpp:403
flt sigma
Definition: interaction.hpp:193
flt set_forces_get_pressure(Box &box)
Set forces (Atom.f) and return at the same time (see pressure()).
Definition: interaction.hpp:1733
flt get_epsilon(IEpsRepsSigCutAtom &other)
Definition: interaction.hpp:1080
Vec loc
Definition: interaction.hpp:2014
Definition: interaction.hpp:265
flt energy(Box &box)
Definition: interaction.hpp:790
Definition: interaction.hpp:639
AtomID atom2
Definition: interaction.hpp:967
LJAttractCutPair(IEpsSigCutAtom a1, IEpsSigCutAtom a2)
Definition: interaction.hpp:915
flt cutoff
Definition: interaction.hpp:334
void set_location(Vec newloc)
Definition: interaction.hpp:2004
FixedForceRegion(vector< FixedForceRegionAtom > atoms=vector< FixedForceRegionAtom >())
Definition: interaction.hpp:408
virtual Vec diff(Vec r1, Vec r2)=0
Distance between two points, given boundary conditions.
flt energy(Box &box)
Definition: interaction.hpp:361
vector< Charged > atoms
Definition: interaction.hpp:1953
Matrix stress(Box &box)
The force-moment tensor for the current simulation:
Definition: interaction.hpp:1938
Vec F
Definition: interaction.hpp:358
flt sigcut
Definition: interaction.hpp:885
PairList ignorepairs
Definition: interaction.hpp:1954
Definition: interaction.hpp:1512
vector< AngleGrouping > triples
Definition: interaction.hpp:652
Definition: interaction.hpp:1979
void apply_force(Box &box, Vec f, SpheroCylinderDiff diff, flt I)
Definition: interaction.hpp:2157
Vec forces(Box &box)
Definition: interaction.hpp:997
Vec f
forces
Definition: box.hpp:240
vector< flt > epsilons
Definition: interaction.hpp:1066
void add(vector< flt > nums, AtomID a1, AtomID a2, AtomID a3, AtomID a4)
Definition: interaction.hpp:692
LoisLinPair(LoisLinAtom a1, LoisLinAtom a2, flt eps, flt sig, flt f, flt l)
Definition: interaction.hpp:1479
flt sigcut
Definition: interaction.hpp:822
flt sigma
Definition: interaction.hpp:966
Definition: interaction.hpp:1388
flt sig
Definition: interaction.hpp:1330
flt q2
Definition: interaction.hpp:333
Definition: interaction.hpp:2145
EpsSigCutAtom(AtomID a, flt epsilon, flt sigma, flt cut)
Definition: interaction.hpp:803
flt c2
Definition: interaction.hpp:1165
flt sig
Definition: interaction.hpp:2164
virtual ~FPairXFunct()=0
Definition: interaction.hpp:745
vector< SoftWall * > walls
Definition: interaction.hpp:2044
IDPair & p2
Definition: interaction.hpp:2147
IEpsRepsSigExpCutAtom()
Definition: interaction.hpp:938
static flt energy(const flt rsig)
Definition: interaction.hpp:162
flt max_size()
Definition: interaction.hpp:1161
vector< BondGrouping > pairs
Definition: interaction.hpp:610
vector< P > & pair_iter()
Definition: interaction.hpp:1604
Vec get_axis()
Definition: interaction.hpp:2036
IEpsSigCutAtom()
Definition: interaction.hpp:886
static flt energy(const Vec diff, const flt eps, const flt sig)
Definition: interaction.hpp:154
RepulsionPair(EpsSigExpAtom a1, EpsSigExpAtom a2)
Definition: interaction.hpp:1259
LoisLinAtom(AtomID a, LoisLinAtom other)
Definition: interaction.hpp:1467
The basic Interaction class, used to represent a potential function.
Definition: interaction.hpp:58
AtomID atom2
Definition: interaction.hpp:762
void set_forces(Box &box)
Definition: interaction.hpp:422
uint size()
Definition: interaction.hpp:1548
sptr< SCBox > box
Definition: interaction.hpp:1523
flt xij
Definition: interaction.hpp:734
NListed(sptr< AtomVec > vec, sptr< NeighborList > neighbors)
Definition: interaction.hpp:1582
Vec direction
Definition: interaction.hpp:393
void ignore(AtomID a1, AtomID a2)
Definition: interaction.hpp:2220
Definition: interaction.hpp:1443
Definition: interaction.hpp:537
AtomID atom2
Definition: interaction.hpp:1258
flt energy(Box &box)
Definition: interaction.hpp:1114
flt get_sigma(IEpsISigExpAtom &other)
Definition: interaction.hpp:1235
EpsSigCutAtom()
Definition: interaction.hpp:802
void set_forces(Box &box)
Definition: interaction.hpp:1828
Vec get_normal()
Definition: interaction.hpp:2007
flt energy(Box &box)
Definition: interaction.hpp:1336
Definition: interaction.hpp:1329
Definition: interaction.hpp:676
Definition: interaction.hpp:225
Vec forces(Box &box)
Definition: interaction.hpp:1135
SCSpringList(SCAtomVec *scs, flt eps, flt sig, flt l)
Create an SCSpringList based on scs, using an epsilon of eps, a diameter of sigma, and a "length" of l, where l is cap center-to-cap center distance.
Definition: interaction.hpp:2201
AtomID first() const
Definition: box.hpp:288
flt pressure(Box &box)
Partial pressure due to this Interaction.
Definition: interaction.hpp:576
flt get_sigma(IEpsISigCutAtom &other)
Definition: interaction.hpp:838
AtomID get_id(cuint n)
Definition: box.hpp:442
virtual Atom & get(cuint n)
Definition: box.hpp:318
flt m2
Definition: interaction.hpp:485
virtual flt setForcesGetEnergy(Box &box)
Definition: interaction.hpp:1840
SCSpringList(SCAtomVec *scs, flt eps, flt sig, vector< flt > ls)
Definition: interaction.hpp:2203
IEpsISigExpAtom(AtomID a, IEpsISigCutAtom other)
Definition: interaction.hpp:1226
RandomForce(AtomGroup &agroup, flt force_mag, flt freq, RandomForceType force_type=UNIFORM)
Definition: interaction.hpp:557
EisMclachlanPair(EisMclachlanAtom a1, EisMclachlanAtom a2)
Definition: interaction.hpp:1169
vector< flt > epsilons
Definition: interaction.hpp:880
void fill(Box &box, ForcePairX &fpair)
Definition: interaction.hpp:1296
flt set_forces_get_pressure(Box &box)
Set forces (Atom.f) and return at the same time (see pressure()).
Definition: interaction.hpp:669
Definition: interaction.hpp:1201
virtual AtomID get_id(cuint n)=0
SoftWallCylinder(Vec loc, Vec axis, flt radius, flt expt=2.0)
Definition: interaction.hpp:2021
Definition: interaction.hpp:189
flt sigma
Definition: interaction.hpp:784
LJAttractCutPair(IEpsISigCutAtom a1, IEpsISigCutAtom a2)
Definition: interaction.hpp:910
flt cut_energy
Definition: interaction.hpp:232
void add(FixedSpringAtom a)
Definition: interaction.hpp:461
flt set_forces_get_pressure(Box &box)
Set forces (Atom.f) and return at the same time (see pressure()).
Definition: interaction.hpp:1669
AtomID atom2
Definition: interaction.hpp:1097
IEpsISigExpAtom(AtomID a, vector< flt > epsilons, vector< flt > sigmas, uint indx, flt exponent=2.5)
Definition: interaction.hpp:1220
virtual Matrix stress(Box &box)
The force-moment tensor for the current simulation:
Definition: interaction.hpp:93
flt sigma
Definition: interaction.hpp:1192
AtomID last() const
Definition: box.hpp:289
Definition: interaction.hpp:2191
Definition: interaction.hpp:541
AtomGroup * g2
Definition: interaction.hpp:483
AtomID atom2
Definition: interaction.hpp:904
void add(A atm)
Definition: interaction.hpp:1544
Vec forces(const Vec r)
Definition: interaction.hpp:341
A 3x3 matrix, with methods for adding, subtracting, dot product, etc.
Definition: vec.hpp:360
Definition: interaction.hpp:739
vector< A > group
Definition: interaction.hpp:1525
SimpleListed()
Definition: interaction.hpp:1543
flt sigcut
Definition: interaction.hpp:1473
IEpsRepsSigCutAtom(AtomID a, IEpsRepsSigCutAtom other)
Definition: interaction.hpp:1077
Vec diff(Vec r1, Vec r2)
Distance between two points, given boundary conditions.
Definition: interaction.hpp:2061
flt pressure(Box &box)
Partial pressure due to this Interaction.
Definition: interaction.hpp:388
Definition: interaction.hpp:588
virtual flt set_forces_get_pressure(Box &box)
Set forces (Atom.f) and return at the same time (see pressure()).
Definition: interaction.hpp:1628
flt x0
Definition: interaction.hpp:268
flt q1q2
Definition: interaction.hpp:761
uint indx
Definition: interaction.hpp:1216
Definition: interaction.hpp:732
bool same_atoms(AngleGrouping &other)
Definition: interaction.hpp:644
flt energy(Box &box, IDPair &pair)
Definition: interaction.hpp:1784
flt energy(const Vec &diff)
Definition: interaction.hpp:206
Definition: interaction.hpp:1015
Definition: interaction.hpp:902
static flt forces(const flt rsig, const flt cutsig)
Definition: interaction.hpp:255
flt exponent
Definition: interaction.hpp:932
void add(AtomID a, Vec loc, flt k, bool usex=true, bool usey=true, bool usez=true)
Definition: interaction.hpp:462
void set_forces(Box &box)
Definition: interaction.hpp:1719
flt set_forces_get_pressure(Box &box)
Set forces (Atom.f) and return at the same time (see pressure()).
Definition: interaction.hpp:580
flt energy(Box &box)
Potential energy due to this Interaction.
Definition: interaction.hpp:378
flt x0
Definition: interaction.hpp:484
uint ignore_size() const
Definition: interaction.hpp:1968
void add_pair(AtomID a1, AtomID a2)
Add a pair to the list.
Definition: trackers.hpp:61
AtomID a
Definition: interaction.hpp:359
static flt get_angle(const Vec &diff1, const Vec &diff2, const Vec &diff3)
Definition: interaction.cpp:293
Vec forces(Box &box)
Definition: interaction.hpp:1182
vector< DihedralGrouping > groups
Definition: interaction.hpp:688
flt sigma
Definition: interaction.hpp:884
vector< FixedForceRegionAtom > atoms
Definition: interaction.hpp:406
uint size() const
Definition: interaction.hpp:466
Vec forces(Box &box)
Definition: interaction.hpp:1272
flt lastf
Definition: interaction.hpp:1994
flt energy(const Vec &diff)
Definition: interaction.hpp:170
array< int, NDIM > fixed_box
Definition: interaction.hpp:597
flt sigma
Definition: interaction.hpp:1389
SCSpringPair(IDPair &p1, IDPair &p2, flt eps, flt sig, flt l)
Definition: interaction.hpp:2168
flt pressure(Box &box)
Partial pressure due to this Interaction.
Definition: interaction.hpp:720
flt set_forces_get_pressure(Box &box)
Set forces (Atom.f) and return at the same time (see pressure()).
Definition: interaction.hpp:721
Definition: interaction.hpp:965
flt get_sigma(IEpsRepsSigExpCutAtom &other)
Definition: interaction.hpp:958
uint size() const
Definition: interaction.hpp:670
flt pressure(Box &box)
Partial pressure due to this Interaction.
Definition: interaction.hpp:509
flt energy(Box &box)
Definition: interaction.hpp:1032
Vec get_location()
Definition: interaction.hpp:2034
EnergyForce get_energy_forces(Box &box)
Definition: interaction.hpp:1279
Definition: interaction.hpp:147
flt k
Definition: interaction.hpp:431
Definition: interaction.hpp:1538
vector< RandomForceAtom > group
Definition: interaction.hpp:553
Vec norm
Definition: interaction.hpp:1991
vector< flt > sigmas
Definition: interaction.hpp:1214
vector< A > & atom_list()
Definition: interaction.hpp:1553
EpsSigAtom(AtomID a, flt epsilon, flt sigma)
Definition: interaction.hpp:769
bool ywalls
Definition: interaction.hpp:2043
Definition: interaction.hpp:2113
bool same_atoms(BondGrouping &other)
Definition: interaction.hpp:602
#define NDIM
Definition: vecrand.hpp:12
IDPair pair(cuint n)
Definition: interaction.hpp:2130
AtomID a1
Definition: interaction.hpp:733
virtual flt set_forces_get_pressure(Box &box)
Set forces (Atom.f) and return at the same time (see pressure()).
Definition: interaction.hpp:69
flt get_epsilon(IEpsRepsSigExpCutAtom &other)
Definition: interaction.hpp:953
vector< FixedSpringAtom > atoms
Definition: interaction.hpp:458
AtomID atom2
Definition: interaction.hpp:785
bool usecos
Definition: interaction.hpp:281
flt max_size()
Definition: interaction.hpp:1469
BondDiffType diff_type
Definition: interaction.hpp:596
virtual ~InteractionPairsX()
Definition: interaction.hpp:751
LJRepulsePair(EpsSigAtom LJ1, EpsSigAtom LJ2)
Definition: interaction.hpp:786
EpsSigAtom()
Definition: interaction.hpp:768
flt expt
Definition: interaction.hpp:1992
Definition: interaction.hpp:747
AngleGrouping(flt k, flt x0, AtomID a1, AtomID a2, AtomID a3)
Definition: interaction.hpp:642
LoisLinPairMin(LoisLinAtom a1, LoisLinAtom a2)
Definition: interaction.hpp:1513
flt energy(Box &box)
Definition: interaction.hpp:440
Definition: interaction.hpp:1521
flt pressure(Box &box)
Partial pressure due to this Interaction.
Definition: interaction.hpp:477
AtomID atom2
Definition: interaction.hpp:1400
Definition: interaction.hpp:2162
Definition: interaction.hpp:2140
void add(Charged a)
Definition: interaction.hpp:1963
uint size() const
Definition: interaction.hpp:414
flt springk
Definition: interaction.hpp:279
Vec forces_pair(P pair, Box &box)
Definition: interaction.hpp:1611
vector< P > pairs
Definition: interaction.hpp:1578
Definition: interaction.hpp:357
Definition: interaction.hpp:551
Definition: interaction.hpp:727
flt energy(const Vec &diff)
Definition: interaction.hpp:240
NListedVirial(sptr< AtomVec > vec, sptr< NeighborList > neighbors)
Definition: interaction.hpp:1624
sptr< NeighborList > neighbor_list()
Definition: interaction.hpp:1613
flt set_forces_get_pressure(Box &box)
Set forces (Atom.f) and return at the same time (see pressure()).
Definition: interaction.hpp:1890
Repulsive LJ: .
Definition: interaction.hpp:783
virtual void set_forces(Box &box)=0
Definition: interaction.hpp:879
Vec forces(const Vec &diff)
Definition: interaction.hpp:262
SCBoxed(sptr< AtomVec > atomv, sptr< SCBox > box)
Definition: interaction.hpp:1527
flt sigma
Definition: interaction.hpp:931
RandomForceType
Definition: interaction.hpp:535
int get_fixed(uint i)
Definition: interaction.hpp:601
flt sigma
Definition: interaction.hpp:767
EpsSigExpAtom(AtomID a, EpsSigExpAtom other)
Definition: interaction.hpp:1196
flt energy(Box &box)
Potential energy due to this Interaction.
Definition: interaction.hpp:1706
vector< A > & atom_list()
Definition: interaction.hpp:1612
flt get_epsilon(IEpsISigCutAtom &other)
Definition: interaction.hpp:831
Definition: interaction.hpp:276
flt get_epsilon(IEpsSigCutAtom &other)
Definition: interaction.hpp:892
flt get_last_f()
Definition: interaction.hpp:2009
virtual ~Interaction()
Definition: interaction.hpp:98
Vec loc
Definition: interaction.hpp:1990
flt sig
Definition: interaction.hpp:1094
The virtual interface for the shape of the space and its boundaries.
Definition: box.hpp:50
bool usepow
Definition: interaction.hpp:308
Definition: interaction.hpp:754
Definition: interaction.hpp:1620
flt sigma
Definition: interaction.hpp:1981
flt costheta
Definition: interaction.hpp:300
ChargePair(Charged a1, Charged a2)
Definition: interaction.hpp:763
LJishPair(IEpsRepsSigExpCutAtom LJ1, IEpsRepsSigExpCutAtom LJ2)
Definition: interaction.hpp:968
LoisOhernAtom()
Definition: interaction.hpp:1390
Eigen::Matrix< flt, NDIM, 1 > Vec
The basic physics vector.
Definition: vecrand.hpp:53
flt cut_energy
Definition: interaction.hpp:194
FixedSpring(vector< FixedSpringAtom > atoms=vector< FixedSpringAtom >())
Definition: interaction.hpp:460
Definition: interaction.hpp:2012
Definition: interaction.hpp:429
FixedForce(vector< FixedForceAtom > atoms=vector< FixedForceAtom >())
Definition: interaction.hpp:369
static Vec forces(const Vec diff, const flt eps, const flt sig, const flt cutsig)
Definition: interaction.hpp:211
~BondAngle()
Definition: interaction.hpp:294
Vec forces(Box &box)
Definition: interaction.hpp:1424
static Vec forces(const Vec diff, const flt eps, const flt sig)
Definition: interaction.hpp:130
flt energy(Box &box, SpheroCylinderDiff diff)
Definition: interaction.hpp:2174
virtual flt energy(Box &box)
Potential energy due to this Interaction.
Definition: interaction.hpp:1630
EpsSigAtom(AtomID a, EpsSigAtom other)
Definition: interaction.hpp:771
bool add(flt k, flt x0, AtomID a1, AtomID a2, AtomID a3, bool replace=true)
Definition: interaction.hpp:660
flt lambda2
Definition: interaction.hpp:2142
Definition: interaction.hpp:104
Vec rand_vec_boxed()
Generate a random vector inside a box with sides of length 1.
Definition: vecrand.cpp:19
LJAttractFixedRepulsePair(IEpsRepsSigCutAtom a1, IEpsRepsSigCutAtom a2)
Definition: interaction.hpp:1099
void add(WallAtom a)
Definition: interaction.hpp:2023
EpsSigExpDragAtom(AtomID a, EpsSigExpDragAtom other)
Definition: interaction.hpp:1324
flt energy(Box &box)
Definition: interaction.hpp:1265
uint size() const
for iterating over neighbors
Definition: trackers.hpp:91
Definition: interaction.hpp:330
flt max_size()
Definition: interaction.hpp:1085
COMSpring(AtomGroup *g1, AtomGroup *g2, flt k, flt x0=0)
Definition: interaction.hpp:487
vector< flt > epsilons
Definition: interaction.hpp:1213
IEpsRepsSigCutAtom(AtomID a, vector< flt > epsilons, flt repeps, flt sigma, uint indx, flt cut)
Definition: interaction.hpp:1071
flt q
Definition: interaction.hpp:755
flt screen
Definition: interaction.hpp:1955
flt sigma
Definition: interaction.hpp:231
flt energy(Box &box)
Potential energy due to this Interaction.
Definition: interaction.hpp:416
flt sigmai
Definition: interaction.hpp:1155
LoisLinAtom(AtomID a, flt eps, flt sigma, flt depth, flt width)
Definition: interaction.hpp:1465
P get_pair(IDPair &pair)
Definition: interaction.hpp:1593
flt x0
Definition: interaction.hpp:594
vector< A > atoms
Definition: interaction.hpp:1540
DihedralGrouping(vector< flt > cos_coefficients, vector< flt > sincoeffs, AtomID a1, AtomID a2, AtomID a3, AtomID a4, bool usepow=true)
Definition: interaction.hpp:680
flt lastf
Definition: interaction.hpp:2018
flt pressure(Box &box)
Partial pressure due to this Interaction.
Definition: interaction.hpp:1752
EpsSigCutAtom(AtomID a, EpsSigCutAtom other)
Definition: interaction.hpp:805
flt energy(Box &box)
Potential energy due to this Interaction.
Definition: interaction.hpp:489
WalledBox2D(Vec size, bool xwalled, bool ywalled, flt expt=2.0)
Definition: interaction.hpp:2046
Definition: interaction.hpp:800
Definition: interaction.hpp:1154
const flt OVERNDIM
A constant equal to , where is the number of dimensions.
Definition: vecrand.hpp:66
AtomID a2
Definition: interaction.hpp:733
tuple p
Definition: namereplacer.py:23
Vec forces(Box &box)
Definition: interaction.hpp:792
Definition: interaction.hpp:607
A pointer to an Atom.
Definition: box.hpp:247
AtomID a1
Definition: interaction.hpp:641
uint size() const
Definition: interaction.hpp:563
flt sigcut
Definition: interaction.hpp:937
AtomGroup * g1
Definition: interaction.hpp:482
flt max_size()
Definition: interaction.hpp:1326
Definition: interaction.hpp:1951
flt energy(Box &box)
Definition: interaction.hpp:1408
Truncated and shifted Lennard-Jones, in the form .
Definition: interaction.hpp:861
flt sig
Definition: interaction.hpp:1067
unsigned long long contacts(Box &box)
number of Atom pairs with E != 0
Definition: interaction.hpp:1792
IEpsSigCutAtom(AtomID a, vector< flt > epsilons, uint indx, flt sigma, flt cut)
Definition: interaction.hpp:887
void set_forces(Box &box)
Definition: interaction.hpp:1653
Vec forces(Box &box)
Definition: interaction.hpp:1047
Spring(const flt k, const flt x0)
Definition: interaction.hpp:270
Definition: interaction.hpp:1988
AtomID a3
Definition: interaction.hpp:641
const unsigned int cuint
Definition: box.hpp:13
SCAtomVec(uint N, flt mass)
Definition: interaction.hpp:2125
EpsSigExpDragAtom(AtomID a, flt eps, flt sigma, flt gamma, flt exponent=2.5)
Definition: interaction.hpp:1322
vector< flt > Fs
Definition: interaction.hpp:397
Vec diff(Vec r1, Vec r2, array< int, NDIM > boxes)
Definition: interaction.hpp:2067
EisMclachlanAtom(AtomID a, flt dist, flt sigmai)
Definition: interaction.hpp:1157