"...ssh:/git@developer.sourcefind.cn:2222/tsoc/openmm.git" did not exist on "9a08d9bee663577c5e169330ad9710101b6eaf49"
Commit ffdce362 authored by peastman's avatar peastman
Browse files

Created Python API for ring polymer contraction

parent 8656e3ba
...@@ -31,6 +31,7 @@ namespace std { ...@@ -31,6 +31,7 @@ namespace std {
%template(vectorstring) vector<string>; %template(vectorstring) vector<string>;
%template(mapstringstring) map<string,string>; %template(mapstringstring) map<string,string>;
%template(mapstringdouble) map<string,double>; %template(mapstringdouble) map<string,double>;
%template(mapii) map<int,int>;
}; };
%include "windows.i" %include "windows.i"
......
...@@ -446,5 +446,6 @@ UNITS = { ...@@ -446,5 +446,6 @@ UNITS = {
("DrudeLangevinIntegrator", "getDrudeTemperature") : ("unit.kelvin", ()), ("DrudeLangevinIntegrator", "getDrudeTemperature") : ("unit.kelvin", ()),
("DrudeLangevinIntegrator", "getDrudeFriction") : ("1/unit.picosecond", ()), ("DrudeLangevinIntegrator", "getDrudeFriction") : ("1/unit.picosecond", ()),
("DrudeSCFIntegrator", "getMinimizationErrorTolerance") : ("unit.kilojoules_per_mole/unit.nanometer", ()), ("DrudeSCFIntegrator", "getMinimizationErrorTolerance") : ("unit.kilojoules_per_mole/unit.nanometer", ()),
("RPMDIntegrator", "getContractions") : (None, ()),
} }
...@@ -282,16 +282,9 @@ def stripUnits(args): ...@@ -282,16 +282,9 @@ def stripUnits(args):
# JDC: End workaround. # JDC: End workaround.
#arg=arg.value_in_unit_system(unit.md_unit_system) #arg=arg.value_in_unit_system(unit.md_unit_system)
elif isinstance(arg, dict): elif isinstance(arg, dict):
newArg = {} newKeys = stripUnits(arg.keys())
for key in arg: newValues = stripUnits(arg.values())
newKey = key arg = dict(zip(newKeys, newValues))
newValue = arg[key]
if not _is_string(newKey):
newKey = stripUnits(newKey)
if not _is_string(newValue):
newValue = stripUnits(newValue)
newArg[newKey] = newValue
arg = newArg
elif not _is_string(arg): elif not _is_string(arg):
try: try:
iter(arg) iter(arg)
......
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