eOn client
Long-timescale dynamics: aKMC, NEB, parallel replica
☾
Toggle main menu visibility
Loading...
Searching...
No Matches
NEBProjection.cpp
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
#include "
eon/NEBProjection.h
"
13
#include "
eon/NEBForceProjection.h
"
14
15
namespace
eonc::neb
{
16
17
AtomMatrix
PlainEB::project
(
const
ImageForceData
&d)
const
{
18
return
d.
springResult
.
forceSpring
+ d.
force
;
19
}
20
21
AtomMatrix
NEB_Projection::project
(
const
ImageForceData
&d)
const
{
22
AtomMatrix
fPerp =
eonc::neb::forcePerp
(d.
force
, d.
tangent
);
23
return
d.
springResult
.
forceSpringPar
+ fPerp;
24
}
25
26
AtomMatrix
DNEB_Projection::project
(
const
ImageForceData
&d)
const
{
27
AtomMatrix
fPerp =
eonc::neb::forcePerp
(d.
force
, d.
tangent
);
28
AtomMatrix
forceDNEB =
29
computeDNEBComponent
(d.
springResult
.
forceSpring
, d.
tangent
, fPerp);
30
return
d.
springResult
.
forceSpringPar
+ fPerp + forceDNEB;
31
}
32
33
ProjectionStrategy
buildProjectionStrategy
(
const
Parameters
¶ms) {
34
bool
omActive = params.
neb_options
.
spring
.
om
.
enabled
;
35
bool
weightedActive = params.
neb_options
.
spring
.
weighting
.
enabled
;
36
37
if
(params.
neb_options
.
spring
.
use_elastic_band
&& !omActive &&
38
!weightedActive) {
39
return
PlainEB
{};
40
}
41
if
(params.
neb_options
.
spring
.
doubly_nudged
&& !omActive && !weightedActive) {
42
return
DNEB_Projection
{};
43
}
44
return
NEB_Projection
{};
45
}
46
47
AtomMatrix
computeDNEBComponent
(
const
AtomMatrix
&forceSpring,
48
const
AtomMatrix
&tangent,
49
const
AtomMatrix
&fPerp) {
50
return
eonc::neb::computeDNEB
(forceSpring, tangent, fPerp);
51
}
52
53
}
// namespace eonc::neb
AtomMatrix
Eigen::Matrix< double, Eigen::Dynamic, 3, eOnStorageOrder > AtomMatrix
Definition
Eigen.h:37
NEBForceProjection.h
NEBProjection.h
eonc::Parameters
Definition
Parameters.h:28
eonc::Parameters::neb_options
struct eonc::Parameters::neb_options_t neb_options
eonc::neb
Definition
NEBForceProjection.cpp:18
eonc::neb::buildProjectionStrategy
ProjectionStrategy buildProjectionStrategy(const Parameters ¶ms)
Build the projection strategy from parameters.
Definition
NEBProjection.cpp:33
eonc::neb::ProjectionStrategy
std::variant< PlainEB, NEB_Projection, DNEB_Projection > ProjectionStrategy
Definition
NEBProjection.h:49
eonc::neb::computeDNEBComponent
AtomMatrix computeDNEBComponent(const AtomMatrix &forceSpring, const AtomMatrix &tangent, const AtomMatrix &fPerp)
Compute the DNEB force component for a given image.
Definition
NEBProjection.cpp:47
eonc::neb::forcePerp
AtomMatrix forcePerp(const AtomMatrix &force, const AtomMatrix &tangent)
Compute the perpendicular component of force relative to the tangent.
Definition
NEBForceProjection.cpp:69
eonc::neb::computeDNEB
AtomMatrix computeDNEB(const AtomMatrix &forceSpring, const AtomMatrix &tangent, const AtomMatrix &fPerp)
Compute the doubly-nudged elastic band perpendicular spring force.
Definition
NEBForceProjection.cpp:79
eonc::Parameters::neb_options_t::spring_options_t::energy_weighting_t::enabled
bool enabled
Definition
Parameters.h:485
eonc::Parameters::neb_options_t::spring_options_t::onsager_machlup_t::enabled
bool enabled
Definition
Parameters.h:491
eonc::Parameters::neb_options_t::spring_options_t::use_elastic_band
bool use_elastic_band
Definition
Parameters.h:480
eonc::Parameters::neb_options_t::spring_options_t::om
struct eonc::Parameters::neb_options_t::spring_options_t::onsager_machlup_t om
eonc::Parameters::neb_options_t::spring_options_t::weighting
struct eonc::Parameters::neb_options_t::spring_options_t::energy_weighting_t weighting
eonc::Parameters::neb_options_t::spring_options_t::doubly_nudged
bool doubly_nudged
Definition
Parameters.h:481
eonc::Parameters::neb_options_t::spring
struct eonc::Parameters::neb_options_t::spring_options_t spring
eonc::neb::DNEB_Projection
Trygubenko & Wales, JCP 120:2082, 2004.
Definition
NEBProjection.h:45
eonc::neb::DNEB_Projection::project
AtomMatrix project(const ImageForceData &d) const
Definition
NEBProjection.cpp:26
eonc::neb::ImageForceData
Data for a single image needed by projection strategies.
Definition
NEBProjection.h:22
eonc::neb::ImageForceData::tangent
const AtomMatrix & tangent
Definition
NEBProjection.h:24
eonc::neb::ImageForceData::springResult
const SpringResult & springResult
Definition
NEBProjection.h:25
eonc::neb::ImageForceData::force
const AtomMatrix & force
Definition
NEBProjection.h:23
eonc::neb::NEB_Projection
Jonsson, Mills, Jacobsen 1998 (World Scientific).
Definition
NEBProjection.h:38
eonc::neb::NEB_Projection::project
AtomMatrix project(const ImageForceData &d) const
Definition
NEBProjection.cpp:21
eonc::neb::PlainEB
Mills, Jonsson, Schenter, Surf.
Definition
NEBProjection.h:32
eonc::neb::PlainEB::project
AtomMatrix project(const ImageForceData &d) const
Definition
NEBProjection.cpp:17
eonc::neb::SpringResult::forceSpringPar
AtomMatrix forceSpringPar
Definition
NEBSpringForce.h:25
eonc::neb::SpringResult::forceSpring
AtomMatrix forceSpring
Definition
NEBSpringForce.h:26
client
NEBProjection.cpp
Generated by
1.17.0
Generated by
Doxygen 1.17.0
Analytics by
Antics
provided by
TurtleTech ehf