votca 2024.2-dev
Loading...
Searching...
No Matches
molpol.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_MOLPOL_H
22#define VOTCA_XTP_MOLPOL_H
23
24// Standard includes
25#include <cstdio>
26
27// Local VOTCA includes
29#include "votca/xtp/logger.h"
30#include "votca/xtp/qmtool.h"
31
32namespace votca {
33namespace xtp {
34class PolarRegion;
35class MolPol final : public QMTool {
36 public:
37 MolPol() : input_("", 0) {};
38
39 ~MolPol() = default;
40
41 std::string Identify() const { return "molpol"; }
42
43 protected:
44 void ParseOptions(const tools::Property& user_options);
45 bool Run();
46
47 private:
48 void Printpolarization(const Eigen::Matrix3d& result) const;
49
50 Eigen::Matrix3d CalcClassicalPol(const PolarSegment& input) const;
51 Eigen::Vector3d CalcInducedDipole(const PolarSegment& input,
52 const Eigen::Vector3d& ext_field) const;
54
55 std::string mps_output_;
57 Eigen::Matrix3d polarization_target_;
58
59 Eigen::VectorXd weights_;
60
62
63 double tolerance_pol_ = 1e-4;
65};
66
67} // namespace xtp
68} // namespace votca
69
70#endif // VOTCA_XTP_MOLPOL_H
class to manage program options with xml serialization functionality
Definition property.h:55
Logger is used for thread-safe output of messages.
Definition logger.h:164
void Printpolarization(const Eigen::Matrix3d &result) const
Definition molpol.cc:143
std::string mps_output_
Definition molpol.h:55
tools::Property polar_options_
Definition molpol.h:61
std::string Identify() const
Calculator name.
Definition molpol.h:41
void ParseOptions(const tools::Property &user_options)
Definition molpol.cc:31
PolarSegment input_
Definition molpol.h:56
Eigen::VectorXd weights_
Definition molpol.h:59
Eigen::Matrix3d CalcClassicalPol(const PolarSegment &input) const
Definition molpol.cc:121
double tolerance_pol_
Definition molpol.h:63
Eigen::Vector3d CalcInducedDipole(const PolarSegment &input, const Eigen::Vector3d &ext_field) const
Definition molpol.cc:93
Eigen::Matrix3d polarization_target_
Definition molpol.h:57
base class for all analysis tools
Definition basebead.h:33
Eigen::Index Index
Definition types.h:26