MDAnalysis / UGM2023

Materials for the 2023 MDAnalysis User Group Meeting
Other
4 stars 10 forks source link

[MDAKit / Hackathon] State-based density analysis #26

Open IAlibay opened 1 year ago

IAlibay commented 1 year ago

Overview

Calculations of densities of solvent or ligands with the MDAnalysis.analysis.density code can be a powerful way to obtain a global picture of solvent/ligand behavior in relationship to, e.g., a protein. Sometimes there are changes in the protein that lead to a different density but when averaged over the whole trajectory, the changes in the density are averaged out and are less clear. It is therefore useful to generate densities only for parts of the trajectory that correspond to a specific state of the system.

For our purpose here, a state is a collection of trajectory frames. Each frame only belongs to a single state.

States can be identified in many difference ways.

Objectives

  1. Create an analysis class that takes as input a list of states (e.g., a dict stateID -> list of trajectory frames, or a a list of lists where state 0 corresponds to list 0, state 1 to list 1, etc...) and then creates a density for each state (making use of the existing MDAnalysis.analysis.density.DensityAnalysis; note the frames keyword of the run() method, which takes a list of trajectory frames).
  2. Optimize the approach so that you don't have to run DensityAnalysis separately for each state.