Loading...
Searching...
No Matches
AtomicGPDimer.h
Go to the documentation of this file.
1/*
2** This file is part of eOn.
3**
4** SPDX-License-Identifier: BSD-3-Clause
5**
6** Copyright (c) 2010--present, eOn Development Team
7** All rights reserved.
8**
9** Repo:
10** https://github.com/TheochemUI/eOn
11*/
12#pragma once
13#include "Eigen.h"
14#include "LowestEigenmode.h"
15#include "Matter.h"
16#include "Parameters.h"
17#include <vector>
18
19// Defined in the gpr_optim target
20#include "subprojects/gpr_optim/gpr/AtomicDimer.h"
21#include "subprojects/gpr_optim/gpr/auxiliary/ProblemSetUp.h"
22
23namespace eonc {
24
25// dimer method to find the lowest curvature mode
27
28public:
29 // Optimization for the dimer
30 static const char OPT_SCG[];
31 static const char OPT_LBFGS[];
32
33 AtomicGPDimer(std::shared_ptr<Matter> matter, const Parameters &params,
34 std::shared_ptr<Potential> pot);
35 ~AtomicGPDimer() = default;
36
37 void compute(std::shared_ptr<Matter> matter,
38 AtomMatrix initialDirection) override;
39 double getEigenvalue() override;
40 AtomMatrix getEigenvector() override;
41
42 // Cell forwarded to potential force calls. Zero unless Matter is periodic.
43 [[nodiscard]] Matrix3d forceBox() const;
44
45private:
46 std::shared_ptr<Matter> matterCenter; // initial center of the dimer
47 AtomMatrix direction; // direction along the dimer
48 AtomMatrix rotationalPlane; // direction normal to the plane of dimer rotation
49
50 gpr::InputParameters p;
51 atmd::AtomicDimer atomic_dimer;
52 aux::ProblemSetUp problem_setup;
53 gpr::AtomsConfiguration atoms_config;
55 gpr::Coord orient_init, R_init;
56};
57
58} // namespace eonc
Eigen::Matrix< double, 3, 3, eOnStorageOrder > Matrix3d
Definition Eigen.h:35
Eigen::Matrix< double, Eigen::Dynamic, 3, eOnStorageOrder > AtomMatrix
Definition Eigen.h:37
gpr::AtomsConfiguration atoms_config
AtomMatrix rotationalPlane
double getEigenvalue() override
gpr::Observation init_observations
AtomMatrix getEigenvector() override
std::shared_ptr< Matter > matterCenter
static const char OPT_SCG[]
Matrix3d forceBox() const
gpr::InputParameters p
~AtomicGPDimer()=default
gpr::Observation init_middle_point
void compute(std::shared_ptr< Matter > matter, AtomMatrix initialDirection) override
AtomicGPDimer(std::shared_ptr< Matter > matter, const Parameters &params, std::shared_ptr< Potential > pot)
atmd::AtomicDimer atomic_dimer
static const char OPT_LBFGS[]
aux::ProblemSetUp problem_setup
const Parameters & params
std::shared_ptr< Potential > pot
LowestEigenmode(std::shared_ptr< Potential > potPassed, const Parameters &parameters)
RAII resource manager for the ARTn C library with global synchronization.