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