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_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 inaccepted_n_hs
.
- clean_charge_equivalence_constraints()
Clean the ChargeEquivalence constraints.
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()
- get_hash()
- iter_constraints()
- property n_atoms
- property n_constraints