qml.qchem.optimize_geometry

optimize_geometry(molecule, method='rhf')[source]

Computes the equilibrium geometry of a molecule.

Parameters
  • molecule (Molecule()) – Molecule object

  • method (str) – Electronic structure method that can be either restricted and unrestricted Hartree-Fock, 'rhf' and 'uhf', respectively. Default is 'rhf'.

Returns

optimized atomic positions in Cartesian coordinates

Return type

array[array[float]]

Example

>>> symbols  = ['H', 'F']
>>> geometry = np.array([[0.0, 0.0, 0.0],
...                      [0.0, 0.0, 1.0]])
>>> mol = qml.qchem.Molecule(symbols, geometry)
>>> eq_geom = qml.qchem.optimize_geometry(mol)
>>> eq_geom
array([[ 0.        ,  0.        , -0.40277116],
       [ 0.        ,  0.        ,  1.40277116]])