Project

General

Profile

Feature #2282

Density map toolset

Added by Christian Blau almost 2 years ago. Updated 5 months ago.

Status:
New
Priority:
Normal
Category:
-
Target version:
Difficulty:
uncategorized
Close

Description

Assemble functionality to deal with density maps as e.g. from cryo electron microscopy.

  • i/o routines for density maps
  • a module to allow fitting to cryo-EM densities during the simulation
  • analysis tool to compute average densities from a trajectory.

Related issues

Related to GROMACS - Task #2281: Represent data on regularly spaced N-dimensional grids.In Progress
Related to GROMACS - Feature #1877: Support reading 3d-grid data from cryo-electron microscopy tomography and X-ray crystallographyClosed
Related to GROMACS - Task #2461: Expose more info from t_atom to trajectory analysis frameworkClosed

Associated revisions

Revision 6475ce8b (diff)
Added by Christian Blau 7 months ago

Multidimensional data in canonical layout.

Introduces a multidimensional array that holds its own data and makes it
accessible via the canonical right-aligned layout for indexing the data.

refs: #2282

Change-Id: I883cdb6a41d7277669e100320e230904856d1318

Revision c94c85dc (diff)
Added by Christian Blau 5 months ago

densityfitting - density file format (mrc) header.

Implements mrc/cc4/map format file headers as decribed in
"EMDB Map Distribution Format Description Version 1.01 (c)
emdatabank.org 2014"

Reading and writing is part of a follow-up patch.

refs #2282 and #1877

Change-Id: Ifd43cedb137c0beeb320e1299df8bae9916c8ea8

Revision 75a273b0 (diff)
Added by Christian Blau 4 months ago

densityfitting - MDModule declaration

Declaring the infrastructure for running molecular dynamics simulations with
addional forces that are derived from densities.

Adds a IForceProvider for density fitting simulation that is set up with
its DensityFittingParameters that are in turn built from DensityFittingOptions.

refs #2282 #2901

Change-Id: I0732a78747582a6e23bba1e141d73c4cda421011

Revision a1b56efd (diff)
Added by Christian Blau 4 months ago

One dimensional Gaussian function on lattice.

Evaluate a Gaussian of width sigma in one dimension on lattice points with unit spacing.

refs #2282

Change-Id: I57a513f05af44323e7109c4560438dc023793c4c

Revision b37274d9 (diff)
Added by Christian Blau 4 months ago

Three dimensional gauss transform

Added class that adds gaussians functions with specified
amplitudes and coordinates onto a three-dimensional scalar field.

Change-Id: I07ea2cdd219b34afc402975a0b0e8a52eb71acaf
refs: #2282

Revision f97e5a8c (diff)
Added by Christian Blau 4 months ago

density fitting forces

Evaluate forces on atoms that increase a measure of the goodness of fit to a reference density.

The density fitting forces are evaluated as the gradient of the goodness of fit of a comparison density is generated from atoms by spreading on a grid via a Gaussian kernel to the reference density.

Applying the chain rule for this gradient yields the density fitting force as the inner product of the derivative of the comparison density to reference density goodness-of-fit function at all density values and the gradient of the spreading kernel used to simulate the density.

This patch assumes that the comparison density to reference density goodness of fit derivative density is given, methods that aid the evaluation of this derivative density are part of a child patch.

refs #2282

Change-Id: I4d93fffbdb41753f9a0a4af921011aca02ade69c

Revision 990f4992 (diff)
Added by Christian Blau 4 months ago

mrc density map reading/writing

Add a class that combines header and mrc data handling for float values
to enable reading and writing of mrc files.

refs #2282

Change-Id: Idd84ab2628a52a2fcafb6121ad66f62e88235c74

Revision e559e6f4 (diff)
Added by Christian Blau 2 months ago

Density similarity measure and gradient

Adding a class that allows evaluating the similarity of three dimensional
densities and their gradient given a comparison method, along with a
concrete implementation of the inner-product as a comparison method.

refs #2282

Change-Id: Id73f237e123bed14241227b84cbf83970a09ff49

Revision 0293bd9c (diff)
Added by Christian Blau 2 months ago

