Skip to content

Add accelerated backends support for minimize_vectors #5234

@PardhavMaradani

Description

@PardhavMaradani

Is your feature request related to a problem?

minimize_vectors is one of the few distance functions that currently doesn't support the backend keyword.

I would like to use minimize_vectors instead of distance_array to perform compact wrapping of trajectories for visualization in Molecular Nodes (the equivalent of gmx trjconv -ur compact). Preliminary testing indicates that this is significantly faster than using distance_array for that computation (see corresponding PR for some comparisons) and can get even better with openmp and distopia accelerated backend support.

Describe the solution you'd like

I would like minimize_vectors to support both the OpenMP and distopia accelerated backends.

Describe alternatives you've considered

The alternative is to use the current cython version of minimize_vectors.

Additional context

MN added support for displaying a simulation box for trajectories (generic Wigner-Seitz cell) as part of MN PR #981. MDAnalysis currently does not have compact wrapping support, but this was attempted as part of an old open PR #2982. The need for this is also highlighted in this comment of that PR. MN currently recommends adding a custom on-the-fly transformation using the compact wrapping code from that PR as seen in this comment. Using minimize_vectors to perform compact wrapping gives better performance results and adding accelerated backends support will also enable us to add a performant version of compact wrapping to MDAnalsis later.

I will create a PR that adds backends support to minimize_vectors and enabled for serial and openmp. (Created PR #5235 )

I will create a PR in distopia that adds minimize_vectors support after which we can enable the tests to include distopia as well and update the corresponding documentation as a separate MDAnalysis PR. (Created Distopia PR #188)

Metadata

Metadata

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions