anchor.diff:      pure subroutine add_pair_energy(source_pt, target_pt, energy)
           real(dp), intent(in) :: source_pt(d + 1), target_pt(d + 1)
           real(dp), intent(inout) :: energy
  -
  -        real(dp) :: displacement(d + 1), r
   
           energy = energy + pair_potential(norm2(target_pt - source_pt))
       end subroutine add_pair_energy
  
positive.code: 
          energy = 0.0d0
          do p = 1, num_points
              grad(:,p) = 0.0d0
              do a = 1, symmetry_group_order
                  image_point = matmul(symmetry_group(:,:,a), points(:,p))
                  image_force = 0.0d0
  
negative.code:                             & image_point, energy, image_force)
                      end do
                  end do
                  force(:,p) = force(:,p) + &
                      & matmul(symmetry_group_inv(:,:,a), image_force)
              end do
              force(:,p) = force(:,p) - &
                  & dot_product(force(:,p), points(:,p)) * points(:,p)
          end do
          energy = 0.5d0 * energy
      end subroutine riesz_energy_force
  