diff --git a/pyscf/dft/numint.py b/pyscf/dft/numint.py index 0b9b7203f4..47232c0826 100644 --- a/pyscf/dft/numint.py +++ b/pyscf/dft/numint.py @@ -2847,7 +2847,7 @@ def _gen_rho_evaluator(self, mol, dms, hermi=0, with_lapl=True, grids=None): if hermi != 1 and dms[0].dtype == numpy.double: # (D + D.T)/2 because eval_rho computes 2*(|\nabla i> D_ij D_ij D_ij <\nabla j| for efficiency when dm is real - dms = lib.hermi_sum(dms, axes=(0,2,1)) * .5 + dms = lib.hermi_sum(numpy.asarray(dms, order='C'), axes=(0,2,1)) * .5 hermi = 1 nao = dms[0].shape[0] diff --git a/pyscf/lib/dft/nr_numint.c b/pyscf/lib/dft/nr_numint.c index a979741bd0..5f97cf4277 100644 --- a/pyscf/lib/dft/nr_numint.c +++ b/pyscf/lib/dft/nr_numint.c @@ -17,6 +17,7 @@ */ #include +#include #include #include "config.h" #include "gto/grid_ao_drv.h" diff --git a/pyscf/lib/dft/numint_uniform_grid.c b/pyscf/lib/dft/numint_uniform_grid.c index 248a0c6f19..863f2331c8 100644 --- a/pyscf/lib/dft/numint_uniform_grid.c +++ b/pyscf/lib/dft/numint_uniform_grid.c @@ -21,6 +21,7 @@ #include #include +#include #include #include #include diff --git a/pyscf/lib/dft/r_numint.c b/pyscf/lib/dft/r_numint.c index 7872d73444..2e044ddac8 100644 --- a/pyscf/lib/dft/r_numint.c +++ b/pyscf/lib/dft/r_numint.c @@ -18,6 +18,7 @@ #include #include +#include #include #include "config.h" #include "gto/grid_ao_drv.h" diff --git a/pyscf/lib/gto/deriv1.c b/pyscf/lib/gto/deriv1.c index 9cd6ad95cc..89b1422704 100644 --- a/pyscf/lib/gto/deriv1.c +++ b/pyscf/lib/gto/deriv1.c @@ -17,6 +17,7 @@ */ #include +#include #include #include #include "grid_ao_drv.h" diff --git a/pyscf/lib/gto/deriv2.c b/pyscf/lib/gto/deriv2.c index e9d73ee9d7..e9fa27e6bf 100644 --- a/pyscf/lib/gto/deriv2.c +++ b/pyscf/lib/gto/deriv2.c @@ -17,6 +17,7 @@ */ #include +#include #include #include #include "gto/grid_ao_drv.h" diff --git a/pyscf/lib/gto/ft_ao.c b/pyscf/lib/gto/ft_ao.c index 2eb071b598..85392288c9 100644 --- a/pyscf/lib/gto/ft_ao.c +++ b/pyscf/lib/gto/ft_ao.c @@ -44,6 +44,7 @@ #include #include +#include #include #include #include diff --git a/pyscf/lib/gto/grid_ao_drv.c b/pyscf/lib/gto/grid_ao_drv.c index 1a8e2fb3ae..fde945f325 100644 --- a/pyscf/lib/gto/grid_ao_drv.c +++ b/pyscf/lib/gto/grid_ao_drv.c @@ -18,6 +18,7 @@ #include #include +#include #include #include "config.h" #include "grid_ao_drv.h" diff --git a/pyscf/lib/pbc/cint3c2e.c b/pyscf/lib/pbc/cint3c2e.c index 2152c7fdf9..8c1912f9f6 100644 --- a/pyscf/lib/pbc/cint3c2e.c +++ b/pyscf/lib/pbc/cint3c2e.c @@ -18,6 +18,7 @@ #include #include +#include #include //#include #include "config.h" diff --git a/pyscf/lib/pbc/fill_ints.c b/pyscf/lib/pbc/fill_ints.c index dc818100e5..4ceae68a9f 100644 --- a/pyscf/lib/pbc/fill_ints.c +++ b/pyscf/lib/pbc/fill_ints.c @@ -17,6 +17,7 @@ */ #include +#include #include #include #include diff --git a/pyscf/lib/pbc/fill_ints_sr.c b/pyscf/lib/pbc/fill_ints_sr.c index c09065d29b..3ddf69c545 100644 --- a/pyscf/lib/pbc/fill_ints_sr.c +++ b/pyscf/lib/pbc/fill_ints_sr.c @@ -17,6 +17,7 @@ */ #include +#include #include #include #include diff --git a/pyscf/lib/pbc/grid_ao.c b/pyscf/lib/pbc/grid_ao.c index 63b0f4e6a3..ca144a4ea0 100644 --- a/pyscf/lib/pbc/grid_ao.c +++ b/pyscf/lib/pbc/grid_ao.c @@ -17,6 +17,7 @@ */ #include +#include #include #include #include "config.h" diff --git a/pyscf/lib/pbc/nr_direct.c b/pyscf/lib/pbc/nr_direct.c index 723ca608ef..9df7cad102 100644 --- a/pyscf/lib/pbc/nr_direct.c +++ b/pyscf/lib/pbc/nr_direct.c @@ -17,6 +17,7 @@ */ #include +#include #include #include //#include