mdtraj.static_dielectric

mdtraj.static_dielectric(traj, charges, temperature)

Calculate the static dielectric constant from a trajectory.

Parameters
trajTrajectory

An mdtraj trajectory.

chargesnp.ndarray, shape=(n_atoms), dtype=float

Charges of each atom in the topology, expressed in units of the elementary charge constant.

temperaturetemperature, float

The temperature of interest, in units of kelvin.

Returns
static_dielectricfloat,

The (unitless) relative static dielectric constant.

Notes

See eqn. (2) in 10.1021/jp3002383 or eqn. (7) in 10.1063/1.1476316 or https://github.com/gromacs/gromacs/blob/master/src/gromacs/gmxana/gmx_current.c#L622