| Bsoft 2.0.5 Bernard's software package

Functions
model_extract_build.h File Reference

Functions to extract subvolumes and build new maps. More...

`#include "rwmodel.h"`
`#include "rwimg.h"`

Go to the source code of this file.

## Functions
int | model_refine_components (Bmodel *model, Bstring *ct_names, Bimage *ptemp, Bimage *pmask, Bimage *pfsmask, int max_iter, double viewstep, double rotstep, double hires, double lores, double accuracy, double max_shift, double max_view_angle, double max_rot_angle, int shift_flag)
| Refines component views and positions by cross-correlation. More...
int | model_refine_link_positions (Bmodel *model, Bimage *ptemp, Bimage *pmask, Bimage *pfsmask, double hires, double lores, double max_shift, int shift_flag, double bias)
| Refines link positions by cross-correlation. More...
Bimage * | model_average_component_density (Bmodel *model, Vector3< long > size, Vector3< double > origin, int npt)
| Averages the density associated with each component type in a model. More...
Bimage * | model_extract_component_densities (Bmodel *model, Vector3< long > size, Vector3< double > origin)
| Extracts all densities associated with components in a model. More...
Bimage * | model_average_link_density (Bmodel *model, Vector3< long > size, Vector3< double > origin)
| Extracts a density associated with each link in a model. More...
Bimage * | model_build_from_component_density (Bmodel *model, Vector3< long > size, Vector3< double > origin, int flags)
| Builds a new map from a densities of components in a model. More...
Bimage * | model_build_from_link_density (Bmodel *model, Bstring &linkmap, Vector3< long > size, Vector3< double > origin, int link_select, int flags)
| Builds a new map from a density of a link in a model. More...

## Detailed Description

Functions to extract subvolumes and build new maps.

Author
  Bernard Heymann

Date
  Created: 20060411
  Modified: 20190821

Definition in file model_extract_build.h.

## Function Documentation

## ◆ model_average_component_density()

Bimage* model_average_component_density | ( | Bmodel * | model,
|  | Vector3< long > | size,
|  | Vector3< double > | origin,
|  | int | npt
| ) |  |

Averages the density associated with each component type in a model.

Parameters

  *model | model.
  size | size of component density to extract.
  origin | origin of new component density image.
  npt | number per type.

Returns
  Bimage* average density around a component.

      The densities associated with each vertex type is extracted and averaged.
      The extracted density origin is placed on the component coordinates.
      The component views must already be set.
      Only the first model in the list is processed.
      The map file for the model must exist.

Definition at line 703 of file model_extract_build.cpp.

## ◆ model_average_link_density()

Bimage* model_average_link_density | ( | Bmodel * | model,
|  | Vector3< long > | size,
|  | Vector3< double > | origin
| ) |  |

Extracts a density associated with each link in a model.

Parameters

  *model | model.
  size | size of link density to extract.
  origin | origin of new link density image.

Returns
  Bimage* new image with the density around the link.

      The link density origin is positioned on the center of the link.
      The component views must already be set.

Definition at line 917 of file model_extract_build.cpp.

## ◆ model_build_from_component_density()

Bimage* model_build_from_component_density | ( | Bmodel * | model,
|  | Vector3< long > | size,
|  | Vector3< double > | origin,
|  | int | flags
| ) |  |

Builds a new map from a densities of components in a model.

Parameters

  *model | model.
  size | size of new map.
  origin | origin of new map with respect to the model.
  flags | flags to weigh by contributions (1) and build separate maps (2).

Returns
  Bimage* new map.

      The number of new maps depends on the number of selected component types
      and access to their density maps.
      The component views must already be set.
      The sampling must be the same for all component type maps.

Definition at line 1008 of file model_extract_build.cpp.

## ◆ model_build_from_link_density()

Bimage* model_build_from_link_density | ( | Bmodel * | model,
|  | Bstring & | linkmap,
|  | Vector3< long > | size,
|  | Vector3< double > | origin,
|  | int | link_select,
|  | int | flags
| ) |  |

Builds a new map from a density of a link in a model.

Parameters

  *model | model.
  &linkmap | link map filename.
  size | size of new map.
  origin | origin of new map with respect to the model.
  link_select | link selection number to build (first = 1).
  flags | flags to weigh by contributions (1) and build separate maps (2).

Returns
  Bimage* new map.

      The component views must already be set.

Definition at line 1139 of file model_extract_build.cpp.

## ◆ model_extract_component_densities()

Bimage* model_extract_component_densities | ( | Bmodel * | model,
|  | Vector3< long > | size,
|  | Vector3< double > | origin
| ) |  |

Extracts all densities associated with components in a model.

Parameters

  *model | model.
  size | size of component density to extract.
  origin | origin of new component density image.

Returns
  Bimage* all densities around components.

      The densities associated with each component is extracted.
      The extracted density origin is placed on the component coordinates.
      The component views must already be set.
      Only the first model in the list is processed.
      The map file for the model must exist.

Definition at line 836 of file model_extract_build.cpp.

## ◆ model_refine_components()

int model_refine_components | ( | Bmodel * | model,
|  | Bstring * | ct_names,
|  | Bimage * | ptemp,
|  | Bimage * | pmask,
|  | Bimage * | pfsmask,
|  | int | max_iter,
|  | double | viewstep,
|  | double | rotstep,
|  | double | hires,
|  | double | lores,
|  | double | accuracy,
|  | double | max_shift,
|  | double | max_view_angle,
|  | double | max_rot_angle,
|  | int | shift_flag
| ) |  |

Refines component views and positions by cross-correlation.

Parameters

  *model | model.
  *ct_names | list of names associated with template sub-images.
  *ptemp | density template.
  *pmask | real space mask.
  *pfsmask | cross-correlation mask.
  max_iter | maximum number of iterations, 0 means only positional refinement.
  viewstep | first view direction angular step size (radians).
  rotstep | rotation around view angular step size (radians).
  hires | high resolution limit for cross-correlation.
  lores | low resolution limit for cross-correlation.
  accuracy | angular accuracy (radians).
  max_shift | maximum shift in coordinates (angstrom).
  max_view_angle | maximum angular change in view vector (radians).
  max_rot_angle | maximum angular change in rotation around view vector (radians).
  shift_flag | flag to shift only along the normal (1) or perpendicular to it (2).

Returns
  int 0, <0 on error.

      The density origin is positioned on the component.
      The component views must already be set.
      The number of component type names should be equal to the number of
      sub-images in the template.

Definition at line 300 of file model_extract_build.cpp.

## ◆ model_refine_link_positions()

int model_refine_link_positions | ( | Bmodel * | model,
|  | Bimage * | ptemp,
|  | Bimage * | pmask,
|  | Bimage * | pfsmask,
|  | double | hires,
|  | double | lores,
|  | double | max_shift,
|  | int | shift_flag,
|  | double | bias
| ) |  |

Refines link positions by cross-correlation.

Parameters

  *model | model.
  *ptemp | density template.
  *pmask | real space mask.
  *pfsmask | cross-correlation mask.
  hires | high resolution limit for cross-correlation.
  lores | low resolution limit for cross-correlation.
  max_shift | maximum shift in coordinates (angstrom).
  shift_flag | flag to shift only along the normal (1) or perpendicular to it (2).
  bias | bias to apply to first correlation coefficient.

Returns
  Bimage* density around the component.

      The density origin is positioned on the link center.
      The component views must already be set.

Definition at line 559 of file model_extract_build.cpp.