anchor.diff:              end do
           end do
           riesz_energy = 0.5d0 * riesz_energy
  -    end subroutine riesz_energy
  +    end function riesz_energy
   
   
       pure subroutine riesz_energy_force(points, energy, force)
  
positive.code:                             & image_point, energy, image_force)
                      end do
                  end do
                  grad(:,p) = grad(:,p) + &
                      & matmul(symmetry_group_inv(:,:,a), image_force)
              end do
              grad(:,p) = grad(:,p) - &
                  & dot_product(grad(:,p), points(:,p)) * points(:,p)
          end do
          energy = 0.5d0 * energy
      end subroutine riesz_energy_force
  
negative.code: 
          energy = 0.0d0
          do p = 1, num_points
              force(:,p) = 0.0d0
              do a = 1, symmetry_group_order
                  image_point = matmul(symmetry_group(:,:,a), points(:,p))
                  image_force = 0.0d0
  