Procedures

ProcedureLocationProcedure TypeDescription
add_hydrogen_caps mqc_physical_fragment Subroutine

Add hydrogen caps to fragment for broken bonds Caps are placed at the position of the atom outside the fragment

add_solvation_to_calc mqc_method_xtb Subroutine

Add implicit solvation model to XTB calculator

Read more…
allocate_basis_shells mqc_cgto Subroutine

Allocate array of shells in an atomic basis

ang_mom_char_to_int mqc_basis_reader Function

Convert angular momentum character to integer

Read more…
ang_mom_int_to_char mqc_basis_reader Function

Convert angular momentum integer to character

Read more…
apply_distance_screening mqc_frag_utils Subroutine

Apply distance-based screening to filter out fragments that exceed cutoff distances Modifies polymers array in-place and updates total_fragments count

Read more…
arrays_equal_internal mqc_fragment_lookup Function

Check if two arrays are equal

atom_sets_equal mqc_gmbe_utils Function

Check if two atom sets are equal (assuming sorted)

atomic_basis_destroy mqc_cgto Subroutine

Clean up allocated memory in an atomic basis

atomic_basis_num_basis_functions mqc_cgto Function

Get total number of basis functions for an atom

basis_set_allocate_elements mqc_cgto Subroutine

Allocate array of atomic basis elements in a molecular basis set

basis_set_destroy mqc_cgto Subroutine

Clean up allocated memory in a molecular basis set

binomial mqc_combinatorics Function

Compute binomial coefficient C(n,r) = n! / (r! * (n-r)!)

Read more…
build_fragment_from_atom_list mqc_physical_fragment Subroutine

Build a fragment from explicit atom list (for GMBE intersection fragments)

Read more…
build_fragment_from_indices mqc_physical_fragment Subroutine

Build a fragment on-the-fly from monomer indices with hydrogen capping for broken bonds

Read more…
build_mbe_lookup_table mqc_mbe Subroutine

Build hash table for fast fragment lookups

build_molecular_basis mqc_basis_reader Subroutine

Build molecular basis from geometry and basis file Only parses unique elements, then copies basis data to atoms

calc_type_from_string mqc_calc_types Function

Convert calculation type string to integer constant

Read more…
calc_type_to_string mqc_calc_types Function

Convert calculation type integer constant to string

Read more…
calculate_fragment_distances mqc_combinatorics Subroutine

Calculate minimal atomic distance for each fragment For monomers (1-body), distance is 0.0 For n-mers (n >= 2), distance is the minimum distance between atoms in different constituent monomers

calculate_monomer_distance mqc_physical_fragment Function

Calculate minimal atomic distance between monomers in a fragment For single monomer (size 1), returns 0.0 For multi-monomer fragments, returns minimal distance between atoms in different monomers Result is in Angstrom

cc_check_stability mqc_result_types Subroutine

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

cc_reset mqc_result_types Subroutine

Reset all CC components to zero

cc_total mqc_result_types Function

Compute total CC correlation energy

cgto_allocate_arrays mqc_cgto Subroutine

Allocate arrays for exponents and coefficients in a CGTO

cgto_destroy mqc_cgto Subroutine

Clean up allocated memory in a CGTO

cgto_num_basis_functions mqc_cgto Function

Get number of basis functions in a shell (Cartesian)

check_duplicate_atoms mqc_physical_fragment Subroutine

Validate that fragment has no spatially overlapping atoms Checks if any two atoms are too close together (< 0.01 Bohr) This catches bugs in geometry construction or fragment building

check_fragment_overlap mqc_config_adapter Subroutine

Check if any atoms appear in multiple fragments This is O(nfrag * natoms_per_frag^2) which is acceptable for typical fragment sizes

classify_line mqc_basis_reader Function

Classify a line from a gamess formatted basis set file

cli_args_destroy mqc_cli_parser Subroutine

Clean up CLI args

combine mqc_combinatorics Subroutine

Generate all combinations of size r from array arr of size n Uses int64 for count to handle large numbers of combinations that overflow int32.

combine_util mqc_combinatorics Subroutine

Utility for generating combinations recursively Uses int64 for count to handle large numbers of combinations that overflow int32.