Mrc format header to lattice coordinate transform

Extracts a coordinate transformation into lattice coordinates from the mrc density
header, as well as the three dimensional grid extents.

refs #2282

Change-Id: I8c01a370e3010add29b8810e2f3320b9ab428c02

Revision 5bbf73ed (diff)
Added by Christian Blau about 2 months ago

Allow non-uniform Gaussians

For three-dimensional Gaussian spreading, as well as density guided force
evaluation, allow spreading with different widths along x, y, and z-direction.

This required to account for the common, slightly non-uniform grid
spacing in input densities.

Added some simplifactions for the vector operations based on newly
implemented functions in for BasicVector in a previous patch.

refs #2282

Change-Id: I730897fe672d2444a04ea68fea83e2273b359b27

Revision 1f0c6081 (diff)
Added by Christian Blau about 2 months ago

Add coordinate scaling class and extend TranslateAndScale

- Make TranslateAndScale copyable and movable.
- Make coordinate transformation application const on the
TranslateAndScale object itself
- Add a function that returns the scale operation only without translation.
- Add a coordinate scaling class that also allows to inverse the scaling, ignoring zero input.

refs #2282

Change-Id: I73f9bd892f1f81692e05ac6b2fece2e7be9e8e69

Revision f7ac60a1 (diff)
Added by Christian Blau about 2 months ago

Add class to look up density fitting amplitudes

Adds a look-up for the weight used for spreading atoms on a grid and
calculate forces on them.

refs #2282

Change-Id: Iadd26f04265aa85ad30a827c92f2c5d5fc48ef85

Revision 8e7615a8 (diff)
Added by Test User 3 days ago

Move densityfitting options and output into seperate file

Exposes density fitting options and output interface for testing.

Added test for density fitting options class.

refs: #2282

Change-Id: I0107217b5af86abf1ed298dd77553c4c24b1d3f2

History

#1 Updated by Christian Blau almost 2 years ago

Current functionality summary:
  • The module that does on-the-fly fitting to density maps is implemented using the correlation-based density fitting potential V = k*(1 - c.c.) as described by Orzechowski and Tama in Biophys. J. 2008 "Flexible Fitting of High-Resolution X-Ray Structures into Cryoelectron Microscopy Maps Using Biased Molecular Dynamics Simulations". Other alternatives can/will also be added.
  • deal with CCP4 density maps (read/write/embed to .tpr)
  • spread out discrete atomic positions on a density grid using Gaussian functions
  • calculate the correlation coefficient (c.c.) between the experimental and the simulated density and derive the corresponding atomic forces
  • read in density fitting .mdp parameters (which index group to submit to the potential, what k and sigma to use)
  • allow the user to implement time-dependent fitting protocols by giving k and sigma as a function of time (similar to the simulated annealing protocol)
Todo
  • get rid of the dependency on the CCP4 library cmaplib. Christian already has code to do that
  • restructure the code, move it to more adequate places in the GROMACS source tree
  • implement the mdrun part of the fitting as a proper force provider module
  • join the g_map and the "tide" tools into a single trajectory analysis module
  • implement a smarter way to do the calculation in parallel, currently the grid reduction limits the parallel scaling for large grids
  • implement more tests
  • properly document everything
  • incorporate scaling factors for the different atom types

#2 Updated by Christian Blau almost 2 years ago

  • Related to Task #2281: Represent data on regularly spaced N-dimensional grids. added

#3 Updated by Christian Blau almost 2 years ago

  • Related to Feature #1877: Support reading 3d-grid data from cryo-electron microscopy tomography and X-ray crystallography added

#4 Updated by Gerrit Code Review Bot almost 2 years ago

Gerrit received a related patchset '11' for Issue #2282.
Uploader: Carsten Kutzner ()
Change-Id: gromacs~master~I5f18c33e77d68554456c55c6eedfe6a16d7b3ff0
Gerrit URL: https://gerrit.gromacs.org/6970

#5 Updated by Camilo Aponte almost 2 years ago

Christian Blau wrote:

