votca 2024-dev
Loading...
Searching...
No Matches
classicalsegment.h
Go to the documentation of this file.
1/*
2 * Copyright 2009-2020 The VOTCA Development Team
3 * (http://www.votca.org)
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License")
6 *
7 * You may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 *
18 */
19
20#pragma once
21#ifndef VOTCA_XTP_CLASSICALSEGMENT_H
22#define VOTCA_XTP_CLASSICALSEGMENT_H
23
24// Local VOTCA includes
25#include "atomcontainer.h"
26#include "polarsite.h"
27#include "staticsite.h"
28
29namespace votca {
30namespace xtp {
31template <class T>
33 public:
34 ClassicalSegment(std::string name, Index id) : AtomContainer<T>(name, id){};
35
37
38 void LoadFromFile(std::string filename);
39
40 void WriteMPS(std::string filename, std::string header) const;
41
42 double CalcTotalQ() const;
43
44 std::string identify() const;
45
46 Eigen::Vector3d CalcDipole() const;
47
48 friend std::ostream& operator<<(std::ostream& out,
49 const ClassicalSegment<T>& container) {
50 out << container.getId() << " " << container.identify() << " "
51 << container.getType() << "\n";
52 for (const T& atom : container) {
53 out << atom;
54 }
55 out << std::endl;
56 return out;
57 }
58};
59
62
63} // namespace xtp
64} // namespace votca
65
66#endif // VOTCA_XTP_CLASSICALSEGMENT_H
const std::string & getType() const
ClassicalSegment(CheckpointReader &r)
ClassicalSegment(std::string name, Index id)
friend std::ostream & operator<<(std::ostream &out, const ClassicalSegment< T > &container)
void LoadFromFile(std::string filename)
Eigen::Vector3d CalcDipole() const
void WriteMPS(std::string filename, std::string header) const
base class for all analysis tools
Definition basebead.h:33
Eigen::Index Index
Definition types.h:26