From c2e6df9fc5912069730fe9ce494f4c8b4ccc9be8 Mon Sep 17 00:00:00 2001 From: Philip Loche Date: Sat, 2 Sep 2023 13:07:03 +0200 Subject: [PATCH] Docs warning for charge in DielectricConstant (#4263) * Docs warning for charge in DielectricConstant --- package/CHANGELOG | 4 +++- package/MDAnalysis/analysis/dielectric.py | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/package/CHANGELOG b/package/CHANGELOG index cd6ee8c18fd..d1a648d35cf 100644 --- a/package/CHANGELOG +++ b/package/CHANGELOG @@ -13,7 +13,7 @@ The rules for this file: * release numbers follow "Semantic Versioning" http://semver.org ------------------------------------------------------------------------------ -??/??/?? IAlibay, ianmkenney +??/??/?? IAlibay, ianmkenney, PicoCentauri * 2.7.0 @@ -22,6 +22,8 @@ Fixes their original type value (np.float64 and np.nan) (PR #4272) Enhancements + * Added a warning about charge neutrality to the documentation of + `DielectricConstant` (Issue #4262, PR #4263) Changes * The `mda-xdrlib` module is now a core dependency of MDAnalysis diff --git a/package/MDAnalysis/analysis/dielectric.py b/package/MDAnalysis/analysis/dielectric.py index 5bf5d1d6f4f..d28bb376448 100644 --- a/package/MDAnalysis/analysis/dielectric.py +++ b/package/MDAnalysis/analysis/dielectric.py @@ -65,6 +65,10 @@ class DielectricConstant(AnalysisBase): the usual case if electrostatics are handled with a Ewald summation technique. See [Neumann1983]_ for details on the derivation. + .. warning:: + Applying this class requires that no free charges, such as ions or + charged fragments, are present in the simulation. + Parameters ---------- atomgroup : MDAnalysis.core.groups.AtomGroup