IMP logo
IMP Reference Guide  2.5.0
The Integrative Modeling Platform
IMP.isd.gmm_tools Namespace Reference

Tools for handling Gaussian Mixture Models. More...

Detailed Description

Tools for handling Gaussian Mixture Models.

Functions

def decorate_gmm_from_text
 read the output from write_gmm_to_text, decorate as Gaussian and Mass More...
 
def draw_points
 given some points (and optional transform), write them to chimera 'bild' format colors flag only applies to ellipses, otherwise it'll be weird More...
 
def fit_dirichlet_gmm_to_points
 fit a GMM to some points. More...
 
def fit_gmm_to_points
 fit a GMM to some points. More...
 
def write_gmm_to_map
 write density map from GMM. More...
 
def write_gmm_to_text
 write a list of gaussians to text. More...
 
def write_sklearn_gmm_to_map
 write density map directly from sklearn GMM (kinda slow) More...
 

Function Documentation

def IMP.isd.gmm_tools.decorate_gmm_from_text (   in_fn,
  ps,
  mdl,
  transform = None,
  radius_scale = 1.0,
  mass_scale = 1.0 
)

read the output from write_gmm_to_text, decorate as Gaussian and Mass

Note
This function is only available in Python.

Definition at line 22 of file gmm_tools.py.

def IMP.isd.gmm_tools.draw_points (   pts,
  out_fn,
  trans = IMP.algebra.get_identity_transformation_3d(),
  use_colors = False 
)

given some points (and optional transform), write them to chimera 'bild' format colors flag only applies to ellipses, otherwise it'll be weird

Note
This function is only available in Python.

Definition at line 115 of file gmm_tools.py.

def IMP.isd.gmm_tools.fit_dirichlet_gmm_to_points (   points,
  n_components,
  mdl,
  ps = [],
  num_iter = 100,
  covariance_type = 'full',
  mass_multiplier = 1.0 
)

fit a GMM to some points.

Will return core::Gaussians. if no particles are provided, they will be created

points: list of coordinates (python) n_components: number of gaussians to create mdl: IMP Model ps: list of particles to be decorated. if empty, will add num_iter: number of EM iterations covariance_type: covar type for the gaussians. options: 'full', 'diagonal', 'sphereical' init_centers: initial coordinates of the GMM force_radii: fix the radii (spheres only) force_weight: fix the weights mass_multiplier: multiply the weights of all the gaussians by this value

Note
This function is only available in Python.

Definition at line 282 of file gmm_tools.py.

def IMP.isd.gmm_tools.fit_gmm_to_points (   points,
  n_components,
  mdl,
  ps = [],
  num_iter = 100,
  covariance_type = 'full',
  init_centers = [],
  force_radii = -1.0,
  force_weight = -1.0,
  mass_multiplier = 1.0 
)

fit a GMM to some points.

Will return core::Gaussians. if no particles are provided, they will be created

points: list of coordinates (python) n_components: number of gaussians to create mdl: IMP Model ps: list of particles to be decorated. if empty, will add num_iter: number of EM iterations covariance_type: covar type for the gaussians. options: 'full', 'diagonal', 'sphereical' init_centers: initial coordinates of the GMM force_radii: fix the radii (spheres only) force_weight: fix the weights mass_multiplier: multiply the weights of all the gaussians by this value dirichlet: use the DGMM fitting (can reduce number of components, takes longer)

Note
This function is only available in Python.

Definition at line 204 of file gmm_tools.py.

def IMP.isd.gmm_tools.write_gmm_to_map (   to_draw,
  out_fn,
  voxel_size,
  bounding_box = None 
)

write density map from GMM.

input can be either particles or gaussians

Note
This function is only available in Python.

Definition at line 62 of file gmm_tools.py.

def IMP.isd.gmm_tools.write_gmm_to_text (   ps,
  out_fn 
)

write a list of gaussians to text.

must be decorated as Gaussian and Mass

Note
This function is only available in Python.

Definition at line 43 of file gmm_tools.py.

def IMP.isd.gmm_tools.write_sklearn_gmm_to_map (   gmm,
  out_fn,
  apix = 0,
  bbox = None,
  dmap_model = None 
)

write density map directly from sklearn GMM (kinda slow)

Note
This function is only available in Python.

Definition at line 93 of file gmm_tools.py.