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,
33 AtomMatrix initialDirection) override;
36 void compute(std::shared_ptr<Matter> matter, AtomMatrix initialDirection,
37 const VectorXi &mobileAtoms);
38 double getEigenvalue() override;
39 AtomMatrix getEigenvector() override;
40
41private:
43 double lowestEw{0.0};
45};
46
47} // namespace eonc
Eigen::Matrix< double, Eigen::Dynamic, 3, eOnStorageOrder > AtomMatrix
Definition Eigen.h:37
~Lanczos()=default
Lanczos(std::shared_ptr< Matter > matter, const Parameters &params, std::shared_ptr< Potential > pot)
Definition Lanczos.cpp:36
AtomMatrix lowestEv
Definition Lanczos.h:42
double lowestEw
Definition Lanczos.h:43
AtomMatrix getEigenvector() override
Definition Lanczos.cpp:193
double getEigenvalue() override
Definition Lanczos.cpp:191
void compute(std::shared_ptr< Matter > matter, AtomMatrix initialDirection) override
Definition Lanczos.cpp:44
eonc::log::Scoped log
Definition Lanczos.h:44
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