compute_cartesian_displacements mqc_vibrational_analysis Subroutine

Convert mass-weighted eigenvectors to Cartesian displacements.

Read more…
compute_electronic_entropy mqc_thermochemistry Subroutine

Compute electronic entropy contribution.

Read more…
compute_energy_and_forces mqc_calculation_interface Subroutine

Compute energy and forces for current geometry This is the main interface for optimization/dynamics codes

Read more…
compute_force_constants mqc_vibrational_analysis Subroutine

Compute force constants for each normal mode.

Read more…
compute_gmbe mqc_mbe Subroutine

Compute generalized many-body expansion (GMBE) energy with optional gradient and/or hessian

Read more…
compute_ir_intensities mqc_vibrational_analysis Subroutine

Compute IR intensities from dipole derivatives and normal modes.

Read more…
compute_mbe mqc_mbe Subroutine

Compute many-body expansion (MBE) energy with optional gradient, hessian, and dipole

Read more…
compute_mbe_delta mqc_mbe Function

Bottom-up computation of n-body correction (non-recursive, uses pre-computed subset deltas) deltaE(i1,i2,…,in) = E(i1,i2,…,in) - sum of all subset deltaE values All subsets must have been computed already (guaranteed by processing fragments in order)

compute_mbe_dipole mqc_mbe Subroutine

Bottom-up computation of n-body dipole correction Exactly mirrors the energy MBE logic: deltaDipole = Dipole - sum(all subset deltaDipoles) Dipoles are additive vectors in the system frame, no coordinate mapping needed

compute_mbe_dipole_derivatives mqc_mbe Subroutine

Bottom-up computation of n-body dipole derivative correction Mirrors MBE Hessian logic but for dipole derivatives Bond connectivity is accessed via sys_geom%bonds

compute_mbe_gradient mqc_mbe Subroutine

Bottom-up computation of n-body gradient correction Exactly mirrors the energy MBE logic: deltaG = G - sum(all subset deltaGs) All gradients are in system coordinates, so subtraction is simple Bond connectivity is accessed via sys_geom%bonds

compute_mbe_hessian mqc_mbe Subroutine

Bottom-up computation of n-body Hessian correction Mirrors MBE gradient logic but for second derivatives Bond connectivity is accessed via sys_geom%bonds

compute_moments_of_inertia mqc_thermochemistry Subroutine

Compute the principal moments of inertia and detect linear molecules.

Read more…
compute_partition_functions mqc_thermochemistry Subroutine

Compute partition functions for translation, rotation, and vibration.

compute_polymer_atoms mqc_gmbe_utils Subroutine

Compute the atom list for a polymer (union of atoms from base fragments) polymer(:) contains base fragment indices (1-based)

compute_reduced_masses mqc_vibrational_analysis Subroutine

Compute reduced masses for each normal mode.

Read more…
compute_rotational_constants mqc_thermochemistry Subroutine

Convert moments of inertia to rotational constants in GHz.

Read more…
compute_rotational_thermo mqc_thermochemistry Subroutine

Compute rotational contributions to thermodynamic properties.

Read more…
compute_thermochemistry mqc_thermochemistry Subroutine

Main driver for thermochemistry calculations.

Read more…
compute_translational_thermo mqc_thermochemistry Subroutine

Compute translational contributions to thermodynamic properties.

Read more…
compute_vibrational_analysis mqc_vibrational_analysis Subroutine

Perform complete vibrational analysis from Hessian matrix.

Read more…
compute_vibrational_frequencies mqc_vibrational_analysis Subroutine

Compute vibrational frequencies from the Hessian matrix.

Read more…
compute_vibrational_thermo mqc_thermochemistry Subroutine

Compute vibrational contributions to thermodynamic properties.

Read more…
compute_zpe mqc_thermochemistry Subroutine

Compute zero-point vibrational energy from frequencies.

Read more…
config_destroy mqc_config_parser Subroutine

Clean up allocated memory in mqc_config_t

config_log_settings mqc_method_config Subroutine

Log method-specific settings based on method type

Read more…
config_reset mqc_method_config Subroutine

Reset all configuration values to defaults

config_to_driver mqc_config_adapter Subroutine

