CNA of Zincblende


I would like to carry out common neighbor analysis (CNA) of each FCC sublattice (Zn and Sulfur) utilizing compute id group_id cna/atom command.
I believe that this can be done by creating groups with the command group id type (atom), example:

read configuration file…

mass 65.41 1
mass 32.07 2

group Zn type 1
group S type 2

compute cnaZn Zn cna/atom 4.61
compute cnaS S cna/atom 4.61

The problem I’m running into is how to dump the calculated CNA for when the atom is Zinc and when it is Sulfur but not both, in
other words I don’t want to do :

dump 1 all xyz 1000 xyz.lammps id type x y z c_cnaZn c_cnaS
dump_modify 1 element Zn S

but more along the lines of:

dump 1 all xyz 1000 xyz.lammps id type x y z c_(GroupID)

Is this possible?


No, but you can create 2 dump files, one for
each group. The dump command also takes
a group arg. Then you can merge, post-process
them later ...