WagnerGroup / pyqmc

Python library for real space quantum Monte Carlo
MIT License
82 stars 33 forks source link

Condense ewald2d #417

Closed willwheelera closed 10 months ago

willwheelera commented 10 months ago

This comes after PR #413 , which updates the distance interface in ewald2d.

Several separate functions computed the same distances to calculate different contributions to the Ewald sum. This PR also consolidates those functions, removing redundant distance computations and repeated code. The real_cij function in ewald.py is separated out of the Ewald class so that Ewald2d can import it, rather than defining the same function.