simple elastic collisions between spheres and ellipsoids

for a school project, i wanted to show elastic collisions between spheres (shape 1,1,1) and ellipsoids (shape 3,1,1). im currently using resquared pair style (if there is any better pair_style for simulating this, please let me know!) but i am having difficulty understanding what the parameters/coeffs should be. i have read the documentation and the supplementary document but it was too complex for a high school student. i tried with random arbitrary coefficients but there is some overlapping on sphere-sphere, sphere-ellipsoid, and ellipsoid-ellipsoid collisions. can anyone explain to me how to find the perfect or best coefficients/parameters to put in the pair_coeffs and pair_style? or is this too complex for a highschool student and should i instead just try looking for another project?

here is my current script:

units lj
atom_style ellipsoid
dimension 2

lattice sq 0.05
region box block 0 20 0 20 -0.5 0.5
create_box 2 box

create_atoms 1 box

set group all type/fraction 2 0.3 95392

set type 1 shape 1 1 1 # Spheres (a = b = c = 1)
set type 2 shape 3 1 1 # Ellipsoids (a = 3, b = 1, c = 1)

set type 1 mass 1.0
set type 2 mass 1.0

group ellipsoids type 2
set group ellipsoids quat/random 18238

velocity all create 300 12345 loop geom

pair_style resquared 6.0
pair_coeff 1 1 1 2.5 1 1 1 1 1 1
pair_coeff 1 2 1.5 3 0 0 0 0 0 0
pair_coeff 2 2 2.0 3.5 1 1 1 1 1 1

neighbor 0.8 bin

thermo_style custom step temp etotal ke
thermo 100
timestep 0.0001

compute quat all property/atom quatw quati quatj quatk
compute ellipshape all property/atom shapex shapey shapez
dump 1 all custom 10 dump.ellipse.resquared &
id type x y z vx vy c_ellipshape[1] c_ellipshape[2] c_ellipshape[3] c_quat[1] c_quat[2] c_quat[3] c_quat[4]

fix 1 all nve/asphere
fix 2 all enforce2d

run 20000

Hi, if you haven’t already, I’d suggest looking at the ellipse examples:

What pair style and coefficients one should use depends on what physical system you want to simulate (molecular, macroscopic, etc.) so there isn’t a right/best answer. I will say that ellipsoidal potentials are not what I would recommend to someone first learning about molecular dynamics.

Overlaps are expected since these are simulations of soft particle dynamics, so that isn’t a bad thing per se. Truly hard/impenetrable particles would need a different event-driven code. If you just want smaller overlaps, you can play with decreasing the temperature/velocities to weaken impacts.

1 Like

If you switch to the Gay-Berne potential, you can play with the sigmac value to increase/decrease the hardness of the potential. In practice, with a small value of sigmac, you will get a narrow potential well and a harder potential wall. Please check this discussion: General gayberne potential questions (sigma) - #2 by hothello

1 Like