Add computations with cell and neighbor list to the DirectPotential
class
#33
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As in the title, I added the ability to pass a neighbor list and a cell to the
DirectPotential
class. A user can only pass a cell and neighbor shifts to take the periodic boundary conditions into account and/or additional neighbor indices to limit the pairs for which the potential should be computed.For the background. I need this extension to subtract "intra" molecular interaction between atoms. To compute these it is mandatory to pass explicit neighbor indices and the cell.
While adding this feature I unified the distances operations and put them together with a function for computing all possible neighbor indices of a system into a file called
neighbors.py
. I am not super happy with the file name. If there are better ideas, I am happy to rename.I also fixed some layout issues for the
potentials.py
and enabled the rendering in the docs for this file.TODO
DirectPotentail
withneighbor_indices
DirectPotentail
withcell
andneighbor_shifts
DirectPotentail
withneighbor_indices
,cell
andneighbor_shifts