How to fix position and orientation for ellipsoid

Dear All,
My goal is to model shear of liquid crystals with lower and upper plates.

I am trying to create fixed(do not drift or rotate) upper and lower plates composed of ellipsoid and Gay-Berne potential. then add force or velocity to move the plate.
I start by testing the fix momentum command with fix nve/asphere and fix langevin, but the particle still have position and orientation change.

I see examples for create upper and lower planes in /shear and /flow folder, they used fix setforce command after setting the region. Fix setforce works well for fix the position but the orientation is not fixed with ellipsoid.

How can I create fixed ellipsoid? Can I fix the position and rotatation with the fix momentum?

Thank you.

My LAMMPS version is stable_23Jun2022_update2, run on ubuntu 22.04.2

My test code:

#test fix momentum
#-----------------------------------
units		    lj
atom_style	    ellipsoid
dimension	    3

# create big ellipsoidal particles
lattice		    sc 0.2
region		    box block 0 10 0 10 0 10
create_box	    2 box
create_atoms	1 region box
set		        type 1 mass 1.0
set		        type 1 shape 1.0 1.0 0.345
group           big type 1

#uncomment to add initial velocity
#velocity	big create 8.0 87280 mom yes loop all

#particles
pair_style      gayberne/omp 1.0 2.0 1.0 2.0
pair_coeff      * * 5.0 0.345 0.2 0.2 1.0 0.2 0.2 1.0 2.0
neighbor	    1 bin
neigh_modify	delay 0 every 1 check yes

# compute, setting NVE/ASPHERE
velocity        all zero angular
velocity        all zero linear
fix             1 all nve/asphere
fix             2 all langevin 4.0 4.0 100.0 48279 angmom 3.333
fix             3 all momentum 1 angular

# output
compute         orient all property/atom quati quatj quatk quatw
compute         diameter all property/atom shapex shapey shapez

dump            1 big custom 100 test.dump id type x y z &
                   c_orient[1] c_orient[2] c_orient[3] c_orient[4] &
                   c_diameter[1] c_diameter[2] c_diameter[3]

thermo_style	custom step press etotal pe ke enthalpy
thermo          100

# RUN SIMULATION
timestep        0.00025
run.            2000
write_restart   test.restart
undump          1
unfix           1
unfix           2
unfix           3

Two things:

  • please do not use the term “fix” in the context of LAMMPS since it has a command called “fix”. It would be bad English anyway, because “fix” means “correct” and what you are after is to “fixate” or better to “immobilize” particles. So in general, you are strongly advised (also in future publications) to use the term “immobilize” to more accurately describe the step you are after
  • most of the commands in LAMMPS assume that particles are point particles, thus they have no orientation and they are not aware of that. Only commands that explicitly mention aspherical particles and/or torque or particle (not molecule) orientation will pay attention to the additional properties.

The best way to immobilize particles in LAMMPS is to not move them, and that can be easily achieved by not including them in the group to that a time integration fix command is applied.

All of these commands have no impact on ellipsoids’ orientation or torques.

1 Like

Thank you for your help!
I will use more accurate terms to describe my question in the future.
I see that these commands (and many others) only apply to point particles.
I think I will try to construct my wall with point particles and then move them with fix setforce & fix aveforce.