Commit 07adfcbc authored by Peter Eastman's avatar Peter Eastman
Browse files

Modified OpenMM to use nm and kJ as units instead of angstroms and kcal

parent 9f0086f3
......@@ -60,7 +60,7 @@ public:
*
* @param index the index of the atom for which to get parameters
* @param charge the charge of the atom, measured in units of the proton charge
* @param radius the GBSA radius of the atom, measured in angstroms
* @param radius the GBSA radius of the atom, measured in nm
* @param scalingFactor the OBC scaling factor for the atom
*/
void getAtomParameters(int index, double& charge, double& radius, double& scalingFactor) const;
......@@ -69,7 +69,7 @@ public:
*
* @param index the index of the atom for which to set parameters
* @param charge the charge of the atom, measured in units of the proton charge
* @param radius the GBSA radius of the atom, measured in angstroms
* @param radius the GBSA radius of the atom, measured in nm
* @param scalingFactor the OBC scaling factor for the atom
*/
void setAtomParameters(int index, double charge, double radius, double scalingFactor);
......
......@@ -110,14 +110,14 @@ public:
*/
void setTime(double time);
/**
* Set the positions of all atoms in the System (measured in angstroms).
* Set the positions of all atoms in the System (measured in nm).
*
* @param a vector whose length equals the number of atoms in the System. The i'th element
* contains the position of the i'th atom.
*/
void setPositions(const std::vector<Vec3>& positions);
/**
* Set the velocities of all atoms in the System (measured in angstroms/picosecond).
* Set the velocities of all atoms in the System (measured in nm/picosecond).
*
* @param a vector whose length equals the number of atoms in the System. The i'th element
* contains the velocity of the i'th atom.
......
......@@ -95,8 +95,8 @@ public:
*
* @param index the index of the atom for which to get parameters
* @param charge the charge of the atom, measured in units of the proton charge
* @param radius the van der Waals radius of the atom, measured in angstroms
* @param depth the well depth of the van der Waals interaction, measured in kcal/mol
* @param radius the van der Waals radius of the atom, measured in nm
* @param depth the well depth of the van der Waals interaction, measured in kJ/mol
*/
void getAtomParameters(int index, double& charge, double& radius, double& depth) const;
/**
......@@ -104,8 +104,8 @@ public:
*
* @param index the index of the atom for which to set parameters
* @param charge the charge of the atom, measured in units of the proton charge
* @param radius the van der Waals radius of the atom (sigma in the Lennard Jones potential), measured in angstroms
* @param depth the well depth of the van der Waals interaction (epsilon in the Lennard Jones potential), measured in kcal/mol
* @param radius the van der Waals radius of the atom (sigma in the Lennard Jones potential), measured in nm
* @param depth the well depth of the van der Waals interaction (epsilon in the Lennard Jones potential), measured in kJ/mol
*/
void setAtomParameters(int index, double charge, double radius, double depth);
/**
......@@ -114,7 +114,7 @@ public:
* @param index the index of the bond for which to get parameters
* @param atom1 the index of the first atom connected by the bond
* @param atom2 the index of the second atom connected by the bond
* @param length the equilibrium length of the bond, measured in angstroms
* @param length the equilibrium length of the bond, measured in nm
* @param k the harmonic force constant for the bond
*/
void getBondParameters(int index, int& atom1, int& atom2, double& length, double& k) const;
......@@ -124,7 +124,7 @@ public:
* @param index the index of the bond for which to set parameters
* @param atom1 the index of the first atom connected by the bond
* @param atom2 the index of the second atom connected by the bond
* @param length the equilibrium length of the bond, measured in angstroms
* @param length the equilibrium length of the bond, measured in nm
* @param k the harmonic force constant for the bond
*/
void setBondParameters(int index, int atom1, int atom2, double length, double k);
......
......@@ -98,7 +98,7 @@ public:
* @param index the index of the constraint for which to get parameters
* @param atom1 the index of the first atom involved in the constraint
* @param atom2 the index of the second atom involved in the constraint
* @param distance the required distance between the two atoms, measured in angstroms
* @param distance the required distance between the two atoms, measured in nm
*/
void getConstraintParameters(int index, int& atom1, int& atom2, double& distance) const;
/**
......@@ -107,7 +107,7 @@ public:
* @param index the index of the constraint for which to set parameters
* @param atom1 the index of the first atom involved in the constraint
* @param atom2 the index of the second atom involved in the constraint
* @param distance the required distance between the two atoms, measured in angstroms
* @param distance the required distance between the two atoms, measured in nm
*/
void setConstraintParameters(int index, int atom1, int atom2, double distance);
/**
......
......@@ -132,11 +132,11 @@ public:
*/
void calcForces();
/**
* Calculate the kinetic energy of the system (in kcal/mol).
* Calculate the kinetic energy of the system (in kJ/mol).
*/
double calcKineticEnergy();
/**
* Calculate the potential energy of the system (in kcal/mol).
* Calculate the potential energy of the system (in kJ/mol).
*/
double calcPotentialEnergy();
/**
......
......@@ -231,7 +231,7 @@ void ReferenceCalcGBSAOBCForceFieldKernel::initialize(const vector<vector<double
scaleFactors[i] = atomParameters[i][2];
}
ObcParameters* obcParameters = new ObcParameters(numAtoms, ObcParameters::ObcTypeII);
obcParameters->setAtomicRadii(atomicRadii, SimTKOpenMMCommon::KcalAngUnits);
obcParameters->setAtomicRadii(atomicRadii, SimTKOpenMMCommon::MdUnits);
obcParameters->setScaledRadiusFactors(scaleFactors);
obcParameters->setSolventDielectric(solventDielectric);
obcParameters->setSoluteDielectric(soluteDielectric);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment