votca 2024.2-dev
Loading...
Searching...
No Matches
votca::csg::Bead Class Reference

information about a bead More...

#include <bead.h>

Inheritance diagram for votca::csg::Bead:
Collaboration diagram for votca::csg::Bead:

Public Types

enum  Symmetry { spherical = 1 , ellipsoidal = 3 }
 get the symmetry of the bead More...
 

Public Member Functions

 ~Bead () override=default
 
const IndexgetResnr () const
 
virtual const double & getQ () const
 
virtual void setQ (const double &q)
 
Symmetry getSymmetry () const
 
void setVel (const Eigen::Vector3d &r)
 
const Eigen::Vector3d & getVel () const
 
void setU (const Eigen::Vector3d &u)
 set first orientation (normal vector) vector of bead
 
const Eigen::Vector3d & getU () const
 get first orientation (normal vector) vector of bead
 
void setV (const Eigen::Vector3d &v)
 set second orientation vector of bead
 
const Eigen::Vector3d & getV () const
 get second orientation vector of bead
 
void setW (const Eigen::Vector3d &w)
 set third orientation vector of bead
 
const Eigen::Vector3d & getW () const
 get third orientation vector of bead
 
Eigen::Vector3d & Vel ()
 
Eigen::Vector3d & U ()
 
Eigen::Vector3d & V ()
 
Eigen::Vector3d & W ()
 
Eigen::Vector3d & F ()
 
void setF (const Eigen::Vector3d &bead_force)
 
const Eigen::Vector3d & getF () const
 get the force acting on the bead
 
bool HasVel () const noexcept
 
bool HasF () const noexcept
 
bool HasU () const noexcept
 
bool HasV () const noexcept
 
bool HasW () const noexcept
 
void HasVel (bool b)
 
void HasF (bool b)
 
void HasU (bool b)
 
void HasV (bool b)
 
void HasW (bool b)
 
const std::vector< Index > & ParentBeads ()
 
void ClearParentBeads ()
 Clears out all parent beads.
 
void AddParentBead (Index parent_bead_id)
 Adds the id of a parent bead.
 
- Public Member Functions inherited from votca::csg::BaseBead
virtual ~BaseBead ()=default
 
Index getId () const noexcept
 Gets the id of the bead.
 
void setId (const Index &id) noexcept
 Sets the id of the bead.
 
std::string getName () const
 Gets the name of the bead.
 
void setName (std::string name)
 Sets the name of the bead.
 
void setMoleculeId (const Index &molecule_id) noexcept
 assign the bead to a molecule with the provided id
 
Index getMoleculeId () const noexcept
 Get the id of the molecule the bead is a part of, if the molecule id has not been set return topology_constants::unassigned_molecule_id.
 
virtual const std::string getType () const noexcept
 
virtual void setType (const std::string &type) noexcept
 
std::string getElement () const noexcept
 Returns the element type of the bead.
 
virtual const double & getMass () const noexcept
 
virtual void setMass (const double &m) noexcept
 
virtual void setPos (const Eigen::Vector3d &bead_position)
 
virtual const Eigen::Vector3d & getPos () const
 
virtual Eigen::Vector3d & Pos ()
 
virtual const Eigen::Vector3d & Pos () const
 
bool HasPos () const noexcept
 
void HasPos (const bool &true_or_false) noexcept
 

Protected Member Functions

 Bead (Index id, std::string type, Symmetry symmetry, std::string name, Index resnr, double m, double q)
 constructor
 
- Protected Member Functions inherited from votca::csg::BaseBead
 BaseBead ()=default
 

Protected Attributes

std::vector< Indexparent_beads_
 
Symmetry symmetry_
 
double charge_
 
Index residue_number_
 
Eigen::Vector3d velocity_
 
Eigen::Vector3d bead_force_
 
Eigen::Vector3d u_
 
Eigen::Vector3d v_
 
Eigen::Vector3d w_
 
bool bead_velocity_set_
 
bool bU_
 
bool bV_
 
bool bW_
 
bool bead_force_set_
 
- Protected Attributes inherited from votca::csg::BaseBead
std::string type_ = tools::topology_constants::unassigned_bead_type
 
Index id_ = tools::topology_constants::unassigned_residue_id
 
Index molecule_id_ = tools::topology_constants::unassigned_molecule_id
 
std::string element_symbol_ = tools::topology_constants::unassigned_element
 
TOOLS::Name name_
 
double mass_ = 0.0
 
Eigen::Vector3d bead_position_
 
bool bead_position_set_ = false
 

Friends

class Topology
 
class Molecule
 

Detailed Description

information about a bead

The Bead class describes an atom or a coarse grained bead. It stores information like the id, the name, the mass, the charge and the residue it belongs to. The coordinates are stored in the configuration class.

Todo

change resnr to pointer

make sure bead belongs to topology

