pymatgen.io.qchem.outputs module
Parsers for Qchem output files.
- class QCOutput(filename: str)[source]
Bases:
MSONable
Class to parse QChem output files.
- Parameters:
filename (str) – Filename to parse
- static multiple_outputs_from_file(cls, filename, keep_sub_files=True)[source]
Parses a QChem output file with multiple calculations # 1.) Separates the output into sub-files
e.g. qcout -> qcout.0, qcout.1, qcout.2 … qcout.N a.) Find delimiter for multiple calculations b.) Make separate output sub-files
2.) Creates separate QCCalcs for each one from the sub-files
- check_for_structure_changes(mol1: Molecule, mol2: Molecule) str [source]
Compares connectivity of two molecules (using MoleculeGraph w/ OpenBabelNN). This function will work with two molecules with different atom orderings,
but for proper treatment, atoms should be listed in the same order.
Possible outputs include: - no_change: the bonding in the two molecules is identical - unconnected_fragments: the MoleculeGraph of mol1 is connected, but the
MoleculeGraph is mol2 is not connected
fewer_bonds: the MoleculeGraph of mol1 has more bonds (edges) than the MoleculeGraph of mol2
more_bonds: the MoleculeGraph of mol2 has more bonds (edges) than the MoleculeGraph of mol1
bond_change: this case catches any other non-identical MoleculeGraphs
- Parameters:
mol1 – Pymatgen Molecule object to be compared.
mol2 – Pymatgen Molecule object to be compared.
- Returns:
One of [“unconnected_fragments”, “fewer_bonds”, “more_bonds”, “bond_change”, “no_change”]
- get_percentage(line: str, orbital: str) str [source]
Retrieve the percent character of an orbital.
- Parameters:
line – Line containing orbital and percentage.
orbital – Type of orbital (s, p, d, f).
- Returns:
Percentage of character.
- Raises:
n/a –
- jump_to_header(lines: list[str], header: str) list[str] [source]
Given a list of lines, truncate the start of the list so that the first line of the new list contains the header.
- Parameters:
lines – List of lines.
header – Substring to match.
- Returns:
Truncated lines.
- Raises:
RuntimeError –
- nbo_parser(filename: str) dict[str, list[pandas.core.frame.DataFrame]] [source]
Parse all the important sections of NBO output.
- Parameters:
filename – Path to QChem NBO output.
- Returns:
Data frames of formatted output.
- Raises:
RuntimeError –
- parse_hybridization_character(lines: list[str]) list[pandas.core.frame.DataFrame] [source]
Parse the hybridization character section of NBO output.
- Parameters:
lines – QChem output lines.
- Returns:
Data frames of formatted output.
- Raises:
RuntimeError –
- parse_natural_populations(lines: list[str]) list[pandas.core.frame.DataFrame] [source]
Parse the natural populations section of NBO output.
- Parameters:
lines – QChem output lines.
- Returns:
Data frame of formatted output.
- Raises:
RuntimeError –