atomistica.online

MOLECULAR MODELING COURSE

Introduction to Geometrical Optimizations

What is Geometrical Optimization?

Geometrical optimization, often simply called geometry optimization, molecular optimization or relaxation, is the process by which the geometry of a molecule is adjusted to find a structure with the lowest possible energy. This optimized structure typically corresponds to a stable configuration, either a local minimum (a stable species) or a transition state (a high-energy configuration between two stable species).

Why is it Important?

Determining Stable Configurations: Through geometrical optimization, researchers can predict the most stable structure of a molecule, which is often key to understanding its properties and reactivity.

Transition State Identification: For understanding reaction mechanisms, identifying the transition state—a high-energy configuration that represents the “bottleneck” of a reaction—is critical. Geometrical optimization can help in locating these states.

Basis for Further Studies: Optimized structures are often prerequisites for more advanced molecular modeling tasks, such as vibrational frequency calculations, molecular dynamics simulations, and reactivity studies.

How Does it Work?

Initial Geometry Input: The user provides an initial guess for the molecular geometry. This can be based on experimental data, chemical intuition, or results from previous calculations.

Choice of Method: A quantum mechanical method (e.g., Hartree-Fock, DFT, post-Hartree-Fock methods) and a basis set are chosen based on the system and the desired accuracy.

Iterative Process: The electronic structure program iteratively adjusts the positions of the atoms to lower the total energy. This is achieved by calculating forces on atoms and using them to predict a new, lower-energy geometry.

Convergence: The process continues until changes in the geometry produce negligible changes in energy, indicating that an optimized structure has been found.

Points to Remember:

Geometry optimization seeks the nearest local energy minimum or transition state. This means that the resulting structure is dependent on the starting geometry. Different initial geometries may lead to different optimized structures.

The chosen quantum mechanical method and basis set play significant roles in the accuracy and reliability of the optimized geometry.

While the goal is to find the global minimum (the absolute lowest energy structure), in practice, geometrical optimization often finds local minima. Additional techniques may be needed to ensure that the global minimum has been located.

Practical Part

Overview

In this practical exercise, we will perform a geometrical optimization for a phenol molecule. Geometrical optimizations adjust the atomic positions of a molecule to find the most energetically favorable configuration. The duration of an optimization can vary from seconds to hours, depending on the method and the complexity of the molecule. For this exercise, we will again employ the fast and efficient semiempirical method, GFN2-xTB, derived from density functional theory (DFT). To learn more about xTB program in which this method is implemented, and method incorporated therein, users are wamrly recommended to check all relevant pages of Prof. Stefan Grimme and his team.

For demonstrating geometrical optimizations, we will deal with much smaller and simpler molecule – phenol. Below, you can download two structures of phenol in .xyz format – one that is not optimized and the one that is optimized. These structures are visualized below with online molecular viewer called 3dmol.js. Let us first visually inspect non optimized and optimized structures of phenol.

3D structure of non optimized phenol:

3D structure of optimized phenol:

It is pretty clear that a structure on the left is not optimized and therefore not a ground state geometry. Some bonds are unrealistically long, while some are short. If we rotate a molecule, we will see that the non optimized phenol structure is also not planar. What we are going to do in this exercise is that we will geometrically optimize the structure on the left, to obtain structure on the right. To this, you will follow the procedure given below.

Procedure

Step 1 – Download molecular structures of non optimized and optimized phenol given above
Step 2 – Open “Online xtb calculator” to perform geometrical optimization
Step 3 – Upload the structure of non optimized phenol
Step 4 – Select task: Optimization
Step 5 – Select method: GFN2-xTB
Step 6 – Press “RUN XTB” button 
Step 7 – Beside the “Output file” text area, you will see that the “Optimized structure” text area is also filled. That window now shows the content of the .xyz file that represents the optimized structure of phenol. You notice that .xyz file simply contains coordinates of all atoms, while each line starts with the symbol of element whose coordinates are given. Download the optimized structure.
Step 8 – Use Avogadro to visually inspect non optimized and optimized phenol structures
Additional tasks:
Step 9 – Perform single point energy calculations of non optimized and optimized phenol structures. What do you conclude?

Results

  • After performing geometrical optimizations, you should obtain a structure of a phenol corresponding to the optimized structure presented above.
  • Regarding single point energy calculations, you should obtain values close to values provided in following Table

Single point energies of non optimized and optimized phenol

TypeEnergy [Eh]
Non optimized phenol-19.715413278256
Optimized phenol-19.954145755824

Concluding remarks

  • Iterative Nature: Geometrical optimization is an iterative process, where atomic coordinates are adjusted to identify the geometry with the lowest energy. In the presented example, it takes 22 iterations to locate the geometry with the lowest energy. This iterative process can be visually represented through animations, as demonstrated in the video below.

Video: geometry optimization cycles of phenol

In the video above, you can see that in the first iteration the structure is far away from equilibrium (the molecule is quite distorted). Around 13th iteration, the structure is almost completely optimized. From 13th to 22nd iteration, fine adjustments are happening.

  • Initial Structure Significance: The choice of the initial geometry is paramount. Starting with a reasonable approximation, such as experimental data or high-quality theoretical predictions, greatly influences the efficiency and success of the optimization.

  • Duration and Convergence: The time required for geometrical optimization depends on the initial distance of the structure from its equilibrium (ground) state. Convergence criteria, such as energy changes, gradient norms, and structural changes (we will talk more about convergence criteria later), should be defined to determine when optimization is complete.

  • Algorithm Selection: Various algorithms for geometrical optimizations are available, each with its strengths. Some are well-suited for situations where the structure is far from the ground state, while others excel when the structure is relatively close to equilibrium.

  • Balancing Speed and Accuracy: Achieving a balance between computational speed and accuracy is crucial. Faster methods are computationally efficient but may sacrifice accuracy, whereas higher-level methods provide accuracy at the cost of increased computational resources.

  • Re-optimization Strategies: When a structure is distant from its ground state, it is advisable to initiate optimizations with faster methods to reach a reasonable starting point quickly. Subsequently, re-optimization using higher-level methods can refine the results.

  • Constrained Optimizations: In some cases, constraints may be necessary to maintain specific bond lengths, angles, or other molecular features, especially when modeling transition states or reaction pathways.

  • Hybrid Methods: Hybrid optimization approaches, combining different algorithms or techniques, can be effective for challenging optimization problems, capitalizing on the strengths of each method.

  • Visualization and Analysis: After optimization, it is essential to visualize and analyze the resulting structures to ensure they are chemically meaningful and align with the intended objectives.

Homework

  • Download and visualize the structure of non optimized ibuprofen using Avogadro
  1. Visually inspect the structure, and identify at least one bond length or angle that is not optimized
  2. Perform geometrical optimizations using GFN2-xTB method with “Online xTB calculator”
  3. Inspect the output file and determine the number of cycles that were necessary to optimize the structure
  4. Compare visually non optimized and optimized ibuprofen structures
  5. Calculate energies of non optimized and optimized ibuprofen geometries