Loading...
Searching...
No Matches
SolidStateNEB.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
14#include <span>
15#include <vector>
16
17#include "Eigen.h"
18#include "Matter.h"
19
20#include <vector>
21
22namespace eonc::neb {
23
26double solidStateJacobian(double meanVolume, int nAtoms, double weight);
27
32bool orientCellLowerTriangular(Matrix3d &cell, AtomMatrix &positions);
33
34void orientSolidStateMatter(Matter &image);
35
38void interpolateSolidStateLinear(std::vector<Matter> &images);
39
40struct JointBlock {
42 Matrix3d cell{Matrix3d::Zero()};
43};
44
49JointBlock jointDisplacement(const Matter &from, const Matter &to,
50 double jacobian);
51
52double jointNorm(const JointBlock &block);
53
58Matrix3d cellNebForce(const Matrix3d &cauchy, double volume, double jacobian,
59 const Matrix3d &externalStress);
60
63Matrix3d finiteDifferenceCauchyStress(const Matter &image, double strainStep);
64
68std::vector<Matrix3d>
69finiteDifferenceCauchyStresses(std::span<const Matter *const> images,
70 double strainStep);
71
74double solidStateEnthalpy(const Matter &image, const Matter &reference,
75 double pressure);
76
82 Matrix3d cell{Matrix3d::Zero()};
83};
84
85CartesianStep solidStateCartesianStep(const Matter &image,
86 const AtomMatrix &atomicForce,
87 const Matrix3d &cellForce,
88 double jacobian);
89
90} // namespace eonc::neb
Eigen::Matrix< double, 3, 3, eOnStorageOrder > Matrix3d
Definition Eigen.h:35
Eigen::Matrix< double, Eigen::Dynamic, 3, eOnStorageOrder > AtomMatrix
Definition Eigen.h:37
bool orientCellLowerTriangular(Matrix3d &cell, AtomMatrix &positions)
Rotate the lab frame so the cell is lower triangular: the first lattice vector lies on x and the seco...
void interpolateSolidStateLinear(std::vector< Matter > &images)
Replace interior images by a fractional linear interpolation of the oriented endpoints.
CartesianStep solidStateCartesianStep(const Matter &image, const AtomMatrix &atomicForce, const Matrix3d &cellForce, double jacobian)
double jointNorm(const JointBlock &block)
std::vector< Matrix3d > finiteDifferenceCauchyStresses(std::span< const Matter *const > images, double strainStep)
The same central difference for several images at once.
JointBlock jointDisplacement(const Matter &from, const Matter &to, double jacobian)
Displacement of to relative to from in the joint metric.
double solidStateEnthalpy(const Matter &image, const Matter &reference, double pressure)
Potential energy plus P : (h0^{-1} (h-h0)) * V0.
double solidStateJacobian(double meanVolume, int nAtoms, double weight)
J = (V/N)^{1/3} * N^{1/2} * weight, with V the mean endpoint volume.
void orientSolidStateMatter(Matter &image)
Matrix3d finiteDifferenceCauchyStress(const Matter &image, double strainStep)
Central difference of the potential energy on the six lower strain components.
Matrix3d cellNebForce(const Matrix3d &cauchy, double volume, double jacobian, const Matrix3d &externalStress)
NEB force on the Jacobian-scaled strain.
One steepest step in Cartesian coordinates and the cell matrix.