votca 2024-dev
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Attributes | List of all members
votca::csg::BoundaryCondition Class Referenceabstract

Class keeps track of how the boundaries of the system are handled. More...

#include <boundarycondition.h>

Inheritance diagram for votca::csg::BoundaryCondition:
Inheritance graph
[legend]

Public Types

enum  eBoxtype { typeAuto = 0 , typeTriclinic , typeOrthorhombic , typeOpen }
 

Public Member Functions

virtual ~BoundaryCondition ()=default
 
virtual std::unique_ptr< BoundaryConditionClone () const =0
 Safe way to allow child classes to be copied.
 
void setBox (const Eigen::Matrix3d &box) noexcept
 
const Eigen::Matrix3d & getBox () const noexcept
 
double getShortestBoxDimension () const
 Self explanatory gets the shortest dimension of the boundary conditions.
 
virtual double BoxVolume () const noexcept
 
virtual Eigen::Vector3d BCShortestConnection (const Eigen::Vector3d &r_i, const Eigen::Vector3d &r_j) const =0
 
virtual eBoxtype getBoxType () const noexcept=0
 

Protected Attributes

Eigen::Matrix3d box_
 

Detailed Description

Class keeps track of how the boundaries of the system are handled.

There are a total of 3 different boundaries: open - no boundaries orthorhombic - orthorombic boundaries triclinic - triclinic boundaries

This class enables the correct treatement of distances beteween topology objects, such that distances accound for the periodic boundaries.

Definition at line 41 of file boundarycondition.h.

Member Enumeration Documentation

◆ eBoxtype

Enumerator
typeAuto 
typeTriclinic 
typeOrthorhombic 
typeOpen 

Definition at line 89 of file boundarycondition.h.

Constructor & Destructor Documentation

◆ ~BoundaryCondition()

virtual votca::csg::BoundaryCondition::~BoundaryCondition ( )
virtualdefault

Member Function Documentation

◆ BCShortestConnection()

virtual Eigen::Vector3d votca::csg::BoundaryCondition::BCShortestConnection ( const Eigen::Vector3d &  r_i,
const Eigen::Vector3d &  r_j 
) const
pure virtual

get shortest connection vector between r_i and r_j with respect to the (periodic) box

Returns
shortest distance vector

Implemented in votca::csg::OpenBox, votca::csg::OrthorhombicBox, and votca::csg::TriclinicBox.

◆ BoxVolume()

double votca::csg::BoundaryCondition::BoxVolume ( ) const
virtualnoexcept

get the volume of the box

Returns
box volume as double

Definition at line 28 of file boundarycondition.cc.

◆ Clone()

virtual std::unique_ptr< BoundaryCondition > votca::csg::BoundaryCondition::Clone ( ) const
pure virtual

Safe way to allow child classes to be copied.

The child classes must use the same method and override it with their type for this to work.

Returns
standard pointer to child class

Implemented in votca::csg::OpenBox, votca::csg::OrthorhombicBox, and votca::csg::TriclinicBox.

◆ getBox()

const Eigen::Matrix3d & votca::csg::BoundaryCondition::getBox ( ) const
inlinenoexcept

get the simulation box

Returns
triclinic box matrix

Definition at line 66 of file boundarycondition.h.

◆ getBoxType()

virtual eBoxtype votca::csg::BoundaryCondition::getBoxType ( ) const
pure virtualnoexcept

◆ getShortestBoxDimension()

double votca::csg::BoundaryCondition::getShortestBoxDimension ( ) const

Self explanatory gets the shortest dimension of the boundary conditions.

Returns

Definition at line 32 of file boundarycondition.cc.

◆ setBox()

void votca::csg::BoundaryCondition::setBox ( const Eigen::Matrix3d &  box)
inlinenoexcept

set the simulation box

Parameters
boxtriclinic box matrix

Definition at line 60 of file boundarycondition.h.

Member Data Documentation

◆ box_

Eigen::Matrix3d votca::csg::BoundaryCondition::box_
protected

Definition at line 93 of file boundarycondition.h.


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