qcorr_utils
- check_isomerization(isom_data, file)
Check if molecule has isomerized by comparing connectivity matrices.
Compares input and output geometries using connectivity matrices based on VDW and covalent radii. Bonds in transition states are excluded.
Parameters
- isom_datadict
Contains coordinates, atoms, and connectivity data for input/output
- filestr
Filename with extension
Returns
- bool
True if geometry has isomerized (different connectivity)
- detect_linear(errortype, atom_types, cclib_data)
Check whether a linear molecule has the correct number of frequencies.
Linear molecules have 3N-5 vibrational modes (vs 3N-6 for non-linear). Validates that known linear molecules have expected frequency count.
- Args:
errortype (str): Current error type classification atom_types (list): Element symbols for atoms in molecule cclib_data (dict): Parsed cclib data containing vibfreqs
- Returns:
str: Updated errortype ('linear_mol_wrong' if incorrect, otherwise unchanged)
- full_check(w_dir_main='/home/docs/checkouts/readthedocs.org/user_builds/aqme/checkouts/latest/docs', destination_fullcheck='', files='*.json', log=None)
Check that calculations follow consistent protocols.
Validates that multiple calculations use the same program, version, grid size, level of theory, dispersion, and solvation model.
Parameters
- w_dir_mainstr or Path
Working directory containing JSON files
- destination_fullcheckstr
Destination folder for the fullcheck report file
- filesstr or list
JSON file pattern (e.g., '*.json') or list of file paths
- logaqme.utils.Logger, optional
Logger for output. If None, creates default logger.
- gen_connectivity(isom_data, atom_types_conn, COORDINATES_conn)
Generate connectivity matrix using VDW and covalent radii.
Creates symmetric connectivity matrix where 1 indicates bonded atoms. Bonds are detected when distance is below either VDW or covalent radii thresholds (multiplied by user-defined fractions).
Parameters
- isom_datadict
Contains 'VdW radii fraction' and 'Covalent radii fraction' parameters
- atom_types_connlist
Element symbols for each atom
- COORDINATES_connlist
3D coordinates for each atom
Returns
- np.ndarray
Symmetric connectivity matrix (upper triangular populated)
- get_cclib_params(cclib_data, errortype)
Retrieve energy and rotational constant information from cclib data.
Extracts SCF energy, enthalpy, free energy, and rotational constants. Handles special cases like single atoms and SP calculations.
Parameters
- cclib_datadict
Parsed cclib data dictionary
- errortypestr
Current error type classification
Returns
- tuple
(E_dup, H_dup, G_dup, ro_dup, errortype) where: - E_dup (float): SCF energy in hartree - H_dup (float): Enthalpy in hartree - G_dup (float): Free energy in hartree - ro_dup (list or None): Rotational constants (GHz) or None - errortype (str): Updated error type
- get_json_data(self, file, cclib_data)
Extract metadata and GoodVibes data for JSON file.
Parses QM output files (Gaussian, ORCA) to extract metadata, energy values, rotational constants, and other properties.
Parameters
- selfobject
Object with args.w_dir_main attribute
- filestr
Path to QM output file
- cclib_datadict
cclib parsed data dictionary
Returns
- dict
Updated cclib_data with metadata and properties