votca 2024.2-dev
|
topology of the whole system More...
#include <topology.h>
Public Member Functions | |
Topology () | |
constructor | |
~Topology () | |
void | Cleanup () |
Cleans up all the stored data. | |
Bead * | CreateBead (Bead::Symmetry symmetry, std::string name, std::string type, Index resnr, double m, double q) |
Creates a new Bead. | |
Molecule * | CreateMolecule (std::string name) |
Creates a new molecule. | |
void | CheckMoleculeNaming (void) |
checks weather molecules with the same name really contain the same number of beads | |
Residue & | CreateResidue (std::string name) |
Create a new resiude. | |
Residue & | CreateResidue (std::string name, Index id) |
void | CreateMoleculesByRange (std::string name, Index first, Index nbeads, Index nmolecules) |
create molecules based on blocks of atoms | |
Index | MoleculeCount () const |
number of molecules in the system | |
Index | BeadCount () const |
Index | ResidueCount () const |
Molecule * | MoleculeByIndex (Index index) |
BeadContainer & | Beads () |
ResidueContainer & | Residues () |
const ResidueContainer & | Residues () const |
MoleculeContainer & | Molecules () |
const MoleculeContainer & | Molecules () const |
InteractionContainer & | BondedInteractions () |
const InteractionContainer & | BondedInteractions () const |
void | AddBondedInteraction (Interaction *ic) |
std::vector< Interaction * > | InteractionsInGroup (const std::string &group) |
bool | BeadTypeExist (std::string type) const |
Determine if a bead type exists. | |
void | RegisterBeadType (std::string type) |
Register the bead type with the topology object. | |
Index | getBeadTypeId (std::string type) const |
Given a bead type this method returns the id associated with the type. | |
Bead * | getBead (const Index i) |
Returns a pointer to the bead with index i. | |
const Bead * | getBead (const Index i) const |
Residue & | getResidue (const Index i) |
const Residue & | getResidue (const Index i) const |
Molecule * | getMolecule (const Index i) |
const Molecule * | getMolecule (const Index i) const |
void | ClearMoleculeList () |
void | CopyTopologyData (Topology *top) |
copy topology data of different topology | |
void | RenameMolecules (std::string range, std::string name) |
rename all the molecules in range | |
void | RenameBeadType (std::string name, std::string newname) |
rename all the bead types | |
void | SetBeadTypeMass (std::string name, double value) |
set the mass of all the beads of a certain type | |
void | setBox (const Eigen::Matrix3d &box, BoundaryCondition::eBoxtype boxtype=BoundaryCondition::typeAuto) |
const Eigen::Matrix3d & | getBox () const |
const BoundaryCondition & | getBoundary () const |
Return the boundary condition object. | |
void | setTime (double t) |
double | getTime () const |
void | setStep (Index s) |
Index | getStep () const |
void | setParticleGroup (std::string particle_group) |
std::string | getParticleGroup () const |
Eigen::Vector3d | getDist (Index bead1, Index bead2) const |
pbc correct distance of two beads | |
Eigen::Vector3d | BCShortestConnection (const Eigen::Vector3d &r_i, const Eigen::Vector3d &r_j) const |
calculate shortest vector connecting two points | |
double | ShortestBoxSize () const |
return the shortest box size | |
double | BoxVolume () const |
void | RebuildExclusions () |
ExclusionList & | getExclusions () |
const ExclusionList & | getExclusions () const |
BoundaryCondition::eBoxtype | getBoxType () const |
template<typename iteratable > | |
void | InsertExclusion (Bead *bead1, iteratable &l) |
bool | HasVel () |
void | SetHasVel (const bool v) |
bool | HasForce () |
void | SetHasForce (const bool v) |
Protected Member Functions | |
BoundaryCondition::eBoxtype | autoDetectBoxType (const Eigen::Matrix3d &box) const |
Protected Attributes | |
std::unique_ptr< BoundaryCondition > | bc_ |
std::unordered_map< std::string, Index > | beadtypes_ |
bead types in the topology | |
BeadContainer | beads_ |
beads in the topology | |
MoleculeContainer | molecules_ |
molecules in the topology | |
ResidueContainer | residues_ |
residues in the topology | |
InteractionContainer | interactions_ |
bonded interactions in the topology | |
ExclusionList | exclusions_ |
std::map< std::string, Index > | interaction_groups_ |
std::map< std::string, std::vector< Interaction * > > | interactions_by_group_ |
double | time_ = 0.0 |
Index | step_ = 0 |
bool | has_vel_ = false |
bool | has_force_ = false |
std::string | particle_group_ = "unassigned" |
The particle group (For H5MD file format) | |
topology of the whole system
The Topology class stores the topology of the system like the beads, bonds, molecules and residues.
Definition at line 81 of file topology.h.
|
inline |
constructor
Definition at line 84 of file topology.h.
votca::csg::Topology::~Topology | ( | ) |
Definition at line 47 of file topology.cc.
void votca::csg::Topology::AddBondedInteraction | ( | Interaction * | ic | ) |
Definition at line 188 of file topology.cc.
|
protected |
Definition at line 252 of file topology.cc.
Eigen::Vector3d votca::csg::Topology::BCShortestConnection | ( | const Eigen::Vector3d & | r_i, |
const Eigen::Vector3d & | r_j ) const |
calculate shortest vector connecting two points
r_i | first point |
r_j | second point |
calculates the smallest distance between two points with correct treatment of pbc
Definition at line 238 of file topology.cc.
|
inline |
number of beads in the system
Definition at line 150 of file topology.h.
|
inline |
bool votca::csg::Topology::BeadTypeExist | ( | std::string | type | ) | const |
Determine if a bead type exists.
Definition at line 210 of file topology.cc.
|
inline |
access containter with all bonded interactions
Definition at line 189 of file topology.h.
|
inline |
Definition at line 190 of file topology.h.
double votca::csg::Topology::BoxVolume | ( | ) | const |
void votca::csg::Topology::CheckMoleculeNaming | ( | void | ) |
checks weather molecules with the same name really contain the same number of beads
Definition at line 169 of file topology.cc.
void votca::csg::Topology::Cleanup | ( | ) |
Cleans up all the stored data.
Definition at line 49 of file topology.cc.
|
inline |
delete all molecule information
Definition at line 237 of file topology.h.
void votca::csg::Topology::CopyTopologyData | ( | Topology * | top | ) |
copy topology data of different topology
top | topology to copy from |
Definition at line 102 of file topology.cc.
|
inline |
Creates a new Bead.
[in] | symmetry | symmetry of the bead, 1: spherical 3: ellipsoidal |
[in] | name | name of the bead |
[in] | type | bead type |
[in] | resnr | residue number |
[in] | m | mass |
[in] | q | charge |
The function creates a new bead and adds it to the list of beads.
Definition at line 441 of file topology.h.
|
inline |
Creates a new molecule.
[in] | name | name of the molecule |
Definition at line 449 of file topology.h.
void votca::csg::Topology::CreateMoleculesByRange | ( | std::string | name, |
Index | first, | ||
Index | nbeads, | ||
Index | nmolecules ) |
create molecules based on blocks of atoms
[in] | name | molecule name |
[in] | first | first bead |
[in] | nbeads | number of beads per molecule |
[in] | nmolecules | number of molecules |
Definition at line 72 of file topology.cc.
|
inline |
Create a new resiude.
[in] | name | residue name |
Definition at line 462 of file topology.h.
Definition at line 454 of file topology.h.
Returns a pointer to the bead with index i.
[in] | i | the id of the bead |
Definition at line 227 of file topology.h.
Definition at line 228 of file topology.h.
Index votca::csg::Topology::getBeadTypeId | ( | std::string | type | ) | const |
Given a bead type this method returns the id associated with the type.
[in] | type | string name of the type |
Definition at line 133 of file topology.cc.
|
inline |
Return the boundary condition object.
Definition at line 303 of file topology.h.
|
inline |
|
inline |
Definition at line 394 of file topology.h.
pbc correct distance of two beads
bead1 | index of first bead |
bead2 | index of second bead |
calculates the smallest distance between two beads with correct treatment of pbc
Definition at line 243 of file topology.cc.
|
inline |
|
inline |
Definition at line 392 of file topology.h.
Definition at line 231 of file topology.h.
Definition at line 232 of file topology.h.
|
inline |
Gets the particle group.
Definition at line 343 of file topology.h.
Definition at line 229 of file topology.h.
Definition at line 230 of file topology.h.
|
inline |
|
inline |
get the time of current frame
Definition at line 317 of file topology.h.
|
inline |
Definition at line 402 of file topology.h.
|
inline |
Definition at line 399 of file topology.h.
|
inline |
Definition at line 475 of file topology.h.
std::vector< Interaction * > votca::csg::Topology::InteractionsInGroup | ( | const std::string & | group | ) |
Definition at line 201 of file topology.cc.
get molecule by index
index | molecule number |
Definition at line 470 of file topology.h.
|
inline |
number of molecules in the system
Definition at line 144 of file topology.h.
|
inline |
access containter with all molecules
Definition at line 182 of file topology.h.
|
inline |
Definition at line 183 of file topology.h.
void votca::csg::Topology::RebuildExclusions | ( | ) |
rebuild exclusion list
Definition at line 250 of file topology.cc.
void votca::csg::Topology::RegisterBeadType | ( | std::string | type | ) |
Register the bead type with the topology object.
Records are kept of the different bead types in the topology object. This method stores the bead type.
Definition at line 214 of file topology.cc.
void votca::csg::Topology::RenameBeadType | ( | std::string | name, |
std::string | newname ) |
rename all the bead types
name | current rame of the bead type |
newname | new name of bead type |
Definition at line 150 of file topology.cc.
void votca::csg::Topology::RenameMolecules | ( | std::string | range, |
std::string | name ) |
rename all the molecules in range
range | range string of type 1:2:10 = 1, 3, 5, 7, ... |
name | new name of molecule range is a string which is parsed by RangeParser, |
Definition at line 138 of file topology.cc.
|
inline |
number of residues in the system
Definition at line 156 of file topology.h.
|
inline |
access containter with all residues
Definition at line 175 of file topology.h.
|
inline |
Definition at line 176 of file topology.h.
void votca::csg::Topology::SetBeadTypeMass | ( | std::string | name, |
double | value ) |
set the mass of all the beads of a certain type
name | the bead type |
value | mass value |
Definition at line 160 of file topology.cc.
|
inline |
set the simulation box
box | triclinic box matrix |
boxtype | type of the box (triclinic, orthorhombic, open) |
Definition at line 272 of file topology.h.
|
inline |
Definition at line 403 of file topology.h.
|
inline |
Definition at line 400 of file topology.h.
|
inline |
Sets the particle group. (For the H5MD file format)
particle_group | The name of a particle group. |
Definition at line 335 of file topology.h.
|
inline |
set the step number of current frame
s | step number |
Definition at line 323 of file topology.h.
|
inline |
set the time of current frame
t | simulation time in ns |
Definition at line 311 of file topology.h.
double votca::csg::Topology::ShortestBoxSize | ( | ) | const |
return the shortest box size
Calculates the shortest length to connect two sides of the box
Definition at line 268 of file topology.cc.
|
protected |
Definition at line 406 of file topology.h.
|
protected |
beads in the topology
Definition at line 415 of file topology.h.
|
protected |
bead types in the topology
Definition at line 412 of file topology.h.
|
protected |
Definition at line 426 of file topology.h.
|
protected |
Definition at line 435 of file topology.h.
|
protected |
Definition at line 434 of file topology.h.
|
protected |
Definition at line 428 of file topology.h.
|
protected |
bonded interactions in the topology
Definition at line 424 of file topology.h.
|
protected |
Definition at line 430 of file topology.h.
|
protected |
molecules in the topology
Definition at line 418 of file topology.h.
|
protected |
The particle group (For H5MD file format)
Definition at line 438 of file topology.h.
|
protected |
residues in the topology
Definition at line 421 of file topology.h.
|
protected |
Definition at line 433 of file topology.h.
|
protected |
Definition at line 432 of file topology.h.