Atom/swap issue with hybrid/overlay

This is a similar issue to one that has been discussed in this forum in the past, but with slight differences. I see a segmentation fault using atom/swap with an atom style that defines per-type masses, which should work. It looks like this is an issue with the way the Buckingham is implemented in the pair hybrid/overlay. Removing the Buckingham and using the same input file modified for only two atoms runs fine. Am I not able to swap an eam atom for a Buckingham atom? Below are the important excerpts from the input file. Thanks!

#————————————————————————————————Initialization—————————————————————————————#

units metal
atom_style charge
atom_modify sort 0 0.0
atom_modify map array
dielectric 1.0
boundary p p p
variable tem equal 1500

variable lattpar equal 5.4
lattice fcc ${lattpar}
region box block 0 14 0 14 0 14 units lattice
create_box 3 box
create_atoms 3 box

lattice custom ${lattpar} a1 1 0 0 a2 0 1 0 a3 0 0 1 basis 0.25 0.25 0.25 basis 0.75 0.25 0.25 basis 0.25 0.75 0.25 basis 0.75 0.75 0.25 basis 0.25 0.25 0.75 basis 0.75 0.25 0.75 basis 0.25 0.75 0.75 basis 0.75 0.75 0.75
create_atoms 1 box

set type 3 type/ratio 2 0.5 97543

#Setting the variables to elements as they are assigned in the input structure file

variable O equal 1
variable Gd equal 2
variable U equal 3

#Group Types

group Uranium type ${U}

group Gadolinium type ${Gd}

group Oxygen type ${O}

#————————————————————————————End Initialization————————————————————————————#

#————————————————————————————————Potential—————————————————————————————————#

set type ${O} charge -1.110400

set type ${Gd} charge 1.6656

set type ${U} charge 2.220800

kspace_style pppm 1.0e-5
variable SR_CUTOFF equal 11.0

#below text had to be modified to display properly. the {SR_CUTOFF} has a $ in front #
pair_style hybrid/overlay buck {SR_CUTOFF} coul/long {SR_CUTOFF} eam/alloy
pair_coeff * * coul/long
pair_coeff * * eam/alloy /home/beelbw/lammps_work/potentials/CeThUNpPuAmCmO.eam.alloy O NULL U
pair_coeff 1 2 buck 37562.031393379206 0.19377082164993292 0

mass 3 238.02861
mass 1 15.9994
mass 2 157.25

---- skipping some lines for brevity -----

#Equilibrate # removed $ in front of the {tem} to display properly
fix 1 all npt temp {tem} {tem} 0.1 iso 0.0 0.0 0.5
timestep 0.0005

fix center all recenter INIT INIT INIT

fix 44 all atom/swap 5 1 97531 1500 types 2 3

run 5000


error message

YOUR APPLICATION TERMINATED WITH THE EXIT STRING: Segmentation fault (signal 11)

This typically refers to a problem with your application.

Please see the FAQ page for debugging suggestions

No. Fix atom swap will swap atom types but if you do so for atoms that are in different sub-styles of a hybrid sub-style, the neighbor list is no longer valid and includes atoms of a type that is not covered by that sub-style. With EAM this will cause a segmentation fault when trying to look up an atom type that is not mapped to EAM.

That said, your pair coeff setup is incomplete to begin with.

  • you have coul/long for all atoms, but that is incorrect for atoms with EAM
  • you have only coul/long for atoms of type 2 with 2, and 2 with 3 but nothing else.

Thanks. So the neighbor lists are not re-built to compute the atom/swap delta E? I would have assumed that it would need to do that in order to properly compute before/after energies. I assume that there is not a way to force neighbor list updates during the swap, as the swap occurs on a given timestep and neighbor lists can only be recomputed after a given timestep?

Also, the EAM potential was built in such a way as to include 1-1, 1-3, and 3-3 Coulombic repulsion terms in the pair potential itself. So, all Coulombic terms should be accounted for, and only the 2-2, 2-3 need to be defined in the input file. So I believe this is complete, albeit disguised.

It is not needed unless you have a hybrid pair style where the main neighbor list is split into separate sub-lists for each sub-style. So you can only swap between atoms that are represented by the same sub-style (or combination of sub-styles).