-
Notifications
You must be signed in to change notification settings - Fork 23
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
read_extxyz
does something strange with the virials for 3-atom cells
#166
Comments
@jameskermode -- any idea where this comes from? Should be quick to fix, but I wanted to check with you first. |
Yes, I understand the problem and Chuck’s link is correct. The problem is that JuLIP’s additional Atoms data (unlike ASE) does not distinguish between per-atom and per-config data, so I have to guess. The heuristic is that if an array is 3 * N_atoms it’s per atom vector data, otherwise it’s per-config. This fails for 3-atom configs. Not sure of the best fix, maybe treating virial as a special case since it will always be per-config is enough for this particular issue. |
Actually, we do know the origin when reading, so could special case that |
that's an interesting problem. nasty. maybe in practice writing is ok since we treat the cell as a matrix. But if we wanted to do this systematically we could add a label to atoms-data to specify whether it is per atom or per-config. That should be easy to do. Would you like me to start a PR for this? |
Labelling the data would be the best solution. If you have time to make a PR that would be great, I’m happy to check it over. |
Thanks, both. There’s now a virial-specific workaround in ACE1pack, so no
urgency from my end. But I’ll happily test and replace it when you’re ready
…On Sat, 15 Jul 2023 at 08:52, James Kermode ***@***.***> wrote:
Labelling the data would be the best solution. If you have time to make a
PR that would be great, I’m happy to check it over.
—
Reply to this email directly, view it on GitHub
<#166 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACXHHTVRAMJVSUTPASFGYHDXQJD27ANCNFSM6AAAAAA2KVNJVQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
For 3-atom cells,
read_extxyz
converts the virials to a vector of vectors. For all other cell sizes,read_extxyz
leaves the virials as a matrix. This behaviour was causing some weird things inACE1pack
.I believe this function explains it:
JuLIP.jl/src/atoms.jl
Line 419 in 3d23cd8
Minimal example: consider this
train.xyz
file.The following
produces
The text was updated successfully, but these errors were encountered: