Current density operator only works in non-London GTO basis
novelC++
Current density operator quantisation currently only works with a SpinOrbitalBasis initialised with `CartesianGTO` (not `LondonCartesianGTO`) basis sets.
The reason behind this appears to be a simple hardcoding of the scalar type and GTOShell type expected in `CurrentDensityMatrixElement.hpp` and related functions:
```cpp
/**
* One of the elements of (one of the vector components of) the second-quantized field-free charge current density operator.
*
* @param _Scalar The scalar type of the expansion coefficients of the spatial orbitals that underlie this current density matrix element.
* @param _Primitive The type of primitive that underlies this current density matrix element.
*/
template <typename _Scalar, typename _Primitive>
class CurrentDensityMatrixElement:
public Function<complex, Vector<double, 3>> {
public:
// The scalar type of the expansion coefficients of the spatial orbitals that underlie this current density matrix element.
using Scalar = _Scalar;
// The type of primitive that underlies this current density matrix element.
using Primitive = _Primitive;
// The type of basis function that underlies this current density matrix element.
using BasisFunction = EvaluableLinearCombination<double, Primitive>;
// The type of spatial orbital that underlies this current density matrix element.
using SpatialOrbital = EvaluableLinearCombination<Scalar, BasisFunction>;
// The type of the derivative of a primitive. The derivative of a Cartesian GTO is a linear combination of Cartesian GTOs.
using PrimitiveDerivative = EvaluableLinearCombination<double, Primitive>;
// The type of the derivative of a basis function.
using BasisFunctionDerivative = EvaluableLinearCombination<double, PrimitiveDerivative>;
// The type of the derivative of a spatial orbital.
using SpatialOrbitalDerivative = EvaluableLinearCombination<Scalar, BasisFunctionDerivative>;
```
With `SpatialOrbitalGradient` implemented in #1083, there appears no inherent reason why this functionality should not be extended towards LAOs also.
0 条评论