Avoid updating the atom positions with their periodic replicas while calculating the neighbour lists

Dear LAMMPS developers,

I have been trying to calculate the neighbor lists using the command lmp.extract_atom(‘x’) while running lammps with python. I have an initial structure of a periodic bilayer system, for which I am calculating the intra-layer and interlayer neighbours within a cutoff distance for each of the atoms. After calculating the neighbour lists, when I print the central atom positions and their neighbors, I noticed that, some of the central atoms are replaced with their periodic replicas. I need to maintain the initial structure that I started with, and get the neighbour lists based on this intitial structure, since the atomic environment around each atom is important for my job.

Can you please suggest me how to get the neighbour lists without changing the initial structure?

Note: I am calculating just the neighbor lists by running the minimization with single run.
lmp = lammps()
units metal
dimension 3
boundary p p p
atom_style full

read_data Initial_structure.mol

newton on

pair_style hybrid rebo zero 10.0 full
pair_coeff * * rebo CH.rebo C C
pair_coeff 1 2 zero

neighbor 2 bin
neigh_modify every 1 delay 0 check yes

min_style fire
minimize 0.0 0.0 1 1

x = lmp.extract_atom(‘x’)

Thanks in advance.

You have to understand a few things here.

  • If you want to use LAMMPS for a force/energy engine, you have to let it process coordinates into its domain decomposition scheme at least once. There is no way around that.
  • When LAMMPS (re)-builds the neighbor lists, atoms may be sorted into local lists differently. This can happen at any reneighbor. Thus you cannot depend on the order you get in the “extract” functions. If you want those ordered, you have to order them by the atom ID, i.e. get the “tag” property as well.
  • Because you are using “minimize”, you are modifying your geometry. Why not do a “run 0 post no” command?