mosdef-hub / foyer

A package for atom-typing as well as applying and disseminating forcefields
https://foyer.mosdef.org
MIT License
117 stars 76 forks source link

update xml_writer for improper dihedral (for example, EMIM+ using GAFF) #477

Open XiaoboLinlin opened 2 years ago

XiaoboLinlin commented 2 years ago

PR Summary:

xml_writer.py produce error for improper dihedral in GAFF force field for EMIM+, and this pull request will solve it. Specially, I was trying to produce XML file from the parmed structure imported from the GAFF server, but it produced error for EMIM+.The issue is that we need to use like dihedral.type[0].per to get the values in .per for dihedral (improper). For normal dihedral function, we don't need the "[0]".

PR Checklist


lgtm-com[bot] commented 2 years ago

This pull request introduces 1 alert when merging 107f137e4f90dc7169ff6ad6f2ecbe76f7350bc6 into 5fed7d3d4f6f6b46412f9e6d9e2dd0d442e8e398 - view on LGTM.com

new alerts:

codecov[bot] commented 2 years ago

Codecov Report

Merging #477 (5fed7d3) into master (5fed7d3) will not change coverage. The diff coverage is n/a.

:exclamation: Current head 5fed7d3 differs from pull request most recent head 107f137. Consider uploading reports for the commit 107f137 to get more accurate results

@@           Coverage Diff           @@
##           master     #477   +/-   ##
=======================================
  Coverage   73.77%   73.77%           
=======================================
  Files          17       17           
  Lines        1861     1861           
=======================================
  Hits         1373     1373           
  Misses        488      488