Definition at line 50 of file bead.h.

Member Enumeration Documentation

◆ Symmetry

get the symmetry of the bead

Returns the number of unique axis of the bead, it can be 1 for a spherical bead 3 for an ellipsoidal bead 2 (currently not used), could be disk like particle

Returns
bead symmetry
Enumerator
spherical 
ellipsoidal 

Definition at line 85 of file bead.h.

Constructor & Destructor Documentation

◆ ~Bead()

votca::csg::Bead::~Bead ( )
overridedefault

destructor

◆ Bead()

votca::csg::Bead::Bead ( Index id,
std::string type,
Symmetry symmetry,
std::string name,
Index resnr,
double m,
double q )
inlineprotected

constructor

Definition at line 296 of file bead.h.

Member Function Documentation

◆ AddParentBead()

void votca::csg::Bead::AddParentBead ( Index parent_bead_id)
inline

Adds the id of a parent bead.

Definition at line 275 of file bead.h.

◆ ClearParentBeads()

void votca::csg::Bead::ClearParentBeads ( )
inline

Clears out all parent beads.

Definition at line 270 of file bead.h.

◆ F()

Eigen::Vector3d & votca::csg::Bead::F ( )
inline

direct access (read/write) to the force of the bead

Returns
reference to force

Definition at line 210 of file bead.h.

◆ getF()

const Eigen::Vector3d & votca::csg::Bead::getF ( ) const
inline

get the force acting on the bead

Forces have to be provided by the trajectory. If beads are mapped, forces of coarse-grained beads are also calculated.

Returns
force on bead

Definition at line 361 of file bead.h.

◆ getQ()

virtual const double & votca::csg::Bead::getQ ( ) const
inlinevirtual

get the charge of the bead

Returns
- base bead charge

Definition at line 67 of file bead.h.

◆ getResnr()

const Index & votca::csg::Bead::getResnr ( ) const
inline

get the residu number of the bead

Returns
residue id

Definition at line 61 of file bead.h.

◆ getSymmetry()

Symmetry votca::csg::Bead::getSymmetry ( ) const
inline

Definition at line 86 of file bead.h.

◆ getU()

const Eigen::Vector3d & votca::csg::Bead::getU ( ) const
inline

get first orientation (normal vector) vector of bead

Non-spherical beads (symmetry 3) have a internal coordinates system and the axes are denoted as u, v and w. Currently the non-spherical mapping is hardcoded and the axis u is calculated by the eigenvector with the lowest eigenvector of the mapped beads and has the meaning of a normal vector if the reference beads have a disc like shape. The sign of the normal vector is determined in combination with the vectors v and w to build up a right handed (??) coordinate system.

Returns
bead orientation u

Definition at line 331 of file bead.h.

◆ getV()

const Eigen::Vector3d & votca::csg::Bead::getV ( ) const
inline

get second orientation vector of bead

Non-spherical beads (symmetry 3) have a internal coordinates system and the axes are denoted as u, v and w. Currently the non-spherical mapping is hardcoded and the axis v is the vector which connects first and second reference atom in the mapping (only orthogonal component to u).

Returns
bead orientation u

Definition at line 341 of file bead.h.

◆ getVel()

const Eigen::Vector3d & votca::csg::Bead::getVel ( ) const
inline

get the velocity of the bead

Returns
bead velocity

Definition at line 320 of file bead.h.

◆ getW()

const Eigen::Vector3d & votca::csg::Bead::getW ( ) const
inline

get third orientation vector of bead

Non-spherical beads (symmetry 3) have a internal coordinates system and the axes are denoted as u, v and w. Currently the non-spherical mapping is hardcoded and the axis w is orthogonal to u and v.

Returns
bead orientation w

Definition at line 351 of file bead.h.

◆ HasF() [1/2]

bool votca::csg::Bead::HasF ( ) const
inlinenoexcept

does this configuration store forces?

Definition at line 235 of file bead.h.

◆ HasF() [2/2]

void votca::csg::Bead::HasF ( bool b)
inline

dos the bead store a force

Definition at line 368 of file bead.h.

◆ HasU() [1/2]

bool votca::csg::Bead::HasU ( ) const
inlinenoexcept

does this configuration store u-orientations?

Definition at line 238 of file bead.h.

◆ HasU() [2/2]

void votca::csg::Bead::HasU ( bool b)
inline

doe the bead store an orientation u

Definition at line 370 of file bead.h.

◆ HasV() [1/2]

bool votca::csg::Bead::HasV ( ) const
inlinenoexcept

does this configuration store v-orientations?

Definition at line 241 of file bead.h.

◆ HasV() [2/2]

void votca::csg::Bead::HasV ( bool b)
inline

doe the bead store an orientation v

Definition at line 372 of file bead.h.

◆ HasVel() [1/2]

bool votca::csg::Bead::HasVel ( ) const
inlinenoexcept

