30 const AOShell& shell_col)
const {
32 const double pi = boost::math::constants::pi<double>();
35 if (rank < 1 && site_->getDipole().norm() > 1
e-12) {
45 Index lsum = lmax_row + lmax_col;
59 const Eigen::Vector3d& pos_row = shell_row.
getPos();
60 const Eigen::Vector3d& pos_col = shell_col.
getPos();
61 const Eigen::Vector3d diff = pos_row - pos_col;
64 double distsq = diff.squaredNorm();
66 Eigen::MatrixXd cartesian = Eigen::MatrixXd::Zero(
70 for (
const auto& gaussian_row : shell_row) {
73 const double decay_row = gaussian_row.getDecay();
75 for (
const auto& gaussian_col : shell_col) {
77 const double decay_col = gaussian_col.getDecay();
79 const double zeta = decay_row + decay_col;
80 const double fak = 0.5 / zeta;
81 const double fak2 = 2.0 * fak;
82 const double xi = decay_row * decay_col * fak2;
84 double exparg = xi * distsq;
87 const Eigen::Vector3d PmA =
88 fak2 * (decay_row * pos_row + decay_col * pos_col) - pos_row;
89 const Eigen::Vector3d PmB =
90 fak2 * (decay_row * pos_row + decay_col * pos_col) - pos_col;
91 const Eigen::Vector3d PmC =
92 fak2 * (decay_row * pos_row + decay_col * pos_col) -
site_->
getPos();
94 const double U = zeta * PmC.squaredNorm();
99 Eigen::Tensor<double, 3> nuc3(nrows, ncols, lsum + 1);
102 double prefactor = 4. * sqrt(2. / pi) * pow(decay_row * decay_col, .75) *
104 for (
Index m = 0; m < lsum + 1; m++) {
105 nuc3(0, 0, m) = prefactor * FmU[m];
111 for (
Index m = 0; m < lsum; m++) {
113 PmA(0) * nuc3(0, 0, m) - PmC(0) * nuc3(0, 0, m + 1);
115 PmA(1) * nuc3(0, 0, m) - PmC(1) * nuc3(0, 0, m + 1);
117 PmA(2) * nuc3(0, 0, m) - PmC(2) * nuc3(0, 0, m + 1);
124 for (
Index m = 0; m < lsum - 1; m++) {
125 double term = fak * (nuc3(0, 0, m) - nuc3(0, 0, m + 1));
127 PmC(0) * nuc3(
Cart::x, 0, m + 1) + term;
133 PmC(1) * nuc3(
Cart::y, 0, m + 1) + term;
137 PmC(2) * nuc3(
Cart::z, 0, m + 1) + term;
144 for (
Index m = 0; m < lsum - 2; m++) {
177 for (
Index m = 0; m < lsum - 3; m++) {
192 PmC(0) * nuc3(
Cart::xyy, 0, m + 1) + term_yy;
196 PmC(0) * nuc3(
Cart::xzz, 0, m + 1) + term_zz;
211 PmC(1) * nuc3(
Cart::yzz, 0, m + 1) + term_zz;
224 for (
Index m = 0; m < lmax_col; m++) {
226 PmB(0) * nuc3(0, 0, m) - PmC(0) * nuc3(0, 0, m + 1);
228 PmB(1) * nuc3(0, 0, m) - PmC(1) * nuc3(0, 0, m + 1);
230 PmB(2) * nuc3(0, 0, m) - PmC(2) * nuc3(0, 0, m + 1);
236 for (
Index m = 0; m < lmax_col; m++) {
237 double term = fak * (nuc3(0, 0, m) - nuc3(0, 0, m + 1));
238 for (
Index i = 1; i < 4; i++) {
239 nuc3(i,
Cart::x, m) = PmB(0) * nuc3(i, 0, m) -
240 PmC(0) * nuc3(i, 0, m + 1) + nx[i] * term;
241 nuc3(i,
Cart::y, m) = PmB(1) * nuc3(i, 0, m) -
242 PmC(1) * nuc3(i, 0, m + 1) + ny[i] * term;
243 nuc3(i,
Cart::z, m) = PmB(2) * nuc3(i, 0, m) -
244 PmC(2) * nuc3(i, 0, m + 1) + nz[i] * term;
251 for (
Index m = 0; m < lmax_col; m++) {
252 for (
Index i = 4; i < n_orbitals[lmax_row]; i++) {
256 int ilx_i = i_less_x[i];
257 int ily_i = i_less_y[i];
258 int ilz_i = i_less_z[i];
260 PmB(0) * nuc3(i, 0, m) - PmC(0) * nuc3(i, 0, m + 1) +
261 nx_i * fak * (nuc3(ilx_i, 0, m) - nuc3(ilx_i, 0, m + 1));
263 PmB(1) * nuc3(i, 0, m) - PmC(1) * nuc3(i, 0, m + 1) +
264 ny_i * fak * (nuc3(ily_i, 0, m) - nuc3(ily_i, 0, m + 1));
266 PmB(2) * nuc3(i, 0, m) - PmC(2) * nuc3(i, 0, m + 1) +
267 nz_i * fak * (nuc3(ilz_i, 0, m) - nuc3(ilz_i, 0, m + 1));
277 for (
Index m = 0; m < lmax_col - 1; m++) {
278 double term = fak * (nuc3(0, 0, m) - nuc3(0, 0, m + 1));
280 PmC(0) * nuc3(0,
Cart::x, m + 1) + term;
286 PmC(1) * nuc3(0,
Cart::y, m + 1) + term;
290 PmC(2) * nuc3(0,
Cart::z, m + 1) + term;
295 for (
Index m = 0; m < lmax_col - 1; m++) {
296 for (
Index i = 1; i < n_orbitals[lmax_row]; i++) {
300 int ilx_i = i_less_x[i];
301 int ily_i = i_less_y[i];
302 int ilz_i = i_less_z[i];
303 double term = fak * (nuc3(i, 0, m) - nuc3(i, 0, m + 1));
306 PmC(0) * nuc3(i,
Cart::x, m + 1) +
312 PmC(0) * nuc3(i,
Cart::y, m + 1) +
317 PmC(0) * nuc3(i,
Cart::z, m + 1) +
322 PmC(1) * nuc3(i,
Cart::y, m + 1) +
328 PmC(1) * nuc3(i,
Cart::z, m + 1) +
333 PmC(2) * nuc3(i,
Cart::z, m + 1) +
346 for (
Index m = 0; m < lmax_col - 2; m++) {
377 for (
Index m = 0; m < lmax_col - 2; m++) {
378 for (
Index i = 1; i < n_orbitals[lmax_row]; i++) {
382 int ilx_i = i_less_x[i];
383 int ily_i = i_less_y[i];
384 int ilz_i = i_less_z[i];
453 for (
Index m = 0; m < lmax_col - 3; m++) {
468 PmC(0) * nuc3(0,
Cart::xyy, m + 1) + term_yy;
472 PmC(0) * nuc3(0,
Cart::xzz, m + 1) + term_zz;
487 PmC(1) * nuc3(0,
Cart::yzz, m + 1) + term_zz;
497 for (
Index m = 0; m < lmax_col - 3; m++) {
498 for (
Index i = 1; i < n_orbitals[lmax_row]; i++) {
502 int ilx_i = i_less_x[i];
503 int ily_i = i_less_y[i];
504 int ilz_i = i_less_z[i];
597 Eigen::MatrixXd multipole =
598 charge * Eigen::Map<Eigen::MatrixXd>(nuc3.data(), nrows, ncols);
601 Eigen::Tensor<double, 4> dip4(nrows, ncols, 3, lsum + 1);
605 double prefactor_dip_ = 2. * zeta * prefactor;
606 for (
Index m = 0; m < lsum + 1; m++) {
607 dip4(0, 0, 0, m) = PmC(0) * prefactor_dip_ * FmU[m + 1];
608 dip4(0, 0, 1, m) = PmC(1) * prefactor_dip_ * FmU[m + 1];
609 dip4(0, 0, 2, m) = PmC(2) * prefactor_dip_ * FmU[m + 1];
615 for (
Index m = 0; m < lsum; m++) {
616 for (
Index k = 0; k < 3; k++) {
617 dip4(
Cart::x, 0, k, m) = PmA(0) * dip4(0, 0, k, m) -
618 PmC(0) * dip4(0, 0, k, m + 1) +
619 (k == 0) * nuc3(0, 0, m + 1);
620 dip4(
Cart::y, 0, k, m) = PmA(1) * dip4(0, 0, k, m) -
621 PmC(1) * dip4(0, 0, k, m + 1) +
622 (k == 1) * nuc3(0, 0, m + 1);
623 dip4(
Cart::z, 0, k, m) = PmA(2) * dip4(0, 0, k, m) -
624 PmC(2) * dip4(0, 0, k, m + 1) +
625 (k == 2) * nuc3(0, 0, m + 1);
633 for (
Index m = 0; m < lsum - 1; m++) {
634 for (
Index k = 0; k < 3; k++) {
635 double term = fak * (dip4(0, 0, k, m) - dip4(0, 0, k, m + 1));
637 PmC(0) * dip4(
Cart::x, 0, k, m + 1) +
638 (k == 0) * nuc3(
Cart::x, 0, m + 1) +
641 PmC(0) * dip4(
Cart::y, 0, k, m + 1) +
642 (k == 0) * nuc3(
Cart::y, 0, m + 1);
644 PmC(0) * dip4(
Cart::z, 0, k, m + 1) +
645 (k == 0) * nuc3(
Cart::z, 0, m + 1);
647 PmC(1) * dip4(
Cart::y, 0, k, m + 1) +
648 (k == 1) * nuc3(
Cart::y, 0, m + 1) +
651 PmC(1) * dip4(
Cart::z, 0, k, m + 1) +
652 (k == 1) * nuc3(
Cart::z, 0, m + 1);
654 PmC(2) * dip4(
Cart::z, 0, k, m + 1) +
655 (k == 2) * nuc3(
Cart::z, 0, m + 1) +
664 for (
Index m = 0; m < lsum - 2; m++) {
665 for (
Index k = 0; k < 3; k++) {
668 PmC(0) * dip4(
Cart::xx, 0, k, m + 1) +
669 (k == 0) * nuc3(
Cart::xx, 0, m + 1) +
673 PmC(1) * dip4(
Cart::xx, 0, k, m + 1) +
674 (k == 1) * nuc3(
Cart::xx, 0, m + 1);
676 PmC(2) * dip4(
Cart::xx, 0, k, m + 1) +
677 (k == 2) * nuc3(
Cart::xx, 0, m + 1);
679 PmC(0) * dip4(
Cart::yy, 0, k, m + 1) +
680 (k == 0) * nuc3(
Cart::yy, 0, m + 1);
682 PmC(0) * dip4(
Cart::yz, 0, k, m + 1) +
683 (k == 0) * nuc3(
Cart::yz, 0, m + 1);
685 PmC(0) * dip4(
Cart::zz, 0, k, m + 1) +
686 (k == 0) * nuc3(
Cart::zz, 0, m + 1);
689 PmC(1) * dip4(
Cart::yy, 0, k, m + 1) +
690 (k == 1) * nuc3(
Cart::yy, 0, m + 1) +
694 PmC(2) * dip4(
Cart::yy, 0, k, m + 1) +
695 (k == 2) * nuc3(
Cart::yy, 0, m + 1);
697 PmC(1) * dip4(
Cart::zz, 0, k, m + 1) +
698 (k == 1) * nuc3(
Cart::zz, 0, m + 1);
701 PmC(2) * dip4(
Cart::zz, 0, k, m + 1) +
702 (k == 2) * nuc3(
Cart::zz, 0, m + 1) +
712 for (
Index m = 0; m < lsum - 3; m++) {
713 for (
Index k = 0; k < 3; k++) {
723 (k == 0) * nuc3(
Cart::xxx, 0, m + 1) + 3 * term_xx;
735 (k == 0) * nuc3(
Cart::xyy, 0, m + 1) + term_yy;
743 (k == 0) * nuc3(
Cart::xzz, 0, m + 1) + term_zz;
763 (k == 1) * nuc3(
Cart::yyy, 0, m + 1) + 3 * term_yy;
771 (k == 1) * nuc3(
Cart::yzz, 0, m + 1) + term_zz;
779 (k == 2) * nuc3(
Cart::zzz, 0, m + 1) + 3 * term_zz;
788 for (
Index m = 0; m < lmax_col; m++) {
789 for (
Index k = 0; k < 3; k++) {
790 dip4(0,
Cart::x, k, m) = PmB(0) * dip4(0, 0, k, m) -
791 PmC(0) * dip4(0, 0, k, m + 1) +
792 (k == 0) * nuc3(0, 0, m + 1);
793 dip4(0,
Cart::y, k, m) = PmB(1) * dip4(0, 0, k, m) -
794 PmC(1) * dip4(0, 0, k, m + 1) +
795 (k == 1) * nuc3(0, 0, m + 1);
796 dip4(0,
Cart::z, k, m) = PmB(2) * dip4(0, 0, k, m) -
797 PmC(2) * dip4(0, 0, k, m + 1) +
798 (k == 2) * nuc3(0, 0, m + 1);
805 for (
Index m = 0; m < lmax_col; m++) {
806 for (
Index i = 1; i < 4; i++) {
807 for (
Index k = 0; k < 3; k++) {
808 double term = fak * (dip4(0, 0, k, m) - dip4(0, 0, k, m + 1));
809 dip4(i,
Cart::x, k, m) = PmB(0) * dip4(i, 0, k, m) -
810 PmC(0) * dip4(i, 0, k, m + 1) +
811 (k == 0) * nuc3(i, 0, m + 1) +
813 dip4(i,
Cart::y, k, m) = PmB(1) * dip4(i, 0, k, m) -
814 PmC(1) * dip4(i, 0, k, m + 1) +
815 (k == 1) * nuc3(i, 0, m + 1) +
817 dip4(i,
Cart::z, k, m) = PmB(2) * dip4(i, 0, k, m) -
818 PmC(2) * dip4(i, 0, k, m + 1) +
819 (k == 2) * nuc3(i, 0, m + 1) +
828 for (
Index m = 0; m < lmax_col; m++) {
829 for (
Index i = 4; i < n_orbitals[lmax_row]; i++) {
833 int ilx_i = i_less_x[i];
834 int ily_i = i_less_y[i];
835 int ilz_i = i_less_z[i];
836 for (
Index k = 0; k < 3; k++) {
838 PmB(0) * dip4(i, 0, k, m) - PmC(0) * dip4(i, 0, k, m + 1) +
839 (k == 0) * nuc3(i, 0, m + 1) +
841 (dip4(ilx_i, 0, k, m) - dip4(ilx_i, 0, k, m + 1));
843 PmB(1) * dip4(i, 0, k, m) - PmC(1) * dip4(i, 0, k, m + 1) +
844 (k == 1) * nuc3(i, 0, m + 1) +
846 (dip4(ily_i, 0, k, m) - dip4(ily_i, 0, k, m + 1));
848 PmB(2) * dip4(i, 0, k, m) - PmC(2) * dip4(i, 0, k, m + 1) +
849 (k == 2) * nuc3(i, 0, m + 1) +
851 (dip4(ilz_i, 0, k, m) - dip4(ilz_i, 0, k, m + 1));
862 for (
Index m = 0; m < lmax_col - 1; m++) {
863 for (
Index k = 0; k < 3; k++) {
864 double term = fak * (dip4(0, 0, k, m) - dip4(0, 0, k, m + 1));
866 PmC(0) * dip4(0,
Cart::x, k, m + 1) +
867 (k == 0) * nuc3(0,
Cart::x, m + 1) +
870 PmC(0) * dip4(0,
Cart::y, k, m + 1) +
871 (k == 0) * nuc3(0,
Cart::y, m + 1);
873 PmC(0) * dip4(0,
Cart::z, k, m + 1) +
874 (k == 0) * nuc3(0,
Cart::z, m + 1);
876 PmC(1) * dip4(0,
Cart::y, k, m + 1) +
877 (k == 1) * nuc3(0,
Cart::y, m + 1) +
880 PmC(1) * dip4(0,
Cart::z, k, m + 1) +
881 (k == 1) * nuc3(0,
Cart::z, m + 1);
883 PmC(2) * dip4(0,
Cart::z, k, m + 1) +
884 (k == 2) * nuc3(0,
Cart::z, m + 1) +
891 for (
Index m = 0; m < lmax_col - 1; m++) {
892 for (
Index i = 1; i < n_orbitals[lmax_row]; i++) {
896 int ilx_i = i_less_x[i];
897 int ily_i = i_less_y[i];
898 int ilz_i = i_less_z[i];
899 for (
Index k = 0; k < 3; k++) {
900 double term = fak * (dip4(i, 0, k, m) - dip4(i, 0, k, m + 1));
902 PmC(0) * dip4(i,
Cart::x, k, m + 1) +
903 (k == 0) * nuc3(i,
Cart::x, m + 1) +
906 dip4(ilx_i,
Cart::x, k, m + 1)) +
909 PmC(0) * dip4(i,
Cart::y, k, m + 1) +
910 (k == 0) * nuc3(i,
Cart::y, m + 1) +
913 dip4(ilx_i,
Cart::y, k, m + 1));
915 PmC(0) * dip4(i,
Cart::z, k, m + 1) +
916 (k == 0) * nuc3(i,
Cart::z, m + 1) +
919 dip4(ilx_i,
Cart::z, k, m + 1));
921 PmC(1) * dip4(i,
Cart::y, k, m + 1) +
922 (k == 1) * nuc3(i,
Cart::y, m + 1) +
925 dip4(ily_i,
Cart::y, k, m + 1)) +
928 PmC(1) * dip4(i,
Cart::z, k, m + 1) +
929 (k == 1) * nuc3(i,
Cart::z, m + 1) +
932 dip4(ily_i,
Cart::z, k, m + 1));
934 PmC(2) * dip4(i,
Cart::z, k, m + 1) +
935 (k == 2) * nuc3(i,
Cart::z, m + 1) +
938 dip4(ilz_i,
Cart::z, k, m + 1)) +
950 for (
Index m = 0; m < lmax_col - 2; m++) {
951 for (
Index k = 0; k < 3; k++) {
954 PmC(0) * dip4(0,
Cart::xx, k, m + 1) +
955 (k == 0) * nuc3(0,
Cart::xx, m + 1) +
959 PmC(1) * dip4(0,
Cart::xx, k, m + 1) +
960 (k == 1) * nuc3(0,
Cart::xx, m + 1);
962 PmC(2) * dip4(0,
Cart::xx, k, m + 1) +
963 (k == 2) * nuc3(0,
Cart::xx, m + 1);
965 PmC(0) * dip4(0,
Cart::yy, k, m + 1) +
966 (k == 0) * nuc3(0,
Cart::yy, m + 1);
968 PmC(0) * dip4(0,
Cart::yz, k, m + 1) +
969 (k == 0) * nuc3(0,
Cart::yz, m + 1);
971 PmC(0) * dip4(0,
Cart::zz, k, m + 1) +
972 (k == 0) * nuc3(0,
Cart::zz, m + 1);
975 PmC(1) * dip4(0,
Cart::yy, k, m + 1) +
976 (k == 1) * nuc3(0,
Cart::yy, m + 1) +
980 PmC(2) * dip4(0,
Cart::yy, k, m + 1) +
981 (k == 2) * nuc3(0,
Cart::yy, m + 1);
983 PmC(1) * dip4(0,
Cart::zz, k, m + 1) +
984 (k == 1) * nuc3(0,
Cart::zz, m + 1);
987 PmC(2) * dip4(0,
Cart::zz, k, m + 1) +
988 (k == 2) * nuc3(0,
Cart::zz, m + 1) +
996 for (
Index m = 0; m < lmax_col - 2; m++) {
997 for (
Index i = 1; i < n_orbitals[lmax_row]; i++) {
1001 int ilx_i = i_less_x[i];
1002 int ily_i = i_less_y[i];
1003 int ilz_i = i_less_z[i];
1004 for (
Index k = 0; k < 3; k++) {
1016 PmC(0) * dip4(i,
Cart::xx, k, m + 1) +
1017 (k == 0) * nuc3(i,
Cart::xx, m + 1) +
1024 PmC(1) * dip4(i,
Cart::xx, k, m + 1) +
1025 (k == 1) * nuc3(i,
Cart::xx, m + 1) +
1031 PmC(2) * dip4(i,
Cart::xx, k, m + 1) +
1032 (k == 2) * nuc3(i,
Cart::xx, m + 1) +
1038 PmC(0) * dip4(i,
Cart::yy, k, m + 1) +
1039 (k == 0) * nuc3(i,
Cart::yy, m + 1) +
1045 PmC(0) * dip4(i,
Cart::yz, k, m + 1) +
1046 (k == 0) * nuc3(i,
Cart::yz, m + 1) +
1052 PmC(0) * dip4(i,
Cart::zz, k, m + 1) +
1053 (k == 0) * nuc3(i,
Cart::zz, m + 1) +
1059 PmC(1) * dip4(i,
Cart::yy, k, m + 1) +
1060 (k == 1) * nuc3(i,
Cart::yy, m + 1) +
1067 PmC(2) * dip4(i,
Cart::yy, k, m + 1) +
1068 (k == 2) * nuc3(i,
Cart::yy, m + 1) +
1074 PmC(1) * dip4(i,
Cart::zz, k, m + 1) +
1075 (k == 1) * nuc3(i,
Cart::zz, m + 1) +
1081 PmC(2) * dip4(i,
Cart::zz, k, m + 1) +
1082 (k == 2) * nuc3(i,
Cart::zz, m + 1) +
1097 for (
Index m = 0; m < lmax_col - 3; m++) {
1098 for (
Index k = 0; k < 3; k++) {
1108 (k == 0) * nuc3(0,
Cart::xxx, m + 1) + 3 * term_xx;
1120 (k == 0) * nuc3(0,
Cart::xyy, m + 1) + term_yy;
1128 (k == 0) * nuc3(0,
Cart::xzz, m + 1) + term_zz;
1148 (k == 1) * nuc3(0,
Cart::yyy, m + 1) + 3 * term_yy;
1156 (k == 1) * nuc3(0,
Cart::yzz, m + 1) + term_zz;
1164 (k == 2) * nuc3(0,
Cart::zzz, m + 1) + 3 * term_zz;
1170 for (
Index m = 0; m < lmax_col - 3; m++) {
1171 for (
Index i = 1; i < n_orbitals[lmax_row]; i++) {
1175 int ilx_i = i_less_x[i];
1176 int ily_i = i_less_y[i];
1177 int ilz_i = i_less_z[i];
1178 for (
Index k = 0; k < 3; k++) {
1179 double term_xx = fak * (dip4(i,
Cart::xx, k, m) -
1181 double term_yy = fak * (dip4(i,
Cart::yy, k, m) -
1183 double term_zz = fak * (dip4(i,
Cart::zz, k, m) -
1304 dipole.x() * Eigen::Map<Eigen::MatrixXd>(dip4.data(), nrows, ncols);
1305 size_t offset = nrows * ncols;
1306 multipole += dipole.y() * Eigen::Map<Eigen::MatrixXd>(
1307 dip4.data() + offset, nrows, ncols);
1308 multipole += dipole.z() * Eigen::Map<Eigen::MatrixXd>(
1309 dip4.data() + 2 * offset, nrows, ncols);
1312 Eigen::Tensor<double, 4> quad4(nrows, ncols, 5, lsum + 1);
1315 double fact = 1. / 3.;
1316 std::array<double, 5> fac0 = {fact, fact, 0., 2. * fact, 0.};
1317 std::array<double, 5> fac1 = {fact, 0., fact, 0., 2. * fact};
1318 std::array<double, 5> fac2 = {0., fact, fact, -2. * fact, -2. * fact};
1320 std::array<int, 5> ind0 = {1, 2, 0, 0, 0};
1321 std::array<int, 5> ind1 = {0, 0, 2, 0, 1};
1322 std::array<int, 5> ind2 = {0, 0, 1, 2, 2};
1325 double prefactor_quad = (4. * zeta * zeta * prefactor) / 3.;
1326 for (
Index m = 0; m < lsum + 1; m++) {
1327 quad4(0, 0, 0, m) = PmC(0) * PmC(1) * prefactor_quad * FmU[m + 2];
1328 quad4(0, 0, 1, m) = PmC(0) * PmC(2) * prefactor_quad * FmU[m + 2];
1329 quad4(0, 0, 2, m) = PmC(1) * PmC(2) * prefactor_quad * FmU[m + 2];
1330 quad4(0, 0, 3, m) = (PmC(0) * PmC(0) - PmC(2) * PmC(2)) *
1331 prefactor_quad * FmU[m + 2];
1332 quad4(0, 0, 4, m) = (PmC(1) * PmC(1) - PmC(2) * PmC(2)) *
1333 prefactor_quad * FmU[m + 2];
1339 for (
Index m = 0; m < lsum; m++) {
1340 for (
Index k = 0; k < 5; k++) {
1341 quad4(
Cart::x, 0, k, m) = PmA(0) * quad4(0, 0, k, m) -
1342 PmC(0) * quad4(0, 0, k, m + 1) +
1343 fac0[k] * dip4(0, 0, ind0[k], m + 1);
1344 quad4(
Cart::y, 0, k, m) = PmA(1) * quad4(0, 0, k, m) -
1345 PmC(1) * quad4(0, 0, k, m + 1) +
1346 fac1[k] * dip4(0, 0, ind1[k], m + 1);
1347 quad4(
Cart::z, 0, k, m) = PmA(2) * quad4(0, 0, k, m) -
1348 PmC(2) * quad4(0, 0, k, m + 1) +
1349 fac2[k] * dip4(0, 0, ind2[k], m + 1);
1357 for (
Index m = 0; m < lsum - 1; m++) {
1358 for (
Index k = 0; k < 5; k++) {
1359 double term = fak * (quad4(0, 0, k, m) - quad4(0, 0, k, m + 1));
1361 PmA(0) * quad4(
Cart::x, 0, k, m) -
1362 PmC(0) * quad4(
Cart::x, 0, k, m + 1) +
1363 fac0[k] * dip4(
Cart::x, 0, ind0[k], m + 1) + term;
1365 PmA(0) * quad4(
Cart::y, 0, k, m) -
1366 PmC(0) * quad4(
Cart::y, 0, k, m + 1) +
1367 fac0[k] * dip4(
Cart::y, 0, ind0[k], m + 1);
1369 PmA(0) * quad4(
Cart::z, 0, k, m) -
1370 PmC(0) * quad4(
Cart::z, 0, k, m + 1) +
1371 fac0[k] * dip4(
Cart::z, 0, ind0[k], m + 1);
1373 PmA(1) * quad4(
Cart::y, 0, k, m) -
1374 PmC(1) * quad4(
Cart::y, 0, k, m + 1) +
1375 fac1[k] * dip4(
Cart::y, 0, ind1[k], m + 1) + term;
1377 PmA(1) * quad4(
Cart::z, 0, k, m) -
1378 PmC(1) * quad4(
Cart::z, 0, k, m + 1) +
1379 fac1[k] * dip4(
Cart::z, 0, ind1[k], m + 1);
1381 PmA(2) * quad4(
Cart::z, 0, k, m) -
1382 PmC(2) * quad4(
Cart::z, 0, k, m + 1) +
1383 fac2[k] * dip4(
Cart::z, 0, ind2[k], m + 1) + term;
1391 for (
Index m = 0; m < lsum - 2; m++) {
1392 for (
Index k = 0; k < 5; k++) {
1394 PmA(0) * quad4(
Cart::xx, 0, k, m) -
1395 PmC(0) * quad4(
Cart::xx, 0, k, m + 1) +
1396 fac0[k] * dip4(
Cart::xx, 0, ind0[k], m + 1) +
1400 PmA(1) * quad4(
Cart::xx, 0, k, m) -
1401 PmC(1) * quad4(
Cart::xx, 0, k, m + 1) +
1402 fac1[k] * dip4(
Cart::xx, 0, ind1[k], m + 1);
1404 PmA(2) * quad4(
Cart::xx, 0, k, m) -
1405 PmC(2) * quad4(
Cart::xx, 0, k, m + 1) +
1406 fac2[k] * dip4(
Cart::xx, 0, ind2[k], m + 1);
1408 PmA(0) * quad4(
Cart::yy, 0, k, m) -
1409 PmC(0) * quad4(
Cart::yy, 0, k, m + 1) +
1410 fac0[k] * dip4(
Cart::yy, 0, ind0[k], m + 1);
1412 PmA(0) * quad4(
Cart::yz, 0, k, m) -
1413 PmC(0) * quad4(
Cart::yz, 0, k, m + 1) +
1414 fac0[k] * dip4(
Cart::yz, 0, ind0[k], m + 1);
1416 PmA(0) * quad4(
Cart::zz, 0, k, m) -
1417 PmC(0) * quad4(
Cart::zz, 0, k, m + 1) +
1418 fac0[k] * dip4(
Cart::zz, 0, ind0[k], m + 1);
1420 PmA(1) * quad4(
Cart::yy, 0, k, m) -
1421 PmC(1) * quad4(
Cart::yy, 0, k, m + 1) +
1422 fac1[k] * dip4(
Cart::yy, 0, ind1[k], m + 1) +
1426 PmA(2) * quad4(
Cart::yy, 0, k, m) -
1427 PmC(2) * quad4(
Cart::yy, 0, k, m + 1) +
1428 fac2[k] * dip4(
Cart::yy, 0, ind2[k], m + 1);
1430 PmA(1) * quad4(
Cart::zz, 0, k, m) -
1431 PmC(1) * quad4(
Cart::zz, 0, k, m + 1) +
1432 fac1[k] * dip4(
Cart::zz, 0, ind1[k], m + 1);
1434 PmA(2) * quad4(
Cart::zz, 0, k, m) -
1435 PmC(2) * quad4(
Cart::zz, 0, k, m + 1) +
1436 fac2[k] * dip4(
Cart::zz, 0, ind2[k], m + 1) +
1446 for (
Index m = 0; m < lsum - 3; m++) {
1447 for (
Index k = 0; k < 5; k++) {
1448 double term_xx = fak * (quad4(
Cart::xx, 0, k, m) -
1450 double term_yy = fak * (quad4(
Cart::yy, 0, k, m) -
1452 double term_zz = fak * (quad4(
Cart::zz, 0, k, m) -
1456 PmC(0) * quad4(
Cart::xxx, 0, k, m + 1) +
1457 fac0[k] * dip4(
Cart::xxx, 0, ind0[k], m + 1) + 3 * term_xx;
1460 PmC(1) * quad4(
Cart::xxx, 0, k, m + 1) +
1461 fac1[k] * dip4(
Cart::xxx, 0, ind1[k], m + 1);
1464 PmC(2) * quad4(
Cart::xxx, 0, k, m + 1) +
1465 fac2[k] * dip4(
Cart::xxx, 0, ind2[k], m + 1);
1468 PmC(0) * quad4(
Cart::xyy, 0, k, m + 1) +
1469 fac0[k] * dip4(
Cart::xyy, 0, ind0[k], m + 1) + term_yy;
1472 PmC(1) * quad4(
Cart::xxz, 0, k, m + 1) +
1473 fac1[k] * dip4(
Cart::xxz, 0, ind1[k], m + 1);
1476 PmC(0) * quad4(
Cart::xzz, 0, k, m + 1) +
1477 fac0[k] * dip4(
Cart::xzz, 0, ind0[k], m + 1) + term_zz;
1480 PmC(0) * quad4(
Cart::yyy, 0, k, m + 1) +
1481 fac0[k] * dip4(
Cart::yyy, 0, ind0[k], m + 1);
1484 PmC(0) * quad4(
Cart::yyz, 0, k, m + 1) +
1485 fac0[k] * dip4(
Cart::yyz, 0, ind0[k], m + 1);
1488 PmC(0) * quad4(
Cart::yzz, 0, k, m + 1) +
1489 fac0[k] * dip4(
Cart::yzz, 0, ind0[k], m + 1);
1492 PmC(0) * quad4(
Cart::zzz, 0, k, m + 1) +
1493 fac0[k] * dip4(
Cart::zzz, 0, ind0[k], m + 1);
1496 PmC(1) * quad4(
Cart::yyy, 0, k, m + 1) +
1497 fac1[k] * dip4(
Cart::yyy, 0, ind1[k], m + 1) + 3 * term_yy;
1500 PmC(2) * quad4(
Cart::yyy, 0, k, m + 1) +
1501 fac2[k] * dip4(
Cart::yyy, 0, ind2[k], m + 1);
1504 PmC(1) * quad4(
Cart::yzz, 0, k, m + 1) +
1505 fac1[k] * dip4(
Cart::yzz, 0, ind1[k], m + 1) + term_zz;
1508 PmC(1) * quad4(
Cart::zzz, 0, k, m + 1) +
1509 fac1[k] * dip4(
Cart::zzz, 0, ind1[k], m + 1);
1512 PmC(2) * quad4(
Cart::zzz, 0, k, m + 1) +
1513 fac2[k] * dip4(
Cart::zzz, 0, ind2[k], m + 1) + 3 * term_zz;
1522 for (
Index m = 0; m < lmax_col; m++) {
1523 for (
Index k = 0; k < 5; k++) {
1524 quad4(0,
Cart::x, k, m) = PmB(0) * quad4(0, 0, k, m) -
1525 PmC(0) * quad4(0, 0, k, m + 1) +
1526 fac0[k] * dip4(0, 0, ind0[k], m + 1);
1527 quad4(0,
Cart::y, k, m) = PmB(1) * quad4(0, 0, k, m) -
1528 PmC(1) * quad4(0, 0, k, m + 1) +
1529 fac1[k] * dip4(0, 0, ind1[k], m + 1);
1530 quad4(0,
Cart::z, k, m) = PmB(2) * quad4(0, 0, k, m) -
1531 PmC(2) * quad4(0, 0, k, m + 1) +
1532 fac2[k] * dip4(0, 0, ind2[k], m + 1);
1539 for (
Index m = 0; m < lmax_col; m++) {
1540 for (
Index i = 1; i < 4; i++) {
1541 for (
Index k = 0; k < 5; k++) {
1543 fak * (quad4(0, 0, k, m) - quad4(0, 0, k, m + 1));
1545 PmB(0) * quad4(i, 0, k, m) -
1546 PmC(0) * quad4(i, 0, k, m + 1) +
1547 fac0[k] * dip4(i, 0, ind0[k], m + 1) + nx[i] * term;
1549 PmB(1) * quad4(i, 0, k, m) -
1550 PmC(1) * quad4(i, 0, k, m + 1) +
1551 fac1[k] * dip4(i, 0, ind1[k], m + 1) + ny[i] * term;
1553 PmB(2) * quad4(i, 0, k, m) -
1554 PmC(2) * quad4(i, 0, k, m + 1) +
1555 fac2[k] * dip4(i, 0, ind2[k], m + 1) + nz[i] * term;
1563 for (
Index m = 0; m < lmax_col; m++) {
1564 for (
Index i = 4; i < n_orbitals[lmax_row]; i++) {
1568 int ilx_i = i_less_x[i];
1569 int ily_i = i_less_y[i];
1570 int ilz_i = i_less_z[i];
1571 for (
Index k = 0; k < 5; k++) {
1573 PmB(0) * quad4(i, 0, k, m) -
1574 PmC(0) * quad4(i, 0, k, m + 1) +
1575 fac0[k] * dip4(i, 0, ind0[k], m + 1) +
1577 (quad4(ilx_i, 0, k, m) - quad4(ilx_i, 0, k, m + 1));
1579 PmB(1) * quad4(i, 0, k, m) -
1580 PmC(1) * quad4(i, 0, k, m + 1) +
1581 fac1[k] * dip4(i, 0, ind1[k], m + 1) +
1583 (quad4(ily_i, 0, k, m) - quad4(ily_i, 0, k, m + 1));
1585 PmB(2) * quad4(i, 0, k, m) -
1586 PmC(2) * quad4(i, 0, k, m + 1) +
1587 fac2[k] * dip4(i, 0, ind2[k], m + 1) +
1589 (quad4(ilz_i, 0, k, m) - quad4(ilz_i, 0, k, m + 1));
1600 for (
Index m = 0; m < lmax_col - 1; m++) {
1601 for (
Index k = 0; k < 5; k++) {
1602 double term = fak * (quad4(0, 0, k, m) - quad4(0, 0, k, m + 1));
1604 PmB(0) * quad4(0,
Cart::x, k, m) -
1605 PmC(0) * quad4(0,
Cart::x, k, m + 1) +
1606 fac0[k] * dip4(0,
Cart::x, ind0[k], m + 1) + term;
1608 PmB(0) * quad4(0,
Cart::y, k, m) -
1609 PmC(0) * quad4(0,
Cart::y, k, m + 1) +
1610 fac0[k] * dip4(0,
Cart::y, ind0[k], m + 1);
1612 PmB(0) * quad4(0,
Cart::z, k, m) -
1613 PmC(0) * quad4(0,
Cart::z, k, m + 1) +
1614 fac0[k] * dip4(0,
Cart::z, ind0[k], m + 1);
1616 PmB(1) * quad4(0,
Cart::y, k, m) -
1617 PmC(1) * quad4(0,
Cart::y, k, m + 1) +
1618 fac1[k] * dip4(0,
Cart::y, ind1[k], m + 1) + term;
1620 PmB(1) * quad4(0,
Cart::z, k, m) -
1621 PmC(1) * quad4(0,
Cart::z, k, m + 1) +
1622 fac1[k] * dip4(0,
Cart::z, ind1[k], m + 1);
1624 PmB(2) * quad4(0,
Cart::z, k, m) -
1625 PmC(2) * quad4(0,
Cart::z, k, m + 1) +
1626 fac2[k] * dip4(0,
Cart::z, ind2[k], m + 1) + term;
1632 for (
Index m = 0; m < lmax_col - 1; m++) {
1633 for (
Index i = 1; i < n_orbitals[lmax_row]; i++) {
1637 int ilx_i = i_less_x[i];
1638 int ily_i = i_less_y[i];
1639 int ilz_i = i_less_z[i];
1640 for (
Index k = 0; k < 5; k++) {
1642 fak * (quad4(i, 0, k, m) - quad4(i, 0, k, m + 1));
1644 PmB(0) * quad4(i,
Cart::x, k, m) -
1645 PmC(0) * quad4(i,
Cart::x, k, m + 1) +
1646 fac0[k] * dip4(i,
Cart::x, ind0[k], m + 1) +
1648 (quad4(ilx_i,
Cart::x, k, m) -
1649 quad4(ilx_i,
Cart::x, k, m + 1)) +
1652 PmB(0) * quad4(i,
Cart::y, k, m) -
1653 PmC(0) * quad4(i,
Cart::y, k, m + 1) +
1654 fac0[k] * dip4(i,
Cart::y, ind0[k], m + 1) +
1656 (quad4(ilx_i,
Cart::y, k, m) -
1657 quad4(ilx_i,
Cart::y, k, m + 1));
1659 PmB(0) * quad4(i,
Cart::z, k, m) -
1660 PmC(0) * quad4(i,
Cart::z, k, m + 1) +
1661 fac0[k] * dip4(i,
Cart::z, ind0[k], m + 1) +
1663 (quad4(ilx_i,
Cart::z, k, m) -
1664 quad4(ilx_i,
Cart::z, k, m + 1));
1666 PmB(1) * quad4(i,
Cart::y, k, m) -
1667 PmC(1) * quad4(i,
Cart::y, k, m + 1) +
1668 fac1[k] * dip4(i,
Cart::y, ind1[k], m + 1) +
1670 (quad4(ily_i,
Cart::y, k, m) -
1671 quad4(ily_i,
Cart::y, k, m + 1)) +
1674 PmB(1) * quad4(i,
Cart::z, k, m) -
1675 PmC(1) * quad4(i,
Cart::z, k, m + 1) +
1676 fac1[k] * dip4(i,
Cart::z, ind1[k], m + 1) +
1678 (quad4(ily_i,
Cart::z, k, m) -
1679 quad4(ily_i,
Cart::z, k, m + 1));
1681 PmB(2) * quad4(i,
Cart::z, k, m) -
1682 PmC(2) * quad4(i,
Cart::z, k, m + 1) +
1683 fac2[k] * dip4(i,
Cart::z, ind2[k], m + 1) +
1685 (quad4(ilz_i,
Cart::z, k, m) -
1686 quad4(ilz_i,
Cart::z, k, m + 1)) +
1698 for (
Index m = 0; m < lmax_col - 2; m++) {
1699 for (
Index k = 0; k < 5; k++) {
1701 PmB(0) * quad4(0,
Cart::xx, k, m) -
1702 PmC(0) * quad4(0,
Cart::xx, k, m + 1) +
1703 fac0[k] * dip4(0,
Cart::xx, ind0[k], m + 1) +
1707 PmB(1) * quad4(0,
Cart::xx, k, m) -
1708 PmC(1) * quad4(0,
Cart::xx, k, m + 1) +
1709 fac1[k] * dip4(0,
Cart::xx, ind1[k], m + 1);
1711 PmB(2) * quad4(0,
Cart::xx, k, m) -
1712 PmC(2) * quad4(0,
Cart::xx, k, m + 1) +
1713 fac2[k] * dip4(0,
Cart::xx, ind2[k], m + 1);
1715 PmB(0) * quad4(0,
Cart::yy, k, m) -
1716 PmC(0) * quad4(0,
Cart::yy, k, m + 1) +
1717 fac0[k] * dip4(0,
Cart::yy, ind0[k], m + 1);
1719 PmB(0) * quad4(0,
Cart::yz, k, m) -
1720 PmC(0) * quad4(0,
Cart::yz, k, m + 1) +
1721 fac0[k] * dip4(0,
Cart::yz, ind0[k], m + 1);
1723 PmB(0) * quad4(0,
Cart::zz, k, m) -
1724 PmC(0) * quad4(0,
Cart::zz, k, m + 1) +
1725 fac0[k] * dip4(0,
Cart::zz, ind0[k], m + 1);
1727 PmB(1) * quad4(0,
Cart::yy, k, m) -
1728 PmC(1) * quad4(0,
Cart::yy, k, m + 1) +
1729 fac1[k] * dip4(0,
Cart::yy, ind1[k], m + 1) +
1733 PmB(2) * quad4(0,
Cart::yy, k, m) -
1734 PmC(2) * quad4(0,
Cart::yy, k, m + 1) +
1735 fac2[k] * dip4(0,
Cart::yy, ind2[k], m + 1);
1737 PmB(1) * quad4(0,
Cart::zz, k, m) -
1738 PmC(1) * quad4(0,
Cart::zz, k, m + 1) +
1739 fac1[k] * dip4(0,
Cart::zz, ind1[k], m + 1);
1741 PmB(2) * quad4(0,
Cart::zz, k, m) -
1742 PmC(2) * quad4(0,
Cart::zz, k, m + 1) +
1743 fac2[k] * dip4(0,
Cart::zz, ind2[k], m + 1) +
1751 for (
Index m = 0; m < lmax_col - 2; m++) {
1752 for (
Index i = 1; i < n_orbitals[lmax_row]; i++) {
1756 int ilx_i = i_less_x[i];
1757 int ily_i = i_less_y[i];
1758 int ilz_i = i_less_z[i];
1759 for (
Index k = 0; k < 5; k++) {
1770 PmB(0) * quad4(i,
Cart::xx, k, m) -
1771 PmC(0) * quad4(i,
Cart::xx, k, m + 1) +
1772 fac0[k] * dip4(i,
Cart::xx, ind0[k], m + 1) +
1775 quad4(ilx_i,
Cart::xx, k, m + 1)) +
1778 PmB(1) * quad4(i,
Cart::xx, k, m) -
1779 PmC(1) * quad4(i,
Cart::xx, k, m + 1) +
1780 fac1[k] * dip4(i,
Cart::xx, ind1[k], m + 1) +
1785 PmB(2) * quad4(i,
Cart::xx, k, m) -
1786 PmC(2) * quad4(i,
Cart::xx, k, m + 1) +
1787 fac2[k] * dip4(i,
Cart::xx, ind2[k], m + 1) +
1792 PmB(0) * quad4(i,
Cart::yy, k, m) -
1793 PmC(0) * quad4(i,
Cart::yy, k, m + 1) +
1794 fac0[k] * dip4(i,
Cart::yy, ind0[k], m + 1) +
1799 PmB(0) * quad4(i,
Cart::yz, k, m) -
1800 PmC(0) * quad4(i,
Cart::yz, k, m + 1) +
1801 fac0[k] * dip4(i,
Cart::yz, ind0[k], m + 1) +
1806 PmB(0) * quad4(i,
Cart::zz, k, m) -
1807 PmC(0) * quad4(i,
Cart::zz, k, m + 1) +
1808 fac0[k] * dip4(i,
Cart::zz, ind0[k], m + 1) +
1813 PmB(1) * quad4(i,
Cart::yy, k, m) -
1814 PmC(1) * quad4(i,
Cart::yy, k, m + 1) +
1815 fac1[k] * dip4(i,
Cart::yy, ind1[k], m + 1) +
1818 quad4(ily_i,
Cart::yy, k, m + 1)) +
1821 PmB(2) * quad4(i,
Cart::yy, k, m) -
1822 PmC(2) * quad4(i,
Cart::yy, k, m + 1) +
1823 fac2[k] * dip4(i,
Cart::yy, ind2[k], m + 1) +
1828 PmB(1) * quad4(i,
Cart::zz, k, m) -
1829 PmC(1) * quad4(i,
Cart::zz, k, m + 1) +
1830 fac1[k] * dip4(i,
Cart::zz, ind1[k], m + 1) +
1835 PmB(2) * quad4(i,
Cart::zz, k, m) -
1836 PmC(2) * quad4(i,
Cart::zz, k, m + 1) +
1837 fac2[k] * dip4(i,
Cart::zz, ind2[k], m + 1) +
1840 quad4(ilz_i,
Cart::zz, k, m + 1)) +
1852 for (
Index m = 0; m < lmax_col - 3; m++) {
1853 for (
Index k = 0; k < 5; k++) {
1854 double term_xx = fak * (quad4(0,
Cart::xx, k, m) -
1856 double term_yy = fak * (quad4(0,
Cart::yy, k, m) -
1858 double term_zz = fak * (quad4(0,
Cart::zz, k, m) -
1862 PmC(0) * quad4(0,
Cart::xxx, k, m + 1) +
1863 fac0[k] * dip4(0,
Cart::xxx, ind0[k], m + 1) + 3 * term_xx;
1866 PmC(1) * quad4(0,
Cart::xxx, k, m + 1) +
1867 fac1[k] * dip4(0,
Cart::xxx, ind1[k], m + 1);
1870 PmC(2) * quad4(0,
Cart::xxx, k, m + 1) +
1871 fac2[k] * dip4(0,
Cart::xxx, ind2[k], m + 1);
1874 PmC(0) * quad4(0,
Cart::xyy, k, m + 1) +
1875 fac0[k] * dip4(0,
Cart::xyy, ind0[k], m + 1) + term_yy;
1878 PmC(1) * quad4(0,
Cart::xxz, k, m + 1) +
1879 fac1[k] * dip4(0,
Cart::xxz, ind1[k], m + 1);
1882 PmC(0) * quad4(0,
Cart::xzz, k, m + 1) +
1883 fac0[k] * dip4(0,
Cart::xzz, ind0[k], m + 1) + term_zz;
1886 PmC(0) * quad4(0,
Cart::yyy, k, m + 1) +
1887 fac0[k] * dip4(0,
Cart::yyy, ind0[k], m + 1);
1890 PmC(0) * quad4(0,
Cart::yyz, k, m + 1) +
1891 fac0[k] * dip4(0,
Cart::yyz, ind0[k], m + 1);
1894 PmC(0) * quad4(0,
Cart::yzz, k, m + 1) +
1895 fac0[k] * dip4(0,
Cart::yzz, ind0[k], m + 1);
1898 PmC(0) * quad4(0,
Cart::zzz, k, m + 1) +
1899 fac0[k] * dip4(0,
Cart::zzz, ind0[k], m + 1);
1902 PmC(1) * quad4(0,
Cart::yyy, k, m + 1) +
1903 fac1[k] * dip4(0,
Cart::yyy, ind1[k], m + 1) + 3 * term_yy;
1906 PmC(2) * quad4(0,
Cart::yyy, k, m + 1) +
1907 fac2[k] * dip4(0,
Cart::yyy, ind2[k], m + 1);
1910 PmC(1) * quad4(0,
Cart::yzz, k, m + 1) +
1911 fac1[k] * dip4(0,
Cart::yzz, ind1[k], m + 1) + term_zz;
1914 PmC(1) * quad4(0,
Cart::zzz, k, m + 1) +
1915 fac1[k] * dip4(0,
Cart::zzz, ind1[k], m + 1);
1918 PmC(2) * quad4(0,
Cart::zzz, k, m + 1) +
1919 fac2[k] * dip4(0,
Cart::zzz, ind2[k], m + 1) + 3 * term_zz;
1925 for (
Index m = 0; m < lmax_col - 3; m++) {
1926 for (
Index i = 1; i < n_orbitals[lmax_row]; i++) {
1930 int ilx_i = i_less_x[i];
1931 int ily_i = i_less_y[i];
1932 int ilz_i = i_less_z[i];
1933 for (
Index k = 0; k < 5; k++) {
1934 double term_xx = fak * (quad4(i,
Cart::xx, k, m) -
1936 double term_yy = fak * (quad4(i,
Cart::yy, k, m) -
1938 double term_zz = fak * (quad4(i,
Cart::zz, k, m) -
1942 PmC(0) * quad4(i,
Cart::xxx, k, m + 1) +
1943 fac0[k] * dip4(i,
Cart::xxx, ind0[k], m + 1) +
1950 PmC(1) * quad4(i,
Cart::xxx, k, m + 1) +
1951 fac1[k] * dip4(i,
Cart::xxx, ind1[k], m + 1) +
1957 PmC(2) * quad4(i,
Cart::xxx, k, m + 1) +
1958 fac2[k] * dip4(i,
Cart::xxx, ind2[k], m + 1) +
1964 PmC(0) * quad4(i,
Cart::xyy, k, m + 1) +
1965 fac0[k] * dip4(i,
Cart::xyy, ind0[k], m + 1) +
1972 PmC(1) * quad4(i,
Cart::xxz, k, m + 1) +
1973 fac1[k] * dip4(i,
Cart::xxz, ind1[k], m + 1) +
1979 PmC(0) * quad4(i,
Cart::xzz, k, m + 1) +
1980 fac0[k] * dip4(i,
Cart::xzz, ind0[k], m + 1) +
1987 PmC(0) * quad4(i,
Cart::yyy, k, m + 1) +
1988 fac0[k] * dip4(i,
Cart::yyy, ind0[k], m + 1) +
1994 PmC(0) * quad4(i,
Cart::yyz, k, m + 1) +
1995 fac0[k] * dip4(i,
Cart::yyz, ind0[k], m + 1) +
2001 PmC(0) * quad4(i,
Cart::yzz, k, m + 1) +
2002 fac0[k] * dip4(i,
Cart::yzz, ind0[k], m + 1) +
2008 PmC(0) * quad4(i,
Cart::zzz, k, m + 1) +
2009 fac0[k] * dip4(i,
Cart::zzz, ind0[k], m + 1) +
2015 PmC(1) * quad4(i,
Cart::yyy, k, m + 1) +
2016 fac1[k] * dip4(i,
Cart::yyy, ind1[k], m + 1) +
2023 PmC(2) * quad4(i,
Cart::yyy, k, m + 1) +
2024 fac2[k] * dip4(i,
Cart::yyy, ind2[k], m + 1) +
2030 PmC(1) * quad4(i,
Cart::yzz, k, m + 1) +
2031 fac1[k] * dip4(i,
Cart::yzz, ind1[k], m + 1) +
2038 PmC(1) * quad4(i,
Cart::zzz, k, m + 1) +
2039 fac1[k] * dip4(i,
Cart::zzz, ind1[k], m + 1) +
2045 PmC(2) * quad4(i,
Cart::zzz, k, m + 1) +
2046 fac2[k] * dip4(i,
Cart::zzz, ind2[k], m + 1) +
2058 multipole += quadrupole(0, 1) *
2059 Eigen::Map<Eigen::MatrixXd>(quad4.data(), nrows, ncols);
2062 Eigen::Map<Eigen::MatrixXd>(quad4.data() + offset, nrows, ncols);
2064 quadrupole(1, 2) * Eigen::Map<Eigen::MatrixXd>(
2065 quad4.data() + 2 * offset, nrows, ncols);
2066 multipole += 0.5 * quadrupole(0, 0) *
2067 Eigen::Map<Eigen::MatrixXd>(quad4.data() + 3 * offset,
2069 multipole += 0.5 * quadrupole(1, 1) *
2070 Eigen::Map<Eigen::MatrixXd>(quad4.data() + 4 * offset,
2079 shell_col.getCartesianNumFunc());