Nearst Neighbor Distances for Atoms in Different Groups

I have lammps runs with a single walled carbon nanotube, with thinly sliced cylindrical cross sections of the tube labeled as different groups along the length of the tube.

For each “cylindrical” section/group I would like to get the nearest neighbor distance for each atom pair in the group, which I’m then going to average over all cylindrical segments of the entire tube.

I’m using the AIREBO potential.

Is it simpler to do this with VMD?

I’ve thought about using rdf compute output for each defined “group” of atoms in the cylindrical sections in order to get the average nearest neighbor distance for each group.

I’m also reading the cna/atom doc and ref.

Can I get nearest neighbor distance information for atoms in a group from the
cna/atom compute without having to do any source code modifications/additions?

v/r,

dc

I have lammps runs with a single walled carbon nanotube, with thinly sliced cylindrical cross sections of the tube labeled as different groups along the length of the tube.

For each “cylindrical” section/group I would like to get the nearest neighbor distance for each atom pair in the group, which I’m then going to average over all cylindrical segments of the entire tube.

I’m using the AIREBO potential.

Is it simpler to do this with VMD?

Probably.

I’ve thought about using rdf compute output for each defined “group” of atoms in the cylindrical sections in order to get the average nearest neighbor distance for each group.

Or just writing a custom script. If you don’t do massive deformations, you only need to determine the group of close neighbors for each atom only once and then loop over this list for each trajectory frame.

Axel.