---
name: "sc_FinDispMolecularHessian"
section: "3"
platform: "linux"
package: "libsc-doc"
version: "2.3.1-22"
release: "Debian 12 (Bookworm)"
platforms: ["linux"]
url: "https://new.carta.tech/sc_FinDispMolecularHessian"
---

# sc\_FinDispMolecularHessian(3)

Computes the molecular hessian by finite displacements of gradients.

## NAME

sc::FinDispMolecularHessian - Computes the molecular hessian by finite displacements of gradients.

## SYNOPSIS

`#include <fdhess.h>`

Inherits **sc::MolecularHessian**.

### Public Member Functions

**FinDispMolecularHessian** (const **Ref**\< **MolecularEnergy** \> &)\
 **FinDispMolecularHessian** (const **Ref**\< **KeyVal** \> &)\
 The **FinDispMolecularHessian** **KeyVal** constructor is used to generate a **FinDispMolecularHessian** object from the input.  **FinDispMolecularHessian** (**StateIn** &)\
 void **save\_data\_state** (**StateOut** &)\
 Save the base classes (with save\_data\_state) and the members in the same order that the **StateIn** CTOR initializes them.  **RefSymmSCMatrix** **compute\_hessian\_from\_gradients** ()\
 These members are used to compute a cartesian hessian from gradients at finite displacements.  int **ndisplace** () const\
 int **ndisplacements\_done** () const\
 **RefSCMatrix** **displacements** (int irrep) const\
 void **displace** (int disp)\
 void **original\_geometry** ()\
 void **set\_gradient** (int disp, const **RefSCVector** &grad)\
 void **checkpoint\_displacements** (**StateOut** &)\
 void **restore\_displacements** (**StateIn** &)\
 **RefSymmSCMatrix** **cartesian\_hessian** ()\
 This returns the cartesian hessian.  void **set\_checkpoint** (int c)\
 Set checkpoint option.  int **checkpoint** () const\
 Return the current value of the checkpoint option.  void **set\_energy** (const **Ref**\< **MolecularEnergy** \> &**energy**)\
 Some **MolecularHessian** specializations require a molecular energy object.  **MolecularEnergy** \* **energy** () const\
 This returns a **MolecularEnergy** object, if used by this specialization.  **Ref**\< **SCMatrixKit** \> **matrixkit** () const\
 **RefSCDimension** **d3natom** () const\

### Protected Member Functions

void **get\_disp** (int disp, int &irrep, int &index, double &coef)\
 void **do\_hess\_for\_irrep** (int irrep, const **RefSymmSCMatrix** &dhessian, const **RefSymmSCMatrix** &xhessian)\
 void **init** ()\
 void **restart** ()\

### Protected Attributes

**Ref**\< **MolecularEnergy** \> **mole\_**\
 **Ref**\< **PointGroup** \> **displacement\_point\_group\_**\
 **Ref**\< **PointGroup** \> **original\_point\_group\_**\
 **RefSCVector** **original\_geometry\_**\
 double **disp\_**\
 double **accuracy\_**\
 int **ndisp\_**\
 int **nirrep\_**\
 int **restart\_**\
 char \* **restart\_file\_**\
 int **checkpoint\_**\
 char \* **checkpoint\_file\_**\
 int **only\_totally\_symmetric\_**\
 int **eliminate\_cubic\_terms\_**\
 int **do\_null\_displacement\_**\
 int **debug\_**\
 **RefSCMatrix** **symbasis\_**\
 **RefSCVector** \* **gradients\_**\

### Additional Inherited Members

## Detailed Description

Computes the molecular hessian by finite displacements of gradients.

This will use the minimum number of displacements, each in the highest possible point group.

## Constructor & Destructor Documentation

### sc::FinDispMolecularHessian::FinDispMolecularHessian (const Ref\< KeyVal \> &)

The **FinDispMolecularHessian** **KeyVal** constructor is used to generate a **FinDispMolecularHessian** object from the input. It reads the keywords below.

KeywordTypeDefaultDescription

`energy`**MolecularEnergy**noneThis gives an object which will be used to compute the gradients needed to form the hessian. If this is not specified, the object using **FinDispMolecularHessian** will, in some cases, fill it in appropriately. However, even in these cases, it may be desirable to specify this keyword. For example, this could be used in an optimization to compute frequencies using a lower level of theory.

`debug`booleanfalseIf true, print out debugging information.

`point_group`**PointGroup**noneThe point group to use for generating the displacements.

`restart`booleantrueIf true, and a checkpoint file exists, restart from that file.

`restart_file`string *basename*`.ckpt.hess`The name of the file where checkpoint information is written to or read from.

`checkpoint`booleantrueIf true, checkpoint intermediate data.

`only_totally_symmetric`booleanfalse If true, only follow totally symmetric displacments. The hessian will not be complete, but it has enough information to use it in a geometry optimization.

`eliminate_cubic_terms`booleantrueIf true, then cubic terms will be eliminated. This requires that two displacements are done for each totally symmetric coordinate, rather than one. Setting this to false will reduce the accuracy, but the results will still probably be accurate enough for a geometry optimization.

`do_null_displacement`booleantrueRun the calculation at the given geometry as well.

`displacement`double1.0e-2The size of the displacement in Bohr.

`gradient_accuracy`double\<td\>`displacement` / 1000The accuracy to which the gradients will be computed.

## Member Function Documentation

### RefSymmSCMatrix sc::FinDispMolecularHessian::cartesian\_hessian ()` [virtual]`

This returns the cartesian hessian. If it has not yet been computed, it will be computed by finite displacements.

Implements **sc::MolecularHessian**.

### MolecularEnergy \* sc::FinDispMolecularHessian::energy () const` [virtual]`

This returns a **MolecularEnergy** object, if used by this specialization. Otherwise null is returned. \

Reimplemented from **sc::MolecularHessian**.

### void sc::FinDispMolecularHessian::save\_data\_state (StateOut &)` [virtual]`

Save the base classes (with save\_data\_state) and the members in the same order that the **StateIn** CTOR initializes them. This must be implemented by the derived class if the class has data.

Reimplemented from **sc::SavableState**.

### void sc::FinDispMolecularHessian::set\_energy (const Ref\< MolecularEnergy \> & energy)` [virtual]`

Some **MolecularHessian** specializations require a molecular energy object. The default implementations of this ignores the argument.

Reimplemented from **sc::MolecularHessian**.

## Author

Generated automatically by Doxygen for MPQC from the source code.
