Unable to save compute result in variable

Submitted by Johannes_p on Wed, 10/07/2020 - 08:43

Hi,

i'm new to LIGGGHTS and i am struggling to extend a simple simulation with superquadric particles.
I want to store a result from a compute in a variable, and for this i use the following code snippet:

compute compresult all property/atom update_on_run_end yes angmomx
variable compvar equal c_compresult[1]
print ${compvar}

However, despite the "update_on_run_end yes" i get the error message "ERROR: Compute used in variable between runs is not current. Use the update_on_run_end option for computes to avoid this."
The same happens when i use this variable in e.G. a fix and not the print command

In an old forum post i found the advice to use a "run 1" between the compute and variable command, but that does not change anything for me.

How can I fix this problem?
I am using LIGGGHTS-PUBLIC 3.8.0