OpenMD  2.5
Molecular Dynamics in the Open
OpenMD::UniformField Class Reference

Applies a uniform (vector) electric field to the system. More...

#include <UniformField.hpp>

Inheritance diagram for OpenMD::UniformField:
OpenMD::Perturbation

Public Member Functions

 UniformField (SimInfo *info)
 
- Public Member Functions inherited from OpenMD::Perturbation
virtual ~Perturbation ()
 

Protected Member Functions

virtual void initialize ()
 
virtual void applyPerturbation ()
 

Private Attributes

bool initialized
 
bool doUniformField
 
bool doParticlePot
 
GlobalssimParams
 
SimInfoinfo_
 
Vector3d EF
 

Detailed Description

Applies a uniform (vector) electric field to the system.

The field is applied as an external perturbation. The user specifies

uniformField = (a, b, c);

in the .omd file where the values of a, b, and c are in units of $ V / \AA $

The electrostatic potential corresponding to this uniform field is

$ \phi(\mathbf{r}) = - a x - b y - c z $

which grows unbounded and is not periodic. For these reasons, care should be taken in using a Uniform field with point charges.

The field itself is

$ \mathbf{E} = \left( \begin{array}{c} a \\ b \\ c \end{array} \right) $

The external field applies a force on charged atoms, $ \mathbf{F} = C \mathbf{E} $. For dipolar atoms, the field applies both a potential, $ U = - \mathbf{D} \cdot \mathbf{E} $ and a torque, $ \mathbf{\tau} = \mathbf{D} \times \mathbf{E} $.

Definition at line 82 of file UniformField.hpp.

Constructor & Destructor Documentation

◆ UniformField()

OpenMD::UniformField::UniformField ( SimInfo info)

Definition at line 53 of file UniformField.cpp.

References OpenMD::SimInfo::getSimParams(), info_, and simParams.

Member Function Documentation

◆ applyPerturbation()

◆ initialize()

Member Data Documentation

◆ doParticlePot

bool OpenMD::UniformField::doParticlePot
private

Definition at line 94 of file UniformField.hpp.

Referenced by applyPerturbation(), and initialize().

◆ doUniformField

bool OpenMD::UniformField::doUniformField
private

Definition at line 93 of file UniformField.hpp.

Referenced by applyPerturbation(), and initialize().

◆ EF

Vector3d OpenMD::UniformField::EF
private

Definition at line 97 of file UniformField.hpp.

Referenced by applyPerturbation(), and initialize().

◆ info_

SimInfo* OpenMD::UniformField::info_
private

Definition at line 96 of file UniformField.hpp.

Referenced by applyPerturbation(), initialize(), and UniformField().

◆ initialized

bool OpenMD::UniformField::initialized
private

Definition at line 92 of file UniformField.hpp.

Referenced by applyPerturbation(), and initialize().

◆ simParams

Globals* OpenMD::UniformField::simParams
private

Definition at line 95 of file UniformField.hpp.

Referenced by initialize(), and UniformField().


The documentation for this class was generated from the following files: