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

Class implementing molecules as rigid rotators consisting out of different interaction sites (LJcenter, Charge, Dipole, Quadrupole). More...

#include <Component.h>

Public Member Functions

 Component (unsigned int id=0)
 
void readXML (XMLfileUnits &xmlconfig)
 Read in XML configuration for a component and all its included objects. More...
 
void setID (unsigned int id)
 
unsigned int ID () const
 
unsigned int numSites () const
 
unsigned int numOrientedSites () const
 
unsigned int numLJcenters () const
 
unsigned int numCharges () const
 
unsigned int numDipoles () const
 
unsigned int numQuadrupoles () const
 
double m () const
 
double I11 () const
 
double I22 () const
 
double I33 () const
 
void setI11 (double I)
 
void setI22 (double I)
 
void setI33 (double I)
 
unsigned int getRotationalDegreesOfFreedom () const
 
const std::vector< LJcenter > & ljcenters () const
 
LJcenterljcenter (unsigned int i)
 
const LJcenterljcenter (unsigned int i) const
 
const std::vector< Charge > & charges () const
 
Chargecharge (unsigned i)
 
const Chargecharge (unsigned i) const
 
const std::vector< Dipole > & dipoles () const
 
Dipoledipole (unsigned int i)
 
const Dipoledipole (unsigned int i) const
 
const std::vector< Quadrupole > & quadrupoles () const
 
Quadrupolequadrupole (unsigned int i)
 
const Quadrupolequadrupole (unsigned int i) const
 
void setNumMolecules (unsigned long num)
 
void incNumMolecules ()
 
void incNumMolecules (int N)
 
unsigned long getNumMolecules () const
 
void addLJcenter (LJcenter &ljsite)
 
void addLJcenter (double x, double y, double z, double m, double eps, double sigma, double rc=0, bool TRUNCATED_SHIFTED=0)
 
void addCharge (Charge &chargesite)
 
void addCharge (double x, double y, double z, double m, double q)
 
void addDipole (Dipole &dipolesite)
 
void addDipole (double x, double y, double z, double eMyx, double eMyy, double eMyz, double eMyabs)
 
void addQuadrupole (Quadrupole &quadrupolesite)
 
void addQuadrupole (double x, double y, double z, double eQx, double eQy, double eQz, double eQabs)
 
void deleteLJCenter ()
 
void deleteCharge ()
 
void deleteDipole ()
 
void deleteQuadrupole ()
 
void updateMassInertia ()
 
void write (std::ostream &ostrm) const
 
void writeVIM (std::ostream &ostrm)
 
void setE_trans (double E)
 
void setE_rot (double E)
 
void setT (double T)
 
double E_trans () const
 
double E_rot () const
 
double E () const
 
double T () const
 
void setName (std::string name)
 
std::string getName () const
 
double getEps (unsigned int i) const
 
double getSigma (unsigned int i) const
 
unsigned getLookUpId () const
 
void setLookUpId (unsigned lookUpId)
 

Detailed Description

Class implementing molecules as rigid rotators consisting out of different interaction sites (LJcenter, Charge, Dipole, Quadrupole).

Author
Martin Bernreuther

Member Function Documentation

◆ deleteLJCenter()

void Component::deleteLJCenter ( )
inline

delete the last site stored in the vector – these are used by the external generators

◆ getEps()

double Component::getEps ( unsigned int  i) const
inline

by Stefan Becker stefa.nosp@m.n.be.nosp@m.cker@.nosp@m.mv.u.nosp@m.ni-kl.nosp@m..de needed by the MegaMol output format

◆ getNumMolecules()

unsigned long Component::getNumMolecules ( ) const
inline

get the number of molecules (global) of the component

◆ getRotationalDegreesOfFreedom()

unsigned int Component::getRotationalDegreesOfFreedom ( ) const
inline

get number of rotational degrees of freedom

◆ ID()

unsigned int Component::ID ( ) const
inline

get component id

◆ incNumMolecules() [1/2]

void Component::incNumMolecules ( )
inline

increase the number of molecules for this component by 1

◆ incNumMolecules() [2/2]

void Component::incNumMolecules ( int  N)
inline

increase the number of molecules for this component by N

◆ m()

double Component::m ( ) const
inline

get mass of the molecule

◆ numCharges()

unsigned int Component::numCharges ( ) const
inline

get number of charge interaction sites

◆ numDipoles()

unsigned int Component::numDipoles ( ) const
inline

get number of dipole interaction sites

◆ numLJcenters()

unsigned int Component::numLJcenters ( ) const
inline

get number of Lennard Jones interaction sites

◆ numOrientedSites()

unsigned int Component::numOrientedSites ( ) const
inline

get number of oriented interaction sites (dipoles and quadrupoles)

◆ numQuadrupoles()

unsigned int Component::numQuadrupoles ( ) const
inline

get number of quadrupole interaction sites

◆ numSites()

unsigned int Component::numSites ( ) const
inline

get number of interaction sites

◆ readXML()

void Component::readXML ( XMLfileUnits xmlconfig)

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

The following xml object structure is handled by this method:

<component id=INT name="STRING">
<site type="LJ126|Charge|Dipole|Quadrupole"> <!-- see Site class documentation --> </site>
<momentsofinertia> <Ixx>DOUBLE</Ixx> <Iyy>DOUBLE</Iyy> <Izz>DOUBLE</Izz> </momentsofinertia>
</component>

◆ setID()

void Component::setID ( unsigned int  id)
inline

set the component id

◆ setNumMolecules()

void Component::setNumMolecules ( unsigned long  num)
inline

set the number of molecules for this component

◆ updateMassInertia()

void Component::updateMassInertia ( )

To be called after sites have been deleted or the properties of sites have been changed.

◆ write()

void Component::write ( std::ostream &  ostrm) const

write information to stream


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