psiresp.charge.MoleculeChargeConstraints

pydantic model psiresp.charge.MoleculeChargeConstraints[source]
Fields
field charge_equivalence_constraints: List[psiresp.charge.ChargeEquivalenceConstraint] = []
field charge_sum_constraints: List[psiresp.charge.ChargeSumConstraint] = []
field molecules: List[psiresp.molecule.Molecule] = []
field unconstrained_atoms: List[psiresp.molecule.Atom] = []
add_charge_equivalence_constraint(atoms=[])
add_charge_equivalence_constraint_for_molecule(molecule, indices=[])
add_charge_sum_constraint(charge, atoms=[])
add_charge_sum_constraint_for_molecule(molecule, charge=0, indices=[])
add_charge_sum_constraint_from_indices(charge, indices=[])[source]
add_constraints_from_charges(charges)[source]

Add ChargeSumConstraints restraining atoms to the given charges, if they are not in existing charge equivalence constraints, and not in self.unconstrained_atoms.

Parameters

charges (np.ndarray of floats) – Charges of atoms. This should be at least as long as the total number of atoms in self.molecules

add_sp3_equivalences(accepted_n_hs=(2, 3))[source]

Add ChargeEquivalenceConstraints for the hydrogens attached to sp3 carbons

This will add methyls if 2 is in accepted_n_hs, and and methylenes if 3 is in accepted_n_hs.

Parameters

accepted_n_hs (Tuple[int, ...]) – Number of Hs around a carbon to symmetrize

add_symmetry_equivalences()[source]
clean_charge_equivalence_constraints()

Clean the ChargeEquivalence constraints.

  1. Join charge equivalence constraints with overlapping atoms

  2. Remove atoms from charge equivalences if they are constrained

    to different charges, and remove charge equivalence constraints if all atoms are constrained to the same charge (so it is redundant)

clean_charge_sum_constraints()
classmethod from_charge_constraints(charge_constraints, molecules=[])[source]
get_hash()
iter_constraints()
to_a_col_constraints()[source]
to_b_constraints()[source]
property n_atoms
property n_constraints