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

The Site class is the basis for the implementation of physical interactions. More...

#include <Site.h>

Inheritance diagram for Site:
Charge LJcenter OrientedSite Dipole Quadrupole

Public Member Functions

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...
 
virtual void write (std::ostream &ostrm) const
 

Protected Member Functions

 Site (double x=0., double y=0., double z=0., double m=0.)
 Constructor. More...
 

Protected Attributes

std::array< double, 3 > _r
 
double _m
 

Detailed Description

The Site class is the basis for the implementation of physical interactions.

A site in ls1-MarDyn is the center of an interaction. Depending on the interaction type there are specialised derived classes of this basic site class. All sites provide as common propery the site position and site mass.

Constructor & Destructor Documentation

◆ Site()

Site::Site ( double  x = 0.,
double  y = 0.,
double  z = 0.,
double  m = 0. 
)
inlineprotected

Constructor.

Parameters
xelative x-coordinate
yelative y-coordinate
zelative z-coordinate
mmass

Member Function Documentation

◆ m()

double Site::m ( ) const
inline

get mass

◆ r()

std::array<double, 3> Site::r ( ) const
inline

get position vector

◆ readXML()

virtual void Site::readXML ( XMLfileUnits xmlconfig)
inlinevirtual

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

The following xml object structure is handled by this method:

<site>
<coords> <x>DOUBLE</x> <y>DOUBLE</y> <z>DOUBLE</z> </coords>
<mass>DOUBLE</mass>
</site>

Reimplemented in LJcenter, Charge, Dipole, and Quadrupole.

◆ rx()

double Site::rx ( ) const
inline

get x-coordinate of position vector

◆ ry()

double Site::ry ( ) const
inline

get y-coordinate of position vector

◆ rz()

double Site::rz ( ) const
inline

get z-coordinate of position vector

◆ setM()

void Site::setM ( double  m)
inline

set the site mass

◆ setR()

void Site::setR ( int  d,
double  r 
)
inline

set the d-th component of the position

◆ write()

virtual void Site::write ( std::ostream &  ostrm) const
inlinevirtual

Reimplemented in LJcenter, Charge, and OrientedSite.

Member Data Documentation

◆ _m

double Site::_m
protected

mass

◆ _r

std::array<double, 3> Site::_r
protected

position coordinates


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