Freezing issue of a particular group

Dear LAMMPS Users,
I'm doing a simulation on diffusion of particles in polymer. I am able to
simulate our system in dynamic phase. But when i am trying to simulate the
system in static phase (polymer is static or freeze) using the command
setforce 0.0 0.0 0.0 on a particular group (polymer) in same lammps script
using fix langevin in NVE ensemble, it shows the ERROR on proc 0: Bad FENE
bond (src/MOLECULE/bond_fene.cpp:92).
I have also tried by excluding the group (polymer) from fix NVE (fix 3
particles nve) and fix langevin (fix 4 particles langevin 1.0 1.0 10.0
159637), is it correct method to freeze the polymer ?

Dear LAMMPS Users,
I’m doing a simulation on diffusion of particles in polymer. I am able to
simulate our system in dynamic phase. But when i am trying to simulate the
system in static phase (polymer is static or freeze) using the command
setforce 0.0 0.0 0.0 on a particular group (polymer) in same lammps script
using fix langevin in NVE ensemble, it shows the ERROR on proc 0: Bad FENE
bond (src/MOLECULE/bond_fene.cpp:92).
I have also tried by excluding the group (polymer) from fix NVE (fix 3
particles nve) and fix langevin (fix 4 particles langevin 1.0 1.0 10.0
159637), is it correct method to freeze the polymer ?

please recall newton’s equations of motion. no force means no change; not no motion.
so unless you also set the velocity to zero, the particles with no force will continue to move at their given velocity disregarding any bonds or other interaction forces (since you reset them to zero).

axel.

Hi Praveen

As Axel said, you should not use “setforce” to immobilize atoms.

Typically to immobilize a group of atoms, you would omit them from the group of atoms which you send to “fix nvt” or “fix npt” (or “fix nve” and “fix langevin”). All of these fixes require a group argument (which is usually “all”). However in your case, you would define your own group which only includes the atoms which you want to move. This has the advantage of being a little bit faster (since you don’t have to integrate their equations of motion), and simpler, compared to using the velocity command.

If you want to do this under constant pressure, it’s a little bit harder. There are several ways to do that. There is a link to long discussion about them:
https://sourceforge.net/p/lammps/mailman/message/32396301/

Andrew

Thank you so much,
Actually, I defined the lj interaction between the polymer group and
particles and a WCA repulsive potential between the same group of atoms.
I excluded the group of atoms (which i want to freeze, in my case it is a
polymer group) from "fix nvt" and "fix langevin" but problem is that,
there is no movement or jumping (only just a vibration type around its
initial position) of group of particles which is mobile when i visualized
in VMD.
please provide me some suggestions.

Thanks in advance.

Thank you so much,
Actually, I defined the lj interaction between the polymer group and
particles and a WCA repulsive potential between the same group of atoms.
I excluded the group of atoms (which i want to freeze, in my case it is a
polymer group) from “fix nvt” and “fix langevin” but problem is that,
there is no movement or jumping (only just a vibration type around its
initial position) of group of particles which is mobile when i visualized
in VMD.
please provide me some suggestions.

If the atoms are moving, even only slightly, then you are doing something right.

It sounds like the packing density is too high. It could also be that group of atoms that you immobilized (that you omitted from fix nvt) may be larger (or different) than you expected, or that you have a problem with your thermostat.

(Perhaps I misunderstood you, but you should not run both fix nvt and fix langervin simultaneously. But this is probably not the reason for the problem you describe.)

Whenever strange things occur, try simplifying your system. Perhaps in this case you could try eliminating the immobile atoms from your system. If that is too difficult, then start with allowing all of the atoms to move (by using fix nvt with group “all”). Does the system behave the way you expect in that case? If not, then perhaps your packing density is too high. (Try using a larger box, either by editing the “Boundary” setting of the data file, or by using the “change_box” command.) And make sure your temperature is reasonably high and that you are using the LAMMPS’ “units” command correctly.

(This probably won’t help, but also try replacing fix nvt with a combination of both fix langervin and fix nve. They were intended to be run simultaneously. In a way, this is simpler than using fix nvt, in my opinion because the nose-hoover thermostat used by fix nvt can behave strangely at early times. And use the “velocity” command to insure that the simulation begins with the atoms moving instead of stationary.)

Keep reducing the complexity of the system until it starts behaving sanely. (A useful debugging skill in general.) Good luck.

Andrew