"vscode:/vscode.git/clone" did not exist on "ff6a4830162880da66b181c26166459e7e761aa1"
Commit 4ca69ecc authored by Peter Eastman's avatar Peter Eastman
Browse files

Fixed Python API builder to handle CustomIntegrator

parent 50154b8b
......@@ -42,6 +42,7 @@
#include "openmm/CustomExternalForce.h"
#include "openmm/CustomGBForce.h"
#include "openmm/CustomHbondForce.h"
#include "openmm/CustomIntegrator.h"
#include "openmm/CustomNonbondedForce.h"
#include "openmm/Force.h"
#include "openmm/GBSAOBCForce.h"
......
......@@ -392,12 +392,13 @@ class SwigInputBuilder:
key=(shortClassName, methName)
#print "key %s %s \n" % (shortClassName, methName)
addText=''
returnType = getText("type", memberNode)
if key in self.configModule.UNITS:
valueUnits=self.configModule.UNITS[key]
elif ("*", methName) in self.configModule.UNITS:
valueUnits=self.configModule.UNITS[("*", methName)]
elif methName.startswith('get'):
elif methName.startswith('get') and returnType not in ('void', 'int', 'std::string'):
s = 'do not know how to add units to %s::%s' \
% (shortClassName, methName)
raise Exception(s)
......
......@@ -102,6 +102,7 @@ SKIP_METHODS = [('State',),
('IntegrateVariableLangevinStepKernel',),
('IntegrateVariableVerletStepKernel',),
('IntegrateVerletStepKernel',),
('IntegrateCustomStepKernel',),
('Kernel',),
('KernelFactory',),
('KernelImpl',),
......@@ -187,6 +188,7 @@ UNITS = {
("*", "getErrorTolerance") : (None, ()),
("*", "getEwaldErrorTolerance") : (None, ()),
("*", "getFriction") : ("1/unit.picosecond", ()),
("*", "getGlobalVariable") : (None, ()),
("*", "getIntegrator") : (None, ()),
("*", "getMapParameters") : (None, ()),
("*", "getName") : (None, ()),
......
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