-
Notifications
You must be signed in to change notification settings - Fork 744
changing DL_Poly units #4983
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
base: develop
Are you sure you want to change the base?
changing DL_Poly units #4983
Changes from 7 commits
e787218
ad9c571
445ec3a
5585acc
cfa4e25
f11800b
a267752
dc7a2f5
2b8b5bf
b61ae52
eedba55
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -605,4 +605,4 @@ def close(self): | |
| if self.trzfile is None: | ||
| return | ||
| self.trzfile.close() | ||
| self.trzfile = None | ||
| self.trzfile = None | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. just undo |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -70,8 +70,9 @@ def test_velocities(self, ts): | |
| ref = np.array([1.056610291, -1.218664448, 3.345828610]) | ||
| assert_allclose(ts._velocities[0], ref) | ||
|
|
||
| # modified to original numbers / 100 | ||
|
||
| def test_forces(self, ts): | ||
| ref = np.array([-1979.558687, 739.7961625, 1027.996603]) | ||
| ref = np.array([-19.79558687, 7.397961625, 10.27996603]) | ||
| assert_allclose(ts._forces[0], ref) | ||
|
|
||
|
|
||
|
|
@@ -118,8 +119,9 @@ def test_vel(self, u): | |
| ref = np.array([2.637614561, 0.5778767520e-01, -1.704765568]) | ||
| assert_allclose(u.atoms[2].velocity, ref) | ||
|
|
||
| # modified to original numbers / 100 | ||
|
||
| def test_for(self, u): | ||
| ref = np.array([150.3309776, -812.6932914, 1429.413120]) | ||
| ref = np.array([1.503309776, -8.126932914, 14.29413120]) | ||
| assert_allclose(u.atoms[2].force, ref) | ||
|
|
||
| def test_number(self, u): | ||
|
|
||
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.
add a comment above this line stating that forces in DL_POLY are 10 J/(mol.Å) and mention issue #2393 — this is weird enough to warrant a hint for future coders
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.
Actually, we should not just divide by 100 here. Instead we should use the normal conversion machinery where you store the native force units in
_DLPOLY_UNITSand store the conversion factor in units, then use convert_from_native.See also https://userguide.mdanalysis.org/stable/units.html .