Container for Many-Body Expansion aggregated results
Stores total properties computed via MBE: energy, gradient, hessian, dipole. Caller allocates desired components before calling compute_mbe; the function uses allocated() to determine what to compute and sets has_* flags on success.
| 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) |
Allocate dipole array (always 3 components)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(mbe_result_t), | intent(inout) | :: | this |
Allocate gradient array for total_atoms
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(mbe_result_t), | intent(inout) | :: | this | |||
| integer, | intent(in) | :: | total_atoms |
Allocate hessian array for total_atoms
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(mbe_result_t), | intent(inout) | :: | this | |||
| integer, | intent(in) | :: | total_atoms |
Clean up allocated memory
Clean up allocated memory in mbe_result_t
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(mbe_result_t), | intent(inout) | :: | this |
Reset all values and flags
Reset all values and flags in mbe_result_t
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(mbe_result_t), | intent(inout) | :: | this |
type :: mbe_result_t !! Container for Many-Body Expansion aggregated results !! !! Stores total properties computed via MBE: energy, gradient, hessian, dipole. !! Caller allocates desired components before calling compute_mbe; the function !! uses allocated() to determine what to compute and sets has_* flags on success. real(dp) :: total_energy = 0.0_dp !! Total MBE energy (Hartree) real(dp), allocatable :: gradient(:, :) !! Total gradient (3, total_atoms) (Hartree/Bohr) real(dp), allocatable :: hessian(:, :) !! Total Hessian (3*natoms, 3*natoms) real(dp), allocatable :: dipole(:) !! Total dipole moment (3) (e*Bohr) real(dp), allocatable :: dipole_derivatives(:, :) !! Dipole derivatives (3, 3*natoms) for IR intensities ! Computation status flags logical :: has_energy = .false. !! Energy has been computed logical :: has_gradient = .false. !! Gradient has been computed logical :: has_hessian = .false. !! Hessian has been computed logical :: has_dipole = .false. !! Dipole has been computed logical :: has_dipole_derivatives = .false. !! Dipole derivatives have been computed contains procedure :: destroy => mbe_result_destroy !! Clean up allocated memory procedure :: reset => mbe_result_reset !! Reset all values and flags procedure :: allocate_gradient => mbe_result_allocate_gradient procedure :: allocate_hessian => mbe_result_allocate_hessian procedure :: allocate_dipole => mbe_result_allocate_dipole end type mbe_result_t