polymerist.mdtools.openfftools.partialcharge.rescharge.calculation ================================================================== .. py:module:: polymerist.mdtools.openfftools.partialcharge.rescharge.calculation .. autoapi-nested-parse:: Utilities for generating, storing, and applying partial charges to OpenFF Molecules Attributes ---------- .. autoapisummary:: polymerist.mdtools.openfftools.partialcharge.rescharge.calculation.LOGGER Classes ------- .. autoapisummary:: polymerist.mdtools.openfftools.partialcharge.rescharge.calculation.Accumulator Functions --------- .. autoapisummary:: polymerist.mdtools.openfftools.partialcharge.rescharge.calculation.find_repr_residues polymerist.mdtools.openfftools.partialcharge.rescharge.calculation.compute_residue_charges polymerist.mdtools.openfftools.partialcharge.rescharge.calculation.apply_residue_charges Module Contents --------------- .. py:data:: LOGGER .. py:class:: Accumulator Compact container for accumulating averages .. py:attribute:: sum :type: float :value: 0.0 .. py:attribute:: count :type: int :value: 0 .. py:property:: average :type: float .. py:function:: find_repr_residues(offmol: openff.toolkit.topology.molecule.Molecule) -> dict[str, int] Determine names and smallest residue numbers of all unique residues in charged molecule Used as representatives for generating labelled SMARTS strings .. py:function:: compute_residue_charges(cmol: openff.toolkit.topology.molecule.Molecule, monomer_group: polymerist.polymers.monomers.repr.MonomerGroup, cds: Optional[polymerist.mdtools.openfftools.partialcharge.rescharge.redistribution.ChargeRedistributionStrategy] = UniformDistributionStrategy(desired_net_charge=0.0)) -> polymerist.mdtools.openfftools.partialcharge.rescharge.rctypes.ChargesByResidue Takes a charged molecule and a collection of monomer-spec SMARTS and generates monomer-averages library charges for each repeating residue Can optionally specify a strategy for redistributing any excess charge (by default, will ensure charges are neutral) Returns a ChargesByRresidue object containing a dict of mapped residue charges keyed by residue name .. py:function:: apply_residue_charges(offmol: openff.toolkit.topology.molecule.Molecule, chgs_by_res: polymerist.mdtools.openfftools.partialcharge.rescharge.rctypes.ChargesByResidue) -> None Takes an OpenFF Molecule and a residue-wise map of averaged partial charges and applies the mapped charges to the Molecule