polymerist.mdtools.openfftools.partialcharge.rescharge.calculation

Utilities for generating, storing, and applying partial charges to OpenFF Molecules

Attributes

LOGGER

Classes

Accumulator

Compact container for accumulating averages

Functions

find_repr_residues(→ dict[str, int])

Determine names and smallest residue numbers of all unique residues in charged molecule

compute_residue_charges(...)

Takes a charged molecule and a collection of monomer-spec SMARTS and generates monomer-averages library charges for each repeating residue

apply_residue_charges(→ None)

Takes an OpenFF Molecule and a residue-wise map of averaged partial charges and applies the mapped charges to the Molecule

Module Contents

polymerist.mdtools.openfftools.partialcharge.rescharge.calculation.LOGGER
class polymerist.mdtools.openfftools.partialcharge.rescharge.calculation.Accumulator[source]

Compact container for accumulating averages

sum: float = 0.0
count: int = 0
property average: float
polymerist.mdtools.openfftools.partialcharge.rescharge.calculation.find_repr_residues(offmol: openff.toolkit.topology.molecule.Molecule) dict[str, int][source]

Determine names and smallest residue numbers of all unique residues in charged molecule Used as representatives for generating labelled SMARTS strings

polymerist.mdtools.openfftools.partialcharge.rescharge.calculation.compute_residue_charges(cmol: openff.toolkit.topology.molecule.Molecule, monomer_group: polymerist.polymers.monomers.repr.MonomerGroup, cds: polymerist.mdtools.openfftools.partialcharge.rescharge.redistribution.ChargeRedistributionStrategy | None = UniformDistributionStrategy(desired_net_charge=0.0)) polymerist.mdtools.openfftools.partialcharge.rescharge.rctypes.ChargesByResidue[source]

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

polymerist.mdtools.openfftools.partialcharge.rescharge.calculation.apply_residue_charges(offmol: openff.toolkit.topology.molecule.Molecule, chgs_by_res: polymerist.mdtools.openfftools.partialcharge.rescharge.rctypes.ChargesByResidue) None[source]

Takes an OpenFF Molecule and a residue-wise map of averaged partial charges and applies the mapped charges to the Molecule