Problem in rigid body simulation

Hi

I am trying to simulate rigid dumbbells in two dimension. But the simulation is getting stopped in the middle of the run. I tried to vary the parameters but still the simulations are getting stopped. Can you please help. I am copying the input script with the molecule file here.

dimension 2
units lj
boundary p p p
atom_style bond
lattice sq 0.31
region simbox block 0 40 0 40 -0.01 0.01
create_box 2 simbox &
bond/types 1 &
extra/bond/per/atom 1
molecule dumbbell molecule.txt
create_atoms 0 region simbox mol dumbbell 323324
neighbor 0.6 bin
neigh_modify every 1 delay 0 check yes
mass * 0.02
bond_style harmonic
bond_coeff 1 1000.0 1.0
pair_style lj/cut 1.122462048
pair_modify shift yes
pair_coeff * * 1.0 1.0 1.122462048
comm_modify vel yes cutoff 2.5
minimize 1e-4 1e-6 100000 100000
velocity all create 1.0 235092 mom yes rot yes dist gaussian
fix 1 all rigid/nve/small molecule
fix 2 all langevin 1.0 1.0 1.0 564302
fix 3 all enforce2d
timestep 0.0001
thermo 100
run 200000000

molecule file

2 atoms
1 bonds

Coords

1 0.0 0.0 0.0
2 1.0 0.0 0.0

Types

1 1
2 1

Bonds

1 1 1 2

  1. It is very bad to start your first post without reading the forum guidelines. Please do it and correct your post by adding meaningful information.
  2. Please describe your problem in scientific language. The fact that the simulation stops does not tell me anything. An error might.
  3. Your timestep is too small. I have used timestep 0.001 and run your simulation for over 2M steps without problems, with LAMMPS 21Nov23.

I have no idea what you want to gain by running 200M steps on such a small and simple system, but who am I to say?

1 Like

Sorry for the confusion. I am using LAMMPS 28 March 2023. The simulation stops after 70000 steps.

Please report the error that you get from your simulation, and also quote any code in the preformatted text box (</> button). FYI, this is how an input file should look:

dimension 2
units lj
boundary p p p
atom_style bond
lattice sq 0.31
region simbox block 0 40 0 40 -0.01 0.01
create_box 2 simbox bond/types 1 extra/bond/per/atom 1
molecule dumbbell molecule.txt
create_atoms 0 region simbox mol dumbbell 323324
neighbor 0.6 bin
neigh_modify every 1 delay 0 check yes
mass * 0.02
bond_style harmonic
bond_coeff 1 1000.0 1.0
pair_style lj/cut 1.122462048
pair_modify shift yes
pair_coeff * * 1.0 1.0 1.122462048
comm_modify vel yes cutoff 2.5
minimize 1e-4 1e-6 100000 100000
velocity all create 1.0 235092 mom yes rot yes dist gaussian
fix 1 all rigid/nve/small molecule
fix 2 all langevin 1.0 1.0 1.0 564302
fix 3 all enforce2d
timestep 0.001
thermo 1000
dump 1 all atom 1000 sim.dump
run 200000000

And this is the additional file:

molecule.txt
# Molecule

2 atoms
1 bonds

Coords

1 0.0 0.0 0.0
2 1.0 0.0 0.0

Types

1 1
2 1

Bonds

1 1 1 2

Our of curiosity, where did you find the parameters that you are using? Using units LJ and then setting the only mass of your system to 0.02 is quite uncommon.

Simon

Here I am attaching the Lammps script and the log file and I am pasting the error on the file “LAMMPS (28 Mar 2023)” which I am getting on the screen. I am still getting the error with the time step 0.001. Can you please help.

LAMMPS (28 Mar 2023).txt (3.8 KB)
log.lammps (3.3 KB)
molecule.txt (163 Bytes)
System_dumbbell_rigid_EQ.in (734 Bytes)

I see you get a segmentation fault. I have no problem running your input with version 21Nov23 and 30Oct19, so probably the issue is with your local binary. How did you compile the version you are using? Can you switch to the latest stable and run again your simulation?

Besides, @simongravelle raised a valid point which I have overlooked, but totally endorse. An answer is much appreciated, if you want to encourage people to dedicate their time to help you.

1 Like

Agreed. For a single component system with reduced units, the only effect of changing the mass is that it will change your time scale and thus will require a shorter timestep. So with a reduced mass of 1.0 the job will easily run with the default timestep of 0.005. In fact, using mass 0.02 and a timestep of 0.001 is equivalent to mass 1.0 and a timestep of about 0.007.

This combination is a bad idea. It would be better to apply the langevin thermostat directly to the translational and rotational degrees of freedom of the rigid object, which is done with:

fix 1 all rigid/small molecule langevin 1.0 1.0 1.0 564302

Furthermore, there was a (subtle) bug for 2d systems with rigid objects that was fixed with LAMMPS version 21 Nov 2023. So it is strongly recommended to update your LAMMPS version accordingly. There is no segmentation fault with that version on my machine.

1 Like

Now I am running the LAMMPS version 21 Nov 2023 according to your suggestions. With that new version I use the time step 0.001 with “fix 1 all rigid/small molecule langevin 1.0 1.0 1.0 564302” and it is running up to 2000000 steps without any problem. But, after that the simulation again stops at 2644000 step. I am attaching the input script and the log file.

log.lammps (231.3 KB)
molecule.txt (163 Bytes)
System_dumbbell_rigid_EQ.in (720 Bytes)

You did not address all the comments that were addressed to you here and keep using a mass of 0.02, so I really don’t know what type of help you are hopping to receive with that new message.

I want to study the effect of mass on the dynamics. Thus, I fix the damping factor and I want to vary the mass. I start from mass 0.02. The dynamics is underdamped and earlier I choose the time step 0.0001. But with the LAMMPS new version 21 Nov 2023, the script is running for 2M steps with time step 0.001 and mass 0.02. After that the LAMMPS script stops running after 2M steps even with the new version 21 Nov 2023.

By changing the mass, you are impacting the timestep (cf @akohlmey comment), so unless you adjust ALL the relevant parameters every time you change the mass, the comparison between simulations with different masses will likely be meaningless. I wouldn’t use the Lennard-Jones units system in your place. See the numerous posts about the confusion surrounding this units system.