Convert mqc_config_t to minimal driver_config_t Extracts only the fields needed by the driver If molecule_index is provided, uses that molecule’s fragment count

config_to_system_geometry mqc_config_adapter Subroutine

Convert mqc_config_t geometry to system_geometry_t For unfragmented calculations (nfrag=0), treats entire system as single unit For fragmented calculations, currently assumes monomer-based fragmentation If molecule_index is provided, uses that specific molecule from multi-molecule mode

configure_dft mqc_method_factory Subroutine

Configure a DFT method instance from config%scf (shared) and config%dft (DFT-specific)

configure_hf mqc_method_factory Subroutine

Configure a Hartree-Fock method instance from config%scf (shared SCF settings)

configure_mcscf mqc_method_factory Subroutine

Configure a MCSCF method instance from config%mcscf

configure_xtb mqc_method_factory Subroutine

Configure an XTB method instance from config%xtb

copy_and_displace_geometry mqc_finite_differences Subroutine

Create a copy of reference geometry with one coordinate displaced

Read more…
copy_atomic_basis mqc_basis_reader Subroutine

Deep copy of atomic basis data from source to dest

count_hydrogen_caps mqc_physical_fragment Subroutine

Count how many hydrogen caps are needed for a fragment A cap is needed when exactly one atom of a broken bond is in the fragment

count_shells_for_element mqc_basis_reader Subroutine

Count the number of shells for a specific element in a GAMESS formatted basis string,

create_method mqc_method_factory Function

Convenience function to create a method without instantiating factory

Read more…
create_monomer_list mqc_combinatorics Subroutine

Generate a list of monomer indices from 1 to N

dfs_pie_accumulate mqc_gmbe_utils Subroutine

DFS helper: accumulate PIE coefficients for intersections

dft_calc_energy mqc_method_dft Subroutine

Calculate electronic energy using Kohn-Sham DFT

Read more…
dft_calc_gradient mqc_method_dft Subroutine

Calculate energy gradient using Kohn-Sham DFT

Read more…
dft_calc_hessian mqc_method_dft Subroutine

Calculate energy Hessian using Kohn-Sham DFT

Read more…
displaced_geometry_destroy mqc_finite_differences Subroutine

Clean up memory for displaced geometry

distributed_unfragmented_hessian mqc_mbe_fragment_distribution_scheme Interface
do_fragment_work mqc_mbe_fragment_distribution_scheme Interface
element_mass mqc_elements Function

Return atomic mass in atomic mass units (amu) for a given atomic number Uses standard atomic weights from IUPAC

element_number_to_symbol mqc_elements Function

Convert atomic number to element symbol Covers the complete periodic table (elements 1-118)

element_symbol_to_number mqc_elements Function

Convert element symbol to atomic number Covers the complete periodic table (elements 1-118)

ends_with mqc_io_helpers Function

Check if string ends with suffix

energy_reset mqc_result_types Subroutine

Reset all energy components to zero

energy_total mqc_result_types Function

Compute total energy from all components

error_add_context mqc_error Subroutine

Add a call location to the stack trace Typically called when propagating errors upward

Read more…
error_clear mqc_error Subroutine

Clear the error state and stack trace

error_get_code mqc_error Function

Get the error code

error_get_full_trace mqc_error Function

Get complete error message with stack trace Returns a multi-line string with error and call stack

error_get_message mqc_error Function

Get the error message (without stack trace)

error_has_error mqc_error Function

Check if an error is set

error_print_trace mqc_error Subroutine

Print error with stack trace to specified unit If unit not specified, prints to stdout (unit 6)

error_set mqc_error Subroutine

Set an error with code and message Resets the stack trace

extract_element mqc_basis_file_reader Subroutine

Extract the basis set data for a specific element from the basis file

factory_create mqc_method_factory Function

Create a quantum chemistry method instance from configuration

Read more…
fill_element_basis mqc_basis_reader Subroutine

Fill in the shell data for a specific element from a GAMESS formatted basis string

find_basis_file mqc_basis_utils Subroutine

Find basis set file using normalized name

Read more…
find_fragment_intersection mqc_gmbe_utils Function

Find shared atoms between two fragments (for GMBE with overlapping fragments)

