GQCP
Loading...
Searching...
No Matches
NuclearFramework.hpp
Go to the documentation of this file.
1// This file is part of GQCG-GQCP.
2//
3// Copyright (C) 2017-2020 the GQCG developers
4//
5// GQCG-GQCP is free software: you can redistribute it and/or modify
6// it under the terms of the GNU Lesser General Public License as published by
7// the Free Software Foundation, either version 3 of the License, or
8// (at your option) any later version.
9//
10// GQCG-GQCP is distributed in the hope that it will be useful,
11// but WITHOUT ANY WARRANTY; without even the implied warranty of
12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13// GNU Lesser General Public License for more details.
14//
15// You should have received a copy of the GNU Lesser General Public License
16// along with GQCG-GQCP. If not, see <http://www.gnu.org/licenses/>.
17
18#pragma once
19
20
22#include "Molecule/Nucleus.hpp"
23
24#include <vector>
25
26
27namespace GQCP {
28
29
36private:
37 std::vector<Nucleus> nuclei; // coordinates in bohr
38
39
40public:
41 // CONSTRUCTORS
42
46 NuclearFramework(const std::vector<Nucleus>& nuclei);
47
48
49 // NAMED CONSTRUCTORS
50
58 static NuclearFramework HChain(const size_t n, const double spacing, const CartesianDirection axis = CartesianDirection::z);
59
68 static NuclearFramework H2Chain(const size_t n, const double a, const double b, const CartesianDirection axis = CartesianDirection::z);
69
70
77 static NuclearFramework HRingFromDistance(const size_t n, const double distance);
78
85 static NuclearFramework HRingFromRadius(const size_t n, const double radius);
86
92 static NuclearFramework ReadXYZ(const std::string& xyz_filename);
93
94
95 // OPERATORS
96
103 friend std::ostream& operator<<(std::ostream& os, const NuclearFramework& nuclear_framework);
104
105
106 // PUBLIC METHODS
107
114 double calculateInternuclearDistanceBetween(const size_t index1, const size_t index2) const;
115
119 std::string description() const {
120
121 std::string framework_string;
122
123 for (const auto& nucleus : this->nucleiAsVector()) {
124 framework_string += nucleus.description();
125 }
126
127 return framework_string;
128 }
129
133 const std::vector<Nucleus>& nucleiAsVector() const { return this->nuclei; }
134
138 size_t numberOfNuclei() const { return this->nucleiAsVector().size(); }
139
143 size_t totalNucleicCharge() const;
144};
145
146
147} // namespace GQCP
Definition: NuclearFramework.hpp:35
static NuclearFramework ReadXYZ(const std::string &xyz_filename)
Definition: NuclearFramework.cpp:189
std::string description() const
Definition: NuclearFramework.hpp:119
static NuclearFramework HRingFromDistance(const size_t n, const double distance)
Definition: NuclearFramework.cpp:141
const std::vector< Nucleus > & nucleiAsVector() const
Definition: NuclearFramework.hpp:133
size_t numberOfNuclei() const
Definition: NuclearFramework.hpp:138
static NuclearFramework HChain(const size_t n, const double spacing, const CartesianDirection axis=CartesianDirection::z)
Definition: NuclearFramework.cpp:66
static NuclearFramework H2Chain(const size_t n, const double a, const double b, const CartesianDirection axis=CartesianDirection::z)
Definition: NuclearFramework.cpp:101
static NuclearFramework HRingFromRadius(const size_t n, const double radius)
Definition: NuclearFramework.cpp:157
friend std::ostream & operator<<(std::ostream &os, const NuclearFramework &nuclear_framework)
Definition: NuclearFramework.cpp:245
size_t totalNucleicCharge() const
Definition: NuclearFramework.cpp:277
double calculateInternuclearDistanceBetween(const size_t index1, const size_t index2) const
Definition: NuclearFramework.cpp:263
Definition: BaseOneElectronIntegralBuffer.hpp:25
CartesianDirection
Definition: CartesianDirection.hpp:27
@ z
Definition: CartesianDirection.hpp:30