Fix wall/region

I need to model LJ 126 interactions between atoms (340 different types/atoms) and a wall (region) which is represented as a region (sphere). The parameters of LJ 126 interaction between the wall and each atom are different (340 different pairs of LJ parameters). I created a sphere as a region (wall) and 340 groups in the hope of using fix wall/ region lj126 command, but the number of groups is limited to 32. Do you know another way to model such interactions?

Why not applying the fix wall to all atoms regardless of their type? Unless you want 340 different spheres and 340 different wall/region, I don’t see the point of regrouping each atom type per group…

The system I model consists of 1168 atoms which are inside a sphere. The total number of atom types is 340. Each atom belongs to one of the atom types.
Each atom type interacts with the sphere by LJ126 with different values of sigma, epsilon, and r_cut. What is the simplest way to model such the LJ 126 interactions?

Oh OK, then I don’t know if that is possible.

You still have the possibility to replace the wall/region by actual atoms, but at a computational cost of course.

I don’t think that there is a simple way.

But I would not use fix wall/region for this, but rather model your sphere as another atom type and then exclude this atom from time integration so it will remain fixed in space.

That would ultimately be somewhat similar to pair style colloid, but only that for pair style colloid the “small” particles are outside and not inside.

For prototyping, you could use pair style lepton and just a small number of atoms with only a few atom types. If that works out well, enough, you can then do the whole thing (and you’ll probably need to write a software to generate all the pair_coeff commands). Since this is pairwise additive, you can then output all interactions with pair_write to a (gigantic) table file or you can go ahead and implement this in C++ as a variant of pair style lj/cut where you add a flag to indicate which atom type is the “large” atom and then modify the interaction accordingly since the distance is reversed, i.e. starting at the cutoff instead of r=0.

I just did a quick check with just one LJ atom type and a containing sphere using pair style lepton for the sphere. Seems to be working as expected. Note that you need to adjust the neighbor list “one” and “page” settings because the confinement sphere has to have all contained particles as neighbors.

units		lj
atom_style	atomic
boundary        f f f

lattice		fcc 0.8442 origin 0.5 0.5 0.5
variable lat equal 1.68

region		box block 0 20.0 0 20.0 0 20.0
create_box	2 box

region          sphere sphere 10.0 10.0 10.0 9.0
create_atoms	1 region sphere
create_atoms    2 single 10.0 10.0 10.0

mass		1 1.0
mass            2 1000.0

neigh_modify one 10240 page 1024000

pair_style hybrid lj/cut 2.5 lepton $(10.0*v_lat)
pair_coeff 1 1  lj/cut 1.0 1.0
pair_coeff 1 2  lepton "4.0*eps*((sig/(rcut-r))^12 - (sig/(rcut-r))^6);eps=1.0;sig=1.0;rcut=9.0*v_lat" $(9.5*v_lat)
pair_coeff 2 2  lj/cut 0.0 1.0 0.1

group mobile type 1

thermo 10
timestep 0.005

minimize 0.0 0.0 100 1000
velocity all create 3.0 2346234

fix 1 mobile nve
thermo 50

dump 1 all atom 10 insidesphere.lammpstrj
run 500

Just run the code above:

LAMMPS (23 Jun 2022)
Lattice spacing in x,y,z = 1.6795962 1.6795962 1.6795962
Created orthogonal box = (0 0 0) to (33.591924 33.591924 33.591924)
1 by 1 by 1 MPI processor grid
Created 12190 atoms
using lattice units in orthogonal box = (0 0 0) to (33.591924 33.591924 33.591924)
create_atoms CPU = 0.002 seconds
Created 1 atoms
using lattice units in orthogonal box = (0 0 0) to (33.591924 33.591924 33.591924)
create_atoms CPU = 0.000 seconds
ERROR: Illegal pair_style command (src/pair_lj_cut.cpp:424)
Last command: pair_style hybrid lj/cut 2.5 lepton $(10.0*v_lat)

Your LAMMPS version is too old. As can be seen from the documentation, the LEPTON package appeared in version 8 Feb 2023: 6.2. Package details — LAMMPS documentation
We just last night released a new stable version (2 Aug 2023) that also has this included.

For testing puposes, you can just download the lammps-linux-x86_64-2Aug2023.tar.gz archive from the release page and use the lmp binary in there. It should work on any x86_64 Linux machine, but it has only OpenMP parallelism built in (MPI is not as portable across machines as OpenMP).

Thank you for the clarification.

I want to model LJ purely repulsive interactions between the beads and the wall (fix wall/lj126) with rcut=1.122*sig. lj126 potential (fix wall/lj126) is a shifted potential (energy zero) at the cut-off distance?