-
Notifications
You must be signed in to change notification settings - Fork 8
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
Adds Velocity, ShearStress, StressDiagonal, observables #285
base: main
Are you sure you want to change the base?
Conversation
07e7b35
to
0a2dc66
Compare
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.
Looks like a good start, thanks @harveydevereux!
I suspect I knew a lot of the answers to my questions when we discussed this when you started, but maybe it's helpful coming to it with fresh eyes, so we can make things as clear as possible.
0a2dc66
to
3b4cb56
Compare
c581cb8
to
9f06af6
Compare
88bcb2b
to
28c5923
Compare
624fcf7
to
dc017d5
Compare
45dee78
to
1fdab69
Compare
Not really work for this PR as such, but how easy would it be to integrate/use these in post processing, rather than on-the-fly calculations? |
All it needs is to be called on some sequence of atoms objects. But if you are post-processing why not just use post-process? The only advantage of these is they extract the data from Atoms in this case |
Most significantly, I'm thinking about how easy it is to extend postprocess to observables we've defined, but aren't supported yet. At the moment we can only do RDFs and VAFs, so if we didn't calculate any other observable on the fly, we might still want to be able to use an It could also fit into unifying the interfaces e.g. for the VAF, depending on how their efficiencies compare, which would avoid questions about their consistency any time we make a change. |
apply review comments Co-authored-by: Jacob Wilkins <[email protected]>
validate slicelike return hint Co-authored-by: Jacob Wilkins <[email protected]>
6c30712
to
39d35da
Compare
specify default case in docstring Co-authored-by: ElliottKasoar <[email protected]>
Co-authored-by: ElliottKasoar <[email protected]>
@@ -278,6 +278,7 @@ janus\_core.processing.observables module | |||
:private-members: | |||
:undoc-members: | |||
:show-inheritance: | |||
:inherited-members: |
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 will show the inherited member self.components
in the apidoc in e.g. Velocity and Stress and solve missing py:obj
references.
This adds a Velocity observable capable of averaging over supplied components$\langle \sigma_{xy}\sigma_{xy}\rangle+\langle \sigma_{yz}\sigma_{yz}\rangle+\langle \sigma_{zx}\sigma_{zx}\rangle$ with the built in
x, y, z
and atom lists. The behaviour is abstracted so also for stress we can obtain shear stress correlationsShearStress === Stress(['xy', 'yz', 'zx'])
ci tests now test against post-process vaf, dependent on changes to it post_process uses full correlation, fix filter_atoms #284 .
I used the ShearStress observable to get experimental viscosity for LiF which could be an example perhaps along with the VAF.
still need to fix the docs/ update the developer guide.
perhaps we could have a helper function to create Velocity-Velocity correlations from a structure (say, creating correlation_kwargs for different atom types automatically). As it standsObservable
does not attach to a particular atoms object and so does not have this information at construction. Except implicitly viaatoms: list[int]
.Velocity can take a
SliceLike
orlist[int]
. So open-ended ranges can be specified i.e.slice(0, None)
, but also non-monotonic, decreasing or whatever sequences can be specified that cannot be represented as a slice.