"Compute not current" error

Hi all,

I am trying to figure out why a compute I am running (compute pe_energy all pe) is not capable of being stored in a variable at the end of a run. There are a series of minimizations during the run, however I do use the run 0 commang before initialising the variables.

Any thoughts why this is happening?

With regards,

You are going to have to _use_ the compute during the run. Try putting
it into the thermo output.

May I just elaborate. The specific error is:

ERROR: Compute used in variable between runs is not current (variable.cpp:839)

My code is:

units metal
dimension 3
boundary p p p
atom_style atomic

lattice fcc 4.05
region whole block 0 24.4224 -69.077 69.077 0 11.45512 units box
create_box 1 whole

region top block INF INF 0 69.077 INF INF units box
region bottom block INF INF -69.077 0 INF INF units box
lattice fcc 4.05 orient x 1 1 -3 orient y -3 -3 -2 orient z -11 11 0
create_atoms 1 region top

lattice fcc 4.05 orient x 1 1 3 orient y 3 3 -2 orient z -11 11 0
create_atoms 1 region bottom
group topg region top
group bottomg region bottom

pair_style eam/alloy
pair_coeff * * Al99.eam.alloy Al

delete_atoms overlap 2.0 bottomg topg

compute csym all centro/atom fcc
compute pe all pe/atom
compute pen all pe

thermo 50
thermo_style custom step lx ly lz etotal pe temp

shell mkdir STGB2
shell cd STGB2
dump 1 all cfg 25 dump_GBIndent_*.cfg id type xs ys zs c_csym c_pe fx fy fz

min_style cg
minimize 1.0e-15 1.0e-15 99999 999999

fix 1 all box/relax y 0.0 vmax 0.0001

minimize 1.0e-15 1.0e-15 10000 20000

delete_atoms overlap 1.5 topg bottomg

minimize 1e-15 1e-15 5000 10000

run 0

variable gbArea equal “lxlz2”
variable gbEtotal equal “c_pen-4.01678*count(all)”
variable GBE equal “v_gbEtotal/v_gbArea”
print “GB energy is ${GBE}”

shell mkdir Dump
shell cd Dump

displace_atoms topg move 0.7632 - 0.8634625 0 units lattice

delete_atoms overlap 0.1 topg botg

minimize 1e-15 1e-15 5000 10000

Change the thermo style line to

thermo_style custom step lx ly lz etotal pe temp c_pen

The pen compute was not used during the run and thus cannot be current.

I should note that if I use etotal or pe, the variables seem to work… Perhaps this is all that is needed.

Is there any difference between these computes and:
compute pe all pe/atom
compute pen all reduce sum c_pe

??

As Daniel said, you have to use the compute on the last timestep
of the preceeding run, in order to print it between runs. You use
pe, but not pen in your thermo output.

Steve