if (ir->nstcomm > 0)
sys->addForce(new CMMotionRemover(ir->nstcomm));
- // Set bonded force field terms.
+ /* Set bonded force field terms. */
const int* bondAtoms = (int*) idef.il[F_BONDS].iatoms;
HarmonicBondForce* bondForce = new HarmonicBondForce();
sys->addForce(bondForce);
bondForce->addBond(atom1, atom2,
idef.iparams[type].harmonic.rA, idef.iparams[type].harmonic.krA);
}
- // Urey-Bradley includes both the angle and bond potential for 1-3 interactions
+
+ /* Urey-Bradley includes both the angle and bond potential for 1-3 interactions */
const int* ubAtoms = (int*) idef.il[F_UREY_BRADLEY].iatoms;
HarmonicBondForce* ubBondForce = new HarmonicBondForce();
HarmonicAngleForce* ubAngleForce = new HarmonicAngleForce();
ubAngleForce->addAngle(atom1, atom2, atom3,
idef.iparams[type].u_b.theta*M_PI/180.0, idef.iparams[type].u_b.ktheta);
}
+
+ /* Set the angle force field terms */
const int* angleAtoms = (int*) idef.il[F_ANGLES].iatoms;
HarmonicAngleForce* angleForce = new HarmonicAngleForce();
sys->addForce(angleForce);
angleForce->addAngle(atom1, atom2, atom3,
idef.iparams[type].harmonic.rA*M_PI/180.0, idef.iparams[type].harmonic.krA);
}
+
+ /* Set proper dihedral terms */
const int* periodicAtoms = (int*) idef.il[F_PDIHS].iatoms;
PeriodicTorsionForce* periodicForce = new PeriodicTorsionForce();
sys->addForce(periodicForce);
idef.iparams[type].pdihs.phiA*M_PI/180.0,
idef.iparams[type].pdihs.cpA);
}
+
+ /* Set improper dihedral terms that are represented by a periodic function (as in AMBER FF) */
const int* periodicImproperAtoms = (int*) idef.il[F_PIDIHS].iatoms;
PeriodicTorsionForce* periodicImproperForce = new PeriodicTorsionForce();
sys->addForce(periodicImproperForce);
idef.iparams[type].pdihs.phiA*M_PI/180.0,
idef.iparams[type].pdihs.cpA);
}
+
+ /* Ryckaert-Bellemans dihedrals */
const int* rbAtoms = (int*) idef.il[F_RBDIHS].iatoms;
RBTorsionForce* rbForce = new RBTorsionForce();
sys->addForce(rbForce);
idef.iparams[type].rbdihs.rbcA[4], idef.iparams[type].rbdihs.rbcA[5]);
}
+ /* Set improper dihedral terms (as in CHARMM FF) */
const int* improperDihAtoms = (int*) idef.il[F_IDIHS].iatoms;
CustomTorsionForce* improperDihForce = new CustomTorsionForce("2.0*k*asin(sin((theta-theta0)/2))^2");
sys->addForce(improperDihForce);
improperDihParameters);
}
- // Set nonbonded parameters and masses.
+ /* Set nonbonded parameters and masses. */
int ntypes = fr->ntype;
int* types = mdatoms->typeA;
real* nbfp = fr->nbfp;