mqc_result_types Module

Defines data structures for storing and managing results from quantum chemistry calculations including energies, gradients, and properties. MP2 energy components type Coupled cluster energy components type Energy components type Main result container type MBE aggregated result container type Send result over MPI Receive result over MPI


Uses

  • module~~mqc_result_types~~UsesGraph module~mqc_result_types mqc_result_types module~mqc_error mqc_error module~mqc_result_types->module~mqc_error pic_mpi_lib pic_mpi_lib module~mqc_result_types->pic_mpi_lib pic_types pic_types module~mqc_result_types->pic_types

Used by

  • module~~mqc_result_types~~UsedByGraph module~mqc_result_types mqc_result_types module~mqc_calculation_interface mqc_calculation_interface module~mqc_calculation_interface->module~mqc_result_types module~mqc_driver mqc_driver module~mqc_driver->module~mqc_result_types module~mqc_mbe_fragment_distribution_scheme mqc_mbe_fragment_distribution_scheme module~mqc_driver->module~mqc_mbe_fragment_distribution_scheme module~mqc_frag_utils mqc_frag_utils module~mqc_driver->module~mqc_frag_utils module~mqc_mbe mqc_mbe module~mqc_driver->module~mqc_mbe module~mqc_gmbe_fragment_distribution_scheme mqc_gmbe_fragment_distribution_scheme module~mqc_gmbe_fragment_distribution_scheme->module~mqc_result_types module~mqc_gmbe_fragment_distribution_scheme->module~mqc_mbe_fragment_distribution_scheme module~mqc_gmbe_utils mqc_gmbe_utils module~mqc_gmbe_utils->module~mqc_result_types module~mqc_mbe_fragment_distribution_scheme->module~mqc_result_types module~mqc_method_base mqc_method_base module~mqc_mbe_fragment_distribution_scheme->module~mqc_method_base module~mqc_mbe_fragment_distribution_scheme->module~mqc_mbe module~mqc_method_factory mqc_method_factory module~mqc_mbe_fragment_distribution_scheme->module~mqc_method_factory module~mqc_method_base->module~mqc_result_types module~mqc_method_dft mqc_method_dft module~mqc_method_dft->module~mqc_result_types module~mqc_method_dft->module~mqc_method_base module~mqc_method_hf mqc_method_hf module~mqc_method_hf->module~mqc_result_types module~mqc_method_hf->module~mqc_method_base module~mqc_method_mcscf mqc_method_mcscf module~mqc_method_mcscf->module~mqc_result_types module~mqc_method_mcscf->module~mqc_method_base module~mqc_method_xtb mqc_method_xtb module~mqc_method_xtb->module~mqc_result_types module~mqc_method_xtb->module~mqc_method_base proc~compute_gmbe compute_gmbe proc~compute_gmbe->module~mqc_result_types proc~compute_gmbe->module~mqc_gmbe_utils proc~compute_mbe compute_mbe proc~compute_mbe->module~mqc_result_types proc~compute_mbe_dipole compute_mbe_dipole proc~compute_mbe_dipole->module~mqc_result_types proc~compute_mbe_dipole_derivatives compute_mbe_dipole_derivatives proc~compute_mbe_dipole_derivatives->module~mqc_result_types proc~compute_mbe_gradient compute_mbe_gradient proc~compute_mbe_gradient->module~mqc_result_types proc~compute_mbe_hessian compute_mbe_hessian proc~compute_mbe_hessian->module~mqc_result_types proc~global_coordinator global_coordinator proc~global_coordinator->module~mqc_result_types proc~process_intersection_derivatives process_intersection_derivatives proc~process_intersection_derivatives->module~mqc_result_types proc~process_intersection_derivatives->module~mqc_gmbe_utils proc~serial_fragment_processor serial_fragment_processor proc~serial_fragment_processor->module~mqc_result_types module~mpi_fragment_work_smod mpi_fragment_work_smod module~mpi_fragment_work_smod->module~mqc_mbe_fragment_distribution_scheme module~mqc_frag_utils->module~mqc_gmbe_utils module~mqc_hessian_distribution_scheme mqc_hessian_distribution_scheme module~mqc_hessian_distribution_scheme->module~mqc_mbe_fragment_distribution_scheme module~mqc_mbe->module~mqc_gmbe_utils module~mqc_mbe->module~mqc_frag_utils module~mqc_method_factory->module~mqc_method_base module~mqc_method_factory->module~mqc_method_dft module~mqc_method_factory->module~mqc_method_hf module~mqc_method_factory->module~mqc_method_mcscf module~mqc_method_factory->module~mqc_method_xtb module~mqc_serial_fragment_processor mqc_serial_fragment_processor module~mqc_serial_fragment_processor->module~mqc_mbe_fragment_distribution_scheme module~mqc_unfragmented_workflow mqc_unfragmented_workflow module~mqc_unfragmented_workflow->module~mqc_mbe_fragment_distribution_scheme proc~compute_energy_and_forces compute_energy_and_forces proc~compute_energy_and_forces->module~mqc_driver proc~gmbe_run_distributed gmbe_context_t%gmbe_run_distributed proc~gmbe_run_distributed->module~mqc_gmbe_fragment_distribution_scheme proc~gmbe_run_distributed->module~mqc_mbe_fragment_distribution_scheme proc~gmbe_run_serial gmbe_context_t%gmbe_run_serial proc~gmbe_run_serial->module~mqc_gmbe_fragment_distribution_scheme proc~hessian_coordinator hessian_coordinator proc~hessian_coordinator->module~mqc_method_base proc~hessian_coordinator->module~mqc_method_factory proc~hessian_worker hessian_worker proc~hessian_worker->module~mqc_method_base proc~hessian_worker->module~mqc_method_factory proc~mbe_run_distributed mbe_context_t%mbe_run_distributed proc~mbe_run_distributed->module~mqc_mbe_fragment_distribution_scheme proc~mbe_run_serial mbe_context_t%mbe_run_serial proc~mbe_run_serial->module~mqc_mbe_fragment_distribution_scheme program~main main program~main->module~mqc_driver

