qml.qchem.vibrational_pes¶
- vibrational_pes(molecule, n_points=9, method='rhf', optimize=True, localize=True, bins=None, cubic=False, dipole_level=1, num_workers=1, backend='serial')[source]¶
Computes potential energy surfaces along vibrational normal modes.
- Parameters:
molecule (Molecule) – the molecule object
n_points (int) – number of points for computing the potential energy surface. Default value is
9
.method (str) – Electronic structure method used to perform geometry optimization. Available options are
"rhf"
and"uhf"
for restricted and unrestricted Hartree-Fock, respectively. Default is"rhf"
.optimize (bool) – if
True
perform geometry optimization. Default isTrue
.localize (bool) – if
True
perform normal mode localization. Default isFalse
.bins (List[float]) – grid of frequencies for grouping normal modes. Default is
None
which means all frequencies will be grouped in one bin. For instance,bins = [1300, 2600]
allows to separately group and localize modes in three groups that have frequencies below \(1300\), between \(1300-2600\) and above \(2600\).cubic (bool)) – if
True
include three-mode couplings. Default isFalse
.dipole_level (int) – The level up to which dipole moment data are to be calculated. Input values can be
1
,2
, or3
for up to one-mode dipole, two-mode dipole and three-mode dipole, respectively. Default value is1
.num_workers (int) – the number of concurrent units used for the computation. Default value is set to 1.
backend (string) – the executor backend from the list of supported backends. Available options are
mp_pool
,cf_procpool
,cf_threadpool
,serial
,mpi4py_pool
,mpi4py_comm
. Default value is set toserial
. See Usage Details for more information.
- Returns:
the VibrationalPES object
- Return type:
Example
>>> symbols = ['H', 'F'] >>> geometry = np.array([[0.0, 0.0, -0.40277116], [0.0, 0.0, 1.40277116]]) >>> mol = qml.qchem.Molecule(symbols, geometry) >>> pes = qml.qchem.vibrational_pes(mol, optimize=False) >>> print(pes.freqs) [0.02038828]
Usage Details
The
backend
options allow to run calculations using multiple threads or multiple processes.serial
: This executor wraps Python standard library calls without support for multithreaded or multiprocess execution. Any calls to external libraries that utilize threads, such as BLAS through numpy, can still use multithreaded calls at that layer.mp_pool
: This executor wraps Python standard library multiprocessing.Pool interface, and provides support for execution using multiple processes.cf_procpool
: This executor wraps Python standard library concurrent.futures.ProcessPoolExecutor interface, and provides support for execution using multiple processes.cf_threadpool
: This executor wraps Python standard library concurrent.futures.ThreadPoolExecutor interface, and provides support for execution using multiple threads. The threading executor may not provide execution speed-ups for tasks when using a GIL-enabled Python.mpi4py_pool
: This executor wraps the mpi4py.futures.MPIPoolExecutor class, and provides support for execution using multiple processes launched using MPI.mpi4py_comm
: This executor wraps the mpi4py.futures.MPICommExecutor class, and provides support for execution using multiple processes launched using MPI.