Skip to content

Commit

Permalink
Test unit handling in GMSO for standard unit conversion utilities (#747)
Browse files Browse the repository at this point in the history
* Migrate unit handling to gmso/utils/units.py

* Fix extraneous imports move write_out_parameters to units.py

* type on _write
_out_parameters_and_units function

* Add doc string parameters, add tests for individual unit conversions by dimensions

* Update gmso/utils/units.py

Co-authored-by: Co Quach <[email protected]>

* Update gmso/utils/units.py

Co-authored-by: Co Quach <[email protected]>

* Fix staticmethod decorator use

---------

Co-authored-by: Co Quach <[email protected]>
  • Loading branch information
CalCraven and daico007 authored Aug 11, 2023
1 parent 8b639c6 commit 0b9e0c5
Show file tree
Hide file tree
Showing 7 changed files with 818 additions and 383 deletions.
13 changes: 12 additions & 1 deletion gmso/core/topology.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
convert_params_units,
convert_topology_expressions,
)
from gmso.utils.units import GMSO_UnitRegsitry as UnitReg
from gmso.utils.units import GMSO_UnitRegistry as UnitReg

scaling_interaction_idxes = {"12": 0, "13": 1, "14": 2}

Expand Down Expand Up @@ -170,6 +170,17 @@ def __init__(self, name="Topology", box=None):
}

self._unique_connections = {}
self._unit_system = None

@property
def unit_system(self):
"""Return the unyt system of the topology."""
return self._unit_system

@unit_system.setter
def unit_system(self, unit_system):
"""Set the unyt system of the topology."""
self._name = unit_system

@property
def name(self):
Expand Down
Loading

0 comments on commit 0b9e0c5

Please sign in to comment.