Compute property/atom query

Hi all,

I am trying to find out the IDs of atoms in a specific region and for that I am using property/atom id . The computed vector has zeros for atoms which do not reside in the region.

How do I trim the list so that it contains no zeros & only finite atom IDs?

Regards
Amit

Check out dump_modify thresh

Axel,

Is there no analogous command like ‘compute_modify thresh’ to dump_modify thresh which will remove zeros from output of 'compute property/atom id ’ as explained previously?

Dump_modify thresh does not remove the zeros from output of ‘compute property/atom id’.

Regards

Amit

Axel,
Is there no analogous command like ‘compute_modify thresh’ to dump_modify thresh which will remove zeros from output of 'compute property/atom id ’ as explained previously?

That would make no sense. Since you have to have per atom data, what do you want to use instead. If you want to suppress output, you have to do it where the output is generated.

Dump_modify thresh does not remove the zeros from output of ‘compute property/atom id’.

Then you are probably not using it correctly.

Axel,

I am trying to output the contents of the ‘compute property/atom id’ through the ‘thermo_style’ command by assigning an equal style variable to the vector computed by the compute(after reducing it to scalar). I do not want to dump the computed vector to a file. Thus , I would be able to access the computed vector through variables without producing a dump.
The piece of code by which I intend to do this is as follows:

compute c_ID reg_ID property/atom id # reg_ID is the region in which i want to find the atom IDs
variable Geljam equal c_ID[1] # I intend to loop thru c_ID sequentially to access all the values(IDs) in the vector.
thermo_style custom step atoms ke v_Geljam

Right now the v_Geljam produces zeros as particles not present in the region are assigned ‘zeros’ as their IDs. I want to trim these zeros.

Regards

Amit

Axel,
I am trying to output the contents of the ‘compute property/atom id’ through the ‘thermo_style’ command by assigning an equal style variable to the vector computed by the compute(after reducing it to

This is nonsense.

scalar). I do not want to dump the computed vector to a file. Thus , I would be able to access the computed vector through variables without producing a dump.

This cannot work.