does this configuration store velocities?

Definition at line 232 of file bead.h.

◆ HasVel() [2/2]

void votca::csg::Bead::HasVel ( bool b)
inline

dos the bead store a velocity

Definition at line 366 of file bead.h.

◆ HasW() [1/2]

bool votca::csg::Bead::HasW ( ) const
inlinenoexcept

does this configuration store w-orientations?

Definition at line 244 of file bead.h.

◆ HasW() [2/2]

void votca::csg::Bead::HasW ( bool b)
inline

doe the bead store an orientation w

Definition at line 374 of file bead.h.

◆ ParentBeads()

const std::vector< Index > & votca::csg::Bead::ParentBeads ( )
inline

If it is a mapped beads, returns te bead id the cg bead was created from

Returns
vector of bead ids of reference atoms

Definition at line 265 of file bead.h.

◆ setF()

void votca::csg::Bead::setF ( const Eigen::Vector3d & bead_force)
inline

set force acting on bead

Parameters
bead_forceforce

Definition at line 356 of file bead.h.

◆ setQ()

virtual void votca::csg::Bead::setQ ( const double & q)
inlinevirtual

set the charge of the base bead

Parameters
[in]q- base bead position

Definition at line 73 of file bead.h.

◆ setU()

void votca::csg::Bead::setU ( const Eigen::Vector3d & u)
inline

set first orientation (normal vector) vector of bead

see getU for details

Parameters
ubead orientation u

Definition at line 326 of file bead.h.

◆ setV()

void votca::csg::Bead::setV ( const Eigen::Vector3d & v)
inline

set second orientation vector of bead

see getV for details

Parameters
vbead orientation v

Definition at line 336 of file bead.h.

◆ setVel()

void votca::csg::Bead::setVel ( const Eigen::Vector3d & r)
inline

set the velocity of the bead

Parameters
rbead velocity

Definition at line 315 of file bead.h.

◆ setW()

void votca::csg::Bead::setW ( const Eigen::Vector3d & w)
inline

set third orientation vector of bead

see getW for details

Parameters
wbead orientation w

Definition at line 346 of file bead.h.

◆ U()

Eigen::Vector3d & votca::csg::Bead::U ( )
inline

direct access (read/write) to orientation u of the bead

Returns
reference to u

Definition at line 183 of file bead.h.

◆ V()

Eigen::Vector3d & votca::csg::Bead::V ( )
inline

direct access (read/write) to the orientation v of the bead

Returns
reference to v

Definition at line 192 of file bead.h.

◆ Vel()

Eigen::Vector3d & votca::csg::Bead::Vel ( )
inline

direct access (read/write) to the velocity of the bead

Returns
reference to velocity

Definition at line 173 of file bead.h.

◆ W()

Eigen::Vector3d & votca::csg::Bead::W ( )
inline

direct access (read/write) to the orientation w of the bead

Returns
reference to w

Definition at line 201 of file bead.h.

Friends And Related Symbol Documentation

◆ Molecule

friend class Molecule
friend

Definition at line 312 of file bead.h.

◆ Topology

friend class Topology
friend

Definition at line 311 of file bead.h.

Member Data Documentation

◆ bead_force_

Eigen::Vector3d votca::csg::Bead::bead_force_
protected

Definition at line 287 of file bead.h.

◆ bead_force_set_

bool votca::csg::Bead::bead_force_set_
protected

Definition at line 293 of file bead.h.

◆ bead_velocity_set_

bool votca::csg::Bead::bead_velocity_set_
protected

Definition at line 289 of file bead.h.

◆ bU_

bool votca::csg::Bead::bU_
protected

Definition at line 290 of file bead.h.

◆ bV_

bool votca::csg::Bead::bV_
protected

Definition at line 291 of file bead.h.

◆ bW_

bool votca::csg::Bead::bW_
protected

Definition at line 292 of file bead.h.

◆ charge_

double votca::csg::Bead::charge_
protected

Definition at line 283 of file bead.h.

◆ parent_beads_

std::vector<Index> votca::csg::Bead::parent_beads_
protected

Definition at line 280 of file bead.h.

◆ residue_number_

Index votca::csg::Bead::residue_number_
protected

Definition at line 285 of file bead.h.

◆ symmetry_

Symmetry votca::csg::Bead::symmetry_
protected

Definition at line 282 of file bead.h.

◆ u_

Eigen::Vector3d votca::csg::Bead::u_
protected

Definition at line 287 of file bead.h.

◆ v_

Eigen::Vector3d votca::csg::Bead::v_
protected

Definition at line 287 of file bead.h.

◆ velocity_

Eigen::Vector3d votca::csg::Bead::velocity_
protected

Definition at line 287 of file bead.h.

◆ w_

Eigen::Vector3d votca::csg::Bead::w_
protected

Definition at line 287 of file bead.h.


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