Skip to content

PES calculations

PES evaluations in CDE

CDE can call several external programs to obtain energies and forces on atoms during GDS and NEB runs. This section describes how this process is managed, and how input files can be set-up to run different external codes.

Warning

CDE does not include any internal/native PES evaluation routines - external codes must be used.

Defining single-point energy calculations

The potential energy surface (PES) type to be used during a CDE-based calculation is indicated through the keywords pestype and pesopttype.

  • pestype is used whenever the code requires a single-point energy evaluation.

  • The current allowed values of pestype are (see pes.f90):

pestype Description
orca Uses the quantum chemical program ORCA (https://orcaforum.cec.mpg.de)
dftb Uses the density-functional tight-binding code DFTB+ (https://www.dftbplus.org)
psi4 Uses the Psi4 quantum chemistry package (http://www.psicode.org)
lammps Uses the PES using the LAMMPS simulation package (https://lammps.sandia.gov)
xtb Uses the standalone xTB code (https://github.com/grimme-lab/xtb)
aims Uses the FHI-aims electronic structure code (https://fhi-aims.org/)
null Does not perform a PES evaluation. Simply returns V = 0 and forces(:) = 0 for all atoms.

Defining geometry optimization calculations

  • The pesopttype is used whenever the code requires a geometry optimization.

  • The allowed values of pesopttype are:

| pesopttype | Description | 2 | :--- | :--- | 3 | orca | ORCA calculation. | 4 | dftb | DFTB+ calculation. | 5 | psi4 | Psi4 calculation. | 6 | lammps | LAMMPS calculation. | 7 | uff | Performs geometry optimization using the UFF (Universal Force Field) as implemented in Babel/Open Babel (http://openbabel.org/wiki/Main_Page). | 8 | xtb | xTB calculation. | 9 | aims | FHI-aims calculation. | 10 | null | Does not perform geometry optimization. |

Defining PES calculation executables

As well as knowing which type of PES calculation to perform, cde needs to know how to run the external executables which are requested to calculate potential energies and forces, or to run geometry optimizations.

The executables to be used to energy evaluations or geometry optimization are defined in the variables pesexecutable and pesoptexecutable, as in the following input-file lines:

pesexecutable ~/programs/orca
pesoptexecutable ~/programs/orca

In the example above, we're are indicating that the external program to be used is orca, and this is stored in the directory ~/programs/.

Internally, CDE runs FORTRAN EXECUTE_COMMAND_LINE calls to run external codes, using input files generated according to templates provided as pesfile and pesoptfile (see the section on PES templates).

For example, based on the above, CDE will run the following command when an orca calculation is required:

~/programs/orca temp.in

where temp.in is the name of a temporary input file which is auto-generated by CDE during PES calculations.

Warning

If there is no executable called ~/programs/orca, the CDE calculation will fail. You should check that your PES executables and template files run as a stand-alone example, before trying to perform calculations through cde.

To make sure everything runs smoothly, there are two useful options:

(1) You can set up an alias for each executable, then provide the alias as pesexecutable and pesoptexecutable. For example, lets say you have orca installed in ~/programs/stuff/orca/bin/. If you include an alias in your .bashrc (or similar config file if you're on a different system) which reads:

alias orca='~/programs/stuff/orca/bin/orca'

then running the command orca will then execute ~/programs/stuff/orca/bin/orca, which should indeed correspond to an executable binary.

This means that you can then use the following in your cde input files:

pesexecutable orca
pesoptexecutable orca

without having to provide the full path to the executables.

(2) As an alternative, you can also give the full pathname to the desired executable directly in the input file, like this:

  pesexecutable ~/programs/stuff/orca/bin/orca
  pesoptexecutable ~/programs/stuff/orca/bin/orca