Attach polymer in a 2D surface

Dear LAMMPS users and developers,
I am working with a reaction diffusion model where two types of bio-polymers (proteins) diffuse and react (using bond/react and bond/break command) in 3D volume. To model cell-membrane bound receptor proteins, I need to attach one polymer type in 2D surface. In a bead spring picture, one bead of such receptor proteins will only diffuse in a 2D surface, rest of the connected beads can diffuse in the vicinity. Is there a way to model such system in LAMMPS? I am a relatively new user. So any direction would be highly appreciated. Thanks in advance!

To have a group of atoms only diffuse in x- and y- but not in z-direction you can do the following.

  • define a group that has only the polymer head group atom that is attached to the surface
    e.g., if that kind of atom has atom type 4, then you can do group heads type 4.
  • set the velocity in z-direction for those atoms to zero. velocity heads set NULL NULL 0.0
  • set forces in z-direction to zero with fix confine heads setforce NULL NULL 0.0
  • apply time integration to all atoms fix move all nvt temp 300.0 300.0 1.0

This way all chain atoms will move freely as far as the force field allows them, but the head group atoms will remain at constant z position.

1 Like

Thank you Dr. Kohlmeyer, for such a quick response. I tried to implement your suggestion.

I have two atom types in a polymer [1,2,2,2…]. Type 1 should diffuse in a 2D plane, while others should be free to diffuse in 3D. Following script does not produce the desired result. All atoms (including type 1) seem to be diffusing in 3D. I am not sure whether I am making a mistake somewhere.


group heads type 1
velocity heads set NULL NULL 0.0
fix confine heads setforce NULL NULL 0.0
minimize 1.0e-4 1.0e-6 20000 20000 # force_tol, energy_tol, maxiter, maxeval
fix fxlan all langevin 310 310 500 13474
fix fxnve all nve
timestep 20
run 50000

Please try replacing fix nve plus fix langevin with fix nvt.

UPDATE: You must not have followed my suggestion correctly. If I modify the LAMMPS micelle example as in
in.micelle-1d (1.8 KB)
Then the motion of that head atoms is restricted to the y direction. Commenting out the block with velocity and setforce command as indicated, results in a full 2d motion of the atoms.

I am not sure what was the problem. Script 1 did not work, but script 2 did. The order of “confine fix” and “langevin fix” seems to be important. Anyhow, I have a functional script now which gives desired output. Thanks a lot for all your help! Appreciated :slight_smile:

Script 1

group head type 1
fix confine head setforce 0.0 NULL NULL
velocity head set 0.0 NULL NULL
minimize 1.0e-4 1.0e-6 20000 20000 # force_tol, energy_tol, maxiter, maxeval
fix fxlan all langevin 310 310 500 13474
fix fxnve all nve

Script 2

minimize 1.0e-4 1.0e-6 20000 20000 # force_tol, energy_tol, maxiter, maxeval
fix fxlan all langevin 310 310 500 13474
fix fxnve all nve
group head type 1
fix confine head setforce 0.0 NULL NULL
velocity head set 0.0 NULL NULL

Yes, it is. Fix langevin adds a random force to all force components and fix setforce will set force components to a given value. Both fixes are active in the same phase of a timestep, Modify::post_force(). For fixes that are active at the same “phase” the order in which they are defined sets the order in which they are invoked.
So if fix setforce comes first, it will zero out the force from the force field, but not the random force from fix langevin. That it can only do if it is defined later.

1 Like