Nigel W. Moriarty, Dorothee Liebschner

Quantum Mechanics (QM) has been shown to provide accurate geometries and
energies for a wide range of chemical entities. Using QM for restraints
generation is not new, however, using QM *in situ* restraints generation
directly in *phenix.refine* without additional (and possibibly costly licensed)
software is new. The inclusion of MOPAC in the python3
installations of Phenix has made this possible. The Quantum Interface (QI) is
a new module that allows the use of MOPAC or a 3rd party QM package – Orca –
for a number of procedures.

Calculate ligand restraints *in situ* using Quantum Mechanical Restraints
(QMR)

Calculate ligand strain energies using Quantum Mechanical Energies (QME)

Determination of best Histidine tautamer Quantum Mechanical Flipping (QMF)

One of the most important points about Quantum Chemistry is that it is an
all-electron method. This means that **all** atoms (and electrons) need to
be specified in order to perform the correct calculation. This is a case where
GIGO will really bite you. In standard refinement, missing atoms are not
critical but in QM missing atoms are catastrophic.

The QI module calculates the charge based on the atoms in the input model (and the selection) but care must be taken to ensure that the input model is correct down to the protonation. Besides calculating the incorrect result, the QM calculation can have difficulty converging thus resulting in excessive run times.

QM calculations scale as a power of the number of atoms. This means that increasing the buffer can greatly affect the timings.

Using the parallel features in MOPAC and Orca are generally not linear so the QI module has a feature to prefer simple parallelism on based on jobs that can be useful for some situations.

**In situ ligand restraints from quantum-mechanical methods.**D. Liebschner, N.W. Moriarty, B.K. Poon, and P.D. Adams.*Acta Cryst.*D**79**, 100-110 (2023).