Dear LAMMPS users,
I want to calculate the stress auto-correlation function for my system and have two questions regarding to LAMMPS.
- I have the error as ‘Fix ave/correlate compute does not calculate a vector’ reported and my scripts are:
compute 1 all stress/atom NULL
fix 3 all ave/correlate 1 10 1000 c_1[4] c_1[5] c_1[6] file aout.correlate
I would like to have the stress of xy, xz, yz correlate to themselves. Could you kindly point out what’s wrong in the script?
- what if I would like to calculate ave/correlate of pxy,pxz,pyz from thermo_style? Can I simply replace c_1[4] c_1[5] c_1[6] with pxy pxz pyz? Or should I store pxy, pxz and pyz first, then take them as variables?
Many thanks,
Sunnia
Dear LAMMPS users,
I want to calculate the stress auto-correlation function for my system and
have two questions regarding to LAMMPS.
1) I have the error as 'Fix ave/correlate compute does not calculate a
vector' reported and my scripts are:
compute 1 all stress/atom NULL
fix 3 all ave/correlate 1 10 1000 c_1[4] c_1[5] c_1[6] file
aout.correlate
I would like to have the stress of xy, xz, yz correlate to themselves.
Could you kindly point out what's wrong in the script?
compute stress/atom does not compute a global property, but a per-atom
one. so the error message is correct.
2) what if I would like to calculate ave/correlate of pxy,pxz,pyz from
thermo_style? Can I simply replace c_1[4] c_1[5] c_1[6] with pxy pxz pyz?
no, please see the fix ave/correlated documentation.
Or should I store pxy, pxz and pyz first, then take them as variables?
how about defining an instance of compute pressure?
axel.
Dear axel.
Is this a right way to compute the pressure (or say, stress)? See below:
compute 1 all stress/atom NULL
compute 2 all reduce sum c_1[4] c_1[5] c_1[6]
variable pxy equal -c_2[1]/(3*vol)
variable pxz equal -c_2[2]/(3*vol)
variable pyz equal -c_2[3]/(3*vol)
And then compute the stress auto-correlation function in the way as:
fix 3 all ave/correlate 1 10 1000 pxy pxz pyz file auto.correlate
If this will give me what I want?
Best wishes,
Sunnia
thank you very much for your commends.
Best wishes,
Sunnia