m3g / CellListMap.jl

Flexible implementation of cell lists to map the calculations of particle-pair dependent functions, such as forces, energies, neighbor lists, etc.
https://m3g.github.io/CellListMap.jl/
MIT License
87 stars 4 forks source link

Suggestion: Is it possible to output the coordinates and size of cells so one can visualize them? #76

Closed AhmedSalih3d closed 1 year ago

AhmedSalih3d commented 1 year ago

Hello!

Thank you for the help :)

Something similar to this in a sense:

image

So that one can visualize the grid used for the neighbour search. I know it is uniform cells and the cell width is 2x cutoff, but could not find the cell center coordinates

Kind regards

lmiq commented 1 year ago

There is an internal testing function for that:

using Plots
using CellListMap
x, box = CellListMap.xatomic(10^4) # example
CellListMap.draw_computing_cell(x,box)

but note that this is internal and created only for testing. Do not expect that it necessarily works flawlessly or keeps available for ever.

AhmedSalih3d commented 1 year ago

Thank you very much!

I will have a look at the source code for that function