everything is now working correctly (hopefully) including the boundary
conditions! (boundary conditions checked to work properly by hand and by
VMD)