mqc_thermochemistry Module

Computes thermodynamic properties from vibrational frequencies and molecular geometry.

This module implements standard RRHO thermochemistry calculations including: - Zero-point vibrational energy (ZPE) - Translational, rotational, vibrational, and electronic contributions - Thermal corrections to energy, enthalpy, and Gibbs free energy

Default conditions: T = 298.15 K, P = 1 atm Output follows Gaussian-style formatting for compatibility.


Uses

  • module~~mqc_thermochemistry~~UsesGraph module~mqc_thermochemistry mqc_thermochemistry module~mqc_elements mqc_elements module~mqc_thermochemistry->module~mqc_elements module~mqc_physical_constants mqc_physical_constants module~mqc_thermochemistry->module~mqc_physical_constants pic_io pic_io module~mqc_thermochemistry->pic_io pic_lapack_interfaces pic_lapack_interfaces module~mqc_thermochemistry->pic_lapack_interfaces pic_logger pic_logger module~mqc_thermochemistry->pic_logger pic_types pic_types module~mqc_thermochemistry->pic_types module~mqc_elements->pic_types pic_ascii pic_ascii module~mqc_elements->pic_ascii module~mqc_physical_constants->pic_types

Used by

  • module~~mqc_thermochemistry~~UsedByGraph module~mqc_thermochemistry mqc_thermochemistry module~mqc_gmbe_fragment_distribution_scheme mqc_gmbe_fragment_distribution_scheme module~mqc_gmbe_fragment_distribution_scheme->module~mqc_thermochemistry module~mqc_json_output_types mqc_json_output_types module~mqc_gmbe_fragment_distribution_scheme->module~mqc_json_output_types module~mqc_vibrational_analysis mqc_vibrational_analysis module~mqc_gmbe_fragment_distribution_scheme->module~mqc_vibrational_analysis module~mqc_mbe_fragment_distribution_scheme mqc_mbe_fragment_distribution_scheme module~mqc_gmbe_fragment_distribution_scheme->module~mqc_mbe_fragment_distribution_scheme module~mqc_json_output_types->module~mqc_thermochemistry module~mqc_mbe mqc_mbe module~mqc_mbe->module~mqc_thermochemistry module~mqc_mbe->module~mqc_json_output_types module~mqc_mbe->module~mqc_vibrational_analysis module~mqc_vibrational_analysis->module~mqc_thermochemistry proc~hessian_coordinator hessian_coordinator proc~hessian_coordinator->module~mqc_thermochemistry proc~hessian_coordinator->module~mqc_json_output_types proc~hessian_coordinator->module~mqc_vibrational_analysis proc~populate_vibrational_json_data populate_vibrational_json_data proc~populate_vibrational_json_data->module~mqc_thermochemistry proc~populate_vibrational_json_data->module~mqc_json_output_types proc~unfragmented_calculation unfragmented_calculation proc~unfragmented_calculation->module~mqc_thermochemistry proc~unfragmented_calculation->module~mqc_json_output_types proc~unfragmented_calculation->module~mqc_vibrational_analysis module~mqc_driver mqc_driver module~mqc_driver->module~mqc_json_output_types module~mqc_driver->module~mqc_mbe module~mqc_json_writer mqc_json_writer module~mqc_driver->module~mqc_json_writer module~mqc_many_body_expansion mqc_many_body_expansion module~mqc_driver->module~mqc_many_body_expansion module~mqc_driver->module~mqc_mbe_fragment_distribution_scheme module~mqc_json_writer->module~mqc_json_output_types module~mqc_many_body_expansion->module~mqc_json_output_types module~mqc_mbe_fragment_distribution_scheme->module~mqc_json_output_types module~mqc_mbe_fragment_distribution_scheme->module~mqc_mbe proc~distributed_unfragmented_hessian distributed_unfragmented_hessian proc~distributed_unfragmented_hessian->module~mqc_json_output_types proc~global_coordinator global_coordinator proc~global_coordinator->module~mqc_json_output_types 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~populate_unfragmented_json_data populate_unfragmented_json_data proc~populate_unfragmented_json_data->module~mqc_json_output_types proc~serial_fragment_processor serial_fragment_processor proc~serial_fragment_processor->module~mqc_json_output_types module~mpi_fragment_work_smod mpi_fragment_work_smod module~mpi_fragment_work_smod->module~mqc_mbe_fragment_distribution_scheme module~mqc_hessian_distribution_scheme mqc_hessian_distribution_scheme module~mqc_hessian_distribution_scheme->module~mqc_mbe_fragment_distribution_scheme 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~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), public, parameter :: DEFAULT_PRESSURE = 1.0_dp

