diff --git a/pyscf/pbc/dft/multigrid/multigrid_pair.py b/pyscf/pbc/dft/multigrid/multigrid_pair.py index 6b06199177..7388a80e1d 100644 --- a/pyscf/pbc/dft/multigrid/multigrid_pair.py +++ b/pyscf/pbc/dft/multigrid/multigrid_pair.py @@ -83,6 +83,7 @@ class GridLevel_Info(ctypes.Structure): ''' Info about the grid levels. ''' + __slots__ = [] _fields_ = [("nlevels", ctypes.c_int), # number of grid levels ("rel_cutoff", ctypes.c_double), ("cutoff", ctypes.POINTER(ctypes.c_double)), @@ -92,6 +93,7 @@ class RS_Grid(ctypes.Structure): ''' Values on real space multigrid. ''' + __slots__ = [] _fields_ = [("nlevels", ctypes.c_int), ("gridlevel_info", ctypes.POINTER(GridLevel_Info)), ("comp", ctypes.c_int), @@ -102,6 +104,7 @@ class PGFPair(ctypes.Structure): ''' A primitive Gaussian function pair. ''' + __slots__ = [] _fields_ = [("ish", ctypes.c_int), ("ipgf", ctypes.c_int), ("jsh", ctypes.c_int), @@ -114,6 +117,7 @@ class Task(ctypes.Structure): ''' A single task. ''' + __slots__ = [] _fields_ = [("buf_size", ctypes.c_size_t), ("ntasks", ctypes.c_size_t), ("pgfpairs", ctypes.POINTER(ctypes.POINTER(PGFPair))), @@ -124,6 +128,7 @@ class TaskList(ctypes.Structure): ''' A task list. ''' + __slots__ = [] _fields_ = [("nlevels", ctypes.c_int), ("hermi", ctypes.c_int), ("gridlevel_info", ctypes.POINTER(GridLevel_Info)), diff --git a/pyscf/pbc/gto/_pbcintor.py b/pyscf/pbc/gto/_pbcintor.py index c5b921b2e0..5b97c2ecd7 100644 --- a/pyscf/pbc/gto/_pbcintor.py +++ b/pyscf/pbc/gto/_pbcintor.py @@ -61,6 +61,7 @@ def __del__(self): pass class _CPBCOpt(ctypes.Structure): + __slots__ = [] _fields_ = [('rrcut', ctypes.c_void_p), ('rcut', ctypes.c_void_p), ('fprescreen', ctypes.c_void_p)] diff --git a/pyscf/pbc/gto/neighborlist.py b/pyscf/pbc/gto/neighborlist.py index f4a0527ee2..c380011698 100644 --- a/pyscf/pbc/gto/neighborlist.py +++ b/pyscf/pbc/gto/neighborlist.py @@ -24,6 +24,7 @@ libpbc = lib.load_library('libpbc') class _CNeighborPair(ctypes.Structure): + __slots__ = [] _fields_ = [("nimgs", ctypes.c_int), ("Ls_list", ctypes.POINTER(ctypes.c_int)), ("q_cond", ctypes.POINTER(ctypes.c_double)), @@ -31,6 +32,7 @@ class _CNeighborPair(ctypes.Structure): class _CNeighborList(ctypes.Structure): + __slots__ = [] _fields_ = [("nish", ctypes.c_int), ("njsh", ctypes.c_int), ("nimgs", ctypes.c_int), @@ -38,6 +40,7 @@ class _CNeighborList(ctypes.Structure): class _CNeighborListOpt(ctypes.Structure): + __slots__ = [] _fields_ = [("nl", ctypes.POINTER(_CNeighborList)), ('fprescreen', ctypes.c_void_p)] diff --git a/pyscf/scf/_vhf.py b/pyscf/scf/_vhf.py index 313407a957..78ae6437e2 100644 --- a/pyscf/scf/_vhf.py +++ b/pyscf/scf/_vhf.py @@ -300,6 +300,7 @@ def set_dm(self, dm, atm, bas, env): class _CVHFOpt(ctypes.Structure): + __slots__ = [] _fields_ = [('nbas', ctypes.c_int), ('ngrids', ctypes.c_int), ('direct_scf_tol', ctypes.c_double),