Bsoft 2.1.4
Bernard's software package
model_map.cpp File Reference

Function to generate a map from a model. More...

#include "rwmodel.h"
#include "rwmodel_param.h"
#include "model_links.h"
#include "model_transform.h"
#include "model_extract_build.h"
#include "model_mol.h"
#include "model_util.h"
#include "rwimg.h"
#include "img_combine.h"
#include "scatter.h"
#include "utilities.h"

Functions

Bmodelmodel_from_images (Bimage *plist)
 Creates one or more models from 3D images. More...
 
Bmodelmodel_from_graph_segments (Bimage *p, GSgraph &gs)
 Creates one or more models from graph segments. More...
 
Bimageimg_from_model (Bmodel *model, Vector3< double > ori, Vector3< long > size, Vector3< double > sam, double sigma)
 Calculates a map from model component coordinates.
More...
 
int model_catenate_maps (Bmodel *model, Bstring &filename)
 Concatenates all model maps into one multi-image file.
More...
 
int model_shell_fit (Bmodel *model, double hires, double lores, int neg)
 Fits a shell model as a rigid body to a map.
More...
 
int model_shell_radial_profile (Bmodel *model)
 Calculates a radial profile from a shell model.
More...
 
Bimagemodel_shell_power_spectrum (Bmodel *model, Vector3< long > size, Vector3< double > origin, int ft_size, int ann_min, int ann_max, double hires, double lores)
 Calculates a radial profile from a shell model.
More...
 
int comp_set_fom_sym (Bcomponent *comp, Bimage *p, long minorder, long maxorder)
 
int model_component_symmetry (Bmodel *model, long nangles, long ann_min, long ann_max, long ann_width, long zmin, long zmax, long zinc, long minorder, long maxorder)
 Determines the cyclic symmetry of components. More...
 
int scatter_one (Bcomponent *comp, Bimage *p, vector< double > &scurve, CTFparam cp, double ds, double scut, int flag)
 
Bimagescatter_one_img (Bcomponent *comp, Bimage *p, vector< double > &scurve, CTFparam cp, double ds, double scut, int flag)
 
Bimagescatter_to_img (const vector< Bcomponent * > &carr, long ib, long ie, Bimage *p, map< string, vector< double > > &scat, CTFparam &cp, double ds, double scut, int flag)
 
Bimagescatter_slice_to_img (const vector< Bcomponent * > &carr, Bimage *p, map< string, vector< double > > &scat, CTFparam &cp, double ds, double scut, int flag)
 
int img_add (Bimage *ps, vector< Complex< float > > &v)
 
int img_add_fast_old (Bimage *ps, Bimage *p)
 
int img_add_fast (Bimage *ps, Bimage *p)
 
int img_electron_scattering (Bmodel *model, Bimage *p, CTFparam &cp, double dose, double stdev, map< string, vector< double > > &scat, double ds, double scut, int flag)
 
int img_electron_scattering_chunks (Bmodel *model, Bimage *p, CTFparam &cp, double dose, double stdev, map< string, vector< double > > &scat, double ds, double scut, int flag)
 
int img_electron_scattering_slices (Bmodel *model, Bimage *p, CTFparam &cp, map< string, vector< double > > &scat, double ds, double scut, int flag)
 
int img_electron_scattering (Bmodel *model, Bimage *p, CTFparam &cp, double dose, double stdev, Bstring &atompropfile, int flag)
 

Variables

int verbose
 

Detailed Description

Function to generate a map from a model.

Author
Bernard Heymann
Date
Created: 20081112
Modified: 20220419

Function Documentation

◆ comp_set_fom_sym()

int comp_set_fom_sym ( Bcomponent comp,
Bimage p,
long  minorder,
long  maxorder 
)

◆ img_add()

int img_add ( Bimage ps,
vector< Complex< float > > &  v 
)

◆ img_add_fast()

int img_add_fast ( Bimage ps,
Bimage p 
)

◆ img_add_fast_old()

int img_add_fast_old ( Bimage ps,
Bimage p 
)

◆ img_electron_scattering() [1/2]

int img_electron_scattering ( Bmodel model,
Bimage p,
CTFparam cp,
double  dose,
double  stdev,
Bstring atompropfile,
int  flag 
)

◆ img_electron_scattering() [2/2]

int img_electron_scattering ( Bmodel model,
Bimage p,
CTFparam cp,
double  dose,
double  stdev,
map< string, vector< double > > &  scat,
double  ds,
double  scut,
int  flag 
)

◆ img_electron_scattering_chunks()

