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

Applies a uniform electric field gradient to the system. More...

#include <UniformGradient.hpp>

Inheritance diagram for OpenMD::UniformGradient:
OpenMD::Perturbation

Public Member Functions

 UniformGradient (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 doUniformGradient
 
bool doParticlePot
 
GlobalssimParams
 
SimInfoinfo_
 
Mat3x3d Grad_
 
Vector3d a_
 
Vector3d b_
 
RealType g_
 
RealType cpsi_
 

Detailed Description

Applies a uniform electric field gradient to the system.

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

uniformGradientStrength = c;
uniformGradientDirection1 = (a1, a2, a3)
uniformGradientDirection2 = (b1, b2, b3);

in the .omd file where the two direction vectors, $ \mathbf{a} $ and $ \mathbf{b} $ are unit vectors, and the value of $ g $ is in units of $ V / \AA^2 $

The electrostatic potential corresponding to this uniform gradient is

$ \phi(\mathbf{r}) = - \frac{g}{2} \left[ \left(a_1 b_1 - \frac{\cos\psi}{3}\right) x^2 + (a_1 b_2 + a_2 b_1) x y + (a_1 b_3 + a_3 b_1) x z + + (a_2 b_1 + a_1 b_2) y x + \left(a_2 b_2 - \frac{\cos\psi}{3}\right) y^2 + (a_2 b_3 + a_3 b_2) y z + (a_3 b_1 + a_1 b_3) z x + (a_3 b_2 + a_2 b_3) z y + \left(a_3 b_3 - \frac{\cos\psi}{3}\right) z^2 \right] $

where $ \cos \psi = \mathbf{a} \cdot \mathbf{b} $. Note that this potential grows unbounded and is not periodic. For these reasons, care should be taken in using a Uniform Gradient with point charges.

The corresponding field is:

$ \mathbf{E} = \frac{g}{2} \left( \begin{array}{c} 2\left(a_1 b_1 - \frac{\cos\psi}{3}\right) x + (a_1 b_2 + a_2 b_1) y + (a_1 b_3 + a_3 b_1) z \\ (a_2 b_1 + a_1 b_2) x + 2 \left(a_2 b_2 - \frac{\cos\psi}{3}\right) y + (a_2 b_3 + a_3 b_2) z \\ (a_3 b_1 + a_1 b_3) x + (a_3 b_2 + a_2 b_3) y + 2 \left(a_3 b_3 - \frac{\cos\psi}{3}\right) z \end{array} \right) $

The field also grows unbounded and is not periodic. For these reasons, care should be taken in using a Uniform Gradient with point dipoles.

The corresponding field gradient is:

$ \nabla \mathbf{E} = \frac{g}{2} \left( \begin{array}{ccc} 2\left(a_1 b_1 - \frac{\cos\psi}{3}\right) & (a_1 b_2 + a_2 b_1) & (a_1 b_3 + a_3 b_1) \\ (a_2 b_1 + a_1 b_2) & 2 \left(a_2 b_2 - \frac{\cos\psi}{3}\right) & (a_2 b_3 + a_3 b_2) \\ (a_3 b_1 + a_1 b_3) & (a_3 b_2 + a_2 b_3) & 2 \left(a_3 b_3 - \frac{\cos\psi}{3}\right) \end{array} \right) $

which is uniform everywhere.

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

For quadrupolar atoms, the uniform field gradient exerts a potential, $ U = - \mathsf{Q}:\nabla \mathbf{E} $, and a torque $ \mathbf{F} = 2 \mathsf{Q} \times \nabla \mathbf{E} $

Definition at line 121 of file UniformGradient.hpp.

Constructor & Destructor Documentation

◆ UniformGradient()

OpenMD::UniformGradient::UniformGradient ( SimInfo info)

Definition at line 53 of file UniformGradient.cpp.

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

Member Function Documentation

◆ applyPerturbation()

◆ initialize()

Member Data Documentation

◆ a_

Vector3d OpenMD::UniformGradient::a_
private

Definition at line 138 of file UniformGradient.hpp.

Referenced by initialize().

◆ b_

Vector3d OpenMD::UniformGradient::b_
private

Definition at line 138 of file UniformGradient.hpp.

Referenced by initialize().

◆ cpsi_

RealType OpenMD::UniformGradient::cpsi_
private

Definition at line 139 of file UniformGradient.hpp.

Referenced by initialize().

◆ doParticlePot

bool OpenMD::UniformGradient::doParticlePot
private

Definition at line 134 of file UniformGradient.hpp.

Referenced by applyPerturbation(), and initialize().

◆ doUniformGradient

bool OpenMD::UniformGradient::doUniformGradient
private

Definition at line 133 of file UniformGradient.hpp.

Referenced by applyPerturbation(), and initialize().

◆ g_

RealType OpenMD::UniformGradient::g_
private

Definition at line 139 of file UniformGradient.hpp.

Referenced by initialize().

◆ Grad_

Mat3x3d OpenMD::UniformGradient::Grad_
private

Definition at line 137 of file UniformGradient.hpp.

Referenced by applyPerturbation(), and initialize().

◆ info_

SimInfo* OpenMD::UniformGradient::info_
private

Definition at line 136 of file UniformGradient.hpp.

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

◆ initialized

bool OpenMD::UniformGradient::initialized
private

Definition at line 132 of file UniformGradient.hpp.

Referenced by applyPerturbation(), and initialize().

◆ simParams

Globals* OpenMD::UniformGradient::simParams
private

Definition at line 135 of file UniformGradient.hpp.

Referenced by initialize(), and UniformGradient().


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