coordination number of groups

Hey LAMMPS users,

I would like to find the coordination of a dynamic group with respect to a group defined by an atom type (e.g. group A to group B, where group A is dynamic). Has any headway been made on this?

In July 2012 someone asked a similar question (subject: “coordination number”) and Aiden Thompson suggested a fix to that version which involved adding two lines. https://sourceforge.net/p/lammps/mailman/message/29516334/

—> // ignore atoms not in group
—> if (!(mask[j] & groupbit)) continue;

To answer the open question that Steve asked in 2012, yes, adding of these lines does work for the 2012 version of the code, where the lammps input script line would be:

compute ID group-ID coord/atom ${cutoff}

Effectively, instead of finding the coordination of all atom types to the group-ID, the function would now find the coordination with itself (e.g. group A to group A).

Now in 2019, the lammps input line would be:

compute ID group-ID coord/atom cutoff ${cutoff} typeN

Has anyone have a work around to findgroup A to group B coordination? This would be useful is isolating a subset of one atom type and identifying its coordination to another atom type.

Thanks for the input!

Jen

Hey LAMMPS users,

I would like to find the coordination of a dynamic group with respect to a group defined by an atom type (e.g. group A to group B, where group A is dynamic). Has any headway been made on this?

In July 2012 someone asked a similar question (subject: “coordination number”) and Aiden Thompson suggested a fix to that version which involved adding two lines. https://sourceforge.net/p/lammps/mailman/message/29516334/

—> // ignore atoms not in group
—> if (!(mask[j] & groupbit)) continue;

this would restrict the coordination number of atoms in group A to other atoms in group A, not to atoms in group B.

To answer the open question that Steve asked in 2012, yes, adding of these lines does work for the 2012 version of the code, where the lammps input script line would be:

compute ID group-ID coord/atom ${cutoff}

Effectively, instead of finding the coordination of all atom types to the group-ID, the function would now find the coordination with itself (e.g. group A to group A).

Now in 2019, the lammps input line would be:

compute ID group-ID coord/atom cutoff ${cutoff} typeN

the change would still work and still do the same thing.

Has anyone have a work around to find group A to group B coordination? This would be useful is isolating a subset of one atom type and identifying its coordination to another atom type.

for that you don’t really need a second group. your can restrict to the first group by the computes group argument. and to the other type (or range of types) with the ‘typeN’ arguments. please read the documentation carefully.

adding a selection by group (where the group cannot be identified by atom type or types) is possible with a few more small changes to the source.
you can find an untested version of that code on github at: https://github.com/lammps/lammps/pull/1464

axel

Thank you so much!