openforcefield / openff-models

Helper classes for Pydantic compatibility in the OpenFF stack
MIT License
3 stars 2 forks source link

Spurious warning in some cases of processing OpenMM objects #39

Closed mattwthompson closed 8 months ago

mattwthompson commented 8 months ago

With 0.1.2:


In [9]: system = openmm.XmlSerializer.deserialize(open("system.xml").read())

In [10]: ArrayQuantity.validate_type(system.getDefaultPeriodicBoxVectors())
/Users/mattthompson/micromamba/envs/openff-interchange-dev/lib/python3.11/site-packages/pint/compat.py:60: UnitStrippedWarning: The unit of the quantity is stripped when downcasting to ndarray.
  return np.asarray(value)
Out[10]:
array([[2.5, 0. , 0. ],
       [0. , 2.5, 0. ],
       [0. , 0. , 2.5]]) <Unit('nanometer')>