diff --git a/gpaw/lcaotddft/dipolemomentwriter.py b/gpaw/lcaotddft/dipolemomentwriter.py
index 96542c76d..095604b61 100644
--- a/gpaw/lcaotddft/dipolemomentwriter.py
+++ b/gpaw/lcaotddft/dipolemomentwriter.py
@@ -25,10 +25,9 @@ class DipoleMomentWriter(TDDFTObserver):
     version = 1
 
     def __init__(self, paw, filename, center=False, density='comp',
-                 interval=1, do_other=False):
+                 interval=1):
         TDDFTObserver.__init__(self, paw, interval)
         self.master = paw.world.rank == 0
-        self.do_other = do_other
         if paw.niter == 0:
             # Initialize
             self.do_center = center
@@ -118,12 +117,16 @@ class DipoleMomentWriter(TDDFTObserver):
             self._write_header(paw)
         elif paw.action == 'kick':
             self._write_kick(paw)
-        if self.do_other:
-            self._write_thing(paw)
-        else:
-            self._write_dm(paw)
+        self._write_dm(paw)
+
+    def __del__(self):
+        if self.master:
+            self.fd.close()
+        TDDFTObserver.__del__(self)
 
-    def _write_thing(self, paw):
+
+class MomentumWriter(DipoleMomentWriter):
+    def _write_dm(self, paw):
         # XXXXXXXXXXX pasted from somewhere, fix this
         wfs = paw.wfs
         tci = wfs.manytci
@@ -132,6 +135,29 @@ class DipoleMomentWriter(TDDFTObserver):
 
         dThetadR_qvMM, _ = tci.O_qMM_T_qMM(wfs.gd.comm, Mstart, Mstop, False,
                                            derivative=True)
+
+        for q, dThetadR_vMM in enumerate(dThetadR_qvMM):
+            for v in range(3):
+                AdotD_MM = dThetadR_vMM[v]
+                # XXXXXXXXXXXXXXXXXXXXX
+                #iA_11v = 1j * self.kick[None, None, :]
+                partition = paw.hamiltonian.dH_asp.partition
+                dAdotD_aii = partition.arraydict([setup.dO_ii.shape
+                                                  for setup in wfs.setups],
+                                                 dtype=complex)
+
+                for a, dAdotD_ii in dAdotD_aii.items():
+                    nabla_iiv = wfs.setups[a].nabla_iiv
+                    if nabla_iiv is None:  # E.g. sg15 pseudopotential
+                        continue
+                    #dAdotD_ii[:] = (nabla_iiv * iA_11v).sum(-1)
+                    dAdotD_ii[:] = nabla_iiv[:, :, v]#.sum(-1)
+                #AdotD_MM = self.AdotD_qMM[q].copy()
+                corr = wfs.atomic_correction
+                corr.calculate(wfs, q, dAdotD_aii, AdotD_MM)
+            # XXXXXXXXXXXXXXXX
+
+        
         # XXXXXXXXXXXXXX end of paste
 
         dm = []
@@ -140,14 +166,12 @@ class DipoleMomentWriter(TDDFTObserver):
             for kpt in wfs.kpt_u:
                 rho_mM = wfs.calculate_density_matrix(kpt.f_n, kpt.C_nM)
                 dThetadR_MM = dThetadR_qvMM[kpt.q, v]
+
+
+
                 xx += kpt.weight * (rho_mM * dThetadR_MM).imag.sum()
             dm.append(xx)
-        
+
         line = ('%20.8lf %20.8le %22.12le %22.12le %22.12le\n' %
                 (paw.time, 0.0, dm[0], dm[1], dm[2]))
         self._write(line)
-
-    def __del__(self):
-        if self.master:
-            self.fd.close()
-        TDDFTObserver.__del__(self)
diff --git a/gpaw/lcaotddft/hamiltonian.py b/gpaw/lcaotddft/hamiltonian.py
index 4fee54860..48ee1da2e 100644
--- a/gpaw/lcaotddft/hamiltonian.py
+++ b/gpaw/lcaotddft/hamiltonian.py
@@ -12,15 +12,6 @@ class TimeDependentPotential(object):
         self.ext = ext
         self.laser = laser
 
-    def initialize(self, paw):
-        get_matrix = paw.wfs.eigensolver.calculate_hamiltonian_matrix
-        hamiltonian = KickHamiltonian(paw.hamiltonian, paw.density, self.ext)
-        self.V_uMM = []
-        for kpt in paw.wfs.kpt_u:
-            V_MM = get_matrix(hamiltonian, paw.wfs, kpt,
-                              add_kinetic=False, root=-1)
-            self.V_uMM.append(V_MM)
-
     def get_MM(self, u, time):
         return self.laser.strength(time) * self.V_uMM[u]
 
@@ -43,12 +34,33 @@ class OtherTimeDependentPotential(TimeDependentPotential):
                                            derivative=True)
 
         AdotD_qMM = (dThetadR_qvMM * A[None, :, None, None]).sum(axis=1)
+        self.dH_asp = paw.hamiltonian.dH_asp
         self.AdotD_qMM = AdotD_qMM
         self.wfs = wfs
 
     def get_MM(self, u, time):
-        q = self.wfs.kpt_u[u].q
-        return self.AdotD_qMM[q].copy()
+        wfs = self.wfs
+        q = wfs.kpt_u[u].q
+        corr = wfs.atomic_correction
+
+        iA_11v = 1j * self.kick[None, None, :]
+
+        partition = self.dH_asp.partition
+        dAdotD_aii = partition.arraydict([setup.dO_ii.shape
+                                          for setup in wfs.setups],
+                                         dtype=complex)
+
+
+        for a, dAdotD_ii in dAdotD_aii.items():
+            nabla_iiv = wfs.setups[a].nabla_iiv
+            if nabla_iiv is None:  # E.g. sg15 pseudopotential
+                continue
+
+            dAdotD_ii[:] = (nabla_iiv * iA_11v).sum(-1)
+
+        AdotD_MM = self.AdotD_qMM[q].copy()
+        corr.calculate(wfs, q, dAdotD_aii, AdotD_MM)
+        return AdotD_MM
 
     def write(self, writer):
         pass
diff --git a/gpaw/lcaotddft/laser.py b/gpaw/lcaotddft/laser.py
index 0a35f701a..a5b476fa7 100644
--- a/gpaw/lcaotddft/laser.py
+++ b/gpaw/lcaotddft/laser.py
@@ -13,6 +13,14 @@ class Laser(object):
         return 0.0
 
 
+class StepImpulse(Laser):
+    def __init__(self, strength):
+        self._strength = strength
+
+    def strength(self, t):
+        return self._strength
+
+
 class GaussianImpulse(Laser):
     """
     Laser with Gaussian envelope.
