CompPhysVienna / n2p2

n2p2 - A Neural Network Potential Package
https://compphysvienna.github.io/n2p2/
GNU General Public License v3.0
214 stars 81 forks source link

Compute stress/atom in lammps interface #170

Open Matheus-Novoa opened 2 years ago

Matheus-Novoa commented 2 years ago

I'm trying to use the compute stress/atom command in lammps but i'm having weird results comparing to reax. I'm simulating the stress/strain curve of a 1-D material. The image below shows nnp and reax curves, where "Tzz" is the stress in z and the x-axis is related to strain:

image

This image shows only nnp curve:

image

Analyzing just nnp result is already weird because the values computed are in a very different order of magnitude than expected for this type of calculation.

Which is strange, because the pzz component of the system pressure, that depends on force, is reasonably close to reax curve. image

I think the problem is the virial contribution (https://docs.lammps.org/compute_stress_atom.html) but i don't know exatly where is the problem.

Here is how i am implementing the lammps commands: compute st_at all stress/atom NULL compute tauzz_avg all reduce ave c_st_at[3] fix tauzz_avgi all ave/time 1 1000 1000 c_tauzz_avg