Conformational search is very important in analyzing reaction mechanisms using computational chemistry. So far, this site has published articles about conformational search.
see also: Conformational search using MD calculation [gromacs]
The following is the general protocol for conformational search.
- build a molecule using molecular viewer, such as Gauss View.
- Optimize the structure using PM7.
- make a large number of conformers using MMFF
- Optimize and energy calculation of all conformers.
- select X kcal / mol from the most stable one, and remove the same conformer.
In this article, we’ll show you a script that automate the 5th step of the above protocol.
- There are over 100 log files after conformation search, so it is very time consuming to process them manually.
- Even if the structure is different in MM, the same structural conformers are obtained after the optimized by DFT. It is also time consuming to exclude the same structural conformers one by one.
We wrote a program to solve the above two problems. The following two functions are implemented.
- Sort log files in order of energy
- Judge if they are the same structural conformer
Download the file from the link below. The source code file contains the following files.
When compiling, type “make” on terminal. An executable file called conf-overlay is generated.
See how we are actually processing 102 log files. These log files are opt & freq (DFT) of conformers generated by gromacs.
In about 2 seconds, all conformers are overlayed to determine if they are the same structural conformer.
In the above video, the execution time is about 2 seconds, but the execution time is depending on the compile method (-O3). Note that compiling with g ++ without any options takes about 20 seconds to execute!
How to read the result?
When you run the program, the result is displayed on the terminal and an output file called energy.txt with exactly the same contents is generated.
As shown below, the left column displays the file name, the next column displays the energy difference (kcal / mol) relative to the most stable conformer, and display “the same structure” if the conformer is the same as the upper conformer.
In the example below, the energy difference between 6_6_6_5_con_042.log and 6_6_6_5_con_094.log is 0.0050 kcal / mol, indicating that they are the same conformer.
The part that reads the log file names in the folder and sorts them in order of energy is omitted because it is simple.
The following is the algorithm for overlaying two conformers.
Even in the exact same structural conformer, the position in the three-dimensional coordinates is different because the molecule may rotate during the gaussian calculation. For example, the two conformers in the figure below have exactly the same structure, but have rotated, making it difficult to determine at a glance whether they are the same conformer.
Overlaying two molecules is effective approach for judging the identical conformers. The following five processes are required to overlay these two molecules.
- Select three atoms A, B, and C from the molecule
- parallel shift the molecule so that atom A is at the origin
- Rotate the whole molecule around the X axis so that atom B is on the XY plane
- Rotate the whole molecule around the Z axis so that atom B is on the X axis
- Rotate the whole quantifier around the Z axis so that atom C is on the XZ plane
With the above operations, the triangle consisting of atoms A, B, and C is on the XZ plane, atom A is at the origin, and side AB is on the X axis.
This process is based on the hypothesis that if two conformers have the same structure, if three atoms overlap, the other atoms have undergone the same translation / rotational operation should also overlap exactly.
This algorithm is written in conf-overlaying.cpp.
After the overlay process, the RMSD of the carbons between the two conformers is calculated. In this program, the threshold is set as “If the energy difference is less than 1 kcal / mol and the RMSD is less than 0.05 Å per atom, they are the same conformer.”