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

The OrientedSite class is the basis for the implementation of physical interactions based on directed quantities like the dipole moment, etc. More...

#include <Site.h>

Inheritance diagram for OrientedSite:
Site Dipole Quadrupole

Public Member Functions

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)
 
virtual void readXML (XMLfileUnits &xmlconfig)
 Read in XML configuration for a site and all its included objects. More...
 

Protected Member Functions

 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

std::array< double, 3 > _e
 
double _abs
 
- Protected Attributes inherited from Site
std::array< double, 3 > _r
 
double _m
 

Detailed Description

The OrientedSite class is the basis for the implementation of physical interactions based on directed quantities like the dipole moment, etc.

Constructor & Destructor Documentation

◆ OrientedSite()

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. 
)
inlineprotected

Constructor.

Parameters
[in]xrelative x coordinate
[in]yrelative y coordinate
[in]zrelative z coordinate
[in]exx coordinate of the orientation normal
[in]eyy coordinate of the orientation normal
[in]ezz coordinate of the orientation normal
[in]absabsolute value of the directed quantity

Member Function Documentation

◆ abs()

double OrientedSite::abs ( ) const
inline

get the absolute value of the directed quantity

◆ e()

std::array<double, 3> OrientedSite::e ( ) const
inline

get normalized orientation vector.

◆ ex()

double OrientedSite::ex ( ) const
inline

get x-coordinate of the normalized orientation vector

◆ ey()

double OrientedSite::ey ( ) const
inline

get y-coordinate of the normalized orientation vector

◆ ez()

double OrientedSite::ez ( ) const
inline

get z-coordinate of the normalized orientation vector

◆ normalize_e()

void OrientedSite::normalize_e ( )
inline

normalize the orientation vector

◆ setAbs()

void OrientedSite::setAbs ( double  abs)
inline

set the absolute value of the directed quantity

◆ setE()

void OrientedSite::setE ( int  d,
double  e 
)
inline

set the d-th component of the orientation vector

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

◆ setOrientationVectorByPolarAngles()

void OrientedSite::setOrientationVectorByPolarAngles ( const double &  theta_deg,
const double &  phi_deg 
)
inline

set orientation vector using polar angles

Parameters
theta_degtheta in degrees
phi_degphi in degrees

◆ write()

void OrientedSite::write ( std::ostream &  ostrm) const
inlinevirtual

write to stream

Reimplemented from Site.

Member Data Documentation

◆ _abs

double OrientedSite::_abs
protected

absolute value of the directed quantity

◆ _e

std::array<double, 3> OrientedSite::_e
protected

orientation vector

Todo:
normalized!?

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