| Bsoft 2.0.5 Bernard's software package

Functions | Variables
model_occupancy.cpp File Reference

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"`

Go to the source code of this file.

## 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

## Detailed Description

Library routines to count components in maps.

Author
  Daniel Nemecek and Bernard Heymann

Date
  Created: 20091202
  Modified: 20151110

Definition in file model_occupancy.cpp.

## Function Documentation

## ◆ component_coverage()

double component_coverage | ( | Bimage * | p,
|  | int | img_num,
|  | Bcomponent * | comp,
|  | double | threshold
| ) |  |

Definition at line 415 of file model_occupancy.cpp.

## ◆ model_occupancy()

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.

Author
  Daniel Nemecek and Bernard Heymann

Parameters

  *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.

Returns
  int 0.

      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.

Definition at line 45 of file model_occupancy.cpp.

## ◆ model_occupancy_distribution()

vector<double> model_occupancy_distribution | ( | Bmodel * | model,
|  | double | cutoff,
|  | int | nfit,
|  | long & | ncomp,
|  | vector< double > & | prob,
|  | double & | R
| ) |  |

Calculates the occupancy distribution of models.

Author
  Daniel Nemecek and Bernard Heymann

Parameters

  *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.

Returns
  vector<double>& occupancy distribution histogram and fits.

      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

Definition at line 126 of file model_occupancy.cpp.

## ◆ model_refine_comp_for_occupancy()

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.

Author
  Daniel Nemecek and Bernard Heymann

Parameters

  *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).

Returns
  int 0.

      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.

Definition at line 237 of file model_occupancy.cpp.

## Variable Documentation

## ◆ verbose

int verbose