I want to compute the standard free energy difference for proton exchange between heliotridane and a molecule which I'll call compound 1 (comp1)
heliotridaneH+ + comp1 <=> heliotridane + comp1H+
To do this I need to geometry optimize in the gas phase and then do a single point calculation using a solvation model, all using GAMESS. I want to automate this so I can do it for comp2, comp3, ...
To do this I use bash and the python programs listed below
Step 1 make a file file called smiles.list which contains the name and SMILES strings, which defines both the molecule, the protonation state, and the conformation around the protonated N. I still need to automate this step.
Step 2 make so-called header files for the geometry optimization (pm6_opt.header) and solvation energy (pm6_sol.header) calculations. These files contain the relevant keywords for the calculations.
Step 3 convert the SMILES strings to 3D coordinates (xyz files).
python smiles2coord.py smiles.list
This also creates som sdf files which I can now remove (rm *.sdf).
Step 4 convert the xyz files to GAMESS input files for geometry optimization
When naming the molecules in smiles.list I was carefull to label all the protonated forms with a "+".
Step 4 convert the xyz files to GAMESS input files for geometry optimization
When naming the molecules in smiles.list I was carefull to label all the protonated forms with a "+".
for x in *.xyz; do babel -ixyz $x -ogamin ${x%.*}_opt.inp -xf pm6_opt.header; done
I could have modified smiles2coord_lis.py to generate these files directly, but I like to keep things modular. At this point I can also get rid of the xyz files (xyz files).
Step 5 change the charge for the protonated forms.
Step 5 change the charge for the protonated forms.
sed -i 's/icharg=0/icharg=1/g' *+*.inp
Step 6 submit the GAMESS calculations.
Step 6 submit the GAMESS calculations.
for x in *_opt.inp; do submit_gamess $x; done
My GAMESS submit script is called "submit_gamess"
Step 7 wait til all the optimizations are done and that they all converged.
grep EQUILIBRIUM *.log
Step 8 transfer the optimized geometry to a new input file for the solvation energy calculations
for x in *_opt.log; do babel -igamout $x -ogamin ${x%.*}_sol.inp -xf pm6_sol.header; done
Step 9 change the charge for the protonated forms.
Step 11 wait til all the optimizations are done and that the calculations finished normally.
sed -i 's/icharg=0/icharg=1/g' *+*_sol.inp
Step 10 submit the GAMESS calculations.
for x in *_sol.inp; do submit_gamess $x; done
Step 11 wait til all the optimizations are done and that the calculations finished normally.
grep NORMALLY *_sol.log
Step 12 extract the last heat of formation in each file and put them in a file called energies
python readv2.py *._sol.log > energies
Step 13 find the lowest energy for each conformer and compute the relative energies and pKa values
python pka.py energies
python pka.py energies
Files referred to above

This work is licensed under a Creative Commons Attribution 4.0