Documentation
on Firefly v. 8.0.0 numerical gradient features**.**

The numerical gradient code is activated as follows:

**$contrl numder=.t. $end**

The primary purpose of this code is to allow computations normally requiring analytic energy gradients, to be performed using those QC methods
for which analytic gradients are not yet programmed. The idea behing numerical gradients code is very simple, i.e.
gradients are obtained using various finite defference formulas applied to the energy itself so the approach is based
on multiple reevaluations of energy values at a set of slightly displaced geometries.
The numerical gradients code is tightly integrated into Firefly and can be used anywhere where the analytical energy gradients
are required by default. It operates in both standard parallel, **XP**, and
**extended XP** modes, allowing parallel computations of gradients for those
QC methods for which parallel implementation is not available yet and improving
parallel scalability of methods that are already well parallelized. The numerical
gradient code handles molecular symmetry by the very efficient way and always
uses the minimal required number of single-point energy evaluations. The code supports
both static and dynamic load balancing.

As with any finite differencing, numerical gradients require extra high precision in computed energy values. It is therefore the user's responsibility to increase the precision of all the stages involved into computation of target energies.

The relevant input group is
called **$numgrd **and contains the following keywords:

**DELTA ** Step
size (in atomic units) for finite differencing. The default is 0.01 bohr.

**ORDER** The
order of finite difference formulas to use. Use one of 1 (less precise, less
expensive), 2, 4, or 6 (most precise, most expensive). The default is 2.

**NGRADS** For
methods computing energies of several states at once (e.g. CI, MCSCF, TDHF, TDDFT,
MCQDPT2, XMCQDPT2) this option can be used to request computation of gradients of
NGRADS lowest states of interest. The default is NGRADS=1 i.e. gradient will only
be computed for the lowest energy state. Use of this option does not introduce
any additional computational overhead. Note, the value of NGRADS should not be
larger than the actual number of states available!

**ISTATE** This
option selects the target state of interest i.e. the state which gradient is to
be used by other parts of the program, e.g. during geometry optimization involving
numerical gradients, etc... The default is ISTATE=1. This option is intended for
use together with the NGRADS option. For instance, to optimize the second root
of TDDFT or XMCQDPT, set NGRADS to be equal or greater than 2, set ISTATE to 2
and properly set other relevant parameters controlling the number of computed
roots during TDDFT or XMCQDPT procedure to capture at least two states.

**JSTATE** Selects
the second state of interest. The default is JSTATE=0 i.e. no second state. One
must provide nonzero JSTATE together with valid NSTATE and ISTATE for numerical
location of interstate crossings or conical intersections.

**DELROT **Logical variable affecting the behavior of numerical differencing
code. If set to .true., it triggers on approximate elimination of rigid body rotations
during computations of numerical gradients thus reducing the number of required
reevaluations of energy. If set to .false., rotations will not be eliminated.
Normally, DELROT does not affect optimized geometries but does affect
double-numerical Hessians. The default value is DELROT=.true. This option must
be manually disabled for any RUNTYP other than **optimize **or **sadpoint**
and for any optimization runs involving HSSEND option.

**CHEBSH** Logical
variable. Selects the use of Chebyshev grids for finite differencing. The
default is to use the equidistant central finite differences i.e. CHEBSH=.false.

**SPLINE** Integer
variable. Selects the use of spline differentiation of order SPLINE over the
selected grid (either the default equidistant or Chebyshev). It has effect
only for ORDER=4 or ORDER=6 finite differences. Valid values of SPLINE are 1, 2,
3, and 4. SPLINE=0 (default) disables spline differentiation.

**CONFIT** Integer
variable selecting one of the dedicated finite differencing algorithms which are
the most appropriate and most precise in the vicinity of conical intersections.
Available for finite differences of ORDER=4 or 6 only. Default is CONFIT=0 i.e.
not to use these methods. Available options are CONFIT=1, 2, or 3.

**CFCOND** Parameter
controlling activation of CONFIT procedure. With CONFIT enabled, it will not be
in action unless the condition number of fit obtained with CONFIT procedure is below CFCOND.
The default is CFCOND=6.0. Smaller values effectively enable CONFIT to handle
more displacements. Larger values effectively disable CONFIT except the very
vicinity of conical intersection.

**PRAXES ** Logical variable. When .true., requests the use of
principal axes coordinate frame for finite differencing. Default is not to use
principal axes i.e. PRAXES=.false. This option should not be used for symmetric
molecules.

**FNOISE** The
threshold for automatic numerical noise detection. The automatic noise
detection is available only for ORDER=4 or 6 differencing. The default value is
1.0*10^{-7}. Larger values makes noise detection algorithm less
sensitive to numerical noise.

**TOL** The
threshold used by the numerical gradient code during elimination of redundant geometry
displacements. The default value is 1.0*10^{-6}. It is generally not
recommended to change the default value.

Finally, the new **runtyp=NUMGRAD**
is a slightly cheaper alternative to **runtyp=GRADIENT** when using
numerical gradients. In addition,** ** **runtyp=NUMGRAD** always prints gradients
for all **NGRADS** states while **runtyp=GRADIENT** will only print
gradient for **ISTATE** state.

- Command Line Options
- XP and extended XP parallel modes of execution
- P2P Parallel Mode Communication Interface, Dynamic Load Balancing, and large-scale MP2 Energy code
- Multicore, SMP and HTT support
- Parallel Linux Instructions: list of supported MPI implementations
- Parallel Windows Instructions: list of supported MPI implementations/bindings
- Fast Two-electron Integral Code
- Additional comments on Two-electron Integral code selection
- Multi-Configuration Quasi-Degenerate Perturbation Theory
- Extended Multi-Configuration Quasi-Degenerate Perturbation Theory (XMCQDPT)
- State-specific gradients for state-averaged MCSCF and MCSCF state tracking
- Locating Conical Intersections and Interstate Crossings with Firefly

Last updated: July 29, 2012