|
Bsoft
2.1.0
Bernard's software package
|
Generates and manipulates projects for multislice calculations. More...
Go to the source code of this file.
Functions | |
| Bimage * | img_calc_multi_slice (Bimage *pgrate, double thickness, double volt, double resolution) |
| Simulates the electron imaging process using a multi-slice approach. More... | |
| Bimage * | img_calc_wave_propagator (Vector3< long > size, Vector3< double > sam, double thickness, double volt, double resolution) |
| Calculates the wave propagation function between slices. More... | |
| 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, double def_avg, double def_dev, double ast_angle, double volts, double Cs, double Cc, double amp_shift, double alpha, double energy_spread) |
| 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, double volt, double Cs, double Cc, double alpha, double energy_spread, double amp_shift, 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, double volt, double Cs, double Cc, double alpha, double energy_spread, double amp_shift, 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... | |
Generates and manipulates projects for multislice calculations.
Definition in file mg_multislice.h.
| int img_apply_complex_CTF | ( | Bimage * | p, |
| double | def_avg, | ||
| double | def_dev, | ||
| double | ast_angle, | ||
| double | volts, | ||
| double | Cs, | ||
| double | Cc, | ||
| double | amp_shift, | ||
| double | alpha, | ||
| double | energy_spread | ||
| ) |
Applies a complex CTF function to a Fourier transform.
| *p | complex Fourier transform (modified). |
| def_avg | defocus minimum (angstrom). |
| def_dev | defocus maximum (angstrom). |
| ast_angle | astigmatism angle (radians). |
| volts | acceleration voltage (volts). |
| Cs | spherical aberration (angstrom). |
| Cc | chromatic aberration (angstrom). |
| amp_shift | amplitude contrast phase shift (radian). |
| alpha | beam source size (radians). |
| energy_spread | effective energy spread (fraction: typically 10^-5) |
The CTF is applied as a multiplication with a complex number:
new_datum.re = datum.re*amp_fac*cos(dphi) - datum.im*phi_fac*sin(dphi)
new_datum.re = datum.re*phi_fac*sin(dphi) + datum.im*amp_fac*cos(dphi)
Both input and output are complex transforms.
Definition at line 252 of file mg_multislice.cpp.
Simulates the electron imaging process using a multi-slice approach.
| *pgrate | phase grating multi-image. |
| thickness | slice thickness (in angstrom). |
| volt | acceleration voltage (volt). |
| resolution | resolution limit (angstrom). |
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.
Definition at line 89 of file mg_multislice.cpp.
| int img_calc_phase_grating | ( | Bimage * | p, |
| double | volt | ||
| ) |
Calculates the phase grating approximation from the atomic potential.
All calculations are complex.
| *p | atomic potential image (modified). |
| volt | acceleration voltage (volt). |
Definition at line 206 of file mg_multislice.cpp.
| 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 |
Definition at line 139 of file mg_multislice.cpp.
| Bimage* img_calc_wave_propagator | ( | Vector3< long > | size, |
| Vector3< double > | sam, | ||
| double | thickness, | ||
| double | volt, | ||
| double | resolution | ||
| ) |
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). |
| resolution | resolution limit (angstrom). |
Definition at line 32 of file mg_multislice.cpp.
| 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). |
Definition at line 676 of file mg_multislice.cpp.
| Bproject* project_generate | ( | int | nfield, |
| int | nmg, | ||
| int | npart, | ||
| Vector3< double > | pixel_size, | ||
| double | img_origin, | ||
| double | volt, | ||
| double | Cs, | ||
| double | Cc, | ||
| double | alpha, | ||
| double | energy_spread, | ||
| double | amp_shift, | ||
| 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. |
| volt | acceleration voltage (volts). |
| Cs | spherical aberration coefficient (angstrom). |
| Cc | chromatic aberration coefficient (angstrom). |
| alpha | beam divergence angle (radians). |
| energy_spread | energy spread (relative units). |
| amp_shift | amplitude contribution phase shift (radian). |
| 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. |
Definition at line 344 of file mg_multislice.cpp.
| Bproject* project_generate_asu | ( | Bstring & | symmetry_string, |
| Vector3< double > | pixel_size, | ||
| double | img_origin, | ||
| double | theta_step, | ||
| double | phi_step, | ||
| double | volt, | ||
| double | Cs, | ||
| double | Cc, | ||
| double | alpha, | ||
| double | energy_spread, | ||
| double | amp_shift, | ||
| 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). |
| volt | acceleration voltage (volts). |
| Cs | spherical aberration coefficient (angstrom). |
| Cc | chromatic aberration coefficient (angstrom). |
| alpha | beam divergence angle (radians). |
| energy_spread | energy spread (relative units). |
| amp_shift | amplitude contribution (fraction). |
| defocus | defocus minimum (angstrom). |
| dose | electron dose (e/angstrom^2). |
| &mgbase | micrograph base name. |
| &partbase | particle image base name. |
Definition at line 442 of file mg_multislice.cpp.
| 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). |
Definition at line 604 of file mg_multislice.cpp.
| 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 (???). |
Definition at line 504 of file mg_multislice.cpp.