Gromacs
2026.0-dev-20250711-6857db4
|
#include <gromacs/applied_forces/electricfield.h>
Information about the electric-field module.
Provides name and method to create a electric-field module.
Static Public Member Functions | |
static std::unique_ptr< IMDModule > | create () |
Creates a module for an external electric field. More... | |
Static Public Attributes | |
static constexpr std::string_view | sc_name = "electric-field" |
The name of the module. | |
|
static |
Creates a module for an external electric field.
The returned class describes the time dependent electric field that can be applied to all charges in a simulation. The field is described by the following: E(t) = A cos(omega*(t-t0))*exp(-sqr(t-t0)/(2.0*sqr(sigma))); If sigma = 0 there is no pulse and we have instead E(t) = A cos(omega*t)
force is kJ mol^-1 nm^-1 = e * kJ mol^-1 nm^-1 / e
WARNING: There can be problems with the virial. Since the field is not self-consistent this is unavoidable. For neutral molecules the virial is correct within this approximation. For neutral systems with many charged molecules the error is small. But for systems with a net charge or a few charged molecules the error can be significant when the field is high. Solution: implement a self-consistent electric field into PME.