-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merged in mlxcSlaterTest (pull request #617)
MlxcSlaterTest Approved-by: Vishal Subramanian
- Loading branch information
Showing
64 changed files
with
4,295 additions
and
2,854 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
// --------------------------------------------------------------------- | ||
// | ||
// Copyright (c) 2017-2022 The Regents of the University of Michigan and DFT-FE | ||
// authors. | ||
// | ||
// This file is part of the DFT-FE code. | ||
// | ||
// The DFT-FE code is free software; you can use it, redistribute | ||
// it, and/or modify it under the terms of the GNU Lesser General | ||
// Public License as published by the Free Software Foundation; either | ||
// version 2.1 of the License, or (at your option) any later version. | ||
// The full text of the license can be found in the file LICENSE at | ||
// the top level of the DFT-FE distribution. | ||
// | ||
// --------------------------------------------------------------------- | ||
// | ||
// @author Bikash Kanungo | ||
// | ||
|
||
#ifndef DFTFE_ATOMICBASIS_H | ||
#define DFTFE_ATOMICBASIS_H | ||
|
||
#include <vector> | ||
#include <unordered_map> | ||
#include <string> | ||
#include <utility> | ||
|
||
namespace dftfe | ||
{ | ||
class AtomicBasis | ||
{ | ||
public: | ||
enum class BasisType | ||
{ | ||
SLATER, | ||
GAUSSIAN, | ||
BESSELORTHO | ||
}; | ||
|
||
// Default destructor | ||
~AtomicBasis() = default; | ||
|
||
virtual void | ||
constructBasisSet( | ||
const std::vector<std::pair<std::string, std::vector<double>>> | ||
&atomCoords, | ||
const std::unordered_map<std::string, std::string> | ||
&atomBasisFileNames) = 0; | ||
|
||
virtual int | ||
getNumBasis() const = 0; | ||
|
||
virtual std::vector<double> | ||
getBasisValue(const unsigned int basisId, | ||
const std::vector<double> &x) const = 0; | ||
|
||
virtual std::vector<double> | ||
getBasisGradient(const unsigned int basisId, | ||
const std::vector<double> &x) const = 0; | ||
|
||
virtual std::vector<double> | ||
getBasisLaplacian(const unsigned int basisId, | ||
const std::vector<double> &x) const = 0; | ||
}; | ||
} // namespace dftfe | ||
#endif // DFTFE_ATOMICBASIS_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// | ||
// Created by Sambit Das | ||
// | ||
|
||
#ifndef DFTFE_ATOMBASISDATA_H | ||
#define DFTFE_ATOMBASISDATA_H | ||
|
||
#include <vector> | ||
#include <memory> | ||
#include "AtomicBasis.h" | ||
|
||
namespace dftfe | ||
{ | ||
class AtomicBasisData | ||
{ | ||
public: | ||
/// quadpoints in Cartesian coordinates | ||
void | ||
evalBasisData(const std::vector<double> &quadpts, | ||
const AtomicBasis & atomicBasis, | ||
const unsigned int maxDerOrder); | ||
|
||
const std::vector<double> & | ||
getBasisValues() const; | ||
|
||
|
||
const std::vector<double> & | ||
getBasisGradValues() const; | ||
|
||
const std::vector<double> & | ||
getBasisLaplacianValues() const; | ||
|
||
|
||
private: | ||
// Member variables | ||
std::vector<double> d_basisValues; | ||
std::vector<double> d_basisGradValues; | ||
std::vector<double> d_basisLaplacianValues; | ||
}; | ||
} // namespace dftfe | ||
#endif // DFTFE_ATOMBASISDATA_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
// | ||
// Created by Arghadwip Paul, Sambit Das | ||
// | ||
|
||
#ifndef DFTFE_AUXDM_AUXDENSITYMATRIXATOMICBASIS_H | ||
#define DFTFE_AUXDM_AUXDENSITYMATRIXATOMICBASIS_H | ||
|
||
#include "AuxDensityMatrix.h" | ||
#include "AtomicBasis.h" | ||
#include "AtomicBasisData.h" | ||
#include <vector> | ||
#include <utility> | ||
#include <map> | ||
#include <algorithm> | ||
|
||
|
||
namespace dftfe | ||
{ | ||
template <dftfe::utils::MemorySpace memorySpace> | ||
class AuxDensityMatrixAtomicBasis : public AuxDensityMatrix<memorySpace> | ||
{ | ||
public: | ||
void | ||
reinit( | ||
const AtomicBasis::BasisType basisType, | ||
const std::vector<std::pair<std::string, std::vector<double>>> | ||
& atomCoords, | ||
const std::unordered_map<std::string, std::string> &atomBasisFileNames, | ||
const int nSpin, | ||
const int maxDerOrder); | ||
|
||
void | ||
applyLocalOperations( | ||
const std::vector<double> &quadpts, | ||
std::unordered_map<DensityDescriptorDataAttributes, std::vector<double>> | ||
&densityData) override; | ||
|
||
void | ||
evalOverlapMatrixStart(const std::vector<double> &quadpts, | ||
const std::vector<double> &quadWt) override; | ||
|
||
void | ||
evalOverlapMatrixEnd(const MPI_Comm &mpiComm) override; | ||
|
||
/** | ||
* | ||
* @param projectionInputs is a map from string to inputs needed | ||
* for projection. | ||
* eg - projectionInputsReal["quadpts"], | ||
* projectionInputsReal["quadWt"], | ||
* projectionInputsDataType["psiFunc"], | ||
* projectionInputsReal["fValues"] | ||
* | ||
* psiFunc The SCF wave function or eigen function in FE Basis. | ||
* psiFunc(quad_index, wfc_index), | ||
* quad_index is fastest. | ||
* fValues are the occupancies. | ||
* | ||
* @param iSpin indicates up (iSpin = 0) or down (iSpin = 0) spin. | ||
* | ||
*/ | ||
virtual void | ||
projectDensityMatrixStart( | ||
const std::unordered_map<std::string, std::vector<dataTypes::number>> | ||
&projectionInputsDataType, | ||
const std::unordered_map<std::string, std::vector<double>> | ||
& projectionInputsReal, | ||
const int iSpin) override; | ||
|
||
void | ||
projectDensityMatrixEnd(const MPI_Comm &mpiComm) override; | ||
|
||
void | ||
projectDensityStart( | ||
const std::unordered_map<std::string, std::vector<double>> | ||
&projectionInputs) override; | ||
|
||
void | ||
projectDensityEnd(const MPI_Comm &mpiComm) override; | ||
|
||
|
||
private: | ||
int d_nQuad; | ||
int d_nSpin; | ||
std::unique_ptr<AtomicBasis> d_atomicBasisPtr; | ||
AtomicBasisData d_atomicBasisData; | ||
|
||
int d_nBasis; | ||
int d_maxDerOrder; | ||
|
||
std::vector<double> d_DM; | ||
std::vector<double> d_SMatrix; | ||
std::vector<double> d_SMatrixInv; | ||
std::vector<double> d_basisWFCInnerProducts; | ||
std::vector<double> d_fValues; | ||
|
||
int d_nWFC; | ||
int d_iSpin; | ||
|
||
|
||
void | ||
evalOverlapMatrixInv(); | ||
std::vector<double> & | ||
getOverlapMatrixInv(); | ||
}; | ||
} // namespace dftfe | ||
#endif // DFTFE_AUXDM_AUXDENSITYMATRIXATOMICBASIS_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.