"Compute not current" error

Thanks Daniel. I had done that, and this is the result I got:

Lx Ly Lz pen PotEng TotEng
24.4224 94.934952 22.91024 -10624.798 -10624.798 -10624.798
24.4224 94.932134 22.91024 -10624.798 -10624.798 -10624.798
24.4224 94.935166 22.91024 -10624.799 -10624.799 -10624.799
24.4224 94.934721 22.91024 -10624.801 -10624.801 -10624.801
24.4224 94.934572 22.91024 -10624.801 -10624.801 -10624.801
24.4224 94.932792 22.91024 -10624.802 -10624.802 -10624.802
24.4224 94.935907 22.91024 -10624.802 -10624.802 -10624.802
24.4224 94.940506 22.91024 -10624.802 -10624.802 -10624.802
24.4224 94.928046 22.91024 -10624.803 -10624.803 -10624.803
24.4224 94.935132 22.91024 -10624.803 -10624.803 -10624.803
24.4224 94.935428 22.91024 -10624.804 -10624.804 -10624.804
24.4224 94.933203 22.91024 -10624.804 -10624.804 -10624.804
24.4224 94.93083 22.91024 -10624.807 -10624.807 -10624.807
24.4224 94.932907 22.91024 -10624.811 -10624.811 -10624.811
24.4224 94.926825 22.91024 -10624.813 -10624.813 -10624.813
24.4224 94.932313 22.91024 -10624.813 -10624.813 -10624.813
24.4224 94.928901 22.91024 -10624.814 -10624.814 -10624.814
24.4224 94.932462 22.91024 -10624.814 -10624.814 -10624.814
24.4224 94.931127 22.91024 -10624.815 -10624.815 -10624.815
24.4224 94.93172 22.91024 -10624.815 -10624.815 -10624.815
24.4224 94.932017 22.91024 -10624.816 -10624.816 -10624.816
24.4224 94.93172 22.91024 -10624.816 -10624.816 -10624.816
24.4224 94.938543 22.91024 -10624.817 -10624.817 -10624.817
24.4224 94.93172 22.91024 -10624.817 -10624.817 -10624.817
24.4224 94.93172 22.91024 -10624.819 -10624.819 -10624.819
24.4224 94.926713 22.91024 -10624.837 -10624.837 -10624.837
24.4224 94.930866 22.91024 -10624.841 -10624.841 -10624.841
24.4224 94.922411 22.91024 -10624.842 -10624.842 -10624.842
24.4224 94.928048 22.91024 -10624.842 -10624.842 -10624.842

Clearly there is no difference between the computed pen and etotal or pe.

It does seem weird that it still can’t pick up the compute when initialising a variable?

Cheers,
Nathaniel

It does seem weird that it still can’t pick up the compute when initialising a variable?

There are various reasons why LAMMPS may not be able to evaluate
a compute reference in a variable, between runs. So to be safe, it doesn’t try. Instead
the onus is on you to insure the compute was evaluated on the last
timestep of the preceeding run.

The variable doc page (section Variable Accuracy) has all the details on this.

Steve