Bsoft 2.1.4
Bernard's software package
model_extract_build.h File Reference

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

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

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...
 
Bimagemodel_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...
 
Bimagemodel_extract_component_densities (Bmodel *model, Vector3< long > size, Vector3< double > origin)
 Extracts all densities associated with components in a model. More...
 
Bimagemodel_average_link_density (Bmodel *model, Vector3< long > size, Vector3< double > origin)
 Extracts a density associated with each link in a model. More...
 
Bimagemodel_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...
 
Bimagemodel_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

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
*modelmodel.
sizesize of component density to extract.
originorigin of new component density image.
nptnumber 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.

◆ 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
*modelmodel.
sizesize of link density to extract.
originorigin 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.

◆ 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
*modelmodel.
sizesize of new map.
originorigin of new map with respect to the model.
flagsflags 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.

◆ 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
*modelmodel.
&linkmaplink map filename.
sizesize of new map.
originorigin of new map with respect to the model.
link_selectlink selection number to build (first = 1).
flagsflags to weigh by contributions (1) and build separate maps (2).
Returns
Bimage* new map.
The component views must already be set.

◆ 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
*modelmodel.
sizesize of component density to extract.
originorigin 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.

◆ 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
*modelmodel.
*ct_nameslist of names associated with template sub-images.
*ptempdensity template.
*pmaskreal space mask.
*pfsmaskcross-correlation mask.
max_itermaximum number of iterations, 0 means only positional refinement.
viewstepfirst view direction angular step size (radians).
rotsteprotation around view angular step size (radians).
hireshigh resolution limit for cross-correlation.
loreslow resolution limit for cross-correlation.
accuracyangular accuracy (radians).
max_shiftmaximum shift in coordinates (angstrom).
max_view_anglemaximum angular change in view vector (radians).
max_rot_anglemaximum angular change in rotation around view vector (radians).
shift_flagflag 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.

◆ 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
*modelmodel.
*ptempdensity template.
*pmaskreal space mask.
*pfsmaskcross-correlation mask.
hireshigh resolution limit for cross-correlation.
loreslow resolution limit for cross-correlation.
max_shiftmaximum shift in coordinates (angstrom).
shift_flagflag to shift only along the normal (1) or perpendicular to it (2).
biasbias 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.