# Create LAMMPS input files this way:
cd moltemplate_files

  # run moltemplate

  moltemplate.sh system.lt

  ######################### WEIRD LAMMPS QUIRK:###############################
  # The default pair_style used with the OPLSAA forcefield requires that SOME
  # atoms have non-zero charge.  Unfortunately, in this example none of them do.
  # (This does not happen very often.)
  # Since you don't need long-range coulombics in this example, LAMMPS will
  # print out an error message and tell you to use a more efficient pair_style.
  # To get around this AFTER RUNNING MOLTEMPLATE, run these commands in the
  # shell:

  echo "pair_style lj/cut 10.0" >> system.in.init
  sed 's/lj\/cut\/coul\/long/lj\/cut/g' system.in.settings > system.in.settings_
  sed 's/kspace_style/#kspace_style/g' system.in.init > system.in.init_
  mv system.in.settings_ system.in.settings
  mv system.in.init_ system.in.init

  # This will override the pair_style and pair_coeff commands in the
  # system.in.init and system.in.settings files (created by moltemplate):

  # Moltemplate generates various files with names ending in *.in* and *.data.
  # Move them to the directory where you plan to run LAMMPS (in this case "../")
  mv -f system.data system.in* ../

  # Optional:
  # The "./output_ttree/" directory is full of temporary files generated by
  # moltemplate.  They can be useful for debugging, but are usually thrown away.
  rm -rf output_ttree/

cd ../





# Optional:
# Note: The system.data and system.in.settings files contain extra information
# for atoms defined in OPLSAA which you are not using in this simulation.
# This is harmless, but if you to delete this information from your
# system.in.settings and system.in.data files, run this script:
#
# cleanup_moltemplate.sh
