Closed CalCraven closed 7 months ago
I think I know the source of this issue, it's basically because unyt can by default does u.elementary_charge
but not u.Unit("elementary_charge")
. The workaround is to use the GMSOUnitRegistry
when doing the unit parsing (u.Unit("elementary_charge", registry=GMSO_UnitRegistry().reg_)
). I am working on the similar issue (local branch, but trying pull the PR in the next day or so) for the XML writer, so I can include the fix for this there.
Yep! Got a fix for this and will pull a quick PR.
Seems to be an issue in saving and loading a json GMSO object with charges that are elementary charges.
Code to reproduce issue:
Output