rdmc.external.logparser.qchem#

class rdmc.external.logparser.qchem.QChemLog(path: str, job_type: list | None = None, ts: bool | None = None)#

Bases: CclibLog

A class helps to parse the Gaussian log files and provides information helpful to analyze the calculation.

get_mol(refid: int = -1, embed_conformers: bool = True, neglect_spin: bool = True, backend: str = 'openbabel', sanitize: bool = True) RDKitMol#

Perceive the xyzs in the file and turn the geometries to conformers.

Parameters:
  • refid (int) – The conformer ID in the log file to be used as the reference for mol perception. Defaults to -1, meaning it is determined by the following criteria: - For opt, it is the last geometry if succeeded; otherwise, the initial geometry; - For freq, it is the geometry input; - For scan, it is the geometry input; - For IRC, uses the initial geometry.

  • embed_confs (bool) – Whether to embed intermediate conformers in the file to the mol. Defaults to True. To clear, at least one conformer will be included in obtained mol, and its geometry is determined by refid.

  • neglect_spin (bool) – Whether to neglect the error when spin multiplicity are different between the generated mol and the value in the output file. This can be useful for calculations involves TS. Defaults to True.

  • backend (str) – The backend engine for parsing XYZ. Defaults to 'openbabel'.

  • sanitize (bool) – Whether to sanitize the generated mol. Defaults to True. If a TS involved in the job, better to set it False

Returns:

RDKitMol – a molecule generated from the output file.

get_scf_energies(relative: bool = False)#

Get SCF energies in kcal/mol.

Parameters:

relative (bool) – Only return the value relative to the minimum. Defaults to False.

Returns:

np.array – The SCF energies.

opt_critieria = ['Gradient', 'Displacement', 'Energy change']#
time_regex = '[a-zA-Z]+\\s+\\d+\\s+\\d{2}\\:\\d{2}\\:\\d{2}\\s+\\d{4}'#