X

Search Results

Searching....

10 Molecular Properties and Analysis

10.7 Finite-Difference Properties

(December 11, 2025)

Q-Chem offers the option of computing several properties that can be expressed as derivatives of static (electric or magnetic) fields and/or coordinates. This set of properties include nuclear gradients and Hessians (harmonic and anharmonic frequencies), polarizabilities, hyperpolarizabilities, dipole moment, NMR shielding, magnetizabilities, and more. This option is particularly desirable for methods for which analytic derivatives of desired order are unavailable.

Q-Chem also provides options to use predefined stencils for first- and second-order finite-difference derivatives through the use of the FDIFF_STENCIL keyword. For first-order finite-difference derivatives such as gradients or Hessians using analytic gradients, stencils yielding 𝒪(h2) and 𝒪(h4) errors are available; the former through the setting FDIFF_STENCIL = 1 or 2 (default) and the latter through the setting FDIFF_STENCIL = 3 or 4. Traditionally, in the context of first-order derivatives, these are the 3-point and 5-point stencils, respectively. For second-order finite-difference derivatives such as Hessians using energies, economical 𝒪(h2) (default), regular 𝒪(h2), and economical 𝒪(h4) stencils are available through the setting FDIFF_STENCIL = 1, 2, and 3, respectively.

Finite-difference calculations consist of multiple, mutually independent evaluations, forming an embarassingly parallel workload. Starting v6.3.0, such calculations (except anharmonic frequency calcuations) can exploit Q-Chem’s new hybrid MPI+OpenMP approach: the independent finite-difference steps are distributed across MPI ranks, while each rank exploits OpenMP for shared-memory parallelism within a node. This strategy is particularly effective for large systems, providing excellent scalability with minimal communication overhead.

IDERIV

IDERIV
       Controls the order of derivatives that are evaluated analytically. The user is not normally required to specify a value, unless numerical derivatives are desired. The derivatives will be evaluated numerically if IDERIV is set lower than JOBTYPE requires.
TYPE:
       INTEGER
DEFAULT:
       Set to the order of derivative that JOBTYPE requires
OPTIONS:
       2 Analytic second derivatives of the energy (Hessian) 1 Analytic first derivatives of the energy. 0 Analytic energies only.
RECOMMENDATION:
       Usually set to the maximum possible for efficiency. Note that IDERIV will be set lower if analytic derivatives of the requested order are not available.

FDIFF_STEPSIZE_QFF

FDIFF_STEPSIZE_QFF
       Displacement used for calculating third and fourth derivatives by finite difference.
TYPE:
       INTEGER
DEFAULT:
       5291 Corresponding to 0.1 bohr. For calculating third and fourth derivatives.
OPTIONS:
       n Use a step size of n×10-5.
RECOMMENDATION:
       Use the default, unless the potential surface is very flat, in which case a larger value should be used.

FINITEDIFFSZ_POWER

FINITEDIFFSZ_POWER
       The exponent controlling the order of magnitude of the step size used for calculating derivatives by finite difference.
TYPE:
       INTEGER
DEFAULT:
       5 Corresponding to 10-5.
OPTIONS:
       n Use an exponent of 10-n.
RECOMMENDATION:
       None.

FDIFF_STEPSIZE

FDIFF_STEPSIZE
       Displacement used for calculating derivatives by finite difference.
TYPE:
       INTEGER
DEFAULT:
       100 Corresponding to 0.001 Å. For calculating second derivatives.
OPTIONS:
       n Use a step size of n×10-m, where m is FINITEDIFFSZ_POWER.
RECOMMENDATION:
       Use the default except in cases where the potential surface is very flat in which case a larger value should be used. See FDIFF_STEPSIZE_QFF for third and fourth derivatives.

FDIFF_STEPSIZE_B

FDIFF_STEPSIZE_B
       External static magnetic field used for calculating derivatives by finite difference.
TYPE:
       INTEGER
DEFAULT:
       100 Corresponding to 0.001 a.u.
OPTIONS:
       n Use a step size of n×10-m, where m is FINITEDIFFSZ_POWER.
RECOMMENDATION:
       None.

FDIFF_STEPSIZE_M

FDIFF_STEPSIZE_M
       Nuclear magnetic-moment field used for calculating derivatives by finite difference.
TYPE:
       INTEGER
DEFAULT:
       100 Corresponding to 0.001 a.u.
OPTIONS:
       n Use a step size of n×10-m, where m is FINITEDIFFSZ_POWER.
RECOMMENDATION:
       None.

FDIFF_STENCIL

FDIFF_STENCIL
       Specifies the stencil to be used in the finite-difference calculation of first- and second-order derivatives.
TYPE:
       INTEGER
DEFAULT:
       1
OPTIONS:
       1 Corresponds to regular 𝒪(h2) stencil for first-order and economical 𝒪(h2) stencil for second-order finite-difference calculation. 2 Corresponds to regular 𝒪(h2) stencil for first-order and regular 𝒪(h2) stencil for second-order finite-difference calculation. 3 Corresponds to regular 𝒪(h4) stencil for first-order and economical 𝒪(h4) stencil for second-order finite-difference calculation. 4 Corresponds to regular 𝒪(h4) stencil for first-order finite-difference calculation. This option is unavailable in v. 6.4 for second-order finite-difference calculation.
RECOMMENDATION:
       None.