-
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
Cassandra gmso #756
Cassandra gmso #756
Conversation
* Add fixed angle support * Fix charge sign error (gmso-wide) * Update ring identification to handle fused systems (mbuild mosdef-hub#744) * Increase floating point accuracy * Increase element type length and atom type length * Correctly write atom indices for bonds/angles/dihedrals/impropers
for more information, see https://pre-commit.ci
* Modify dihedral constant indexing from k0 to k3 to k1 to k4 in the OPLSTorsionPotential template.
* Updated from old Mie Xenon test to OPLS ethane. * Remove assertions related to n and m parameters of the Mie potential. * Fix floating point format issues in MCF writer.
for more information, see https://pre-commit.ci
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #756 +/- ##
==========================================
+ Coverage 91.99% 92.82% +0.83%
==========================================
Files 66 66
Lines 6806 6845 +39
==========================================
+ Hits 6261 6354 +93
+ Misses 545 491 -54
☔ View full report in Codecov by Sentry. |
This test is not complete yet. The 1/2 factor in the angles and OPLS dihedral is not accounted for.
Co-authored-by: Co Quach <[email protected]>
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.
Looking good, thanks for getting on this Eliseo. I think a few changes to use more of the GMSO functionality that's there will help speed this up a lot. Also need a few tests for things we expect to fail.
In terms of just getting a single one of each molecule, here is something you can use. It could be a method just in the mcf writer, or something that's a method for the subtopsList = []
for molecule in top.unique_site_labels(name_only=True):
subtopsList.append(top.create_subtop("molecule", (molecule, 1))) |
Is there any way to add a test that tests that the mcf files can actually be read into Cassandra. Something like the tests for the hoomd simulation in We probably also need to test MCF for an array of forcefields or molecules types. |
I think since canssandra is conda installable, we should be able to run a short sim (through mosdef_cassandra probably) to confirm the file written out is correctly formatted. |
I am pulling this PR for local testing. At first test, things seem to write out as expected (through inspection of the mcf file), however, there might some performance, as in it takes 8s to write out a system of one ethanol. I am doing some profiling right now and going through the code to see if there is something can be sped up. I might try to add some test, i.e., running a cassandra simulation, but since I can't install cassandra locally (there isn't a ARM distribution), it might or might not work. |
Hi @emarinri, can you check and confirm the conversion of
while the Cassandra forcefield is using 𝐸𝜙=𝑎0+𝑎1(1+cos(𝜙))+𝑎2(1−cos(2𝜙))+𝑎3(1+cos(3𝜙)) However, the |
for more information, see https://pre-commit.ci
…o cassandra-gmso
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.
Adding the tests to read it into cassandra itself look pretty good. I think there's probably more edge cases to add, but we may have to add them as they come. Some of these test are going to be covered more in the mosdef_cassandra
package as well.
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.
I think this is a good wrapping up point for this PR unless you want to add in more stuff @emarinri.
# TODO: not sure why the cassandra MCF writer of mBuild | ||
# outputs a different intramolecular exclusions relative | ||
# to the GMSO writer. This is a temporary fix to make the | ||
# test pass. We should investigate this further. | ||
# Also, try to use the function top.set_lj_scale() and see how | ||
# to update subtopologies. |
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.
Is this something we need to look into now?
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.
I do not think this is something we have to worry about for now.
@daico007 I agree this is a point where we can wrap this up for now. As you mentioned, there are a few more things to be tested for should be OK for the short term. |
The goal of this PR is to finish up the MCF writer of GMSO originally started by #560