calculation_result_t Derived Type

type, public :: calculation_result_t

Container for quantum chemistry calculation results

Stores computed quantities from QC calculations with flags indicating which properties have been computed.


Inherits

type~~calculation_result_t~~InheritsGraph type~calculation_result_t calculation_result_t type~energy_t energy_t type~calculation_result_t->type~energy_t energy type~error_t error_t type~calculation_result_t->type~error_t error 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

Components

Type Visibility Attributes Name Initial
real(kind=dp), public, allocatable :: dipole(:)

Dipole moment vector (3) (Debye)

real(kind=dp), public, allocatable :: dipole_derivatives(:,:)

Dipole derivatives (3, 3N) in a.u. for IR intensities

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

Minimal atomic distance between monomers (Angstrom, 0 for monomers)

type(energy_t), public :: energy

Energy components (Hartree)

type(error_t), public :: error

Calculation error (if any)

real(kind=dp), public, allocatable :: gradient(:,:)

Energy gradient (3, natoms) (Hartree/Bohr)

logical, public :: has_dipole = .false.

Dipole moment has been computed

logical, public :: has_dipole_derivatives = .false.

Dipole derivatives have been computed

logical, public :: has_energy = .false.

Energy has been computed

logical, public :: has_error = .false.

True if calculation failed

logical, public :: has_gradient = .false.

Gradient has been computed

logical, public :: has_hessian = .false.

Hessian has been computed

logical, public :: has_sigma = .false.

Stress tensor has been computed

real(kind=dp), public, allocatable :: hessian(:,:)

Energy hessian (future implementation)

real(kind=dp), public, allocatable :: sigma(:,:)

Stress tensor (3,3) (Hartree/Bohr^3)


Type-Bound Procedures

procedure, public :: destroy => result_destroy

Clean up allocated memory

  • private subroutine result_destroy(this)

    Clean up allocated memory in calculation_result_t

    Arguments

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

procedure, public :: reset => result_reset

Reset all values and flags

  • private subroutine result_reset(this)

    Reset all values and flags in calculation_result_t

    Arguments

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

Source Code

   type :: calculation_result_t
      !! Container for quantum chemistry calculation results
      !!
      !! Stores computed quantities from QC calculations with flags
      !! indicating which properties have been computed.
      type(energy_t) :: energy                  !! Energy components (Hartree)
      real(dp), allocatable :: gradient(:, :)   !! Energy gradient (3, natoms) (Hartree/Bohr)
      real(dp), allocatable :: sigma(:, :)     !! Stress tensor (3,3) (Hartree/Bohr^3)
      real(dp), allocatable :: hessian(:, :)    !! Energy hessian (future implementation)
      real(dp), allocatable :: dipole(:)        !! Dipole moment vector (3) (Debye)
      real(dp), allocatable :: dipole_derivatives(:, :)  !! Dipole derivatives (3, 3N) in a.u. for IR intensities

      ! Fragment metadata
      real(dp) :: distance = 0.0_dp      !! Minimal atomic distance between monomers (Angstrom, 0 for monomers)

      ! Computation status flags
      logical :: has_energy = .false.    !! Energy has been computed
      logical :: has_gradient = .false.  !! Gradient has been computed
      logical :: has_sigma = .false.     !! Stress tensor has been computed
      logical :: has_hessian = .false.   !! Hessian has been computed
      logical :: has_dipole = .false.    !! Dipole moment has been computed
      logical :: has_dipole_derivatives = .false.  !! Dipole derivatives have been computed

      ! Error handling
      type(error_t) :: error             !! Calculation error (if any)
      logical :: has_error = .false.     !! True if calculation failed
   contains
      procedure :: destroy => result_destroy  !! Clean up allocated memory
      procedure :: reset => result_reset      !! Reset all values and flags
   end type calculation_result_t