Skip to content

Phasing out OpenMM-unit defaults throughout in favor of Pint-style units #13

@timbernat

Description

@timbernat

Currently, the maths.lattices.bravais.LatticeParameters class, while correctly implemented mathematically and supporting radians or degrees, does not provide support for OpenMM Quanity values for lattice parameters. Additionally, many legacy components of polymerist could be unified by reimplementation via LatticeParameters, rather than bespoke array methods as currently implemented. Namely:

  • LatticeParameters should support length-valued unit vector lengths and angle-valued axial angles. This should be reflected in the "in_degrees" parameter in the angles property
  • lammpstools.lammpseval.get_lammps_unit_cell(): should support return of a LatticeParameters object, rather than just a dict
  • openfftools.boxvectors: similarly, much of the functionality in this module could be supplanted by functionality LatticeParameters already provides

More broadly, the use of OpenMM-style units as defaults throughout this project may in the future be replaced by OpenFF-style units for greater cross-compatibility. This would effect a number of changes including:

  • unitutils.physconsts and unitutils.extraunits : these could be replaced by a Pint-style default setup file for UnitRegistry (see the defaults and constants files in the main Pint repository)
  • mdtools.lammpstools.unitstyles: this would need to be re-implemented with Pint-style units (including many custom CGS/electron-style units not currently supported by OpenFF units)
  • mdtools.openfftools.boxvectors: this would be re-implemented to expect OpenFF units as default, and ideally not even need to breathe a word about OpenMM units (that should be handled by unitutils.interop)

Metadata

Metadata

Assignees

Labels

deprecationPlanned retirement of a module, class, or functionenhancementNew feature or requestexternal dependencyRefactors based on relationship to an outside packageplanned-featureChanges or additons which are planned by the developer(s)

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions