Skip to content

Commit

Permalink
fix unit bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Wen Yan committed Dec 12, 2022
1 parent da8346c commit 84d0143
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/evaluator_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,10 +308,6 @@ def _parameter_value_from_gradient_key(self, gradient_key):
bool
Returns True if the parameter is a cosmetic one.
"""
try:
import openmm.unit as simtk_unit
except ImportError:
import simtk.unit as simtk_unit

parameter_handler = self.FF.openff_forcefield.get_parameter_handler(
gradient_key.tag
Expand Down Expand Up @@ -350,10 +346,7 @@ def _parameter_value_from_gradient_key(self, gradient_key):
):
is_cosmetic = True

if not isinstance(parameter_value, simtk_unit.Quantity):
parameter_value = parameter_value * simtk_unit.dimensionless

return openmm_quantity_to_pint(parameter_value), is_cosmetic
return parameter_value, is_cosmetic

def _extract_physical_parameter_values(self):
"""Extracts an array of the values of the physical parameters
Expand Down

0 comments on commit 84d0143

Please sign in to comment.