[lammps-users] Lost atoms in NVT simulation of Binary mixture

Hi,
I am trying to simulate a mixture of ellipsoid and spherical particles using the NVT ensemble via LAMMPS but at high density I get some error. Here I upload my input script and log file. Please tell me how I can solve this problem and go for higher density.

With regards,
Sahire

in.gbmix (2.65 KB)

log.lammps (3.83 KB)

there is not much useful information here. but also, for the most part, the job of making sure that a simulation will run smoothly is yours, not ours.

some general comments.

you are running a calculation with only 125 particles in parallel across 32 MPI ranks. that cannot be efficient. that is fewer than 4 particles per MPI rank. you will spend more time copying data for ghost atoms than actual computing. but also the small subdomain size will make it much more likely that you lose atoms if things are not perfect.

if you have issues with losing atoms, you have to output energies and trajectory frames more frequently. since in your case this is within the first 100 steps, you can do that output every step.
that will show you where things go wrong.

you have a very, VERY, VERY high potential energy in the first step. please keep in mind that with reduced units the output for potential and kinetic energy is normalized.
that means you have a very unfavorable initial geometry, most likely due to overlapping particles. this is not a surprise considering how you create your geometry.
this is obviously not a sustainable approach, so you need to come up with a more suitable way where you start with some relaxed geometry and then gradually compress it to the desired density. on top of that, you have to keep in mind that for dense systems, you need to take precautions like shortening the time step to avoid unstable time integration due to the large forces and large force and pressure fluctuations.

i suggest you spend some time reading through published literature discussing how simulations under such circumstances were performed and how systems need to be properly prepared and equilibrated to be meaningful. all of those steps are not really LAMMPS related but cover general MD simulation methodology, so you don’t even need to look for people that have used LAMMPS in their research, but you can refer to pretty much any suitable MD simulation paper.

axel.

HI,

If I do NPT simulation before the NVT in that case I can reach high density but for NPT simulation I fix for group 1 and group 2 particles but I get error in my workstation “ERROR: Must not have multiple fixes change box parameter x (…/domain.cpp:162)” and same script I run in cluster It give me results. Here I upload my input script and error log file and the log file which I get from the cluster. Please tell me why this happened?

Does this script have any problems ?

in.gbmix (3.59 KB)

log.lammps (3.64 KB)

log.lammps (35.9 KB)

HI,

If I do NPT simulation before the NVT in that case I can reach high density but for NPT simulation I fix for group 1 and group 2 particles but I get error in my workstation “ERROR: Must not have multiple fixes change box parameter x (…/domain.cpp:162)” and same script I run in cluster It give me results. Here I upload my input script and error log file and the log file which I get from the cluster. Please tell me why this happened?

the error message is quite self-explanatory. just look through your input and check if there are any fixes that manipulate the simulation cell. there must be only one that does it.

Does this script have any problems ?

yes, obviously or else LAMMPS would not complain. It may have run on the cluster, if that was using an older version of LAMMPS where the specific check for multiple fixes changing the box dimensions was not yet implemented or implemented incompletely.

axel.

Then If I want to simulate binary mixture How can I do it without fix npt/asphere for group 1 then fix npt/asphere for group 2 particle simultaneously in a simulation run?
I attached my input script here.

in.gbmix (3.59 KB)

there can be only one fix npt/asphere regardless of the thermostat, it will always compute the pressure for all atoms and that is the only option that makes sense.
how would two instances if a fix npt otherwise work? both would have to modify the box for all atoms since there is only one box.
So either apply fix ntp/asphere to the entire system (makes the most sense anyway) or use fix nvt/asphere for the second part of the system.
What makes you think that you need two different thermostats?

if I give command fix 1 all npt/asphere temp Tstart Tstop Tdamp iso Pstart Pstop Pdamp
then do you think it will simulate a mixture of two different kinds of particles present in the system ?
Do you think I don’t have to create two groups for particle 1 and particle 2?
If two particles have different degrees of freedom, what should I do ?

if I give command fix 1 all npt/asphere temp Tstart Tstop Tdamp iso Pstart Pstop Pdamp
then do you think it will simulate a mixture of two different kinds of particles present in the system ?

Why do you believe it should not work? Do you have proof?

Do you think I don’t have to create two groups for particle 1 and particle 2?

What I personally think is irrelevant (and you probably would not enjoy to hear what I think). What matters is physics. You need to provide a good argument that requires using two groups. OR a good argument against using only one group.

If two particles have different degrees of freedom, what should I do ?

Why would that matter? All the thermostat will care about is the total number of degrees of freedom so that it can correctly compute the temperature (and through it the pressure).

Axel.

If I give this command fix 1 all npt/asphere temp Tstart Tstop Tdamp iso Pstart Pstop Pdamp
for binary mixture I did not get correct results which I can compare.

incorrect or correct how? and is the use of the thermostat/barostat the only possible source of an error?

the fact of the matter is: using two instances of fix npt or combining fix npt with any other fixes that manipulate the same simulation cell dimension is an error and will result in undefined behavior in case LAMMPS does not “catch” it and abort.

But if I use two fix for two group of mixture which you can see my script above in that case I get results for density which I can compare correctly

How do you determine what is “correct”?

So you get the expected result for the wrong reason. How can you know that you just don’t have two errors that cancel by chance?

I will repeat this now for the last time. Using two instances of fixes that modify the same box dimension is incorrect at a very fundamental level and LAMMPS is correct in refusing to run such simulations. It is irrelevant that by using a LAMMPS version without that check you get the results you expect.
You rather have to figure out why you get unexpected results and then you can address the problem in a correct fashion.

Thank you for the clarification.