![]() |
Bsoft 2.1.4
Bernard's software package
|
Generates and manipulates projects for multislice calculations. More...
#include "mg_processing.h"
#include "mg_ctf.h"
#include "molecule_to_map.h"
#include "mol_transform.h"
#include "mol_edit.h"
#include "Complex.h"
#include "Vector3.h"
#include "linked_list.h"
#include "random_numbers.h"
#include "utilities.h"
Functions | |
Bimage * | img_calc_wave_propagator (Vector3< long > size, Vector3< double > sam, double thickness, double volt) |
Calculates the wave propagation function between slices. More... | |
Bimage * | img_calc_multi_slice (Bimage *pgrate, double thickness, double volt) |
Simulates the electron imaging process using a multi-slice approach. More... | |
Bimage * | img_calc_multi_slice_correct (Bimage *pgrate, double thickness, double volt) |
Bimage * | img_calc_potential (Bmolgroup *molgroup, Vector3< long > size, Vector3< double > origin, Vector3< double > sam, double thickness, double resolution, double Bfactor, Bstring ¶mfile, int type) |
Calculates the atomic potential. More... | |
int | img_calc_phase_grating (Bimage *p, double volt) |
Calculates the phase grating approximation from the atomic potential. More... | |
int | img_apply_complex_CTF (Bimage *p, CTFparam &cp) |
Applies a complex CTF function to a Fourier transform. More... | |
Bproject * | project_generate (int nfield, int nmg, int npart, Vector3< double > pixel_size, double img_origin, CTFparam &cp, double def_min, double def_max, double dose, double tsigma, Bstring &fieldbase, Bstring &mgbase, Bstring &partbase, int fieldnumber, int mgnumber, int partnumber) |
Generates a project for multislice simulations. More... | |
Bproject * | project_generate_asu (Bstring &symmetry_string, Vector3< double > pixel_size, double img_origin, double theta_step, double phi_step, CTFparam &cp, double defocus, double dose, Bstring &mgbase, Bstring &partbase) |
Generates a project for multislice calculations of an asymmetric unit. More... | |
int | project_generate_potential (Bmolgroup *molgroup, Bmolgroup *water, Bproject *project, Bstring &fieldname, Bstring &mgname, int partselect, Vector3< long > size, double thickness, double resolution, double Bfactor, int pottype, Bstring ¶mfile) |
Generates potential images using a multislice calculation. More... | |
int | project_generate_image (Bproject *project, double thickness, double resolution) |
Generates final images from a multislice calculation. More... | |
int | project_apply_distortions (Bproject *project, int poisson, double gauss, double kmtf) |
Applies imaging distortions to the final images from a multislice calculation. More... | |
Variables | |
int | verbose |
Generates and manipulates projects for multislice calculations.
Applies a complex CTF function to a Fourier transform.
*p | complex Fourier transform (modified). |
&cp | CTF parameters. |
The CTF is applied as a multiplication with a complex number. Both input and output are complex transforms.
Simulates the electron imaging process using a multi-slice approach.
*pgrate | phase grating multi-image. |
thickness | slice thickness (in angstrom). |
volt | acceleration voltage (volt). |
The passage of the electron beam is simulated as the interaction of a planar wave with successive planar phase gratings spaced at regular intervals, with the wave propagated between the 2D gratings. The phase gratings are derived from slabs of the atomic potential calculated from the atomic structure using scattering profiles. Note: The final product is a 2D transform of the exit wave. Reference: Cowley, J. M. (1995) Diffraction Physics. 3rd Rev. Ed. Elsevier Science, Amsterdam.
int img_calc_phase_grating | ( | Bimage * | p, |
double | volt | ||
) |
Calculates the phase grating approximation from the atomic potential.
*p | atomic potential image (modified). |
volt | acceleration voltage (volt). |
All calculations are complex.
Bimage * img_calc_potential | ( | Bmolgroup * | molgroup, |
Vector3< long > | size, | ||
Vector3< double > | origin, | ||
Vector3< double > | sam, | ||
double | thickness, | ||
double | resolution, | ||
double | Bfactor, | ||
Bstring & | paramfile, | ||
int | type | ||
) |
Calculates the atomic potential.
*molgroup | set of molecules. |
size | size of projection image (z = 1). |
origin | origin in x and y. |
sam | voxel size. |
thickness | slice thickness (in angstrom). |
resolution | resolution limit (angstrom). |
Bfactor | overall temperature factor. |
¶mfile | parameter file for atomic scattering coefficients. |
type | type of potential calculation: 0=reciprocal space, 1=real space, 2=gaussian |
Bimage * img_calc_wave_propagator | ( | Vector3< long > | size, |
Vector3< double > | sam, | ||
double | thickness, | ||
double | volt | ||
) |
Calculates the wave propagation function between slices.
size | size of projection image (z = 1). |
sam | pixel size in x and y, slice thickness in z. |
thickness | slice thickness (in angstrom). |
volt | acceleration voltage (volt). |
int project_apply_distortions | ( | Bproject * | project, |
int | poisson, | ||
double | gauss, | ||
double | kmtf | ||
) |
Applies imaging distortions to the final images from a multislice calculation.
*project | project structure with parameters. |
poisson | flag to add Poisson noise. |
gauss | width of gaussian noise to add (0=no noise). |
kmtf | mass transfer decay constant (0=no decay). |
Bproject * project_generate | ( | int | nfield, |
int | nmg, | ||
int | npart, | ||
Vector3< double > | pixel_size, | ||
double | img_origin, | ||
CTFparam & | cp, | ||
double | def_min, | ||
double | def_max, | ||
double | dose, | ||
double | tsigma, | ||
Bstring & | fieldbase, | ||
Bstring & | mgbase, | ||
Bstring & | partbase, | ||
int | fieldnumber, | ||
int | mgnumber, | ||
int | partnumber | ||
) |
Generates a project for multislice simulations.
nfield | number of fields-of-view. |
nmg | number of micrographs per field-of-view. |
npart | number of particles per micrograph. |
pixel_size | micrograph pixel size. |
img_origin | image origin within the simulation box. |
cp | CTF parameters). |
def_min | defocus minimum (angstrom). |
def_max | defocus maximum (angstrom). |
dose | electron dose (e/angstrom^2). |
tsigma | translation standard deviation (pixels). |
&fieldbase | field base name. |
&mgbase | micrograph base name. |
&partbase | particle image base name. |
fieldnumber | field-of-view number. |
mgnumber | micrograph number. |
partnumber | particle number. |
Bproject * project_generate_asu | ( | Bstring & | symmetry_string, |
Vector3< double > | pixel_size, | ||
double | img_origin, | ||
double | theta_step, | ||
double | phi_step, | ||
CTFparam & | cp, | ||
double | defocus, | ||
double | dose, | ||
Bstring & | mgbase, | ||
Bstring & | partbase | ||
) |
Generates a project for multislice calculations of an asymmetric unit.
&symmetry_string | symmetry designation. |
pixel_size | micrograph pixel size. |
img_origin | image origin within the simulation box. |
theta_step | step size in theta (radians). |
phi_step | step size in phi (radians). |
cp | CTF parameters). |
defocus | defocus minimum (angstrom). |
dose | electron dose (e/angstrom^2). |
&mgbase | micrograph base name. |
&partbase | particle image base name. |
int project_generate_image | ( | Bproject * | project, |
double | thickness, | ||
double | resolution | ||
) |
Generates final images from a multislice calculation.
*project | project structure with parameters. |
thickness | thickness of slices for the multislice calculation (angstrom). |
resolution | resolution for the multislice calculation (angstrom). |
int project_generate_potential | ( | Bmolgroup * | molgroup, |
Bmolgroup * | water, | ||
Bproject * | project, | ||
Bstring & | fieldname, | ||
Bstring & | mgname, | ||
int | partselect, | ||
Vector3< long > | size, | ||
double | thickness, | ||
double | resolution, | ||
double | Bfactor, | ||
int | pottype, | ||
Bstring & | paramfile | ||
) |
Generates potential images using a multislice calculation.
*molgroup | molecule group structure. |
*water | block of water as solvent. |
*project | project structure with parameters. |
&fieldname | selected field name (if "" do all). |
&mgname | selected micrograph (if "" do all). |
partselect | selected particle ( if <1 do all). |
size | size of simulation block (angstrom). |
thickness | thickness of slices for the multislice calculation (angstrom). |
resolution | resolution for the multislice calculation (angstrom). |
Bfactor | B-factor to apply to the multislice calculation (angstrom^2). |
pottype | type of potential to calculate (???). |
¶mfile | parameter file for scattering curves (???). |
|
extern |