asking about compute pair/local

Dear Lammps Users,

I am trying to calculate pair distance between group of atoms.

In my system, there are 140 nitrogens.

I inserted the following commands in input file.

group Nitrogen type 9

compute Dist Nitrogen pair/local dist

dump DDD N local 100 dist.txt c_Dist

I have checked “dist.txt” file. The “ITEM: NUMBER OF ENTRIES” keep changing every timestep.

ITEM: TIMESTEP
0

ITEM: NUMBER OF ENTRIES
372

ITEM: TIMESTEP
100
ITEM: NUMBER OF ENTRIES
374

ITEM: TIMESTEPITEM: TIMESTEP
200
ITEM: NUMBER OF ENTRIES
376

ITEM: TIMESTEPITEM: TIMESTEP
300
ITEM: NUMBER OF ENTRIES
379

ITEM: TIMESTEPITEM: TIMESTEP
400
ITEM: NUMBER OF ENTRIES
374

etc

Why does this value keep changing?

Thanks.

Best regards,

Changwoon Jang

Why does this value keep changing?

RTM under pair/local.

The local data stored by this command is generated by looping over the pairwise neighbor list. Info about an individual pairwise interaction will only be included if both atoms in the pair are in the specified compute group, and if the current pairwise distance is less than the force cutoff distance for that interaction, as defined by the pair_style and pair_coeff commands.

If the amount of atoms within this cut-off changes/oscillates (equivalent to changing a changing RDF) so will the number of entries.

Dear Eric,

Thank you for the comment. Now, I understand why the value keeps changing. The reason is the cutoff distance.

I checked the value in “dist.txt” file, and all values were less than 10 angstrom which is the pairwise cutoff distance of my system.

I have another question. In the output file, the values were printed every 100 timesteps which I set.

How do I know which atoms are involved in each value? In the output file, for example, the only values were listed and printed.

I would like to know atom Ids for each value, if necessary. As far as I know, if I use “pair/local”, I can not use “dump custom” which will

print atom ID. “dump local” command dose not have a command for printing Atom IDs.

Does anyone know how to print associated Atom IDs for the distance calculation with “pair/local dist” ?

Thanks.

Best regards,

Changwoon Jang

Compute property local stores the IDs of atoms
involved in pairwise interactions (as well as other stuff).
Your dump local command can access that compute
to also print I,J.

Steve

Dear Steve Plimpton,

Thank you for your comments.

I have tried your instruction like,

group N type 9

compute Dist N pair/local dist

compute AtomID N property/local natom1 natom2

dump DDD N local 100 dist.txt c_AtomID c_Dist

The error have been occurred.

ERROR: Dump local compute does not calculate local vector (…/dump_local.cpp:317)

Without c_AtomID in the dump command, there was no problme. However, when I use c_AtomID in dump command in order to print Atom IDs, this error happened.

What was wrong with this command?

I am using Aug/2013 version.

Thanks.

Best regards,

Changwoon Jang

Dear Steve,

There was a mistake about the column numbers in the previous input file. So, I have changed and inserted column numbers like

group N type 9

compute Dist N pair/local dist
compute AtomID N property/local natom1 natom2

dump DDD N local 100 dist.txt c_Dist

dump CCC N local 100 IDs.txt c_AtomID[1] c_AtomID[2]

This format is running without any problem. However, when I look at both files, the NUMBER OF ENTRIES are different. Why does this happen?

I simply would like to dump how the distance values are associated with atom IDs like

AtomID[1] AtomID[2] Dist

When I combined three args in the same dump local command, this does not work.

Isn’t this following format acceptable?

dump AAA N local 100 Text.txt c_AtomID[1] c_AtomID[2] c_Dist

Thanks.

Best regards,

Changwoon Jang

What you want is:

compute AtomID N property/local patom1 patom2
dump AAA N local 100 Text.txt c_AtomID[1] c_AtomID[2] c_Dist

See the compute property/local doc page on the difference between

patom and natom. The total # of values is different and you
can only compute forces, distances etc on atoms within
the force cutoff.

Steve