energy_t Derived Type

type, public :: energy_t

Container for quantum chemistry energy components

Stores energy contributions from different levels of theory. Total energy is computed as: scf + mp2%total() + cc%total()


Inherits

type~~energy_t~~InheritsGraph type~energy_t energy_t type~cc_energy_t cc_energy_t type~energy_t->type~cc_energy_t cc type~mp2_energy_t mp2_energy_t type~energy_t->type~mp2_energy_t mp2

Inherited by

type~~energy_t~~InheritedByGraph type~energy_t energy_t type~calculation_result_t calculation_result_t type~calculation_result_t->type~energy_t energy

Components

Type Visibility Attributes Name Initial
type(cc_energy_t), public :: cc

Coupled cluster correlation components

type(mp2_energy_t), public :: mp2

MP2 correlation components

real(kind=dp), public :: scf = 0.0_dp

SCF/HF reference energy (Hartree)


Type-Bound Procedures

procedure, public :: reset => energy_reset

Reset all components to zero

  • private subroutine energy_reset(this)

    Reset all energy components to zero

    Arguments

    Type IntentOptional Attributes Name
    class(energy_t), intent(inout) :: this

procedure, public :: total => energy_total

Compute total energy from components

  • private pure function energy_total(this) result(total)

    Compute total energy from all components

    Arguments

    Type IntentOptional Attributes Name
    class(energy_t), intent(in) :: this

    Return Value real(kind=dp)

Source Code

   type :: energy_t
      !! Container for quantum chemistry energy components
      !!
      !! Stores energy contributions from different levels of theory.
      !! Total energy is computed as: scf + mp2%total() + cc%total()
      real(dp) :: scf = 0.0_dp           !! SCF/HF reference energy (Hartree)
      type(mp2_energy_t) :: mp2          !! MP2 correlation components
      type(cc_energy_t) :: cc            !! Coupled cluster correlation components
      ! add more as needed, also need to modify the total energy function
   contains
      procedure :: total => energy_total     !! Compute total energy from components
      procedure :: reset => energy_reset     !! Reset all components to zero
   end type energy_t