Xmipp  v3.23.11-Nereus
volume_from_pdb.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  *
3  * Authors:
4  *
5  * Carlos Oscar S. Sorzano (coss@cnb.csic.es)
6  * Unidad de Bioinformatica of Centro Nacional de Biotecnologia , CSIC
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
21  * 02111-1307 USA
22  *
23  * All comments concerning this program package may be sent to the
24  * e-mail address 'xmipp@cnb.csic.es'
25  ***************************************************************************/
26 
27 #include "volume_from_pdb.h"
28 #include "core/transformations.h"
29 #include <core/args.h>
30 #include "data/pdb.h"
31 
32 #include <fstream>
33 
34 /* Empty constructor ------------------------------------------------------- */
36 {
37  blob.radius = 2; // Blob radius in voxels
38  blob.order = 2; // Order of the Bessel function
39  blob.alpha = 3.6; // Smoothness parameter
40  output_dim_x = -1;
41  output_dim_y = -1;
42  output_dim_z = -1;
43 
44  fn_pdb = "";
45  Ts = 1;
46  highTs = 1.0/12.0;
47  useBlobs=false;
48  usePoorGaussian=false;
49  useFixedGaussian=false;
50  doCenter=false;
51  noHet=false;
52 
53  // Periodic table for the blobs
54  periodicTable.resize(12, 2);
55  periodicTable(0, 0) = atomRadius("H");
56  periodicTable(0, 1) = atomCharge("H");
57  periodicTable(1, 0) = atomRadius("C");
58  periodicTable(1, 1) = atomCharge("C");
59  periodicTable(2, 0) = atomRadius("N");
60  periodicTable(2, 1) = atomCharge("N");
61  periodicTable(3, 0) = atomRadius("O");
62  periodicTable(3, 1) = atomCharge("O");
63  periodicTable(4, 0) = atomRadius("P");
64  periodicTable(4, 1) = atomCharge("P");
65  periodicTable(5, 0) = atomRadius("S");
66  periodicTable(5, 1) = atomCharge("S");
67  periodicTable(6, 0) = atomRadius("Fe");
68  periodicTable(6, 1) = atomCharge("Fe");
69  periodicTable(7, 0) = atomRadius("K");
70  periodicTable(7, 1) = atomCharge("K");
71  periodicTable(8, 0) = atomRadius("F");
72  periodicTable(8, 1) = atomCharge("F");
73  periodicTable(9, 0) = atomRadius("Mg");
74  periodicTable(9, 1) = atomCharge("Mg");
75  periodicTable(10, 0) = atomRadius("Cl");
76  periodicTable(10, 1) = atomCharge("Cl");
77  periodicTable(11, 0) = atomRadius("Ca");
78  periodicTable(11, 1) = atomCharge("Ca");
79 
80  // Correct the atom weights by the blob weight
81  for (size_t i = 0; i < MAT_YSIZE(periodicTable); i++)
82  {
83  periodicTable(i, 1) /=
85  }
86 }
87 
88 /* Produce Side Info ------------------------------------------------------- */
90 {
92  {
93  // Check if it is a pseudodensity volume
94  std::ifstream fh_pdb;
95  fh_pdb.open(fn_pdb.c_str());
96  if (!fh_pdb)
98  while (!fh_pdb.eof())
99  {
100  // Read an ATOM line
101  std::string line;
102  getline(fh_pdb, line);
103  if (line == "")
104  continue;
105  std::string kind = line.substr(0,6);
106  if (kind!="REMARK")
107  continue;
108  std::vector< std::string > results;
109  splitString(line," ",results);
110  if (useFixedGaussian && results[1]=="fixedGaussian")
111  sigmaGaussian=textToFloat(results[2]);
112  if (useFixedGaussian && results[1]=="intensityColumn")
113  intensityColumn=results[2];
114  }
115  fh_pdb.close();
116  }
117 
119  {
120  // Compute the downsampling factor
121  M=(int)ROUND(Ts/highTs);
122 
123  // Atom profiles for the electron scattering method
124  atomProfiles.setup(M,highTs,false);
125  }
126 }
127 
128 /* Atom description ------------------------------------------------------- */
130  const std::string &_element, double &weight, double &radius) const
131 {
132  int idx = -1;
133  weight = radius = 0;
134  switch (_element[0])
135  {
136  case 'H':
137  idx = 0;
138  break;
139  case 'C':
140  idx = 1;
141  break;
142  case 'N':
143  idx = 2;
144  break;
145  case 'O':
146  idx = 3;
147  break;
148  case 'P':
149  idx = 4;
150  break;
151  case 'S':
152  idx = 5;
153  break;
154  case 'E': //iron Fe
155  idx = 6;
156  break;
157  case 'K':
158  idx = 7;
159  break;
160  case 'F':
161  idx = 8;
162  break;
163  case 'G': // Magnesium Mg
164  idx = 9;
165  break;
166  case 'L': // Chlorine Cl
167  idx = 10;
168  break;
169  case 'A': // Calcium Ca
170  idx = 11;
171  break;
172  default:
173  if (verbose>0)
174  std::cout << "Unknown :" << _element << std::endl;
175  return;
176  }
177  radius = periodicTable(idx, 0);
178  weight = periodicTable(idx, 1);
179 }
180 /* Usage ------------------------------------------------------------------- */
182 {
183  addUsageLine("Covert a PDB file to a volume.");
184  addExampleLine("Sample at 1.6A and limit the frequency to 10A",false);
185  addExampleLine(" xmipp_volume_from_pdb -i 1o7d.pdb --sampling 1.6");
186  addExampleLine(" xmipp_transform_filter -i 1o7d.vol -o 1o7dFiltered.vol --fourier low_pass 10 raised_cosine 0.05 --sampling 1.6");
187 
188  addParamsLine(" -i <pdb_file> : File to process");
189  addParamsLine(" [-o <fn_root>] : Root name for output");
190  addParamsLine(" [--sampling <Ts=1>] : Sampling rate (Angstroms/pixel)");
191  addParamsLine(" [--high_sampling_rate <highTs=0.08333333>]: Sampling rate before downsampling");
192  addParamsLine(" [--size <output_dim_x=-1> <output_dim_y=-1> <output_dim_z=-1>]: Final size in pixels (must be a power of 2, if blobs are used)");
193  addParamsLine(" [--orig <orig_x=0> <orig_y=0> <orig_z=0>]: Define origin of the output volume");
194  addParamsLine(" : If just one dimension is introduced dim_x = dim_y = dim_z");
195  addParamsLine(" [--centerPDB] : Center PDB with the center of mass");
196  addParamsLine(" [--oPDB] : Save centered PDB");
197  addParamsLine(" [--noHet] : Heteroatoms are not converted");
198  addParamsLine(" [--blobs] : Use blobs instead of scattering factors");
199  addParamsLine(" [--poor_Gaussian] : Use a simple Gaussian adapted to each atom");
200  addParamsLine(" [--fixed_Gaussian <std=-1>] : Use a fixed Gausian for each atom with");
201  addParamsLine(" : this standard deviation");
202  addParamsLine(" : If not given, the standard deviation is taken from the PDB file");
203  addParamsLine(" [--intensityColumn <intensity_type=occupancy>] : Where to write the intensity in the PDB file");
204  addParamsLine(" where <intensity_type> occupancy Bfactor : Valid values: occupancy, Bfactor");
205 }
206 /* Read parameters --------------------------------------------------------- */
208 {
209  fn_pdb = getParam("-i");
210  fn_out = checkParam("-o") ? getParam("-o") : fn_pdb.withoutExtension();
211  Ts = getDoubleParam("--sampling");
212  highTs = getDoubleParam("--high_sampling_rate");
213  output_dim_x = getIntParam("--size", 0);
214  output_dim_y = getIntParam("--size", 1);
215  output_dim_z = getIntParam("--size", 2);
216  if (checkParam("--orig"))
217  {
218  orig_x = getIntParam("--orig", 0);
219  orig_y = getIntParam("--orig", 1);
220  orig_z = getIntParam("--orig", 2);
221  origGiven=true;
222  }
223  else
224  {
225  origGiven=false;
226  orig_x=orig_y=orig_z=0;
227  }
228  useBlobs = checkParam("--blobs");
229  usePoorGaussian = checkParam("--poor_Gaussian");
230  useFixedGaussian = checkParam("--fixed_Gaussian");
231  if (useFixedGaussian)
232  sigmaGaussian = getDoubleParam("--fixed_Gaussian");
233  doCenter = checkParam("--centerPDB");
234  fn_outPDB = checkParam("--oPDB") ? (fn_out + "_centered.pdb") : FileName();
235  noHet = checkParam("--noHet");
236  intensityColumn = getParam("--intensityColumn");
237 }
238 
239 /* Show -------------------------------------------------------------------- */
241 {
242  if (verbose==0)
243  return;
244  std::cout << "PDB file: " << fn_pdb << std::endl
245  << "Sampling rate: " << Ts << std::endl
246  << "High sampling rate: " << highTs << std::endl
247  << "Size: " << output_dim_x << " " << output_dim_y << " " << output_dim_z << std::endl
248  << "Origin: " << orig_x << " " << orig_y << " " << orig_z << std::endl
249  << "Center PDB: " << doCenter << std::endl
250  << "Do not Hetatm: " << noHet << std::endl
251  << "Use blobs: " << useBlobs << std::endl
252  << "Use poor Gaussian: " << usePoorGaussian << std::endl
253  << "Use fixed Gaussian: " << useFixedGaussian << std::endl
254  ;
255  if (useFixedGaussian)
256  std::cout << "Intensity Col: " << intensityColumn << std::endl
257  << "Sigma: " << sigmaGaussian << std::endl;
258 }
259 
260 /* Compute protein geometry ------------------------------------------------ */
262 {
263  Matrix1D<double> limit0(3), limitF(3);
265  if (doCenter)
266  {
267  limit0-=centerOfMass;
268  limitF-=centerOfMass;
269  }
270  limit.resize(3);
271  XX(limit) = XMIPP_MAX(ABS(XX(limit0)), ABS(XX(limitF)));
272  YY(limit) = XMIPP_MAX(ABS(YY(limit0)), ABS(YY(limitF)));
273  ZZ(limit) = XMIPP_MAX(ABS(ZZ(limit0)), ABS(ZZ(limitF)));
274 
275  // Update output size if necessary
276  if (output_dim_x == -1)
277  {
278  int max_dim = XMIPP_MAX(CEIL(ZZ(limit) * 2 / Ts) + 5, CEIL(YY(limit) * 2 / Ts) + 5);
279  max_dim = XMIPP_MAX(max_dim, CEIL(XX(limit) * 2 / Ts) + 5);
280  if (useBlobs)
281  {
282  output_dim_x = (int)NEXT_POWER_OF_2(max_dim);
285  }
286  else
287  {
288  output_dim_x = max_dim+10;
291  }
292  }
293  else
294  {
295  if (output_dim_y == -1)
296  {
299  }
300  }
301 }
302 
303 /* Create protein at a high sampling rate ---------------------------------- */
305 {
306  // Create an empty volume to hold the protein
307  int finalDim_x, finalDim_y, finalDim_z;
308  if (highTs!=Ts)
309  {
310  finalDim_x=(int)NEXT_POWER_OF_2(output_dim_x / (highTs/Ts));
311  finalDim_y=(int)NEXT_POWER_OF_2(output_dim_y / (highTs/Ts));
312  finalDim_z=(int)NEXT_POWER_OF_2(output_dim_z / (highTs/Ts));
313  }
314  else
315  {
316  finalDim_x=output_dim_x;
317  finalDim_y=output_dim_y;
318  finalDim_z=output_dim_z;
319  }
320  Vhigh().initZeros(finalDim_x,finalDim_y,finalDim_z);
321  if (!origGiven)
322  Vhigh().setXmippOrigin();
323  else
324  {
325  STARTINGX(Vhigh()) = orig_x;
326  STARTINGY(Vhigh()) = orig_y;
327  STARTINGZ(Vhigh()) = orig_z;
328  }
329  if (verbose)
330  std::cout << "The highly sampled volume is of size " << XSIZE(Vhigh())
331  << std::endl;
332  std::cout << "Size: "; Vhigh().printShape(); std::cout << std::endl;
333 
334  // Declare centered PDB
335  PDBRichPhantom centered_pdb;
336 
337  // Read centered pdb
338  centered_pdb.read(fn_pdb.c_str());
339 
340  Matrix1D<double> r(3);
341  bool useBFactor = intensityColumn=="Bfactor";
342  // Iterate the list of atoms modifying data if needed
343  for (auto& atom : centered_pdb.atomList) {
344  if (doCenter) {
345  atom.x -= XX(centerOfMass);
346  atom.y -= YY(centerOfMass);
347  atom.z -= ZZ(centerOfMass);
348  }
349  VECTOR_R3(r, atom.x, atom.y, atom.z);
350  r /= highTs;
351 
352  // Characterize atom
353  double weight, radius;
354  if (!useFixedGaussian)
355  {
356  if (noHet && atom.record == "HETATM")
357  continue;
358  atomBlobDescription(atom.atomType, weight, radius);
359  }
360  else
361  {
362  radius=4.5*sigmaGaussian;
363  if (useBFactor)
364  weight=atom.bfactor;
365  else
366  weight=atom.occupancy;
367  }
368  blob.radius = radius;
369  if (usePoorGaussian)
370  radius=XMIPP_MAX(radius/Ts,4.5);
371  double GaussianSigma2=(radius/(3*sqrt(2.0)));
372  if (useFixedGaussian)
373  GaussianSigma2=sigmaGaussian;
374  GaussianSigma2*=GaussianSigma2;
375  double GaussianNormalization = 1.0/pow(2*PI*GaussianSigma2,1.5);
376 
377  // Find the part of the volume that must be updated
378  int k0 = XMIPP_MAX(FLOOR(ZZ(r) - radius), STARTINGZ(Vhigh()));
379  int kF = XMIPP_MIN(CEIL(ZZ(r) + radius), FINISHINGZ(Vhigh()));
380  int i0 = XMIPP_MAX(FLOOR(YY(r) - radius), STARTINGY(Vhigh()));
381  int iF = XMIPP_MIN(CEIL(YY(r) + radius), FINISHINGY(Vhigh()));
382  int j0 = XMIPP_MAX(FLOOR(XX(r) - radius), STARTINGX(Vhigh()));
383  int jF = XMIPP_MIN(CEIL(XX(r) + radius), FINISHINGX(Vhigh()));
384 
385  // Fill the volume with this atom
386  Matrix1D<double> rdiff(3);
387  for (int k = k0; k <= kF; k++)
388  for (int i = i0; i <= iF; i++)
389  for (int j = j0; j <= jF; j++)
390  {
391  VECTOR_R3(rdiff, XX(r) - j, YY(r) - i, ZZ(r) - k);
392  rdiff*=highTs;
393  if (useBlobs)
394  Vhigh(k, i, j) += weight * blob_val(rdiff.module(), blob);
395  else if (usePoorGaussian || useFixedGaussian)
396  Vhigh(k, i, j) += weight *
397  exp(-rdiff.module()*rdiff.module()/(2*GaussianSigma2))*
398  GaussianNormalization;
399  }
400  }
401 
402  // Save centered PDB
403  if (doCenter && !fn_outPDB.empty())
404  {
405  centered_pdb.write(fn_outPDB);
406  }
407 }
408 
409 /* Create protein at a low sampling rate ----------------------------------- */
411 {
412  // Compute the integer downsapling factor
413  int M = FLOOR(Ts / highTs);
414  double current_Ts = highTs;
415 
416  // Use Bsplines pyramid if possible
417  int levels = FLOOR(log10((double)M) / log10(2.0) + XMIPP_EQUAL_ACCURACY);
419  current_Ts *= pow(2.0, levels);
420  Vhigh.clear();
421 
422  // Now scale using Bsplines
423  int new_output_dim = CEIL(XSIZE(Vlow()) * current_Ts / Ts);
425  new_output_dim, new_output_dim, new_output_dim);
426  Vlow() = Vhigh();
427  if (!origGiven)
428  Vlow().setXmippOrigin();
429 
430  // Return to the desired size
434 }
435 
436 /* Blob properties --------------------------------------------------------- */
438 {
439  std::ofstream fh_out;
440  fh_out.open((fn_out + "_Fourier_profile.txt").c_str());
441  if (!fh_out)
443  fh_out << "# Freq(1/A) 10*log10(|Blob(f)|^2) Ts=" << highTs << std::endl;
444 
445 
446  for(double w=0; w < 1.0 / (2*highTs); w += 1.0 / (highTs * 500))
447  {
448  double H = kaiser_Fourier_value(w * highTs, periodicTable(0, 0) / highTs,
449  blob.alpha, blob.order);
450  fh_out << w << " " << 10*log10(H*H) << std::endl;
451  }
452  fh_out.close();
453 }
454 
455 /* Create protein using scattering profiles -------------------------------- */
457 {
458  // Create an empty volume to hold the protein
460  if (!origGiven) {
461  Vlow().setXmippOrigin();
462  }
463  else
464  {
465  STARTINGX(Vlow()) = orig_x;
466  STARTINGY(Vlow()) = orig_y;
467  STARTINGZ(Vlow()) = orig_z;
468  }
469 
470  //Save centered PDB
471  PDBRichPhantom centered_pdb;
472 
473  // Read centered pdb
474  centered_pdb.read(fn_pdb.c_str());
475 
476  Matrix1D<double> r(3);
477  bool useBFactor = intensityColumn=="Bfactor";
478  // Iterate the list of atoms modifying data if needed
479  for (auto& atom : centered_pdb.atomList) {
480  // Check if heteroatoms are allowed and current atom is one of them
481  if (noHet && atom.record == "HETATM")
482  continue;
483 
484  if (doCenter) {
485  atom.x -= XX(centerOfMass);
486  atom.y -= YY(centerOfMass);
487  atom.z -= ZZ(centerOfMass);
488  }
489  VECTOR_R3(r, atom.x, atom.y, atom.z);
490  r /= Ts;
491 
492  // Characterize atom
493  try
494  {
495  double radius=atomProfiles.atomRadius(atom.atomType[0]);
496  double radius2=radius*radius;
497 
498  // Find the part of the volume that must be updated
499  const MultidimArray<double> &mVlow=Vlow();
500  int k0 = XMIPP_MAX(FLOOR(ZZ(r) - radius), STARTINGZ(mVlow));
501  int kF = XMIPP_MIN(CEIL(ZZ(r) + radius), FINISHINGZ(mVlow));
502  int i0 = XMIPP_MAX(FLOOR(YY(r) - radius), STARTINGY(mVlow));
503  int iF = XMIPP_MIN(CEIL(YY(r) + radius), FINISHINGY(mVlow));
504  int j0 = XMIPP_MAX(FLOOR(XX(r) - radius), STARTINGX(mVlow));
505  int jF = XMIPP_MIN(CEIL(XX(r) + radius), FINISHINGX(mVlow));
506 
507  // Fill the volume with this atom
508  for (int k = k0; k <= kF; k++)
509  {
510  double zdiff=ZZ(r) - k;
511  double zdiff2=zdiff*zdiff;
512  for (int i = i0; i <= iF; i++)
513  {
514  double ydiff=YY(r) - i;
515  double zydiff2=zdiff2+ydiff*ydiff;
516  for (int j = j0; j <= jF; j++)
517  {
518  double xdiff=XX(r) - j;
519  double rdiffModule2=zydiff2+xdiff*xdiff;
520  if (rdiffModule2<radius2)
521  {
522  double rdiffModule=sqrt(rdiffModule2);
524  atom.atomType[0],rdiffModule);
525  }
526  }
527  }
528  }
529  }
530  catch (XmippError XE)
531  {
532  if (verbose)
533  std::cerr << "Ignoring atom of type *" << atom.atomType << "*" << std::endl;
534  }
535  }
536 
537  // Save centered PDB
538  if (doCenter && !fn_outPDB.empty())
539  {
540  centered_pdb.write(fn_outPDB);
541  }
542 }
543 
544 /* Run --------------------------------------------------------------------- */
546 {
547  produceSideInfo();
548  show();
550  if (useBlobs)
551  {
554  blobProperties();
555  }
556  else if (usePoorGaussian || useFixedGaussian)
557  {
558  highTs=Ts;
560  Vlow=Vhigh;
561  Vhigh.clear();
562  }
563  else
564  {
566  }
567  if (Vlow().sum()<0)
568  REPORT_ERROR(ERR_NUMERICAL,"The output volume has a negative average. This could be caused by a too large voxel size.");
569  if (fn_out!="")
570  Vlow.write(fn_out + ".vol");
571 }
struct blobtype blob
#define MAT_YSIZE(m)
Definition: matrix2d.h:124
void read(const FileName &fnPDB, const bool pseudoatoms=false, const double threshold=0.0)
Read rich phantom from either a PDB of CIF file.
Definition: pdb.cpp:704
double alpha
Smoothness parameter.
Definition: blobs.h:121
#define XMIPP_MAX(x, y)
Definition: xmipp_macros.h:193
double module() const
Definition: matrix1d.h:983
double getDoubleParam(const char *param, int arg=0)
#define FINISHINGX(v)
#define REPORT_ERROR(nerr, ErrormMsg)
Definition: xmipp_error.h:211
void write(const FileName &fnPDB, const bool renumber=false)
Write rich phantom to PDB or CIF file.
Definition: pdb.cpp:872
void atomBlobDescription(const std::string &_element, double &weight, double &radius) const
void sqrt(Image< double > &op)
void pyramidReduce(int SplineDegree, MultidimArrayGeneric &V2, const MultidimArrayGeneric &V1, int levels)
Couldn&#39;t write to file.
Definition: xmipp_error.h:140
void write(const FileName &name="", size_t select_img=ALL_IMAGES, bool isStack=false, int mode=WRITE_OVERWRITE, CastWriteMode castMode=CW_CAST, int _swapWrite=0)
doublereal * w
#define FINISHINGZ(v)
void createProteinAtLowSamplingRate()
std::string intensityColumn
Column for the intensity (if any). Only valid for fixed_gaussians.
#define STARTINGX(v)
#define i
Image< double > Vlow
ql0001_ & k(htemp+1),(cvec+1),(atemp+1),(bj+1),(bl+1),(bu+1),(x+1),(clamda+1), &iout, infoqp, &zero,(w+1), &lenw,(iw+1), &leniw, &glob_grd.epsmac
int atomCharge(const std::string &atom)
Definition: pdb.cpp:122
void setup(int m, double hights, bool computeProjection=false)
Definition: pdb.cpp:1402
#define STARTINGY(v)
#define A3D_ELEM(V, k, i, j)
#define FLOOR(x)
Definition: xmipp_macros.h:240
const char * getParam(const char *param, int arg=0)
#define XX(v)
Definition: matrix1d.h:85
#define CEIL(x)
Definition: xmipp_macros.h:225
float textToFloat(const char *str)
int splitString(const String &input, const String &delimiter, StringVector &results, bool includeEmpties)
#define XMIPP_EQUAL_ACCURACY
Definition: xmipp_macros.h:119
void resize(size_t Xdim, bool copy=true)
Definition: matrix1d.h:410
#define XSIZE(v)
void computePDBgeometry(const std::string &fnPDB, Matrix1D< double > &centerOfMass, Matrix1D< double > &limit0, Matrix1D< double > &limitF, const std::string &intensityColumn)
Definition: pdb.cpp:238
Matrix1D< double > centerOfMass
Error related to numerical calculation.
Definition: xmipp_error.h:179
#define ABS(x)
Definition: xmipp_macros.h:142
void createProteinUsingScatteringProfiles()
void addExampleLine(const char *example, bool verbatim=true)
#define ROUND(x)
Definition: xmipp_macros.h:210
File or directory does not exist.
Definition: xmipp_error.h:136
void createProteinAtHighSamplingRate()
void log10(Image< double > &op)
int verbose
Verbosity level.
#define XMIPP_MIN(x, y)
Definition: xmipp_macros.h:181
#define NEXT_POWER_OF_2(x)
Definition: xmipp_macros.h:374
#define j
void scaleToSize(int SplineDegree, MultidimArrayGeneric &V2, const MultidimArrayGeneric &V1, int Xdim, int Ydim, int Zdim)
double kaiser_Fourier_value(double w, double a, double alpha, int m)
Definition: blobs.cpp:144
#define YY(v)
Definition: matrix1d.h:93
AtomInterpolator atomProfiles
std::vector< RichAtom > atomList
List of atoms.
Definition: pdb.h:257
double atomRadius(const std::string &atom)
Definition: pdb.cpp:168
#define FINISHINGY(v)
FileName withoutExtension() const
void blobProperties() const
#define FIRST_XMIPP_INDEX(size)
Definition: xmipp_macros.h:439
#define VECTOR_R3(v, x, y, z)
Definition: matrix1d.h:124
int order
Derivation order and Bessel function order.
Definition: blobs.h:118
bool checkParam(const char *param)
Matrix1D< double > limit
double volumeAtDistance(char atom, double r) const
Definition: pdb.cpp:101
double atomRadius(char atom) const
Definition: pdb.h:414
void addUsageLine(const char *line, bool verbatim=false)
#define blob_val(r, blob)
Definition: blobs.h:139
#define LAST_XMIPP_INDEX(size)
Definition: xmipp_macros.h:448
#define PI
Definition: tools.h:43
Matrix2D< double > periodicTable
int getIntParam(const char *param, int arg=0)
Image< double > Vhigh
#define STARTINGZ(v)
double radius
Spatial radius in Universal System units.
Definition: blobs.h:115
#define ZZ(v)
Definition: matrix1d.h:101
void resize(size_t Ydim, size_t Xdim, bool noCopy=false)
Definition: matrix2d.cpp:1022
void clear()
Definition: xmipp_image.h:144
void addParamsLine(const String &line)
double basvolume(double a, double alpha, int m, int n)
Definition: blobs.cpp:215