OpenMD
2.6
Molecular Dynamics in the Open
|
Applies a uniform (vector) electric field to the system. More...
#include <UniformField.hpp>
Public Member Functions | |
UniformField (SimInfo *info) | |
![]() | |
virtual | ~Perturbation () |
Protected Member Functions | |
virtual void | initialize () |
virtual void | applyPerturbation () |
Private Attributes | |
bool | initialized |
bool | doUniformField |
bool | doParticlePot |
Globals * | simParams |
SimInfo * | info_ |
Vector3d | EF |
Applies a uniform (vector) electric field to the system.
The field is applied as an external perturbation. The user specifies
in the .omd file where the values of a, b, and c are in units of
The electrostatic potential corresponding to this uniform field is
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
The external field applies a force on charged atoms, . For dipolar atoms, the field applies both a potential,
and a torque,
.
Definition at line 82 of file UniformField.hpp.
OpenMD::UniformField::UniformField | ( | SimInfo * | info | ) |
Definition at line 56 of file UniformField.cpp.
References OpenMD::SimInfo::getSimParams(), info_, and simParams.
|
protectedvirtual |
Implements OpenMD::Perturbation.
Definition at line 91 of file UniformField.cpp.
References OpenMD::StuntDouble::addElectricField(), OpenMD::StuntDouble::addFlucQFrc(), OpenMD::StuntDouble::addFrc(), OpenMD::StuntDouble::addParticlePot(), OpenMD::StuntDouble::addTrq(), OpenMD::Molecule::beginAtom(), OpenMD::SimInfo::beginMolecule(), OpenMD::Constants::chargeFieldConvert, OpenMD::cross(), OpenMD::Constants::dipoleFieldConvert, doParticlePot, OpenMD::dot(), doUniformField, EF, OpenMD::ELECTROSTATIC_FAMILY, OpenMD::Atom::getAtomType(), OpenMD::FixedChargeAdapter::getCharge(), OpenMD::SnapshotManager::getCurrentSnapshot(), OpenMD::StuntDouble::getDipole(), OpenMD::StuntDouble::getFlucQPos(), OpenMD::Snapshot::getLongRangePotentials(), OpenMD::StuntDouble::getPos(), OpenMD::SimInfo::getSnapshotManager(), info_, initialize(), initialized, OpenMD::MultipoleAdapter::isDipole(), OpenMD::FixedChargeAdapter::isFixedCharge(), OpenMD::FluctuatingChargeAdapter::isFluctuatingCharge(), OpenMD::Molecule::nextAtom(), OpenMD::SimInfo::nextMolecule(), OpenMD::Snapshot::setLongRangePotential(), and OpenMD::Snapshot::wrapVector().
|
protectedvirtual |
Definition at line 63 of file UniformField.cpp.
References doParticlePot, doUniformField, OpenMD::DataStorage::dslParticlePot, EF, errorStruct::errMsg, OpenMD::SimInfo::getSnapshotManager(), OpenMD::SnapshotManager::getStorageLayout(), info_, initialized, errorStruct::isFatal, painCave, simError(), simParams, OpenMD::Vector3< Real >::x(), OpenMD::Vector3< Real >::y(), and OpenMD::Vector3< Real >::z().
Referenced by applyPerturbation().
|
private |
Definition at line 94 of file UniformField.hpp.
Referenced by applyPerturbation(), and initialize().
|
private |
Definition at line 93 of file UniformField.hpp.
Referenced by applyPerturbation(), and initialize().
|
private |
Definition at line 97 of file UniformField.hpp.
Referenced by applyPerturbation(), and initialize().
|
private |
Definition at line 96 of file UniformField.hpp.
Referenced by applyPerturbation(), initialize(), and UniformField().
|
private |
Definition at line 92 of file UniformField.hpp.
Referenced by applyPerturbation(), and initialize().
|
private |
Definition at line 95 of file UniformField.hpp.
Referenced by initialize(), and UniformField().