Current functionality summary:
  • The module that does on-the-fly fitting to density maps is implemented using the correlation-based density fitting potential V = k*(1 - c.c.) as described by Orzechowski and Tama in Biophys. J. 2008 "Flexible Fitting of High-Resolution X-Ray Structures into Cryoelectron Microscopy Maps Using Biased Molecular Dynamics Simulations". Other alternatives can/will also be added.
  • deal with CCP4 density maps (read/write/embed to .tpr)
  • spread out discrete atomic positions on a density grid using Gaussian functions
  • calculate the correlation coefficient (c.c.) between the experimental and the simulated density and derive the corresponding atomic forces
  • read in density fitting .mdp parameters (which index group to submit to the potential, what k and sigma to use)
  • allow the user to implement time-dependent fitting protocols by giving k and sigma as a function of time (similar to the simulated annealing protocol)
Todo
  • get rid of the dependency on the CCP4 library cmaplib. Christian already has code to do that
  • restructure the code, move it to more adequate places in the GROMACS source tree
  • implement the mdrun part of the fitting as a proper force provider module
  • join the g_map and the "tide" tools into a single trajectory analysis module
  • implement a smarter way to do the calculation in parallel, currently the grid reduction limits the parallel scaling for large grids
  • implement more tests
  • properly document everything
  • incorporate scaling factors for the different atom types.
  • implement masking, subtraction, and division of reference and computed maps.
  • tide: implement output option with the global correlation between the reference and the computed map (xvg format).
  • tide: implement output option with the local correlation between the reference and the computed map (map format).
  • tide: implement output option with the the global correlation as a function of time (xvg format).
  • tide: implement scaling option of output maps in units of sigma and removing average value over the entire lattice.
  • tide: implement input file with Gaussian coefficients based on the atom types and some internal default values, in case the input file is not provided.

#6 Updated by Joe Jordan over 1 year ago

  • Related to Task #2461: Expose more info from t_atom to trajectory analysis framework added

#7 Updated by Gerrit Code Review Bot 8 months ago

Gerrit received a related patchset '1' for Issue #2282.
Uploader: Christian Blau ()
Change-Id: gromacs~master~I883cdb6a41d7277669e100320e230904856d1318
Gerrit URL: https://gerrit.gromacs.org/8919

#8 Updated by Gerrit Code Review Bot 6 months ago

Gerrit received a related patchset '1' for Issue #2282.
Uploader: Christian Blau ()
Change-Id: gromacs~master~Ia4d63faadeb595d7a2eeb4ac4760c211c0d2aac6
Gerrit URL: https://gerrit.gromacs.org/9089

#9 Updated by Gerrit Code Review Bot 6 months ago

Gerrit received a related patchset '1' for Issue #2282.
Uploader: Christian Blau ()
Change-Id: gromacs~master~I5f0c839cd2f516e18dd6d5e5f76fb2f06fb40eef
Gerrit URL: https://gerrit.gromacs.org/9203

#10 Updated by Gerrit Code Review Bot 6 months ago

Gerrit received a related patchset '1' for Issue #2282.
Uploader: Christian Blau ()
Change-Id: gromacs~master~Ib63ba97edf34928e47b7a9d8461f9817d2cc7e59
Gerrit URL: https://gerrit.gromacs.org/9208

#11 Updated by Gerrit Code Review Bot 5 months ago

Gerrit received a related patchset '1' for Issue #2282.
Uploader: Christian Blau ()
Change-Id: gromacs~master~I0732a78747582a6e23bba1e141d73c4cda421011
Gerrit URL: https://gerrit.gromacs.org/9280

#12 Updated by Gerrit Code Review Bot 5 months ago

Gerrit received a related patchset '2' for Issue #2282.
Uploader: Christian Blau ()
Change-Id: gromacs~master~Ifd43cedb137c0beeb320e1299df8bae9916c8ea8
Gerrit URL: https://gerrit.gromacs.org/9281

#13 Updated by Gerrit Code Review Bot 5 months ago

Gerrit received a related DRAFT patchset '1' for Issue #2282.
Uploader: Christian Blau ()
Change-Id: gromacs~master~If8bafcc10b2720857b2fceca311cf6ba3ea98a5c
Gerrit URL: https://gerrit.gromacs.org/9344

Also available in: Atom PDF