shirtsgroup / InterMol

Conversion tool for molecular simulations
MIT License
186 stars 53 forks source link

Use the ParmEd units module, instead of OpenMM #325

Closed mrshirts closed 7 years ago

mrshirts commented 7 years ago

Will reduce the number of dependences, though we need to see how different they are and any time cost differences (unit conversions do take a lot of the time) to understand how big a chance there will be.

swails commented 7 years ago

parmed.unit is simtk.unit, just repackaged. In fact, if simtk.unit is there it is imported and used instead, which ensures that they can be used with OpenMM (and that OpenMM units are recognized "natively" by ParmEd).

Have a look here: https://github.com/ParmEd/ParmEd/blob/master/parmed/unit/__init__.py#L24-L31

The upside here is that OpenMM doesn't have to be installed to take advantage of their unit package. Also, wherever you import simtk.unit, if you just import parmed.unit instead there will be no further changes necessary.