LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
[lammps-users] Invalid compute ID in variable formula
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lammps-users] Invalid compute ID in variable formula


From: Christophe Ortiz <christophe.ortiz@...4080...>
Date: Thu, 22 Jun 2017 12:46:21 +0000

Dear LAMMPS users,

I am using CNA to determine where are defects after the cascade in bcc Fe.

To do so, I use the following after the cascade has taken place:

compute  cnatom  all  cna/atom  3.45

thermo_style custom step temp
run 0

# Determine which defects have a structure different than BCC (3)
variable cna atom "c_cnatom == 5"
group groupcna dynamic all var cna every 1
run 0

variable  nbdefects  equal  count(groupcna)
print "Number of defects = ${nbdefects}"


Since the cna calculation is quite computationally expensive, I remove these compute before I continue other calculations.

uncompute cnatom

# other commands...

thermo_style custom step temp
run 1000


And there I get the following error:
ERROR: Invalid compute ID in variable formula (../variable.cpp:1257)

I understand why this occurs (because of the variable atom that is referenced) but I do not know how to solve it. Any idea?

Many thanks in advance and best regards,
Christophe