Move tests a bit

parent 37366422
Pipeline #99943342 failed with stage
in 2 minutes and 7 seconds
......@@ -37,14 +37,18 @@ class EXX:
setups: List['Setup'],
pt,
coulomb,
spos_ac,
timer):
spos_ac: np.ndarray,
timer=None):
"""Exact exchange operator."""
self.kd = kd
self.setups = setups
self.pt = pt
self.coulomb = coulomb
self.spos_ac = spos_ac
if timer is None:
from gpaw.utilities.timing import NullTimer
timer = NullTimer()
self.timer = timer
self.comm = self.pt.comm
......
from myqueue.task import task
def create_tasks():
return [task('kpts.py')]
......@@ -3,7 +3,7 @@ from ase import Atoms
from gpaw.kpt_descriptor import KPointDescriptor
from gpaw.grid_descriptor import GridDescriptor
from gpaw.response.wstc import WignerSeitzTruncatedCoulomb as WSTC
from gpaw.xc.hf import EXX, KPoint
from gpaw.hybrids.exx import EXX, KPoint
from gpaw.symmetry import Symmetry
from gpaw.wavefunctions.arrays import PlaneWaveExpansionWaveFunctions
from gpaw.wavefunctions.pw import PWDescriptor, PWLFC
......@@ -11,6 +11,10 @@ from gpaw.projections import Projections
from gpaw.mpi import world
from gpaw.spline import Spline
if world.size > 1:
from unittest import SkipTest
raise SkiipTest
N = 20
L = 2.5
nb = 2
......@@ -76,4 +80,4 @@ VV_aii = {a: np.einsum('n, ni, nj -> ij', f_n, P_ni, P_ni.conj()) * C
xm = xx.calculate([kpt], [kpt], VV_aii)
d = (xp[0] + xp[1] - xm[0] - xm[1]) / (2 * eps) * N**6 / L**3 / 2
print(v / d)
assert abs(v - d) < 1e-10, (v, d)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment