Machine Learning Thermochemistry¶
This tutorial will teach you how to:
- Download and install the ANI-1ccx machine learning (ML) potential parameter set  for organic molecules containing H, C, N, and O. ANI-1ccx was fitted to DLPNO-CCSD(T) reference data, which is a good approximation to CCSD(T).
- Calculate a gasphase reaction energy for an isomerization reaction using ANI-1ccx.
Set up and run ANI-1ccx calculations¶
You can set up and run the calculations for this tutorial using either the Graphical User Interface (GUI) or the python library PLAMS. First run the tutorial with the GUI, as that will install all necessary dependencies automatically.
Machine learning potentials give accurate predictions only for molecules or systems similar to those that were used during the parameterization of the machine learning potential. For other systems, the predictions may be very inaccurate.
The prediction (i.e., the energy, as calculated above) from the ANI potentials, like ANI-1ccx, are averages over 8 separately trained neural networks (a neural network ensemble). The standard deviation of the 8 separate predictions can be used as a measure for estimating how reliable a prediction is. If all predictions are very similar (small standard deviation), similar molecules to the calculated one should have appeared in the training set. If the predictions are very different (large standard deviation), then the potential has likely not been trained to the type of molecule it is being used for.
You can see the standard deviation of predicted energies for your molecule in
the auxiliary output file
For example, for Molecule 1, you will see
Energy -651.363471 Ha Number of atoms 26 Ensemble size 8 Standard deviation 2.128358 mHa 0.081860 mHa per atom 0.417405 mHa per sqrt(atom)
In this case, the standard deviation for Molecule 1 is 2.128 mHa = 1.3 kcal/mol. For Molecule 2, it is 1.8 kcal/mol. It is up to you to decide whether you consider these numbers to be “small” (good) or “large” (bad). For more information, see for example Refs  and .
The standard deviation grows with the square root of the number of atoms
(assuming per-atom prediction errors follow a normal distribution). When
comparing standard deviations for molecules with different number of atoms,
it is a good idea to consider the
standard deviation per sqrt(atom)
Free energies, vibrational normal modes, and more¶
The given structures had been optimized at a high level of theory.  You can also (re-)optimize them with ANI-1ccx:
- 1. Start AMSjobs.2. Open the mol1singlepoint job with AMSinput.3. Set the Task to Geometry Optimization.4. Tick the Frequencies checkbox.5. Save as mol1geo and run.
Look for Gibbs free energy in the output (see the Thermo keyword).
- 1. In AMSjobs select the mol1geo job.2. Open it with the SCM → Output menu command.3. In the search field at the bottom type ‘Gibbs’ and observe the Gibbs free energy.4. Visualize the normal modes in AMSspectra: SCM → Spectra.
The reaction energy above was calculated for particular conformations of the molecules 1 and 2. To explore all conformational isomers (conformers), see the Conformers tutorial.
If your organic molecules contain F, S, and/or Cl, you can run calculations using the ANI-2x model.
Consider using ANI-1ccx or ANI-2x to calculate a full approximate Hessian, and then use ADF to refine the vibrational modes that interest you.
By default the ANI calculations will use all available cpu on your machine. To run a serial calculation, on the Details → Technical panel, set Number of threads to 1.
On the same panel, you can also choose to run calculations on a CUDA-enabled GPU. See the parallelization section of the MLPotential manual for more details.
|||(1, 2) J. S. Smith et al., Nat. Commun. 10 (2019) 2903. https://doi.org/10.1038/s41467-019-10827-4|
|||(1, 2, 3) R. Huenerbein et al. Phys. Chem. Chem. Phys. 12 (2010) 6940-6948. https://doi.org/10.1039/C003951A|
|||S. Luo, Y. Zhao, D.G. Truhlar. Phys. Chem. Chem. Phys. 13 (2011) 13683-13689. https://doi.org/10.1039/C1CP20834A|
|||J. S. Smith et al., J. Chem. Phys. 148 (2018) 241733. https://doi.org/10.1063/1.5023802|