IMP Reference Guide
develop.eba5f5c79c,2020/07/05
The Integrative Modeling Platform

Tools for handling Gaussian Mixture Models. More...
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...  
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
Definition at line 23 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
Definition at line 144 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', 'spherical' 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
Definition at line 349 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' , 

min_covar = 0.001 , 

init_centers = [] , 

force_radii = 1.0 , 

force_weight = 1.0 , 

mass_multiplier = 1.0 

) 
fit a GMM to some points.
Will return the score and the Akaike score. Akaike information criterion for the current model fit. It is a measure of the relative quality of the GMM that takes into account the parsimony and the goodness of the fit. 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', 'spherical' min_covar: assign a minimum value to covariance term. That is used to have more spherical shaped gaussians 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)
Definition at line 233 of file gmm_tools.py.
def IMP.isd.gmm_tools.write_gmm_to_map  (  to_draw,  
out_fn,  
voxel_size,  
bounding_box = None , 

origin = None , 

fast = False , 

factor = 2.5 

) 
write density map from GMM.
input can be either particles or gaussians
Definition at line 115 of file gmm_tools.py.
def IMP.isd.gmm_tools.write_gmm_to_text  (  ps,  
out_fn,  
comments = [] 

) 
write a list of gaussians to text.
must be decorated as Gaussian and Mass
Definition at line 64 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)
Definition at line 122 of file gmm_tools.py.