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

Error Creating ForceField from GAFF Foyer XML #520

Closed
umesh-timalsina opened this issue Mar 4, 2021 · 2 comments
Closed

Error Creating ForceField from GAFF Foyer XML #520

umesh-timalsina opened this issue Mar 4, 2021 · 2 comments

Comments

@umesh-timalsina
Copy link
Member

I created a gaff gmso XML file using the gaff foyer XML using the following code:

>>> from pathlib import Path
>>> import pkg_resources
>>> from gmso.external.convert_foyer_xml import from_foyer_xml
>>> from_foyer_xml(Path(pkg_resources.resource_filename('antefoyer', 'xml/gaff.xml')).resolve(), overwrite=True)

The file can be accessed here.
And when I try to create a ForceField from the file. I get the following error:

>>> from gmso import ForceField
>>> ff = ForceField('gaff_gmso.xml', strict=False)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/umesh/work/mosdef-hub/gmso/gmso/core/forcefield.py", line 82, in __init__
    ff = ForceField.from_xml(xml_loc, strict, greedy)
  File "/home/umesh/work/mosdef-hub/gmso/gmso/core/forcefield.py", line 509, in from_xml
    child_tag='ImproperType'
  File "/home/umesh/work/mosdef-hub/gmso/gmso/utils/ff_utils.py", line 329, in parse_ff_connection_types
    ctor_kwargs['expression'])
  File "/home/umesh/work/mosdef-hub/gmso/gmso/utils/ff_utils.py", line 63, in _parse_params_values
    'Parameter {} is in units but cannot be found in parameters list'.format(param))
gmso.exceptions.ForceFieldParseError: Parameter delta0 is in units but cannot be found in parameters list
>>> 
@zijiewu3
Copy link
Collaborator

Had similar issues. See #522

@daico007
Copy link
Member

Should have been addressed by #765

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants