# Running LAMMPS on this file (eg. "lmp_mpi -i run.in.npt") minimizes the # system (ie. finds the nearest local energy minimum). This is useful to # push apart small overlaps between particles that would otherwise cause # LAMMPS to crash during a normal simulation run. # Do this before anything else. # # -------- PREREQUISITES: --------- # 1) This example requires the "EXTRA-MOLECULE" package. # If you encounter the error *"Invalid dihedral_style"*, then see this page: # https://lammps.sandia.gov/doc/Build_package.html # for instructions to compile LAMMPS to support this package. # 2) It also may require additional features and bug fixes for LAMMPS. # So, after typing "make yes-user-misc" in to the shell, ... # be sure to download and copy the "additional_lammps_code" from # http://moltemplate.org (upper-left corner menu) # 3) Unpack it # 4) copy the .cpp and .h files to the src folding of your lammps installation. # 5) Compile LAMMPS. # 6) Build the system using PACKMOL and MOLTEMPLATE # (Follow the instructions in README_setup.sh, or run that file as a script.) # # If LAMMPS complains about an "Invalid pair_style", or "Invalid dihedral_style" # then you made a mistake in the instructions above. # -- Init section -- include system.in.init # -- Atom definition section -- read_data system.data # -- Settings Section -- include system.in.settings # -- Run section -- dump 1 all custom 250 traj_min.lammpstrj id mol type x y z ix iy iz # minimize thermo_style custom step temp pe etotal vol epair ebond eangle thermo 100 # time interval for printing out "thermo" data thermo_modify norm yes # distribute particles evenly on available processors: balance 1.05 shift xyz 20 1.05 min_style quickmin min_modify dmax 0.1 minimize 1.0e-5 1.0e-7 5000 20000 # If minimization crashes, then instead try Langevin dynamics # with a small timestep and a fast damping parameter. For example: # # timestep 0.05 # fix fxlan all langevin 300.0 300.0 100.0 48279 # fix fxnve all nve # # run 10000 write_data system_after_min.data