printing the diameter of a single atom

Submitted by zamir on Tue, 08/27/2013 - 23:13

Hi All,

I want to print the diameter of a single atom. I am running into some trouble. Here is my logic:

#find the atom I want to measure
group one_atom id 3
#compute the diameter
compute diam one_atom property/atom diameter
#run the model for zero timesteps (or 1 ts, it doesn't make a difference)
run 0
#store the diameter
variable diameter equal c_diam[1]
print "diameter ${diameter}"

I get an error that says:
ERROR: Compute used in variable between runs is not current (variable.cpp:858)

Any help is greatly appreciated,