![]() |
Bsoft 2.1.4
Bernard's software package
|
Library routines to count components in maps. More...
#include "model_occupancy.h"
#include "binomial.h"
#include "ps_plot.h"
#include "img_combine.h"
#include "model_extract_build.h"
#include "model_compare.h"
#include "model_util.h"
#include "math_util.h"
#include "utilities.h"
#include "linked_list.h"
Functions | |
double | component_coverage (Bimage *p, int img_num, Bcomponent *comp, double threshold) |
int | model_occupancy (Bmodel *model, Bimage *pmask, double mol_weight, double rho, double cutoff, int invert_flag) |
Calculates the occupancy of components in a map. More... | |
vector< double > | model_occupancy_distribution (Bmodel *model, double cutoff, int nfit, long &ncomp, vector< double > &prob, double &R) |
Calculates the occupancy distribution of models. More... | |
int | model_refine_comp_for_occupancy (Bmodel *model, Bimage *pmask2, Bimage *ptemp, Bimage *pmask, double hires, double lores, double max_shift) |
Refines component views and positions by cross-correlation. More... | |
Variables | |
int | verbose |
Library routines to count components in maps.
double component_coverage | ( | Bimage * | p, |
int | img_num, | ||
Bcomponent * | comp, | ||
double | threshold | ||
) |
int model_occupancy | ( | Bmodel * | model, |
Bimage * | pmask, | ||
double | mol_weight, | ||
double | rho, | ||
double | cutoff, | ||
int | invert_flag | ||
) |
Calculates the occupancy of components in a map.
*model | model structure to be modified. |
*pmask | |
mol_weight | molecular weight to determine threshold. |
rho | protein density in Da/A3. |
cutoff | coverage cutoff to use for assigning occupancy. |
invert_flag | flag to invert map density. |
The map must have positive density (higher values are considered density). The coverage for a component is defined as the fraction of voxels within a sphere around the component location that is above the threshold. The threshold can be derived from the molecular weight or is taken as the sum of the map average and standard deviation. The radius of the sphere is taken from the component radius.
vector< double > model_occupancy_distribution | ( | Bmodel * | model, |
double | cutoff, | ||
int | nfit, | ||
long & | ncomp, | ||
vector< double > & | prob, | ||
double & | R | ||
) |
Calculates the occupancy distribution of models.
*model | model structure to be modified. |
cutoff | coverage cutoff to determine occupancy. |
nfit | number of binomial curves to fit. |
&ncomp | maximum number of components in a model. |
*prob | weight and probability array (2*nfit). |
&R | pointer to fit residual. |
The component coverage must already be calculated and stored in the FOM property of each component. A component is considered occupied if its coverage exceeds the given cutoff value. The distribution, error and fit array is set up with 3+nfit columns: Column1: Distribution histogram Column2: Standard deviations Column3: Overall binomial fit curve (sum of remaining columns) Column4+: nfit individual binomial curves
int model_refine_comp_for_occupancy | ( | Bmodel * | model, |
Bimage * | pmask2, | ||
Bimage * | ptemp, | ||
Bimage * | pmask, | ||
double | hires, | ||
double | lores, | ||
double | max_shift | ||
) |
Refines component views and positions by cross-correlation.
*model | model. |
*pmask2 | mask for the input image. |
*ptemp | density template. |
*pmask | cross-correlation mask. |
hires | high resolution limit for cross-correlation. |
lores | low resolution limit for cross-correlation. |
max_shift | maximum shift in coordinates (angstrom). |
The density origin is positioned on the component. The component views must already be set. The density and search radii are derived from the radius of each component. When a shift is out-of-range, returns to the initial position. The size of the template determines the search area.
|
extern |