Pair_style gran/hooke forbids energy minimization due to PotEng=0?

I am using lammps-23Jun2022. When I run a granular system with “pair_style gran/hooke” in the case of jamming (most atoms are stuck), the energy minimazation (EM) ends in the first iteration because of “PotEng=0”, which means there is no interaction between particles. However, it is not true when I run it in nvt ensemble. In the nvt running, the random distributed particles tend to move and it is the exact evidence of interaction particles. How to explain the contradiction?

On the other hand, when I use “pair_style lj/cut”, PotEng is not 0 and EM runs as normal. Therefore, the question seems to lie in the interaction potential. I tried some parameters of “pair_style gran/hooke” but knew nothing new.

Besides, when using “pair_style lj/cut + EM” or “pair_style gran/hooke + NVT”, “Segmentation fault” occurs after iterating some steps. This error won’t happen below the jamming volume fraction but I just focus on the jamming system. How to deal with the trade-off of iteration step length and running time in a wise way instead of trial-and-error?

Any comments and help would be greatly appreciated !!!

Here is the code:

variable        ks equal 100000.0
variable        seed1 equal 1
variable        seed2 equal 2

units           lj
dimension       2
boundary        p p p
atom_style      sphere  

#------------------------System definition
lattice         sq  1.0                                             
region          box          block 0 350 0 350   0 0.1             

create_box      2 box                                                
create_atoms    1 random 42721  ${seed1}  box   
create_atoms    2 random 42721  ${seed2}  box 

set             type 1 diameter 0.9
set             type 2 diameter 1.3
set             atom * mass     1

write_data      initial.xyz

#------------------------Settings
velocity        all create 30 12345                     
pair_style gran/hooke    2000000.0     70000.0    500.0     30.0    0    0
pair_coeff * *

comm_modify     vel yes

neighbor        0.3 bin
neigh_modify    delay 0 every 1 check yes

#------------------------Running
min_style       sd  
minimize        1e-8 1e-8 5000000 5000000                     

thermo_style    custom step lx ly lz press pe temp        
write_data      bidispersed.xyz
fix             3 all nvt/sphere temp 0.01 0.01 0.01 disc    

timestep        0.0001
thermo          100

dump            1 all custom 10 bidispersed_2.xyz  id  type x y z        
dump_modify     1 sort id
run             1000

Since granular pair styles are dissipative, LAMMPS does not calculate an energy for pair gran/hooke (PotEng = 0). Therefore, the minimize command will not do anything. Since the minimize command doesn’t integrate rotational degrees of freedom, pair harmonic/cut may (or may not) work as a placeholder for pair gran/hooke depending on your needs.

Some other strategies for relaxing a system are also described in minimize command — LAMMPS documentation.

1 Like