votca 2024.2-dev
Loading...
Searching...
No Matches
cgmoleculedef.h
Go to the documentation of this file.
1/*
2 * Copyright 2009-2021 The VOTCA Development Team (http://www.votca.org)
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *
16 */
17
18#ifndef VOTCA_CSG_CGMOLECULEDEF_H
19#define VOTCA_CSG_CGMOLECULEDEF_H
20
21// Standard includes
22#include <list>
23#include <map>
24#include <memory>
25#include <string>
26#include <vector>
27
28// VOTCA includes
30#include <votca/tools/types.h>
31
32// Local VOTCA includes
33#include "exclusionlist.h"
34#include "map.h"
35#include "molecule.h"
36
37namespace votca {
38namespace csg {
39
50 public:
51 CGMoleculeDef() = default;
53
55 Map CreateMap(const Molecule &in, Molecule &out);
56
57 void Load(std::string filename);
58
59 const std::string &getName() { return name_; }
60 const std::string &getIdent() { return ident_; }
61
62 private:
64
65 struct beaddef_t {
66 std::string name_;
67 std::string type_;
69 std::string mapping_;
70 std::vector<std::string> subbeads_;
72 };
73
74 // name of the coarse grained molecule
75 std::string name_;
76 // name of the molecule to coarse grain
77 std::string ident_;
78
79 // beads of the cg molecule
80 std::vector<beaddef_t *> beads_;
81 std::map<std::string, beaddef_t *> beads_by_name_;
82
83 // mapping schemes
84 std::map<std::string, tools::Property *> maps_;
85
86 std::vector<tools::Property *> bonded_;
87
88 void ParseTopology(tools::Property &options);
89 void ParseBeads(tools::Property &options);
90 void ParseBonded(tools::Property &options);
91 void ParseMapping(tools::Property &options);
92
93 beaddef_t *getBeadByName(const std::string &name);
94 tools::Property *getMapByName(const std::string &name);
95};
96
97} // namespace csg
98} // namespace votca
99
100#endif // VOTCA_CSG_CGMOLECULEDEF_H
Symmetry
get the symmetry of the bead
Definition bead.h:85
definition of a coarse grained molecule
const std::string & getIdent()
void ParseMapping(tools::Property &options)
std::map< std::string, tools::Property * > maps_
Map CreateMap(const Molecule &in, Molecule &out)
std::vector< beaddef_t * > beads_
void Load(std::string filename)
std::map< std::string, beaddef_t * > beads_by_name_
beaddef_t * getBeadByName(const std::string &name)
std::vector< tools::Property * > bonded_
Molecule * CreateMolecule(Topology &top)
const std::string & getName()
tools::Property * getMapByName(const std::string &name)
void ParseBonded(tools::Property &options)
void ParseTopology(tools::Property &options)
void ParseBeads(tools::Property &options)
information about molecules
Definition molecule.h:45
topology of the whole system
Definition topology.h:81
class to manage program options with xml serialization functionality
Definition property.h:55
base class for all analysis tools
Definition basebead.h:33
std::vector< std::string > subbeads_