Atoms start at zero on NVE

Dear all,

I made a monoatomic gas simulation using NVE ensemble. But when I run the code, it outputs zero atoms until step 30 and then goes directly to 1000 atoms as I have defined on the input file.

Why does it happens?

Thanks :slight_smile:

# Monoatomic gas - Argon
# PART A - ENERGY MINIMIZATION
# 1) Initialization
units           lj
dimension       3
atom_style      atomic 
pair_style      lj/cut 2.5
boundary        p p p #no interactions with walls

#sigma = 3.405
#e/kB = 125.2

# 2) System definition
region          simulation_box block -450 450 -450 450 -450 450 #dist�ncia entre �tomos = 6.67 sigma
create_box      1 simulation_box
create_atoms    1 random 1000 260702 NULL 
group           all type 1

# 3) Simulation settings
mass            1 1
pair_coeff      1 1 1.0 1.0 #energy; distance
velocity        all create 0.998 196466 dist gaussian #T* = TkB/e

# 4) Visualization (thermodynamic props)
thermo 1
thermo_style custom step atoms temp press pe ke etotal vol 

# 5) Energy minimization (stopping criteria)
minimize 1e-6 1e-8 1000 10000 #etol; ftol; maxiter; maxeval


# PART B - MOLECULAR DYNAMICS
# 4) Visualization
thermo          1
dump            monogas all atom 100 dump.monogas.nve.lammpstrj
atom_modify     sort 0 0.0

# 5) Run
fix             simpad all nve #plain time integration to update position and velocity
timestep        0.001
run             10000

Hello,

I don’t see what you are describing.

When running your script, I see that 1000 atoms are created right from the start:

create_atoms    1 random 1000 260702 NULL
Created 1000 atoms
  using lattice units in orthogonal box = (-450 -450 -450) to (450 450 450)
  create_atoms CPU = 0.001 seconds
group           all type 1
1000 atoms in group all

And that 1000 atoms are there from step 1:


Per MPI rank memory allocation (min/avg/max) = 1042 | 1042 | 1042 Mbytes
   Step        Atoms         Temp          Press          PotEng         KinEng         TotEng         Volume    
         0        1000   0.998          1.3676296e-06  0              1.495503       1.495503       7.29e+08     
         1        1000   0.998          1.3676296e-06  0              1.495503       1.495503       7.29e+08     
Loop time of 3.4712e-05 on 1 procs for 1 steps with 1000 atoms

I used the 2Apr2025 version.

Simon

3 Likes

@vitoriamorseli Please always report which LAMMPS version you are using and on which platform you are running. Please see the forum guidelines post for explanations. Also, providing a sufficient chunk of your output can confirms your claims would be extremely helpful.

I ran the script again and now it worked! Thank you so much :slight_smile:

I used the 4Feb2025 verson.

Vitória

Ok, thank you! Next time I’ll be sure to do that.