This is a tool to analyze the strain of inherently strained molecules. Gaussian is used to calculate the optimized geometry and strain of the molecule. The strain analysis uses the optimization of destrained fragments of the molecule to construct a picture of the strain energy mapped onto the bonds. VMD is used to visualize the strain. All the scripts used to do this are written in Python and Bash.
This tool was written by Curtis Colwell in the Jasti Group at the University of Oregon. It is published in Chemical Science.
Run the following command on a UNIX command line:
git clone https://github.com/CurtisColwell/StrainViz.git
Or download as a zip file from the repository homepage
Use the following block diagram as a reference for the instructions below. All manual steps are shown in green, all automated steps are shown in red, and all intermediate files are shown in blue. The proton optimization files are deleted after being used.
-
Model the strained compound in Avogadro and create a Gaussian input file to optimize the geometry.
-
Use Gaussian to create an optimized geometry output file. Open this file in Avogadro and save it in the input/ directory with the .xyz file extension. Create a directory with the same name.
-
Create fragments by symmetrically deleting portions of the molecule that will allow the molecule to release its strain in Avogadro and save them as .xyz files in the directory named after the original molecule. Make sure that when a piece of the molecule is removed, protons are added to the empty bonding sites by drawing them at every severed bond. For an example, see the input/ folder where example-molecule.xyz is [5]CPP and five fragment .xyz files are in the related folder.
-
Run StrainViz to run multiple Gaussian jobs on each fragment and analyze the results. Specify the variable "molecule-name" so that it matches the geometry .xyz file and fragment folder, "processors-for-Gaussian" to be the number of processor for the Gaussian jobs, "level-of-theory" as a string that is the level of theory and basis set. This script creates .tcl files for the bond, angle and dihedral strain for each fragment and the combination of the fragments.
bash StrainViz.bash molecule-name processors-for-Gaussian level-of-theory
- In VMD, open the "Tk Console" found under "Extensions", navigate to the output/molecule-name/ folder, and visualize the strain using the following command while replacing "example.tcl" for the .tcl file you would like to visualize:
source example.tcl
In the .tcl file used to visualize the strain, the first two lines specify the minimum and maximum energy present in the molecule. This value is given in kcal/mol. The most red bond has the maximum energy and the most green bond has the minimum energy.
If there is a mistake during the run it is usually due to an error with the way the fragments were made and is reflected as an error in one of the Gaussian output files. Use the terminal output to determine where the calculation went wrong and check the associated output file to troubleshoot. A final note about the fragments is that the coordinates of the atoms that are present in the fragment and base geometry must match exactly or the script will not be able to translate the energy back to the base geometry.
If the Gaussian jobs have already been run and it is only needed to resubmit the calculation of the strain, the script Recalc.bash can be used. This script uses the input format:
bash Recalc.bash input/example molecule
If the optimizations are not working ideally, there are a few flags that will appear.
If a Gaussian job fails, a note will appear saying which input file generated the failure.
If negative strain energies are calculated, a flag will appear saying which output file was analyzed to determine negative strain energies. Negative strain energies can be a hallmark of a failed calculation, but if they are close to zero, may be real and part of the calculation as long as they do not result in an overall negative strain.
If at any point in a fragment geometry optimization a step that increases the energy is taken, a flag will appear noting it. Steep increases in energy as well as trailing optimizations with many small increases in energy often result in bizarre results. Resubmitting these jobs with the keyword opt=CalcAll will result in a more computationally intensive, but cleaner trajectory.
These jobs can be submitted to a SLURM scheduler by running slurm.bash with the name of the molecule to submit.
bash slurm.bash input/example-molecule level-of-theory partition processors
The level of theory defaults to "M062X/6-31G(d)", the partition defaults to short, and the number of processors defaults to 28 if nothing is written in the command.