[lammps-users] How can I modify the building of neighbor lists created from hybrid option ?

Hi all,

  I have a question about the different neighbor lists created from hybrid option.

How can I do to build differently each of these neighbor lists ?

In this case, the update of all neighbor lists follow parameter given by the neigh_modify command. However, I would like to build only once one of neighbor lists (called neigbor list A) and many times the others during the simulation.

In the neighbor list A that I implemented, I create a contact history which will evolve during the simulation and I don't want to erase these data by rebuilding this neighbor list A.

I looked at the code, I know taht the building of neighbor lists during the simulation is done by the function Neighbor::build() called in the class Verlet. However when the funtion build is performed, the data held in the neighbor lists seem already erased.

Please, can you give me some hints to resolve my problem ?

Regards
JF

I have a question about the different neighbor lists created from hybrid option.
How can I do to build differently each of these neighbor lists ?

Since LAMMPS does this for you now, I'm not clear what you're asking.

The typical mode is that LAMMPS builds one master neighbor list
for the whole system. Then when using pair hybrid, it breaks it into
pieces for different sets
of atoms and passes each piece to each of the sub pair styles using in the pair
hybrid command.

If the sub-styles use different kinds of neighbor lists (that aren't
all subsets of one
master), then the code has to do more work to create the different sub neighbor
lists individually.

Steve

Hello Steve,

  Thank you for your reply, I understood that there is one master neighbor list which is split into sub neighbor lists.
The type and the number of sub neighbor lists depend on the pair styles used with hybrid command.

For example, if I use :

pair_style hybrid lj/cut/coul/cut 10.0 eam
pair_coeff 1*2 1*2 eam niu3
pair_coeff 3 3 lj/cut/coul/cut 1.0 1.0

neighbor 0.3 bin
neigh_modify every 2 delay 10 check yes

There will have N sub neighbor lists whose the sub neighbor list A associated with the pair style "eam".
In my case, I would like that the sub neighbor list A is built once.

I am looking for just a simple way to use two different pair styles with their associated sub neighbor list which are not built at the same timestep.

Regards
JF

There will have N sub neighbor lists whose the sub neighbor list A associated with the pair style "eam".
In my case, I would like that the sub neighbor list A is built once.

I am looking for just a simple way to use two different pair styles with their associated sub neighbor list which are not built at the same timestep.

I don't understand this last part. For the hybrid command,
you list, LAMMPS will build 2 sub-lists, not N. One for
all the EAM interactions which will be used by pair eam
and one for the 3/3 interactions which will be used
by pair lj/cut/coul/cut.

They will be built at the same time (say once every 10 steps),
since the triggering of a neighbor list build happens for all neighbor
lists together.

What scenario are you thinking of where you want a sub-list
built at different times than others?

Note that there are commands, like diagnostic computes, that
build neighbor lists only occasionally (say every 1000 steps) when
they are invoked.

Steve

jerier,

[...]

I am looking for just a simple way to use two different pair styles with their associated sub neighbor list which are not built at the same timestep.

there is one big problem with this. the neighborlists are indexed by
the "local" atom indexes, i.e. their offset in the local coordinate
arrays, but not in their "global" atom tags. since atoms will move
between domains and thus get added to the local lists, the neighbor
lists will have to be rebuilt when atoms move around.

you have to explain in more detail, what you want to achieve
with those "old" neighbor lists. most likely there is an alternate
way to achieve the same thing, probably in post-processing.

cheers,
    axel.

Hi everyone,

Thank you to have paid attention at my problem. I am going to explain my problem from a simple picture (see the attached file).
I model the mechanical behavior of two bodies by the lattice beam model. For the lattice model, the interactions are loaded once via a txt file. To do this, I created a specific neighbor list associated with my own pair style.

Then, the two bodies will be in contact and slide over each other. To simulate the slidding step, I need to detect during the simulation the new contacts created between red and blue spheres through an other neighbor list and pair style.

Now, you know why I need to build once a sub neighbor list and many times the second one.

I wish you a *** MERRY CHRISTMAS ***

Regards
JF

Lattice_contact.png

the interactions are loaded once via a txt file. To do this, I created a specific neighbor list > > associated with my own pair style.

I don't understand this part. Are you using the normal LAMMPS neighbor lists
to do/store this? If you are saying you only create and store this neighbor
list once at the beginning, I don't see how it can work in parallel. When atoms
move to other procs, the neighbor list will be corrupted.

So if you have to reform this main neighbor list, you should be able to let
the small red/blue neighbor list be reformed as well without much additional
cost.

Steve