Skip to content

Commit

Permalink
Replace unyt.amu with Unit("amu") to perserve mass values from mB…
Browse files Browse the repository at this point in the history
…uild (#759)

* Fix amu unit usage from Unyt

* remove commented out line

* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
chrisjonesBSU and pre-commit-ci[bot] authored Sep 4, 2023
1 parent 5f98454 commit d584ffa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gmso/external/convert_mbuild.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import numpy as np
import unyt as u
from boltons.setutils import IndexedSet
from unyt import Unit

from gmso.core.atom import Atom
from gmso.core.bond import Bond
Expand Down Expand Up @@ -271,7 +272,7 @@ def _parse_site(site_map, particle, search_method, infer_element=False):
ele = search_method(particle.name) if infer_element else None

charge = particle.charge * u.elementary_charge if particle.charge else None
mass = particle.mass * u.amu if particle.mass else None
mass = particle.mass * Unit("amu") if particle.mass else None

site = Atom(
name=particle.name,
Expand Down

0 comments on commit d584ffa

Please sign in to comment.