Loading...
Searching...
No Matches
Lanczos.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 "EonLogger.h"
15
16#include "LowestEigenmode.h"
17#include "Matter.h"
18#include "Parameters.h"
19
20namespace eonc {
21
22// Lanczos method to find the lowest curvature mode.
23// Default Krylov space = all free atoms ([Lanczos] phva_atoms = All).
24// Optional mobile list (or phva_atoms) is the PHVA active set: free/fixed is
25// the optimizer mask and is not redefined.
26class Lanczos : public LowestEigenmode {
27
28public:
29 Lanczos(std::shared_ptr<Matter> matter, const Parameters &params,
30 std::shared_ptr<Potential> pot);
31 ~Lanczos() = default;
32 void compute(std::shared_ptr<Matter> matter, AtomMatrix initialDirection);
35 void compute(std::shared_ptr<Matter> matter, AtomMatrix initialDirection,
36 const VectorXi &mobileAtoms);
37 double getEigenvalue();
39
40private:
42 double lowestEw;
44};
45
46} // namespace eonc
47
48using eonc::Lanczos;
Eigen::Matrix< double, Eigen::Dynamic, 3, eOnStorageOrder > AtomMatrix
Definition Eigen.h:37
~Lanczos()=default
void compute(std::shared_ptr< Matter > matter, AtomMatrix initialDirection)
Definition Lanczos.cpp:40
double getEigenvalue()
Definition Lanczos.cpp:175
AtomMatrix lowestEv
Definition Lanczos.h:41
Lanczos(std::shared_ptr< Matter > matter, const Parameters &params, std::shared_ptr< Potential > pot)
Definition Lanczos.cpp:32
double lowestEw
Definition Lanczos.h:42
AtomMatrix getEigenvector()
Definition Lanczos.cpp:177
eonc::log::Scoped log
Definition Lanczos.h:43
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.
RAII helper for class-scoped logging.
Definition EonLogger.h:171