22 #include <clipper/clipper.h> 23 #include <clipper/clipper-contrib.h> 24 #include <clipper/clipper-ccp4.h> 25 #include <clipper/clipper-mmdb.h> 26 #include <clipper/clipper-minimol.h> 33 #include <wrap_fftw.h> 34 #include <makeweights.h> 35 #include <s2_primitive.h> 36 #include <s2_cospmls.h> 37 #include <s2_legendreTransforms.h> 38 #include <s2_semi_fly.h> 39 #include <rotate_so3_utils.h> 40 #include <utils_so3.h> 41 #include <soft_fftw.h> 42 #include <rotate_so3_fftw.h> 51 #include <rvapi_interface.h> 59 #include "ProSHADE_rvapi.h" 193 std::cout <<
"-----------------------------------------------------------" << std::endl;
194 std::cout <<
"| SETTINGS: |" << std::endl;
195 std::cout <<
"-----------------------------------------------------------" << std::endl;
196 std::stringstream strstr2;
198 printf (
"Resolution : %37s\n", strstr2.str().c_str() );
200 std::stringstream strstr3;
202 printf (
"Bandwidth : %37s\n", strstr3.str().c_str() );
204 strstr3.str(std::string());
206 printf (
"Integration order : %37s\n", strstr3.str().c_str() );
208 strstr3.str(std::string());
209 strstr3 << this->
theta;
210 printf (
"Theta angle : %37s\n", strstr3.str().c_str() );
212 strstr3.str(std::string());
213 strstr3 << this->
phi;
214 printf (
"Phi angle : %37s\n", strstr3.str().c_str() );
216 strstr3.str(std::string());
218 printf (
"B-factor value : %37s\n", strstr3.str().c_str() );
220 strstr3.str(std::string());
222 printf (
"B-factor change : %37s\n", strstr3.str().c_str() );
224 strstr3.str(std::string());
225 if ( this->
usePhase ) { strstr3 <<
"TRUE"; }
226 else { strstr3 <<
"FALSE"; }
227 printf (
"Use phase : %37s\n", strstr3.str().c_str() );
229 strstr3.str(std::string());
230 if ( this->
useCOM ) { strstr3 <<
"TRUE"; }
231 else { strstr3 <<
"FALSE"; }
232 printf (
"Use COM to center : %37s\n", strstr3.str().c_str() );
234 strstr3.str(std::string());
236 else { strstr3 <<
"FALSE"; }
237 printf (
"Use first line COM : %37s\n", strstr3.str().c_str() );
239 strstr3.str(std::string());
241 printf (
"Shell distances in A: %37s\n", strstr3.str().c_str() );
243 strstr3.str(std::string());
245 printf (
"Manual no shells : %37s\n", strstr3.str().c_str() );
247 strstr3.str(std::string());
249 printf (
"Extra cell space : %37s\n", strstr3.str().c_str() );
251 strstr3.str(std::string());
252 strstr3 << this->
alpha;
253 printf (
"Raise |F| to power : %37s\n", strstr3.str().c_str() );
255 strstr3.str(std::string());
257 printf (
"Cross-cor weighting : %37s\n", strstr3.str().c_str() );
259 strstr3.str(std::string());
261 printf (
"IQRs masking thres : %37s\n", strstr3.str().c_str() );
263 strstr3.str(std::string());
265 printf (
"IQRs peak thres : %37s\n", strstr3.str().c_str() );
267 strstr3.str(std::string());
269 printf (
"Peak similarity thr : %37s\n", strstr3.str().c_str() );
271 strstr3.str(std::string());
273 printf (
"Peak width : %37s\n", strstr3.str().c_str() );
275 strstr3.str(std::string());
277 else { strstr3 <<
"FALSE"; }
278 printf (
"Get cross-cor dists : %37s\n", strstr3.str().c_str() );
280 strstr3.str(std::string());
282 else { strstr3 <<
"FALSE"; }
283 printf (
"Get tr sigma dists : %37s\n", strstr3.str().c_str() );
285 strstr3.str(std::string());
287 else { strstr3 <<
"FALSE"; }
288 printf (
"Get rot func dists : %37s\n", strstr3.str().c_str() );
290 strstr3.str(std::string());
292 printf (
"Symmetry axis toler : %37s\n", strstr3.str().c_str() );
294 strstr3.str(std::string());
296 printf (
"Symmetry gap toler : %37s\n", strstr3.str().c_str() );
298 strstr3.str(std::string());
300 printf (
"Cross-cor hierar thr: %37s\n", strstr3.str().c_str() );
302 strstr3.str(std::string());
304 printf (
"Tr sigma hierar thr : %37s\n", strstr3.str().c_str() );
306 strstr3.str(std::string());
308 for (
int i = 0; i < static_cast<int> ( this->
ignoreLs.size() ); i++ )
312 strstr3 <<
", " << this->
ignoreLs.at(i);
315 printf (
"Bands to ignore : %37s\n", strstr3.str().c_str() );
317 strstr3.str(std::string());
319 printf (
"Map saving location : %37s\n", strstr3.str().c_str() );
321 strstr3.str(std::string());
323 else { strstr3 <<
"FALSE"; }
324 printf (
"Use cubic maps : %37s\n", strstr3.str().c_str() );
326 strstr3.str(std::string());
328 else { strstr3 <<
"FALSE"; }
329 printf (
"Map noice removal : %37s\n", strstr3.str().c_str() );
331 strstr3.str(std::string());
333 printf (
"Map mask blurring : %37s\n", strstr3.str().c_str() );
335 strstr3.str(std::string());
337 else { strstr3 <<
"FALSE"; }
338 printf (
"Blur. factor given : %37s\n", strstr3.str().c_str() );
340 strstr3.str(std::string());
342 printf (
"Max Rotation Error : %37s\n", strstr3.str().c_str() );
344 strstr3.str(std::string());
346 printf (
"Map fragm box size : %37s\n", strstr3.str().c_str() );
348 strstr3.str(std::string());
350 printf (
"Map fragm save name : %37s\n", strstr3.str().c_str() );
352 strstr3.str(std::string());
354 printf (
"Map frag min density: %37s\n", strstr3.str().c_str() );
356 strstr3.str(std::string());
358 printf (
"Database name : %37s\n", strstr3.str().c_str() );
360 strstr3.str(std::string());
362 printf (
"Database volume tol : %37s\n", strstr3.str().c_str() );
364 strstr3.str(std::string());
366 printf (
"Required sym fold : %37s\n", strstr3.str().c_str() );
368 strstr3.str(std::string());
370 printf (
"Required sym type : %37s\n", strstr3.str().c_str() );
372 strstr3.str(std::string());
374 printf (
"Map rotation angle : %37s\n", strstr3.str().c_str() );
376 strstr3.str(std::string());
378 printf (
"Map rotation X-axis : %37s\n", strstr3.str().c_str() );
380 strstr3.str(std::string());
382 printf (
"Map rotation Y-axis : %37s\n", strstr3.str().c_str() );
384 strstr3.str(std::string());
386 printf (
"Map rotation Z-axis : %37s\n", strstr3.str().c_str() );
388 strstr3.str(std::string());
390 printf (
"Map transl. X-axis : %37s\n", strstr3.str().c_str() );
392 strstr3.str(std::string());
394 printf (
"Map transl. Y-axis : %37s\n", strstr3.str().c_str() );
396 strstr3.str(std::string());
398 printf (
"Map transl. Z-axis : %37s\n", strstr3.str().c_str() );
400 strstr3.str(std::string());
402 printf (
"Out map axis order : %37s\n", strstr3.str().c_str() );
404 strstr3.str(std::string());
406 printf (
"Verbose : %37s\n\n", strstr3.str().c_str() );
408 strstr3.str(std::string());
409 if ( this->
taskToPerform == Symmetry ) { strstr3 <<
"SYMMETRY DETECTION"; }
410 if ( this->
taskToPerform == Distances ) { strstr3 <<
"DISTANCES COMPUTATION"; }
411 if ( this->
taskToPerform == Features ) { strstr3 <<
"MAP FEATURES EXTRACTION"; }
412 if ( this->
taskToPerform == BuildDB ) { strstr3 <<
"BUILD STRUCTURE DATABASE"; }
413 if ( this->
taskToPerform == DistancesFrag ) { strstr3 <<
"FRAGMENT DISTANCES"; }
414 if ( this->
taskToPerform == HalfMaps ) { strstr3 <<
"HALF MAPS RE-BOXING"; }
415 if ( this->
taskToPerform == RotateMap ) { strstr3 <<
"MAP ROTATION"; }
416 if ( this->
taskToPerform == OverlayMap ) { { strstr3 <<
"MAP OVERLAY"; } }
417 if ( this->
taskToPerform == SimpleRebox ) { { strstr3 <<
"MAP RE-BOXING"; } }
418 printf (
"Task to perform : %37s\n", strstr3.str().c_str() );
420 std::cout <<
"-----------------------------------------------------------" << std::endl << std::endl;
436 if ( argc == 1 ) { ProSHADE_internal_misc::printHelp ( ); }
439 const struct option longopts[] =
441 {
"version", no_argument,
nullptr,
'v' },
442 {
"help", no_argument,
nullptr,
'h' },
443 {
"distances", no_argument,
nullptr,
'D' },
444 {
"buildDB", no_argument,
nullptr,
'B' },
445 {
"features", no_argument,
nullptr,
'F' },
446 {
"symmetry", no_argument,
nullptr,
'S' },
447 {
"distancesFrag", no_argument,
nullptr,
'M' },
448 {
"halpMaps", no_argument,
nullptr,
'H' },
449 {
"strOverlay", no_argument,
nullptr,
'O' },
450 {
"reBox", no_argument,
nullptr,
'E' },
451 {
"rotate", no_argument,
nullptr,
'R' },
452 {
"no_phase", no_argument,
nullptr,
'p' },
453 {
"no_COM", no_argument,
nullptr,
'c' },
454 {
"fl_Cen", no_argument,
nullptr,
'l' },
455 {
"no_crCorr", no_argument,
nullptr,
'e' },
456 {
"no_trSig", no_argument,
nullptr,
't' },
457 {
"no_rotFn", no_argument,
nullptr,
'r' },
458 {
"clear", no_argument,
nullptr,
'y' },
459 {
"cubic", no_argument,
nullptr,
'U' },
460 {
"no_report", no_argument,
nullptr,
'A' },
461 {
"f", required_argument,
nullptr,
'f' },
462 {
"fileList", required_argument,
nullptr,
'i' },
463 {
"delModel", required_argument,
nullptr,
'P' },
464 {
"bandList", required_argument,
nullptr,
'b' },
465 {
"resolution", required_argument,
nullptr,
's' },
466 {
"bandWidth", required_argument,
nullptr,
'a' },
467 {
"integration", required_argument,
nullptr,
'n' },
468 {
"maxRotErr", required_argument,
nullptr,
'L' },
469 {
"sym", required_argument,
nullptr,
'u' },
470 {
"clearMap", required_argument,
nullptr,
'm' },
471 {
"axisOrder", required_argument,
nullptr,
'g' },
472 {
"dbFile", required_argument,
nullptr,
'x' },
473 {
"bValues", required_argument,
nullptr,
'{' },
474 {
"bChange", required_argument,
nullptr,
'}' },
475 {
"sphDistance", required_argument,
nullptr,
'[' },
476 {
"sphNumber", required_argument,
nullptr,
']' },
477 {
"mapMaskThres", required_argument,
nullptr,
'(' },
478 {
"mapMaskBlur", required_argument,
nullptr,
'K' },
479 {
"cellBorderSpace", required_argument,
nullptr,
')' },
480 {
"fPower", required_argument,
nullptr,
'@' },
481 {
"mPower", required_argument,
nullptr,
'%' },
482 {
"peakSize", required_argument,
nullptr,
'^' },
483 {
"peakThres", required_argument,
nullptr,
'&' },
484 {
"peakMinSim", required_argument,
nullptr,
'*' },
485 {
"axisTolerance", required_argument,
nullptr,
'Q' },
486 {
"symGap", required_argument,
nullptr,
'q' },
487 {
"CCThres", required_argument,
nullptr,
'W' },
488 {
"TSThres", required_argument,
nullptr,
'w' },
489 {
"mFrag", required_argument,
nullptr,
'o' },
490 {
"mBoxFrac", required_argument,
nullptr,
'G' },
491 {
"mBoxPath", required_argument,
nullptr,
'T' },
492 {
"dbSizeLim", required_argument,
nullptr,
'Y' },
493 {
"rotAng", required_argument,
nullptr,
'<' },
494 {
"rotX", required_argument,
nullptr,
'>' },
495 {
"rotY", required_argument,
nullptr,
'~' },
496 {
"rotZ", required_argument,
nullptr,
'|' },
497 {
"trsX", required_argument,
nullptr,
'N' },
498 {
"trsY", required_argument,
nullptr,
'J' },
499 {
"trsZ", required_argument,
nullptr,
'I' },
500 {
"verbose", optional_argument,
nullptr,
'V' },
501 {
nullptr, 0,
nullptr, 0 },
505 bool userRes =
false;
506 bool userBVal =
false;
509 const char*
const shortopts =
"vhDBFSMHOERpcletryUACf:i:P:b:s:a:n:L:u:m:g:x:{:}:[:]:(:K:):@:^:&:*:Q:q:W:w:o:G:T:Y:<:>:~:|:N:J:I:V::?";
515 const auto opt = getopt_long ( argc, argv, shortopts, longopts,
nullptr );
524 const char *tmp_optarg = optarg;
605 this->
ignoreLs = std::vector<int> ();
685 this->
structFiles.emplace_back ( std::string ( optarg ) );
693 std::ifstream textFile ( std::string ( optarg ), std::ios::in );
696 if ( textFile.fail() )
698 std::cout <<
"!!! ProSHADE ERROR !!! The filename supplied with the \'-i\' parameter cannot be opened. Terminating..." << std::endl;
704 while ( std::getline ( textFile, hlpStr ) )
717 this->
deleteModels.emplace_back ( std::string ( optarg ) );
724 this->
ignoreLs.emplace_back ( stoi ( std::string ( optarg ) ) );
741 this->
bandwidth = stof ( std::string ( optarg ) );
756 this->
maxRotError =
static_cast<unsigned int> ( stoi ( std::string ( optarg ) ) );
763 std::string hlpStr = std::string ( optarg );
764 if ( hlpStr.at(0) ==
'C' )
770 if ( hlpStr.at(0) ==
'D' )
776 if ( hlpStr.at(0) ==
'T' )
782 if ( hlpStr.at(0) ==
'O' )
788 if ( hlpStr.at(0) ==
'I' )
794 ProSHADE_internal_misc::printHelp ( );
804 std::string numHlp ( hlpStr.begin()+1, hlpStr.end() );
805 if ( numHlp.length() > 0 )
811 std::cerr <<
"!!! ProSHADE ERROR !!! The input argument requests search for Cyclic/Dihedral symmetry, but does not specify the requested fold." << std::endl;
818 std::string numHlp ( hlpStr.begin()+1, hlpStr.end() );
821 ProSHADE_internal_misc::printHelp ( );
839 this->
axisOrder = std::string ( optarg );
840 std::transform ( this->
axisOrder.begin(),
846 std::cerr <<
"!!! ProSHADE ERROR !!! Input parameter error !!! The axisOrder parameter requires a string of three characters only." << std::endl;
851 std::cerr <<
"!!! ProSHADE ERROR !!! Input parameter error !!! The axisOrder parameter requires a string consisting of only \'x\', \'y\' and \'z\' characters." << std::endl;
856 std::cerr <<
"!!! ProSHADE ERROR !!! Input parameter error !!! The axisOrder parameter requires a string consisting of only \'x\', \'y\' and \'z\' characters." << std::endl;
861 std::cerr <<
"!!! ProSHADE ERROR !!! Input parameter error !!! The axisOrder parameter requires a string consisting of only \'x\', \'y\' and \'z\' characters." << std::endl;
866 std::cerr <<
"!!! ProSHADE ERROR !!! Input parameter error !!! The axisOrder parameter requires a string with at least one \'x\' character." << std::endl;
871 std::cerr <<
"!!! ProSHADE ERROR !!! Input parameter error !!! The axisOrder parameter requires a string with at least one \'y\' character." << std::endl;
876 std::cerr <<
"!!! ProSHADE ERROR !!! Input parameter error !!! The axisOrder parameter requires a string with at least one \'z\' character." << std::endl;
938 this->
extraSpace = stof ( std::string ( optarg ) );
946 this->
alpha = stof ( std::string ( optarg ) );
953 this->
mPower = stof ( std::string ( optarg ) );
1037 this->
rotAngle = stof ( std::string ( optarg ) );
1044 this->
rotXAxis = stof ( std::string ( optarg ) );
1051 this->
rotYAxis = stof ( std::string ( optarg ) );
1058 this->
rotZAxis = stof ( std::string ( optarg ) );
1086 if ( !optarg && argv[optind] != NULL && argv[optind][0] !=
'-' )
1088 tmp_optarg = argv[optind++];
1093 this->
verbose = stoi ( std::string ( tmp_optarg ) );
1102 printf (
"!!! ProSHADE ERROR !!! The \'--verbose\' option takes only values in range 0 to 4, including. Terminating...\n" );
1112 std::cout <<
"ProSHADE " << __PROSHADE_VERSION__ << std::endl << std::endl;
1119 ProSHADE_internal_misc::printHelp ( );
1133 ProSHADE_internal_misc::printHelp ( );
1144 void ProSHADE::ProSHADE_settings::ignoreLsAddValuePy (
const int val )
1147 this->
ignoreLs.emplace_back ( val );
1162 this->settings = setUp;
1164 this->distancesAvailable =
false;
1165 this->symmetriesAvailable =
false;
1166 this->fragmentsAvailable =
false;
1171 std::cout <<
"ProSHADE " << __PROSHADE_VERSION__ <<
" :" << std::endl;
1172 std::cout <<
"==========================" << std::endl << std::endl;
1180 std::cerr <<
"!!! ProSHADE ERROR !!! There is no task (functionality) selected for this run." << std::endl << std::endl;
1181 std::cerr <<
"Please select a functionality and supply it to the settings object (or using command line). Your options are:" << std::endl;
1182 std::cerr <<
" " << std::endl;
1183 std::cerr <<
" -D or --distances " << std::endl;
1184 std::cerr <<
" The shape distances will be computed between the first supplied " << std::endl;
1185 std::cerr <<
" structure and all other structures. Requires at least two " << std::endl;
1186 std::cerr <<
" structures. " << std::endl;
1187 std::cerr <<
" " << std::endl;
1188 std::cerr <<
" -B or --buildDB " << std::endl;
1189 std::cerr <<
" Pre-compute the spherical harmonics coefficients for all " << std::endl;
1190 std::cerr <<
" supplied structures for the given options. Save the results in " << std::endl;
1191 std::cerr <<
" a binary database file given by the \'x\' option. " << std::endl;
1192 std::cerr <<
" " << std::endl;
1193 std::cerr <<
" -F or --features " << std::endl;
1194 std::cerr <<
" Return a table of statistics for input map. To save a clean and " << std::endl;
1195 std::cerr <<
" resized map, use the \'m\' option to specify the file to save to. " << std::endl;
1196 std::cerr <<
" " << std::endl;
1197 std::cerr <<
" -S or --symmetry " << std::endl;
1198 std::cerr <<
" Detect if any C, D, T or I symmetries are present in the first " << std::endl;
1199 std::cerr <<
" structure supplied. Also prints all symmetry elements for C and " << std::endl;
1200 std::cerr <<
" D symmetries, but only two elements for T and I. " << std::endl;
1201 std::cerr <<
" " << std::endl;
1202 std::cerr <<
" -M or --distancesFrag " << std::endl;
1203 std::cerr <<
" Fragment the supplied map file and search each resulting frag- " << std::endl;
1204 std::cerr <<
" ment against the whole database supplied by the \'x\' option. Per " << std::endl;
1205 std::cerr <<
" fragment distances are reported. " << std::endl;
1206 std::cerr <<
" " << std::endl;
1207 std::cerr <<
" -R or --rotate " << std::endl;
1208 std::cerr <<
" Take a single density map and apply the rotation defined by the " << std::endl;
1209 std::cerr <<
" \'--rotAng\', \'--rotAlp\', \'--rotBet\' and \'--rotGam\' options. The " << std::endl;
1210 std::cerr <<
" resulting rotated map is saved to location given by the " << std::endl;
1211 std::cerr <<
" \'--clearMap\' option. Many of the default settings are over- " << std::endl;
1212 std::cerr <<
" written and while can be modified using the command line " << std::endl;
1213 std::cerr <<
" options, this is not recommended. " << std::endl;
1214 std::cerr <<
" " << std::endl;
1215 std::cerr <<
" -O or --strOverlay " << std::endl;
1216 std::cerr <<
" Given two structures, find the optimal overlay using the " << std::endl;
1217 std::cerr <<
" rotation and translation functions. The first structure is " << std::endl;
1218 std::cerr <<
" always unchanged, while a rotated and translated version of the " << std::endl;
1219 std::cerr <<
" second structure will be written to the \'--clearMap\' option " << std::endl;
1220 std::cerr <<
" path or \'./rotStr\' file. " << std::endl;
1221 std::cerr <<
" " << std::endl;
1222 std::cerr <<
" -E or --reBox " << std::endl;
1223 std::cerr <<
" Takes a single map structure and computes the mask. Then, finds " << std::endl;
1224 std::cerr <<
" the box around the mask, adds extra \'--cellBorderSpace\' angs. " << std::endl;
1225 std::cerr <<
" of space and outputs the re-sized map to \'--clearMap\'. " << std::endl;
1226 std::cerr <<
" " << std::endl;
1232 mkdir (
"proshade_report", 0777 );
1235 std::stringstream hlpSS;
1236 hlpSS << __PROSHADE_RVAPI__ <<
"/jsrview";
1237 rvapi_init_document (
"ProSHADE Results Report",
1238 "./proshade_report",
1239 "ProSHADE Results Report",
1242 hlpSS.str().c_str(),
1255 std::cout <<
"-----------------------------------------------------------" << std::endl;
1256 std::cout <<
"| MODE: Structure Overlay |" << std::endl;
1257 std::cout <<
"-----------------------------------------------------------" << std::endl << std::endl;
1263 rvapi_set_text (
"<h1>ProSHADE Results: Structure Overlay</h1>",
1272 rvapi_add_section (
"ProgressSection",
1287 std::stringstream hlpSS;
1288 hlpSS <<
"<font color=\"green\">" <<
"Overlay of structures started." <<
"</font>";
1289 rvapi_set_text ( hlpSS.str().c_str(),
1310 std::cout <<
"-----------------------------------------------------------" << std::endl;
1311 std::cout <<
"| MODE: Map Rotation |" << std::endl;
1312 std::cout <<
"-----------------------------------------------------------" << std::endl << std::endl;
1324 rvapi_set_text (
"<h1>ProSHADE Results: Building a database of structures</h1>",
1333 rvapi_add_section (
"ProgressSection",
1343 std::stringstream hlpSS;
1344 hlpSS <<
"<font color=\"green\">" <<
"Database building procedure started." <<
"</font>";
1345 rvapi_set_text ( hlpSS.str().c_str(),
1361 std::stringstream hlpSS;
1362 hlpSS <<
"<font color=\"green\">" <<
"COMPLETED." <<
"</font>";
1363 rvapi_set_text ( hlpSS.str().c_str(),
1381 rvapi_set_text (
"<h1>ProSHADE Results: Density map features</h1>",
1390 rvapi_add_section (
"ProgressSection",
1400 std::stringstream hlpSS;
1401 hlpSS <<
"<font color=\"green\">" <<
"Density map features detection procedure started." <<
"</font>";
1402 rvapi_set_text ( hlpSS.str().c_str(),
1421 std::cout <<
"-----------------------------------------------------------" << std::endl;
1422 std::cout <<
"| SAVING CLEAN MAP |" << std::endl;
1423 std::cout <<
"-----------------------------------------------------------" << std::endl << std::endl;
1428 std::cout <<
"Clean map saved to file: " << setUp->
clearMapFile << std::endl << std::endl;
1438 this->fragmentsAvailable =
true;
1444 std::cout <<
"-----------------------------------------------------------" << std::endl;
1445 std::cout <<
"| MAP FRAGMENTATION |" << std::endl;
1446 std::cout <<
"-----------------------------------------------------------" << std::endl << std::endl;
1448 std::cout <<
"Map fragmentation was not required." << std::endl << std::endl;
1457 this->cyclicSymmetries = symmetry.
cnSymm;
1458 this->cyclicSymmetriesClear = symmetry.
cnSymmClear;
1459 this->dihedralSymmetries = symmetry.
dnSymm;
1460 this->dihedralSymmetriesClear = symmetry.
dnSymmClear;
1461 this->tetrahedralSymmetry = symmetry.
tetrAxes;
1462 this->octahedralSymmetry = symmetry.
octaAxes;
1463 this->icosahedralSymmetry = symmetry.
icosAxes;
1464 this->symmetriesAvailable =
true;
1499 std::cerr <<
"!!! ProSHADE ERROR !!! The symmetry output map can only be used for map input, the functionality to align PDB symmetry axes (which are detected) to the system axes is not yet implemented. Please report this if you are interested in a swift solution." << std::endl;
1505 std::cout <<
"-----------------------------------------------------------" << std::endl;
1506 std::cout <<
"| Structure Axis Alignment |" << std::endl;
1507 std::cout <<
"-----------------------------------------------------------" << std::endl << std::endl;
1512 std::stringstream hlpSS;
1513 hlpSS <<
"<font color=\"green\">" <<
"Symmetry axes alignment started." <<
"</font>";
1514 rvapi_set_text ( hlpSS.str().c_str(),
1524 if ( static_cast<unsigned int> ( this->icosahedralSymmetry.size() ) > 0 )
1528 std::cout <<
"Applying the ICOSAHEDRAL axis alignment convention of Heymann, Chagoyen and Belnap (2005) I1 (2-fold axes on X, Y and Z)." << std::endl;
1533 std::stringstream hlpSS;
1534 hlpSS <<
"<font color=\"green\">" <<
"Applying axes alignment using the convention of Heymann, Chagoyen and Belnap (2005) <b>I1</b> (2-fold axes on X, Y and Z)." <<
"</font>";
1535 rvapi_set_text ( hlpSS.str().c_str(),
1546 std::sort ( this->icosahedralSymmetry.begin(), this->icosahedralSymmetry.end(), [](
const std::array<double,5>& a,
const std::array<double,5>& b) {
return a[0] > b[0]; });
1548 double maxFold = this->icosahedralSymmetry.at(0)[0];
1550 for (
unsigned int iter = 0; iter < static_cast<unsigned int> ( this->icosahedralSymmetry.size() ); iter++ )
1552 if ( this->icosahedralSymmetry.at(iter)[0] == maxFold )
1557 std::sort ( this->icosahedralSymmetry.begin(), this->icosahedralSymmetry.begin() + noMaxFold, [](
const std::array<double,5>& a,
const std::array<double,5>& b) {
return a[4] > b[4]; });
1559 maxFold = this->icosahedralSymmetry.at(noMaxFold)[0];
1561 for (
unsigned int iter = 0; iter < static_cast<unsigned int> ( this->icosahedralSymmetry.size() ); iter++ )
1563 if ( this->icosahedralSymmetry.at(iter)[0] == maxFold )
1569 std::sort ( this->icosahedralSymmetry.begin() + noMaxFold, this->icosahedralSymmetry.begin() + noMaxFold + noMaxFold2, [](
const std::array<double,5>& a,
const std::array<double,5>& b) {
return a[4] > b[4]; });
1572 std::vector<std::vector<double>> origAxis;
1573 std::vector<std::vector<double>> basisAxis;
1574 std::vector<double> hlpVec;
1575 hlpVec.emplace_back ( 0.0 ); hlpVec.emplace_back ( 0.0 );
1576 origAxis.emplace_back( hlpVec ); origAxis.emplace_back( hlpVec ); origAxis.emplace_back( hlpVec );
1580 while ( static_cast<int> ( noMaxFold + noMaxFold2 + c2It ) < static_cast<int> ( this->icosahedralSymmetry.size() ) )
1582 bool firstAxis =
true;
1583 for (
unsigned int iter = noMaxFold + noMaxFold2 + c2It; iter < static_cast<unsigned int> ( this->icosahedralSymmetry.size() ); iter++ )
1588 origAxis.at(0).at(0) = this->icosahedralSymmetry.at(iter)[1];
1589 origAxis.at(1).at(0) = this->icosahedralSymmetry.at(iter)[2];
1590 origAxis.at(2).at(0) = this->icosahedralSymmetry.at(iter)[3];
1594 double dotProd = origAxis.at(0).at(0) * this->icosahedralSymmetry.at(iter)[1] +
1595 origAxis.at(1).at(0) * this->icosahedralSymmetry.at(iter)[2] +
1596 origAxis.at(2).at(0) * this->icosahedralSymmetry.at(iter)[3];
1598 if ( ( dotProd < 0.05 ) && ( dotProd > -0.05 ) )
1600 origAxis.at(0).at(1) = this->icosahedralSymmetry.at(iter)[1];
1601 origAxis.at(1).at(1) = this->icosahedralSymmetry.at(iter)[2];
1602 origAxis.at(2).at(1) = this->icosahedralSymmetry.at(iter)[3];
1609 if ( ( std::abs( origAxis.at(0).at(1) ) < 0.05 ) && ( std::abs( origAxis.at(1).at(1) ) < 0.05 ) && ( std::abs( origAxis.at(2).at(1) ) < 0.05 ) )
1619 if ( ( std::abs( origAxis.at(0).at(1) ) < 0.05 ) && ( std::abs( origAxis.at(1).at(1) ) < 0.05 ) && ( std::abs( origAxis.at(2).at(1) ) < 0.05 ) )
1621 std::cerr <<
"!!! ProSHADE ERROR !!! Cannot find three perpendicular C2 axes in the Icosahedral symmetry. This looks like a bug, please report this case. Also, you can try increasing the resolution to overcome this problem." << std::endl;
1624 std::stringstream hlpSS;
1625 hlpSS <<
"<font color=\"red\">" <<
"Cannot find three perpendicular C2 axes in the Icosahedral symmetry. This looks like a bug, please report this case. Also, you can try increasing the resolution to overcome this problem." <<
"</font>";
1626 rvapi_set_text ( hlpSS.str().c_str(),
1639 hlpVec.emplace_back ( 0.0 );
1640 basisAxis.emplace_back( hlpVec ); basisAxis.emplace_back( hlpVec ); basisAxis.emplace_back( hlpVec );
1642 basisAxis.at(0).at(0) = 1.0;
1643 basisAxis.at(1).at(0) = 0.0;
1644 basisAxis.at(2).at(0) = 0.0;
1646 basisAxis.at(0).at(1) = 0.0;
1647 basisAxis.at(1).at(1) = 1.0;
1648 basisAxis.at(2).at(1) = 0.0;
1650 basisAxis.at(0).at(2) = 0.0;
1651 basisAxis.at(1).at(2) = 0.0;
1652 basisAxis.at(2).at(2) = 1.0;
1655 std::array<double,5> joinAA = ProSHADE_internal_misc::getAxisAngleFromSymmetryAxes ( origAxis, basisAxis, 0, 1 );
1670 rotSet->
ignoreLs = std::vector<int> ();
1698 std::cout <<
">> Structure rotation initiated." << std::endl;
1706 std::cout <<
"Structure with symmetry axis to box axes alignment writted in " << setUp->
clearMapFile << std::endl;
1710 else if ( static_cast<unsigned int> ( this->octahedralSymmetry.size() ) > 0 )
1714 std::cout <<
"Applying the OCTAHEDRAL axis alignment convention of Heymann, Chagoyen and Belnap (2005) (4-fold axes on X, Y and Z)." << std::endl;
1719 std::stringstream hlpSS;
1720 hlpSS <<
"<font color=\"green\">" <<
"Applying axes alignment using the convention of Heymann, Chagoyen and Belnap (2005) (4-fold axes on X, Y and Z)." <<
"</font>";
1721 rvapi_set_text ( hlpSS.str().c_str(),
1732 std::sort ( this->octahedralSymmetry.begin(), this->octahedralSymmetry.end(), [](
const std::array<double,5>& a,
const std::array<double,5>& b) {
return a[0] > b[0]; });
1734 double maxFold = this->octahedralSymmetry.at(0)[0];
1736 for (
unsigned int iter = 0; iter < static_cast<unsigned int> ( this->octahedralSymmetry.size() ); iter++ )
1738 if ( this->octahedralSymmetry.at(iter)[0] == maxFold )
1743 std::sort ( this->octahedralSymmetry.begin(), this->octahedralSymmetry.begin() + noMaxFold, [](
const std::array<double,5>& a,
const std::array<double,5>& b) {
return a[4] > b[4]; });
1745 maxFold = this->octahedralSymmetry.at(noMaxFold)[0];
1747 for (
unsigned int iter = 0; iter < static_cast<unsigned int> ( this->octahedralSymmetry.size() ); iter++ )
1749 if ( this->octahedralSymmetry.at(iter)[0] == maxFold )
1754 std::sort ( this->octahedralSymmetry.begin() + noMaxFold, this->octahedralSymmetry.begin() + noMaxFold2 + noMaxFold, [](
const std::array<double,5>& a,
const std::array<double,5>& b) {
return a[4] > b[4]; });
1757 std::vector<std::vector<double>> origAxis;
1758 std::vector<std::vector<double>> basisAxis;
1759 std::vector<double> hlpVec;
1760 hlpVec.emplace_back ( 0.0 ); hlpVec.emplace_back ( 0.0 );
1761 origAxis.emplace_back( hlpVec ); origAxis.emplace_back( hlpVec ); origAxis.emplace_back( hlpVec );
1763 origAxis.at(0).at(0) = this->octahedralSymmetry.at(0)[1];
1764 origAxis.at(1).at(0) = this->octahedralSymmetry.at(0)[2];
1765 origAxis.at(2).at(0) = this->octahedralSymmetry.at(0)[3];
1767 origAxis.at(0).at(1) = this->octahedralSymmetry.at(1)[1];
1768 origAxis.at(1).at(1) = this->octahedralSymmetry.at(1)[2];
1769 origAxis.at(2).at(1) = this->octahedralSymmetry.at(1)[3];
1772 hlpVec.emplace_back ( 0.0 );
1773 basisAxis.emplace_back( hlpVec ); basisAxis.emplace_back( hlpVec ); basisAxis.emplace_back( hlpVec );
1775 basisAxis.at(0).at(0) = 1.0;
1776 basisAxis.at(1).at(0) = 0.0;
1777 basisAxis.at(2).at(0) = 0.0;
1779 basisAxis.at(0).at(1) = 0.0;
1780 basisAxis.at(1).at(1) = 1.0;
1781 basisAxis.at(2).at(1) = 0.0;
1783 basisAxis.at(0).at(2) = 0.0;
1784 basisAxis.at(1).at(2) = 0.0;
1785 basisAxis.at(2).at(2) = 1.0;
1788 std::array<double,5> joinAA = ProSHADE_internal_misc::getAxisAngleFromSymmetryAxes ( origAxis, basisAxis, 1, 2 );
1803 rotSet->
ignoreLs = std::vector<int> ();
1831 std::cout <<
">> Structure rotation initiated." << std::endl;
1839 std::cout <<
"Structure with symmetry axis to box axes alignment writted in " << setUp->
clearMapFile << std::endl;
1843 else if ( static_cast<unsigned int> ( this->tetrahedralSymmetry.size() ) > 0 )
1847 std::cout <<
"Applying the TETRAHEDRAL axis alignment convention from RELION (3-fold axis on Z)." << std::endl;
1852 std::stringstream hlpSS;
1853 hlpSS <<
"<font color=\"green\">" <<
"Applying axis alignment using the RELION convention (3-fold axis on Z)." <<
"</font>";
1854 rvapi_set_text ( hlpSS.str().c_str(),
1865 std::sort ( this->tetrahedralSymmetry.begin(), this->tetrahedralSymmetry.end(), [](
const std::array<double,5>& a,
const std::array<double,5>& b) {
return a[0] > b[0]; });
1867 double maxFold = this->tetrahedralSymmetry.at(0)[0];
1869 for (
unsigned int iter = 0; iter < static_cast<unsigned int> ( this->tetrahedralSymmetry.size() ); iter++ )
1871 if ( this->tetrahedralSymmetry.at(iter)[0] == maxFold )
1876 std::sort ( this->tetrahedralSymmetry.begin(), this->tetrahedralSymmetry.begin() + noMaxFold, [](
const std::array<double,5>& a,
const std::array<double,5>& b) {
return a[4] > b[4]; });
1877 std::sort ( this->tetrahedralSymmetry.begin() + noMaxFold, this->tetrahedralSymmetry.end(), [](
const std::array<double,5>& a,
const std::array<double,5>& b) {
return a[4] > b[4]; });
1880 std::vector<std::vector<double>> origAxis;
1881 std::vector<std::vector<double>> basisAxis;
1882 std::vector<double> hlpVec;
1883 hlpVec.emplace_back ( 0.0 ); hlpVec.emplace_back ( 0.0 );
1884 origAxis.emplace_back( hlpVec ); origAxis.emplace_back( hlpVec ); origAxis.emplace_back( hlpVec );
1886 origAxis.at(0).at(0) = this->tetrahedralSymmetry.at(0)[1];
1887 origAxis.at(1).at(0) = this->tetrahedralSymmetry.at(0)[2];
1888 origAxis.at(2).at(0) = this->tetrahedralSymmetry.at(0)[3];
1890 origAxis.at(0).at(1) = this->tetrahedralSymmetry.at(3)[1];
1891 origAxis.at(1).at(1) = this->tetrahedralSymmetry.at(3)[2];
1892 origAxis.at(2).at(1) = this->tetrahedralSymmetry.at(3)[3];
1895 hlpVec.emplace_back ( 0.0 );
1896 basisAxis.emplace_back( hlpVec ); basisAxis.emplace_back( hlpVec ); basisAxis.emplace_back( hlpVec );
1898 basisAxis.at(0).at(0) = 1.0;
1899 basisAxis.at(1).at(0) = 0.0;
1900 basisAxis.at(2).at(0) = 0.0;
1902 basisAxis.at(0).at(1) = 0.0;
1903 basisAxis.at(1).at(1) = 1.0;
1904 basisAxis.at(2).at(1) = 0.0;
1906 basisAxis.at(0).at(2) = 0.0;
1907 basisAxis.at(1).at(2) = 0.0;
1908 basisAxis.at(2).at(2) = 1.0;
1911 std::array<double,5> joinAA = ProSHADE_internal_misc::getAxisAngleFromSymmetryAxes ( origAxis, basisAxis, 1, 2 );
1926 rotSet->
ignoreLs = std::vector<int> ();
1954 std::cout <<
">> Structure rotation initiated." << std::endl;
1962 std::cout <<
"Structure with symmetry axis to box axes alignment writted in " << setUp->
clearMapFile << std::endl;
1967 else if ( static_cast<unsigned int> ( this->dihedralSymmetries.size() ) > 0 )
1971 std::cout <<
"Applying the DIHEDRAL axis alignment convention of Heymann, Chagoyen and Belnap (2005) (principle symm axis on Z, 2-fold on X)." << std::endl;
1976 std::stringstream hlpSS;
1977 hlpSS <<
"<font color=\"green\">" <<
"Applying axes alignment using the convention of Heymann, Chagoyen and Belnap (2005) (principle symm axis on Z, 2-fold on X)." <<
"</font>";
1978 rvapi_set_text ( hlpSS.str().c_str(),
1989 for (
unsigned int iter = 0; iter < static_cast<unsigned int> ( this->dihedralSymmetries.size() ); iter++ )
1991 std::sort ( this->dihedralSymmetries.at(iter).begin(), this->dihedralSymmetries.at(iter).end(), [](
const std::array<double,6>& a,
const std::array<double,6>& b) {
return a[0] > b[0]; });
1993 std::sort ( this->dihedralSymmetries.begin(), this->dihedralSymmetries.end(), [](
const std::vector< std::array<double,6> >& a,
const std::vector< std::array<double,6> >& b) {
return a.at(0)[0] > b.at(0)[0]; });
1995 double maxFold = this->dihedralSymmetries.at(0).at(0)[0];
1997 for (
unsigned int iter = 0; iter < static_cast<unsigned int> ( this->dihedralSymmetries.size() ); iter++ )
1999 if ( this->dihedralSymmetries.at(iter).at(0)[0] == maxFold )
2004 std::sort ( this->dihedralSymmetries.begin(), this->dihedralSymmetries.begin() + noMaxFold, [](
const std::vector< std::array<double,6> >& a,
const std::vector< std::array<double,6> >& b) {
return a.at(0)[5] > b.at(0)[5]; });
2007 std::vector<std::vector<double>> origAxis;
2008 std::vector<std::vector<double>> basisAxis;
2009 std::vector<double> hlpVec;
2010 hlpVec.emplace_back ( 0.0 ); hlpVec.emplace_back ( 0.0 );
2011 origAxis.emplace_back( hlpVec ); origAxis.emplace_back( hlpVec ); origAxis.emplace_back( hlpVec );
2013 origAxis.at(0).at(0) = this->dihedralSymmetries.at(0).at(0)[1];
2014 origAxis.at(1).at(0) = this->dihedralSymmetries.at(0).at(0)[2];
2015 origAxis.at(2).at(0) = this->dihedralSymmetries.at(0).at(0)[3];
2017 origAxis.at(0).at(1) = this->dihedralSymmetries.at(0).at(1)[1];
2018 origAxis.at(1).at(1) = this->dihedralSymmetries.at(0).at(1)[2];
2019 origAxis.at(2).at(1) = this->dihedralSymmetries.at(0).at(1)[3];
2022 hlpVec.emplace_back ( 0.0 );
2023 basisAxis.emplace_back( hlpVec ); basisAxis.emplace_back( hlpVec ); basisAxis.emplace_back( hlpVec );
2025 basisAxis.at(0).at(0) = 1.0;
2026 basisAxis.at(1).at(0) = 0.0;
2027 basisAxis.at(2).at(0) = 0.0;
2029 basisAxis.at(0).at(1) = 0.0;
2030 basisAxis.at(1).at(1) = 1.0;
2031 basisAxis.at(2).at(1) = 0.0;
2033 basisAxis.at(0).at(2) = 0.0;
2034 basisAxis.at(1).at(2) = 0.0;
2035 basisAxis.at(2).at(2) = 1.0;
2038 std::array<double,5> joinAA = ProSHADE_internal_misc::getAxisAngleFromSymmetryAxes ( origAxis, basisAxis, 1, 2 );
2053 rotSet->
ignoreLs = std::vector<int> ();
2081 std::cout <<
">> Structure rotation initiated." << std::endl;
2089 std::cout <<
"Structure with symmetry axis to box axes alignment writted in " << setUp->
clearMapFile << std::endl;
2094 else if ( static_cast<unsigned int> ( this->cyclicSymmetries.size() ) > 0 )
2098 std::cout <<
"Applying the CYCLIC axis alignment convention of Heymann, Chagoyen and Belnap (2005) (symm axis on Z)." << std::endl;
2103 std::stringstream hlpSS;
2104 hlpSS <<
"<font color=\"green\">" <<
"Applying axis alignment using the convention of Heymann, Chagoyen and Belnap (2005) (symm axis on Z)." <<
"</font>";
2105 rvapi_set_text ( hlpSS.str().c_str(),
2116 std::sort ( this->cyclicSymmetries.begin(), this->cyclicSymmetries.end(), [](
const std::array<double,5>& a,
const std::array<double,5>& b) {
return a[0] > b[0]; });
2119 std::vector<std::vector<double>> origAxis;
2120 std::vector<std::vector<double>> basisAxis;
2121 std::vector<double> hlpVec;
2122 hlpVec.emplace_back ( 0.0 );
2123 origAxis.emplace_back( hlpVec ); origAxis.emplace_back( hlpVec ); origAxis.emplace_back( hlpVec );
2125 origAxis.at(0).at(0) = this->cyclicSymmetries.at(0)[1];
2126 origAxis.at(1).at(0) = this->cyclicSymmetries.at(0)[2];
2127 origAxis.at(2).at(0) = this->cyclicSymmetries.at(0)[3];
2130 hlpVec.emplace_back ( 0.0 ); hlpVec.emplace_back ( 0.0 );
2131 basisAxis.emplace_back( hlpVec ); basisAxis.emplace_back( hlpVec ); basisAxis.emplace_back( hlpVec );
2133 basisAxis.at(0).at(0) = 1.0;
2134 basisAxis.at(1).at(0) = 0.0;
2135 basisAxis.at(2).at(0) = 0.0;
2137 basisAxis.at(0).at(1) = 0.0;
2138 basisAxis.at(1).at(1) = 1.0;
2139 basisAxis.at(2).at(1) = 0.0;
2141 basisAxis.at(0).at(2) = 0.0;
2142 basisAxis.at(1).at(2) = 0.0;
2143 basisAxis.at(2).at(2) = 1.0;
2146 std::array<double,5> joinAA = ProSHADE_internal_misc::getAxisAngleFromSymmetryAxes ( origAxis, basisAxis, 1, 2 );
2161 rotSet->
ignoreLs = std::vector<int> ();
2189 std::cout <<
">> Structure rotation initiated." << std::endl;
2197 std::cout <<
"Structure with symmetry axis to box axes alignment writted in " << setUp->
clearMapFile << std::endl;
2204 std::stringstream hlpSS;
2205 hlpSS <<
"<font color=\"green\">" <<
"COMPLETED." <<
"</font>";
2206 rvapi_set_text ( hlpSS.str().c_str(),
2223 rvapi_set_text (
"<h1>ProSHADE Results: Half-maps re-boxing</h1>",
2232 rvapi_add_section (
"ProgressSection",
2242 std::stringstream hlpSS;
2243 hlpSS <<
"<font color=\"green\">" <<
"Starting the re-boxing of half-maps." <<
"</font>";
2244 rvapi_set_text ( hlpSS.str().c_str(),
2264 std::cout <<
"-----------------------------------------------------------" << std::endl;
2265 std::cout <<
"| MODE: Re-boxing map |" << std::endl;
2266 std::cout <<
"-----------------------------------------------------------" << std::endl << std::endl;
2272 rvapi_set_text (
"<h1>ProSHADE Results: Map Re-boxing</h1>",
2281 rvapi_add_section (
"ProgressSection",
2294 std::cerr <<
"!!! ProSHADE ERROR !!! Attampted to re-box a map, but supplied ";
2295 if ( setUp->
structFiles.size() < 1 ) { std::cerr <<
"less "; }
2296 if ( setUp->
structFiles.size() > 1 ) { std::cerr <<
"more "; }
2297 std::cerr <<
"than exactly one file. Please use the \'-f\' option to supply a single map file. Terminating ..." << std::endl << std::endl;
2301 std::stringstream hlpSS;
2302 hlpSS <<
"<font color=\"red\">" <<
"Supplied incorrect number (" << setUp->
structFiles.size() <<
") of structures - a single one expected." <<
"</font>";
2303 rvapi_set_text ( hlpSS.str().c_str(),
2305 settings->htmlReportLineProgress,
2316 std::stringstream hlpSS;
2317 hlpSS <<
"<font color=\"green\">" <<
"Starting computation of map re-boxing for the input structure " << setUp->
structFiles.at(0) <<
" ." <<
"</font>";
2318 rvapi_set_text ( hlpSS.str().c_str(),
2338 std::cout <<
"-----------------------------------------------------------" << std::endl;
2339 std::cout <<
"| MODE: Distances |" << std::endl;
2340 std::cout <<
"-----------------------------------------------------------" << std::endl << std::endl;
2346 rvapi_set_text (
"<h1>ProSHADE Results: Distances</h1>",
2355 rvapi_add_section (
"ProgressSection",
2365 std::stringstream hlpSS;
2366 hlpSS <<
"<font color=\"green\">" <<
"Starting computation of distances between input structures." <<
"</font>";
2367 rvapi_set_text ( hlpSS.str().c_str(),
2390 std::cout << std::endl <<
"-----------------------------------------------------------" << std::endl;
2391 std::cout <<
"| COMPLETED |" << std::endl;
2392 std::cout <<
"-----------------------------------------------------------" << std::endl << std::endl;
2398 std::stringstream hlpSS;
2399 hlpSS <<
"<font color=\"green\">" <<
"COMPLETED." <<
"</font>";
2400 rvapi_set_text ( hlpSS.str().c_str(),
2412 std::cout <<
"-----------------------------------------------------------" << std::endl;
2413 std::cout <<
"| RESULTS |" << std::endl;
2414 std::cout <<
"-----------------------------------------------------------" << std::endl << std::endl;
2420 rvapi_add_section (
"ResultsSection",
2430 rvapi_add_grid (
"distGrid",
2438 rvapi_add_table (
"DistancesTable",
2439 "Distances between structures",
2448 std::stringstream hlpSS;
2453 hlpSS.str ( std::string ( ) );
2454 hlpSS <<
"This column contains the distances obtained by computing correlations between the spherical harmonics on different shells and then comparing these correlation tables between the two structures. These distances are all from structure " << setUp->
structFiles.at(0) <<
" and the structure named in the row name.";
2455 rvapi_put_horz_theader (
"DistancesTable",
"Energy Levels Distances", hlpSS.str().c_str(), columnIter );
2461 hlpSS.str ( std::string ( ) );
2462 hlpSS <<
"This column contains the distances obtained by calculating the distances in spherical harmonics coefficients integrated over all the shells, using Singular Value Decomposition to approximate the rotation difference. These distances are all from structure " << setUp->
structFiles.at(0) <<
" and the structure named in the row name.";
2463 rvapi_put_horz_theader (
"DistancesTable",
"Trace Sigma Distances", hlpSS.str().c_str(), columnIter );
2469 hlpSS.str ( std::string ( ) );
2470 hlpSS <<
"This column contains the distances obtained by calculating the distances in spherical harmonics coefficients integrated over all the shells, using the Rotation Function to find the optimal overlay rotation between the structures. These distances are all from structure " << setUp->
structFiles.at(0) <<
" and the structure named in the row name.";
2471 rvapi_put_horz_theader (
"DistancesTable",
"Rotation Function Distances", hlpSS.str().c_str(), columnIter );
2476 for (
unsigned int iter = 1; iter < static_cast<unsigned int> ( setUp->
structFiles.size() ); iter++ )
2478 hlpSS.str ( std::string ( ) );
2480 rvapi_put_vert_theader (
"DistancesTable", hlpSS.str().c_str(),
"", iter-1 );
2490 printf (
"Energy Level Descriptor distances : %+.4f", this->crossCorrDists.at(0) );
2491 for (
unsigned int iter = 1; iter < static_cast<unsigned int> ( this->crossCorrDists.size() ); iter++ )
2493 printf (
" %+.4f", this->crossCorrDists.at(iter) );
2495 std::cout << std::endl;
2504 printf (
"Trace Sigma Descriptor distances : %+.4f", this->traceSigmaDists.at(0) );
2505 for (
unsigned int iter = 1; iter < static_cast<unsigned int> ( this->traceSigmaDists.size() ); iter++ )
2507 printf (
" %+.4f", this->traceSigmaDists.at(iter) );
2509 std::cout << std::endl;
2517 printf (
"Rotation Function Descriptor distances : %+.4f", this->rotFunctionDists.at(0) );
2518 for (
unsigned int iter = 1; iter < static_cast<unsigned int> ( this->rotFunctionDists.size() ); iter++ )
2520 printf (
" %+.4f", this->rotFunctionDists.at(iter) );
2522 std::cout << std::endl;
2528 for (
unsigned int iter = 1; iter < static_cast<unsigned int> ( setUp->
structFiles.size() ); iter++ )
2530 std::cout <<
"Matching structure names : " << setUp->
structFiles.at(iter) << std::endl;
2532 std::cout << std::endl;
2538 std::stringstream hlpSS;
2542 for (
unsigned int rIter = 0; rIter < static_cast<unsigned int> ( this->crossCorrDists.size() ); rIter++ )
2544 hlpSS.str ( std::string ( ) );
2545 hlpSS << this->crossCorrDists.at(rIter);
2546 rvapi_put_table_string (
"DistancesTable", hlpSS.str().c_str(), rIter, colIter );
2553 for (
unsigned int rIter = 0; rIter < static_cast<unsigned int> ( this->traceSigmaDists.size() ); rIter++ )
2555 hlpSS.str ( std::string ( ) );
2556 hlpSS << this->traceSigmaDists.at(rIter);
2557 rvapi_put_table_string (
"DistancesTable", hlpSS.str().c_str(), rIter, colIter );
2564 for (
unsigned int rIter = 0; rIter < static_cast<unsigned int> ( this->rotFunctionDists.size() ); rIter++ )
2566 hlpSS.str ( std::string ( ) );
2567 hlpSS << this->rotFunctionDists.at(rIter);
2568 rvapi_put_table_string (
"DistancesTable", hlpSS.str().c_str(), rIter, colIter );
2577 std::cout <<
"NOTE: If you do not see a structure you were expecting and know to be in the database, it may be caused by the querry structure and the one you were expecting having too different dimmensions - see the help dialogue for parameter \'--dbSizeLim\'." << std::endl << std::endl;
2580 this->distancesAvailable =
true;
2590 std::cout <<
"-----------------------------------------------------------" << std::endl;
2591 std::cout <<
"| MODE: DistancesFrag |" << std::endl;
2592 std::cout <<
"-----------------------------------------------------------" << std::endl << std::endl;
2598 rvapi_set_text (
"<h1>ProSHADE Results: Searching fragments in database</h1>",
2607 rvapi_add_section (
"ProgressSection",
2617 std::stringstream hlpSS;
2618 hlpSS <<
"<font color=\"green\">" <<
"Starting fragment search of file " << setUp->
structFiles.at(0) <<
" against the database." <<
"</font>";
2619 rvapi_set_text ( hlpSS.str().c_str(),
2633 std::cout << std::endl <<
"-----------------------------------------------------------" << std::endl;
2634 std::cout <<
"| COMPLETED |" << std::endl;
2635 std::cout <<
"-----------------------------------------------------------" << std::endl << std::endl;
2640 std::stringstream hlpSS;
2641 hlpSS <<
"<font color=\"green\">" <<
"COMPLETED." <<
"</font>";
2642 rvapi_set_text ( hlpSS.str().c_str(),
2655 std::cout <<
"-----------------------------------------------------------" << std::endl;
2656 std::cout <<
"| RESULTS |" << std::endl;
2657 std::cout <<
"-----------------------------------------------------------" << std::endl << std::endl;
2660 std::vector< std::vector<double> > enLevDists;
2661 std::vector< std::vector<double> > trSigmaDists;
2662 std::vector< std::vector<double> > fullRotFnDists;
2680 double maxFrag = std::max ( enLevDists.size(), std::max ( trSigmaDists.size(), fullRotFnDists.size() ) );
2681 for (
unsigned int frag = 0; frag < static_cast<unsigned int> ( maxFrag ); frag++ )
2683 printf (
"Fragment %d Results:\n", frag );
2684 printf (
"--------------------\n" );
2687 printf (
"Energy levels descriptor distances : %+.4f", enLevDists.at(frag).at(0) );
2688 for (
unsigned int iter = 1; iter < static_cast<unsigned int> ( enLevDists.at(frag).size() ); iter++ )
2690 printf (
" %+.4f", enLevDists.at(frag).at(iter) );
2692 std::cout << std::endl;
2696 printf (
"Trace sigma descriptor distances : %+.4f", trSigmaDists.at(frag).at(0) );
2697 for (
unsigned int iter = 1; iter < static_cast<unsigned int> ( trSigmaDists.at(frag).size() ); iter++ )
2699 printf (
" %+.4f", trSigmaDists.at(frag).at(iter) );
2701 std::cout << std::endl;
2705 printf (
"Full RF descriptor distances : %+.4f", fullRotFnDists.at(frag).at(0) );
2706 for (
unsigned int iter = 1; iter < static_cast<unsigned int> ( fullRotFnDists.at(frag).size() ); iter++ )
2708 printf (
" %+.4f", fullRotFnDists.at(frag).at(iter) );
2710 std::cout << std::endl;
2712 std::cout << std::endl;
2715 std::cout << std::endl;
2716 for (
unsigned int iter = 1; iter < static_cast<unsigned int> ( setUp->
structFiles.size() ); iter++ )
2718 std::cout <<
"Matching structure names : " << setUp->
structFiles.at(iter) << std::endl;
2724 int maxFrag = std::max ( enLevDists.size(), std::max ( trSigmaDists.size(), fullRotFnDists.size() ) );
2727 rvapi_add_section (
"ResultsSection",
2728 "Fragment Distances",
2730 settings->htmlReportLine,
2735 settings->htmlReportLine += 1;
2738 rvapi_add_table (
"FragmentDistancesELTable",
2739 "Fragment Energy Level distances to database entries",
2744 enLevDists.at(0).size(),
2748 for (
unsigned int iter = 0; iter < static_cast<unsigned int> ( enLevDists.at(0).size() ); iter++ )
2750 std::stringstream hlpSS;
2751 hlpSS <<
"Database entry " << setUp->
structFiles.at(iter);
2752 std::stringstream hlpSS2;
2753 hlpSS2 <<
"This is the Energy Levels distance for the fragment in the row to the database entry listed here (" << setUp->
structFiles.at(iter) <<
")";
2754 rvapi_put_horz_theader (
"FragmentDistancesELTable", hlpSS.str().c_str(), hlpSS2.str().c_str(), iter );
2758 for (
unsigned int iter = 0; iter < static_cast<unsigned int> ( maxFrag ); iter++ )
2760 std::stringstream hlpSS;
2761 hlpSS <<
"Fragment Number " << iter;
2762 std::stringstream hlpSS2;
2763 hlpSS2 <<
"This is the Energy Levels distance for the fragment number " << iter <<
" to the database entry in the column header.";
2764 rvapi_put_vert_theader (
"FragmentDistancesELTable", hlpSS.str().c_str(), hlpSS2.str().c_str(), iter );
2768 for (
unsigned int rIter = 0; rIter < static_cast<unsigned int> ( enLevDists.size() ); rIter++ )
2770 for (
unsigned int cIter = 0; cIter < static_cast<unsigned int> ( enLevDists.at(rIter).size() ); cIter++ )
2772 std::stringstream hlpSS;
2773 hlpSS << std::showpos << ProSHADE_internal_misc::roundDouble ( enLevDists.at(rIter).at(cIter) * 1000.0 ) / 1000.0;
2774 if ( hlpSS.str().length() != 6 ) {
int hlp = 6 - hlpSS.str().length();
for (
int i = 0; i < hlp; i++ ) { hlpSS <<
" "; } }
2775 if ( hlpSS.str().length() > 6 ) { hlpSS.str( hlpSS.str().substr( 0, 6 ) ); }
2776 rvapi_put_table_string (
"FragmentDistancesELTable", hlpSS.str().c_str(), rIter, cIter );
2781 rvapi_add_table (
"FragmentDistancesTSTable",
2782 "Fragment Trace Sigma distances to database entries",
2784 enLevDists.size() + 1,
2786 trSigmaDists.size(),
2787 trSigmaDists.at(0).size(),
2791 for (
unsigned int iter = 0; iter < static_cast<unsigned int> ( enLevDists.at(0).size() ); iter++ )
2793 std::stringstream hlpSS;
2794 hlpSS <<
"Database entry " << setUp->
structFiles.at(iter);
2795 std::stringstream hlpSS2;
2796 hlpSS2 <<
"This is the Trace Sigma distance for the fragment in the row to the database entry listed here (" << setUp->
structFiles.at(iter) <<
")";
2797 rvapi_put_horz_theader (
"FragmentDistancesTSTable", hlpSS.str().c_str(), hlpSS2.str().c_str(), iter );
2801 for (
unsigned int iter = 0; iter < static_cast<unsigned int> ( maxFrag ); iter++ )
2803 std::stringstream hlpSS;
2804 hlpSS <<
"Fragment Number " << iter;
2805 std::stringstream hlpSS2;
2806 hlpSS2 <<
"This is the Trace Sigma distance for the fragment number " << iter <<
" to the database entry in the column header.";
2807 rvapi_put_vert_theader (
"FragmentDistancesTSTable", hlpSS.str().c_str(), hlpSS2.str().c_str(), iter );
2811 for (
unsigned int rIter = 0; rIter < static_cast<unsigned int> ( trSigmaDists.size() ); rIter++ )
2813 for (
unsigned int cIter = 0; cIter < static_cast<unsigned int> ( trSigmaDists.at(rIter).size() ); cIter++ )
2815 std::stringstream hlpSS;
2816 hlpSS << std::showpos << ProSHADE_internal_misc::roundDouble ( trSigmaDists.at(rIter).at(cIter) * 1000.0 ) / 1000.0;
2817 if ( hlpSS.str().length() != 6 ) {
int hlp = 6 - hlpSS.str().length();
for (
int i = 0; i < hlp; i++ ) { hlpSS <<
" "; } }
2818 if ( hlpSS.str().length() > 6 ) { hlpSS.str( hlpSS.str().substr( 0, 6 ) ); }
2819 rvapi_put_table_string (
"FragmentDistancesTSTable", hlpSS.str().c_str(), rIter, cIter );
2824 rvapi_add_table (
"FragmentDistancesRFTable",
2825 "Fragment Rotation Function distances to database entries",
2827 enLevDists.size() + trSigmaDists.size() + 1,
2829 fullRotFnDists.size(),
2830 fullRotFnDists.at(0).size(),
2834 for (
unsigned int iter = 0; iter < static_cast<unsigned int> ( fullRotFnDists.at(0).size() ); iter++ )
2836 std::stringstream hlpSS;
2837 hlpSS <<
"Database entry " << setUp->
structFiles.at(iter);
2838 std::stringstream hlpSS2;
2839 hlpSS2 <<
"This is the Rotation Function distance for the fragment in the row to the database entry listed here (" << setUp->
structFiles.at(iter) <<
")";
2840 rvapi_put_horz_theader (
"FragmentDistancesRFTable", hlpSS.str().c_str(), hlpSS2.str().c_str(), iter );
2844 for (
unsigned int iter = 0; iter < static_cast<unsigned int> ( maxFrag ); iter++ )
2846 std::stringstream hlpSS;
2847 hlpSS <<
"Fragment Number " << iter;
2848 std::stringstream hlpSS2;
2849 hlpSS2 <<
"This is the Rotation Function distance for the fragment number " << iter <<
" to the database entry in the column header.";
2850 rvapi_put_vert_theader (
"FragmentDistancesRFTable", hlpSS.str().c_str(), hlpSS2.str().c_str(), iter );
2854 for (
unsigned int rIter = 0; rIter < static_cast<unsigned int> ( fullRotFnDists.size() ); rIter++ )
2856 for (
unsigned int cIter = 0; cIter < static_cast<unsigned int> ( fullRotFnDists.at(rIter).size() ); cIter++ )
2858 std::stringstream hlpSS;
2859 hlpSS << std::showpos << ProSHADE_internal_misc::roundDouble ( fullRotFnDists.at(rIter).at(cIter) * 1000.0 ) / 1000.0;
2860 if ( hlpSS.str().length() != 6 ) {
int hlp = 6 - hlpSS.str().length();
for (
int i = 0; i < hlp; i++ ) { hlpSS <<
" "; } }
2861 if ( hlpSS.str().length() > 6 ) { hlpSS.str( hlpSS.str().substr( 0, 6 ) ); }
2862 rvapi_put_table_string (
"FragmentDistancesRFTable", hlpSS.str().c_str(), rIter, cIter );
2881 this->crossCorrDists.clear ( );
2882 this->traceSigmaDists.clear ( );
2883 this->rotFunctionDists.clear ( );
2884 this->cyclicSymmetries.clear ( );
2885 this->cyclicSymmetriesClear.clear ( );
2886 this->dihedralSymmetries.clear ( );
2887 this->tetrahedralSymmetry.clear ( );
2888 this->octahedralSymmetry.clear ( );
2889 this->icosahedralSymmetry.clear ( );
2890 this->fragmentList.clear ( );
2904 return ( std::string ( __PROSHADE_VERSION__ ) );
2934 double ret = ProSHADE_internal_misc::modelRadiusCalc ( modelPath );
2949 if ( !this->fragmentsAvailable )
2951 std::cerr <<
"!!! ProSHADE ERROR !!! Attempted to obtain list of map fragments, but did not compute the fragmentation beforehand. This is an undefined behaviour - terminating..." << std::endl;
2956 return ( this->fragmentList );
2970 if ( this->distancesAvailable )
2972 return ( this->crossCorrDists );
2976 std::cout <<
"!!! ProSHADE WARNING !!! Attempted to access the cross-correlation distances without requesting their computation first. Returning empty vector." << std::endl;
2977 return ( std::vector<double> () );
2996 if ( this->distancesAvailable )
2998 return ( this->traceSigmaDists );
3002 std::cout <<
"!!! ProSHADE WARNING !!! Attempted to access the trace sigma distances without requesting their computation first. Returning empty vector." << std::endl;
3003 return ( std::vector<double> () );
3022 if ( this->distancesAvailable )
3024 return ( this->rotFunctionDists );
3028 std::cout <<
"!!! ProSHADE WARNING !!! Attempted to access the rotation function based distances without requesting their computation first. Returning empty vector." << std::endl;
3029 return ( std::vector<double> () );
3048 if ( this->symmetriesAvailable )
3050 return ( this->cyclicSymmetries );
3054 std::cout <<
"!!! ProSHADE WARNING !!! Attempted to access the cyclic symmetries list without requesting their computation first. Returning empty vector of arrays." << std::endl;
3055 return ( std::vector< std::array<double,5> > () );
3074 if ( this->symmetriesAvailable )
3076 return ( this->cyclicSymmetriesClear );
3080 std::cout <<
"!!! ProSHADE WARNING !!! Attempted to access the clear cyclic symmetries list without requesting their computation first. Returning empty vector of arrays." << std::endl;
3081 return ( std::vector< std::array<double,5> > () );
3102 if ( this->symmetriesAvailable )
3104 std::vector< double > ret;
3106 for (
unsigned int iter = 0; iter < static_cast<unsigned int> ( this->cyclicSymmetries.size() ); iter++ )
3108 for (
unsigned int it = 0; it < static_cast<unsigned int> ( this->cyclicSymmetries.at(iter).size() ); it++ )
3110 ret.emplace_back ( this->cyclicSymmetries.at(iter).at(it) );
3112 ret.emplace_back ( -999.999 );
3119 std::cout <<
"!!! ProSHADE WARNING !!! Attempted to access the cyclic symmetries list without requesting their computation first. Returning empty vector of arrays." << std::endl;
3120 return ( std::vector< double > () );
3142 if ( this->symmetriesAvailable )
3144 std::vector< double > ret;
3146 for (
unsigned int i = 0; i < static_cast<unsigned int> ( this->dihedralSymmetries.size() ); i++ )
3148 for (
unsigned int iter = 0; iter < static_cast<unsigned int> ( this->dihedralSymmetries.at(i).size() ); iter++ )
3150 for (
unsigned int it = 0; it < static_cast<unsigned int> ( this->dihedralSymmetries.at(i).at(iter).size() ); it++ )
3152 ret.emplace_back ( this->dihedralSymmetries.at(i).at(iter).at(it) );
3154 ret.emplace_back ( -999.999 );
3156 ret.emplace_back ( -777.777 );
3163 std::cout <<
"!!! ProSHADE WARNING !!! Attempted to access the dihedral symmetries list without requesting their computation first. Returning empty vector of arrays." << std::endl;
3164 return ( std::vector< double > () );
3184 if ( this->symmetriesAvailable )
3186 return ( this->dihedralSymmetries );
3190 std::cout <<
"!!! ProSHADE WARNING !!! Attempted to access the dihedral symmetries list without requesting their computation first. Returning empty vector of arrays." << std::endl;
3191 return ( std::vector< std::vector< std::array<double,6> > > () );
3211 if ( this->symmetriesAvailable )
3213 return ( this->dihedralSymmetriesClear );
3217 std::cout <<
"!!! ProSHADE WARNING !!! Attempted to access the clear dihedral symmetries list without requesting their computation first. Returning empty vector of arrays." << std::endl;
3218 return ( std::vector< std::vector< std::array<double,6> > > () );
3237 if ( this->symmetriesAvailable )
3239 return ( this->tetrahedralSymmetry );
3243 std::cout <<
"!!! ProSHADE WARNING !!! Attempted to access the tetrahedral symmetry list without requesting their computation first. Returning empty vector of arrays." << std::endl;
3244 return ( std::vector< std::array<double,5> > () );
3264 if ( this->symmetriesAvailable )
3266 std::vector< double > ret;
3268 for (
unsigned int iter = 0; iter < static_cast<unsigned int> ( this->tetrahedralSymmetry.size() ); iter++ )
3270 for (
unsigned int it = 0; it < static_cast<unsigned int> ( this->tetrahedralSymmetry.at(iter).size() ); it++ )
3272 ret.emplace_back ( this->tetrahedralSymmetry.at(iter).at(it) );
3274 ret.emplace_back ( -999.999 );
3281 std::cout <<
"!!! ProSHADE WARNING !!! Attempted to access the tetrahedral symmetry list without requesting their computation first. Returning empty vector of arrays." << std::endl;
3282 return ( std::vector< double > () );
3301 if ( this->symmetriesAvailable )
3303 return ( this->octahedralSymmetry );
3307 std::cout <<
"!!! ProSHADE WARNING !!! Attempted to access the octahedral symmetry list without requesting their computation first. Returning empty vector of arrays." << std::endl;
3308 return ( std::vector< std::array<double,5> > () );
3328 if ( this->symmetriesAvailable )
3330 std::vector< double > ret;
3332 for (
unsigned int iter = 0; iter < static_cast<unsigned int> ( this->octahedralSymmetry.size() ); iter++ )
3334 for (
unsigned int it = 0; it < static_cast<unsigned int> ( this->octahedralSymmetry.at(iter).size() ); it++ )
3336 ret.emplace_back ( this->octahedralSymmetry.at(iter).at(it) );
3338 ret.emplace_back ( -999.999 );
3345 std::cout <<
"!!! ProSHADE WARNING !!! Attempted to access the octahedral symmetry list without requesting their computation first. Returning empty vector of arrays." << std::endl;
3346 return ( std::vector< double > () );
3365 if ( this->symmetriesAvailable )
3367 return ( this->icosahedralSymmetry );
3371 std::cout <<
"!!! ProSHADE WARNING !!! Attempted to access the icosahedral symmetry list without requesting their computation first. Returning empty vector of arrays." << std::endl;
3372 return ( std::vector< std::array<double,5> > () );
3392 if ( this->symmetriesAvailable )
3394 std::vector< double > ret;
3396 for (
unsigned int iter = 0; iter < static_cast<unsigned int> ( this->icosahedralSymmetry.size() ); iter++ )
3398 for (
unsigned int it = 0; it < static_cast<unsigned int> ( this->icosahedralSymmetry.at(iter).size() ); it++ )
3400 ret.emplace_back ( this->icosahedralSymmetry.at(iter).at(it) );
3402 ret.emplace_back ( -999.999 );
3409 std::cout <<
"!!! ProSHADE WARNING !!! Attempted to access the icosahedral symmetry list without requesting their computation first. Returning empty vector of arrays." << std::endl;
3410 return ( std::vector< double > () );
3430 if ( this->symmetriesAvailable )
3434 std::vector< std::array<double,5> > ret;
3435 std::array<double,5> hlpArr;
3443 ret.emplace_back ( hlpArr );
3446 if ( this->icosahedralSymmetry.size() < 1 )
3448 this->icosahedralSymmetry = getIcosahedralSymmetries ( );
3451 if ( static_cast<unsigned int> ( this->icosahedralSymmetry.size() ) > 0 )
3453 std::vector< std::array<double,5> > hlp = symObj.
generateIcosElements ( this->icosahedralSymmetry, this->settings, -1 );
3454 for (
unsigned int iter = 1; iter < static_cast<unsigned int> ( hlp.size() ); iter++ )
3456 ret.emplace_back ( hlp.at(iter) );
3462 if ( this->octahedralSymmetry.size() < 1 )
3464 this->octahedralSymmetry = getOctahedralSymmetries ( );
3467 if ( static_cast<unsigned int> ( this->octahedralSymmetry.size() ) > 0 )
3469 std::vector< std::array<double,5> > hlp = symObj.
generateOctaElements ( this->octahedralSymmetry, this->settings, -1 );
3470 for (
unsigned int iter = 1; iter < static_cast<unsigned int> ( hlp.size() ); iter++ )
3472 ret.emplace_back ( hlp.at(iter) );
3478 if ( this->tetrahedralSymmetry.size() < 1 )
3480 this->tetrahedralSymmetry = getTetrahedralSymmetries ( );
3483 if ( static_cast<unsigned int> ( this->tetrahedralSymmetry.size() ) > 0 )
3485 std::vector< std::array<double,5> > hlp = symObj.
generateTetrElements ( this->tetrahedralSymmetry, this->settings, -1 );
3486 for (
unsigned int iter = 1; iter < static_cast<unsigned int> ( hlp.size() ); iter++ )
3488 ret.emplace_back ( hlp.at(iter) );
3494 if ( this->dihedralSymmetries.size() < 1 )
3496 this->dihedralSymmetries = getDihedralSymmetries ( );
3498 this->dihedralSymmetriesClear = getClearDihedralSymmetries ( );
3500 if ( static_cast<unsigned int> ( this->dihedralSymmetriesClear.size() ) > 0 )
3502 for (
unsigned int it = 0; it < 2; it++ )
3504 if ( static_cast<int> ( this->dihedralSymmetriesClear.at(0).at(it)[0] ) % 2 == 0 )
3506 for (
int iter = -std::ceil( static_cast<int> ( this->dihedralSymmetriesClear.at(0).at(it)[0] ) / 2.0 ); iter <= std::ceil( static_cast<int> ( this->dihedralSymmetriesClear.at(0).at(it)[0] ) / 2.0 ); iter++ )
3508 if ( iter == 0 ) {
continue; }
3509 if ( iter == -std::ceil( static_cast<int> ( this->dihedralSymmetriesClear.at(0).at(it)[0] ) / 2.0 ) ) {
continue; }
3510 hlpArr[0] = this->dihedralSymmetriesClear.at(0).at(it)[0];
3511 hlpArr[1] = this->dihedralSymmetriesClear.at(0).at(it)[1];
3512 hlpArr[2] = this->dihedralSymmetriesClear.at(0).at(it)[2];
3513 hlpArr[3] = this->dihedralSymmetriesClear.at(0).at(it)[3];
3514 hlpArr[4] = iter * ( ( 2.0 * M_PI ) / static_cast<double> ( this->dihedralSymmetriesClear.at(0).at(it)[0] ) );
3515 ret.emplace_back ( hlpArr );
3520 for (
int iter = -std::floor( static_cast<int> ( this->dihedralSymmetriesClear.at(0).at(it)[0] ) / 2.0 ); iter <= std::floor( static_cast<int> ( this->dihedralSymmetriesClear.at(0).at(it)[0] ) / 2.0 ); iter++ )
3522 if ( iter == 0 ) {
continue; }
3523 hlpArr[0] = this->dihedralSymmetriesClear.at(0).at(it)[0];
3524 hlpArr[1] = this->dihedralSymmetriesClear.at(0).at(it)[1];
3525 hlpArr[2] = this->dihedralSymmetriesClear.at(0).at(it)[2];
3526 hlpArr[3] = this->dihedralSymmetriesClear.at(0).at(it)[3];
3527 hlpArr[4] = iter * ( ( 2.0 * M_PI ) / static_cast<double> ( this->dihedralSymmetriesClear.at(0).at(it)[0] ) );
3528 ret.emplace_back ( hlpArr );
3537 if ( this->cyclicSymmetries.size() < 1 )
3539 this->cyclicSymmetries = getCyclicSymmetries ( );
3541 this->cyclicSymmetriesClear = getClearCyclicSymmetries ( );
3543 if ( static_cast<unsigned int> ( this->cyclicSymmetriesClear.size() ) > 0 )
3545 if ( static_cast<int> ( this->cyclicSymmetriesClear.at(0)[0] ) % 2 == 0 )
3547 for (
int iter = -std::ceil( static_cast<int> ( this->cyclicSymmetriesClear.at(0)[0] ) / 2.0 ); iter <= std::ceil( static_cast<int> ( this->cyclicSymmetriesClear.at(0)[0] ) / 2.0 ); iter++ )
3549 if ( iter == 0 ) {
continue; }
3550 if ( iter == -std::ceil( static_cast<int> ( this->cyclicSymmetriesClear.at(0)[0] ) / 2.0 ) ) {
continue; }
3551 hlpArr[0] = this->cyclicSymmetriesClear.at(0)[0];
3552 hlpArr[1] = this->cyclicSymmetriesClear.at(0)[1];
3553 hlpArr[2] = this->cyclicSymmetriesClear.at(0)[2];
3554 hlpArr[3] = this->cyclicSymmetriesClear.at(0)[3];
3555 hlpArr[4] = iter * ( ( 2.0 * M_PI ) / static_cast<double> ( this->cyclicSymmetriesClear.at(0)[0] ) );
3556 ret.emplace_back ( hlpArr );
3561 for (
int iter = -std::floor( static_cast<int> ( this->cyclicSymmetriesClear.at(0)[0] ) / 2.0 ); iter <= std::floor( static_cast<int> ( this->cyclicSymmetriesClear.at(0)[0] ) / 2.0 ); iter++ )
3563 if ( iter == 0 ) {
continue; }
3564 hlpArr[0] = this->cyclicSymmetriesClear.at(0)[0];
3565 hlpArr[1] = this->cyclicSymmetriesClear.at(0)[1];
3566 hlpArr[2] = this->cyclicSymmetriesClear.at(0)[2];
3567 hlpArr[3] = this->cyclicSymmetriesClear.at(0)[3];
3568 hlpArr[4] = iter * ( ( 2.0 * M_PI ) / static_cast<double> ( this->cyclicSymmetriesClear.at(0)[0] ) );
3569 ret.emplace_back ( hlpArr );
3576 std::cout <<
"!!! ProSHADE WARNING !!! Did not find any symmetries to report. Returning empty vector..." << std::endl;
3577 return ( std::vector< std::array<double,5> > () );
3581 std::cout <<
"!!! ProSHADE WARNING !!! Attempted to access the symmetry elements list without requesting their computation first. Returning empty vector of arrays." << std::endl;
3582 return ( std::vector< std::array<double,5> > () );
3586 std::cerr <<
"!!! ProSHADE ERROR !!! Something went wery wrong... Please report this. Returning empty vector..." << std::endl;
3587 return ( std::vector< std::array<double,5> > () );
3605 if ( this->symmetriesAvailable )
3607 std::vector< std::array< double, 5 > > hlp = this->getRecommendedSymmetry ( );
3608 std::vector< double > ret;
3610 for (
unsigned int iter = 0; iter < static_cast<unsigned int> ( hlp.size() ); iter++ )
3612 for (
unsigned int it = 0; it < static_cast<unsigned int> ( hlp.at(iter).size() ); it++ )
3614 ret.emplace_back ( hlp.at(iter).at(it) );
3616 ret.emplace_back ( -999.999 );
3623 std::cout <<
"!!! ProSHADE WARNING !!! Attempted to access the symmetry elements list without requesting their computation first. Returning empty vector." << std::endl;
3624 return ( std::vector< double > () );
3647 if ( this->symmetriesAvailable )
3651 std::vector< std::array<double,5> > ret;
3652 std::array<double,5> hlpArr;
3660 ret.emplace_back ( hlpArr );
3665 if ( symType ==
"D" )
3668 if ( this->dihedralSymmetries.size() < 1 )
3670 this->dihedralSymmetries = getDihedralSymmetries ( );
3674 symFold = this->dihedralSymmetries.at(0).at(0)[0];
3679 if ( this->cyclicSymmetries.size() < 1 )
3681 this->cyclicSymmetries = getCyclicSymmetries ( );
3685 symFold = this->cyclicSymmetries.at(0)[0];
3690 if ( symType ==
"C" )
3693 if ( this->cyclicSymmetries.size() < 1 )
3695 this->cyclicSymmetries = getCyclicSymmetries ( );
3699 bool foundSym =
false;
3700 for (
unsigned int it = 0; it < static_cast<unsigned int> ( this->cyclicSymmetries.size() ); it++ )
3702 if ( this->cyclicSymmetries.at(it)[0] == symFold )
3708 if ( static_cast<int> ( this->cyclicSymmetries.at(it)[0] ) % 2 == 0 )
3710 for (
int iter = -std::ceil( static_cast<int> ( this->cyclicSymmetries.at(it)[0] ) / 2.0 ); iter <= std::ceil( static_cast<int> ( this->cyclicSymmetries.at(it)[0] ) / 2.0 ); iter++ )
3712 if ( iter == 0 ) {
continue; }
3713 if ( iter == -std::ceil( static_cast<int> ( this->cyclicSymmetries.at(it)[0] ) / 2.0 ) ) {
continue; }
3714 hlpArr[0] = this->cyclicSymmetries.at(it)[0];
3715 hlpArr[1] = this->cyclicSymmetries.at(it)[1];
3716 hlpArr[2] = this->cyclicSymmetries.at(it)[2];
3717 hlpArr[3] = this->cyclicSymmetries.at(it)[3];
3718 hlpArr[4] = iter * ( ( 2.0 * M_PI ) / static_cast<double> ( this->cyclicSymmetries.at(it)[0] ) );
3719 ret.emplace_back ( hlpArr );
3724 for (
int iter = -std::floor( static_cast<int> ( this->cyclicSymmetries.at(it)[0] ) / 2.0 ); iter <= std::floor( static_cast<int> ( this->cyclicSymmetries.at(it)[0] ) / 2.0 ); iter++ )
3726 if ( iter == 0 ) {
continue; }
3727 hlpArr[0] = this->cyclicSymmetries.at(it)[0];
3728 hlpArr[1] = this->cyclicSymmetries.at(it)[1];
3729 hlpArr[2] = this->cyclicSymmetries.at(it)[2];
3730 hlpArr[3] = this->cyclicSymmetries.at(it)[3];
3731 hlpArr[4] = iter * ( ( 2.0 * M_PI ) / static_cast<double> ( this->cyclicSymmetries.at(it)[0] ) );
3732 ret.emplace_back ( hlpArr );
3744 std::cout <<
"!!! ProSHADE WARNING !!! Requested symmetry elements for " << symType <<
"-" << symFold <<
" symmetry, but this symmetry was not found. Returning empty vector." << std::endl;
3745 return ( std::vector< std::array<double,5> > () );
3750 if ( symType ==
"D" )
3753 if ( this->dihedralSymmetries.size() < 1 )
3755 this->dihedralSymmetries = getDihedralSymmetries ( );
3759 bool foundSym =
false;
3760 for (
unsigned int i = 0; i < static_cast<unsigned int> ( this->dihedralSymmetries.size() ); i++ )
3762 if ( this->dihedralSymmetries.at(i).at(0)[0] == symFold )
3768 for (
unsigned int it = 0; it < 2; it++ )
3770 if ( static_cast<int> ( this->dihedralSymmetries.at(i).at(it)[0] ) % 2 == 0 )
3772 for (
int iter = -std::ceil( static_cast<int> ( this->dihedralSymmetries.at(i).at(it)[0] ) / 2.0 ); iter <= std::ceil( static_cast<int> ( this->dihedralSymmetries.at(i).at(it)[0] ) / 2.0 ); iter++ )
3774 if ( iter == 0 ) {
continue; }
3775 if ( iter == -std::ceil( static_cast<int> ( this->dihedralSymmetries.at(i).at(it)[0] ) / 2.0 ) ) {
continue; }
3776 hlpArr[0] = this->dihedralSymmetries.at(i).at(it)[0];
3777 hlpArr[1] = this->dihedralSymmetries.at(i).at(it)[1];
3778 hlpArr[2] = this->dihedralSymmetries.at(i).at(it)[2];
3779 hlpArr[3] = this->dihedralSymmetries.at(i).at(it)[3];
3780 hlpArr[4] = iter * ( ( 2.0 * M_PI ) / static_cast<double> ( this->dihedralSymmetries.at(i).at(it)[0] ) );
3781 ret.emplace_back ( hlpArr );
3786 for (
int iter = -std::floor( static_cast<int> ( this->dihedralSymmetries.at(i).at(it)[0] ) / 2.0 ); iter <= std::floor( static_cast<int> ( this->dihedralSymmetries.at(i).at(it)[0] ) / 2.0 ); iter++ )
3788 if ( iter == 0 ) {
continue; }
3789 hlpArr[0] = this->dihedralSymmetries.at(i).at(it)[0];
3790 hlpArr[1] = this->dihedralSymmetries.at(i).at(it)[1];
3791 hlpArr[2] = this->dihedralSymmetries.at(i).at(it)[2];
3792 hlpArr[3] = this->dihedralSymmetries.at(i).at(it)[3];
3793 hlpArr[4] = iter * ( ( 2.0 * M_PI ) / static_cast<double> ( this->dihedralSymmetries.at(i).at(it)[0] ) );
3794 ret.emplace_back ( hlpArr );
3807 std::cout <<
"!!! ProSHADE WARNING !!! Requested symmetry elements for " << symType <<
"-" << symFold <<
" symmetry, but this symmetry was not found. Returning empty vector." << std::endl;
3808 return ( std::vector< std::array<double,5> > () );
3813 if ( symType ==
"T" )
3816 if ( this->tetrahedralSymmetry.size() < 1 )
3818 this->tetrahedralSymmetry = getTetrahedralSymmetries ( );
3822 if ( this->tetrahedralSymmetry.size() > 1 )
3824 std::vector< std::array<double,5 >> hlp = symObj.
generateTetrElements ( this->tetrahedralSymmetry, settings, -1 );
3825 for (
unsigned int iter = 1; iter < static_cast<unsigned int> ( hlp.size() ); iter++ )
3827 ret.emplace_back ( hlp.at(iter) );
3832 if ( this->tetrahedralSymmetry.size() < 1 )
3834 std::cout <<
"!!! ProSHADE WARNING !!! Requested symmetry elements for tetrahedral symmetry, but this symmetry was not found. Returning empty vector." << std::endl;
3835 return ( std::vector< std::array<double,5> > () );
3840 if ( symType ==
"O" )
3843 if ( this->octahedralSymmetry.size() < 1 )
3845 this->octahedralSymmetry = getOctahedralSymmetries ( );
3849 if ( this->octahedralSymmetry.size() > 1 )
3851 std::vector< std::array<double,5> > hlp = symObj.
generateOctaElements ( this->octahedralSymmetry, settings, -1 );
3852 for (
unsigned int iter = 1; iter < static_cast<unsigned int> ( hlp.size() ); iter++ )
3854 ret.emplace_back ( hlp.at(iter) );
3859 if ( this->octahedralSymmetry.size() < 1 )
3861 std::cout <<
"!!! ProSHADE WARNING !!! Requested symmetry elements for octahedral symmetry, but this symmetry was not found. Returning empty vector." << std::endl;
3862 return ( std::vector< std::array<double,5> > () );
3867 if ( symType ==
"I" )
3870 if ( this->icosahedralSymmetry.size() < 1 )
3872 this->icosahedralSymmetry = getIcosahedralSymmetries ( );
3876 if ( this->icosahedralSymmetry.size() > 1 )
3878 std::vector< std::array<double,5> > hlp = symObj.
generateIcosElements ( this->icosahedralSymmetry, settings, -1 );
3879 for (
unsigned int iter = 1; iter < static_cast<unsigned int> ( hlp.size() ); iter++ )
3881 ret.emplace_back ( hlp.at(iter) );
3886 if ( this->icosahedralSymmetry.size() < 1 )
3888 std::cout <<
"!!! ProSHADE WARNING !!! Requested symmetry elements for icosahedral symmetry, but this symmetry was not found. Returning empty vector." << std::endl;
3889 return ( std::vector< std::array<double,5> > () );
3893 if ( ( symType !=
"I" ) && ( symType !=
"O" ) && ( symType !=
"T" ) && ( symType !=
"D" ) && ( symType !=
"C" ) )
3895 std::cerr <<
"!!! ProSHADE ERROR !!! Unknown symmetry type supplied to the \"getSpecificSymmetryElements\" function. Allowed values are \"C\", \"D\", \"T\", \"O\" and \"I\". Terminating..." << std::endl;
3904 std::cout <<
"!!! ProSHADE WARNING !!! Attempted to access the symmetry elements list without requesting their computation first. Returning empty vector of arrays." << std::endl;
3905 return ( std::vector< std::array<double,5> > () );
3909 std::cerr <<
"!!! ProSHADE ERROR !!! Something went wery wrong... Please report this. Returning empty vector..." << std::endl;
3910 return ( std::vector< std::array<double,5> > () );
3932 if ( this->symmetriesAvailable )
3934 std::vector< std::array< double, 5 > > hlp = this->getSpecificSymmetryElements ( symType, symFold );
3935 std::vector< double > ret;
3937 for (
unsigned int iter = 0; iter < static_cast<unsigned int> ( hlp.size() ); iter++ )
3939 for (
unsigned int it = 0; it < static_cast<unsigned int> ( hlp.at(iter).size() ); it++ )
3941 ret.emplace_back ( hlp.at(iter).at(it) );
3943 ret.emplace_back ( -999.999 );
3950 std::cout <<
"!!! ProSHADE WARNING !!! Attempted to access the symmetry elements list without requesting their computation first. Returning empty vector." << std::endl;
3951 return ( std::vector< double > () );
double aaErrorTolerance
The tolerance parameter on matching axes for the angle-axis representation of rotations.
bool wasBandGiven
Variable stating whether the bandwidth value was given by the user, or decided automatically.
std::vector< double > getIcosahedralSymmetriesPy(void)
Accessor function for the icosahedral symmetries list for python.
std::vector< std::array< double, 5 > > getRecommendedSymmetry(void)
Accessor function for the recommended symmetry elements list.
std::vector< std::vector< double > > getFragFullRotationDistances()
This function returns a vector of vectors of full rotation function distances between each fragment a...
std::string symmetryType
The required symmetry type. If no symmetry is required, leave empty. Possible values are: C...
double mapResolution
This is the internal resolution at which the calculations are done, not necessarily the resolution of...
std::vector< double > getRotFunctionDists(void)
Accessor function for the rotation function based distances vector.
double noIQRsFromMap
This is the number of interquartile distances from mean that is used to threshold the map masking...
This class is responsible for reading in map and computing all its features and other possible map ma...
std::vector< std::vector< std::array< double, 6 > > > getClearDihedralSymmetries(void)
Accessor function for the dihedral symmetries list. These will be sorted using the fold and peak heig...
bool clearMapData
This value is used to decide whether the input maps should be cleared again, or not.
unsigned int theta
This parameter is the longitude of the spherical grid mapping. It should be 2 * bandwidth unless ther...
std::vector< std::vector< std::array< double, 6 > > > dnSymmClear
This variable holds the gap corrected Dihedral symmetry results.
bool dbDistOverlay
This value is false in all conditions, unless programatically changed. If changed, distance computations will use the phaseless database to compute overlay before distances computation. This is computationally expensive and requires phaseless as well as phased database.
double bFactorValue
This is the value to which all B-factors of PDB files will be changed to.
std::string clearMapFile
If map features are to be extracted, should the clear map be saved (then give file name here)...
std::vector< double > getTetrahedralSymmetriesPy(void)
Accessor function for the tetrahedral symmetries list for python.
double databaseMinVolume
The smallest volume of a structure in the database.
std::vector< std::array< double, 5 > > cnSymm
This variable holds the complete Cyclic symmetry results.
void printSettings()
Function for outputting the current settings recorded in the ProSHADE_settings class instance...
std::string databaseName
The name of the bin file to which the database should be saved.
double zTranslation
The number of angstroms by which the structure should be translated along the Z axis.
bool overlayDefaults
If true, the shell spacing and distances will be doube to their typical values. This is to speed up m...
bool usePhase
Here the user can decide whether to use phase information or whether to ignore it completely...
bool wasExtraSpaceGiven
Variable stating whether the extra cell space value was given by the user, or decided automatically...
double mapFragBoxFraction
Fraction of box that needs to have density in order to be passed on.
std::vector< std::string > deleteModels
The filenames listed here consist of models which should have their density deleted from the map befo...
std::vector< std::array< double, 5 > > getIcosahedralSymmetries(void)
Accessor function for the icosahedral symmetries list.
unsigned int bandwidth
This parameter determines the angular resolution of the spherical harmonics decomposition.
std::vector< std::vector< double > > getFragTraceSigmaDistances()
This function returns a vector of vectors of trace sigma distances between each fragment and the whol...
bool wasShellSpacingGiven
Variable stating whether the distance between shells value was given by the user, or decided automati...
bool htmlReport
Should HTML report for the run be created?
int verbose
Should the software report on the progress, or just be quiet? Value between 0 (quiet) and 4 (loud) ...
double rotAngle
The angle of the rotation to be done to the map structure in the map rotation mode.
void printResultsClear(int verbose)
This function prints the cleared results to the screen.
bool saveWithAndWithout
This option decides whether both with and without phase spherical harmonics should be saved...
std::string getProSHADEVersion(void)
Miscellanous function allowing the user to get the ProSHADE version.
std::vector< std::array< double, 5 > > generateTetrElements(std::vector< std::array< double, 5 > > symmAxes, ProSHADE::ProSHADE_settings *settings, int verbose=0)
This function generates the 12 unique tetrahedral symmetry group elements from the already detected a...
The main header file containing all declarations the user of the library needs.
double trSigmaThreshold
All structure pairs with trace sigma descriptor value less than this will not be subjected to any fur...
double alpha
This parameter determines the power to which the |F|'s should be raised.
std::vector< std::array< double, 5 > > getCyclicSymmetries(void)
Accessor function for the cyclic symmetries list.
bool firstLineCOM
This is a special option for metal detection, please leave false.
void fragmentMap(std::string axOrder, int verbose, ProSHADE::ProSHADE_settings *settings)
This function takes the clear map produced already and fragments it into overlapping boxes of given s...
bool fullRotFnDist
Should the full rotation function distances descriptor be computed.
bool useCubicMaps
When saving clear maps, should the rectangular or cubic (older versions of refmac need this) maps be ...
bool maskBlurFactorGiven
Was a specific value of the blurring factor requested by the user?
std::vector< double > getFullRotationDistances()
This function returns a vector of full rotation function distances between the first and all other st...
std::vector< int > ignoreLs
This vector lists all the bandwidth values which should be ignored and not part of the computations...
int peakSurroundingPoints
For a peak to exist, how many points in every direction need to be smalled than the middle value...
double rotXAxis
The X-axis element of the rotation axis along which the rotation is to be done in the map rotation mo...
double shellSpacing
This parameter determines how far the radial shells should be from each other.
This file contains all the functions related to computing the Gauss-Legendre integration variables...
std::vector< std::array< double, 5 > > icosAxes
This variable holds the 31 unique axes of the octahedral symmetry, if they are found.
std::vector< std::array< double, 5 > > generateOctaElements(std::vector< std::array< double, 5 > > symmAxes, ProSHADE::ProSHADE_settings *settings, int verbose=0)
This function generates the 24 octahedral symmetry group elements from the axes generated by generate...
double databaseMaxVolume
The largest volume allowed to exist in the database.
std::vector< double > getDihedralSymmetriesPy(void)
Accessor function for the dihedral symmetries list for python.
ProSHADE(ProSHADE_settings *settings)
Contructor for the ProSHADE class.
double volumeTolerance
The percentage tolerance on each dimmension when comparing one structure to entire database...
double rotYAxis
The Y-axis element of the rotation axis along which the rotation is to be done in the map rotation mo...
std::vector< std::array< double, 5 > > getSpecificSymmetryElements(std::string symType, int symFold=0)
Accessor function for the given symmetry elements list.
std::vector< std::string > getMapFragments(void)
Accessor function returning the list of fragment files produced by map fragmentation.
double rotZAxis
The Z-axis element of the rotation axis along which the rotation is to be done in the map rotation mo...
std::vector< double > getTraceSigmaDists(void)
Accessor function for the trace sigma distances vector.
double peakDistanceForReal
Threshold for determining 'missing peaks' existence.
bool mapResDefault
This variable states if default resolution should be used, or whether the user has supplied a differe...
bool traceSigmaDist
Should the trace sigma distances descriptor be computed.
std::vector< std::vector< double > > getFragEnergyLevelsDistances()
This function returns a vector of vectors of energy level distances between each fragment and the who...
void appendStructure(std::string str)
Miscellanous function allowing adding a single string to the structures vector.
void printInfo(int verbose)
This is the main information output for the ProSHADE_mapFeatures class.
std::vector< std::string > getFragmentsList(void)
This function returns the paths to all fragment files saved by fragmentation functionality.
bool rotChangeDefault
If map rotation is selected, the default automatic parameter decision is changed. This variable state...
void getCommandLineParams(int argc, char *argv[])
This function parses the command line arguments and saves the user values into the settings class...
std::vector< double > getOctahedralSymmetriesPy(void)
Accessor function for the octahedral symmetries list for python.
unsigned int phi
This parameter is the latitudd of the spherical grid mapping. It should be 2 * bandwidth unless there...
std::vector< std::array< double, 5 > > cnSymmClear
This variable holds the gap corrected Cyclic symmetry results.
unsigned int maxRotError
This is the maximum allowed error in degrees for the rotation computation. This can be used to speed ...
std::vector< std::array< double, 5 > > generateIcosElements(std::vector< std::array< double, 5 > > symmAxes, ProSHADE::ProSHADE_settings *settings, int verbose=0)
This function generates the 60 icosahedral symmetry group elements from the axes generated by generat...
void printResultsClearHTML(ProSHADE::ProSHADE_settings *settings)
This function prints the cleared results to the HTML file.
unsigned int symmetryFold
The required fold of the sought symmetry. Applicable to C and D symmetries, otherwise leave 0...
std::string axisOrder
A string specifying the order of the axis. Must have three characters and any permutation of 'x'...
The main header file containing all declarations for the innter workings of the library.
std::vector< std::array< double, 5 > > getClearCyclicSymmetries(void)
Accessor function for the clear cyclic symmetries list.
std::vector< std::array< double, 5 > > getTetrahedralSymmetries(void)
Accessor function for the tetrahedral symmetries list.
This namespace contains all the external objects and their forward declarations.
int htmlReportLine
Iterator for current HTML line.
bool inputStructureDataType
This variable tells whether input data type is PDB or not.
bool energyLevelDist
Should the energy level distances descriptor be computed.
double xTranslation
The number of angstroms by which the structure should be translated along the X axis.
int htmlReportLineProgress
Iterator for current HTML line in the progress bar.
This header file contains function and globals required for platform-independent file detection...
double bFactorChange
This value will be used to change the B-factors if required by the user.
std::vector< double > getRecommendedSymmetryElementsPy(void)
Accessor function for the list of symmetry element for python.
bool wasResolutionGiven
Variable stating whether the resolution value was given by the user, or decided automatically.
ProSHADE_settings()
Contructor for the ProSHADE_settings class.
double peakHeightNoIQRs
How many interquartile ranges should be used to distinguish 'false' peaks from the true ones...
std::vector< double > getTraceSigmaDistances()
This function returns a vector of trace sigma distances between the first and all other structures...
std::vector< double > getEnergyLevelsDistances()
This function returns a vector of energy level distances between the first and all other structures...
void printResultsRequestHTML(std::string symmetryType, unsigned int symmetryFold, ProSHADE::ProSHADE_settings *settings)
This function prints the cleared results to the HTML report file.
This is the class which computes the symmetry in a single structure.
std::vector< std::array< double, 5 > > getOctahedralSymmetries(void)
Accessor function for the octahedral symmetries list.
bool wasBChangeGiven
Variable stating whether the B factor change (sharpening/blurring) value was given by the user...
double yTranslation
The number of angstroms by which the structure should be translated along the Y axis.
std::vector< double > getSpecificSymmetryElementsPy(std::string symType, int symFold=0)
Accessor function for the list of symmetry element for python.
std::vector< std::array< double, 5 > > tetrAxes
This variable holds the 7 unique axes of the tetrahedral symmetry, if they are found.
This is the executive class for computing distances between two or more structures.
double mapFragBoxSize
Should the clear map be fragmented into boxes? If so, put box size here, otherwise leave 0...
This class stores all the settings and is passed to the executive classes instead of multitude of par...
double symGapTolerance
For C-symmetries - if there are many, only those with average peak height - parameter * top symmetry ...
std::vector< std::array< double, 5 > > octaAxes
This variable holds the 13 unique axes of the octahedral symmetry, if they are found.
std::vector< double > getCyclicSymmetriesPy(void)
Accessor function for the cyclic symmetries list for python.
double mPower
This parameter determines the scaling for trace sigma descriptor.
~ProSHADE(void)
Destructor for the ProSHADE class.
unsigned int manualShells
Should the user require so, the maximum number of radial shells can be set.
std::vector< double > getCrossCorrDists(void)
Accessor function for the cross-correlation distances vector.
bool useCOM
Should the Centre of Mass (COM) be used to center the structure in the cell?
void printResultsRequest(std::string symmetryType, unsigned int symmetryFold, int verbose)
This function prints the cleared results to the screen.
double modelRadius(std::string modelPath)
Miscellanous function for obtaining the maximum distance between atoms in a model file...
double maskBlurFactor
The is the amount of blurring to be used to create masks for maps.
std::vector< std::string > structFiles
This vector should contain all the structures that are being dealt with, but this does not yet work! ...
double enLevelsThreshold
All structure pairs with energy level descriptor value less than this will not be subjected to any fu...
Task taskToPerform
This custom type variable determines which task to perfom (i.e. symmetry detection, distances computation or map features extraction).
This file contains the ProSHADE_internal_misc namespace and its miscellaneous functions.
std::string mapFragName
The prefix of the files with the cut out boxes.
double extraSpace
What should be the distance added on both sides to the structure, so that the next cell density would...
std::vector< std::vector< std::array< double, 6 > > > getDihedralSymmetries(void)
Accessor function for the dihedral symmetries list. These will be sorted using the fold and peak heig...
std::vector< std::vector< std::array< double, 6 > > > dnSymm
This variable holds the complete Dihedral symmetry results.
unsigned int glIntegOrder
This parameter controls the Gauss-Legendre integration order and so the radial resolution.