printing the diameter of a single atom

Submitted by zamir on
PaulWinkler

Hi,

use the diam compute over all particles, you don't need to build a group for one atom, read the diameter of atom i by c_diam[i] (after at least one run). You may have no problems with delayed evaluation of variables either.

Best wishes,

Paul

Thu, 29 Aug 2013 - 14:26 Permalink

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,
Zamir