LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
[lammps-users] molindex and identifying atoms on the same molecule
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lammps-users] molindex and identifying atoms on the same molecule


From: Jeff Towers <jeff.towers66@...24...>
Date: Mon, 27 Nov 2017 11:25:05 +0900

Dear LAMMPS users and developers,

I am trying to add a new compute to LAMMPS, and I need to be able to identify which atoms are part of the same molecule.

Under atom_style "full", the molecule number of each atom is defined in the data file so I am thinking to do a comparison of molecule numbers for each atom. I would like to ask:

Is the molecule number assigned to each atom held in atom->molindex?

The array is empty when called from a typical compute like
  compute_pe_atom.cpp's ComputePEAtom::compute_peratom()
or
  compute X/tally

In each case I get
(gdb) print(atom->molindex)
$1 = (int *) 0x0

My guess is that either

(1) An array different to molindex holds the molecule-member information
(2) Lammps doesn't hold molecule-member information beyond the initial read_data (in which case, any suggestion about a different way to do this would be appreciated)
(3) molindex is correct but I need to do something to make this information available within the computes above.

I would really appreciate any guidance on this issue.

Thank you,
Best,

Jeff