Read more…
find_unique_strings mqc_basis_reader Subroutine

Find unique strings in an array Returns array of unique strings and count

finite_diff_dipole_derivatives mqc_finite_differences Subroutine

Compute dipole moment derivatives via central finite differences

Read more…
finite_diff_hessian_from_gradients mqc_finite_differences Subroutine

Compute Hessian matrix from finite differences of gradients

Read more…
fragment_compute_nelec mqc_physical_fragment Subroutine

Compute number of electrons from atomic numbers and charge

fragment_destroy mqc_physical_fragment Subroutine

Clean up allocated memory in physical_fragment_t

fragment_lookup_destroy mqc_fragment_lookup Subroutine

Clean up hash table and all chains

fragment_lookup_find mqc_fragment_lookup Function

Find fragment index for given monomer combination

fragment_lookup_init mqc_fragment_lookup Subroutine

Initialize hash table with estimated size

fragment_lookup_insert mqc_fragment_lookup Subroutine

Insert a monomer combination -> fragment index mapping

fragment_set_basis mqc_physical_fragment Subroutine

Set the basis set for this fragment

fragment_should_be_screened mqc_frag_utils Function

Check if a fragment should be screened out based on distance cutoffs. Returns true if the fragment itself OR any of its k-subsets (k >= 2) exceeds the corresponding k-mer cutoff. This ensures MBE subset consistency.

generate_fragment_list mqc_combinatorics Subroutine

Generate all possible fragments (combinations of monomers) up to max_level Uses int64 for count to handle large numbers of fragments that overflow int32.

generate_intersections mqc_gmbe_utils Subroutine

Generate all k-way intersections for k=2 to min(max_intersection_level, n_monomers)

Read more…
generate_intersections_from_atom_lists mqc_gmbe_utils Subroutine

Generate k-way intersections from arbitrary atom lists (not tied to sys_geom) max_k_level limits the maximum intersection order to prevent combinatorial explosion

generate_k_way_intersections_for_level mqc_gmbe_utils Subroutine

Helper to generate all k-way intersections at a specific level k

generate_k_way_intersections_from_lists mqc_gmbe_utils Subroutine

Generate all k-way intersections from atom lists

generate_perturbed_geometries mqc_finite_differences Subroutine

Generate all forward and backward displaced geometries for finite difference calculations

Read more…
generate_polymer_intersections mqc_gmbe_utils Subroutine

Generate all k-way intersections for polymers at any level (GMBE-N) This works with dynamically generated polymers, not just base fragments

geometry_destroy mqc_geometry Subroutine

Clean up allocated memory in geometry_type

geometry_to_system_fragmented mqc_config_adapter Subroutine

Convert geometry to system_geometry_t for fragmented calculation Supports both identical and variable-sized fragments

geometry_to_system_unfragmented mqc_config_adapter Subroutine

Convert geometry to system_geometry_t for unfragmented calculation Treats entire system as a single monomer

get_basename mqc_io_helpers Function

Get the base name without “output_” prefix and “.json” suffix Example: “output_w1.json” -> “w1”

get_frag_level_name mqc_mbe_io Function

Map body level (n-mer) to descriptive name Supports up to decamers (10-mers), then falls back to “N-mers” format

get_logger_level mqc_config_adapter Function

Convert string log level to integer value This function uses the pic_logger constants

get_molecule_name mqc_io_helpers Function

Extract molecule name from filename Example: “output_multi_structure_molecule_1.json” -> “molecule_1”

get_monomer_atom_list mqc_mbe Subroutine

Build 0-indexed atom list for a monomer, handling fixed or variable-sized fragments.

get_next_combination mqc_combinatorics Subroutine

Generate next combination (updates indices in place) has_next = .true. if there’s a next combination

get_next_line mqc_basis_reader Subroutine

Extract the next line from a string starting at line_start

get_nfrags mqc_combinatorics Function

Calculate total number of fragments for given system size and max level

Read more…
get_output_json_filename mqc_io_helpers Function

Get the current JSON output filename

get_solvent_dielectric mqc_method_xtb Function

Get dielectric constant for a named solvent

Read more…
global_coordinator mqc_mbe_fragment_distribution_scheme Interface
gmbe_destroy mqc_many_body_expansion Subroutine

