ProSHADE: src/proshade/ProSHADE.cpp Source File

| ProSHADE 0.7.5.1 (JAN 2021) Protein Shape Detection

ProSHADE.cpp
Go to the documentation of this file.
1
25 //==================================================== ProSHADE
26 #include "ProSHADE.hpp"
27
34 ProSHADE_settings::ProSHADE_settings ( )
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
115 this->usePeakSearchInRotationFunctionSpace = true;
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
226 this->usePeakSearchInRotationFunctionSpace = true;
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;
257 ProSHADE_internal_messages::printTerminateMessage ( this->verbose );
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 = true;
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
302 ProSHADE_settings::~ProSHADE_settings ( void )
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
316 void ProSHADE_settings::setVariablesLeftOnAuto ( void )
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
405 void ProSHADE_settings::setMapInversion ( bool mInv )
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
470 void ProSHADE_settings::setMasking ( bool mask )
471 {
472 //================================================ Set the value
473 this->maskMap = mask;
474
475 //================================================ Done
476 return ;
477
478 }
479
487 void ProSHADE_settings::setCorrelationMasking ( bool corMask )
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
537 void ProSHADE_settings::setMaskSaving ( bool savMsk )
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
569 void ProSHADE_settings::setMapReboxing ( bool reBx )
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
619 void ProSHADE_settings::setSameBoundaries ( bool sameB )
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
652 void ProSHADE_settings::setMapResolutionChange ( bool mrChange )
653 {
654 //================================================ Set the value
655 this->changeMapResolution = mrChange;
656
657 //================================================ Done
658 return ;
659
660 }
661
668 void ProSHADE_settings::setMapResolutionChangeTriLinear ( bool mrChange )
669 {
670 //================================================ Set the value
671 this->changeMapResolutionTriLinear = mrChange;
672
673 //================================================ Done
674 return ;
675
676 }
677
684 void ProSHADE_settings::setMapCentering ( bool com )
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
716 void ProSHADE_settings::setProgressiveSphereMapping ( bool progSphMap )
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
798 void ProSHADE_settings::setEnergyLevelsComputation ( bool enLevDesc )
799 {
800 //======================================== Set the value
801 this->computeEnergyLevelsDesc = enLevDesc;
802
803 //======================================== Done
804 return ;
805
806 }
807
815 void ProSHADE_settings::setTraceSigmaComputation ( bool trSigVal )
816 {
817 //================================================ Set the value
818 this->computeTraceSigmaDesc = trSigVal;
819
820 //================================================ Done
821 return ;
822
823 }
824
832 void ProSHADE_settings::setRotationFunctionComputation ( bool rotfVal )
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
974 void ProSHADE_settings::setAxisComparisonThresholdBehaviour ( bool behav )
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
1009 void ProSHADE_settings::setRecommendedSymmetry ( std::string val )
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
1044 void ProSHADE_settings::setRequestedSymmetry ( std::string val )
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
1092 ProSHADE_internal_misc::deepCopyAxisToDblPtrVector ( &this->detectedSymmetry, hlpAxis );
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
1134 void ProSHADE_settings::setSymmetryRotFunPeaks ( bool rotFunPeaks )
1135 {
1136 //================================================ Set the value
1137 this->usePeakSearchInRotationFunctionSpace = rotFunPeaks;
1138
1139 //================================================ Done
1140 return ;
1141
1142 }
1143
1148 void ProSHADE_settings::setBicubicInterpolationSearch ( bool bicubPeaks )
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;
1187 ProSHADE_internal_messages::printProgressMessage ( this->verbose, 3, hlpSS.str() );
1188 return ;
1189 }
1190
1191 //================================================ Determine automatically
1192 this->maxBandwidth = ProSHADE_internal_spheres::autoDetermineBandwidth ( circumference );
1193
1194 //================================================ Report progress
1195 std::stringstream hlpSS;
1196 hlpSS << "The bandwidth was determined as: " << this->maxBandwidth;
1197 ProSHADE_internal_messages::printProgressMessage ( this->verbose, 3, hlpSS.str() );
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;
1227 ProSHADE_internal_messages::printProgressMessage ( this->verbose, 3, hlpSS.str() );
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.";
1250 ProSHADE_internal_messages::printProgressMessage ( this->verbose, 3, hlpSS.str() );
1251 return ;
1252 }
1253
1254 //================================================ Determine automatically
1255 this->maxSphereDists = ProSHADE_internal_spheres::autoDetermineSphereDistances ( maxMapRange, this->requestedResolution );
1256
1257 //================================================ Report progress
1258 std::stringstream hlpSS;
1259 hlpSS << "The sphere distances were determined as " << this->maxSphereDists << " Angstroms.";
1260 ProSHADE_internal_messages::printProgressMessage ( this->verbose, 3, hlpSS.str() );
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;
1282 ProSHADE_internal_messages::printProgressMessage ( this->verbose, 3, hlpSS.str() );
1283 return ;
1284 }
1285
1286 //================================================ Determine automatically
1287 this->integOrder = ProSHADE_internal_spheres::autoDetermineIntegrationOrder ( maxMapRange, this->maxSphereDists );
1288
1289 //================================================ Report progress
1290 std::stringstream hlpSS;
1291 hlpSS << "The integration order was determined as " << this->integOrder;
1292 ProSHADE_internal_messages::printProgressMessage ( this->verbose, 3, hlpSS.str() );
1293
1294 //================================================ Done
1295 return ;
1296
1297 }
1298
1314 void ProSHADE_settings::determineAllSHValues ( proshade_unsign xDim, proshade_unsign yDim, proshade_unsign zDim )
1315 {
1316 //================================================ Print progress message
1317 ProSHADE_internal_messages::printProgressMessage ( this->verbose, 1, "Preparing spherical harmonics environment." );
1318
1319 //================================================ Find maximum circumference
1320 proshade_unsign maxDim = std::max ( xDim, std::max ( yDim, zDim ) );
1321 proshade_unsign minDim = std::min ( xDim, std::min ( yDim, zDim ) );
1322 proshade_unsign midDim = 0;
1323 if ( ( xDim < maxDim ) && ( xDim > minDim ) ) { midDim = xDim; }
1324 else if ( ( yDim < maxDim ) && ( yDim > minDim ) ) { midDim = yDim; }
1325 else { midDim = zDim; }
1326
1327 proshade_unsign circ = ( maxDim ) + ( midDim );
1328
1329 //================================================ Bandwidth
1330 if ( this->rotationUncertainty > 0.0 ) { this->determineBandwidthFromAngle ( this->rotationUncertainty ); }
1331 else { this->determineBandwidth ( circ ); }
1332
1333 //================================================ Find maximum diagonal in Angstroms
1334 proshade_single maxDiag = std::sqrt ( std::pow ( static_cast<proshade_single> ( maxDim ) * ( this->requestedResolution / 2.0 ), 2.0 ) +
1335 std::pow ( static_cast<proshade_single> ( midDim ) * ( this->requestedResolution / 2.0 ), 2.0 ) );
1336
1337 //================================================ Sphere distances
1338 this->determineSphereDistances ( maxDiag );
1339
1340 //================================================ Integration order
1341 this->determineIntegrationOrder ( maxDiag );
1342
1343 //================================================ Report function completion
1344 ProSHADE_internal_messages::printProgressMessage ( this->verbose, 2, "Spherical harmonics environment prepared." );
1345
1346 //================================================ Done
1347 return ;
1348
1349 }
1350
1358 ProSHADE_run::ProSHADE_run ( ProSHADE_settings* settings )
1359 {
1360 //================================================ Wellcome message if required
1361 ProSHADE_internal_messages::printWellcomeMessage ( settings->verbose );
1362
1363 //================================================ Save the general information
1364 this->noStructures = static_cast<proshade_unsign> ( settings->inputFiles.size() );
1365 this->verbose = static_cast<proshade_signed> ( settings->verbose );
1366
1367 //================================================ Try to run ProSHADE
1368 try
1369 {
1370 //============================================ Depending on task, switch to correct function to call
1371 switch ( settings->task )
1372 {
1373 case NA:
1374 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." );
1375 break;
1376
1377 case Symmetry:
1378 ProSHADE_internal_tasks::SymmetryDetectionTask ( settings, &this->RecomSymAxes, &this->allCSymAxes );
1379 this->setSymmetryResults ( settings );
1380 break;
1381
1382 case Distances:
1383 ProSHADE_internal_tasks::DistancesComputationTask ( settings, &this->enLevs, &this->trSigm, &this->rotFun );
1384 break;
1385
1386 case OverlayMap:
1387 ProSHADE_internal_tasks::MapOverlayTask ( settings, &this->coordRotationCentre, &this->eulerAngles, &this->overlayTranslation );
1388 break;
1389
1390 case MapManip:
1391 ProSHADE_internal_tasks::MapManipulationTask ( settings, &this->originalBounds, &this->reboxedBounds, &this->manipulatedMaps );
1392 break;
1393 }
1394 }
1395
1396 //================================================ If this is ProSHADE exception, give all available info and terminate gracefully :-)
1397 catch ( ProSHADE_exception& err )
1398 {
1399 std::cerr << std::endl << "=====================" << std::endl << "!! ProSHADE ERROR !!" << std::endl << "=====================" << std::endl << std::flush;
1400 std::cerr << "Error Code : " << err.get_errc() << std::endl << std::flush;
1401 std::cerr << "ProSHADE version : " << __PROSHADE_VERSION__ << std::endl << std::flush;
1402 std::cerr << "File : " << err.get_file() << std::endl << std::flush;
1403 std::cerr << "Line : " << err.get_line() << std::endl << std::flush;
1404 std::cerr << "Function : " << err.get_func() << std::endl << std::flush;
1405 std::cerr << "Message : " << err.what() << std::endl << std::flush;
1406 std::cerr << "Further information : " << err.get_info() << std::endl << std::endl << std::flush;
1407
1408 //============================================ Done
1409 ProSHADE_internal_messages::printTerminateMessage ( settings->verbose );
1410 exit ( EXIT_FAILURE );
1411 }
1412
1413 //================================================ Well, give all there is and just end
1414 catch ( ... )
1415 {
1416 std::cerr << std::endl << "=====================" << std::endl << "!! ProSHADE ERROR !!" << std::endl << "=====================" << std::endl << std::flush;
1417
1418 //============================================ Try to find out more
1419 #if __cplusplus >= 201103L
1420 std::exception_ptr exc = std::current_exception();
1421 try
1422 {
1423 if (exc)
1424 {
1425 std::rethrow_exception ( exc );
1426 }
1427 }
1428 catch ( const std::exception& e )
1429 {
1430 std::cerr << "Caught unknown exception with following information: " << e.what() << std::endl << std::flush;
1431 }
1432 #else
1433 std::cerr << "Unknown error with no further explanation available. Please contact the author for help." << std::endl << std::flush;
1434 #endif
1435 std::cerr << "Terminating..." << std::endl << std::endl << std::flush;
1436
1437 //============================================ Done
1438 ProSHADE_internal_messages::printTerminateMessage ( settings->verbose );
1439 exit ( EXIT_FAILURE );
1440 }
1441
1442 //================================================ Terminating message
1443 ProSHADE_internal_messages::printTerminateMessage ( settings->verbose );
1444
1445 //================================================ Done
1446
1447 }
1448
1453 ProSHADE_run::~ProSHADE_run ( )
1454 {
1455 //================================================ Release reboxing pointers
1456 if ( this->originalBounds.size() > 0 ) { for ( proshade_unsign iter = 0; iter < static_cast<proshade_unsign> ( this->originalBounds.size() ); iter++ ) { delete[] this->originalBounds.at(iter); } }
1457 if ( this->reboxedBounds.size() > 0 ) { for ( proshade_unsign iter = 0; iter < static_cast<proshade_unsign> ( this->reboxedBounds.size() ); iter++ ) { delete[] this->reboxedBounds.at(iter); } }
1458 if ( this->manipulatedMaps.size() > 0 ) { for ( proshade_unsign iter = 0; iter < static_cast<proshade_unsign> ( this->manipulatedMaps.size() ); iter++ ) { delete[] this->manipulatedMaps.at(iter); } }
1459
1460 //================================================ Clear vectors
1461 this->enLevs.clear ( );
1462 this->trSigm.clear ( );
1463 this->rotFun.clear ( );
1464
1465 //================================================ Delete symmetry axes memory
1466 if ( this->RecomSymAxes.size() > 0 )
1467 {
1468 for ( proshade_unsign iter = 0; iter < static_cast<proshade_unsign> ( this->RecomSymAxes.size() ); iter++ )
1469 {
1470 delete[] this->RecomSymAxes.at(iter);
1471 }
1472 this->RecomSymAxes.clear ( );
1473 }
1474
1475 //================================================ Done
1476
1477 }
1478
1483 std::string ProSHADE_run::getSymmetryType ( )
1484 {
1485 //================================================ Return the value
1486 return ( this->symRecommType );
1487 }
1488
1493 proshade_unsign ProSHADE_run::getSymmetryFold ( )
1494 {
1495 //================================================ Return the value
1496 return ( this->symRecommFold );
1497 }
1498
1505 void ProSHADE_run::setRecommendedSymmetry ( std::string val )
1506 {
1507 //================================================ Set the value
1508 this->symRecommType = val;
1509
1510 //================================================ Done
1511 return ;
1512
1513 }
1514
1522 void ProSHADE_run::setRecommendedFold ( proshade_unsign val )
1523 {
1524 //================================================ Set the value
1525 this->symRecommFold = val;
1526
1527 //================================================ Done
1528 return ;
1529
1530 }
1531
1539 void ProSHADE_run::setRecommendedAxis ( proshade_double* sym )
1540 {
1541 //================================================ Set the value
1542 ProSHADE_internal_misc::deepCopyAxisToDblPtrVector ( &this->RecomSymAxes, sym );
1543
1544 //================================================ Done
1545 return ;
1546
1547 }
1548
1556 void ProSHADE_run::setSymmetryResults ( ProSHADE_settings* settings )
1557 {
1558 //================================================ Save type and fold
1559 this->setRecommendedSymmetry ( settings->recommendedSymmetryType );
1560 this->setRecommendedFold ( settings->recommendedSymmetryFold );
1561
1562 //================================================ Done
1563 return ;
1564
1565 }
1566
1572 void ProSHADE_settings::getCommandLineParams ( int argc, char** argv )
1573 {
1574 //================================================ If no command line arguments, print help
1575 if ( argc == 1 ) { ProSHADE_internal_messages::printHelp ( ); }
1576
1577 //================================================ Long options struct
1578 const struct option longopts[] =
1579 {
1580 { "version", no_argument, NULL, 'v' },
1581 { "help", no_argument, NULL, 'h' },
1582 { "verbose", required_argument, NULL, '!' },
1583 { "distances", no_argument, NULL, 'D' },
1584 { "mapManip", no_argument, NULL, 'M' },
1585 { "symmetry", no_argument, NULL, 'S' },
1586 { "overlay", no_argument, NULL, 'O' },
1587 { "file", required_argument, NULL, 'f' },
1588 { "forceSpgP1", no_argument, NULL, 'u' },
1589 { "removeWaters", no_argument, NULL, 'w' },
1590 { "firstModel", no_argument, NULL, 'x' },
1591 { "resolution", required_argument, NULL, 'r' },
1592 { "bandwidth", required_argument, NULL, 'b' },
1593 { "sphereDists", required_argument, NULL, 's' },
1594 { "extraSpace", required_argument, NULL, 'e' },
1595 { "integOrder", required_argument, NULL, 'i' },
1596 { "taylorCap", required_argument, NULL, 't' },
1597 { "invertMap", no_argument, NULL, '@' },
1598 { "normalise", no_argument, NULL, '#' },
1599 { "mask", no_argument, NULL, '$' },
1600 { "saveMask", no_argument, NULL, '%' },
1601 { "maskFile", required_argument, NULL, '^' },
1602 { "maskBlurring", required_argument, NULL, '&' },
1603 { "maskThreshold", required_argument, NULL, '*' },
1604 { "mapReboxing", no_argument, NULL, 'R' },
1605 { "boundsSpace", required_argument, NULL, '(' },
1606 { "boundsThreshold", required_argument, NULL, ')' },
1607 { "sameBoundaries", no_argument, NULL, '-' },
1608 { "reBoxedFilename", required_argument, NULL, 'g' },
1609 { "pdbTempFact", required_argument, NULL, 'd' },
1610 { "center", no_argument, NULL, 'c' },
1611 { "changeMapResol", no_argument, NULL, 'j' },
1612 { "changeMapTriLin", no_argument, NULL, 'a' },
1613 { "noPhase", no_argument, NULL, 'p' },
1614 { "progressive", no_argument, NULL, 'k' },
1615 { "noEnL", no_argument, NULL, 'l' },
1616 { "noTrS", no_argument, NULL, 'm' },
1617 { "noFRF", no_argument, NULL, 'n' },
1618 { "EnLWeight", required_argument, NULL, '_' },
1619 { "peakNeigh", required_argument, NULL, '=' },
1620 { "peakThres", required_argument, NULL, '+' },
1621 { "missAxThres", required_argument, NULL, '[' },
1622 { "sameAxComp", required_argument, NULL, ']' },
1623 { "axisComBeh", no_argument, NULL, 'q' },
1624 { "bicubSearch", no_argument, NULL, 'A' },
1625 { "maxSymPrime", required_argument, NULL, 'B' },
1626 { "minPeakHeight", required_argument, NULL, 'o' },
1627 { "sym", required_argument, NULL, '{' },
1628 { "overlayFile", required_argument, NULL, '}' },
1629 { "overlayJSONFile", required_argument, NULL, 'y' },
1630 { "angUncertain", required_argument, NULL, ';' },
1631 { "usePeaksInRotFun",no_argument, NULL, 'z' },
1632 { NULL, 0, NULL, 0 }
1633 };
1634
1635 //================================================ Short options string
1636 const char* const shortopts = "AaB:b:cd:De:f:g:hi:jklmMno:Opqr:Rs:St:uvwxy:z!:@#$%^:&:*:(:):-_:=:+:[:]:{:}:;:";
1637
1638 //================================================ Parsing the options
1639 while ( true )
1640 {
1641 //============================================ Read the next option
1642 int opt = getopt_long ( argc, argv, shortopts, longopts, NULL );
1643
1644 //============================================ Done parsing
1645 if ( opt == -1 )
1646 {
1647 break;
1648 }
1649
1650 //============================================ For each option, set the internal values appropriately
1651 const char *tmp_optarg = optarg;
1652 switch (opt)
1653 {
1654 //======================================= Print version info
1655 case 'v':
1656 {
1657 ProSHADE_internal_messages::printWellcomeMessage ( 0 );
1658 exit ( EXIT_SUCCESS );
1659 }
1660
1661 //======================================= User needs help
1662 case 'h':
1663 {
1664 ProSHADE_internal_messages::printHelp ( );
1665 exit ( EXIT_SUCCESS );
1666 }
1667
1668 //======================================= Save the argument as the verbosity value, or if no value given, just set to 3
1669 case '!':
1670 {
1671 this->setVerbosity ( static_cast<proshade_single> ( atoi ( tmp_optarg ) ) );
1672 continue;
1673 }
1674
1675 //======================================= Set task to distances
1676 case 'D':
1677 {
1678 this->task = Distances;
1679 continue;
1680 }
1681
1682 //======================================= Set task to map manipulation
1683 case 'M':
1684 {
1685 this->task = MapManip;
1686 continue;
1687 }
1688
1689 //======================================= Set task to symmetry detection
1690 case 'S':
1691 {
1692 this->task = Symmetry;
1693
1694 //=================================== Force default unless changed already by the user
1695 if ( this->requestedResolution == -1 ) { this->requestedResolution = 6.0; }
1696 if ( this->pdbBFactorNewVal == -1 ) { this->pdbBFactorNewVal = 80.0; }
1697 this->changeMapResolution = !this->changeMapResolution; // Switch value. This can be over-ridden by the user by using -j
1698 this->moveToCOM = !this->moveToCOM; // Switch value. This can be over-ridden by the user by using -c.
1699
1700 continue;
1701 }
1702
1703 //======================================= Set task to map overlay
1704 case 'O':
1705 {
1706 this->task = OverlayMap;
1707 continue;
1708 }
1709
1710 //======================================= Save the argument as a file to read in
1711 case 'f':
1712 {
1713 this->addStructure ( std::string ( optarg ) );
1714 continue;
1715 }
1716
1717 //======================================= Force the input PDB files to have P1 spacegroup
1718 case 'u':
1719 {
1720 this->forceP1 = !this->forceP1;
1721 continue;
1722 }
1723
1724 //======================================= Remove waters from PDB input files?
1725 case 'w':
1726 {
1727 this->removeWaters = !this->removeWaters;
1728 continue;
1729 }
1730
1731 //======================================= Use all models, or just the first one?
1732 case 'x':
1733 {
1734 this->firstModelOnly = !this->firstModelOnly;
1735 continue;
1736 }
1737
1738 //======================================= Save the argument as the resolution value
1739 case 'r':
1740 {
1741 this->setResolution ( static_cast<proshade_single> ( atof ( optarg ) ) );
1742 continue;
1743 }
1744
1745 //======================================= Save the argument as the bandwidth value
1746 case 'b':
1747 {
1748 this->setBandwidth ( static_cast<proshade_unsign> ( atoi ( optarg ) ) );
1749 continue;
1750 }
1751
1752 //======================================= Save the argument as the extra space value
1753 case 'e':
1754 {
1755 this->setExtraSpace ( static_cast<proshade_single> ( atof ( optarg ) ) );
1756 continue;
1757 }
1758
1759 //======================================= Save the argument as the intaggration order value
1760 case 'i':
1761 {
1762 this->setIntegrationOrder ( static_cast<proshade_unsign> ( atof ( optarg ) ) );
1763 continue;
1764 }
1765
1766 //======================================= Save the argument as the sphere distance value
1767 case 's':
1768 {
1769 this->setSphereDistances ( static_cast<proshade_single> ( atof ( optarg ) ) );
1770 continue;
1771 }
1772
1773 //======================================= Save the argument as the taylor series cap value
1774 case 't':
1775 {
1776 this->setTaylorSeriesCap ( static_cast<proshade_unsign> ( atof ( optarg ) ) );
1777 continue;
1778 }
1779
1780 //======================================= Set map inversion to true
1781 case '@':
1782 {
1783 this->setMapInversion ( true );
1784 continue;
1785 }
1786
1787 //======================================= Set map normalisation to true
1788 case '#':
1789 {
1790 this->setNormalisation ( true );
1791 continue;
1792 }
1793
1794 //======================================= Set map masking to true
1795 case '$':
1796 {
1797 this->setMasking ( true );
1798 continue;
1799 }
1800
1801 //======================================= Set map masking to true and mask map saving to true as well
1802 case '%':
1803 {
1804 this->setMasking ( true );
1805 this->setMaskSaving ( true );
1806 continue;
1807 }
1808
1809 //======================================= Save the argument as the mask filename value
1810 case '^':
1811 {
1812 this->setMaskFilename ( static_cast<std::string> ( optarg ) );
1813 continue;
1814 }
1815
1816 //======================================= Save the argument as the mask blurring factor value
1817 case '&':
1818 {
1819 this->setMaskBlurFactor ( static_cast<proshade_single> ( atof ( optarg ) ) );
1820 continue;
1821 }
1822
1823 //======================================= Save the argument as the mask threshold (IQR) value
1824 case '*':
1825 {
1826 this->setMaskIQR ( static_cast<proshade_single> ( atof ( optarg ) ) );
1827 continue;
1828 }
1829
1830 //======================================= Set map reboxing to true
1831 case 'R':
1832 {
1833 this->setMasking ( true );
1834 this->setMapReboxing ( true );
1835 continue;
1836 }
1837
1838 //======================================= Save the argument as the bounds extra space value
1839 case '(':
1840 {
1841 this->setBoundsSpace ( static_cast<proshade_single> ( atof ( optarg ) ) );
1842 continue;
1843 }
1844
1845 //======================================= Save the argument as the bounds similarity threshold value
1846 case ')':
1847 {
1848 this->setBoundsThreshold ( static_cast<proshade_signed> ( atoi ( optarg ) ) );
1849 continue;
1850 }
1851
1852 //======================================= Set same boundaries to true
1853 case '-':
1854 {
1855 this->setSameBoundaries ( true );
1856 continue;
1857 }
1858
1859 //======================================= Save the argument as the re-boxed structure filename value
1860 case 'g':
1861 {
1862 this->setOutputFilename ( static_cast<std::string> ( optarg ) );
1863 continue;
1864 }
1865
1866 //======================================= Save the argument as the PDB B-factor new constant value
1867 case 'd':
1868 {
1869 this->setPDBBFactor ( static_cast<proshade_single> ( atof ( optarg ) ) );
1870 continue;
1871 }
1872
1873 //======================================= Set map centering to true
1874 case 'c':
1875 {
1876 this->moveToCOM = !this->moveToCOM;
1877 continue;
1878 }
1879
1880 //======================================= Set map resolution change using Fourier transforms to true
1881 case 'j':
1882 {
1883 this->changeMapResolution = !this->changeMapResolution;
1884 continue;
1885 }
1886
1887 //======================================= Set map resolution change using real-space tri-linear interpolation to true
1888 case 'a':
1889 {
1890 this->setMapResolutionChangeTriLinear ( true );
1891 continue;
1892 }
1893
1894 //======================================= Set map phase removal to true
1895 case 'p':
1896 {
1897 this->setPhaseUsage ( false );
1898 continue;
1899 }
1900
1901 //======================================= Set progressive shell mapping to true
1902 case 'k':
1903 {
1904 this->setProgressiveSphereMapping ( true );
1905 continue;
1906 }
1907
1908 //======================================= Set energy level descriptor computation to false
1909 case 'l':
1910 {
1911 this->setEnergyLevelsComputation ( false );
1912 continue;
1913 }
1914
1915 //======================================= Set trace sigma descriptor computation to false
1916 case 'm':
1917 {
1918 this->setTraceSigmaComputation ( false );
1919 continue;
1920 }
1921
1922 //======================================= Set full rotation function descriptor computation to false
1923 case 'n':
1924 {
1925 this->setRotationFunctionComputation ( false );
1926 continue;
1927 }
1928
1929 //======================================= Save the argument as the energy levels descriptor weight value
1930 case '_':
1931 {
1932 this->setEnLevShellWeight ( static_cast<proshade_double> ( atof ( optarg ) ) );
1933 continue;
1934 }
1935
1936 //======================================= Save the argument as the peak neighbours minimum value
1937 case '=':
1938 {
1939 this->setPeakNeighboursNumber ( static_cast<proshade_unsign> ( atoi ( optarg ) ) );
1940 continue;
1941 }
1942
1943 //======================================= Save the argument as the peak IQR from median naive small peaks removal value
1944 case '+':
1945 {
1946 this->setPeakNaiveNoIQR ( static_cast<proshade_double> ( atof ( optarg ) ) );
1947 continue;
1948 }
1949
1950 //======================================= Save the argument as the missing axis threshold value
1951 case '[':
1952 {
1953 this->setMissingPeakThreshold ( static_cast<proshade_double> ( atof ( optarg ) ) );
1954 continue;
1955 }
1956
1957 //======================================= Save the argument as the missing axis threshold value
1958 case ']':
1959 {
1960 setAxisComparisonThreshold ( static_cast<proshade_double> ( atof ( optarg ) ) );
1961 continue;
1962 }
1963
1964 //======================================= Save the argument as the missing axis threshold value
1965 case 'q':
1966 {
1967 setAxisComparisonThresholdBehaviour ( !this->axisErrToleranceDefault );
1968 continue;
1969 }
1970
1971 //======================================= Save the argument as the bicubic interpolation search requirement value
1972 case 'A':
1973 {
1974 setBicubicInterpolationSearch ( !this->useBiCubicInterpolationOnPeaks );
1975 continue;
1976 }
1977
1978 //======================================= Save the argument as the bicubic interpolation search requirement value
1979 case 'B':
1980 {
1981 setMaxSymmetryFold ( static_cast<proshade_unsign> ( atoi ( optarg ) ) );
1982 continue;
1983 }
1984
1985 //======================================= Minimum peak height for axis
1986 case 'o':
1987 {
1988 this->minSymPeak = static_cast<proshade_double> ( atof ( optarg ) );
1989 continue;
1990 }
1991
1992 //======================================= Save the argument as the requested symmetry and potentially fold value
1993 case '{':
1994 {
1995 std::string input = static_cast<std::string> ( optarg );
1996
1997 if ( input.at(0) == 'C' )
1998 {
1999 this->setRequestedSymmetry ( "C" );
2000
2001 std::string numHlp ( input.begin()+1, input.end() );
2002 if ( numHlp.length() > 0 ) { this->setRequestedFold ( atoi ( numHlp.c_str() ) ); }
2003 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 ); }
2004 }
2005 else
2006 {
2007 if ( input.at(0) == 'D' )
2008 {
2009 this->setRequestedSymmetry ( "D" );
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) == 'T' )
2018 {
2019 this->setRequestedSymmetry ( "T" );
2020 }
2021 else
2022 {
2023 if ( input.at(0) == 'O' )
2024 {
2025 this->setRequestedSymmetry ( "O" );
2026 }
2027 else
2028 {
2029 if ( input.at(0) == 'I' )
2030 {
2031 this->setRequestedSymmetry ( "I" );
2032 }
2033 else
2034 {
2035 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 );
2036 }
2037 }
2038 }
2039 }
2040 }
2041
2042 continue;
2043 }
2044
2045 //======================================= Save the argument as filename to save the overlay moved structure to value
2046 case '}':
2047 {
2048 this->setOverlaySaveFile ( static_cast<std::string> ( optarg ) );
2049 continue;
2050 }
2051
2052 //======================================= Save the argument as filename to save the overlay operations to value
2053 case 'y':
2054 {
2055 this->setOverlayJsonFile ( static_cast<std::string> ( optarg ) );
2056 continue;
2057 }
2058
2059 //======================================= Save the argument as angular uncertainty for bandwidth determination
2060 case ';':
2061 {
2062 this->rotationUncertainty = static_cast<proshade_double> ( atof ( optarg ) );
2063 continue;
2064 }
2065
2066 //======================================= Save the argument as angular uncertainty for bandwidth determination
2067 case 'z':
2068 {
2069 this->setSymmetryRotFunPeaks ( false );
2070 continue;
2071 }
2072
2073 //======================================= Unknown option
2074 case '?':
2075 {
2076 //=================================== This case is handled by getopt_long, nothing more needed.
2077 exit ( EXIT_SUCCESS );
2078 }
2079
2080 //======================================= Fallback option
2081 default:
2082 {
2083 ProSHADE_internal_messages::printHelp ( );
2084 exit ( EXIT_SUCCESS );
2085 }
2086 }
2087 }
2088
2089 //================================================ Done
2090 return ;
2091
2092 }
2093
2098 void ProSHADE_settings::printSettings ( )
2099 {
2100 //================================================ Print the currest values in the settings object
2101 std::stringstream strstr;
2102 strstr.str(std::string());
2103 if ( this->task == NA ) { strstr << "NA"; }
2104 if ( this->task == Distances ) { strstr << "DISTANCES COMPUTATION"; }
2105 if ( this->task == MapManip ) { strstr << "MAP MANIPULATION"; }
2106 if ( this->task == Symmetry ) { strstr << "SYMMETRY DETECTION"; }
2107 if ( this->task == OverlayMap ) { strstr << "MAP OVERLAY"; }
2108 printf ( "Task to perform : %37s\n", strstr.str().c_str() );
2109
2110 for ( proshade_unsign iter = 0; iter < static_cast<proshade_unsign> ( this->inputFiles.size() ); iter++ )
2111 {
2112 strstr.str(std::string());
2113 strstr << this->inputFiles.at(iter);
2114 printf ( "File(s) to process : %37s\n", strstr.str().c_str() );
2115 }
2116
2117 strstr.str(std::string());
2118 strstr << this->verbose;
2119 printf ( "Verbosity : %37s\n", strstr.str().c_str() );
2120
2121 strstr.str(std::string());
2122 strstr << this->requestedResolution;
2123 printf ( "Resolution (comp) : %37s\n", strstr.str().c_str() );
2124
2125 strstr.str(std::string());
2126 strstr << this->maxBandwidth;
2127 printf ( "Bandwidth : %37s\n", strstr.str().c_str() );
2128
2129 strstr.str(std::string());
2130 strstr << this->maxSphereDists;
2131 printf ( "Sphere distances : %37s\n", strstr.str().c_str() );
2132
2133 strstr.str(std::string());
2134 strstr << this->addExtraSpace;
2135 printf ( "Extra space : %37s\n", strstr.str().c_str() );
2136
2137 strstr.str(std::string());
2138 if ( this->forceP1 ) { strstr << "TRUE"; } else { strstr << "FALSE"; }
2139 printf ( "Force P1 spacegroup : %37s\n", strstr.str().c_str() );
2140
2141 strstr.str(std::string());
2142 if ( this->removeWaters ) { strstr << "TRUE"; } else { strstr << "FALSE"; }
2143 printf ( "Waters removed : %37s\n", strstr.str().c_str() );
2144
2145 strstr.str(std::string());
2146 if ( this->firstModelOnly ) { strstr << "TRUE"; } else { strstr << "FALSE"; }
2147 printf ( "Only 1st model : %37s\n", strstr.str().c_str() );
2148
2149 strstr.str(std::string());
2150 strstr << this->integOrder;
2151 printf ( "Integration order : %37s\n", strstr.str().c_str() );
2152
2153 strstr.str(std::string());
2154 strstr << this->taylorSeriesCap;
2155 printf ( "Taylor series cap : %37s\n", strstr.str().c_str() );
2156
2157 strstr.str(std::string());
2158 strstr << this->pdbBFactorNewVal;
2159 printf ( "PDB B-factor const : %37s\n", strstr.str().c_str() );
2160
2161 strstr.str(std::string());
2162 if ( this->reBoxMap ) { strstr << "TRUE"; } else { strstr << "FALSE"; }
2163 printf ( "Map re-boxing : %37s\n", strstr.str().c_str() );
2164
2165 strstr.str(std::string());
2166 if ( this->invertMap ) { strstr << "TRUE"; } else { strstr << "FALSE"; }
2167 printf ( "Map inversion : %37s\n", strstr.str().c_str() );
2168
2169 strstr.str(std::string());
2170 if ( this->normaliseMap ) { strstr << "TRUE"; } else { strstr << "FALSE"; }
2171 printf ( "Map normalisation : %37s\n", strstr.str().c_str() );
2172
2173 strstr.str(std::string());
2174 if ( this->maskMap ) { strstr << "TRUE"; } else { strstr << "FALSE"; }
2175 printf ( "Map masking : %37s\n", strstr.str().c_str() );
2176
2177 strstr.str(std::string());
2178 if ( this->saveMask ) { strstr << "TRUE"; } else { strstr << "FALSE"; }
2179 printf ( "Saving mask : %37s\n", strstr.str().c_str() );
2180
2181 strstr.str(std::string());
2182 strstr << this->maskFileName;
2183 printf ( "Map mask filename : %37s\n", strstr.str().c_str() );
2184
2185 strstr.str(std::string());
2186 strstr << this->blurFactor;
2187 printf ( "Map blurring : %37s\n", strstr.str().c_str() );
2188
2189 strstr.str(std::string());
2190 strstr << this->maskingThresholdIQRs;
2191 printf ( "Masking threshold : %37s\n", strstr.str().c_str() );
2192
2193 strstr.str(std::string());
2194 strstr << this->boundsExtraSpace;
2195 printf ( "Bounds extra space : %37s\n", strstr.str().c_str() );
2196
2197 strstr.str(std::string());
2198 strstr << this->boundsSimilarityThreshold;
2199 printf ( "Bounds similarity : %37s\n", strstr.str().c_str() );
2200
2201 strstr.str(std::string());
2202 if ( this->useSameBounds ) { strstr << "TRUE"; } else { strstr << "FALSE"; }
2203 printf ( "Same boundaries : %37s\n", strstr.str().c_str() );
2204
2205 strstr.str(std::string());
2206 strstr << this->outName;
2207 printf ( "Re-boxed filename : %37s\n", strstr.str().c_str() );
2208
2209 strstr.str(std::string());
2210 if ( this->moveToCOM ) { strstr << "TRUE"; } else { strstr << "FALSE"; }
2211 printf ( "Map COM centering : %37s\n", strstr.str().c_str() );
2212
2213 strstr.str(std::string());
2214 if ( this->changeMapResolution ) { strstr << "TRUE"; } else { strstr << "FALSE"; }
2215 printf ( "Change map resol : %37s\n", strstr.str().c_str() );
2216
2217 strstr.str(std::string());
2218 if ( this->changeMapResolutionTriLinear ) { strstr << "TRUE"; } else { strstr << "FALSE"; }
2219 printf ( "Change map tri-lin : %37s\n", strstr.str().c_str() );
2220
2221 strstr.str(std::string());
2222 if ( this->usePhase ) { strstr << "TRUE"; } else { strstr << "FALSE"; }
2223 printf ( "Use phase info : %37s\n", strstr.str().c_str() );
2224
2225 strstr.str(std::string());
2226 if ( this->progressiveSphereMapping ) { strstr << "TRUE"; } else { strstr << "FALSE"; }
2227 printf ( "Progressive spheres : %37s\n", strstr.str().c_str() );
2228
2229 strstr.str(std::string());
2230 if ( this->computeEnergyLevelsDesc ) { strstr << "TRUE"; } else { strstr << "FALSE"; }
2231 printf ( "Energy lvl desc : %37s\n", strstr.str().c_str() );
2232
2233 strstr.str(std::string());
2234 strstr << this->enLevMatrixPowerWeight;
2235 printf ( "Energy lvl weight : %37s\n", strstr.str().c_str() );
2236
2237 strstr.str(std::string());
2238 if ( this->computeTraceSigmaDesc ) { strstr << "TRUE"; } else { strstr << "FALSE"; }
2239 printf ( "Tr sigma desc : %37s\n", strstr.str().c_str() );
2240
2241 strstr.str(std::string());
2242 if ( this->computeRotationFuncDesc ) { strstr << "TRUE"; } else { strstr << "FALSE"; }
2243 printf ( "Full RF desc : %37s\n", strstr.str().c_str() );
2244
2245 strstr.str(std::string());
2246 strstr << this->peakNeighbours;
2247 printf ( "Neightbours to peak : %37s\n", strstr.str().c_str() );
2248
2249 strstr.str(std::string());
2250 strstr << this->noIQRsFromMedianNaivePeak;
2251 printf ( "Peak IQR threshold : %37s\n", strstr.str().c_str() );
2252
2253 strstr.str(std::string());
2254 strstr << this->symMissPeakThres;
2255 printf ( "Missing ax. thres : %37s\n", strstr.str().c_str() );
2256
2257 strstr.str(std::string());
2258 strstr << this->minSymPeak;
2259 printf ( "Min. sym. peak size : %37s\n", strstr.str().c_str() );
2260
2261 strstr.str(std::string());
2262 strstr << this->axisErrTolerance;
2263 printf ( "Same ax. threshold : %37s\n", strstr.str().c_str() );
2264
2265 strstr.str(std::string());
2266 if ( this->axisErrToleranceDefault ) { strstr << "TRUE"; } else { strstr << "FALSE"; }
2267 printf ( "Same ax. thre. decr.: %37s\n", strstr.str().c_str() );
2268
2269 strstr.str(std::string());
2270 strstr << this->requestedSymmetryType << "-" << this->requestedSymmetryFold;
2271 printf ( "Requested symm. : %37s\n", strstr.str().c_str() );
2272
2273 strstr.str(std::string());
2274 strstr << this->overlayStructureName;
2275 printf ( "Overlay file : %37s\n", strstr.str().c_str() );
2276
2277 strstr.str(std::string());
2278 strstr << this->rotTrsJSONFile;
2279 printf ( "JSON overlay file : %37s\n", strstr.str().c_str() );
2280
2281 //================================================ Done
2282 return ;
2283
2284 }
2285
2290 std::vector< proshade_double > ProSHADE_run::getEnergyLevelsVector ( )
2291 {
2292 //================================================ Return the value
2293 return ( this->enLevs );
2294 }
2295
2300 std::vector< proshade_double > ProSHADE_run::getTraceSigmaVector ( )
2301 {
2302 //================================================ Return the value
2303 return ( this->trSigm );
2304 }
2305
2310 std::vector< proshade_double > ProSHADE_run::getRotationFunctionVector ( )
2311 {
2312 //================================================ Return the value
2313 return ( this->rotFun );
2314 }
2315
2320 proshade_unsign ProSHADE_run::getNoStructures ( )
2321 {
2322 //================================================ Return the value
2323 return ( this->noStructures );
2324 }
2325
2330 proshade_signed ProSHADE_run::getVerbose ( )
2331 {
2332 //================================================ Return the value
2333 return ( this->verbose );
2334 }
2335
2340 proshade_unsign ProSHADE_run::getNoSymmetryAxes ( )
2341 {
2342 //================================================ Return the value
2343 return ( static_cast<proshade_unsign> ( this->RecomSymAxes.size() ) );
2344 }
2345
2350 proshade_unsign ProSHADE_run::getNoRecommendedSymmetryAxes ( )
2351 {
2352 //================================================ Return the value
2353 return ( static_cast<proshade_unsign> ( this->RecomSymAxes.size() ) );
2354 }
2355
2361 std::vector< std::string > ProSHADE_run::getSymmetryAxis ( proshade_unsign axisNo )
2362 {
2363 //================================================ Sanity checks
2364 if ( static_cast<proshade_unsign> ( this->RecomSymAxes.size() ) <= axisNo )
2365 {
2366 ProSHADE_internal_messages::printWarningMessage ( this->verbose, "!!! ProSHADE WARNING !!! Requested symmetry index does not exist. Returning empty vector.", "WS00039" );
2367 return ( std::vector< std::string > ( ) );
2368 }
2369
2370 //================================================ Initialise local variables
2371 std::vector< std::string > ret;
2372
2373 //================================================ Input the axis data as strings
2374 std::stringstream ssHlp;
2375 ssHlp << this->RecomSymAxes.at(axisNo)[0];
2376 ProSHADE_internal_misc::addToStringVector ( &ret, ssHlp.str() );
2377 ssHlp.str ( "" );
2378
2379 ssHlp << this->RecomSymAxes.at(axisNo)[1];
2380 ProSHADE_internal_misc::addToStringVector ( &ret, ssHlp.str() );
2381 ssHlp.str ( "" );
2382
2383 ssHlp << this->RecomSymAxes.at(axisNo)[2];
2384 ProSHADE_internal_misc::addToStringVector ( &ret, ssHlp.str() );
2385 ssHlp.str ( "" );
2386
2387 ssHlp << this->RecomSymAxes.at(axisNo)[3];
2388 ProSHADE_internal_misc::addToStringVector ( &ret, ssHlp.str() );
2389 ssHlp.str ( "" );
2390
2391 ssHlp << this->RecomSymAxes.at(axisNo)[4];
2392 ProSHADE_internal_misc::addToStringVector ( &ret, ssHlp.str() );
2393 ssHlp.str ( "" );
2394
2395 ssHlp << this->RecomSymAxes.at(axisNo)[5];
2396 ProSHADE_internal_misc::addToStringVector ( &ret, ssHlp.str() );
2397 ssHlp.str ( "" );
2398
2399 //================================================ Done
2400 return ( ret );
2401
2402 }
2403
2408 std::vector < std::vector< proshade_double > > ProSHADE_run::getAllCSyms ( )
2409 {
2410 //================================================ Done
2411 return ( this->allCSymAxes );
2412
2413 }
2414
2419 std::vector< proshade_signed > ProSHADE_run::getOriginalBounds ( proshade_unsign strNo )
2420 {
2421 //================================================ Sanity checks
2422 if ( noStructures <= strNo )
2423 {
2424 ProSHADE_internal_messages::printWarningMessage ( this->verbose, "!!! ProSHADE WARNING !!! Requested bounds for structure index which does not exist. Returning empty vector.", "WB00041" );
2425 return ( std::vector< proshade_signed > ( ) );
2426 }
2427
2428 //================================================ Initialise local variables
2429 std::vector< proshade_signed > ret;
2430
2431 //================================================ Input the axis data as strings
2432 ProSHADE_internal_misc::addToSignedVector ( &ret, this->originalBounds.at( strNo )[0] );
2433 ProSHADE_internal_misc::addToSignedVector ( &ret, this->originalBounds.at( strNo )[1] );
2434 ProSHADE_internal_misc::addToSignedVector ( &ret, this->originalBounds.at( strNo )[2] );
2435 ProSHADE_internal_misc::addToSignedVector ( &ret, this->originalBounds.at( strNo )[3] );
2436 ProSHADE_internal_misc::addToSignedVector ( &ret, this->originalBounds.at( strNo )[4] );
2437 ProSHADE_internal_misc::addToSignedVector ( &ret, this->originalBounds.at( strNo )[5] );
2438
2439 //================================================ Done
2440 return ( ret );
2441 }
2442
2447 std::vector< proshade_signed > ProSHADE_run::getReBoxedBounds ( proshade_unsign strNo )
2448 {
2449 //================================================ Sanity checks
2450 if ( noStructures <= strNo )
2451 {
2452 ProSHADE_internal_messages::printWarningMessage ( this->verbose, "!!! ProSHADE WARNING !!! Requested bounds for structure index which does not exist. Returning empty vector.", "WB00041" );
2453 return ( std::vector< proshade_signed > ( ) );
2454 }
2455
2456 //================================================ Initialise local variables
2457 std::vector< proshade_signed > ret;
2458
2459 //================================================ Input the axis data as strings
2460 ProSHADE_internal_misc::addToSignedVector ( &ret, this->reboxedBounds.at( strNo )[0] );
2461 ProSHADE_internal_misc::addToSignedVector ( &ret, this->reboxedBounds.at( strNo )[1] );
2462 ProSHADE_internal_misc::addToSignedVector ( &ret, this->reboxedBounds.at( strNo )[2] );
2463 ProSHADE_internal_misc::addToSignedVector ( &ret, this->reboxedBounds.at( strNo )[3] );
2464 ProSHADE_internal_misc::addToSignedVector ( &ret, this->reboxedBounds.at( strNo )[4] );
2465 ProSHADE_internal_misc::addToSignedVector ( &ret, this->reboxedBounds.at( strNo )[5] );
2466
2467 //================================================ Done
2468 return ( ret );
2469 }
2470
2477 proshade_double ProSHADE_run::getMapValue ( proshade_unsign strNo, proshade_unsign mapIndex )
2478 {
2479 //================================================ Return the value
2480 return ( this->manipulatedMaps.at(strNo)[mapIndex] );
2481 }
2482
2491 void getReBoxedMap ( ProSHADE_run* run, proshade_unsign strNo, double *reboxMap, int len )
2492 {
2493 //================================================ Sanity checks
2494 if ( run->getNoStructures() <= strNo )
2495 {
2496 ProSHADE_internal_messages::printWarningMessage ( run->getVerbose(), "!!! ProSHADE WARNING !!! Requested bounds for structure index which does not exist. Returning empty vector.", "WB00041" );
2497 return ;
2498 }
2499
2500 //================================================ Save the data into the output array
2501 for ( proshade_unsign iter = 0; iter < static_cast<proshade_unsign> ( len ); iter++)
2502 {
2503 reboxMap[iter] = static_cast<double> ( run->getMapValue ( strNo, iter ) );
2504 }
2505
2506 //================================================ Done
2507 return ;
2508
2509 }
2510
2515 std::vector< proshade_double > ProSHADE_run::getEulerAngles ( )
2516 {
2517 //================================================ Sanity check
2518 if ( this->eulerAngles.size() != 3 )
2519 {
2520 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" );
2521 return ( std::vector< proshade_double > ( ) );
2522 }
2523
2524 //================================================ Return required value
2525 return ( this->eulerAngles );
2526
2527 }
2528
2533 std::vector< proshade_double > ProSHADE_run::getOptimalRotMat ( )
2534 {
2535 //================================================ Sanity check
2536 if ( this->eulerAngles.size() != 3 )
2537 {
2538 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" );
2539 return ( std::vector< proshade_double > ( ) );
2540 }
2541
2542 //================================================ Obtain the optimal rotation matrix
2543 proshade_double* rotMat = new proshade_double[9];
2544 ProSHADE_internal_misc::checkMemoryAllocation ( rotMat, __FILE__, __LINE__, __func__ );
2545 ProSHADE_internal_maths::getRotationMatrixFromEulerZXZAngles ( this->eulerAngles.at(0), this->eulerAngles.at(1), this->eulerAngles.at(2), rotMat );
2546
2547 //================================================ Copy to the output variable
2548 std::vector< proshade_double > ret;
2549 for ( proshade_unsign iter = 0; iter < 9; iter++ ) { ProSHADE_internal_misc::addToDoubleVector ( &ret, rotMat[iter] ); }
2550
2551 //================================================ Release the memory
2552 delete[] rotMat;
2553
2554 //================================================ Return required value
2555 return ( ret );
2556
2557 }
2558
2563 std::vector< proshade_double > ProSHADE_run::getTranslationToOrigin ( )
2564 {
2565 //================================================ Sanity check
2566 if ( this->coordRotationCentre.size() != 3 )
2567 {
2568 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" );
2569 return ( std::vector< proshade_double > ( ) );
2570 }
2571
2572 //================================================ Create return variable with negative values of the internal varariable
2573 std::vector < proshade_double > ret;
2574 ProSHADE_internal_misc::addToDoubleVector ( &ret, -this->coordRotationCentre.at(0) );
2575 ProSHADE_internal_misc::addToDoubleVector ( &ret, -this->coordRotationCentre.at(1) );
2576 ProSHADE_internal_misc::addToDoubleVector ( &ret, -this->coordRotationCentre.at(2) );
2577
2578 //================================================ Return required value
2579 return ( ret );
2580
2581 }
2582
2587 std::vector< proshade_double > ProSHADE_run::getOriginToOverlayTranslation ( )
2588 {
2589 //================================================ Sanity check
2590 if ( this->overlayTranslation.size() != 3 )
2591 {
2592 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" );
2593 return ( std::vector< proshade_double > ( ) );
2594 }
2595
2596 //================================================ Return required value
2597 return ( this->overlayTranslation );
2598
2599 }
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:162
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:106
ProSHADE_settings::integOrder
proshade_unsign integOrder
The order required for full Gauss-Legendre integration between the spheres.
Definition: ProSHADE_settings.hpp:116
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:172
ProSHADE_settings::rotTrsJSONFile
std::string rotTrsJSONFile
The filename to which the rotation and translation operations are to be saved into.
Definition: ProSHADE_settings.hpp:182
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:157
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:158
ProSHADE_settings::setSameBoundaries
void setSameBoundaries(bool sameB)
Sets whether same boundaries should be used in the appropriate variable.
Definition: ProSHADE.cpp:619
ProSHADE_settings::determineAllSHValues
void determineAllSHValues(proshade_unsign xDim, proshade_unsign yDim, proshade_unsign zDim)
This function determines all the required values for spherical harmonics computation.
Definition: ProSHADE.cpp:1314
ProSHADE_settings::maxSymmetryFold
proshade_unsign maxSymmetryFold
The highest symmetry fold to search for.
Definition: ProSHADE_settings.hpp:178
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:117
ProSHADE_run::~ProSHADE_run
~ProSHADE_run(void)
Destructor for the ProSHADE class.
Definition: ProSHADE.cpp:1453
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:2310
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:137
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:152
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:126
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:2408
ProSHADE_settings::maskMap
bool maskMap
Should the map be masked from noise?
Definition: ProSHADE_settings.hpp:128
ProSHADE_settings::requestedSymmetryFold
proshade_unsign requestedSymmetryFold
The fold of the requested symmetry (only applicable to C and D symmetry types).
Definition: ProSHADE_settings.hpp:175
ProSHADE_run::getNoSymmetryAxes
proshade_unsign getNoSymmetryAxes(void)
This function returns the number of detected recommended symmetry axes.
Definition: ProSHADE.cpp:2340
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:174
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:132
ProSHADE_settings::requestedResolution
proshade_single requestedResolution
The resolution to which the calculations are to be done.
Definition: ProSHADE_settings.hpp:98
ProSHADE_settings::minSymPeak
proshade_double minSymPeak
Minimum average peak for symmetry axis to be considered as "real".
Definition: ProSHADE_settings.hpp:171
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:149
ProSHADE_settings::maxSphereDists
proshade_single maxSphereDists
The distance between spheres in spherical mapping for the largest sphere.
Definition: ProSHADE_settings.hpp:113
ProSHADE_run::getEulerAngles
std::vector< proshade_double > getEulerAngles(void)
This function returns the vector of Euler angles with best overlay correlation.
Definition: ProSHADE.cpp:2515
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:168
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:2330
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:127
ProSHADE_settings::useCorrelationMasking
bool useCorrelationMasking
Should the blurring masking (false) or the correlation masking (true) be used?
Definition: ProSHADE_settings.hpp:129
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:110
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:133
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:185
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:100
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:177
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:2361
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:93
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:89
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:1493
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:2563
ProSHADE_settings::reBoxMap
bool reBoxMap
This switch decides whether re-boxing is needed.
Definition: ProSHADE_settings.hpp:136
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:2491
ProSHADE_settings::normaliseMap
bool normaliseMap
Should the map be normalised to mean 0 sd 1?
Definition: ProSHADE_settings.hpp:120
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:146
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:86
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:1572
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:1483
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:2290
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:131
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:123
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:138
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:99
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:2447
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:107
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:181
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:143
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:161
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:165
ProSHADE_run::ProSHADE_run
ProSHADE_run(ProSHADE_settings *settings)
Contructor for the ProSHADE_run class.
Definition: ProSHADE.cpp:1358
ProSHADE_run::getMapValue
proshade_double getMapValue(proshade_unsign strNo, proshade_unsign mapIndex)
This function returns a single, specific structure map value.
Definition: ProSHADE.cpp:2477
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:130
ProSHADE_run::getNoRecommendedSymmetryAxes
proshade_unsign getNoRecommendedSymmetryAxes(void)
This function returns the number of detected recommended symmetry axes.
Definition: ProSHADE.cpp:2350
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:140
ProSHADE_settings::detectedSymmetry
std::vector< proshade_double * > detectedSymmetry
The vector of detected symmetry axes.
Definition: ProSHADE_settings.hpp:189
ProSHADE_settings::recommendedSymmetryFold
proshade_unsign recommendedSymmetryFold
The fold of the recommended symmetry C or D type, 0 otherwise.
Definition: ProSHADE_settings.hpp:173
ProSHADE_settings::inputFiles
std::vector< std::string > inputFiles
This vector contains the filenames of all input structure files.
Definition: ProSHADE_settings.hpp:92
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:95
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:169
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:139
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:103
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:176
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:2533
ProSHADE_run::getOriginalBounds
std::vector< proshade_signed > getOriginalBounds(proshade_unsign strNo)
This function returns a specific structure original bounds.
Definition: ProSHADE.cpp:2419
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:2300
ProSHADE_settings::removeWaters
bool removeWaters
Should all waters be removed from input PDB files?
Definition: ProSHADE_settings.hpp:94
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:2098
ProSHADE_run::getNoStructures
proshade_unsign getNoStructures(void)
This function returns the number of structures used.
Definition: ProSHADE.cpp:2320
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:156
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:2587
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:155