Commit df20dcac authored by Jason Swails's avatar Jason Swails
Browse files

Get the out of plane bend taylor coefficient units sorted out.

parent 1644cc45
...@@ -74,7 +74,7 @@ public: ...@@ -74,7 +74,7 @@ public:
* *
* @return global cubicK term * @return global cubicK term
*/ */
double getAmoebaGlobalOutOfPlaneBendCubic(void) const; double getAmoebaGlobalOutOfPlaneBendCubic() const;
/** /**
* Set the global cubic term * Set the global cubic term
...@@ -88,7 +88,7 @@ public: ...@@ -88,7 +88,7 @@ public:
* *
* @return global quartic term * @return global quartic term
*/ */
double getAmoebaGlobalOutOfPlaneBendQuartic(void) const; double getAmoebaGlobalOutOfPlaneBendQuartic() const;
/** /**
* Set the global pentic term * Set the global pentic term
...@@ -102,7 +102,7 @@ public: ...@@ -102,7 +102,7 @@ public:
* *
* @return global penticK term * @return global penticK term
*/ */
double getAmoebaGlobalOutOfPlaneBendPentic(void) const; double getAmoebaGlobalOutOfPlaneBendPentic() const;
/** /**
* Set the global sextic term * Set the global sextic term
...@@ -116,7 +116,7 @@ public: ...@@ -116,7 +116,7 @@ public:
* *
* @return global sexticK term * @return global sexticK term
*/ */
double getAmoebaGlobalOutOfPlaneBendSextic(void) const; double getAmoebaGlobalOutOfPlaneBendSextic() const;
/** /**
* Add an out-of-plane bend term to the force field. * Add an out-of-plane bend term to the force field.
......
...@@ -481,7 +481,6 @@ class SwigInputBuilder: ...@@ -481,7 +481,6 @@ class SwigInputBuilder:
sys.stdout.write("%s.%s() returns %s\n" % sys.stdout.write("%s.%s() returns %s\n" %
(shortClassName, methName, valueUnits[0])) (shortClassName, methName, valueUnits[0]))
if len(valueUnits[1])>0: if len(valueUnits[1])>0:
print('IT IS GREATER THAN 1')
addText = "%s%sval[%d]=unit.Quantity(val[%d], %s)\n" \ addText = "%s%sval[%d]=unit.Quantity(val[%d], %s)\n" \
% (addText, INDENT, % (addText, INDENT,
index, index, index, index,
...@@ -492,10 +491,10 @@ class SwigInputBuilder: ...@@ -492,10 +491,10 @@ class SwigInputBuilder:
% (addText, INDENT, valueUnits[0]) % (addText, INDENT, valueUnits[0])
for vUnit in valueUnits[1]: for vUnit in valueUnits[1]:
if vUnit!=None: if vUnit is not None:
addText = "%s%sval[%s]=unit.Quantity(val[%s], %s)\n" \ addText = "%s%sval[%s]=unit.Quantity(val[%s], %s)\n" \
% (addText, INDENT, index, index, vUnit) % (addText, INDENT, index, index, vUnit)
index+=1 index+=1
if key in self.configModule.STEAL_OWNERSHIP: if key in self.configModule.STEAL_OWNERSHIP:
for argNum in self.configModule.STEAL_OWNERSHIP[key]: for argNum in self.configModule.STEAL_OWNERSHIP[key]:
......
...@@ -272,7 +272,7 @@ UNITS = { ...@@ -272,7 +272,7 @@ UNITS = {
("AmoebaOutOfPlaneBendForce", "getAmoebaGlobalOutOfPlaneBendQuartic") : ( '1/unit.radian**2',()), ("AmoebaOutOfPlaneBendForce", "getAmoebaGlobalOutOfPlaneBendQuartic") : ( '1/unit.radian**2',()),
("AmoebaOutOfPlaneBendForce", "getAmoebaGlobalOutOfPlaneBendPentic") : ( '1/unit.radian**3',()), ("AmoebaOutOfPlaneBendForce", "getAmoebaGlobalOutOfPlaneBendPentic") : ( '1/unit.radian**3',()),
("AmoebaOutOfPlaneBendForce", "getAmoebaGlobalOutOfPlaneBendSextic") : ( '1/unit.radian**4',()), ("AmoebaOutOfPlaneBendForce", "getAmoebaGlobalOutOfPlaneBendSextic") : ( '1/unit.radian**4',()),
("AmoebaOutOfPlaneBendForce", "getOutOfPlaneBendParameters") : ( None, (None, None, None, None, 'unit.kilojoule_per_mole')), ("AmoebaOutOfPlaneBendForce", "getOutOfPlaneBendParameters") : ( None, (None, None, None, None, 'unit.kilojoule_per_mole/unit.radians**2')),
("AmoebaPiTorsionForce", "getNumPiTorsions") : ( None, ()), ("AmoebaPiTorsionForce", "getNumPiTorsions") : ( None, ()),
("AmoebaPiTorsionForce", "getPiTorsionParameters") : ( None, (None, None, None, None, None, None, 'unit.kilojoule_per_mole')), ("AmoebaPiTorsionForce", "getPiTorsionParameters") : ( None, (None, None, None, None, None, None, 'unit.kilojoule_per_mole')),
......
...@@ -711,16 +711,16 @@ class TestAPIUnits(unittest.TestCase): ...@@ -711,16 +711,16 @@ class TestAPIUnits(unittest.TestCase):
self.assertEqual(j, 1) self.assertEqual(j, 1)
self.assertEqual(k, 2) self.assertEqual(k, 2)
self.assertEqual(l, 3) self.assertEqual(l, 3)
self.assertEqual(tk, 1.0*kilojoules_per_mole) self.assertEqual(tk, 1.0*kilojoules_per_mole/radians**2)
self.assertIs(tk.unit, kilojoules_per_mole) self.assertIs(tk.unit, kilojoules_per_mole/radians**2)
i, j, k, l, tk = force.getOutOfPlaneBendParameters(1) i, j, k, l, tk = force.getOutOfPlaneBendParameters(1)
self.assertEqual(i, 1) self.assertEqual(i, 1)
self.assertEqual(j, 2) self.assertEqual(j, 2)
self.assertEqual(k, 3) self.assertEqual(k, 3)
self.assertEqual(l, 4) self.assertEqual(l, 4)
self.assertEqual(tk, 1.0*kilocalorie_per_mole) self.assertEqual(tk, 1.0*kilocalorie_per_mole/radians**2)
self.assertIs(tk.unit, kilojoules_per_mole) self.assertIs(tk.unit, kilojoules_per_mole/radians**2)
if __name__ == '__main__': if __name__ == '__main__':
unittest.main() unittest.main()
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