You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Seems to be an issue with loading certain GMSO style xmls, which may be created from an older version of GMSO that provided less information than the current implementations assume.
dict_values([unyt_quantity(0.6276, '1.660538921e-21*J'), unyt_quantity(1.8828, '1.660538921e-21*J'), unyt_quantity(0., '1.660538921e-21*J'), unyt_quantity(-3.21331, '1.660538921e-21*J'), unyt_quantity(0., '1.660538921e-21*J'), unyt_quantity(0., '1.660538921e-21*J')])
dict_values([[unyt_quantity(0., '1000.0*J')], [unyt_quantity(1., '(dimensionless)')], [unyt_quantity(0., '0.0174532925199433*rad')]])
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
Input In [21], in <module>
----> 1 ff.to_xml("tmp.xml")
File ~/Dropbox/Mac/Documents/Vanderbilt/Research/MoSDeF/gmso/gmso/core/forcefield.py:578, in ForceField.to_xml(self, filename, overwrite)
576 params_units_def = {}
577 for param, value in potential.parameters.items():
--> 578 params_units_def[param] = value.units
579 etree.SubElement(
580 potential_group,
581 "ParametersUnitDef",
(...)
585 },
586 )
588 potential_group.append(potential.etree(params_units_def))
AttributeError: 'list' object has no attribute 'units'
As you can see, the charmm_proper_1 style are being stored as a list of lists, instead of as a list of unyts (this is the second dihedral in the output, as compared to the first one which is stored correctly).
The text was updated successfully, but these errors were encountered:
So I think this issue can be readdressed once PR #674 is merged. Essentially the issue is the lists of allowed parameters, which are read properly but not written out properly.
Seems to be an issue with loading certain GMSO style xmls, which may be created from an older version of GMSO that provided less information than the current implementations assume.
Code to reproduce the bug:
Output:
As you can see, the charmm_proper_1 style are being stored as a list of lists, instead of as a list of unyts (this is the second dihedral in the output, as compared to the first one which is stored correctly).
The text was updated successfully, but these errors were encountered: