Unverified Commit 98c5b31b authored by Peter Eastman's avatar Peter Eastman Committed by GitHub
Browse files

Strip units from customgbforce args (#3579)

parent 0dab10f5
...@@ -6,7 +6,7 @@ Simbios, the NIH National Center for Physics-Based Simulation of ...@@ -6,7 +6,7 @@ Simbios, the NIH National Center for Physics-Based Simulation of
Biological Structures at Stanford, funded under the NIH Roadmap for Biological Structures at Stanford, funded under the NIH Roadmap for
Medical Research, grant U54 GM072970. See https://simtk.org. Medical Research, grant U54 GM072970. See https://simtk.org.
Portions copyright (c) 2012-2016 University of Virginia and the Authors. Portions copyright (c) 2012-2022 University of Virginia and the Authors.
Authors: Christoph Klein, Michael R. Shirts Authors: Christoph Klein, Michael R. Shirts
Contributors: Jason M. Swails, Peter Eastman, Justin L. MacCallum Contributors: Jason M. Swails, Peter Eastman, Justin L. MacCallum
...@@ -357,6 +357,8 @@ def _createEnergyTerms(force, solventDielectric, soluteDielectric, SA, cutoff, k ...@@ -357,6 +357,8 @@ def _createEnergyTerms(force, solventDielectric, soluteDielectric, SA, cutoff, k
These are identical for all the GB models. These are identical for all the GB models.
""" """
cutoff = strip_unit(cutoff, u.nanometer)
kappa = strip_unit(kappa, u.nanometer**-1)
params = "; solventDielectric=%.16g; soluteDielectric=%.16g; kappa=%.16g; offset=%.16g" % (solventDielectric, soluteDielectric, kappa, offset) params = "; solventDielectric=%.16g; soluteDielectric=%.16g; kappa=%.16g; offset=%.16g" % (solventDielectric, soluteDielectric, kappa, offset)
if cutoff is not None: if cutoff is not None:
params += "; cutoff=%.16g" % cutoff params += "; cutoff=%.16g" % cutoff
......
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