trouble using rigid bodies in simulation (lost atoms)

Dear Lammps users,

  I am studying the diffusion of CO2 molecules in a carbon model. In
my simulation I fix the carbon atoms (setforce 0.0 ..) and make the
CO2 molecules as a rigid body molecule (having 3 atoms). However I get
the following error : "lost atoms:". After debugging I found that one
of the atoms of CO2 molecule is very close to a carbon atom (rsq = 0.5
Angsgtrom). This causes huge force and hence huge velocity on the
atom. I have the following question :

(1) Does the rigid body moves as a whole or the coordinates of the
atoms are updated individually.
(2) If one atom faces huge force then the whole rigid body also
experiene the huge force.
(3) Since the molecule is rigid, is it possible for one of the atoms
to be detached from the molecule.

I ran a simulation of timestep 0.5fs and got the lost atoms error.
Should I use a smaller timestep. Can you please suggest me a suitable
timestep for rigid body simulations.

Best Regards,
Surendra

Dear Lammps users,

  I am studying the diffusion of CO2 molecules in a carbon model. In
my simulation I fix the carbon atoms (setforce 0.0 ..) and make the
CO2 molecules as a rigid body molecule (having 3 atoms). However I get
the following error : "lost atoms:". After debugging I found that one
of the atoms of CO2 molecule is very close to a carbon atom (rsq = 0.5
Angsgtrom). This causes huge force and hence huge velocity on the
atom. I have the following question :

(1) Does the rigid body moves as a whole or the coordinates of the
atoms are updated individually.

​this question is answered in the documentation ​
http://lammps.sandia.gov/doc/fix_rigid.html

(2) If one atom faces huge force then the whole rigid body also
experiene the huge force.

​see (1)

(3) Since the molecule is rigid, is it possible for one of the atoms
to be detached from the molecule.

​no.​

I ran a simulation of timestep 0.5fs and got the lost atoms error.
Should I use a smaller timestep. Can you please suggest me a suitable
timestep for rigid body simulations.

​please make tests to find what works for your simulation conditions and
force field. there is no "the one right value(tm)".
please also note, that the situation you describe may as well be cause by
unsuitable or incorrectly entered force field parameters.​

​axel.​

Dear Axel,

  Many thanks for your response. I ran the simulation again at time
step of 0.05fs and still got the error :

ERROR: Lost atoms: original 7577 current 7574 (../thermo.cpp:427)

When I looked at the log file, I found that the temperature and
kinetic energy (of the rigid bodies) was fluctuating wildly. I am
using langevin
thermostat.

I have 2 options in my mind
(1) should I use pair_style soft in the beginning of the simulation. Is it
   possible to change the pair_style later doing the simulation.
(2) Is it correct to change the force to a smaller value (say to a
maximum of 100.0) for small distances. Will it affect the dynamics in
the long run.

Below is the input script :

Dear Axel,

  Many thanks for your response. I ran the simulation again at time
step of 0.05fs and still got the error :

ERROR: Lost atoms: original 7577 current 7574 (../thermo.cpp:427)

When I looked at the log file, I found that the temperature and
kinetic energy (of the rigid bodies) was fluctuating wildly. I am
using langevin
thermostat.

​please define "wildly". please also recall, that the magnitude of
temperature fluctuations ​varies with the number of particles.

I have 2 options in my mind
(1) should I use pair_style soft in the beginning of the simulation. Is it
   possible to change the pair_style later doing the simulation.

​switching pair styles is possible during a simulation. whether this is
useful in this case, i am unable to say.​

(2) Is it correct to change the force to a smaller value (say to a
maximum of 100.0) for small distances. Will it affect the dynamics in
the long run.

​this is a change in the force field and thus affect the validity of your
simulation.
​please recall, that i mentioned that the symptoms you are​ seeing can also
be cause by incorrect force field input.
since a see, that you have both, coulomb and lj interactions, your "force
spikes" could for example be caused by incorrect parameters, where atoms
get too close due to the coulomb forces becoming very strong at short
distance due to errors in the lennard jones resulting in it not repulsive
enough. if this hypothesis is true, through capping the force, you would
achieve the exact opposite of what you intend.

Below is the input script :

​this input is a mess!! it is full of commented out stuff and commands that
are not needed to debug and commands that make no sense.
overall, it is not something that inspires confidence in that you are doing
a good job here. if i was your adviser (which i am *not*), i would
encourage you to start over and build your system in small increments and,
e.g., figure out the correct settings for a stable and correct simulation
reproducing results of a pure CO2 system first. in fact, i would recommend
you find yourself a competent local(!) tutor, as none of us on this list
has the time to debug your input deck for you or teach you in detail how to
do that.

axel.