Clean up GMBE context

gmbe_enumerate_pie_terms mqc_gmbe_utils Subroutine

Enumerate all unique intersections via DFS and accumulate PIE coefficients This implements the GMBE(N) algorithm with inclusion-exclusion principle

Read more…
gmbe_init mqc_many_body_expansion Subroutine

Initialize GMBE context with required configuration

gmbe_pie_coordinator mqc_gmbe_fragment_distribution_scheme Subroutine

MPI coordinator for PIE-based GMBE calculations Distributes PIE terms across MPI ranks and accumulates results If json_data is present, populates it for centralized JSON output Bond connectivity is accessed via sys_geom%bonds

gmbe_run_distributed mqc_many_body_expansion Subroutine

Run distributed GMBE calculation

gmbe_run_serial mqc_many_body_expansion Subroutine

Run serial GMBE calculation

grow_pie_storage mqc_gmbe_utils Subroutine

Grow PIE term storage arrays when capacity is exceeded.

hessian_coordinator mqc_mbe_fragment_distribution_scheme Interface
hessian_worker mqc_mbe_fragment_distribution_scheme Interface
hf_calc_energy mqc_method_hf Subroutine

Calculate electronic energy using Hartree-Fock method

hf_calc_gradient mqc_method_hf Subroutine

Calculate energy gradient using Hartree-Fock method

initialize_fragmented_system mqc_config_adapter Subroutine

Shared helper to initialize system_geometry_t for fragmented calculations Handles fragment allocation, size checking, and overlap validation

initialize_system_geometry mqc_physical_fragment Subroutine

Read full geometry and monomer template, initialize system_geometry_t

input_fragment_destroy mqc_config_parser Subroutine

Clean up allocated memory in input_fragment_t

int_to_string mqc_xyz_reader Function

Convert integer to string

intersect_atom_lists mqc_gmbe_utils Subroutine

Compute intersection of two atom lists

is_blank_or_control mqc_basis_reader Function

Check if a line is blank or a control line (starts with ‘$’)

is_function_line mqc_basis_reader Function

Check if a line is a function coefficient line (starts with a number)

is_letter mqc_basis_file_reader Function

Check if character is a letter (A-Z or a-z)

is_shell_header mqc_basis_reader Function

Check if a line is a shell header line (starts with S, P, D, F, G, H, I, or L)

is_uppercase_letter mqc_basis_file_reader Function

Check if character is an uppercase letter (A-Z)

json_output_data_destroy mqc_json_output_types Subroutine

Clean up all allocated memory

json_output_data_reset mqc_json_output_types Subroutine

Reset all flags and scalar values to defaults

map_fragment_to_system_dipole_derivatives mqc_mbe Subroutine

Map fragment dipole derivatives to system coordinates with hydrogen cap redistribution

Read more…
map_fragment_to_system_gradient mqc_mbe Subroutine

Map fragment gradient to system gradient coordinates with hydrogen cap redistribution

Read more…
map_fragment_to_system_hessian mqc_mbe Subroutine

Map fragment Hessian to system Hessian coordinates with hydrogen cap redistribution Bond connectivity is accessed via sys_geom%bonds

mass_weight_hessian mqc_vibrational_analysis Subroutine

Apply mass weighting to Hessian matrix.

Read more…
mbe_base_destroy mqc_many_body_expansion Subroutine

Clean up base class resources

mbe_base_has_geometry mqc_many_body_expansion Function

Check if system geometry is available

mbe_base_has_mpi mqc_many_body_expansion Function

Check if MPI resources are available

mbe_destroy mqc_many_body_expansion Subroutine

Clean up MBE context

mbe_init mqc_many_body_expansion Subroutine

Initialize MBE context with required configuration

mbe_result_allocate_dipole mqc_result_types Subroutine

Allocate dipole array (always 3 components)

mbe_result_allocate_gradient mqc_result_types Subroutine

Allocate gradient array for total_atoms

mbe_result_allocate_hessian mqc_result_types Subroutine

Allocate hessian array for total_atoms

mbe_result_destroy mqc_result_types Subroutine

Clean up allocated memory in mbe_result_t

