votca 2024.2-dev
Loading...
Searching...
No Matches
map.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_MAP_H
19#define VOTCA_CSG_MAP_H
20#pragma once
21
22// Standard includes
23#include <memory>
24#include <vector>
25
26// VOTCA includes
27#include <votca/tools/eigen.h>
29
30// Local VOTCA includes
31#include "boundarycondition.h"
32#include "molecule.h"
33
34namespace votca {
35namespace csg {
36
38
39/*******************************************************
40 Interface for all maps
41*******************************************************/
42class BeadMap {
43 public:
44 BeadMap() = default;
45 virtual ~BeadMap() = default;
46 virtual void Apply(const BoundaryCondition &) = 0;
47 virtual void Initialize(const Molecule *in, Bead *out,
48 tools::Property *opts_bead,
49 tools::Property *opts_map) = 0;
50
51 protected:
52 const Molecule *in_;
56};
57
58/*******************************************************
59 Mapper class, collection of maps
60*******************************************************/
61class Map {
62 public:
63 Map(const Molecule &in, Molecule &out) : in_(in), out_(out) {}
64 // Move constructor
65 Map(Map &&map);
66 // Move assignment
67 Map &operator=(Map &&map);
69
70 // void AddBeadMap(BeadMap *bmap) { maps_.push_back(bmap); }
71
72 void Apply(const BoundaryCondition &bc);
73
74 protected:
77 std::vector<std::unique_ptr<BeadMap>> maps_;
78};
79
80} // namespace csg
81} // namespace votca
82
83#endif // VOTCA_CSG_MAP_H
virtual void Initialize(const Molecule *in, Bead *out, tools::Property *opts_bead, tools::Property *opts_map)=0
tools::Property * opts_map_
Definition map.h:54
Bead * out_
Definition map.h:53
const Molecule * in_
Definition map.h:52
tools::Property * opts_bead_
Definition map.h:55
virtual ~BeadMap()=default
virtual void Apply(const BoundaryCondition &)=0
information about a bead
Definition bead.h:50
Class keeps track of how the boundaries of the system are handled.
void Apply(const BoundaryCondition &bc)
Definition map.cc:85
BeadMap * CreateBeadMap(const BeadMapType type)
Definition map.cc:410
Map & operator=(Map &&map)
Definition map.cc:403
Molecule out_
Definition map.h:76
Molecule in_
Definition map.h:75
Map(const Molecule &in, Molecule &out)
Definition map.h:63
std::vector< std::unique_ptr< BeadMap > > maps_
Definition map.h:77
information about molecules
Definition molecule.h:45
class to manage program options with xml serialization functionality
Definition property.h:55
BeadMapType
Definition map.h:37
base class for all analysis tools
Definition basebead.h:33