18#ifndef VOTCA_CSG_TOPOLOGY_H
19#define VOTCA_CSG_TOPOLOGY_H
26#include <unordered_map>
30#include <boost/container/deque.hpp>
59typedef boost::container::deque_options<
61typedef boost::container::deque_options<
62 boost::container::block_size<
sizeof(
Molecule) * 4>>::type
64typedef boost::container::deque_options<
68 boost::container::deque<Molecule, void, block_molecule_4x_t>;
69using BeadContainer = boost::container::deque<Bead, void, block_bead_x4_t>;
71 boost::container::deque<Residue, void, block_residue_x4_t>;
106 Index resnr,
double m,
double q);
281 bc_ = std::make_unique<TriclinicBox>();
284 bc_ = std::make_unique<OrthorhombicBox>();
287 bc_ = std::make_unique<OpenBox>();
298 const Eigen::Matrix3d &
getBox()
const {
return bc_->getBox(); };
304 assert(
bc_ &&
"Cannot return boundary condition is null");
366 const Eigen::Vector3d &r_j)
const;
396 template <
typename iteratable>
406 std::unique_ptr<BoundaryCondition>
bc_;
409 const Eigen::Matrix3d &box)
const;
442 std::string type,
Index resnr,
double m,
474template <
typename iteratable>
Symmetry
get the symmetry of the bead
Class keeps track of how the boundaries of the system are handled.
void InsertExclusion(Bead *bead, iterable &excluded)
base class for all interactions
information about molecules
topology of the whole system
const BoundaryCondition & getBoundary() const
Return the boundary condition object.
BoundaryCondition::eBoxtype getBoxType() const
Residue & CreateResidue(std::string name)
Create a new resiude.
BoundaryCondition::eBoxtype autoDetectBoxType(const Eigen::Matrix3d &box) const
void setBox(const Eigen::Matrix3d &box, BoundaryCondition::eBoxtype boxtype=BoundaryCondition::typeAuto)
void Cleanup()
Cleans up all the stored data.
std::unordered_map< std::string, Index > beadtypes_
bead types in the topology
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
void RenameMolecules(std::string range, std::string name)
rename all the molecules in range
Index getBeadTypeId(std::string type) const
Given a bead type this method returns the id associated with the type.
std::vector< Interaction * > InteractionsInGroup(const std::string &group)
const Bead * getBead(const Index i) const
void RenameBeadType(std::string name, std::string newname)
rename all the bead types
Index ResidueCount() const
bool BeadTypeExist(std::string type) const
Determine if a bead type exists.
MoleculeContainer molecules_
molecules in the topology
std::map< std::string, Index > interaction_groups_
double ShortestBoxSize() const
return the shortest box size
const Eigen::Matrix3d & getBox() const
Bead * CreateBead(Bead::Symmetry symmetry, std::string name, std::string type, Index resnr, double m, double q)
Creates a new Bead.
void SetHasVel(const bool v)
std::string particle_group_
The particle group (For H5MD file format)
const MoleculeContainer & Molecules() const
const InteractionContainer & BondedInteractions() const
ExclusionList exclusions_
InteractionContainer interactions_
bonded interactions in the topology
void SetHasForce(const bool v)
void AddBondedInteraction(Interaction *ic)
Molecule * getMolecule(const Index i)
ExclusionList & getExclusions()
void RegisterBeadType(std::string type)
Register the bead type with the topology object.
void SetBeadTypeMass(std::string name, double value)
set the mass of all the beads of a certain type
Molecule * CreateMolecule(std::string name)
Creates a new molecule.
Molecule * MoleculeByIndex(Index index)
const ExclusionList & getExclusions() const
const ResidueContainer & Residues() const
std::string getParticleGroup() const
std::unique_ptr< BoundaryCondition > bc_
void CheckMoleculeNaming(void)
checks weather molecules with the same name really contain the same number of beads
Eigen::Vector3d getDist(Index bead1, Index bead2) const
pbc correct distance of two beads
Residue & getResidue(const Index i)
Eigen::Vector3d BCShortestConnection(const Eigen::Vector3d &r_i, const Eigen::Vector3d &r_j) const
calculate shortest vector connecting two points
const Residue & getResidue(const Index i) const
Bead * getBead(const Index i)
Returns a pointer to the bead with index i.
std::map< std::string, std::vector< Interaction * > > interactions_by_group_
const Molecule * getMolecule(const Index i) const
BeadContainer beads_
beads in the topology
void CopyTopologyData(Topology *top)
copy topology data of different topology
void InsertExclusion(Bead *bead1, iteratable &l)
MoleculeContainer & Molecules()
ResidueContainer & Residues()
InteractionContainer & BondedInteractions()
ResidueContainer residues_
residues in the topology
void setParticleGroup(std::string particle_group)
boost::container::deque_options< boost::container::block_size< sizeof(Residue) *4 > >::type block_residue_x4_t
boost::container::deque< Molecule, void, block_molecule_4x_t > MoleculeContainer
boost::container::deque< Bead, void, block_bead_x4_t > BeadContainer
std::vector< Interaction * > InteractionContainer
boost::container::deque_options< boost::container::block_size< sizeof(Bead) *4 > >::type block_bead_x4_t
boost::container::deque_options< boost::container::block_size< sizeof(Molecule) *4 > >::type block_molecule_4x_t
boost::container::deque< Residue, void, block_residue_x4_t > ResidueContainer
base class for all analysis tools