mbe_result_reset mqc_result_types Subroutine

Reset all values and flags in mbe_result_t

mbe_run_distributed mqc_many_body_expansion Subroutine

Run distributed MBE calculation

mbe_run_serial mqc_many_body_expansion Subroutine

Run serial MBE calculation

mcscf_calc_energy mqc_method_mcscf Subroutine

Calculate electronic energy using CASSCF

Read more…
mcscf_calc_gradient mqc_method_mcscf Subroutine

Calculate energy gradient using CASSCF

Read more…
mcscf_calc_hessian mqc_method_mcscf Subroutine

Calculate energy Hessian using CASSCF

Read more…
merge_multi_molecule_json mqc_json Subroutine

Merge individual molecule JSON files into a single combined file

method_type_from_string mqc_method_types Function

Convert method type string to integer constant

Read more…
method_type_to_string mqc_method_types Function

Convert method type integer constant to string

Read more…
molecular_basis_num_basis_functions mqc_cgto Function

Get total number of basis functions for the molecule

molecule_destroy mqc_config_parser Subroutine

Clean up allocated memory in molecule_t

molecule_to_system_geometry mqc_config_adapter Subroutine

Convert a molecule_t to system_geometry_t Handles both unfragmented (nfrag=0) and fragmented molecules

mp2_check_stability mqc_result_types Subroutine

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

mp2_reset mqc_result_types Subroutine

Reset both MP2 components to zero

mp2_scs mqc_result_types Function

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

mp2_total mqc_result_types Function

Compute total MP2 correlation energy

next_combination mqc_combinatorics Function

Generate next combination in lexicographic order Returns .true. if there’s a next combination, .false. if we’ve exhausted all

next_combination_init mqc_combinatorics Subroutine

Initialize combination to [1, 2, …, k]

next_prime_internal mqc_fragment_lookup Function

Find next prime number >= n (simple implementation)

node_coordinator mqc_mbe_fragment_distribution_scheme Interface
node_worker mqc_mbe_fragment_distribution_scheme Interface
normalize_basis_name mqc_basis_utils Function

Normalize basis set name to filename-safe format

Read more…
null_hessian mqc_method_hf Subroutine

Placeholder for Hessian calculation

open_basis_file mqc_basis_file_reader Subroutine

Open and read a GAMESS formatted basis set file

parse_aimd_section mqc_config_parser Interface
parse_command_line mqc_cli_parser Subroutine

Parse command line arguments for geometry file and basis set

Read more…
parse_connectivity_generic mqc_config_parser Interface
parse_connectivity_section mqc_config_parser Interface
parse_driver_section mqc_config_parser Interface
parse_element_basis mqc_basis_reader Subroutine

Parse basis set for a specific element from a GAMESS formatted basis string

parse_fragment mqc_config_parser_fragments Subroutine
parse_fragmentation_section mqc_config_parser Interface
parse_fragments_generic mqc_config_parser Interface
parse_fragments_section mqc_config_parser Interface
parse_function_line mqc_basis_reader Subroutine

Parse function line (e.g., “1 1.0 2.0” or “1 1.0 2.0 3.0” for L shells)

parse_geometry_generic mqc_config_parser Interface
parse_geometry_section mqc_config_parser Interface
parse_hessian_section mqc_config_parser Interface
parse_indices_line mqc_config_parser_fragments Subroutine
parse_method_string mqc_config_parser Function

Parse method string from input file (e.g., “XTB-GFN1” -> gfn1)

parse_model_section mqc_config_parser Interface
parse_molecule_connectivity mqc_config_parser_molecules Subroutine

Parse %connectivity section for a molecule

parse_molecule_fragments mqc_config_parser_molecules Subroutine

Parse %fragments section for a molecule

parse_molecule_geometry mqc_config_parser_molecules Subroutine

Parse %geometry section for a molecule

parse_molecule_structure mqc_config_parser_molecules Subroutine

Parse %structure section for a molecule

parse_molecules_section mqc_config_parser Interface
parse_scf_section mqc_config_parser Interface
parse_schema_section mqc_config_parser Interface
parse_shell_header mqc_basis_reader Subroutine

Parse shell header line (e.g., “S 2” or “L 3”)

