Procedures

  1. Go to the directory containing all xyz files that needed to be optimized. If  the input file is in Gaussian input form:
    • To convert one file to the XYZ format, use ~/mopac/gifcom2xyz.py gaussian-input-file-name.
    • To convert multiple files to XYZ format, use for i in *; do ~/mopac/gjfcom2xyz.py $i; done.
      • “*” means all files in the current directory.
      • You can change “*” to “*.com” if the files that needed to be converted are all ended with “.com”.
  2. Create files and folders for one or more XYZ files to conduct PM6 optimization in parallel using ~/mopac/pm6opt_parallel.py charge multiplicity.
    • charge: An integer that represents the charge of all xyz files.
    • multiplicity: An integer that shares by all the xyz files calculated using 2S+1.
    • For example: ~/mopac/pm6opt_parallel.py 2 1.
  3. Edit the time, partition and account in “parallel_run.sh” if needed.
  4. Submit the PM6 OPT tasks using sbatch parallel_run.sh.

Process Output

  1. After the task completes, stay in the same directory and type ~/mopac/extract_pm6opt.py.
    • You will see the energy file named with “pm6energy.csv” and  all optimized structures that are reformatted to Gaussian input in the directory named with “optresult”.
    • If you want to change the default route section of the Gaussian input, open and edit the ROUTE on the 7th line of “~/mopac/extract_pm6opt.py”.
  2. Go to “optresult” folder and run scripts to pick distinct conformers from all snapshots.

Additional Keywords

  • If job fails because of not self-consistency,  add  mopac_keywords: "camp" to “inp.yaml” file.
    • One way to achieve that is to delete the pound sign “#” on line 15 of  “~/mopac/pm6opt_parallel.py” to before Procedure 2. To show the line number, type :set nu directly after open the file using vi.
    • Another way to add the keyword to multiple inp.yaml files under all subdirectories is to use command: for i in */inp.yaml; do echo 'mopac_keywords: "camp"' >> $i; done.
  • If need to fix specific atoms such as atom 58 and 65 for a 65-atom molecule during the optimization, add keywords optimize_region: "1-57,59-64"  to “inp.yaml” file.
    • One way to achieve that is to delete the pound sign “#” on line 16 and edit the atomic numbers before Procedure 2.
    • Another way is to add these keywords to multiple inp.yaml files under all subdirectories is to use command: for i in */inp.yaml; do echo 'optimize_region: "1-57,59-64"' >> $i; done.