-
Notifications
You must be signed in to change notification settings - Fork 33
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
writing out pairs section of top file #714
Conversation
So it looks like you just need to update the testing comparison files to be the ones that now include pairs (and some minor changes to formatting re: tabs). I did some hand validation of benzene and it looks correct. On a similar note, this only works with gen-pairs = yes . We should probably have a separate PR later that allows these to be explicitly written out (i.e., with parameters as well). If we are using something like CHARMM, there are cases where we will use different parameters explicitly for certain 1-4 parameters. I assume this would require adding in a new data structure in topology. |
I will update the tests at some point this week! Also agree with you on |
…into top_pairs_section
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #714 +/- ##
==========================================
+ Coverage 92.24% 92.27% +0.02%
==========================================
Files 65 65
Lines 5856 5890 +34
==========================================
+ Hits 5402 5435 +33
- Misses 454 455 +1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
Test files have been updated and all the tests is passing now. |
This looks good! We should probably have another discussion about what is the best way to check the output files so that we can have consistency across the writer tests. This could potentially also be related to the stress testing suite we mentioned, where we have some scripts for the engines that actually try to run what was generated. |
It looks like the generate_pairs function doesn't have a direct test (only indirect via what is written to file). It would probably be good to add that before we merge. |
I have some additional tests for this PR (not pushed yet), basically writing out and comparing the new files against some reference files. |
More sorting in the identify_connection step. Add more rigorous unit testing (exact file comparison).
@@ -5,7 +5,8 @@ | |||
|
|||
import gmso | |||
from gmso.exceptions import EngineIncompatibilityError | |||
from gmso.formats.top import write_top | |||
from gmso.external.convert_mbuild import from_mbuild | |||
from gmso.formats.top import _generate_pairs_list, write_top |
Check notice
Code scanning / CodeQL
Unused import
@chrisiacovella, I added more unit tests (include the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good!
I just realized the
top.py
is not writing out the[ pairs ]
sections in the.top
file, which result in the loss of 1-4 interactions (vdw and electrostatics). This PR adds worker method to write out that section.