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

Re: [lammps-users] Invalid compute ID in variable formula


From: Steve Plimpton <sjplimp@...24...>
Date: Thu, 22 Jun 2017 07:41:31 -0600

Well, you can't expect to evaluate a variable
if a compute it uses has been deleted.

There is a variable delete command.  Or just
don't evaluate either the variable or compute.
LAMMPS won't give an error unless you
request they be evaluated.

Steve

On Thu, Jun 22, 2017 at 6:46 AM, Christophe Ortiz <christophe.ortiz@...4020...80...> wrote:
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

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
lammps-users mailing list
lammps-users@...6297....sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lammps-users