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

information about molecules More...

#include <molecule.h>

Collaboration diagram for votca::csg::Molecule:

Public Member Functions

Index getId () const
 get the molecule ID
 
const std::string & getName () const
 get the name of the molecule
 
void setName (const std::string &name)
 set the name of the molecule
 
void AddBead (Bead *bead, const std::string &name)
 Add a bead to the molecule.
 
BeadgetBead (Index bead)
 get the id of a bead in the molecule
 
const BeadgetBead (Index bead) const
 
Index getBeadId (Index bead) const
 
Index getBeadIdByName (const std::string &name) const
 
Index BeadCount () const
 get the number of beads in the molecule
 
const std::vector< Bead * > & Beads () const
 
std::vector< Bead * > & Beads ()
 
Index getBeadByName (const std::string &name) const
 find a bead by it's name
 
std::string getBeadName (const Index bead)
 
const std::string & getBeadName (const Index bead) const
 
void AddInteraction (Interaction *ic)
 Add an interaction to the molecule.
 
std::vector< Interaction * > Interactions ()
 
const std::vector< Interaction * > & Interactions () const
 

Private Member Functions

 Molecule (Index id, std::string name)
 constructor
 

Private Attributes

std::map< std::string, Indexbeadmap_
 
std::vector< Interaction * > interactions_
 
Index id_
 
std::string name_
 
std::vector< Bead * > beads_
 
std::vector< std::string > bead_names_
 

Friends

class Topology
 

Detailed Description

information about molecules

The Molecule class stores which beads belong to a molecule. The organization of beads into molecules is needed for the CG mapping.

Todo
sort atoms in molecule

Definition at line 45 of file molecule.h.

Constructor & Destructor Documentation

◆ Molecule()

votca::csg::Molecule::Molecule ( Index id,
std::string name )
inlineprivate

constructor

Definition at line 99 of file molecule.h.

Member Function Documentation

◆ AddBead()

void votca::csg::Molecule::AddBead ( Bead * bead,
const std::string & name )

Add a bead to the molecule.

Definition at line 29 of file molecule.cc.

◆ AddInteraction()

void votca::csg::Molecule::AddInteraction ( Interaction * ic)
inline

Add an interaction to the molecule.

Definition at line 77 of file molecule.h.

◆ BeadCount()

Index votca::csg::Molecule::BeadCount ( ) const
inline

get the number of beads in the molecule

Definition at line 65 of file molecule.h.

◆ Beads() [1/2]

std::vector< Bead * > & votca::csg::Molecule::Beads ( )
inline

Definition at line 68 of file molecule.h.

◆ Beads() [2/2]

const std::vector< Bead * > & votca::csg::Molecule::Beads ( ) const
inline

Definition at line 67 of file molecule.h.

◆ getBead() [1/2]

Bead * votca::csg::Molecule::getBead ( Index bead)
inline

get the id of a bead in the molecule

Definition at line 59 of file molecule.h.

◆ getBead() [2/2]

const Bead * votca::csg::Molecule::getBead ( Index bead) const
inline

Definition at line 60 of file molecule.h.

◆ getBeadByName()

Index votca::csg::Molecule::getBeadByName ( const std::string & name) const

find a bead by it's name

Definition at line 37 of file molecule.cc.

◆ getBeadId()

Index votca::csg::Molecule::getBeadId ( Index bead) const
inline

Definition at line 61 of file molecule.h.

◆ getBeadIdByName()

Index votca::csg::Molecule::getBeadIdByName ( const std::string & name) const
inline

Definition at line 104 of file molecule.h.

◆ getBeadName() [1/2]

std::string votca::csg::Molecule::getBeadName ( const Index bead)
inline

Definition at line 71 of file molecule.h.

◆ getBeadName() [2/2]

const std::string & votca::csg::Molecule::getBeadName ( const Index bead) const
inline

Definition at line 72 of file molecule.h.

◆ getId()

Index votca::csg::Molecule::getId ( ) const
inline

get the molecule ID

Definition at line 48 of file molecule.h.

◆ getName()

const std::string & votca::csg::Molecule::getName ( ) const
inline

get the name of the molecule

Definition at line 51 of file molecule.h.

◆ Interactions() [1/2]

std::vector< Interaction * > votca::csg::Molecule::Interactions ( )
inline

Definition at line 79 of file molecule.h.

◆ Interactions() [2/2]

const std::vector< Interaction * > & votca::csg::Molecule::Interactions ( ) const
inline

Definition at line 80 of file molecule.h.

◆ setName()

void votca::csg::Molecule::setName ( const std::string & name)
inline

set the name of the molecule

Definition at line 54 of file molecule.h.

Friends And Related Symbol Documentation

◆ Topology

friend class Topology
friend

Definition at line 101 of file molecule.h.

Member Data Documentation

◆ bead_names_

std::vector<std::string> votca::csg::Molecule::bead_names_
private

Definition at line 96 of file molecule.h.

◆ beadmap_

std::map<std::string, Index> votca::csg::Molecule::beadmap_
private

Definition at line 86 of file molecule.h.

◆ beads_

std::vector<Bead *> votca::csg::Molecule::beads_
private

Definition at line 95 of file molecule.h.

◆ id_

Index votca::csg::Molecule::id_
private

Definition at line 90 of file molecule.h.

◆ interactions_

std::vector<Interaction *> votca::csg::Molecule::interactions_
private

Definition at line 87 of file molecule.h.

◆ name_

std::string votca::csg::Molecule::name_
private

Definition at line 93 of file molecule.h.


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