int img_electron_scattering_chunks ( Bmodel model,
Bimage p,
CTFparam cp,
double  dose,
double  stdev,
map< string, vector< double > > &  scat,
double  ds,
double  scut,
int  flag 
)

◆ img_electron_scattering_slices()

int img_electron_scattering_slices ( Bmodel model,
Bimage p,
CTFparam cp,
map< string, vector< double > > &  scat,
double  ds,
double  scut,
int  flag 
)

◆ img_from_model()

Bimage * img_from_model ( Bmodel model,
Vector3< double >  ori,
Vector3< long >  size,
Vector3< double >  sam,
double  sigma 
)

Calculates a map from model component coordinates.

Parameters
*modelmodel.
oriorigin within new map.
sizesize of new map.
samvoxel size of new map.
sigmagaussian sphere width.
Returns
Bimage* new map.

◆ model_catenate_maps()

int model_catenate_maps ( Bmodel model,
Bstring filename 
)

Concatenates all model maps into one multi-image file.

Parameters
*modelmodel.
&filenamenew map file name.
Returns
int 0.
The model map file name must be set and point to a valid file.

◆ model_component_symmetry()

int model_component_symmetry ( Bmodel model,
long  nangles,
long  ann_min,
long  ann_max,
long  ann_width,
long  zmin,
long  zmax,
long  zinc,
long  minorder,
long  maxorder 
)

Determines the cyclic symmetry of components.

Parameters
*modelmodel parameters.
nanglesnumber of angles.
ann_minminimum annulus.
ann_maxmaximum annulus.
ann_widthannular width.
zminminimum z limit.
zmaxmaximum z limit.
zincz increment.
minorderminimum cyclic order to search for.
maxordermaximum cyclic order to search for.
Returns
int 0.

◆ model_from_graph_segments()

Bmodel * model_from_graph_segments ( Bimage p,
GSgraph gs 
)

Creates one or more models from graph segments.

Parameters
*pimage.
&gsgraph segments.
Returns
Bmodel* new model.
The regions are assumed to be number consecutively.

◆ model_from_images()

Bmodel * model_from_images ( Bimage plist)

Creates one or more models from 3D images.

Parameters
*plistlist of images.
Returns
Bmodel* new model.
The model ID's are derived from the image filenames.

◆ model_shell_fit()

int model_shell_fit ( Bmodel model,
double  hires,
double  lores,
int  neg 
)

Fits a shell model as a rigid body to a map.

Parameters
*modelmodel.
hireshigh resolution limit.
loreslow resolution limit.
negflag to set contrast negative.
Returns
int 0.
The model map file name must be set and point to a valid file.

◆ model_shell_power_spectrum()

Bimage * model_shell_power_spectrum ( Bmodel model,
Vector3< long >  size,
Vector3< double >  origin,
int  ft_size,
int  ann_min,
int  ann_max,
double  hires,
double  lores 
)

Calculates a radial profile from a shell model.

Parameters
*modelmodel.
sizesize of component density to extract.
originorigin for extracted densities.
ft_sizeFourier transform size.
ann_minminimum annulus for rotational alignment.
ann_maxmaximum annulus for rotational alignment.
hireshigh resolution limit for cross-correlation.
loreslow resolution limit for cross-correlation.
Returns
Bimage* 0.
The model map file name must be set and point to a valid file.

◆ model_shell_radial_profile()

int model_shell_radial_profile ( Bmodel model)

Calculates a radial profile from a shell model.

Parameters
*modelmodel.
Returns
int 0.
The model map file name must be set and point to a valid file.

◆ scatter_one()

int scatter_one ( Bcomponent comp,
Bimage p,
vector< double > &  scurve,
CTFparam  cp,
double  ds,
double  scut,
int  flag 
)

◆ scatter_one_img()

Bimage * scatter_one_img ( Bcomponent comp,
Bimage p,
vector< double > &  scurve,
CTFparam  cp,
double  ds,
double  scut,
int  flag 
)

◆ scatter_slice_to_img()

Bimage * scatter_slice_to_img ( const vector< Bcomponent * > &  carr,
Bimage p,
map< string, vector< double > > &  scat,
CTFparam cp,
double  ds,
double  scut,
int  flag 
)

◆ scatter_to_img()

Bimage * scatter_to_img ( const vector< Bcomponent * > &  carr,
long  ib,
long  ie,
Bimage p,
map< string, vector< double > > &  scat,
CTFparam cp,
double  ds,
double  scut,
int  flag 
)

Variable Documentation

◆ verbose

int verbose
extern