-
Notifications
You must be signed in to change notification settings - Fork 656
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
timestep #4447
base: develop
Are you sure you want to change the base?
timestep #4447
Changes from 12 commits
70e036f
f97dd30
1af773c
2df693b
18696b5
198eaf3
a545ba2
ac4519b
a5bb78e
9cbc432
578218f
ba8dee3
1e5ae0d
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 |
---|---|---|
|
@@ -493,20 +493,31 @@ cdef class Timestep: | |
vectors lengths followed by their respective angle, or as three | ||
triclinic vectors. | ||
|
||
>>> ts.dimensions | ||
array([ 13., 14., 15., 90., 90., 90.], dtype=float32) | ||
>>> ts.triclinic_dimensions | ||
array([[ 13., 0., 0.], | ||
[ 0., 14., 0.], | ||
[ 0., 0., 15.]], dtype=float32) | ||
.. testsetup:: | ||
|
||
>>> import MDAnalysis as mda | ||
>>> from MDAnalysis.tests.datafiles import TPR, XTC | ||
>>> import numpy as np | ||
>>> u = mda.Universe(TPR, XTC) | ||
>>> ts = u.trajectory[0] | ||
Comment on lines
+498
to
+502
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. Based on a similar PR https://github.com/MDAnalysis/mdanalysis/pull/4374/files these lines should be indented to look like
and I am not 100% sure if |
||
|
||
.. doctest:: | ||
|
||
>>> print(np.round(ts.dimensions)) | ||
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. indentation? 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. Is rounding really required? It makes for less clear documentation. I'd like to get rid of it if at all possible so that it does not distract from what we are really interested in, namely |
||
[80. 80. 80. 60. 60. 90.] | ||
>>> print(np.round(ts.triclinic_dimensions)) | ||
[[80. 0. 0.] | ||
[ 0. 80. 0.] | ||
[40. 40. 57.]] | ||
|
||
Setting the attribute also works:: | ||
|
||
|
||
.. doctest:: | ||
|
||
>>> ts.triclinic_dimensions = [[15, 0, 0], [5, 15, 0], [5, 5, 15]] | ||
>>> ts.dimensions | ||
array([ 15. , 15.81138802, 16.58312416, 67.58049774, | ||
72.45159912, 71.56504822], dtype=float32) | ||
|
||
>>> print(np.round(ts.dimensions)) | ||
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. rounding here just gives the wrong output. Find a way to do this without 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. @orbeckst I am getting this error
I think mdahole2 uses python 3.11 or less I am using 3.12 so I am unable to install mdahole2. please check the error report I have attached in an earlier message. I will make the requested changes once this is resolved 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. You might have to install in a Python 3.11 environment for testing. The development version is a work in progress and even though we strive to make it fully usable, this is not always possible until close to a release. |
||
[15. 16. 17. 68. 72. 72.] | ||
|
||
See Also | ||
-------- | ||
:func:`MDAnalysis.lib.mdamath.triclinic_vectors` | ||
|
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.
Just need to revert this back to the previous formatting.
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.
@IAlibay all the rest of the years in the Authors file do not have any space except for 2024 which has two spaces, I have aligned the year 2024 with the rest of the years, if you still want me to revert the changes, I will do that.
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.
Sorry @nataliyah123 I don't think I fully understand what you mean. The image above (of the 2022 entry) is how it should look for 2024. My suggested change should fix things to how they should be.
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.
@IAlibay made the changes you suggested in both files. and reverted the changes you asked. I was talking about the spaces as shown in the image below.