diff --git a/openff/interchange/smirnoff/_nonbonded.py b/openff/interchange/smirnoff/_nonbonded.py index ee751f53..0f5f8dc6 100644 --- a/openff/interchange/smirnoff/_nonbonded.py +++ b/openff/interchange/smirnoff/_nonbonded.py @@ -1,5 +1,6 @@ import copy import functools +import logging import warnings from collections.abc import Iterable from typing import Any, Literal, Optional, Union @@ -41,6 +42,8 @@ from openff.interchange.smirnoff._base import SMIRNOFFCollection from openff.interchange.warnings import ForceFieldModificationWarning +logger = logging.getLogger(__name__) + ElectrostaticsHandlerType = Union[ ElectrostaticsHandler, ToolkitAM1BCCHandler, @@ -501,6 +504,10 @@ def _library_charge_to_potentials( matches[topology_key] = potential_key potentials[potential_key] = potential + logger.info( + f"Charge section LibraryCharges applied {charge.m} to atom index {atom_index}", + ) + return matches, potentials @classmethod @@ -678,6 +685,11 @@ def _find_charge_model_matches( matches[SingleAtomChargeTopologyKey(this_atom_index=atom_index)] = potential_key + logger.info( + f"Charge section {handler_name}, method {partial_charge_method}, applied {partial_charge.m} " + f"to atom {atom_index}", + ) + return partial_charge_method, matches, potentials @classmethod @@ -815,6 +827,11 @@ def _assign_charges_from_molecules( matches[topology_key] = potential_key potentials[potential_key] = potential + logger.info( + f"Atom with topology index {index_in_topology} getting prespecified charge {partial_charge} " + f"from a molecule with mapped smiles {mapped_smiles}", + ) + return True, matches, potentials def store_matches(