Recently I am trying to get some production data in LAMMPS and it seems to be quite slow. I am seeking advice on how to speed up my calculations. The reactions I am simulating have a fairly high activation energy (~10-15 kcal/mol) and take place in solvent, so it is imperative to have the fastest computation times possible.
Are there any tips or tricks to speed up your computations using ReaxFF?
Is there anything obviously wrong or anything that would considerably slow down computations in the following script:
atom_modify map array sort 1000 0.0
read_dump dump.system 401000 x y z box yes
pair_style reax/c lmp_control
pair_coeff * * ffield.reax.chosi C H O Hc C O Si Hc H O
neighbor 2 bin
neigh_modify every 10 delay 0 check yes
fix 1 all qeq/reax 1 0.0 10.0 1e-6 reax/c
variable Density equal mass(all)*1.66053892/vol
thermo_style custom cpu step time etotal pe temp press v_Density
dump 1 all atom 500 dump.restart
fix 3 all restrain bond 4609 4610 50.0 50.0 1.52
fix_modify 3 energy yes
fix 4 all restrain bond 4611 4620 50.0 50.0 1.42
fix_modify 4 energy yes
fix 5 all restrain bond 4612 4617 50.0 50.0 1.42
fix_modify 5 energy yes
fix 6 all restrain bond 4613 4614 50.0 50.0 1.42
fix_modify 6 energy yes
Lots of bond restraints
fix 4992 all restrain bond 4605 4606 50.0 50.0 1.10
fix_modify 4992 energy yes
fix 4993 all restrain bond 4605 4607 50.0 50.0 1.09
fix_modify 4993 energy yes
fix 4994 all restrain bond 4605 4608 50.0 50.0 1.09
fix_modify 4994 energy yes
fix 4995 all nvt temp 2000.0 2000.0 100.0
fix 4996 all momentum 1000 linear 1 1 1
fix 4998 all reax/c/bonds 1000 bonds.reaxc
Currently, I am simulating at high temperatures (1500K-2500K) to even see these reactions happen, and I have been using fix restrain in order to prevent decomposition reactions at high temperatures.
I have tried editing the following molecular dynamics parameters and obtain a small or negligible speed benefit:
-fix qeq/reax convergence cutoff
-fix qeq/reax Nevery
-In lmp_control, granularity of long range tabulation (currently using 1000 points)
I have also tried benchmarking my version of lammps and find that I am about 20-30% slower, which is expected as I am using 6 y/o hardware.
On scaling my system I find shorter cpu-time per timestep.
With a system of 8748 atoms. The cpu time for 100 steps:
4 processors: 45s
8 processors: 27s
16 processors: 17s
32 processors: 11s
64 processors: 8.3s
I have also tried using different compilers and optimization levels with lammps, but I only found 3-5% difference in each case.
PhD Candidate Student
University of California, Davis