parse_single_molecule mqc_config_parser_molecules Subroutine

Parse a single %molecule block with its sections

parse_structure_generic mqc_config_parser Interface
parse_structure_section mqc_config_parser Interface
parse_system_section mqc_config_parser Interface
parse_xtb_section mqc_config_parser Interface
populate_unfragmented_json_data mqc_hessian_distribution_scheme Subroutine

Populate json_data with basic unfragmented calculation results

populate_vibrational_json_data mqc_hessian_distribution_scheme Subroutine

Populate json_data with vibrational analysis results

print_combos mqc_combinatorics Subroutine

Print combinations stored in out_array Uses int64 for count to handle large numbers of combinations that overflow int32.

print_detailed_breakdown mqc_mbe_io Subroutine

Print detailed energy breakdown for each fragment Shows full energy and deltaE correction for all monomers, dimers, trimers, etc. Uses int64 for fragment_count to handle large fragment counts that overflow int32.

print_fragment_xyz mqc_mbe_io Subroutine

Print fragment geometry in XYZ format

print_gmbe_energy_breakdown mqc_gmbe_utils Subroutine

Print GMBE energy breakdown using inclusion-exclusion principle

print_gmbe_gradient_info mqc_gmbe_utils Subroutine

Print GMBE gradient information

print_gmbe_intersection_debug mqc_gmbe_utils Subroutine

Print debug information about GMBE intersections

print_logo mqc_logo Subroutine

Print the PIC Chemistry ASCII sunflower logo

print_mbe_energy_breakdown mqc_mbe Subroutine

Print MBE energy breakdown to logger

print_mbe_gradient_info mqc_mbe Subroutine

Print MBE gradient information

print_thermochemistry mqc_thermochemistry Subroutine

Print thermochemistry results.

print_usage mqc_cli_parser Subroutine

Print usage information

print_vibrational_analysis mqc_vibrational_analysis Subroutine

Print vibrational analysis results in a formatted table.

Read more…
process_intersection_derivatives mqc_mbe Subroutine

Process derivatives for a single intersection fragment

project_translation_rotation mqc_vibrational_analysis Subroutine

Project out translation and rotation modes from mass-weighted Hessian.

Read more…
read_json_content mqc_json Subroutine

Read and write JSON content from an individual molecule file Properly handles nested structures from fragmented calculations

read_mqc_file mqc_config_parser Subroutine

Read and parse a .mqc format input file

read_xyz_file mqc_xyz_reader Subroutine

Read molecular geometry from XYZ format file

Read more…
read_xyz_string mqc_xyz_reader Subroutine

Parse molecular geometry from XYZ format string

redistribute_cap_dipole_derivatives mqc_physical_fragment Subroutine

Redistribute hydrogen cap dipole derivatives to original atoms

Read more…
redistribute_cap_gradients mqc_physical_fragment Subroutine

Redistribute hydrogen cap gradients to original atoms

Read more…
redistribute_cap_hessian mqc_physical_fragment Subroutine

Redistribute hydrogen cap Hessian to original atoms

Read more…
resources_finalize mqc_resources Subroutine

Clean up resources

resources_init mqc_resources Subroutine

Initialize resources with default values

result_destroy mqc_result_types Subroutine

Clean up allocated memory in calculation_result_t

result_irecv mqc_result_types Subroutine

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

result_isend mqc_result_types Subroutine

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

result_recv mqc_result_types Subroutine

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

result_reset mqc_result_types Subroutine

Reset all values and flags in calculation_result_t

result_send mqc_result_types Subroutine

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

run_calculation mqc_driver Subroutine

Main calculation dispatcher - routes to fragmented or unfragmented calculation

Read more…
run_fragmented_calculation mqc_driver Subroutine

Handle fragmented calculation (nlevel > 0)

Read more…
run_multi_molecule_calculations mqc_driver Subroutine

Run calculations for multiple molecules with MPI parallelization Each molecule is independent, so assign one molecule per rank

run_unfragmented_calculation mqc_driver Subroutine

Handle unfragmented calculation (nlevel=0)

Read more…
send_fragment_to_node mpi_fragment_work_smod Subroutine

