RadialDensity

Classes

class RadialDensity.RadialNumberDensity(data, sel1, sel2=None, dr=0.1, maxR=15, frames=None)

Computes the radial density distribution from center of mass of selected atoms using the given dr interval.

Parameters:
  • data – a Dataset class instance containing trajectories data
  • sel1 – first atom selection from which spherical zone will be computed
  • sel2 – second selection, only atoms within the spherical zone and corresponding to this selection will be considered
  • dr – radius interval, density is computed as the number of atoms between r and r + dr divided by the total number of sel2 atoms within maxR
  • maxR – maximum radius to be used
  • frames – frames to be averaged on, should be a range (default None, all frames are used)
Returns:

  • radii array of radius edges (minimum)
  • density radial number density

compDensity()

Computes density given class attributes.

plotDensity()

Plots the computed density.

class RadialDensity.ResidueWiseWaterDensity(data, sel, maxR=15, dr=0.1, frames=None)

This class allows to compute radial number density for water around each residue.

Parameters:
  • data – a Dataset class instance containing trajectories data
  • sel – selection to be used for analysis, can be protein for all residues or protein and segname A B C and resid 20:80 for specific segment/chain name(s) and residues.
  • maxR – maximum radius to be used for radial density computation (default 10)
  • dr – radius step, determines the number of bins (default 0.1)
  • frames – frames to be used for analysis (default all)
compDensity()

Computes the density given class attributes.

Results is stored in density attribute (radii are in radii attribute).

plotDensity(medianFiltSize=[13, 3])

Plots the computed density as a 3D surface.

Parameters:medianFiltSize – density can be filtered using Scipy.signal medfilt2d method. This might help getting better looking results. Set it to [1, 1] to get original data.