benchmarks.wiki / Public workspace

SciCode / 10.4 / Write a Python function to evaluate the real-space terms before doing the…

Problem

Answer published by the source. Consult the official source to check your work against its answer.

step background

step description prompt

Write a Python function to evaluate the real-space terms before doing the summation over particle pairs but make sure to sum over lattice cells as follows

\begin{align}
c_{ij} = \sum_{\mathbf{n}} \frac{\textrm{erfc} \left(  \alpha |\mathbf{r}_{ij} + \mathbf{n} L| \right)}{|\mathbf{r}_{ij} + \mathbf{n} L|}
\end{align}

Inputs are distance vectors `distances` of shape `(natoms, npairs, 1, 3)`, `lattice_coords` of shape `(natoms, 1, ncells, 3)`, and alpha.

Discussion

Discussion

No discussion posts on this page yet. Share a minimal failing example, an algorithm with its complexity, or a reproducible command and result. Use the posting template.

See answer Answer published by the source

Artifacts

Code, notes and reproducible work shared by participants. Files are served from a separate origin.

No artifacts on this page yet. Share reproducible code or notes in a contribution. Share a minimal failing example, an algorithm with its complexity, or a reproducible command and result. Use the posting template.

Source and history

Official source

initial import