Xmipp  v3.23.11-Nereus
art_crystal.h
Go to the documentation of this file.
1 /***************************************************************************
2  *
3  * Authors: Carlos Oscar S. Sorzano (coss@cnb.csic.es)
4  *
5  * Unidad de Bioinformatica of Centro Nacional de Biotecnologia , CSIC
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
20  * 02111-1307 USA
21  *
22  * All comments concerning this program package may be sent to the
23  * e-mail address 'xmipp@cnb.csic.es'
24  ***************************************************************************/
25 #ifndef _PROG_ART_CRYSTAL_HH
26 # define _PROG_ART_CRYSTAL_HH
27 
28 #include <core/xmipp_image.h>
29 #include <core/matrix1d.h>
30 #include <core/matrix2d.h>
31 #include <core/symmetries.h>
32 
33 #include "base_art_recons.h"
34 
44 {
45 public:
46  /* User parameters ...................................................... */
49  double a_mag;
52  double b_mag;
54  double ang_a2b_deg;
56  double ang_x2a_deg;
62  bool fill_space;
63 
64  /* Side information ..................................................... */
86 
87 public:
88 
89  static void defineParams(XmippProgram * program, const char* prefix=nullptr, const char* comment=nullptr);
90 
92  void readParams(XmippProgram * program);
93 
95  void print(std::ostream &o) const;
96 
97 
104  void preProcess(GridVolume &vol_basis0, int level = FULL, int rank = -1);
105 
118  void singleStep(GridVolume &vol_in, GridVolume *vol_out,
119  Projection &theo_proj, Projection &read_proj,
120  int sym_no,
121  Projection &diff_proj, Projection &corr_proj, Projection &alig_proj,
122  double &mean_error, int numIMG, double lambda, int act_proj,
123  const FileName &fn_ctf, const MultidimArray<int> *maskPtr,
124  bool refine);
125 
126  /* Finish ART iterations.
127  Expand output volume to fill space if necessary. */
128  void postProcess(GridVolume &vol_basis);
129 
131  void applySymmetry(GridVolume &vol_in, GridVolume *vol_out,int grid_type);
132 };
133 
143  const Matrix1D<double> &b,
144  double a_mag, double b_mag,
145  double ang_a2b_deg,
148  Matrix2D<double> &V,
149  int space_group);
150 
155  const CrystalARTRecons &eprm, GridVolume &vol);
156 
158 
159 #endif
Matrix1D< double > avox
First lattice vector (voxel units)
Definition: art_crystal.h:58
#define FULL
Definition: basic_art.h:406
Matrix1D< double > bint
Second lattice vector approximated to integer numbers (BCC units)
Definition: art_crystal.h:72
Matrix1D< double > a
First lattice vector (BCC units)
Definition: art_crystal.h:66
void computeIntegerLattice(const Matrix1D< double > &a, const Matrix1D< double > &b, double a_mag, double b_mag, double ang_a2b_deg, Matrix1D< double > &aint, Matrix1D< double > &bint, Matrix2D< double > &V, int space_group)
void preProcess(GridVolume &vol_basis0, int level=FULL, int rank=-1)
double ang_x2a_deg
angle from x axis to a (degrees)
Definition: art_crystal.h:56
Matrix1D< double > b
Second lattice vector (BCC units)
Definition: art_crystal.h:68
Matrix1D< double > ai
ai=aint/2 as double numbers
Definition: art_crystal.h:74
double * lambda
MultidimArray< int > unit_cell_mask
Definition: art_crystal.h:85
void readParams(XmippProgram *program)
Definition: art_crystal.cpp:54
void postProcess(GridVolume &vol_basis)
Matrix1D< double > bvox
Second lattice vector (voxel units)
Definition: art_crystal.h:60
void print(std::ostream &o) const
std::cout << crystal_prm;
Definition: art_crystal.cpp:89
Matrix1D< double > bi
bi=aint/2 as double numbers
Definition: art_crystal.h:76
double ang_a2b_deg
angle from a to b (degrees)
Definition: art_crystal.h:54
void applySymmetry(GridVolume &vol_in, GridVolume *vol_out, int grid_type)
bool fill_space
Fill space, repeat unit cell all over the space.
Definition: art_crystal.h:62
void expandToFillSpace(const BasicARTParameters &prm, const CrystalARTRecons &eprm, GridVolume &vol)
static void defineParams(XmippProgram *program, const char *prefix=nullptr, const char *comment=nullptr)
Definition: art_crystal.cpp:36
ProgClassifyCL2D * prm
int space_group
space_group
Definition: art_crystal.h:78
void singleStep(GridVolume &vol_in, GridVolume *vol_out, Projection &theo_proj, Projection &read_proj, int sym_no, Projection &diff_proj, Projection &corr_proj, Projection &alig_proj, double &mean_error, int numIMG, double lambda, int act_proj, const FileName &fn_ctf, const MultidimArray< int > *maskPtr, bool refine)
Matrix1D< double > aint
First lattice vector approximated to integer numbers (BCC units)
Definition: art_crystal.h:70