Dear lammps users,
I want to simulation a system for region box block 0 8 0 8 0 8 and density=0.3.
The program were giving the error (nans) for region box block 0 8 0 8 0 8 and density=0.3 before.
I use fix_deform to compress the box. The target length of the box is determined by the concentration:
Vbox_target = N / rho = 512 / 0.3 = 1706.7
Lbox_target = pow(Vbox_target, 1/3) = 11.95
Now I have input script the following after some change. When I run it I don’t have any error.But I have doubts it’s correct or not.
For example:
1-I am using together fix nvt and fix deform???
2-I have specified compute ids as 1_temp, 3_temp, 4_temp for compute_modify command???
Could any tell me it’s correct or not or any suggest?
Thanks in advance
units lj
atom_style ellipsoid
lattice sc 0.01
region box block 0 8 0 8 0 8
create_box 1 box
create_atoms 1 box
set group all quat/random 982381
mass 1 1.5
shape 1 1 1 3
compute rot all temp/asphere
group spheroid type 1
variable dof equal count(spheroid)+2
compute_modify rot extra ${dof}
velocity all create 2.0 41787 loop geom
pair_style gayberne 1.0 3.0 1.0 4.0
pair_coeff 1 1 1.0 1.0 1.0 1.0 0.2 1.0 1.0 0.2 4.0
neighbor 0.3 bin
timestep 0.002
thermo_style custom step temp etotal vol epair press pe
thermo 100
Do the box rescaling with an NVT thermostat for 5 million time steps or longer to avoid overlapping while compressing because the initial box length is now 37.1
fix 1 all nvt/asphere 2.0 2.0 1.0 drag 1.0
fix 2 all deform 10 x final 0 11.95 y final 0 11.95 z final 0 11.95 units box
compute_modify 1_temp extra ${dof}
restart 1000000 restart_*.dat
run 5000000 upto
This unfix is to remove the box rescaling
unfix 1
unfix 2
Now actually run the simulation at the target concentration
fix 3 all npt/asphere 2.0 2.0 0.1 xyz 0.0 8.0 0.1
compute_modify 3_temp extra ${dof}
run 5100000 upto
unfix 3
fix 4 all npt/asphere 2.0 2.0 0.1 xyz 8.0 8.0 0.1
compute_modify 4_temp extra ${dof}
run 5200000 upto