Variables

Type Visibility Attributes Name Initial
real(kind=dp), private, parameter :: SCS_OS_SCALE = 1.2_dp

SCS opposite-spin scaling factor

real(kind=dp), private, parameter :: SCS_SS_SCALE = 1.0_dp/3.0_dp

SCS same-spin scaling factor


Derived Types

type, public ::  calculation_result_t

Container for quantum chemistry calculation results

Read more…

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

procedure, public :: reset => result_reset

Reset all values and flags

type, public ::  cc_energy_t

Container for coupled cluster energy components

Components

Type Visibility Attributes Name Initial
real(kind=dp), public :: doubles = 0.0_dp

Doubles contribution (Hartree)

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

Singles contribution (Hartree)

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

Triples contribution (Hartree)

Type-Bound Procedures

procedure, public :: check_stability => cc_check_stability

Check for positive energies (instability)

procedure, public :: reset => cc_reset

Reset all components to zero

procedure, public :: total => cc_total

Compute total CC correlation

type, public ::  energy_t

Container for quantum chemistry energy components

Read more…

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

procedure, public :: total => energy_total

Compute total energy from components

type, public ::  mbe_result_t

Container for Many-Body Expansion aggregated results

Read more…

Components

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

Total dipole moment (3) (e*Bohr)

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

Dipole derivatives (3, 3*natoms) for IR intensities

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

Total gradient (3, total_atoms) (Hartree/Bohr)

logical, public :: has_dipole = .false.

Dipole 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_gradient = .false.

Gradient has been computed

logical, public :: has_hessian = .false.

Hessian has been computed

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

Total Hessian (3natoms, 3natoms)

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

Total MBE energy (Hartree)

Type-Bound Procedures

procedure, public :: allocate_dipole => mbe_result_allocate_dipole
procedure, public :: allocate_gradient => mbe_result_allocate_gradient
procedure, public :: allocate_hessian => mbe_result_allocate_hessian
procedure, public :: destroy => mbe_result_destroy

Clean up allocated memory

procedure, public :: reset => mbe_result_reset

Reset all values and flags

type, public ::  mp2_energy_t

