Calculate derivative of Madelung matrix (interactions of pt charges in 3-D periodic supercell) dotted with atomic positions. From Nielsen and Martin, Phys. Rev. B 32, (1985).
number of atoms (input)
periodic supercell vectors (input)
periodic supercell vectors (input)
periodic supercell vectors (input)
atomic positions (input)
derivative of Madelung matrix dotted with atomic positions (output)