![]() |
Bsoft 2.1.4
Bernard's software package
|
Functions to extract subvolumes and build new maps. More...
#include "Bimage.h"
#include "model_extract_build.h"
#include "model_util.h"
#include "file_util.h"
#include "linked_list.h"
#include "random_numbers.h"
#include "utilities.h"
Functions | |
Matrix3 | get_link_matrix (Blink *link) |
Vector3< double > | component_find_shift (Bcomponent *comp, Bimage *p, Bimage *ptemp, Bimage *pmask, Bimage *pfsmask, View2< float > view, double hires, double lores, double shift_limit, int shift_flag, fft_plan planf, fft_plan planb) |
Vector3< double > | component_find_shift2 (Bcomponent *comp, Bimage *p, Bimage *ptemp, Bimage *pmask, Bimage *pfsmask, View2< float > view, double hires, double lores, double shift_limit, int shift_flag, fft_plan planf, fft_plan planb) |
int | component_refine_random (Bcomponent *comp, Bimage *p, Bimage *ptemp, Bimage *pmask, Bimage *pfsmask, int max_iter, double hires, double lores, double max_shift, double max_view_angle, double max_rot_angle, int shift_flag, fft_plan planf, fft_plan planb) |
int | component_refine (Bcomponent *comp, Bimage *p, Bimage *ptemp, Bimage *pmask, Bimage *pfsmask, double viewmax, double rotmax, double viewstep, double rotstep, double hires, double lores, double accuracy, double max_shift, int shift_flag, fft_plan planf, fft_plan planb) |
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... | |
Variables | |
int | verbose |
Functions to extract subvolumes and build new maps.
Vector3< double > component_find_shift | ( | Bcomponent * | comp, |
Bimage * | p, | ||
Bimage * | ptemp, | ||
Bimage * | pmask, | ||
Bimage * | pfsmask, | ||
View2< float > | view, | ||
double | hires, | ||
double | lores, | ||
double | shift_limit, | ||
int | shift_flag, | ||
fft_plan | planf, | ||
fft_plan | planb | ||
) |
Vector3< double > component_find_shift2 | ( | Bcomponent * | comp, |
Bimage * | p, | ||
Bimage * | ptemp, | ||
Bimage * | pmask, | ||
Bimage * | pfsmask, | ||
View2< float > | view, | ||
double | hires, | ||
double | lores, | ||
double | shift_limit, | ||
int | shift_flag, | ||
fft_plan | planf, | ||
fft_plan | planb | ||
) |
int component_refine | ( | Bcomponent * | comp, |
Bimage * | p, | ||
Bimage * | ptemp, | ||
Bimage * | pmask, | ||
Bimage * | pfsmask, | ||
double | viewmax, | ||
double | rotmax, | ||
double | viewstep, | ||
double | rotstep, | ||
double | hires, | ||
double | lores, | ||
double | accuracy, | ||
double | max_shift, | ||
int | shift_flag, | ||
fft_plan | planf, | ||
fft_plan | planb | ||
) |
int component_refine_random | ( | Bcomponent * | comp, |
Bimage * | p, | ||
Bimage * | ptemp, | ||
Bimage * | pmask, | ||
Bimage * | pfsmask, | ||
int | max_iter, | ||
double | hires, | ||
double | lores, | ||
double | max_shift, | ||
double | max_view_angle, | ||
double | max_rot_angle, | ||
int | shift_flag, | ||
fft_plan | planf, | ||
fft_plan | planb | ||
) |
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.
*model | model. |
size | size of component density to extract. |
origin | origin of new component density image. |
npt | number per type. |
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.
Bimage * model_average_link_density | ( | Bmodel * | model, |
Vector3< long > | size, | ||
Vector3< double > | origin | ||
) |
Extracts a density associated with each link in a model.
*model | model. |
size | size of link density to extract. |
origin | origin of new link density image. |
The link density origin is positioned on the center of the link. The component views must already be set.
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.
*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). |
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.
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.
*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). |
The component views must already be set.
Bimage * model_extract_component_densities | ( | Bmodel * | model, |
Vector3< long > | size, | ||
Vector3< double > | origin | ||
) |
Extracts all densities associated with components in a model.
*model | model. |
size | size of component density to extract. |
origin | origin of new component density image. |
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.
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.
*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). |
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.
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.
*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. |
The density origin is positioned on the link center. The component views must already be set.
|
extern |