Compute property/local

Hello,

I was wondering is there is a way to store the output of the compute property/local command in a variable of type vector. for example, I have the following command

compute 1 all property/local natom1 natom2
I want to store c_1[1] i.e natom1 in variable of type vector but this is not possible because it is not a per atom value or global vector. Is there is a way around this issue.

Thanks.

Currently local vectors/arrays can be accessed only in very specific ways, namely dump local and compute reduce. Since the ordering of entries in the local vectors is very arbitrary, it is not obvious why you would want to access the specific entries. So what is it you are trying to do with the vector?

Hi Aidan,

I am trying to get specific atom IDs and then I want to store them in a variable then i want to assign these IDs to a certain group. Ordering is not a problem for me So basically I want to store something close to a neighbor list but with different cutoff distance I tried to do this using loops as the following
So i have 9 atoms, if basically atom1!=atom2 and the distance is less than a certain value I want to store the atom ids in a a group but it is not working

label loopa

variable n loop 9

label loopb

variable o loop $n+1 9

variable p equal 5

variable a atom id[v_n]

variable b atom id[v_o]

variable c equal x[v_n]

variable d equal y[v_n]

variable e equal z[v_n]

variable q equal x[v_o]

variable r equal y[v_o]

variable s equal z[v_o]

variable f equal v_c-v_q

variable h equal v_d-v_r

variable i equal v_e-v_s

variable j equal v_f*v_f

variable k equal v_h*v_h

variable l equal v_i*v_i

variable m equal sqrt(v_j+v_k+v_l)

if “($m < $p) && ($n != $o)” then “group thh variable a”

next n

jump SELF loopb

next o

jump SELF loopa

Additionaly, the “vector” style variables are “global”
meaning every proc has a copy of the same data.

Dump local deals with per-processor info, like
a list of bonds on each proc.

So that kind of local vector has nothing to do
with the global variable vectors.

Steve

Thanks Steve,