compute style stress/spherical command is not recognized

Hello, I am currently using the compute style stress/spherical command, but an error message shows “ERROR: Unrecognized compute style ‘stress/spherical’ (…/modify.cpp:1292)”. I have checked the installation package, and I have installed the EXTRA-COMPUTE package, but this command is still not recognized. Is it because my version is too low? I am currently using the version lammps-7Jan2022. I hope someone can answer, thank you very much. Below is my in file.

units real
atom_style full

read_data spce.data

mass 1 15.9994
mass 2 1.008

pair_style lj/cut/coul/cut 10.0
pair_coeff 1 1 0.1553 3.166
pair_coeff 1 2 0.0 1.0
pair_coeff 2 2 0.0 1.0

bond_style harmonic
bond_coeff 1 450 0.9572
angle_style harmonic
angle_coeff 1 55 104.52

timestep 1.0
minimize 0.0 0.0 1000 10000
fix rigid all shake 0.0001 10 10000 b 1 a 1
velocity all create 300.0 5463576
fix integrate all nvt temp 300.0 300.0 100.0

compute myStress all stress/spherical 25 25 25 0.1 25
fix aveStress all ave/time 100 1 100 c_myStress[*] file stress.txt mode vector
thermo_style custom step temp press etotal density pe ke
thermo 1000

run 20000 upto

write_data spce.data nocoeff

Hello,

If you want to use an older version, then you have to use the corresponding documentation. The documentation that is currently online corresponds to the current LAMMPS version. In general, its better and easier to simply compile the last LAMMPS version.

Best,
Simon

2 Likes

Yes. According to the git commit history, the stress/spherical compute appeared in March 2022.

1 Like

Thanks,sir