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