ls1-MarDyn
ls1-MarDyn molecular dynamics code
Public Member Functions | List of all members
Dipole Class Reference

Dipole center. More...

#include <Site.h>

Inheritance diagram for Dipole:
OrientedSite Site

Public Member Functions

 Dipole (double x, double y, double z, double eMyx, double eMyy, double eMyz, double absMy)
 Constructor. More...
 
void readXML (XMLfileUnits &xmlconfig)
 Read in XML configuration for a Dipole and all its included objects. More...
 
double absMy () const
 
void setAbyMy (double my)
 
- Public Member Functions inherited from OrientedSite
double ex () const
 
double ey () const
 
double ez () const
 
std::array< double, 3 > e () const
 
double abs () const
 
void write (std::ostream &ostrm) const
 write to stream More...
 
void setOrientationVectorByPolarAngles (const double &theta_deg, const double &phi_deg)
 set orientation vector using polar angles More...
 
void setAbs (double abs)
 
void setE (int d, double e)
 
void normalize_e ()
 
- Public Member Functions inherited from Site
double rx () const
 
double ry () const
 
double rz () const
 
std::array< double, 3 > r () const
 
double m () const
 
void setR (int d, double r)
 
void setM (double m)
 

Additional Inherited Members

- Protected Member Functions inherited from OrientedSite
 OrientedSite (double x=0., double y=0., double z=0., double m=0., double ex=0., double ey=0., double ez=0., double abs=0.)
 Constructor. More...
 
- Protected Member Functions inherited from Site
 Site (double x=0., double y=0., double z=0., double m=0.)
 Constructor. More...
 
- Protected Attributes inherited from OrientedSite
std::array< double, 3 > _e
 
double _abs
 
- Protected Attributes inherited from Site
std::array< double, 3 > _r
 
double _m
 

Detailed Description

Dipole center.

Electrical dipole with dipole moment $\vec{p}$.

Constructor & Destructor Documentation

◆ Dipole()

Dipole::Dipole ( double  x,
double  y,
double  z,
double  eMyx,
double  eMyy,
double  eMyz,
double  absMy 
)
inline

Constructor.

Parameters
[in]xrelative x coordinate
[in]yrelative y coordinate
[in]zrelative z coordinate
[in]eMyxx coordinate of the dipole moments normal
[in]eMyyy coordinate of the dipole moments normal
[in]eMyzz coordinate of the dipole moments normal
[in]absMydipole moments absolute value

Member Function Documentation

◆ absMy()

double Dipole::absMy ( ) const
inline

get the absolute value of the dipole moment.

◆ readXML()

void Dipole::readXML ( XMLfileUnits xmlconfig)
inlinevirtual

Read in XML configuration for a Dipole and all its included objects.

The following xml object structure is handled by this method:

<site>
<!-- all Site class parameters -->
<dipolemoment>
<!-- either direct vector -->
<x>DOUBLE</x> <y>DOUBLE</y> <z>DOUBLE</z>
<!-- or polar angle represenation (DEG)-->
<theta>DOUBLE</theta> <phi>DOUBLE</phi>
<!-- -->
<abs>DOUBLE</abs> <!-- will overwrites abs obtained from an x y z specification -->
</dipolemoment>
</site>

Reimplemented from Site.

◆ setAbyMy()

void Dipole::setAbyMy ( double  my)
inline

set the absolute value of the dipole moment

Note
after setting components of the orientation vector normalization has to be performed manually using the normalize_e() method.

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