Fixing particles on wall

Hi all,

I am trying a simulation where I want a type of particle to attach on inner surface of a sphere. My sphere is defined as:

variable radius equal 14.0
region nucleus sphere 500.0 500.0 500.0 v_radius side in
fix wall4 all wall/region nucleus lj126 1.0 1.0 1.12

As I go through LAMMPS documentation I see two options for attaching particle on wall:

  1. using a fix wall/region lj126 (attractive): I dont want to use it because LJ is short ranged. I want particle to attach definitely, something like harmonic.

Here comes the second option using tether,

  1. fix pull ligand spring tether 50.0 0.0 0.0 0.0 0.0

But here due to tether particle does not move on the inner surface of sphere.

There is another option fix wall/harmonic which only put repulsive interaction towards wall. I was thinking about using it by defining two sphere such that minima of harmonic occur on the inner sphere. (not sure whether it makes sense!!!)

Seeking your suggestions if there is a simple solution to it. Here is a summary which I want:

Particle should stay on the inner surface of sphere but they should also have the freedom to diffuse on the inner surface.

Thanks in advance!

Shouldn’t this be fix spring/self?

Check out the purpose of the R0 parameter. If you choose the center of the sphere as tether point and then R0 accordingly, you have a tether potential to sphere of radius R0.

This worked out nicely as per my requirement. Thanks Axel for the prompt response.

Dear Axel,

I feel there are issues in the following implementation.

https://docs.lammps.org/fix_spring.html

“The second example holds the ligand near the surface of a sphere of radius 5 around the point (0,0,0).”

fix pull ligand spring tether 50.0 0.0 0.0 0.0 5.0

“The equilibrium position of the spring is R0. At each timestep the distance R from the center of mass of the group of atoms to the tethering point is computed…”

The problem on a spherical surface is: even if two distinct particles are attached to spherical surface, their COM will be away from the spherical surface. Thus to minimize energy the particle will come closer to each other. It results in unwanted clustering of particles while the intention was to only bring them near the surface.

also, This issue will not be there if the attachment is to a planar surface.

Need suggestions. Thanks in advance.

This is how fix spring is programmed and how it works. So if you want to have multiple atoms tethered, you need multiple groups and attach a different fix spring instances to them.
Of course that is limited to about 30 atoms since you will run out of available groups.

To build a larger system with tethered particles, you have to invest more effort. You can, for example, set up your tether points as non-interacting and non-moving particles and have the tethered particles attached to them with a harmonic bond at the desired equilibrium distance.

I re-summarise my purpose:

Particle should stay on the inner surface of sphere but they should also have the freedom to diffuse on the inner surface.

Hence, tether points as non-interacting and non-moving particles is useless for me. I will try to come up with better solution. Thanks Axel for your time.

Also, given the fix spring algorithm, I believe the following statement in the documentation is not correct and should be modified with appropriate caution at some point:

The second example holds the ligand near the surface of a sphere of radius 5 around the point (0,0,0).

That sentence seems correct to be, but it could be misinterpreted. May be something like that would be clearer:

The second example applies a harmonic tethering force to the ligand, encouraging it to stay near a distance of 5.0 from the point (0,0,0).

Is the statement really incorrect? What would you change it to?

Claiming that documentation is incorrect requires evidence that the behaviour of a simulation is materially different from what has been described in documentation, along the lines of:

  • a minimal script demonstrating the problem
  • user description of what LAMMPS should do according to documentation
  • logs of what LAMMPS actually does

So far there hasn’t been any such evidence in this thread.

1 Like

Hi, I am attaching lammps script along with intitial file and log-file. LAMMPS version: 23 Jun 2022

Expectation: I should see individual particles randomly sitting on the inner surface of the defined sphere. 

(The second example holds the ligand near the surface of a sphere of radius 5 around the point (0,0,0))

Reality: They form cluster(s) and accumulate.

I think this is happening due to application of tether force on COM of a group of particles.

log.lammps (11.7 KB)
run.in (860 Bytes)
init.data (573 Bytes)

But that is what the documentation says it does. So the problem is your expectation, not fix spring or its implementation.

Your unmodified run.in does not work with fixed boundaries (boundary f f f) instead of shrink-wrapped boundaries (boundary s s s), a classic subtle hint of numerical instability. Looking at the following settings:

region	nucleus sphere 500.0 500.0 500.0 15.0 side in
fix	wall1 all wall/region nucleus lj126 1.0 1.0 1.12
fix	wall2 te spring tether 50.0 500.0 500.0 500.0 14.0
fix	wall3 ce spring tether 50.0 500.0 500.0 500.0 14.0

a particle always experiences very intense forces at a radial distance between 14 and 15 units away from the sphere center, resulting in numerical instability.

My guess is that the instability causes particles to “freeze” on the sphere (since any time they try to move transverse to the sphere they end up experiencing very high forces and strong damping from the thermostat). They don’t so much form clusters as retain their initial clustering that they can’t diffuse away from.

More importantly, removing the wall/region fix (and retaining the tether fixes) results in a simulation that runs with fixed boundaries and shows particles diffusing along the surface of the sphere as desired.

As further evidence of numerical instability:

Modifying the in.data file to bounds of 480-520 instead of 0-1000 makes it run properly on fixed instead of shrink-wrapped boundaries.

When removing the fix langevin thermostat (thus only an NVE integrator), while keeping both wall and tether fixes:

On the default setting of timestep 0.005 the dynamics immediately crash due to particles escaping outside the LJ wall region, regardless of boundary conditions.

On a timestep of 0.001, NVE integration results in stable trajectories with particles diffusing along the sphere wall as expected.

I hope this is a lesson: I assumed that fix langevin might be creating issues, so I tested both with and without that fix enabled. By contrast, you thought that fix tether might have an incorrect implementation, but I cannot see that you did any investigations to either isolate its effects or to run with and without it. One of these approaches yields results within a few minutes (thanks to your work creating a simple, minimal example); the other, a little more slowly.