qrunch.chemistry.molecule.validation

Validation of the molecule and molecular configuration.

Functions

validate_basis(molecule, basis)

Validate the basis set against the molecule.

validate_charge(molecule, charge)

Validate the charge of the molecule.

validate_spin(molecule, charge, spin_difference)

Validate the spin of the molecule.

validate_basis(molecule: Molecule, basis: dict[Atom, BasisSet]) None

Validate the basis set against the molecule.

Parameters:
  • molecule (Molecule) – The molecule.

  • basis (dict[Atom, BasisSet]) – The dictionary of basis sets for each element.

Returns:

List of errors. An empty list means no errors detected.

Return type:

None

validate_charge(molecule: Molecule, charge: int) None

Validate the charge of the molecule.

Parameters:
  • molecule (Molecule) – The molecule.

  • charge (int) – The charge of the molecule.

Returns:

List of errors. An empty list means no errors detected.

Return type:

None

validate_spin(molecule: Molecule, charge: int, spin_difference: int) None

Validate the spin of the molecule.

Parameters:
  • molecule (Molecule) – The molecule.

  • charge (int) – The charge of the molecule.

  • spin_difference (int) – The difference between alpha (spin up) and beta electrons (spin down)

Returns:

List of errors. An empty list means no errors detected.

Return type:

None