Assigning partial charges#

Attaching a validated named charge assignment to a detached molecular system.

Added in version 1.0.0.

import molsysmt as msm

molsys = msm.build.assign_partial_charges(
    msm.systems['caffeine']['caffeine.sdf'], method='gasteiger_marsili')
assert molsys.molecular_mechanics.partial_charge_assignment['coverage'] == 'complete'

The input remains unchanged. The output retains its atoms, IDs, chemistry, coordinates and analyses and stores charges in MolecularMechanics, independently of ChemicalStates formal charges. Exactly one chemical state is required for attachment; multiple states can be calculated separately through molsysmt.physchem.get_partial_charges(). Existing charges are explicitly replaced. Other force-field parameters and AutoDock labels are not assigned. Named analyses retain their original snapshots; explicitly invalidate/recalculate any analysis that depends on the changed mechanical parameters.

Read Getting partial charges for model prerequisites, units, total-charge checks, projected scope, provenance, stale-assignment checks and export limits. Mechanical assignments are not persisted by H5MSM 0.5.