The simulation keeps running but the atoms stop moving

Hello everyone,

First, I am using the LAMMPS 29 August 2024 version.

I am simulating a membrane made up of carbons and a gas of hydrogens. The carbons are coupled with CH.airebo potential and the hydrogens interact via lj/cut. For the interaction between carbons and hydrogens I have used an improved Lennard-Jones potential that I have compiled. I am using a Nose-Hoover thermostat.

The issue is that the simulation runs well, but suddenly the atoms stop moving. However, there is no error and the simulation keeps running as usual. This is affected by the timestep : for a smaller timestep, it takes more time for the anomaly to appear.

I know that the most probable cause of this is some mistake in the implementation of the new potential. But I have reviewed it and everything seems fine. I would like to know if there could be another cause for this behaviour, something more general.

Thanks a lot.

What is ā€œan improved lennard-jones potentialā€?

There could be multiple possible reasons, but rather than speculate, why don’t you make your input deck and log file available? Then people can have a closer look and are not forced to speculate but point to specific details.

This ā€˜Improved Lennard-Jones’ has 3 parameters instead of 2, the reference is this one:
Phys. Chem. Chem. Phys.,2022, 24, 15840

I cannot upload the log file right now because it is currently running. I’ll do it once it finishes.
These are the essential steps of my input:


#------------------------------------------------------------------------------
# setup of the simulation
#------------------------------------------------------------------------------
units		metal
atom_style	atomic

boundary p p f	



#------------------------------------------------------------------------------
# read positions and velocities from the data files. Define groups of atoms
# and pair interactions 
#------------------------------------------------------------------------------
mass 1 12.0
mass 2 2.0

read_data 	data.gdy2 add merge 


create_atoms 2 random 50 341781 bulk1  
create_atoms 2 random 50 612769 bulk2  

variable nhy  equal 100
variable ncarbons equal 216


velocity hy create 300.0 12983459 dist gaussian

velocity carbons set 0.0 0.0 0.0

pair_style hybrid/overlay airebo 3.0 ilj/cut 8.0 lj/cut 8.0
pair_coeff * * airebo CH.airebo C NULL  

pair_coeff 1 2 ilj/cut 0.0045688 6.5  8.0
pair_coeff 2 2 lj/cut 0.00307 	3.00	8.0

variable totaltime equal 3000		# 3000ps = 3ns = 3·10⁻⁹s
variable deltat equal 0.001 		# 10⁻³ps = 1fs

variable nsteps equal ${totaltime}/${deltat}


variable tdamp equal 100*${deltat}	# Tdamp = 100Ā·dt


fix 1 all nvt temp 300.0 300.0 ${tdamp}
fix zwalls all wall/reflect zlo EDGE zhi EDGE
fix 2 carbon10 setforce 0.0 0.0 0.0   #

timestep ${deltat}
run	 ${nsteps}

You may ask, where is the third parameter that I have mentioned: it is inside the .cpp file. I modified the LJ one and I tried to change it as little as possible.

Then just upload the part that you have. If it is sufficient to tell that your atoms are frozen, then it is sufficient to diagnose it for the cause.

This is useless because it is incomplete and cannot run at all as it is shown. How do you know that not some other part of the input is causing problems?

log.lammps (36.7 KB)

Here is the log file. As you can see, the atoms suddenly stop and therefore the kinetic energy and the temperature drop.

You are right, I will see if I can upload all the files ( I don’t know if I am allowed to).

Thank you for your help.

That is not the full log either. You consistently keep withholding any useful information.
You have now exhausted my patience and you will have to wait for somebody else willing to assist you under such limited circumstances.

I am just an intern, so I don’t know what I can upload and what I can’t. As I said, I will try to upload everything when I am allowed to. But it’s alright.

Have you attempted to use a different published and ā€œsafeā€ interatomic potential? Did you visualise the movie?

I was using the usual lj/cut, whose .cpp file I modified to implement this ā€˜improved’ version. I have found that the problem is definitely inside this new file, because with an election of parameters that recover the original LJ potential, the result is not the same. However, I am still trying to find the issue.

I have taken a look at the movie. It does not always do weird things, depending on the time step used. I will have to review the whole .cpp file. I’ll upload it here once it is ā€˜clean’.

1 Like

Hey @akohlmey, this thread can probably be deleted since I have finally solved the problem and it’s therefore useless. Thanks.

Hi @mateors6,

the purpose of the forum and the previous mailing-list were to collect reports of odd behaviours of the software and discussions between users and developers.

A bit like Github issues, there is no reason to worry if the subject is still online even if solved. Someone can bump into it because they face a similar issue and use the advice/solutions given here in order to solve their own problem. :wink:

(But if you are that person and this was not helping, please open a new thread.)

Hi @Germain, thanks for your reply!

You are absolutely right. The thing is that I just had some mistakes within the .cpp file :sweat_smile:, but like you have said, it may help someone.