Send fragment data to remote node coordinator Uses int64 for fragment_idx to handle large fragment indices that overflow int32.

send_fragment_to_worker mpi_fragment_work_smod Subroutine

Send fragment data to local worker Uses int64 for fragment_idx to handle large fragment indices that overflow int32.

send_pie_term_to_node mqc_gmbe_fragment_distribution_scheme Subroutine

Send PIE term (atom list) to remote node coordinator

send_pie_term_to_worker mqc_gmbe_fragment_distribution_scheme Subroutine

Send PIE term (atom list) to local worker

serial_fragment_processor mqc_mbe_fragment_distribution_scheme Interface
serial_gmbe_pie_processor mqc_gmbe_fragment_distribution_scheme Subroutine

Serial GMBE processor using PIE coefficients Evaluates each unique atom set once and sums with PIE coefficients Supports energy-only, energy+gradient, and energy+gradient+Hessian calculations If json_data is present, populates it for centralized JSON output Bond connectivity is accessed via sys_geom%bonds

set_molecule_suffix mqc_io_helpers Subroutine

Append a suffix to the output filename (e.g., for multi-molecule mode) Example: suffix=”_mol1” -> “output_multi_structure_mol1.json”

set_output_json_filename mqc_io_helpers Subroutine

Set the JSON output filename based on input filename Example: “water.mqc” -> “output_water.json”

skip_to_end mqc_config_parser Subroutine

Skip lines until ‘end’ marker is found

sort_fragments_by_size mqc_frag_utils Subroutine

Sort fragments by size (largest first) for better load balancing Uses in-place sorting to reorder the polymers array Larger fragments (e.g., tetramers) are computed before smaller ones (e.g., dimers)

split_lines mqc_xyz_reader Subroutine

Split input text into lines based on CR, LF, or CRLF line endings Trailing newlines do not create empty lines

strings_equal mqc_basis_file_reader Function

Compare two strings after trimming and adjusting (removing leading/trailing whitespace) Compare two strings for equality after trimming and adjusting (removing leading/trailing whitespace)

strip_comment mqc_config_parser Function

Remove comments (! or #) from a line and trim result

sync_geometry_to_workers mqc_calculation_interface Subroutine

Synchronize geometry coordinates from master rank to all worker ranks This is needed when master rank updates coordinates for optimization/dynamics

Read more…
system_destroy mqc_physical_fragment Subroutine

Clean up allocated memory in system_geometry_t

to_angstrom mqc_physical_fragment Function

Convert coordinate from Bohr to Angstrom

to_bohr mqc_physical_fragment Function

Convert coordinate from Angstrom to Bohr

unfragmented_calculation mqc_mbe_fragment_distribution_scheme Interface
uppercase mqc_basis_file_reader Function

Convert a string to uppercase, should use pic_ascii!

validate_cutoffs mqc_config_parser_calc_settings Subroutine

Validate that fragment cutoffs are monotonically decreasing For n-mer level N, cutoff(N) must be <= cutoff(N-1)

write_gmbe_pie_json_impl mqc_json_writer Subroutine

Write GMBE PIE calculation results to output JSON file

write_json_output mqc_json_writer Subroutine

THE single entry point for all JSON output

Read more…
write_mbe_breakdown_json_impl mqc_json_writer Subroutine

Write detailed MBE energy breakdown to JSON file

write_unfragmented_json_impl mqc_json_writer Subroutine

Write unfragmented calculation results to output JSON file

write_vibrational_json_impl mqc_json_writer Subroutine

Write vibrational analysis and thermochemistry results to JSON file

xtb_calc_energy mqc_method_xtb Subroutine

Calculate electronic energy using Extended Tight-Binding (xTB) method

xtb_calc_gradient mqc_method_xtb Subroutine

Calculate energy gradient using Extended Tight-Binding (xTB) method

xtb_calc_hessian mqc_method_xtb Subroutine

Calculate Hessian using finite differences of gradients

Read more…
xtb_configure mqc_method_config Subroutine

Configure XTB solvation settings from driver configuration

Read more…
xtb_get_solvation_info mqc_method_config Subroutine

Get solvation configuration info for logging

Read more…
xtb_has_solvation mqc_method_config Function

Check if solvation is configured for XTB