Default pressure in atm

integer, public, parameter :: DEFAULT_SPIN_MULTIPLICITY = 1

Default spin multiplicity (singlet)

integer, public, parameter :: DEFAULT_SYMMETRY_NUMBER = 1

Default symmetry number

real(kind=dp), public, parameter :: DEFAULT_TEMPERATURE = 298.15_dp

Default temperature in Kelvin

real(kind=dp), private, parameter :: IMAG_FREQ_THRESHOLD = 0.0_dp

Threshold for considering a frequency as imaginary

real(kind=dp), private, parameter :: LINEAR_THRESHOLD = 1.0e-6_dp

Threshold for considering a moment of inertia as zero (linear molecule detection)


Derived Types

type, public ::  thermochemistry_result_t

Container for thermochemistry calculation results

Components

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

Rotational heat capacity

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

Translational heat capacity

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

Vibrational heat capacity

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

Electronic thermal energy (always 0)

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

Rotational thermal energy

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

Translational thermal energy

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

Vibrational thermal energy (excluding ZPE)

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

Electronic entropy

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

Rotational entropy

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

Translational entropy

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

Vibrational entropy

logical, public :: is_linear = .false.

True if molecule is linear

real(kind=dp), public :: moments(3) = 0.0_dp

Principal moments of inertia in amu*Angstrom^2

integer, public :: n_imag_freqs = 0

Number of imaginary frequencies (skipped)

integer, public :: n_real_freqs = 0

Number of real vibrational frequencies

real(kind=dp), public :: pressure = DEFAULT_PRESSURE

Pressure in atm

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

Rotational partition function

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

Translational partition function

real(kind=dp), public :: q_vib = 1.0_dp

Vibrational partition function

real(kind=dp), public :: rot_const(3) = 0.0_dp

Rotational constants in GHz

integer, public :: spin_multiplicity = DEFAULT_SPIN_MULTIPLICITY

Electronic spin multiplicity

integer, public :: symmetry_number = DEFAULT_SYMMETRY_NUMBER

Rotational symmetry number

real(kind=dp), public :: temperature = DEFAULT_TEMPERATURE

Temperature in K

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

E_tot = ZPE + E_trans + E_rot + E_vib

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

H = E_tot + RT

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

G = H - TS

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

Total mass in amu

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

ZPE in Hartree

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

ZPE in kcal/mol


Subroutines

public pure subroutine compute_electronic_entropy(spin_multiplicity, S_elec)

Compute electronic entropy contribution.

Read more…

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: spin_multiplicity

Electronic spin multiplicity (2S+1)

real(kind=dp), intent(out) :: S_elec

Electronic entropy in cal/(mol*K)

public subroutine compute_moments_of_inertia(coords, atomic_numbers, n_atoms, center_of_mass, moments, principal_axes, is_linear, total_mass)

Compute the principal moments of inertia and detect linear molecules.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: coords(:,:)

Atomic coordinates (3, n_atoms) in Bohr

integer, intent(in) :: atomic_numbers(:)

Atomic numbers

integer, intent(in) :: n_atoms

Number of atoms

real(kind=dp), intent(out) :: center_of_mass(3)

Center of mass in Angstrom

real(kind=dp), intent(out) :: moments(3)

Principal moments in amu*Angstrom^2

real(kind=dp), intent(out) :: principal_axes(3,3)

Principal axis vectors (columns)

logical, intent(out) :: is_linear

True if molecule is linear

real(kind=dp), intent(out) :: total_mass

Total mass in amu

public pure subroutine compute_rotational_constants(moments, is_linear, rot_const)

Convert moments of inertia to rotational constants in GHz.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: moments(3)

Moments in amu*Angstrom^2

logical, intent(in) :: is_linear

True if linear molecule

real(kind=dp), intent(out) :: rot_const(3)

Rotational constants in GHz

public pure subroutine compute_rotational_thermo(moments, temperature, symmetry_number, is_linear, E, S, Cv)

Compute rotational contributions to thermodynamic properties.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: moments(3)

Principal moments in amu*Angstrom^2

real(kind=dp), intent(in) :: temperature