Container for MP2 energy components (SS/OS)

Components

Type Visibility Attributes Name Initial
real(kind=dp), public :: os = 0.0_dp

Opposite-spin correlation energy (Hartree)

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

Same-spin correlation energy (Hartree)

Type-Bound Procedures

procedure, public :: check_stability => mp2_check_stability

Check for positive energies (instability)

procedure, public :: reset => mp2_reset

Reset both components to zero

procedure, public :: scs => mp2_scs

Compute SCS-MP2 correlation

procedure, public :: total => mp2_total

Compute total MP2 correlation


Functions

private pure function cc_total(this) result(total)

Compute total CC correlation energy

Arguments

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

Return Value real(kind=dp)

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)

private pure function mp2_scs(this) result(scs_energy)

Compute SCS-MP2 (Spin-Component Scaled MP2) correlation energy SCS-MP2 uses: E_SCS = (1/3)E_SS + 1.2E_OS

Arguments

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

Return Value real(kind=dp)

private pure function mp2_total(this) result(total)

Compute total MP2 correlation energy

Arguments

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

Return Value real(kind=dp)


Subroutines

public subroutine result_irecv(result, comm, source, tag, req)

Receive calculation result over MPI (non-blocking) Receives SCF energy (non-blocking) and other components (blocking)

Arguments

Type IntentOptional Attributes Name
type(calculation_result_t), intent(inout) :: result
type(comm_t), intent(in) :: comm
integer, intent(in) :: source
integer, intent(in) :: tag
type(request_t), intent(out) :: req

public subroutine result_isend(result, comm, dest, tag, req)

Send calculation result over MPI (non-blocking) Sends SCF energy (non-blocking) and other components (blocking)

Arguments

Type IntentOptional Attributes Name
type(calculation_result_t), intent(in) :: result
type(comm_t), intent(in) :: comm
integer, intent(in) :: dest
integer, intent(in) :: tag
type(request_t), intent(out) :: req

public subroutine result_recv(result, comm, source, tag, status)

Receive calculation result over MPI (blocking) Receives energy components and conditionally receives gradient based on flag

Arguments

Type IntentOptional Attributes Name
type(calculation_result_t), intent(inout) :: result
type(comm_t), intent(in) :: comm
integer, intent(in) :: source
integer, intent(in) :: tag
type(MPI_Status), intent(out) :: status

public subroutine result_send(result, comm, dest, tag)

Send calculation result over MPI (blocking) Sends energy components and conditionally sends gradient based on has_gradient flag

Arguments

Type IntentOptional Attributes Name
type(calculation_result_t), intent(in) :: result
type(comm_t), intent(in) :: comm
integer, intent(in) :: dest
integer, intent(in) :: tag

private subroutine cc_check_stability(this)

Check for positive CC correlation energies (instability warning) Correlation energies should be negative; positive values indicate instability

Arguments

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

private subroutine cc_reset(this)

Reset all CC components to zero

Arguments

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

private subroutine energy_reset(this)

Reset all energy components to zero

Arguments

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

private subroutine mbe_result_allocate_dipole(this)

Allocate dipole array (always 3 components)

Arguments

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

private subroutine mbe_result_allocate_gradient(this, total_atoms)

Allocate gradient array for total_atoms

Arguments

Type IntentOptional Attributes Name
class(mbe_result_t), intent(inout) :: this
integer, intent(in) :: total_atoms

private subroutine mbe_result_allocate_hessian(this, total_atoms)

Allocate hessian array for total_atoms

Arguments

Type IntentOptional Attributes Name
class(mbe_result_t), intent(inout) :: this
integer, intent(in) :: total_atoms

private subroutine mbe_result_destroy(this)

Clean up allocated memory in mbe_result_t

Arguments

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

private subroutine mbe_result_reset(this)

Reset all values and flags in mbe_result_t

Arguments

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

private subroutine mp2_check_stability(this)

Check for positive MP2 correlation energies (instability warning) Correlation energies should be negative; positive values indicate instability

Arguments

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

private subroutine mp2_reset(this)

Reset both MP2 components to zero

Arguments

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

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

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