qp.analyze.molden.correct_ecp_charges_inplace

qp.analyze.molden.correct_ecp_charges_inplace(molden_file)[source]

Correct nuclear charges in a Molden file for ECP-treated elements.

Multiwfn requires the nuclear charge in Molden files to reflect the number of active electrons (not the full atomic number) for elements using effective core potentials (ECPs). This function reads the Molden file, corrects charges for known ECP elements, and overwrites the file.

Parameters:

molden_file (str) – Path to the Molden file to correct.

Returns:

True if the file was modified, False otherwise.

Return type:

bool

Notes

The ECP electron counts are defined in ECP_ACTIVE_ELECTRONS and cover common LANL/ECP28 basis sets for transition metals and heavy main-group elements.