amepproject / amep

The Active Matter Evaluation Package (AMEP) - a Python library for the analysis of particle-based and continuum simulation data of soft and active matter systems
https://amepproject.de/
GNU General Public License v3.0
11 stars 2 forks source link

FRQ: Dynamical structure factor #23

Open kai-luca opened 5 months ago

kai-luca commented 5 months ago

Proposed new feature or change:

It turns out that a dynamical structure factor is not only really useful for glassy people but also for my breathing particles. So I'm gonna start to implement this. But first I'll have to read up a bit.

aritra-mukhopadhyay commented 2 months ago

I came across a package which implements dynamic structure factor: https://dynasor.materialsmodeling.org/index.html And the related paper: https://onlinelibrary.wiley.com/doi/10.1002/adts.202000240

kai-luca commented 2 months ago

Thanks for the paper and the package. They do the dynamic structure factor really well. Unfortunately they use their own trajectory format for all their calculations so I would have to look into that. But I think we have two possibilities:

  1. We could just add dynasor as a dependency to amep and write wrappers around our their stuff.
  2. We could re-implement their algorithms and optimize them for our trajectories. In the spirit of open software my preferred way to do this would be proposal 1. As they are also a pure python library we would stay as platform independent as we are at the moment. We would gain dependencies on:

ASE and MDAnalysis are used for trajectory reading and might also help us with more compatibility to other simulation data formats. pandas is used by them for data output. We already threw it out so it is really irrelevant.

On the other hand using their stuff and optimizing their upstream code for our use would improve both our and their code base.

kai-luca commented 2 months ago

So now I need your opinions on what to do.

aritra-mukhopadhyay commented 2 months ago

I also think it's a better idea to implement proposal 1 after reading the advantages.

kai-luca commented 2 months ago

So we talked it over. Since MDAnalysis is a full alternative data analysis framework we do not want it as a dependency. Also we have half of the stuff dynasor implements already implemented in amep. So my plan now is to implement the stuff they did in dynasor in a similar way (and maybe try some optimizations). If I manage to make some sensible optimizations I will also send them upstream to dynasor in the spirit of open software.