| 1 |
/****************************************************************************** |
| 2 |
|
| 3 |
This source file is part of the Avogadro project. |
| 4 |
|
| 5 |
Copyright (C) 2010 Eric C. Brown |
| 6 |
|
| 7 |
This source code is released under the New BSD License, (the "License"). |
| 8 |
|
| 9 |
Unless required by applicable law or agreed to in writing, software |
| 10 |
distributed under the License is distributed on an "AS IS" BASIS, |
| 11 |
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 |
See the License for the specific language governing permissions and |
| 13 |
limitations under the License. |
| 14 |
|
| 15 |
******************************************************************************/ |
| 16 |
|
| 17 |
#ifndef QTAIMWAVEFUNCTIONEVALUATOR_H |
| 18 |
#define QTAIMWAVEFUNCTIONEVALUATOR_H |
| 19 |
|
| 20 |
#include "qtaimwavefunction.h" |
| 21 |
|
| 22 |
#include <Eigen/Core> |
| 23 |
|
| 24 |
using namespace Eigen; |
| 25 |
|
| 26 |
namespace Avogadro::QtPlugins { |
| 27 |
|
| 28 |
class QTAIMWavefunctionEvaluator |
| 29 |
{ |
| 30 |
public: |
| 31 |
EIGEN_MAKE_ALIGNED_OPERATOR_NEW |
| 32 |
|
| 33 |
explicit QTAIMWavefunctionEvaluator(QTAIMWavefunction& wfn); |
| 34 |
|
| 35 |
qreal molecularOrbital(const qint64 mo, const Matrix<qreal, 3, 1> xyz); |
| 36 |
qreal electronDensity(const Matrix<qreal, 3, 1> xyz); |
| 37 |
Matrix<qreal, 3, 1> gradientOfElectronDensity(const Matrix<qreal, 3, 1> xyz); |
| 38 |
Matrix<qreal, 3, 3> hessianOfElectronDensity(const Matrix<qreal, 3, 1> xyz); |
| 39 |
Matrix<qreal, 3, 4> gradientAndHessianOfElectronDensity( |
| 40 |
const Matrix<qreal, 3, 1> xyz); |
| 41 |
qreal laplacianOfElectronDensity(const Matrix<qreal, 3, 1> xyz); |
| 42 |
qreal electronDensityLaplacian(const Matrix<qreal, 3, 1> xyz) |
| 43 |
{ |
| 44 |
return laplacianOfElectronDensity(xyz); |
| 45 |
} |
| 46 |
Matrix<qreal, 3, 1> gradientOfElectronDensityLaplacian( |
| 47 |
const Matrix<qreal, 3, 1> xyz); |
| 48 |
Matrix<qreal, 3, 3> hessianOfElectronDensityLaplacian( |
| 49 |
const Matrix<qreal, 3, 1> xyz); |
| 50 |
Matrix<qreal, 3, 4> gradientAndHessianOfElectronDensityLaplacian( |
| 51 |
const Matrix<qreal, 3, 1> xyz); |
| 52 |
qreal kineticEnergyDensityG(const Matrix<qreal, 3, 1> xyz); |
| 53 |
qreal kineticEnergyDensityK(const Matrix<qreal, 3, 1> xyz); |
| 54 |
Matrix<qreal, 3, 3> quantumStressTensor(const Matrix<qreal, 3, 1> xyz); |
| 55 |
|
| 56 |
private: |
| 57 |
qint64 m_nmo; |
| 58 |
qint64 m_nprim; |
| 59 |
qint64 m_nnuc; |
| 60 |
// qint64 m_noccmo; // number of (significantly) occupied molecular |
| 61 |
// orbitals |
| 62 |
Matrix<qreal, Dynamic, 1> m_nucxcoord; |
| 63 |
Matrix<qreal, Dynamic, 1> m_nucycoord; |
| 64 |
Matrix<qreal, Dynamic, 1> m_nuczcoord; |
| 65 |
Matrix<qint64, Dynamic, 1> m_nucz; |
| 66 |
Matrix<qreal, Dynamic, 1> m_X0; |
| 67 |
Matrix<qreal, Dynamic, 1> m_Y0; |
| 68 |
Matrix<qreal, Dynamic, 1> m_Z0; |
| 69 |
Matrix<qint64, Dynamic, 1> m_xamom; |
| 70 |
Matrix<qint64, Dynamic, 1> m_yamom; |
| 71 |
Matrix<qint64, Dynamic, 1> m_zamom; |
| 72 |
Matrix<qreal, Dynamic, 1> m_alpha; |
| 73 |
Matrix<qreal, Dynamic, 1> m_occno; |
| 74 |
Matrix<qreal, Dynamic, 1> m_orbe; |
| 75 |
Matrix<qreal, Dynamic, Dynamic, RowMajor> m_coef; |
| 76 |
qreal m_totalEnergy; |
| 77 |
qreal m_virialRatio; |
| 78 |
|
| 79 |
qreal m_cutoff; |
| 80 |
|
| 81 |
Matrix<qreal, Dynamic, 1> m_cdg000; |
| 82 |
Matrix<qreal, Dynamic, 1> m_cdg100; |
| 83 |
Matrix<qreal, Dynamic, 1> m_cdg010; |
| 84 |
Matrix<qreal, Dynamic, 1> m_cdg001; |
| 85 |
Matrix<qreal, Dynamic, 1> m_cdg200; |
| 86 |
Matrix<qreal, Dynamic, 1> m_cdg110; |
| 87 |
Matrix<qreal, Dynamic, 1> m_cdg101; |
| 88 |
Matrix<qreal, Dynamic, 1> m_cdg020; |
| 89 |
Matrix<qreal, Dynamic, 1> m_cdg011; |
| 90 |
Matrix<qreal, Dynamic, 1> m_cdg002; |
| 91 |
Matrix<qreal, Dynamic, 1> m_cdg300; |
| 92 |
Matrix<qreal, Dynamic, 1> m_cdg120; |
| 93 |
Matrix<qreal, Dynamic, 1> m_cdg102; |
| 94 |
Matrix<qreal, Dynamic, 1> m_cdg210; |
| 95 |
Matrix<qreal, Dynamic, 1> m_cdg030; |
| 96 |
Matrix<qreal, Dynamic, 1> m_cdg012; |
| 97 |
Matrix<qreal, Dynamic, 1> m_cdg201; |
| 98 |
Matrix<qreal, Dynamic, 1> m_cdg021; |
| 99 |
Matrix<qreal, Dynamic, 1> m_cdg003; |
| 100 |
Matrix<qreal, Dynamic, 1> m_cdg111; |
| 101 |
Matrix<qreal, Dynamic, 1> m_cdg400; |
| 102 |
Matrix<qreal, Dynamic, 1> m_cdg220; |
| 103 |
Matrix<qreal, Dynamic, 1> m_cdg202; |
| 104 |
Matrix<qreal, Dynamic, 1> m_cdg310; |
| 105 |
Matrix<qreal, Dynamic, 1> m_cdg130; |
| 106 |
Matrix<qreal, Dynamic, 1> m_cdg112; |
| 107 |
Matrix<qreal, Dynamic, 1> m_cdg301; |
| 108 |
Matrix<qreal, Dynamic, 1> m_cdg121; |
| 109 |
Matrix<qreal, Dynamic, 1> m_cdg103; |
| 110 |
Matrix<qreal, Dynamic, 1> m_cdg040; |
| 111 |
Matrix<qreal, Dynamic, 1> m_cdg022; |
| 112 |
Matrix<qreal, Dynamic, 1> m_cdg211; |
| 113 |
Matrix<qreal, Dynamic, 1> m_cdg031; |
| 114 |
Matrix<qreal, Dynamic, 1> m_cdg013; |
| 115 |
Matrix<qreal, Dynamic, 1> m_cdg004; |
| 116 |
|
| 117 |
static qreal ipow(qreal a, qint64 n) { return (qreal)pow(a, (int)n); } |
| 118 |
}; |
| 119 |
|
| 120 |
} // namespace Avogadro::QtPlugins |
| 121 |
|
| 122 |
#endif // QTAIMWAVEFUNCTIONEVALUATOR_H |