glotzerlab / freud

Powerful, efficient particle trajectory analysis in scientific Python.
https://freud.readthedocs.io
BSD 3-Clause "New" or "Revised" License
276 stars 49 forks source link

Networks for Common Neighbor Analysis #211

Closed bdice closed 5 years ago

bdice commented 5 years ago

Common Neighbor Analysis (Honeycutt and Andersen, J. Phys. Chem. 91, 4950) is a popular tool for structural analysis. This would be a useful feature for some kinds of topological neighborhood analysis. Implementations exist in OVITO and asap3.

I propose the creation of a freud.network.Network class that would allow for the creation of a network from a NeighborQuery (development in progress) or NeighborList object, and a corresponding class freud.network.CommonNeighborAnalysis that uses the Network class to compute CNA fingerprints for particles.

I think the Network class should wrap a networkx graph, storing particle positions as node properties and neighbor distances as edge properties. This would greatly accelerate user-specified analysis outside of freud.

I chose networkx because it is pure Python and easy to install. The graph_tool library (https://graph-tool.skewed.de/) is much faster than networkx but is very difficult to install. In this case, I think a pure-Python approach would be warranted for compatibility with such a common tool.

bdice commented 5 years ago

Closing due to lack of interest.