-
Notifications
You must be signed in to change notification settings - Fork 80
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
Add WaterCluster testsystem #322
Conversation
Looks like there are some travis failures:
|
I've checked in a fix for the typo. |
For some reason, the test for
|
Ahh, thanks! Looking at the |
On all 3 Travis builds, it looks like the test that checks whether However, running |
I think that may be the culprit. Conda-upgrading Changes the behavior of import numpy as np
value1 = 300
value2 = 300.00000004
np.isclose(value1, value2, rtol=1e-10, atol=0.0) # True before, False now
np.isclose(value2, value1, rtol=1e-10, atol=0.0) # True before, False now Propose we loosen the test |
Okay that didn't fix it-- the test is still failing on travis but passing locally... Reverting previous commit... |
Revert 7c6bbb9f017ff 029a2b8943c366739b02b41e785
Andrea had recently addressed this here! 00d2df1508000 f8961ba6026d58a2c710f630532
@@ -79,7 +79,8 @@ def test_is_quantity_close(): | |||
(1.01325*unit.bar, 1.01325000006*unit.bar, True), | |||
(1.01325*unit.bar, 1.0132500006*unit.bar, False)] | |||
for quantity1, quantity2, test_result in test_cases: | |||
assert is_quantity_close(quantity1, quantity2) is test_result | |||
msg = "Test failed: ({}, {}, {})".format(quantity1, quantity2, test_result) | |||
assert is_quantity_close(quantity1, quantity2) == test_result, msg |
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.
NICE CATCH! That was driving me crazy.
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.
That was @andrrizzi ! He identified this issue in 00d2df1 and pointed me to the fix.
Addressing Code Climate "Issues to Fix"
Tests pass, should be good to merge. |
Thanks! I'll add to the docs and changelog and then merge. |
Oh! I forgot to do that -- no need for you to do that, I'll update the docs and changelog |
We should really add pull request checklists. I forget all the time too. I'd add the water box here and create a new changelog entry above here called "development snapshot". |
Under both `Clusters and simple fluids` and `Water boxes`
Thanks! |
Suggested by John here: #322 (comment) 8
Creates a few waters in a harmonic restraining potential.
Implementation draws on
WaterBox
andLennardJonesCluster
.This was suggested by @jchodera as a testsystem that would allow a smaller number of water molecules than possible in
WaterBox
.