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

Modify XML parsing order of general forcefield #488

Merged
merged 10 commits into from
Feb 11, 2022

Conversation

daico007
Copy link
Member

PR Summary:

Add validation step to perform XML conversion only if foyer XML is provided (else load directly by gmso).

PR Checklist


  • Includes appropriate unit test(s)
  • Appropriate docstring(s) are added/updated
  • Code is (approximately) PEP8 compliant
  • Issue(s) raised/addressed?

Add validation step to perform XML conversion only if foyer XML is provided
@lgtm-com
Copy link
Contributor

lgtm-com bot commented Dec 13, 2021

This pull request introduces 2 alerts when merging d2556f8 into 60a738d - view on LGTM.com

new alerts:

  • 1 for Except block handles 'BaseException'
  • 1 for Unused import

@lgtm-com
Copy link
Contributor

lgtm-com bot commented Dec 13, 2021

This pull request introduces 2 alerts when merging 4614ac1 into ab1d755 - view on LGTM.com

new alerts:

  • 1 for Except block handles 'BaseException'
  • 1 for Unused import

@codecov
Copy link

codecov bot commented Dec 14, 2021

Codecov Report

Merging #488 (11c144c) into master (11c144c) will not change coverage.
The diff coverage is n/a.

❗ Current head 11c144c differs from pull request most recent head d671664. Consider uploading reports for the commit d671664 to get more accurate results

@@           Coverage Diff           @@
##           master     #488   +/-   ##
=======================================
  Coverage   73.63%   73.63%           
=======================================
  Files          17       17           
  Lines        1866     1866           
=======================================
  Hits         1374     1374           
  Misses        492      492           

@lgtm-com
Copy link
Contributor

lgtm-com bot commented Dec 14, 2021

This pull request introduces 2 alerts when merging d1a96c0 into ab1d755 - view on LGTM.com

new alerts:

  • 1 for Except block handles 'BaseException'
  • 1 for Unused import

@lgtm-com
Copy link
Contributor

lgtm-com bot commented Dec 14, 2021

This pull request introduces 2 alerts when merging e35e444 into ab1d755 - view on LGTM.com

new alerts:

  • 1 for Except block handles 'BaseException'
  • 1 for Unused import

@lgtm-com
Copy link
Contributor

lgtm-com bot commented Dec 21, 2021

This pull request introduces 2 alerts when merging ec171c8 into ab1d755 - view on LGTM.com

new alerts:

  • 1 for Except block handles 'BaseException'
  • 1 for Unused import

@chrisiacovella chrisiacovella self-assigned this Jan 18, 2022
@lgtm-com
Copy link
Contributor

lgtm-com bot commented Feb 1, 2022

This pull request introduces 2 alerts when merging 8ee6f5f into c5802ba - view on LGTM.com

new alerts:

  • 1 for Except block handles 'BaseException'
  • 1 for Unused import

Copy link

@bc118 bc118 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested this on GOMC-GMSO-MoSDeF and it seems to have fixed the issue.

from_foyer_xml(
foyer_xml=str(file),
gmso_xml=str(tempfile.name),
overwrite=True,
)
tmp_processed_files.append(tempfile.name)
except Exception:
except:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be a ValidationError? That's what it seems like the Validator is setup to raise, see line in validator.py. Might be better to not raise such a general exception, unless there are other errors that might arise from the validation.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The current foyer validator is more to check if an atom type is provided provide a malformed SMARTS, or is missing a nonbonded, etc. Trying to validating a GMSO XML will raise error, but not ValidationError, more like XML parsing error (This element is not expected). So I think having a general catch here is ok, since if there is any other issues, it would be raised by the GMSO validator.

@lgtm-com
Copy link
Contributor

lgtm-com bot commented Feb 7, 2022

This pull request introduces 2 alerts when merging b1f0271 into 11c144c - view on LGTM.com

new alerts:

  • 1 for Except block handles 'BaseException'
  • 1 for Unused import

@lgtm-com
Copy link
Contributor

lgtm-com bot commented Feb 7, 2022

This pull request introduces 2 alerts when merging d671664 into 11c144c - view on LGTM.com

new alerts:

  • 1 for Except block handles 'BaseException'
  • 1 for Unused import

@daico007 daico007 merged commit e847d01 into mosdef-hub:master Feb 11, 2022
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

Successfully merging this pull request may close these issues.

4 participants