Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
6 tasks
timbernat opened this issue May 17, 2024 · 0 comments
Open
6 tasks
Assignees
Labels
deprecation Planned retirement of a module, class, or function enhancement New feature or request planned-feature Changes or additons which are planned by the developer(s)

Comments

@timbernat
Copy link
Owner

timbernat commented May 17, 2024

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)
@timbernat timbernat added enhancement New feature or request planned-feature Changes or additons which are planned by the developer(s) labels May 17, 2024
@timbernat timbernat self-assigned this May 17, 2024
@timbernat timbernat changed the title Support for OpenMM-style units in LatticeParameters Phasing out OpenMM-unit defaults throughout in favor of Pint-style units Jul 5, 2024
@timbernat timbernat added the deprecation Planned retirement of a module, class, or function label Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deprecation Planned retirement of a module, class, or function enhancement New feature or request planned-feature Changes or additons which are planned by the developer(s)
Projects
None yet
Development

No branches or pull requests

1 participant