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

This class calculates the Radial Distribution Function (RDF). More...

#include <RDF.h>

Inheritance diagram for RDF:
PluginBase

Public Member Functions

void readXML (XMLfileUnits &xmlconfig)
 Read in XML configuration for RDFWriter. More...
 
void afterForces (ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, unsigned long simstep)
 Method afterForces will be called after forcefields have been applied no sitewise Forces can be applied here. More...
 
void init (ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, Domain *domain)
 Method init will be called at the begin of the simulation. More...
 
void finish (ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, Domain *domain)
 Method finish will be called at the end of the simulation. More...
 
std::string getPluginName ()
 return the name of the plugin More...
 
void setOutputTimestep (unsigned int timestep)
 
void setOutputPrefix (std::string prefix)
 
void endStep (ParticleContainer *particleContainer, DomainDecompBase *domainDecomposition, Domain *domain, unsigned long simStep)
 plot all the statistics calculated to one or several files More...
 
void tickRDF ()
 
void accumulateNumberOfMolecules (std::vector< Component > &components)
 
void observeARDFMolecule (double dd, double cosPhi, double cosPhiReverse, unsigned cid1, unsigned cid2)
 
void observeRDF (Molecule const &mi, Molecule const &mj, double dd)
 
void observeRDFMolecule (double dd, unsigned i, unsigned j)
 
void observeRDFSite (double dd, unsigned i, unsigned j, unsigned m, unsigned n)
 
bool isEnabledSiteRDF () const
 
bool doARDF () const
 
void reset ()
 reset all values to 0, except the accumulated ones.
 
- Public Member Functions inherited from PluginBase
 PluginBase ()
 Subclasses should use their constructur to pass parameters (e.g. filenames)
 
virtual void beforeEventNewTimestep (ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, unsigned long simstep)
 Method will be called first thing in a new timestep. More...
 
virtual void beforeForces (ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, unsigned long simstep)
 Method beforeForces will be called before forcefields have been applied no alterations w.r.t. Forces shall be made here. More...
 
virtual void siteWiseForces (ParticleContainer *particleContainer, DomainDecompBase *domainDecomp, unsigned long simstep)
 Method siteWiseForces will be called before forcefields have been applied alterations to sitewise forces and fullMolecule forces can be made here. More...
 
virtual void registerCallbacks (std::map< std::string, FunctionWrapper > &callbackMap)
 
virtual void accessAllCallbacks (const std::map< std::string, FunctionWrapper > &callbackMap)
 

Static Public Member Functions

static PluginBasecreateInstance ()
 

Friends

class RDFTest
 

Detailed Description

This class calculates the Radial Distribution Function (RDF).

The RDF "describes how the atomic density varies as a function of the distance from one particular atom." (see http://en.wikipedia.org/wiki/Radial_distribution_function ). For example, it should be possible to recognize the aggregate state of a system (see http://matdl.org/matdlwiki/index.php/softmatter:Radial_Distribution_Function ).

Note
The RDF is only determined for molecule pairs within the cutoff radius of the force and potential calculation. This means that bins outside the cut-off will always be computed to be zero.

Calculation:

Update: Optionally, the RDF can be additionally resolved in angular direction, by chosing angularbins > 1 in the input. Phi is the angle between the central molecules orientation vector and the vector connecting the pair of molecules. The angular coordinate is given and discretized in terms of the cosine of the angle cos(phi), to ensure equal control volume sizes for equal distance R

Member Function Documentation

◆ accumulateNumberOfMolecules()

void RDF::accumulateNumberOfMolecules ( std::vector< Component > &  components)

count the number of molecules per component

Todo:
: remove it and replace it by component.getNumMolecules()

◆ afterForces()

void RDF::afterForces ( ParticleContainer particleContainer,
DomainDecompBase domainDecomp,
unsigned long  simstep 
)
virtual

Method afterForces will be called after forcefields have been applied no sitewise Forces can be applied here.

Reimplemented from PluginBase.

◆ endStep()

void RDF::endStep ( ParticleContainer particleContainer,
DomainDecompBase domainDecomposition,
Domain domain,
unsigned long  simStep 
)
virtual

plot all the statistics calculated to one or several files

Implements PluginBase.

◆ finish()

void RDF::finish ( ParticleContainer particleContainer,
DomainDecompBase domainDecomp,
Domain domain 
)
virtual

Method finish will be called at the end of the simulation.

This method will be called once at the end of the simulation. It can be used e.g. to closing output files or writing final statistics.

Parameters
particleContainerparticle container storing the (local) molecules
domainDecompdomain decomposition in use
domain

Implements PluginBase.

◆ getPluginName()

std::string RDF::getPluginName ( )
inlinevirtual

return the name of the plugin

Implements PluginBase.

◆ init()

void RDF::init ( ParticleContainer particleContainer,
DomainDecompBase domainDecomp,
Domain domain 
)
virtual

Method init will be called at the begin of the simulation.

This method will be called once at the begin of the simulation just right before the main time step loop. It can be used e.g. to open output files or initialize statistics.

Parameters
particleContainerparticle container storing the (local) molecules
domainDecompdomain decomposition in use
domain

Implements PluginBase.

◆ observeRDFMolecule()

void RDF::observeRDFMolecule ( double  dd,
unsigned  i,
unsigned  j 
)
inline

This method "really" counts the number of molecule pairs within a certain distance.

◆ observeRDFSite()

void RDF::observeRDFSite ( double  dd,
unsigned  i,
unsigned  j,
unsigned  m,
unsigned  n 
)
inline

Count center pairing for particle pair for molecules i and j and centers m_i, n_j at distance dd.

◆ readXML()

void RDF::readXML ( XMLfileUnits xmlconfig)
virtual

Read in XML configuration for RDFWriter.

The following xml object structure is handled by this method:

<outputplugin name="RDF">
<writefrequency>INTEGER</writefrequency>
<outputprefix>STRING</outputprefix>
<bins>INTEGER</bins>
<intervallength>DOUBLE</intervallength>
</outputplugin>

Implements PluginBase.

◆ setOutputPrefix()

void RDF::setOutputPrefix ( std::string  prefix)
inline
Todo:
put this in the constructor (when the transition to the xml file is done), or create a seperate output component.

◆ setOutputTimestep()

void RDF::setOutputTimestep ( unsigned int  timestep)
inline
Todo:
put this in the constructor (when the transition to the xml file is done), or create a seperate output component.

◆ tickRDF()

void RDF::tickRDF ( )
inline

increment the counter indicating for how many iterations the molecule pairs have been counted.


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