ProSHADE  0.7.5.4 (MAR 2021)
Protein Shape Detection
ProSHADE.cpp
Go to the documentation of this file.
1 
25 //==================================================== ProSHADE
26 #include "ProSHADE.hpp"
27 
35 {
36  //================================================ Settings regarding the task at hand
37  this->task = NA;
38 
39  //================================================ Settings regarding input files
40  this->forceP1 = true;
41  this->removeWaters = true;
42  this->firstModelOnly = true;
43 
44  //================================================ Settings regarding the resolution of calculations
45  this->requestedResolution = -1.0;
46  this->changeMapResolution = false;
47  this->changeMapResolutionTriLinear = false;
48 
49  //================================================ Settings regarding the PDB B-factor change
50  this->pdbBFactorNewVal = -1.0;
51 
52  //================================================ Settings regarding the bandwidth of calculations
53  this->maxBandwidth = 0;
54  this->rotationUncertainty = 0;
55 
56  //================================================ Settings regarding the phase
57  this->usePhase = true;
58 
59  //================================================ Settings regarding the spheres
60  this->maxSphereDists = 0.0;
61 
62  //================================================ Settings regarding the Gauss-Legendre integration
63  this->integOrder = 0;
64  this->taylorSeriesCap = 10;
65 
66  //================================================ Settings regarding map normalisation
67  this->normaliseMap = false;
68 
69  //================================================ Settings regarding map inversion
70  this->invertMap = false;
71 
72  //================================================ Settings regarding map masking
73  this->blurFactor = 350.0;
74  this->maskingThresholdIQRs = 3.0;
75  this->maskMap = false;
76  this->useCorrelationMasking = false;
77  this->halfMapKernel = 0.0;
78  this->correlationKernel = 0.0;
79  this->saveMask = false;
80  this->maskFileName = "maskFile";
81 
82  //================================================ Settings regarding re-boxing
83  this->reBoxMap = false;
84  this->boundsExtraSpace = 3.0;
85  this->boundsSimilarityThreshold = 0;
86  this->useSameBounds = false;
87  this->forceBounds = new proshade_signed [6];
88 
89  //================================================ Settings regarding COM
90  this->moveToCOM = false;
91 
92  //================================================ Settings regarding extra cell space
93  this->addExtraSpace = 10.0;
94 
95  //================================================ Settings regarding shell settings
96  this->progressiveSphereMapping = false;
97 
98  //================================================ Settings regarding output file name
99  this->outName = "reBoxed";
100 
101  //================================================ Settings regarding distances computation
102  this->computeEnergyLevelsDesc = true;
103  this->computeTraceSigmaDesc = true;
104  this->computeRotationFuncDesc = true;
105  this->enLevMatrixPowerWeight = 1.0;
106 
107  //================================================ Settings regarding peak searching
108  this->peakNeighbours = 1;
109  this->noIQRsFromMedianNaivePeak = -999.9;
110 
111  //================================================ Settings regarding 1D grouping
112  this->smoothingFactor = 15.0;
113 
114  //================================================ Settings regarding the symmetry detection
116  this->useBiCubicInterpolationOnPeaks = true;
117  this->maxSymmetryFold = 30;
118  this->symMissPeakThres = 0.3;
119  this->axisErrTolerance = 0.01;
120  this->axisErrToleranceDefault = true;
121  this->minSymPeak = 0.3;
122  this->recommendedSymmetryType = "";
123  this->recommendedSymmetryFold = 0;
124  this->requestedSymmetryType = "";
125  this->requestedSymmetryFold = 0;
126  this->detectedSymmetry.clear ( );
127 
128  //================================================ Settings regarding the structure overlay
129  this->overlayStructureName = "movedStructure";
130  this->rotTrsJSONFile = "movedStructureOperations.json";
131 
132  //================================================ Settings regarding verbosity of the program
133  this->verbose = 1;
134 
135  //================================================ Done
136 
137 }
138 
147 ProSHADE_settings::ProSHADE_settings ( ProSHADE_Task taskToPerform )
148 {
149  //================================================ Settings regarding the task at hand
150  this->task = taskToPerform;
151 
152  //================================================ Settings regarding input files
153  this->forceP1 = true;
154  this->removeWaters = true;
155  this->firstModelOnly = true;
156 
157  //================================================ Settings regarding the resolution of calculations
158  this->requestedResolution = -1.0;
159  this->changeMapResolution = false;
160  this->changeMapResolutionTriLinear = false;
161 
162  //================================================ Settings regarding the PDB B-factor change
163  this->pdbBFactorNewVal = -1.0;
164 
165  //================================================ Settings regarding the bandwidth of calculations
166  this->maxBandwidth = 0;
167  this->rotationUncertainty = 0;
168 
169  //================================================ Settings regarding the phase
170  this->usePhase = true;
171 
172  //================================================ Settings regarding the spheres
173  this->maxSphereDists = 0.0;
174 
175  //================================================ Settings regarding the Gauss-Legendre integration
176  this->integOrder = 0;
177  this->taylorSeriesCap = 10;
178 
179  //================================================ Settings regarding map normalisation
180  this->normaliseMap = false;
181 
182  //================================================ Settings regarding map inversion
183  this->invertMap = false;
184 
185  //================================================ Settings regarding map masking
186  this->blurFactor = 350.0;
187  this->maskingThresholdIQRs = 3.0;
188  this->maskMap = false;
189  this->useCorrelationMasking = false;
190  this->halfMapKernel = 0.0;
191  this->correlationKernel = 0.0;
192  this->saveMask = false;
193  this->maskFileName = "maskFile";
194  this->detectedSymmetry.clear ( );
195 
196  //================================================ Settings regarding re-boxing
197  this->reBoxMap = false;
198  this->boundsExtraSpace = 3.0;
199  this->boundsSimilarityThreshold = 0;
200  this->useSameBounds = false;
201  this->forceBounds = new proshade_signed [6];
202 
203  //================================================ Settings regarding extra cell space
204  this->addExtraSpace = 10.0;
205 
206  //================================================ Settings regarding shell settings
207  this->progressiveSphereMapping = false;
208 
209  //================================================ Settings regarding output file name
210  this->outName = "reBoxed";
211 
212  //================================================ Settings regarding distances computation
213  this->computeEnergyLevelsDesc = true;
214  this->computeTraceSigmaDesc = true;
215  this->computeRotationFuncDesc = true;
216  this->enLevMatrixPowerWeight = 1.0;
217 
218  //================================================ Settings regarding peak searching
219  this->peakNeighbours = 1;
220  this->noIQRsFromMedianNaivePeak = -999.9;
221 
222  //================================================ Settings regarding 1D grouping
223  this->smoothingFactor = 15.0;
224 
225  //================================================ Settings regarding the symmetry detection
227  this->useBiCubicInterpolationOnPeaks = true;
228  this->maxSymmetryFold = 30;
229  this->symMissPeakThres = 0.3;
230  this->axisErrTolerance = 0.01;
231  this->axisErrToleranceDefault = true;
232  this->minSymPeak = 0.3;
233  this->recommendedSymmetryType = "";
234  this->recommendedSymmetryFold = 0;
235  this->requestedSymmetryType = "";
236  this->requestedSymmetryFold = 0;
237 
238  //================================================ Settings regarding the structure overlay
239  this->overlayStructureName = "movedStructure";
240  this->rotTrsJSONFile = "movedStructureOperations.json";
241 
242  //================================================ Settings regarding verbosity of the program
243  this->verbose = 1;
244 
245  //================================================ Task specific settings
246  switch ( this->task )
247  {
248  case NA:
249  std::cerr << std::endl << "=====================" << std::endl << "!! ProSHADE ERROR !!" << std::endl << "=====================" << std::endl << std::flush;
250  std::cerr << "Error Code : " << "E000014" << std::endl << std::flush;
251  std::cerr << "ProSHADE version : " << __PROSHADE_VERSION__ << std::endl << std::flush;
252  std::cerr << "File : " << "ProSHADE.cpp" << std::endl << std::flush;
253  std::cerr << "Line : " << 97 << std::endl << std::flush;
254  std::cerr << "Function : " << "ProSHADE_settings (Task) constructor" << std::endl << std::flush;
255  std::cerr << "Message : " << "No task has been specified for task specific constructor." << std::endl << std::flush;
256  std::cerr << "Further information : " << "This ProSHADE_settings class constructor is intended to\n : set the internal variables to default value given a\n : particular taks. By supplying this task as NA, this beats\n : the purpose of the constructor. Please use the\n : non-argumental constructor if task is not yet known." << std::endl << std::endl << std::flush;
258  exit ( EXIT_FAILURE );
259  break;
260 
261  case Symmetry:
262  this->requestedResolution = 6.0;
263  this->pdbBFactorNewVal = 80.0;
264  this->changeMapResolution = true;
265  this->maskMap = false;
266  this->moveToCOM = true;
267  this->normaliseMap = true;
268  this->reBoxMap = false;
269  break;
270 
271  case Distances:
272  this->changeMapResolution = false;
273  this->maskMap = false;
274  this->moveToCOM = true;
275  this->reBoxMap = false;
276  break;
277 
278  case OverlayMap:
279  this->requestedResolution = 8.0;
280  this->changeMapResolution = true;
281  this->maskMap = false;
282  this->moveToCOM = false;
283  this->normaliseMap = false;
284  this->reBoxMap = false;
285  break;
286 
287  case MapManip:
288  this->changeMapResolution = false;
289  this->maskMap = true;
290  this->moveToCOM = false;
291  break;
292  }
293 
294  //================================================ Done
295 
296 }
297 
303 {
304  //================================================ Release boundaries variable
305  delete[] this->forceBounds;
306 
307  //================================================ Release symmetry axes
308  if ( this->detectedSymmetry.size() > 0 ) { for ( proshade_unsign it = 0; it < static_cast<proshade_unsign> ( this->detectedSymmetry.size() ); it++ ) { if ( this->detectedSymmetry.at(it) != NULL ) { delete[] this->detectedSymmetry.at(it); } } }
309 
310  //================================================ Done
311 
312 }
313 
317 {
318  //================================================ Determine the peak IQR from median threshold, unless given by user
319  if ( this->noIQRsFromMedianNaivePeak == -999.9 )
320  {
321  //============================================ If using the old symmetry detection algorithm or distances computation, this will be used on many small peaks with few outliers. Use value of 5.0
322  if ( this->task == Distances ) { this->noIQRsFromMedianNaivePeak = 5.0; }
323  if ( ( this->task == Symmetry ) && ( !this->usePeakSearchInRotationFunctionSpace ) ) { this->noIQRsFromMedianNaivePeak = 5.0; }
324 
325  //============================================ If using the new symmetry detection algorithm, this needs to be decreasing with resolution. How much, that is a bit arbitrary...
326  if ( ( this->task == Symmetry ) && ( this->usePeakSearchInRotationFunctionSpace ) ) { this->noIQRsFromMedianNaivePeak = std::max ( 0.0, 1.0 - ( this->requestedResolution * 0.05 ) ); }
327  }
328 
329  //================================================ Done
330  return ;
331 
332 }
333 
341 void ProSHADE_settings::addStructure ( std::string structure )
342 {
343  //================================================ Use C++ version independent vector processing
344  ProSHADE_internal_misc::addToStringVector ( &( this->inputFiles ), structure );
345 
346  //================================================ Done
347  return ;
348 
349 }
350 
357 void ProSHADE_settings::setResolution ( proshade_single resolution )
358 {
359  //================================================ Set the value
360  this->requestedResolution = resolution;
361 
362  //================================================ Done
363  return ;
364 
365 }
366 
373 void ProSHADE_settings::setPDBBFactor ( proshade_double newBF )
374 {
375  //================================================ Set the value
376  this->pdbBFactorNewVal = newBF;
377 
378  //================================================ Done
379  return ;
380 
381 }
382 
389 void ProSHADE_settings::setNormalisation ( bool normalise )
390 {
391  //================================================ Set the value
392  this->normaliseMap = normalise;
393 
394  //================================================ Done
395  return ;
396 
397 }
398 
406 {
407  //================================================ Set the value
408  this->invertMap = mInv;
409 
410  //================================================ Done
411  return ;
412 
413 }
414 
421 void ProSHADE_settings::setVerbosity ( proshade_signed verbosity )
422 {
423  //================================================ Set the value
424  this->verbose = verbosity;
425 
426  //================================================ Done
427  return ;
428 
429 }
430 
437 void ProSHADE_settings::setMaskBlurFactor ( proshade_single blurFac )
438 {
439  //================================================ Set the value
440  this->blurFactor = blurFac;
441 
442  //================================================ Done
443  return ;
444 
445 }
446 
454 void ProSHADE_settings::setMaskIQR ( proshade_single noIQRs )
455 {
456  //================================================ Set the value
457  this->maskingThresholdIQRs = noIQRs;
458 
459  //================================================ Done
460  return ;
461 
462 }
463 
471 {
472  //================================================ Set the value
473  this->maskMap = mask;
474 
475  //================================================ Done
476  return ;
477 
478 }
479 
488 {
489  //================================================ Set the value
490  this->useCorrelationMasking = corMask;
491 
492  //================================================ Done
493  return ;
494 
495 }
496 
505 void ProSHADE_settings::setTypicalNoiseSize ( proshade_single typNoi )
506 {
507  //================================================ Set the value
508  this->halfMapKernel = typNoi;
509 
510  //================================================ Done
511  return ;
512 
513 }
514 
521 void ProSHADE_settings::setMinimumMaskSize ( proshade_single minMS )
522 {
523  //================================================ Set the value
524  this->correlationKernel = minMS;
525 
526  //================================================ Done
527  return ;
528 
529 }
530 
538 {
539  //================================================ Set the value
540  this->saveMask = savMsk;
541 
542  //================================================ Done
543  return ;
544 
545 }
546 
553 void ProSHADE_settings::setMaskFilename ( std::string mskFln )
554 {
555  //================================================ Set the value
556  this->maskFileName = mskFln;
557 
558  //================================================ Done
559  return ;
560 
561 }
562 
570 {
571  //================================================ Set the value
572  this->reBoxMap = reBx;
573 
574  //================================================ Done
575  return ;
576 
577 }
578 
586 void ProSHADE_settings::setBoundsSpace ( proshade_single boundsExSp )
587 {
588  //================================================ Set the value
589  this->boundsExtraSpace = boundsExSp;
590 
591  //================================================ Done
592  return ;
593 
594 }
595 
602 void ProSHADE_settings::setBoundsThreshold ( proshade_signed boundsThres )
603 {
604  //================================================ Set the value
605  this->boundsSimilarityThreshold = boundsThres;
606 
607  //================================================ Done
608  return ;
609 
610 }
611 
620 {
621  //================================================ Set the value
622  this->useSameBounds = sameB;
623 
624  //================================================ Done
625  return ;
626 
627 }
628 
636 void ProSHADE_settings::setOutputFilename ( std::string oFileName )
637 {
638  //================================================ Set the value
639  this->outName = oFileName;
640 
641  //================================================ Done
642  return ;
643 
644 }
645 
653 {
654  //================================================ Set the value
655  this->changeMapResolution = mrChange;
656 
657  //================================================ Done
658  return ;
659 
660 }
661 
669 {
670  //================================================ Set the value
671  this->changeMapResolutionTriLinear = mrChange;
672 
673  //================================================ Done
674  return ;
675 
676 }
677 
685 {
686  //================================================ Set the value
687  this->moveToCOM = com;
688 
689  //================================================ Done
690  return ;
691 
692 }
693 
700 void ProSHADE_settings::setExtraSpace ( proshade_single exSpace )
701 {
702  //================================================ Set the value
703  this->addExtraSpace = exSpace;
704 
705  //================================================ Done
706  return ;
707 
708 }
709 
717 {
718  //================================================ Set the value
719  this->progressiveSphereMapping = progSphMap;
720 
721  //================================================ Done
722  return ;
723 
724 }
725 
732 void ProSHADE_settings::setBandwidth ( proshade_unsign band )
733 {
734  //================================================ Set the value
735  this->maxBandwidth = band;
736 
737  //================================================ Done
738  return ;
739 
740 }
741 
748 void ProSHADE_settings::setSphereDistances ( proshade_single sphDist )
749 {
750  //================================================ Set the value
751  this->maxSphereDists = sphDist;
752 
753  //================================================ Done
754  return ;
755 
756 }
757 
764 void ProSHADE_settings::setIntegrationOrder ( proshade_unsign intOrd )
765 {
766  //================================================ Set the value
767  this->integOrder = intOrd;
768 
769  //================================================ Done
770  return ;
771 
772 }
773 
781 void ProSHADE_settings::setTaylorSeriesCap ( proshade_unsign tayCap )
782 {
783  //================================================ Set the value
784  this->taylorSeriesCap = tayCap;
785 
786  //================================================ Done
787  return ;
788 
789 }
790 
799 {
800  //======================================== Set the value
801  this->computeEnergyLevelsDesc = enLevDesc;
802 
803  //======================================== Done
804  return ;
805 
806 }
807 
816 {
817  //================================================ Set the value
818  this->computeTraceSigmaDesc = trSigVal;
819 
820  //================================================ Done
821  return ;
822 
823 }
824 
833 {
834  //================================================ Set the value
835  this->computeRotationFuncDesc = rotfVal;
836 
837  //================================================ Done
838  return ;
839 
840 }
841 
849 void ProSHADE_settings::setPeakNeighboursNumber ( proshade_unsign pkS )
850 {
851  //================================================ Set the value
852  this->peakNeighbours = pkS;
853 
854  //================================================ Done
855  return ;
856 
857 }
858 
867 void ProSHADE_settings::setPeakNaiveNoIQR ( proshade_double noIQRs )
868 {
869  //================================================ Set the value
870  this->noIQRsFromMedianNaivePeak = noIQRs;
871 
872  //================================================ Done
873  return ;
874 
875 }
876 
885 void ProSHADE_settings::setPhaseUsage ( bool phaseUsage )
886 {
887  //================================================ Set the value
888  this->usePhase = phaseUsage;
889 
890  //================================================ Done
891  return ;
892 
893 }
894 
903 void ProSHADE_settings::setEnLevShellWeight ( proshade_double mPower )
904 {
905  //================================================ Set the value
906  this->enLevMatrixPowerWeight = mPower;
907 
908  //================================================ Done
909  return ;
910 
911 }
912 
921 void ProSHADE_settings::setGroupingSmoothingFactor ( proshade_double smFact )
922 {
923  //================================================ Set the value
924  this->smoothingFactor = smFact;
925 
926  //================================================ Done
927  return ;
928 
929 }
930 
938 void ProSHADE_settings::setMissingPeakThreshold ( proshade_double mpThres )
939 {
940  //================================================ Set the value
941  this->symMissPeakThres = mpThres;
942 
943  //================================================ Done
944  return ;
945 
946 }
947 
955 void ProSHADE_settings::setAxisComparisonThreshold ( proshade_double axThres )
956 {
957  //================================================ Set the value
958  this->axisErrTolerance = axThres;
959 
960  //================================================ Done
961  return ;
962 
963 }
964 
975 {
976  //================================================ Set the value
977  this->axisErrToleranceDefault = behav;
978 
979  //================================================ Done
980  return ;
981 
982 }
983 
991 void ProSHADE_settings::setMinimumPeakForAxis ( proshade_double minSP )
992 {
993  //================================================ Set the value
994  this->minSymPeak = minSP;
995 
996  //================================================ Done
997  return ;
998 
999 }
1000 
1010 {
1011  //================================================ Set the value
1012  this->recommendedSymmetryType = val;
1013 
1014  //================================================ Done
1015  return ;
1016 
1017 }
1018 
1028 void ProSHADE_settings::setRecommendedFold ( proshade_unsign val )
1029 {
1030  //================================================ Set the value
1031  this->recommendedSymmetryFold = val;
1032 
1033  //================================================ Done
1034  return ;
1035 
1036 }
1037 
1045 {
1046  //================================================ Set the value
1047  this->requestedSymmetryType = val;
1048 
1049  //================================================ Done
1050  return ;
1051 
1052 }
1053 
1060 void ProSHADE_settings::setRequestedFold ( proshade_unsign val )
1061 {
1062  //================================================ Set the value
1063  this->requestedSymmetryFold = val;
1064 
1065  //================================================ Done
1066  return ;
1067 
1068 }
1069 
1077 void ProSHADE_settings::setDetectedSymmetry ( proshade_double* sym )
1078 {
1079  //================================================ Allocate memory
1080  proshade_double* hlpAxis = new proshade_double [6];
1081  ProSHADE_internal_misc::checkMemoryAllocation ( hlpAxis, __FILE__, __LINE__, __func__ );
1082 
1083  //================================================ Copy (deep) data
1084  hlpAxis[0] = sym[0];
1085  hlpAxis[1] = sym[1];
1086  hlpAxis[2] = sym[2];
1087  hlpAxis[3] = sym[3];
1088  hlpAxis[4] = sym[4];
1089  hlpAxis[5] = sym[5];
1090 
1091  //================================================ Save
1093 
1094  //================================================ Release memory
1095  delete[] hlpAxis;
1096 
1097  //================================================ Done
1098  return ;
1099 
1100 }
1101 
1106 void ProSHADE_settings::setOverlaySaveFile ( std::string filename )
1107 {
1108  //================================================ Set the value
1109  this->overlayStructureName = filename;
1110 
1111  //================================================ Done
1112  return ;
1113 
1114 }
1115 
1120 void ProSHADE_settings::setOverlayJsonFile ( std::string filename )
1121 {
1122  //================================================ Set the value
1123  this->rotTrsJSONFile = filename;
1124 
1125  //================================================ Done
1126  return ;
1127 
1128 }
1129 
1135 {
1136  //================================================ Set the value
1137  this->usePeakSearchInRotationFunctionSpace = rotFunPeaks;
1138 
1139  //================================================ Done
1140  return ;
1141 
1142 }
1143 
1149 {
1150  //================================================ Set the value
1151  this->useBiCubicInterpolationOnPeaks = bicubPeaks;
1152 
1153  //================================================ Done
1154  return ;
1155 
1156 }
1157 
1162 void ProSHADE_settings::setMaxSymmetryFold ( proshade_unsign maxFold )
1163 {
1164  //================================================ Set the value
1165  this->maxSymmetryFold = maxFold;
1166 
1167  //================================================ Done
1168  return ;
1169 
1170 }
1171 
1180 void ProSHADE_settings::determineBandwidth ( proshade_unsign circumference )
1181 {
1182  //================================================ Check the current settings value is set to auto
1183  if ( this->maxBandwidth != 0 )
1184  {
1185  std::stringstream hlpSS;
1186  hlpSS << "The bandwidth was determined as: " << this->maxBandwidth;
1188  return ;
1189  }
1190 
1191  //================================================ Determine automatically
1193 
1194  //================================================ Report progress
1195  std::stringstream hlpSS;
1196  hlpSS << "The bandwidth was determined as: " << this->maxBandwidth;
1198 
1199  //================================================ Done
1200  return ;
1201 
1202 }
1203 
1212 void ProSHADE_settings::determineBandwidthFromAngle ( proshade_double uncertainty )
1213 {
1214  //================================================ Determine bandwidth
1215  if ( static_cast<proshade_unsign> ( std::ceil ( ( 360.0 / uncertainty ) / 2 ) ) % 2 == 0 )
1216  {
1217  this->maxBandwidth = static_cast<proshade_unsign> ( std::ceil ( ( 360.0 / uncertainty ) / 2.0 ) );
1218  }
1219  else
1220  {
1221  this->maxBandwidth = static_cast<proshade_unsign> ( std::ceil ( ( 360.0 / uncertainty ) / 2.0 ) ) + 1;
1222  }
1223 
1224  //================================================ Report progress
1225  std::stringstream hlpSS;
1226  hlpSS << "The bandwidth was determined from uncertainty " << uncertainty << " degrees as: " << this->maxBandwidth;
1228 
1229  //================================================ Done
1230  return ;
1231 
1232 }
1233 
1243 void ProSHADE_settings::determineSphereDistances ( proshade_single maxMapRange )
1244 {
1245  //================================================ Check the current settings value is set to auto
1246  if ( this->maxSphereDists != 0.0 )
1247  {
1248  std::stringstream hlpSS;
1249  hlpSS << "The sphere distances were determined as " << this->maxSphereDists << " Angstroms.";
1251  return ;
1252  }
1253 
1254  //================================================ Determine automatically
1256 
1257  //================================================ Report progress
1258  std::stringstream hlpSS;
1259  hlpSS << "The sphere distances were determined as " << this->maxSphereDists << " Angstroms.";
1261 
1262  //================================================ Done
1263  return ;
1264 
1265 }
1266 
1275 void ProSHADE_settings::determineIntegrationOrder ( proshade_single maxMapRange )
1276 {
1277  //================================================ Check the current settings value is set to auto
1278  if ( this->integOrder != 0 )
1279  {
1280  std::stringstream hlpSS;
1281  hlpSS << "The integration order was determined as " << this->integOrder;
1283  return ;
1284  }
1285 
1286  //================================================ Determine automatically
1288 
1289  //================================================ Report progress
1290  std::stringstream hlpSS;
1291  hlpSS << "The integration order was determined as " << this->integOrder;
1293 
1294  //================================================ Done
1295  return ;
1296 
1297 }
1298 
1320 void ProSHADE_settings::determineAllSHValues ( proshade_unsign xDim, proshade_unsign yDim, proshade_unsign zDim, proshade_double xDimAngs, proshade_double yDimAngs, proshade_double zDimAngs )
1321 {
1322  //================================================ Print progress message
1323  ProSHADE_internal_messages::printProgressMessage ( this->verbose, 1, "Preparing spherical harmonics environment." );
1324 
1325  //================================================ Modify dims by resolution
1326  proshade_unsign theoXDim = std::ceil ( xDimAngs / ( this->requestedResolution / 2.0 ) );
1327  proshade_unsign theoYDim = std::ceil ( yDimAngs / ( this->requestedResolution / 2.0 ) );
1328  proshade_unsign theoZDim = std::ceil ( zDimAngs / ( this->requestedResolution / 2.0 ) );
1329 
1330  //================================================ Find maximum circumference
1331  proshade_unsign maxDim = std::max ( theoXDim, std::max ( theoYDim, theoZDim ) );
1332  proshade_unsign minDim = std::min ( theoXDim, std::min ( theoYDim, theoZDim ) );
1333  proshade_unsign midDim = 0;
1334  if ( ( xDim < maxDim ) && ( xDim > minDim ) ) { midDim = theoXDim; }
1335  else if ( ( yDim < maxDim ) && ( yDim > minDim ) ) { midDim = theoYDim; }
1336  else { midDim = theoZDim; }
1337 
1338  proshade_unsign circ = ( maxDim ) + ( midDim );
1339 
1340  //================================================ Bandwidth
1341  if ( this->rotationUncertainty > 0.0 ) { this->determineBandwidthFromAngle ( this->rotationUncertainty ); }
1342  else { this->determineBandwidth ( circ ); }
1343 
1344  //================================================ Find maximum diagonal in Angstroms
1345  proshade_single maxDiag = std::sqrt ( std::pow ( static_cast<proshade_single> ( maxDim ) * ( this->requestedResolution / 2.0 ), 2.0 ) +
1346  std::pow ( static_cast<proshade_single> ( midDim ) * ( this->requestedResolution / 2.0 ), 2.0 ) );
1347 
1348  //================================================ Sphere distances
1349  this->determineSphereDistances ( maxDiag );
1350 
1351  //================================================ Integration order
1352  this->determineIntegrationOrder ( maxDiag );
1353 
1354  //================================================ Report function completion
1355  ProSHADE_internal_messages::printProgressMessage ( this->verbose, 2, "Spherical harmonics environment prepared." );
1356 
1357  //================================================ Done
1358  return ;
1359 
1360 }
1361 
1370 {
1371  //================================================ Wellcome message if required
1373 
1374  //================================================ Save the general information
1375  this->noStructures = static_cast<proshade_unsign> ( settings->inputFiles.size() );
1376  this->verbose = static_cast<proshade_signed> ( settings->verbose );
1377 
1378  //================================================ Try to run ProSHADE
1379  try
1380  {
1381  //============================================ Depending on task, switch to correct function to call
1382  switch ( settings->task )
1383  {
1384  case NA:
1385  throw ProSHADE_exception ( "No task has been specified.", "E000001", __FILE__, __LINE__, __func__, "ProSHADE requires to be told which particular functiona-\n : lity (task) is requested from it. In order to do so, the\n : command line arguments specifying task need to be used\n : (if used from command line), or the ProSHADE_settings\n : object needs to have the member variable \'Task\' set to\n : one of the following values: Distances, Symmetry,\n : OverlayMap or MapManip." );
1386  break;
1387 
1388  case Symmetry:
1389  ProSHADE_internal_tasks::SymmetryDetectionTask ( settings, &this->RecomSymAxes, &this->allCSymAxes );
1390  this->setSymmetryResults ( settings );
1391  break;
1392 
1393  case Distances:
1394  ProSHADE_internal_tasks::DistancesComputationTask ( settings, &this->enLevs, &this->trSigm, &this->rotFun );
1395  break;
1396 
1397  case OverlayMap:
1398  ProSHADE_internal_tasks::MapOverlayTask ( settings, &this->coordRotationCentre, &this->eulerAngles, &this->overlayTranslation );
1399  break;
1400 
1401  case MapManip:
1402  ProSHADE_internal_tasks::MapManipulationTask ( settings, &this->originalBounds, &this->reboxedBounds, &this->manipulatedMaps );
1403  break;
1404  }
1405  }
1406 
1407  //================================================ If this is ProSHADE exception, give all available info and terminate gracefully :-)
1408  catch ( ProSHADE_exception& err )
1409  {
1410  std::cerr << std::endl << "=====================" << std::endl << "!! ProSHADE ERROR !!" << std::endl << "=====================" << std::endl << std::flush;
1411  std::cerr << "Error Code : " << err.get_errc() << std::endl << std::flush;
1412  std::cerr << "ProSHADE version : " << __PROSHADE_VERSION__ << std::endl << std::flush;
1413  std::cerr << "File : " << err.get_file() << std::endl << std::flush;
1414  std::cerr << "Line : " << err.get_line() << std::endl << std::flush;
1415  std::cerr << "Function : " << err.get_func() << std::endl << std::flush;
1416  std::cerr << "Message : " << err.what() << std::endl << std::flush;
1417  std::cerr << "Further information : " << err.get_info() << std::endl << std::endl << std::flush;
1418 
1419  //============================================ Done
1421  exit ( EXIT_FAILURE );
1422  }
1423 
1424  //================================================ Well, give all there is and just end
1425  catch ( ... )
1426  {
1427  std::cerr << std::endl << "=====================" << std::endl << "!! ProSHADE ERROR !!" << std::endl << "=====================" << std::endl << std::flush;
1428 
1429  //============================================ Try to find out more
1430 #if __cplusplus >= 201103L
1431  std::exception_ptr exc = std::current_exception();
1432  try
1433  {
1434  if (exc)
1435  {
1436  std::rethrow_exception ( exc );
1437  }
1438  }
1439  catch ( const std::exception& e )
1440  {
1441  std::cerr << "Caught unknown exception with following information: " << e.what() << std::endl << std::flush;
1442  }
1443 #else
1444  std::cerr << "Unknown error with no further explanation available. Please contact the author for help." << std::endl << std::flush;
1445 #endif
1446  std::cerr << "Terminating..." << std::endl << std::endl << std::flush;
1447 
1448  //============================================ Done
1450  exit ( EXIT_FAILURE );
1451  }
1452 
1453  //================================================ Terminating message
1455 
1456  //================================================ Done
1457 
1458 }
1459 
1465 {
1466  //================================================ Release reboxing pointers
1467  if ( this->originalBounds.size() > 0 ) { for ( proshade_unsign iter = 0; iter < static_cast<proshade_unsign> ( this->originalBounds.size() ); iter++ ) { delete[] this->originalBounds.at(iter); } }
1468  if ( this->reboxedBounds.size() > 0 ) { for ( proshade_unsign iter = 0; iter < static_cast<proshade_unsign> ( this->reboxedBounds.size() ); iter++ ) { delete[] this->reboxedBounds.at(iter); } }
1469  if ( this->manipulatedMaps.size() > 0 ) { for ( proshade_unsign iter = 0; iter < static_cast<proshade_unsign> ( this->manipulatedMaps.size() ); iter++ ) { delete[] this->manipulatedMaps.at(iter); } }
1470 
1471  //================================================ Clear vectors
1472  this->enLevs.clear ( );
1473  this->trSigm.clear ( );
1474  this->rotFun.clear ( );
1475 
1476  //================================================ Delete symmetry axes memory
1477  if ( this->RecomSymAxes.size() > 0 )
1478  {
1479  for ( proshade_unsign iter = 0; iter < static_cast<proshade_unsign> ( this->RecomSymAxes.size() ); iter++ )
1480  {
1481  delete[] this->RecomSymAxes.at(iter);
1482  }
1483  this->RecomSymAxes.clear ( );
1484  }
1485 
1486  //================================================ Done
1487 
1488 }
1489 
1495 {
1496  //================================================ Return the value
1497  return ( this->symRecommType );
1498 }
1499 
1505 {
1506  //================================================ Return the value
1507  return ( this->symRecommFold );
1508 }
1509 
1516 void ProSHADE_run::setRecommendedSymmetry ( std::string val )
1517 {
1518  //================================================ Set the value
1519  this->symRecommType = val;
1520 
1521  //================================================ Done
1522  return ;
1523 
1524 }
1525 
1533 void ProSHADE_run::setRecommendedFold ( proshade_unsign val )
1534 {
1535  //================================================ Set the value
1536  this->symRecommFold = val;
1537 
1538  //================================================ Done
1539  return ;
1540 
1541 }
1542 
1550 void ProSHADE_run::setRecommendedAxis ( proshade_double* sym )
1551 {
1552  //================================================ Set the value
1553  ProSHADE_internal_misc::deepCopyAxisToDblPtrVector ( &this->RecomSymAxes, sym );
1554 
1555  //================================================ Done
1556  return ;
1557 
1558 }
1559 
1567 void ProSHADE_run::setSymmetryResults ( ProSHADE_settings* settings )
1568 {
1569  //================================================ Save type and fold
1570  this->setRecommendedSymmetry ( settings->recommendedSymmetryType );
1571  this->setRecommendedFold ( settings->recommendedSymmetryFold );
1572 
1573  //================================================ Done
1574  return ;
1575 
1576 }
1577 
1583 void ProSHADE_settings::getCommandLineParams ( int argc, char** argv )
1584 {
1585  //================================================ If no command line arguments, print help
1586  if ( argc == 1 ) { ProSHADE_internal_messages::printHelp ( ); }
1587 
1588  //================================================ Long options struct
1589  const struct option_port longopts[] =
1590  {
1591  { "version", no_argument, NULL, 'v' },
1592  { "help", no_argument, NULL, 'h' },
1593  { "verbose", required_argument, NULL, '!' },
1594  { "distances", no_argument, NULL, 'D' },
1595  { "mapManip", no_argument, NULL, 'M' },
1596  { "symmetry", no_argument, NULL, 'S' },
1597  { "overlay", no_argument, NULL, 'O' },
1598  { "file", required_argument, NULL, 'f' },
1599  { "forceSpgP1", no_argument, NULL, 'u' },
1600  { "removeWaters", no_argument, NULL, 'w' },
1601  { "firstModel", no_argument, NULL, 'x' },
1602  { "resolution", required_argument, NULL, 'r' },
1603  { "bandwidth", required_argument, NULL, 'b' },
1604  { "sphereDists", required_argument, NULL, 's' },
1605  { "extraSpace", required_argument, NULL, 'e' },
1606  { "integOrder", required_argument, NULL, 'i' },
1607  { "taylorCap", required_argument, NULL, 't' },
1608  { "invertMap", no_argument, NULL, '@' },
1609  { "normalise", no_argument, NULL, '#' },
1610  { "mask", no_argument, NULL, '$' },
1611  { "saveMask", no_argument, NULL, '%' },
1612  { "maskFile", required_argument, NULL, '^' },
1613  { "maskBlurring", required_argument, NULL, '&' },
1614  { "maskThreshold", required_argument, NULL, '*' },
1615  { "mapReboxing", no_argument, NULL, 'R' },
1616  { "boundsSpace", required_argument, NULL, '(' },
1617  { "boundsThreshold", required_argument, NULL, ')' },
1618  { "sameBoundaries", no_argument, NULL, '-' },
1619  { "reBoxedFilename", required_argument, NULL, 'g' },
1620  { "pdbTempFact", required_argument, NULL, 'd' },
1621  { "center", no_argument, NULL, 'c' },
1622  { "changeMapResol", no_argument, NULL, 'j' },
1623  { "changeMapTriLin", no_argument, NULL, 'a' },
1624  { "noPhase", no_argument, NULL, 'p' },
1625  { "progressive", no_argument, NULL, 'k' },
1626  { "noEnL", no_argument, NULL, 'l' },
1627  { "noTrS", no_argument, NULL, 'm' },
1628  { "noFRF", no_argument, NULL, 'n' },
1629  { "EnLWeight", required_argument, NULL, '_' },
1630  { "peakNeigh", required_argument, NULL, '=' },
1631  { "peakThres", required_argument, NULL, '+' },
1632  { "missAxThres", required_argument, NULL, '[' },
1633  { "sameAxComp", required_argument, NULL, ']' },
1634  { "axisComBeh", no_argument, NULL, 'q' },
1635  { "bicubSearch", no_argument, NULL, 'A' },
1636  { "maxSymPrime", required_argument, NULL, 'B' },
1637  { "minPeakHeight", required_argument, NULL, 'o' },
1638  { "reqSym", required_argument, NULL, '{' },
1639  { "overlayFile", required_argument, NULL, '}' },
1640  { "overlayJSONFile", required_argument, NULL, 'y' },
1641  { "angUncertain", required_argument, NULL, ';' },
1642  { "usePeaksInRotFun",no_argument, NULL, 'z' },
1643  { NULL, 0, NULL, 0 }
1644  };
1645 
1646  //================================================ Short options string
1647  const char* const shortopts = "AaB:b:cd:De:f:g:hi:jklmMno:Opqr:Rs:St:uvwxy:z!:@#$%^:&:*:(:):-_:=:+:[:]:{:}:;:";
1648 
1649  //================================================ Parsing the options
1650  while ( true )
1651  {
1652  //============================================ Read the next option
1653  int opt = getopt_long_port ( argc, argv, shortopts, longopts, NULL );
1654 
1655  //============================================ Done parsing
1656  if ( opt == -1 )
1657  {
1658  break;
1659  }
1660 
1661  //============================================ For each option, set the internal values appropriately
1662  switch ( opt )
1663  {
1664  //======================================= Print version info
1665  case 'v':
1666  {
1668  exit ( EXIT_SUCCESS );
1669  }
1670 
1671  //======================================= User needs help
1672  case 'h':
1673  {
1675  exit ( EXIT_SUCCESS );
1676  }
1677 
1678  //======================================= Save the argument as the verbosity value, or if no value given, just set to 3
1679  case '!':
1680  {
1681  this->setVerbosity ( static_cast<proshade_single> ( atoi ( optarg ) ) );
1682  continue;
1683  }
1684 
1685  //======================================= Set task to distances
1686  case 'D':
1687  {
1688  this->task = Distances;
1689  continue;
1690  }
1691 
1692  //======================================= Set task to map manipulation
1693  case 'M':
1694  {
1695  this->task = MapManip;
1696  continue;
1697  }
1698 
1699  //======================================= Set task to symmetry detection
1700  case 'S':
1701  {
1702  this->task = Symmetry;
1703 
1704  //=================================== Force default unless changed already by the user
1705  if ( this->requestedResolution == -1 ) { this->requestedResolution = 6.0; }
1706  if ( this->pdbBFactorNewVal == -1 ) { this->pdbBFactorNewVal = 80.0; }
1707  this->changeMapResolution = !this->changeMapResolution; // Switch value. This can be over-ridden by the user by using -j
1708  this->moveToCOM = !this->moveToCOM; // Switch value. This can be over-ridden by the user by using -c.
1709 
1710  continue;
1711  }
1712 
1713  //======================================= Set task to map overlay
1714  case 'O':
1715  {
1716  this->task = OverlayMap;
1717  continue;
1718  }
1719 
1720  //======================================= Save the argument as a file to read in
1721  case 'f':
1722  {
1723  this->addStructure ( std::string ( optarg ) );
1724  continue;
1725  }
1726 
1727  //======================================= Force the input PDB files to have P1 spacegroup
1728  case 'u':
1729  {
1730  this->forceP1 = !this->forceP1;
1731  continue;
1732  }
1733 
1734  //======================================= Remove waters from PDB input files?
1735  case 'w':
1736  {
1737  this->removeWaters = !this->removeWaters;
1738  continue;
1739  }
1740 
1741  //======================================= Use all models, or just the first one?
1742  case 'x':
1743  {
1744  this->firstModelOnly = !this->firstModelOnly;
1745  continue;
1746  }
1747 
1748  //======================================= Save the argument as the resolution value
1749  case 'r':
1750  {
1751  this->setResolution ( static_cast<proshade_single> ( atof ( optarg ) ) );
1752  continue;
1753  }
1754 
1755  //======================================= Save the argument as the bandwidth value
1756  case 'b':
1757  {
1758  this->setBandwidth ( static_cast<proshade_unsign> ( atoi ( optarg ) ) );
1759  continue;
1760  }
1761 
1762  //======================================= Save the argument as the extra space value
1763  case 'e':
1764  {
1765  this->setExtraSpace ( static_cast<proshade_single> ( atof ( optarg ) ) );
1766  continue;
1767  }
1768 
1769  //======================================= Save the argument as the intaggration order value
1770  case 'i':
1771  {
1772  this->setIntegrationOrder ( static_cast<proshade_unsign> ( atof ( optarg ) ) );
1773  continue;
1774  }
1775 
1776  //======================================= Save the argument as the sphere distance value
1777  case 's':
1778  {
1779  this->setSphereDistances ( static_cast<proshade_single> ( atof ( optarg ) ) );
1780  continue;
1781  }
1782 
1783  //======================================= Save the argument as the taylor series cap value
1784  case 't':
1785  {
1786  this->setTaylorSeriesCap ( static_cast<proshade_unsign> ( atof ( optarg ) ) );
1787  continue;
1788  }
1789 
1790  //======================================= Set map inversion to true
1791  case '@':
1792  {
1793  this->setMapInversion ( true );
1794  continue;
1795  }
1796 
1797  //======================================= Set map normalisation to true
1798  case '#':
1799  {
1800  this->setNormalisation ( true );
1801  continue;
1802  }
1803 
1804  //======================================= Set map masking to true
1805  case '$':
1806  {
1807  this->setMasking ( true );
1808  continue;
1809  }
1810 
1811  //======================================= Set map masking to true and mask map saving to true as well
1812  case '%':
1813  {
1814  this->setMasking ( true );
1815  this->setMaskSaving ( true );
1816  continue;
1817  }
1818 
1819  //======================================= Save the argument as the mask filename value
1820  case '^':
1821  {
1822  this->setMaskFilename ( static_cast<std::string> ( optarg ) );
1823  continue;
1824  }
1825 
1826  //======================================= Save the argument as the mask blurring factor value
1827  case '&':
1828  {
1829  this->setMaskBlurFactor ( static_cast<proshade_single> ( atof ( optarg ) ) );
1830  continue;
1831  }
1832 
1833  //======================================= Save the argument as the mask threshold (IQR) value
1834  case '*':
1835  {
1836  this->setMaskIQR ( static_cast<proshade_single> ( atof ( optarg ) ) );
1837  continue;
1838  }
1839 
1840  //======================================= Set map reboxing to true
1841  case 'R':
1842  {
1843  this->setMasking ( true );
1844  this->setMapReboxing ( true );
1845  continue;
1846  }
1847 
1848  //======================================= Save the argument as the bounds extra space value
1849  case '(':
1850  {
1851  this->setBoundsSpace ( static_cast<proshade_single> ( atof ( optarg ) ) );
1852  continue;
1853  }
1854 
1855  //======================================= Save the argument as the bounds similarity threshold value
1856  case ')':
1857  {
1858  this->setBoundsThreshold ( static_cast<proshade_signed> ( atoi ( optarg ) ) );
1859  continue;
1860  }
1861 
1862  //======================================= Set same boundaries to true
1863  case '-':
1864  {
1865  this->setSameBoundaries ( true );
1866  continue;
1867  }
1868 
1869  //======================================= Save the argument as the re-boxed structure filename value
1870  case 'g':
1871  {
1872  this->setOutputFilename ( static_cast<std::string> ( optarg ) );
1873  continue;
1874  }
1875 
1876  //======================================= Save the argument as the PDB B-factor new constant value
1877  case 'd':
1878  {
1879  this->setPDBBFactor ( static_cast<proshade_single> ( atof ( optarg ) ) );
1880  continue;
1881  }
1882 
1883  //======================================= Set map centering to true
1884  case 'c':
1885  {
1886  this->moveToCOM = !this->moveToCOM;
1887  continue;
1888  }
1889 
1890  //======================================= Set map resolution change using Fourier transforms to true
1891  case 'j':
1892  {
1894  continue;
1895  }
1896 
1897  //======================================= Set map resolution change using real-space tri-linear interpolation to true
1898  case 'a':
1899  {
1900  this->setMapResolutionChangeTriLinear ( true );
1901  continue;
1902  }
1903 
1904  //======================================= Set map phase removal to true
1905  case 'p':
1906  {
1907  this->setPhaseUsage ( false );
1908  continue;
1909  }
1910 
1911  //======================================= Set progressive shell mapping to true
1912  case 'k':
1913  {
1914  this->setProgressiveSphereMapping ( true );
1915  continue;
1916  }
1917 
1918  //======================================= Set energy level descriptor computation to false
1919  case 'l':
1920  {
1921  this->setEnergyLevelsComputation ( false );
1922  continue;
1923  }
1924 
1925  //======================================= Set trace sigma descriptor computation to false
1926  case 'm':
1927  {
1928  this->setTraceSigmaComputation ( false );
1929  continue;
1930  }
1931 
1932  //======================================= Set full rotation function descriptor computation to false
1933  case 'n':
1934  {
1935  this->setRotationFunctionComputation ( false );
1936  continue;
1937  }
1938 
1939  //======================================= Save the argument as the energy levels descriptor weight value
1940  case '_':
1941  {
1942  this->setEnLevShellWeight ( static_cast<proshade_double> ( atof ( optarg ) ) );
1943  continue;
1944  }
1945 
1946  //======================================= Save the argument as the peak neighbours minimum value
1947  case '=':
1948  {
1949  this->setPeakNeighboursNumber ( static_cast<proshade_unsign> ( atoi ( optarg ) ) );
1950  continue;
1951  }
1952 
1953  //======================================= Save the argument as the peak IQR from median naive small peaks removal value
1954  case '+':
1955  {
1956  this->setPeakNaiveNoIQR ( static_cast<proshade_double> ( atof ( optarg ) ) );
1957  continue;
1958  }
1959 
1960  //======================================= Save the argument as the missing axis threshold value
1961  case '[':
1962  {
1963  this->setMissingPeakThreshold ( static_cast<proshade_double> ( atof ( optarg ) ) );
1964  continue;
1965  }
1966 
1967  //======================================= Save the argument as the missing axis threshold value
1968  case ']':
1969  {
1970  setAxisComparisonThreshold ( static_cast<proshade_double> ( atof ( optarg ) ) );
1971  continue;
1972  }
1973 
1974  //======================================= Save the argument as the missing axis threshold value
1975  case 'q':
1976  {
1977  setAxisComparisonThresholdBehaviour ( !this->axisErrToleranceDefault );
1978  continue;
1979  }
1980 
1981  //======================================= Save the argument as the bicubic interpolation search requirement value
1982  case 'A':
1983  {
1985  continue;
1986  }
1987 
1988  //======================================= Save the argument as the bicubic interpolation search requirement value
1989  case 'B':
1990  {
1991  setMaxSymmetryFold ( static_cast<proshade_unsign> ( atoi ( optarg ) ) );
1992  continue;
1993  }
1994 
1995  //======================================= Minimum peak height for axis
1996  case 'o':
1997  {
1998  this->minSymPeak = static_cast<proshade_double> ( atof ( optarg ) );
1999  continue;
2000  }
2001 
2002  //======================================= Save the argument as the requested symmetry and potentially fold value
2003  case '{':
2004  {
2005  std::string input = static_cast<std::string> ( optarg );
2006 
2007  if ( input.at(0) == 'C' )
2008  {
2009  this->setRequestedSymmetry ( "C" );
2010 
2011  std::string numHlp ( input.begin()+1, input.end() );
2012  if ( numHlp.length() > 0 ) { this->setRequestedFold ( atoi ( numHlp.c_str() ) ); }
2013  else { std::cerr << "!!! ProSHADE ERROR !!! The input argument requests search for Cyclic/Dihedral symmetry, but does not specify the requested fold." << std::endl; exit ( EXIT_FAILURE ); }
2014  }
2015  else
2016  {
2017  if ( input.at(0) == 'D' )
2018  {
2019  this->setRequestedSymmetry ( "D" );
2020 
2021  std::string numHlp ( input.begin()+1, input.end() );
2022  if ( numHlp.length() > 0 ) { this->setRequestedFold ( atoi ( numHlp.c_str() ) ); }
2023  else { std::cerr << "!!! ProSHADE ERROR !!! The input argument requests search for Cyclic/Dihedral symmetry, but does not specify the requested fold." << std::endl; exit ( EXIT_FAILURE ); }
2024  }
2025  else
2026  {
2027  if ( input.at(0) == 'T' )
2028  {
2029  this->setRequestedSymmetry ( "T" );
2030  }
2031  else
2032  {
2033  if ( input.at(0) == 'O' )
2034  {
2035  this->setRequestedSymmetry ( "O" );
2036  }
2037  else
2038  {
2039  if ( input.at(0) == 'I' )
2040  {
2041  this->setRequestedSymmetry ( "I" );
2042  }
2043  else
2044  {
2045  std::cerr << "!!! ProSHADE ERROR !!! Failed to parse the requested symmetry type. Allowed types are C, D, T, O and I, with C and D requiring to be followed by a number specifying the fold." << std::endl; exit ( EXIT_FAILURE );
2046  }
2047  }
2048  }
2049  }
2050  }
2051 
2052  continue;
2053  }
2054 
2055  //======================================= Save the argument as filename to save the overlay moved structure to value
2056  case '}':
2057  {
2058  this->setOverlaySaveFile ( static_cast<std::string> ( optarg ) );
2059  continue;
2060  }
2061 
2062  //======================================= Save the argument as filename to save the overlay operations to value
2063  case 'y':
2064  {
2065  this->setOverlayJsonFile ( static_cast<std::string> ( optarg ) );
2066  continue;
2067  }
2068 
2069  //======================================= Save the argument as angular uncertainty for bandwidth determination
2070  case ';':
2071  {
2072  this->rotationUncertainty = static_cast<proshade_double> ( atof ( optarg ) );
2073  continue;
2074  }
2075 
2076  //======================================= Save the argument as angular uncertainty for bandwidth determination
2077  case 'z':
2078  {
2079  this->setSymmetryRotFunPeaks ( false );
2080  continue;
2081  }
2082 
2083  //======================================= Unknown option
2084  case '?':
2085  {
2086  //=================================== Save the argument as angular uncertainty for bandwidth determination
2087  if ( optopt )
2088  {
2089  std::cout << "!!! ProSHADE ERROR !!! Unrecognised short option -" << static_cast<char> ( optopt ) << " . Please use -h for help on the command line options." << std::endl;
2090  }
2091  else
2092  {
2093  std::cout << "!!! ProSHADE ERROR !!! Unrecognised long option " << argv[static_cast<int> (optind)-1] << " . Please use -h for help on the command line options." << std::endl;
2094  }
2095 
2096  //=================================== This case is handled by getopt_long, nothing more needed.
2097  exit ( EXIT_SUCCESS );
2098  }
2099 
2100  //======================================= Fallback option
2101  default:
2102  {
2104  exit ( EXIT_SUCCESS );
2105  }
2106  }
2107  }
2108 
2109  //================================================ Done
2110  return ;
2111 
2112 }
2113 
2119 {
2120  //================================================ Print the currest values in the settings object
2121  std::stringstream strstr;
2122  strstr.str(std::string());
2123  if ( this->task == NA ) { strstr << "NA"; }
2124  if ( this->task == Distances ) { strstr << "DISTANCES COMPUTATION"; }
2125  if ( this->task == MapManip ) { strstr << "MAP MANIPULATION"; }
2126  if ( this->task == Symmetry ) { strstr << "SYMMETRY DETECTION"; }
2127  if ( this->task == OverlayMap ) { strstr << "MAP OVERLAY"; }
2128  printf ( "Task to perform : %37s\n", strstr.str().c_str() );
2129 
2130  for ( proshade_unsign iter = 0; iter < static_cast<proshade_unsign> ( this->inputFiles.size() ); iter++ )
2131  {
2132  strstr.str(std::string());
2133  strstr << this->inputFiles.at(iter);
2134  printf ( "File(s) to process : %37s\n", strstr.str().c_str() );
2135  }
2136 
2137  strstr.str(std::string());
2138  strstr << this->verbose;
2139  printf ( "Verbosity : %37s\n", strstr.str().c_str() );
2140 
2141  strstr.str(std::string());
2142  strstr << this->requestedResolution;
2143  printf ( "Resolution (comp) : %37s\n", strstr.str().c_str() );
2144 
2145  strstr.str(std::string());
2146  strstr << this->maxBandwidth;
2147  printf ( "Bandwidth : %37s\n", strstr.str().c_str() );
2148 
2149  strstr.str(std::string());
2150  strstr << this->maxSphereDists;
2151  printf ( "Sphere distances : %37s\n", strstr.str().c_str() );
2152 
2153  strstr.str(std::string());
2154  strstr << this->addExtraSpace;
2155  printf ( "Extra space : %37s\n", strstr.str().c_str() );
2156 
2157  strstr.str(std::string());
2158  if ( this->forceP1 ) { strstr << "TRUE"; } else { strstr << "FALSE"; }
2159  printf ( "Force P1 spacegroup : %37s\n", strstr.str().c_str() );
2160 
2161  strstr.str(std::string());
2162  if ( this->removeWaters ) { strstr << "TRUE"; } else { strstr << "FALSE"; }
2163  printf ( "Waters removed : %37s\n", strstr.str().c_str() );
2164 
2165  strstr.str(std::string());
2166  if ( this->firstModelOnly ) { strstr << "TRUE"; } else { strstr << "FALSE"; }
2167  printf ( "Only 1st model : %37s\n", strstr.str().c_str() );
2168 
2169  strstr.str(std::string());
2170  strstr << this->integOrder;
2171  printf ( "Integration order : %37s\n", strstr.str().c_str() );
2172 
2173  strstr.str(std::string());
2174  strstr << this->taylorSeriesCap;
2175  printf ( "Taylor series cap : %37s\n", strstr.str().c_str() );
2176 
2177  strstr.str(std::string());
2178  strstr << this->pdbBFactorNewVal;
2179  printf ( "PDB B-factor const : %37s\n", strstr.str().c_str() );
2180 
2181  strstr.str(std::string());
2182  if ( this->reBoxMap ) { strstr << "TRUE"; } else { strstr << "FALSE"; }
2183  printf ( "Map re-boxing : %37s\n", strstr.str().c_str() );
2184 
2185  strstr.str(std::string());
2186  if ( this->invertMap ) { strstr << "TRUE"; } else { strstr << "FALSE"; }
2187  printf ( "Map inversion : %37s\n", strstr.str().c_str() );
2188 
2189  strstr.str(std::string());
2190  if ( this->normaliseMap ) { strstr << "TRUE"; } else { strstr << "FALSE"; }
2191  printf ( "Map normalisation : %37s\n", strstr.str().c_str() );
2192 
2193  strstr.str(std::string());
2194  if ( this->maskMap ) { strstr << "TRUE"; } else { strstr << "FALSE"; }
2195  printf ( "Map masking : %37s\n", strstr.str().c_str() );
2196 
2197  strstr.str(std::string());
2198  if ( this->saveMask ) { strstr << "TRUE"; } else { strstr << "FALSE"; }
2199  printf ( "Saving mask : %37s\n", strstr.str().c_str() );
2200 
2201  strstr.str(std::string());
2202  strstr << this->maskFileName;
2203  printf ( "Map mask filename : %37s\n", strstr.str().c_str() );
2204 
2205  strstr.str(std::string());
2206  strstr << this->blurFactor;
2207  printf ( "Map blurring : %37s\n", strstr.str().c_str() );
2208 
2209  strstr.str(std::string());
2210  strstr << this->maskingThresholdIQRs;
2211  printf ( "Masking threshold : %37s\n", strstr.str().c_str() );
2212 
2213  strstr.str(std::string());
2214  strstr << this->boundsExtraSpace;
2215  printf ( "Bounds extra space : %37s\n", strstr.str().c_str() );
2216 
2217  strstr.str(std::string());
2218  strstr << this->boundsSimilarityThreshold;
2219  printf ( "Bounds similarity : %37s\n", strstr.str().c_str() );
2220 
2221  strstr.str(std::string());
2222  if ( this->useSameBounds ) { strstr << "TRUE"; } else { strstr << "FALSE"; }
2223  printf ( "Same boundaries : %37s\n", strstr.str().c_str() );
2224 
2225  strstr.str(std::string());
2226  strstr << this->outName;
2227  printf ( "Re-boxed filename : %37s\n", strstr.str().c_str() );
2228 
2229  strstr.str(std::string());
2230  if ( this->moveToCOM ) { strstr << "TRUE"; } else { strstr << "FALSE"; }
2231  printf ( "Map COM centering : %37s\n", strstr.str().c_str() );
2232 
2233  strstr.str(std::string());
2234  if ( this->changeMapResolution ) { strstr << "TRUE"; } else { strstr << "FALSE"; }
2235  printf ( "Change map resol : %37s\n", strstr.str().c_str() );
2236 
2237  strstr.str(std::string());
2238  if ( this->changeMapResolutionTriLinear ) { strstr << "TRUE"; } else { strstr << "FALSE"; }
2239  printf ( "Change map tri-lin : %37s\n", strstr.str().c_str() );
2240 
2241  strstr.str(std::string());
2242  if ( this->usePhase ) { strstr << "TRUE"; } else { strstr << "FALSE"; }
2243  printf ( "Use phase info : %37s\n", strstr.str().c_str() );
2244 
2245  strstr.str(std::string());
2246  if ( this->progressiveSphereMapping ) { strstr << "TRUE"; } else { strstr << "FALSE"; }
2247  printf ( "Progressive spheres : %37s\n", strstr.str().c_str() );
2248 
2249  strstr.str(std::string());
2250  if ( this->computeEnergyLevelsDesc ) { strstr << "TRUE"; } else { strstr << "FALSE"; }
2251  printf ( "Energy lvl desc : %37s\n", strstr.str().c_str() );
2252 
2253  strstr.str(std::string());
2254  strstr << this->enLevMatrixPowerWeight;
2255  printf ( "Energy lvl weight : %37s\n", strstr.str().c_str() );
2256 
2257  strstr.str(std::string());
2258  if ( this->computeTraceSigmaDesc ) { strstr << "TRUE"; } else { strstr << "FALSE"; }
2259  printf ( "Tr sigma desc : %37s\n", strstr.str().c_str() );
2260 
2261  strstr.str(std::string());
2262  if ( this->computeRotationFuncDesc ) { strstr << "TRUE"; } else { strstr << "FALSE"; }
2263  printf ( "Full RF desc : %37s\n", strstr.str().c_str() );
2264 
2265  strstr.str(std::string());
2266  strstr << this->peakNeighbours;
2267  printf ( "Neightbours to peak : %37s\n", strstr.str().c_str() );
2268 
2269  strstr.str(std::string());
2270  strstr << this->noIQRsFromMedianNaivePeak;
2271  printf ( "Peak IQR threshold : %37s\n", strstr.str().c_str() );
2272 
2273  strstr.str(std::string());
2274  strstr << this->symMissPeakThres;
2275  printf ( "Missing ax. thres : %37s\n", strstr.str().c_str() );
2276 
2277  strstr.str(std::string());
2278  strstr << this->minSymPeak;
2279  printf ( "Min. sym. peak size : %37s\n", strstr.str().c_str() );
2280 
2281  strstr.str(std::string());
2282  strstr << this->axisErrTolerance;
2283  printf ( "Same ax. threshold : %37s\n", strstr.str().c_str() );
2284 
2285  strstr.str(std::string());
2286  if ( this->axisErrToleranceDefault ) { strstr << "TRUE"; } else { strstr << "FALSE"; }
2287  printf ( "Same ax. thre. decr.: %37s\n", strstr.str().c_str() );
2288 
2289  strstr.str(std::string());
2290  strstr << this->requestedSymmetryType << "-" << this->requestedSymmetryFold;
2291  printf ( "Requested symm. : %37s\n", strstr.str().c_str() );
2292 
2293  strstr.str(std::string());
2294  strstr << this->overlayStructureName;
2295  printf ( "Overlay file : %37s\n", strstr.str().c_str() );
2296 
2297  strstr.str(std::string());
2298  strstr << this->rotTrsJSONFile;
2299  printf ( "JSON overlay file : %37s\n", strstr.str().c_str() );
2300 
2301  //================================================ Done
2302  return ;
2303 
2304 }
2305 
2310 std::vector< proshade_double > ProSHADE_run::getEnergyLevelsVector ( )
2311 {
2312  //================================================ Return the value
2313  return ( this->enLevs );
2314 }
2315 
2320 std::vector< proshade_double > ProSHADE_run::getTraceSigmaVector ( )
2321 {
2322  //================================================ Return the value
2323  return ( this->trSigm );
2324 }
2325 
2330 std::vector< proshade_double > ProSHADE_run::getRotationFunctionVector ( )
2331 {
2332  //================================================ Return the value
2333  return ( this->rotFun );
2334 }
2335 
2341 {
2342  //================================================ Return the value
2343  return ( this->noStructures );
2344 }
2345 
2350 proshade_signed ProSHADE_run::getVerbose ( )
2351 {
2352  //================================================ Return the value
2353  return ( this->verbose );
2354 }
2355 
2361 {
2362  //================================================ Return the value
2363  return ( static_cast<proshade_unsign> ( this->RecomSymAxes.size() ) );
2364 }
2365 
2371 {
2372  //================================================ Return the value
2373  return ( static_cast<proshade_unsign> ( this->RecomSymAxes.size() ) );
2374 }
2375 
2381 std::vector< std::string > ProSHADE_run::getSymmetryAxis ( proshade_unsign axisNo )
2382 {
2383  //================================================ Sanity checks
2384  if ( static_cast<proshade_unsign> ( this->RecomSymAxes.size() ) <= axisNo )
2385  {
2386  ProSHADE_internal_messages::printWarningMessage ( this->verbose, "!!! ProSHADE WARNING !!! Requested symmetry index does not exist. Returning empty vector.", "WS00039" );
2387  return ( std::vector< std::string > ( ) );
2388  }
2389 
2390  //================================================ Initialise local variables
2391  std::vector< std::string > ret;
2392 
2393  //================================================ Input the axis data as strings
2394  std::stringstream ssHlp;
2395  ssHlp << this->RecomSymAxes.at(axisNo)[0];
2396  ProSHADE_internal_misc::addToStringVector ( &ret, ssHlp.str() );
2397  ssHlp.str ( "" );
2398 
2399  ssHlp << this->RecomSymAxes.at(axisNo)[1];
2400  ProSHADE_internal_misc::addToStringVector ( &ret, ssHlp.str() );
2401  ssHlp.str ( "" );
2402 
2403  ssHlp << this->RecomSymAxes.at(axisNo)[2];
2404  ProSHADE_internal_misc::addToStringVector ( &ret, ssHlp.str() );
2405  ssHlp.str ( "" );
2406 
2407  ssHlp << this->RecomSymAxes.at(axisNo)[3];
2408  ProSHADE_internal_misc::addToStringVector ( &ret, ssHlp.str() );
2409  ssHlp.str ( "" );
2410 
2411  ssHlp << this->RecomSymAxes.at(axisNo)[4];
2412  ProSHADE_internal_misc::addToStringVector ( &ret, ssHlp.str() );
2413  ssHlp.str ( "" );
2414 
2415  ssHlp << this->RecomSymAxes.at(axisNo)[5];
2416  ProSHADE_internal_misc::addToStringVector ( &ret, ssHlp.str() );
2417  ssHlp.str ( "" );
2418 
2419  //================================================ Done
2420  return ( ret );
2421 
2422 }
2423 
2428 std::vector < std::vector< proshade_double > > ProSHADE_run::getAllCSyms ( )
2429 {
2430  //================================================ Done
2431  return ( this->allCSymAxes );
2432 
2433 }
2434 
2439 std::vector< proshade_signed > ProSHADE_run::getOriginalBounds ( proshade_unsign strNo )
2440 {
2441  //================================================ Sanity checks
2442  if ( noStructures <= strNo )
2443  {
2444  ProSHADE_internal_messages::printWarningMessage ( this->verbose, "!!! ProSHADE WARNING !!! Requested bounds for structure index which does not exist. Returning empty vector.", "WB00041" );
2445  return ( std::vector< proshade_signed > ( ) );
2446  }
2447 
2448  //================================================ Initialise local variables
2449  std::vector< proshade_signed > ret;
2450 
2451  //================================================ Input the axis data as strings
2452  ProSHADE_internal_misc::addToSignedVector ( &ret, this->originalBounds.at( strNo )[0] );
2453  ProSHADE_internal_misc::addToSignedVector ( &ret, this->originalBounds.at( strNo )[1] );
2454  ProSHADE_internal_misc::addToSignedVector ( &ret, this->originalBounds.at( strNo )[2] );
2455  ProSHADE_internal_misc::addToSignedVector ( &ret, this->originalBounds.at( strNo )[3] );
2456  ProSHADE_internal_misc::addToSignedVector ( &ret, this->originalBounds.at( strNo )[4] );
2457  ProSHADE_internal_misc::addToSignedVector ( &ret, this->originalBounds.at( strNo )[5] );
2458 
2459  //================================================ Done
2460  return ( ret );
2461 }
2462 
2467 std::vector< proshade_signed > ProSHADE_run::getReBoxedBounds ( proshade_unsign strNo )
2468 {
2469  //================================================ Sanity checks
2470  if ( noStructures <= strNo )
2471  {
2472  ProSHADE_internal_messages::printWarningMessage ( this->verbose, "!!! ProSHADE WARNING !!! Requested bounds for structure index which does not exist. Returning empty vector.", "WB00041" );
2473  return ( std::vector< proshade_signed > ( ) );
2474  }
2475 
2476  //================================================ Initialise local variables
2477  std::vector< proshade_signed > ret;
2478 
2479  //================================================ Input the axis data as strings
2480  ProSHADE_internal_misc::addToSignedVector ( &ret, this->reboxedBounds.at( strNo )[0] );
2481  ProSHADE_internal_misc::addToSignedVector ( &ret, this->reboxedBounds.at( strNo )[1] );
2482  ProSHADE_internal_misc::addToSignedVector ( &ret, this->reboxedBounds.at( strNo )[2] );
2483  ProSHADE_internal_misc::addToSignedVector ( &ret, this->reboxedBounds.at( strNo )[3] );
2484  ProSHADE_internal_misc::addToSignedVector ( &ret, this->reboxedBounds.at( strNo )[4] );
2485  ProSHADE_internal_misc::addToSignedVector ( &ret, this->reboxedBounds.at( strNo )[5] );
2486 
2487  //================================================ Done
2488  return ( ret );
2489 }
2490 
2497 proshade_double ProSHADE_run::getMapValue ( proshade_unsign strNo, proshade_unsign mapIndex )
2498 {
2499  //================================================ Return the value
2500  return ( this->manipulatedMaps.at(strNo)[mapIndex] );
2501 }
2502 
2511 void getReBoxedMap ( ProSHADE_run* run, proshade_unsign strNo, double *reboxMap, int len )
2512 {
2513  //================================================ Sanity checks
2514  if ( run->getNoStructures() <= strNo )
2515  {
2516  ProSHADE_internal_messages::printWarningMessage ( run->getVerbose(), "!!! ProSHADE WARNING !!! Requested bounds for structure index which does not exist. Returning empty vector.", "WB00041" );
2517  return ;
2518  }
2519 
2520  //================================================ Save the data into the output array
2521  for ( proshade_unsign iter = 0; iter < static_cast<proshade_unsign> ( len ); iter++)
2522  {
2523  reboxMap[iter] = static_cast<double> ( run->getMapValue ( strNo, iter ) );
2524  }
2525 
2526  //================================================ Done
2527  return ;
2528 
2529 }
2530 
2535 std::vector< proshade_double > ProSHADE_run::getEulerAngles ( )
2536 {
2537  //================================================ Sanity check
2538  if ( this->eulerAngles.size() != 3 )
2539  {
2540  ProSHADE_internal_messages::printWarningMessage ( this->verbose, "!!! ProSHADE WARNING !!! Requested rotation/translation values for Overlay functionality without having successfully computed it. Please check the correct task was used and no other warnings/errors were obtained.", "WO00042" );
2541  return ( std::vector< proshade_double > ( ) );
2542  }
2543 
2544  //================================================ Return required value
2545  return ( this->eulerAngles );
2546 
2547 }
2548 
2553 std::vector< proshade_double > ProSHADE_run::getOptimalRotMat ( )
2554 {
2555  //================================================ Sanity check
2556  if ( this->eulerAngles.size() != 3 )
2557  {
2558  ProSHADE_internal_messages::printWarningMessage ( this->verbose, "!!! ProSHADE WARNING !!! Requested rotation/translation values for Overlay functionality without having successfully computed it. Please check the correct task was used and no other warnings/errors were obtained.", "WO00042" );
2559  return ( std::vector< proshade_double > ( ) );
2560  }
2561 
2562  //================================================ Obtain the optimal rotation matrix
2563  proshade_double* rotMat = new proshade_double[9];
2564  ProSHADE_internal_misc::checkMemoryAllocation ( rotMat, __FILE__, __LINE__, __func__ );
2565  ProSHADE_internal_maths::getRotationMatrixFromEulerZXZAngles ( this->eulerAngles.at(0), this->eulerAngles.at(1), this->eulerAngles.at(2), rotMat );
2566 
2567  //================================================ Copy to the output variable
2568  std::vector< proshade_double > ret;
2569  for ( proshade_unsign iter = 0; iter < 9; iter++ ) { ProSHADE_internal_misc::addToDoubleVector ( &ret, rotMat[iter] ); }
2570 
2571  //================================================ Release the memory
2572  delete[] rotMat;
2573 
2574  //================================================ Return required value
2575  return ( ret );
2576 
2577 }
2578 
2583 std::vector< proshade_double > ProSHADE_run::getTranslationToOrigin ( )
2584 {
2585  //================================================ Sanity check
2586  if ( this->coordRotationCentre.size() != 3 )
2587  {
2588  ProSHADE_internal_messages::printWarningMessage ( this->verbose, "!!! ProSHADE WARNING !!! Requested rotation/translation values for Overlay functionality without having successfully computed it. Please check the correct task was used and no other warnings/errors were obtained.", "WO00042" );
2589  return ( std::vector< proshade_double > ( ) );
2590  }
2591 
2592  //================================================ Create return variable with negative values of the internal varariable
2593  std::vector < proshade_double > ret;
2594  ProSHADE_internal_misc::addToDoubleVector ( &ret, -this->coordRotationCentre.at(0) );
2595  ProSHADE_internal_misc::addToDoubleVector ( &ret, -this->coordRotationCentre.at(1) );
2596  ProSHADE_internal_misc::addToDoubleVector ( &ret, -this->coordRotationCentre.at(2) );
2597 
2598  //================================================ Return required value
2599  return ( ret );
2600 
2601 }
2602 
2607 std::vector< proshade_double > ProSHADE_run::getOriginToOverlayTranslation ( )
2608 {
2609  //================================================ Sanity check
2610  if ( this->overlayTranslation.size() != 3 )
2611  {
2612  ProSHADE_internal_messages::printWarningMessage ( this->verbose, "!!! ProSHADE WARNING !!! Requested rotation/translation values for Overlay functionality without having successfully computed it. Please check the correct task was used and no other warnings/errors were obtained.", "WO00042" );
2613  return ( std::vector< proshade_double > ( ) );
2614  }
2615 
2616  //================================================ Return required value
2617  return ( this->overlayTranslation );
2618 
2619 }
ProSHADE_settings::noIQRsFromMedianNaivePeak
proshade_double noIQRsFromMedianNaivePeak
When doing peak searching, how many IQRs from the median the threshold for peak height should be (in ...
Definition: ProSHADE_settings.hpp:165
ProSHADE_settings::setOverlayJsonFile
void setOverlayJsonFile(std::string filename)
Sets the filename to which the overlay operations are to be save into.
Definition: ProSHADE.cpp:1120
ProSHADE_internal_tasks::MapOverlayTask
void MapOverlayTask(ProSHADE_settings *settings, std::vector< proshade_double > *rotationCentre, std::vector< proshade_double > *eulerAngles, std::vector< proshade_double > *finalTranslation)
The symmetry detection task driver function.
Definition: ProSHADE_tasks.cpp:371
ProSHADE_settings::maxBandwidth
proshade_unsign maxBandwidth
The bandwidth of spherical harmonics decomposition for the largest sphere.
Definition: ProSHADE_settings.hpp:109
ProSHADE_settings::integOrder
proshade_unsign integOrder
The order required for full Gauss-Legendre integration between the spheres.
Definition: ProSHADE_settings.hpp:119
ProSHADE_settings::recommendedSymmetryType
std::string recommendedSymmetryType
The symmetry type that ProSHADE finds the best fitting for the structure. Possible values are "" for ...
Definition: ProSHADE_settings.hpp:175
ProSHADE_settings::rotTrsJSONFile
std::string rotTrsJSONFile
The filename to which the rotation and translation operations are to be saved into.
Definition: ProSHADE_settings.hpp:185
ProSHADE_settings::setEnLevShellWeight
void setEnLevShellWeight(proshade_double mPower)
Sets the weight of shell position for the energy levels computation.
Definition: ProSHADE.cpp:903
ProSHADE_settings::computeTraceSigmaDesc
bool computeTraceSigmaDesc
If true, the trace sigma descriptor will be computed, otherwise all its computations will be omitted.
Definition: ProSHADE_settings.hpp:160
ProSHADE_settings::setTraceSigmaComputation
void setTraceSigmaComputation(bool trSigVal)
Sets whether the trace sigma distance descriptor should be computed.
Definition: ProSHADE.cpp:815
ProSHADE_settings::computeRotationFuncDesc
bool computeRotationFuncDesc
If true, the rotation function descriptor will be computed, otherwise all its computations will be om...
Definition: ProSHADE_settings.hpp:161
ProSHADE_settings::setSameBoundaries
void setSameBoundaries(bool sameB)
Sets whether same boundaries should be used in the appropriate variable.
Definition: ProSHADE.cpp:619
ProSHADE_settings::maxSymmetryFold
proshade_unsign maxSymmetryFold
The highest symmetry fold to search for.
Definition: ProSHADE_settings.hpp:181
ProSHADE_settings::taylorSeriesCap
proshade_unsign taylorSeriesCap
The max limit on the Taylor series expansion done for the abscissas of the Gauss-Legendre integration...
Definition: ProSHADE_settings.hpp:120
ProSHADE_run::~ProSHADE_run
~ProSHADE_run(void)
Destructor for the ProSHADE class.
Definition: ProSHADE.cpp:1464
ProSHADE_settings::setMinimumMaskSize
void setMinimumMaskSize(proshade_single minMS)
Sets the requested minimum mask size.
Definition: ProSHADE.cpp:521
ProSHADE_run::getRotationFunctionVector
std::vector< proshade_double > getRotationFunctionVector(void)
This function returns the full rotation function distances vector from the first to all other structu...
Definition: ProSHADE.cpp:2330
ProSHADE_settings::boundsExtraSpace
proshade_single boundsExtraSpace
The number of extra angstroms to be added to all re-boxing bounds just for safety.
Definition: ProSHADE_settings.hpp:140
ProSHADE_settings::setBicubicInterpolationSearch
void setBicubicInterpolationSearch(bool bicubPeaks)
Sets the bicubic interpolation on peaks.
Definition: ProSHADE.cpp:1148
ProSHADE_settings::setPeakNaiveNoIQR
void setPeakNaiveNoIQR(proshade_double noIQRs)
Sets the number of IQRs from the median for threshold height a peak needs to be considered a peak.
Definition: ProSHADE.cpp:867
ProSHADE_exception
This class is the representation of ProSHADE exception.
Definition: ProSHADE_exceptions.hpp:37
ProSHADE_settings::outName
std::string outName
The file name where the output structure(s) should be saved.
Definition: ProSHADE_settings.hpp:155
ProSHADE_settings::setMapInversion
void setMapInversion(bool mInv)
Sets the requested map inversion value in the appropriate variable.
Definition: ProSHADE.cpp:405
ProSHADE_settings::setMapResolutionChange
void setMapResolutionChange(bool mrChange)
Sets the requested map resolution change decision in the appropriate variable.
Definition: ProSHADE.cpp:652
ProSHADE_settings::setPeakNeighboursNumber
void setPeakNeighboursNumber(proshade_unsign pkS)
Sets the number of neighbour values that have to be smaller for an index to be considered a peak.
Definition: ProSHADE.cpp:849
ProSHADE_settings::blurFactor
proshade_single blurFactor
This is the amount by which B-factors should be increased to create the blurred map for masking.
Definition: ProSHADE_settings.hpp:129
ProSHADE_run::getAllCSyms
std::vector< std::vector< proshade_double > > getAllCSyms(void)
This function returns a all symmetry axes as a vector of vectors of doubles.
Definition: ProSHADE.cpp:2428
ProSHADE_settings::maskMap
bool maskMap
Should the map be masked from noise?
Definition: ProSHADE_settings.hpp:131
ProSHADE_settings::requestedSymmetryFold
proshade_unsign requestedSymmetryFold
The fold of the requested symmetry (only applicable to C and D symmetry types).
Definition: ProSHADE_settings.hpp:178
ProSHADE_run::getNoSymmetryAxes
proshade_unsign getNoSymmetryAxes(void)
This function returns the number of detected recommended symmetry axes.
Definition: ProSHADE.cpp:2360
ProSHADE_settings::requestedSymmetryType
std::string requestedSymmetryType
The symmetry type requested by the user. Allowed values are C, D, T, O and I.
Definition: ProSHADE_settings.hpp:177
ProSHADE_settings::setSphereDistances
void setSphereDistances(proshade_single sphDist)
Sets the requested distance between spheres in the appropriate variable.
Definition: ProSHADE.cpp:748
ProSHADE_settings::setVerbosity
void setVerbosity(proshade_signed verbosity)
Sets the requested verbosity in the appropriate variable.
Definition: ProSHADE.cpp:421
ProSHADE_settings::setMinimumPeakForAxis
void setMinimumPeakForAxis(proshade_double minSP)
Sets the minimum peak height for symmetry axis to be considered.
Definition: ProSHADE.cpp:991
ProSHADE_settings::saveMask
bool saveMask
Should the mask be saved?
Definition: ProSHADE_settings.hpp:135
ProSHADE_settings::requestedResolution
proshade_single requestedResolution
The resolution to which the calculations are to be done.
Definition: ProSHADE_settings.hpp:101
ProSHADE_settings::minSymPeak
proshade_double minSymPeak
Minimum average peak for symmetry axis to be considered as "real".
Definition: ProSHADE_settings.hpp:174
ProSHADE_settings::setAxisComparisonThresholdBehaviour
void setAxisComparisonThresholdBehaviour(bool behav)
Sets the automatic symmetry axis tolerance decreasing.
Definition: ProSHADE.cpp:974
ProSHADE_settings::setDetectedSymmetry
void setDetectedSymmetry(proshade_double *sym)
Sets the final detected symmetry axes information.
Definition: ProSHADE.cpp:1077
ProSHADE_settings::progressiveSphereMapping
bool progressiveSphereMapping
If true, each shell will have its own angular resolution dependent on the actual number of map points...
Definition: ProSHADE_settings.hpp:152
ProSHADE_settings::maxSphereDists
proshade_single maxSphereDists
The distance between spheres in spherical mapping for the largest sphere.
Definition: ProSHADE_settings.hpp:116
ProSHADE_run::getEulerAngles
std::vector< proshade_double > getEulerAngles(void)
This function returns the vector of Euler angles with best overlay correlation.
Definition: ProSHADE.cpp:2535
ProSHADE_settings::symMissPeakThres
proshade_double symMissPeakThres
Percentage of peaks that could be missing that would warrant starting the missing peaks search proced...
Definition: ProSHADE_settings.hpp:171
ProSHADE_internal_maths::getRotationMatrixFromEulerZXZAngles
void getRotationMatrixFromEulerZXZAngles(proshade_double eulerAlpha, proshade_double eulerBeta, proshade_double eulerGamma, proshade_double *matrix)
Function to find the rotation matrix from Euler angles (ZXZ convention).
Definition: ProSHADE_maths.cpp:1005
ProSHADE_settings::setPDBBFactor
void setPDBBFactor(proshade_double newBF)
Sets the requested B-factor value for PDB files in the appropriate variable.
Definition: ProSHADE.cpp:373
ProSHADE_settings::addStructure
void addStructure(std::string structure)
Adds a structure file name to the appropriate variable.
Definition: ProSHADE.cpp:341
ProSHADE_settings::determineIntegrationOrder
void determineIntegrationOrder(proshade_single maxMapRange)
This function determines the integration order for the between spheres integration.
Definition: ProSHADE.cpp:1275
ProSHADE_settings::setMaskIQR
void setMaskIQR(proshade_single noIQRs)
Sets the requested number of IQRs for masking threshold in the appropriate variable.
Definition: ProSHADE.cpp:454
ProSHADE_settings::setMissingPeakThreshold
void setMissingPeakThreshold(proshade_double mpThres)
Sets the threshold for starting the missing peaks procedure.
Definition: ProSHADE.cpp:938
ProSHADE_run::getVerbose
proshade_signed getVerbose(void)
This function returns the verbose value.
Definition: ProSHADE.cpp:2350
ProSHADE_settings::maskingThresholdIQRs
proshade_single maskingThresholdIQRs
Number of inter-quartile ranges from the median to be used for thresholding the blurred map for maski...
Definition: ProSHADE_settings.hpp:130
ProSHADE_settings::useCorrelationMasking
bool useCorrelationMasking
Should the blurring masking (false) or the correlation masking (true) be used?
Definition: ProSHADE_settings.hpp:132
ProSHADE_settings::usePhase
bool usePhase
If true, the full data will be used, if false, Patterson maps will be used instead and phased data wi...
Definition: ProSHADE_settings.hpp:113
ProSHADE_settings::setMapCentering
void setMapCentering(bool com)
Sets the requested map centering decision value in the appropriate variable.
Definition: ProSHADE.cpp:684
ProSHADE_settings::setMaskBlurFactor
void setMaskBlurFactor(proshade_single blurFac)
Sets the requested map blurring factor in the appropriate variable.
Definition: ProSHADE.cpp:437
ProSHADE_internal_messages::printWarningMessage
void printWarningMessage(proshade_signed verbose, std::string message, std::string warnCode)
General stderr message printing (used for warnings).
Definition: ProSHADE_messages.cpp:101
ProSHADE_settings::setPhaseUsage
void setPhaseUsage(bool phaseUsage)
Sets whether the phase information will be used.
Definition: ProSHADE.cpp:885
ProSHADE_settings::maskFileName
std::string maskFileName
The filename to which mask should be saved.
Definition: ProSHADE_settings.hpp:136
ProSHADE_settings::verbose
proshade_signed verbose
Should the software report on the progress, or just be quiet? Value between -1 (nothing) and 4 (loud)
Definition: ProSHADE_settings.hpp:188
ProSHADE_settings::setBandwidth
void setBandwidth(proshade_unsign band)
Sets the requested spherical harmonics bandwidth in the appropriate variable.
Definition: ProSHADE.cpp:732
ProSHADE_settings::setBoundsSpace
void setBoundsSpace(proshade_single boundsExSp)
Sets the requested number of angstroms for extra space in re-boxing in the appropriate variable.
Definition: ProSHADE.cpp:586
ProSHADE_settings::changeMapResolutionTriLinear
bool changeMapResolutionTriLinear
Should maps be re-sampled to obtain the required resolution?
Definition: ProSHADE_settings.hpp:103
ProSHADE_settings::setOutputFilename
void setOutputFilename(std::string oFileName)
Sets the requested output file name in the appropriate variable.
Definition: ProSHADE.cpp:636
ProSHADE_internal_misc::addToDoubleVector
void addToDoubleVector(std::vector< proshade_double > *vecToAddTo, proshade_double elementToAdd)
Adds the element to the vector.
Definition: ProSHADE_misc.cpp:77
ProSHADE_settings::useBiCubicInterpolationOnPeaks
bool useBiCubicInterpolationOnPeaks
This variable switch decides whether best symmetry is detected from peak indices, or whether bicubic ...
Definition: ProSHADE_settings.hpp:180
ProSHADE_internal_spheres::autoDetermineSphereDistances
proshade_single autoDetermineSphereDistances(proshade_single maxMapRange, proshade_single resolution)
This function determines the sphere distances for sphere mapping.
Definition: ProSHADE_spheres.cpp:540
ProSHADE_run::getSymmetryAxis
std::vector< std::string > getSymmetryAxis(proshade_unsign axisNo)
This function returns a single symmetry axis as a vector of strings from the recommended symmetry axe...
Definition: ProSHADE.cpp:2381
ProSHADE_settings::setAxisComparisonThreshold
void setAxisComparisonThreshold(proshade_double axThres)
Sets the threshold for matching symmetry axes.
Definition: ProSHADE.cpp:955
ProSHADE_internal_tasks::SymmetryDetectionTask
void SymmetryDetectionTask(ProSHADE_settings *settings, std::vector< proshade_double * > *axes, std::vector< std::vector< proshade_double > > *allCs)
The symmetry detection task driver function.
Definition: ProSHADE_tasks.cpp:286
ProSHADE_internal_tasks::MapManipulationTask
void MapManipulationTask(ProSHADE_settings *settings, std::vector< proshade_signed * > *originalBounds, std::vector< proshade_signed * > *reboxedBounds, std::vector< proshade_double * > *manipulatedMaps)
The re-boxing task driver function.
Definition: ProSHADE_tasks.cpp:35
ProSHADE_settings::forceP1
bool forceP1
Should the P1 spacegroup be forced on the input PDB files?
Definition: ProSHADE_settings.hpp:96
ProSHADE_settings::setTypicalNoiseSize
void setTypicalNoiseSize(proshade_single typNoi)
Sets the requested "fake" half-map kernel in the appropriate variable.
Definition: ProSHADE.cpp:505
ProSHADE_internal_misc::addToSignedVector
void addToSignedVector(std::vector< proshade_signed > *vecToAddTo, proshade_signed elementToAdd)
Adds the element to the vector.
Definition: ProSHADE_misc.cpp:121
ProSHADE_run
This class provides the access point to the library.
Definition: ProSHADE.hpp:39
ProSHADE_internal_misc::deepCopyAxisToDblPtrVector
void deepCopyAxisToDblPtrVector(std::vector< proshade_double * > *dblPtrVec, proshade_double *axis)
Does a deep copy of a double array to a vector of double arrays.
Definition: ProSHADE_misc.cpp:287
ProSHADE_settings::task
ProSHADE_Task task
This custom type variable determines which task to perfom (i.e. symmetry detection,...
Definition: ProSHADE_settings.hpp:92
ProSHADE_settings::setMaskFilename
void setMaskFilename(std::string mskFln)
Sets where the mask should be saved.
Definition: ProSHADE.cpp:553
ProSHADE_run::getSymmetryFold
proshade_unsign getSymmetryFold(void)
This is the main accessor function for the user to get to know what symmetry fold ProSHADE has detect...
Definition: ProSHADE.cpp:1504
ProSHADE_run::getTranslationToOrigin
std::vector< proshade_double > getTranslationToOrigin(void)
This function returns the negative values of the position of the rotation centre (the point about whi...
Definition: ProSHADE.cpp:2583
ProSHADE_settings::reBoxMap
bool reBoxMap
This switch decides whether re-boxing is needed.
Definition: ProSHADE_settings.hpp:139
ProSHADE_settings::setSymmetryRotFunPeaks
void setSymmetryRotFunPeaks(bool rotFunPeaks)
Sets the symmetry detection algorithm type.
Definition: ProSHADE.cpp:1134
getReBoxedMap
void getReBoxedMap(ProSHADE_run *run, proshade_unsign strNo, double *reboxMap, int len)
This function returns the re-boxed structure map 1D array for the processed structure.
Definition: ProSHADE.cpp:2511
ProSHADE_settings::normaliseMap
bool normaliseMap
Should the map be normalised to mean 0 sd 1?
Definition: ProSHADE_settings.hpp:123
ProSHADE_settings::addExtraSpace
proshade_single addExtraSpace
If this value is non-zero, this many angstroms of empty space will be added to the internal map.
Definition: ProSHADE_settings.hpp:149
ProSHADE_settings::setRequestedFold
void setRequestedFold(proshade_unsign val)
Sets the user requested symmetry fold.
Definition: ProSHADE.cpp:1060
ProSHADE_settings
This class stores all the settings and is passed to the executive classes instead of a multitude of p...
Definition: ProSHADE_settings.hpp:89
ProSHADE_settings::determineBandwidthFromAngle
void determineBandwidthFromAngle(proshade_double uncertainty)
This function determines the bandwidth for the spherical harmonics computation from the allowed rotat...
Definition: ProSHADE.cpp:1212
ProSHADE_settings::getCommandLineParams
void getCommandLineParams(int argc, char **argv)
This function parses the command line arguments into the settings object.
Definition: ProSHADE.cpp:1583
ProSHADE_internal_tasks::DistancesComputationTask
void DistancesComputationTask(ProSHADE_settings *settings, std::vector< proshade_double > *enLevs, std::vector< proshade_double > *trSigm, std::vector< proshade_double > *rotFun)
The distances computation task driver function.
Definition: ProSHADE_tasks.cpp:147
ProSHADE_run::getSymmetryType
std::string getSymmetryType(void)
This is the main accessor function for the user to get to know what symmetry type ProSHADE has detect...
Definition: ProSHADE.cpp:1494
ProSHADE_internal_messages::printWellcomeMessage
void printWellcomeMessage(proshade_signed verbose)
Wellcome message printing.
Definition: ProSHADE_messages.cpp:31
ProSHADE.hpp
This is the main header file providing the main access class and its functions.
ProSHADE_run::getEnergyLevelsVector
std::vector< proshade_double > getEnergyLevelsVector(void)
This function returns the energy level distances vector from the first to all other structures.
Definition: ProSHADE.cpp:2310
ProSHADE_internal_messages::printTerminateMessage
void printTerminateMessage(proshade_signed verbose)
Final message printing.
Definition: ProSHADE_messages.cpp:49
ProSHADE_settings::setMapReboxing
void setMapReboxing(bool reBx)
Sets whether re-boxing needs to be done in the appropriate variable.
Definition: ProSHADE.cpp:569
ProSHADE_settings::setRecommendedSymmetry
void setRecommendedSymmetry(std::string val)
Sets the ProSHADE detected symmetry type.
Definition: ProSHADE.cpp:1009
ProSHADE_settings::setMaxSymmetryFold
void setMaxSymmetryFold(proshade_unsign maxFold)
Sets the maximum symmetry fold (well, the maximum prime symmetry fold).
Definition: ProSHADE.cpp:1162
ProSHADE_settings::correlationKernel
proshade_single correlationKernel
This value in Angstrom will be used as the kernel for the map-FHM correlation computation.
Definition: ProSHADE_settings.hpp:134
ProSHADE_settings::invertMap
bool invertMap
Should the map be inverted? Only use this if you think you have the wrong hand in your map.
Definition: ProSHADE_settings.hpp:126
ProSHADE_settings::setTaylorSeriesCap
void setTaylorSeriesCap(proshade_unsign tayCap)
Sets the requested Taylor series cap for the Gauss-Legendre integration in the appropriate variable.
Definition: ProSHADE.cpp:781
ProSHADE_settings::boundsSimilarityThreshold
proshade_signed boundsSimilarityThreshold
Number of indices which can be added just to make sure same size in indices is achieved.
Definition: ProSHADE_settings.hpp:141
ProSHADE_settings::setCorrelationMasking
void setCorrelationMasking(bool corMask)
Sets the requested map masking type in the appropriate variable.
Definition: ProSHADE.cpp:487
ProSHADE_settings::setProgressiveSphereMapping
void setProgressiveSphereMapping(bool progSphMap)
Sets the requested sphere mapping value settings approach in the appropriate variable.
Definition: ProSHADE.cpp:716
ProSHADE_settings::changeMapResolution
bool changeMapResolution
Should maps be re-sampled to obtain the required resolution?
Definition: ProSHADE_settings.hpp:102
ProSHADE_settings::determineAllSHValues
void determineAllSHValues(proshade_unsign xDim, proshade_unsign yDim, proshade_unsign zDim, proshade_double xDimAngs, proshade_double yDimAngs, proshade_double zDimAngs)
This function determines all the required values for spherical harmonics computation.
Definition: ProSHADE.cpp:1320
ProSHADE_settings::setIntegrationOrder
void setIntegrationOrder(proshade_unsign intOrd)
Sets the requested order for the Gauss-Legendre integration in the appropriate variable.
Definition: ProSHADE.cpp:764
ProSHADE_settings::setRotationFunctionComputation
void setRotationFunctionComputation(bool rotfVal)
Sets whether the rotation function distance descriptor should be computed.
Definition: ProSHADE.cpp:832
ProSHADE_run::getReBoxedBounds
std::vector< proshade_signed > getReBoxedBounds(proshade_unsign strNo)
This function returns a specific structure re-boxed bounds.
Definition: ProSHADE.cpp:2467
ProSHADE_settings::rotationUncertainty
proshade_double rotationUncertainty
Alternative to bandwidth - the angle in degrees to which the rotation function accuracy should be com...
Definition: ProSHADE_settings.hpp:110
ProSHADE_settings::~ProSHADE_settings
~ProSHADE_settings(void)
Destructor for the ProSHADE_settings class.
Definition: ProSHADE.cpp:302
ProSHADE_settings::setOverlaySaveFile
void setOverlaySaveFile(std::string filename)
Sets the filename to which the overlay structure is to be save into.
Definition: ProSHADE.cpp:1106
ProSHADE_settings::overlayStructureName
std::string overlayStructureName
The filename to which the rotated and translated moving structure is to be saved.
Definition: ProSHADE_settings.hpp:184
ProSHADE_settings::determineBandwidth
void determineBandwidth(proshade_unsign circumference)
This function determines the bandwidth for the spherical harmonics computation.
Definition: ProSHADE.cpp:1180
ProSHADE_settings::moveToCOM
bool moveToCOM
Logical value stating whether the structure should be moved to have its Centre Of Mass (COM) in the m...
Definition: ProSHADE_settings.hpp:146
ProSHADE_settings::peakNeighbours
proshade_unsign peakNeighbours
Number of points in any direction that have to be lower than the considered index in order to conside...
Definition: ProSHADE_settings.hpp:164
ProSHADE_internal_spheres::autoDetermineIntegrationOrder
proshade_unsign autoDetermineIntegrationOrder(proshade_single maxMapRange, proshade_single sphereDist)
This function determines the integration order for the between spheres integration.
Definition: ProSHADE_spheres.cpp:564
ProSHADE_settings::smoothingFactor
proshade_double smoothingFactor
This factor decides how small the group sizes should be - larger factor means more smaller groups.
Definition: ProSHADE_settings.hpp:168
ProSHADE_run::ProSHADE_run
ProSHADE_run(ProSHADE_settings *settings)
Contructor for the ProSHADE_run class.
Definition: ProSHADE.cpp:1369
ProSHADE_run::getMapValue
proshade_double getMapValue(proshade_unsign strNo, proshade_unsign mapIndex)
This function returns a single, specific structure map value.
Definition: ProSHADE.cpp:2497
ProSHADE_settings::halfMapKernel
proshade_single halfMapKernel
This value in Angstrom will be used as the kernel for the "fake half-map" computation.
Definition: ProSHADE_settings.hpp:133
ProSHADE_run::getNoRecommendedSymmetryAxes
proshade_unsign getNoRecommendedSymmetryAxes(void)
This function returns the number of detected recommended symmetry axes.
Definition: ProSHADE.cpp:2370
ProSHADE_settings::determineSphereDistances
void determineSphereDistances(proshade_single maxMapRange)
This function determines the sphere distances for sphere mapping.
Definition: ProSHADE.cpp:1243
ProSHADE_internal_misc::checkMemoryAllocation
void checkMemoryAllocation(chVar checkVar, std::string fileP, unsigned int lineP, std::string funcP, std::string infoP="This error may occurs when ProSHADE requests memory to be\n : allocated to it and this operation fails. This could\n : happen when not enough memory is available, either due to\n : other processes using a lot of memory, or when the machine\n : does not have sufficient memory available. Re-run to see\n : if this problem persists.")
Checks if memory was allocated properly.
Definition: ProSHADE_misc.hpp:65
ProSHADE_settings::setGroupingSmoothingFactor
void setGroupingSmoothingFactor(proshade_double smFact)
Sets the grouping smoothing factor into the proper variable.
Definition: ProSHADE.cpp:921
ProSHADE_internal_spheres::autoDetermineBandwidth
proshade_unsign autoDetermineBandwidth(proshade_unsign circumference)
This function determines the bandwidth for the spherical harmonics computation.
Definition: ProSHADE_spheres.cpp:518
ProSHADE_settings::setRequestedSymmetry
void setRequestedSymmetry(std::string val)
Sets the user requested symmetry type.
Definition: ProSHADE.cpp:1044
ProSHADE_settings::setExtraSpace
void setExtraSpace(proshade_single exSpace)
Sets the requested map extra space value in the appropriate variable.
Definition: ProSHADE.cpp:700
ProSHADE_settings::forceBounds
proshade_signed * forceBounds
These will be the boundaries to be forced upon the map.
Definition: ProSHADE_settings.hpp:143
ProSHADE_settings::detectedSymmetry
std::vector< proshade_double * > detectedSymmetry
The vector of detected symmetry axes.
Definition: ProSHADE_settings.hpp:192
ProSHADE_settings::recommendedSymmetryFold
proshade_unsign recommendedSymmetryFold
The fold of the recommended symmetry C or D type, 0 otherwise.
Definition: ProSHADE_settings.hpp:176
ProSHADE_settings::inputFiles
std::vector< std::string > inputFiles
This vector contains the filenames of all input structure files.
Definition: ProSHADE_settings.hpp:95
ProSHADE_settings::setMapResolutionChangeTriLinear
void setMapResolutionChangeTriLinear(bool mrChange)
Sets the requested map resolution change decision using tri-linear interpolation in the appropriate v...
Definition: ProSHADE.cpp:668
ProSHADE_settings::setMaskSaving
void setMaskSaving(bool savMsk)
Sets whether the mask should be saved.
Definition: ProSHADE.cpp:537
ProSHADE_settings::ProSHADE_settings
ProSHADE_settings(void)
Contructor for the ProSHADE_settings class.
Definition: ProSHADE.cpp:34
ProSHADE_settings::firstModelOnly
bool firstModelOnly
Shoud only the first PDB model be used, or should all models be used?
Definition: ProSHADE_settings.hpp:98
ProSHADE_settings::setBoundsThreshold
void setBoundsThreshold(proshade_signed boundsThres)
Sets the threshold for number of indices difference acceptable to make index sizes same in the approp...
Definition: ProSHADE.cpp:602
ProSHADE_settings::axisErrTolerance
proshade_double axisErrTolerance
Allowed error on vector axis in in dot product ( acos ( 1 - axErr ) is the allowed difference in radi...
Definition: ProSHADE_settings.hpp:172
ProSHADE_settings::useSameBounds
bool useSameBounds
Switch to say that the same boundaries as used for the first should be used for all input maps.
Definition: ProSHADE_settings.hpp:142
ProSHADE_settings::setMasking
void setMasking(bool mask)
Sets the requested map masking decision value in the appropriate variable.
Definition: ProSHADE.cpp:470
ProSHADE_settings::pdbBFactorNewVal
proshade_double pdbBFactorNewVal
Change all PDB B-factors to this value (for smooth maps).
Definition: ProSHADE_settings.hpp:106
ProSHADE_settings::setRecommendedFold
void setRecommendedFold(proshade_unsign val)
Sets the ProSHADE detected symmetry fold.
Definition: ProSHADE.cpp:1028
ProSHADE_settings::usePeakSearchInRotationFunctionSpace
bool usePeakSearchInRotationFunctionSpace
This variable switch decides whether symmetry detection will be done using peak search in rotation fu...
Definition: ProSHADE_settings.hpp:179
ProSHADE_run::getOptimalRotMat
std::vector< proshade_double > getOptimalRotMat(void)
This function returns the vector forming rotation matrix (rows first) with best overlay correlation.
Definition: ProSHADE.cpp:2553
ProSHADE_run::getOriginalBounds
std::vector< proshade_signed > getOriginalBounds(proshade_unsign strNo)
This function returns a specific structure original bounds.
Definition: ProSHADE.cpp:2439
ProSHADE_settings::setVariablesLeftOnAuto
void setVariablesLeftOnAuto(void)
Function to determine general values that the user left on auto-determination.
Definition: ProSHADE.cpp:316
ProSHADE_run::getTraceSigmaVector
std::vector< proshade_double > getTraceSigmaVector(void)
This function returns the trace sigma distances vector from the first to all other structures.
Definition: ProSHADE.cpp:2320
ProSHADE_settings::removeWaters
bool removeWaters
Should all waters be removed from input PDB files?
Definition: ProSHADE_settings.hpp:97
ProSHADE_internal_messages::printProgressMessage
void printProgressMessage(proshade_signed verbose, proshade_signed messageLevel, std::string message)
General stdout message printing.
Definition: ProSHADE_messages.cpp:70
ProSHADE_internal_messages::printHelp
void printHelp(void)
This function prints the help screen in the case -h is called, or if command line arguments cannot be...
Definition: ProSHADE_messages.cpp:118
ProSHADE_settings::setResolution
void setResolution(proshade_single resolution)
Sets the requested resolution in the appropriate variable.
Definition: ProSHADE.cpp:357
ProSHADE_settings::printSettings
void printSettings(void)
This function prints the current values in the settings object.
Definition: ProSHADE.cpp:2118
ProSHADE_run::getNoStructures
proshade_unsign getNoStructures(void)
This function returns the number of structures used.
Definition: ProSHADE.cpp:2340
ProSHADE_internal_misc::addToStringVector
void addToStringVector(std::vector< std::string > *vecToAddTo, std::string elementToAdd)
Adds the element to the vector.
Definition: ProSHADE_misc.cpp:33
ProSHADE_settings::enLevMatrixPowerWeight
proshade_double enLevMatrixPowerWeight
If RRP matrices shell position is to be weighted by putting the position as an exponent,...
Definition: ProSHADE_settings.hpp:159
ProSHADE_run::getOriginToOverlayTranslation
std::vector< proshade_double > getOriginToOverlayTranslation(void)
This function returns the translation required to move the structure from origin to optimal overlay.
Definition: ProSHADE.cpp:2607
ProSHADE_settings::setNormalisation
void setNormalisation(bool normalise)
Sets the requested map normalisation value in the appropriate variable.
Definition: ProSHADE.cpp:389
ProSHADE_settings::setEnergyLevelsComputation
void setEnergyLevelsComputation(bool enLevDesc)
Sets whether the energy level distance descriptor should be computed.
Definition: ProSHADE.cpp:798
ProSHADE_settings::computeEnergyLevelsDesc
bool computeEnergyLevelsDesc
If true, the energy levels descriptor will be computed, otherwise all its computations will be omitte...
Definition: ProSHADE_settings.hpp:158