Skip to content
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

Save stress tensor in xyz trajectory file. #378

Closed
AugustinLu opened this issue Nov 1, 2024 · 3 comments · Fixed by #379
Closed

Save stress tensor in xyz trajectory file. #378

AugustinLu opened this issue Nov 1, 2024 · 3 comments · Fixed by #379
Assignees
Labels
area: main-source Relating to the src/ directory (main Conquest source code) improves: functionality Adding functionality to code improves: output Making output clearer or more consistent priority: minor time: days type: enhancement Planned enhancement being suggested by developers
Milestone

Comments

@AugustinLu
Copy link
Contributor

At present, the trajectory.xyz file written during molecular dynamics simulations contains the positions, forces and energies but no information about the stress tensor.

It would be useful to have the stress tensor written in the header as it could be read by ASE and re-used for further postprocessing.

@AugustinLu AugustinLu added area: main-source Relating to the src/ directory (main Conquest source code) improves: functionality Adding functionality to code improves: output Making output clearer or more consistent priority: minor time: days type: enhancement Planned enhancement being suggested by developers labels Nov 1, 2024
@AugustinLu AugustinLu self-assigned this Nov 1, 2024
@davidbowler davidbowler added this to the Release v1.5 milestone Nov 1, 2024
@davidbowler
Copy link
Contributor

This is a good idea but I didn't know that stress could be written to xyz files. Is there a specification document?

@JianboLin
Copy link
Contributor

For each geometry, in the second comment line, the information of stress can be appended with an string, which is convenient for further analysis with ASE or others.

@AugustinLu
Copy link
Contributor Author

As @JianboLin wrote, stress, as any property, scalar or vector, can be stored in the second line of what would be the comment line of xyz files. In the extended XYZ format, the comment line is considered as a series of key/value pairs.

In the proposed implementation, the stress tensor would be saved as the elements of the 3x3 matrix in the format specified in ASE:
https://wiki.fysik.dtu.dk/ase/ase/io/formatoptions.html#extxyz
If the property "stress" is present , it will be read by ASE.

Lattice="7.976251045 -0.066073409 0.094473673 0.0 8.1188244 0.053663813 -0.0 -0.0 10.10463222" Properties=species:S:1:pos:R:3:forces:R:3 stress="0.006635310902671738 -0.0021648924063491113 0.008182624705542077 -0.0021648924063491113 -0.0008392270755571369 0.003454257120064949 0.008182624705542077 0.003454257120064949 0.011619180905726022" free_energy=-227.33788785 energy=-227.34438726 pbc="T T T"

@AugustinLu AugustinLu linked a pull request Nov 6, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: main-source Relating to the src/ directory (main Conquest source code) improves: functionality Adding functionality to code improves: output Making output clearer or more consistent priority: minor time: days type: enhancement Planned enhancement being suggested by developers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants