pyscf_pretty_print

mol_to_str(mol: Mole) str[source]

String representation of a pyscf.gto.mole.Mole, with more information than the default.

mole_to_sum_formula(mol: Mole, use_subscript=False) str[source]

Converts a pyscf.gto.mole.Mole to a sum formula.

Parameters:
  • mol – Molecule to convert.

  • use_subscript – Whether to use subscript for the number of atoms.

Returns:

Sum formula of the molecule.

Return type:

sum_formula

monkey_patch_pyscf_mol_str() None[source]

Monkey-patch pyscf.gto.Mole.__str__ to produce a more useful string representation.

To use, call this function once at the beginning of your script: ` from mldft.utils.pyscf_pretty_print import monkey_patch_pyscf_mol_str monkey_patch_pyscf_mol_str() `