Temperature in K

integer, intent(in) :: symmetry_number

Rotational symmetry number

logical, intent(in) :: is_linear

True if linear molecule

real(kind=dp), intent(out) :: E

Thermal energy in Hartree

real(kind=dp), intent(out) :: S

Entropy in cal/(mol*K)

real(kind=dp), intent(out) :: Cv

Heat capacity in cal/(mol*K)

public subroutine compute_thermochemistry(coords, atomic_numbers, frequencies, n_atoms, n_freqs, result, temperature, pressure, symmetry_number, spin_multiplicity)

Main driver for thermochemistry calculations.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: coords(:,:)

Coordinates (3, n_atoms) in Bohr

integer, intent(in) :: atomic_numbers(:)

Atomic numbers

real(kind=dp), intent(in) :: frequencies(:)

Frequencies in cm^-1

integer, intent(in) :: n_atoms

Number of atoms

integer, intent(in) :: n_freqs

Number of frequencies

type(thermochemistry_result_t), intent(out) :: result

Output results

real(kind=dp), intent(in), optional :: temperature

Temperature in K (default 298.15)

real(kind=dp), intent(in), optional :: pressure

Pressure in atm (default 1.0)

integer, intent(in), optional :: symmetry_number

Symmetry number (default 1)

integer, intent(in), optional :: spin_multiplicity

Spin multiplicity (default 1)

public pure subroutine compute_translational_thermo(total_mass, temperature, pressure, E, S, Cv)

Compute translational contributions to thermodynamic properties.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: total_mass

Total mass in amu

real(kind=dp), intent(in) :: temperature

Temperature in K

real(kind=dp), intent(in) :: pressure

Pressure in atm

real(kind=dp), intent(out) :: E

Thermal energy in Hartree

real(kind=dp), intent(out) :: S

Entropy in cal/(mol*K)

real(kind=dp), intent(out) :: Cv

Heat capacity in cal/(mol*K)

public pure subroutine compute_vibrational_thermo(frequencies, n_freqs, temperature, E, S, Cv)

Compute vibrational contributions to thermodynamic properties.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: frequencies(:)

Frequencies in cm^-1

integer, intent(in) :: n_freqs

Number of frequencies

real(kind=dp), intent(in) :: temperature

Temperature in K

real(kind=dp), intent(out) :: E

Thermal energy in Hartree (excluding ZPE)

real(kind=dp), intent(out) :: S

Entropy in cal/(mol*K)

real(kind=dp), intent(out) :: Cv

Heat capacity in cal/(mol*K)

public subroutine compute_zpe(frequencies, n_freqs, n_real, zpe_hartree, zpe_kcalmol)

Compute zero-point vibrational energy from frequencies.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: frequencies(:)

Vibrational frequencies in cm^-1

integer, intent(in) :: n_freqs

Total number of frequencies

integer, intent(out) :: n_real

Number of real (positive) frequencies used

real(kind=dp), intent(out) :: zpe_hartree

ZPE in Hartree

real(kind=dp), intent(out) :: zpe_kcalmol

ZPE in kcal/mol

public subroutine print_thermochemistry(result, electronic_energy, unit)

Print thermochemistry results.

Arguments

Type IntentOptional Attributes Name
type(thermochemistry_result_t), intent(in) :: result
real(kind=dp), intent(in) :: electronic_energy

Electronic energy in Hartree

integer, intent(in), optional :: unit

Output unit (default: stdout)

private pure subroutine compute_partition_functions(total_mass, moments, frequencies, n_freqs, temperature, pressure, sigma, is_linear, q_trans, q_rot, q_vib)

Compute partition functions for translation, rotation, and vibration.

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: total_mass

Total mass in amu

real(kind=dp), intent(in) :: moments(3)

Principal moments in amu*Angstrom^2

real(kind=dp), intent(in) :: frequencies(:)

Frequencies in cm^-1

integer, intent(in) :: n_freqs

Number of frequencies

real(kind=dp), intent(in) :: temperature

Temperature in K

real(kind=dp), intent(in) :: pressure

Pressure in atm

integer, intent(in) :: sigma

Symmetry number

logical, intent(in) :: is_linear

True if linear molecule

real(kind=dp), intent(out) :: q_trans

Translational partition function

real(kind=dp), intent(out) :: q_rot

Rotational partition function

real(kind=dp), intent(out) :: q_vib

Vibrational partition function