diff --git a/src/surface_forces/SurfaceForce.cpp b/src/surface_forces/SurfaceForce.cpp index a61fd1de6..ce3e78376 100644 --- a/src/surface_forces/SurfaceForce.cpp +++ b/src/surface_forces/SurfaceForce.cpp @@ -444,9 +444,9 @@ Eigen::MatrixXd surface_forces(mrchem::Molecule &mol, mrchem::OrbitalVector &Phi std::vector xcStress; if (! isGGA) { if ( !xc_spin) { - xcStress = xcLDA(mrdft_p, rhoGrid); + xcStress = xcLDAStress(mrdft_p, rhoGrid); } else { - xcStress = xcLDASpin(mrdft_p, rhoGridAlpha, rhoGridBeta); + xcStress = xcLDASpinStress(mrdft_p, rhoGridAlpha, rhoGridBeta); } } else{ if ( !xc_spin) { @@ -460,7 +460,7 @@ Eigen::MatrixXd surface_forces(mrchem::Molecule &mol, mrchem::OrbitalVector &Phi nablaRhoGrid(i, 1) = nablaRho[1].real().evalf(pos); nablaRhoGrid(i, 2) = nablaRho[2].real().evalf(pos); } - xcStress = xcGGA(mrdft_p, rhoGrid, nablaRhoGrid); + xcStress = xcGGAStress(mrdft_p, rhoGrid, nablaRhoGrid); } else { mrchem::OrbitalVector nablaRhoAlpha = nabla(rhoA); mrchem::OrbitalVector nablaRhoBeta = nabla(rhoB); @@ -477,7 +477,7 @@ Eigen::MatrixXd surface_forces(mrchem::Molecule &mol, mrchem::OrbitalVector &Phi nablaRhoGridBeta(i, 1) = nablaRhoBeta[1].real().evalf(pos); nablaRhoGridBeta(i, 2) = nablaRhoBeta[2].real().evalf(pos); } - xcStress = xcGGASpin(mrdft_p, rhoGridAlpha, rhoGridBeta, nablaRhoGridAlpha, nablaRhoGridBeta); + xcStress = xcGGASpinStress(mrdft_p, rhoGridAlpha, rhoGridBeta, nablaRhoGridAlpha, nablaRhoGridBeta); } } diff --git a/src/surface_forces/xcStress.cpp b/src/surface_forces/xcStress.cpp index c455c388e..a3649dc41 100644 --- a/src/surface_forces/xcStress.cpp +++ b/src/surface_forces/xcStress.cpp @@ -6,7 +6,7 @@ using namespace Eigen; -std::vector xcLDA(std::unique_ptr &mrdft_p, Eigen::MatrixXd &rhoGrid){ +std::vector xcLDAStress(std::unique_ptr &mrdft_p, Eigen::MatrixXd &rhoGrid){ int nGrid = rhoGrid.rows(); std::vector out(nGrid); Eigen::MatrixXd xcOUT = mrdft_p->functional().evaluate_transposed(rhoGrid); @@ -19,7 +19,7 @@ std::vector xcLDA(std::unique_ptr &mrdft_p, Eigen return out; } -std::vector xcLDASpin(std::unique_ptr &mrdft_p, Eigen::MatrixXd &rhoGridAlpha, Eigen::MatrixXd &rhoGridBeta){ +std::vector xcLDASpinStress(std::unique_ptr &mrdft_p, Eigen::MatrixXd &rhoGridAlpha, Eigen::MatrixXd &rhoGridBeta){ int nGrid = rhoGridAlpha.rows(); Eigen::MatrixXd inp(rhoGridAlpha.rows(), 2); std::vector out = std::vector(nGrid); @@ -35,7 +35,7 @@ std::vector xcLDASpin(std::unique_ptr &mrdft_p, Eigen::M return out; } -std::vector xcGGA(std::unique_ptr &mrdft_p, Eigen::MatrixXd &rhoGrid, Eigen::MatrixXd &nablaRhoGrid){ +std::vector xcGGAStress(std::unique_ptr &mrdft_p, Eigen::MatrixXd &rhoGrid, Eigen::MatrixXd &nablaRhoGrid){ int nGrid = rhoGrid.rows(); Eigen::MatrixXd inp(rhoGrid.rows(), 4); inp.col(0) = rhoGrid.col(0); @@ -59,7 +59,7 @@ std::vector xcGGA(std::unique_ptr &mrdft_p, Eigen::Matri return out; } -std::vector xcGGASpin(std::unique_ptr &mrdft_p, Eigen::MatrixXd &rhoGridAlpha, Eigen::MatrixXd &rhoGridBeta, Eigen::MatrixXd &nablaRhoGridAlpha, Eigen::MatrixXd &nablaRhoGridBeta){ +std::vector xcGGASpinStress(std::unique_ptr &mrdft_p, Eigen::MatrixXd &rhoGridAlpha, Eigen::MatrixXd &rhoGridBeta, Eigen::MatrixXd &nablaRhoGridAlpha, Eigen::MatrixXd &nablaRhoGridBeta){ int nGrid = rhoGridAlpha.rows(); Eigen::MatrixXd inp(rhoGridAlpha.rows(), 8); std::vector out = std::vector(nGrid); diff --git a/src/surface_forces/xcStress.h b/src/surface_forces/xcStress.h index c8fda8bb4..3417dcfc0 100644 --- a/src/surface_forces/xcStress.h +++ b/src/surface_forces/xcStress.h @@ -7,7 +7,7 @@ #include "mrdft/MRDFT.h" #include -std::vector xcLDA(std::unique_ptr &mrdft_p, Eigen::MatrixXd &rhoGrid); -std::vector xcLDASpin(std::unique_ptr &mrdft_p, Eigen::MatrixXd &rhoGridAlpha, Eigen::MatrixXd &rhoGridBeta); -std::vector xcGGA(std::unique_ptr &mrdft_p, Eigen::MatrixXd &rhoGrid, Eigen::MatrixXd &nablaRhoGrid); -std::vector xcGGASpin(std::unique_ptr &mrdft_p, Eigen::MatrixXd &rhoGridAlpha, Eigen::MatrixXd &rhoGridBeta, Eigen::MatrixXd &nablaRhoGridAlpha, Eigen::MatrixXd &nablaRhoGridBeta); \ No newline at end of file +std::vector xcLDAStress(std::unique_ptr &mrdft_p, Eigen::MatrixXd &rhoGrid); +std::vector xcLDASpinStress(std::unique_ptr &mrdft_p, Eigen::MatrixXd &rhoGridAlpha, Eigen::MatrixXd &rhoGridBeta); +std::vector xcGGAStress(std::unique_ptr &mrdft_p, Eigen::MatrixXd &rhoGrid, Eigen::MatrixXd &nablaRhoGrid); +std::vector xcGGASpinStress(std::unique_ptr &mrdft_p, Eigen::MatrixXd &rhoGridAlpha, Eigen::MatrixXd &rhoGridBeta, Eigen::MatrixXd &nablaRhoGridAlpha, Eigen::MatrixXd &nablaRhoGridBeta); \ No newline at end of file