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" 169 this->resizeMovingStructure =
false;
194 std::cout <<
"-----------------------------------------------------------" << std::endl;
195 std::cout <<
"| SETTINGS: |" << std::endl;
196 std::cout <<
"-----------------------------------------------------------" << std::endl;
197 std::stringstream strstr2;
199 printf (
"Resolution : %37s\n", strstr2.str().c_str() );
201 std::stringstream strstr3;
203 printf (
"Bandwidth : %37s\n", strstr3.str().c_str() );
205 strstr3.str(std::string());
207 printf (
"Integration order : %37s\n", strstr3.str().c_str() );
209 strstr3.str(std::string());
210 strstr3 << this->
theta;
211 printf (
"Theta angle : %37s\n", strstr3.str().c_str() );
213 strstr3.str(std::string());
214 strstr3 << this->
phi;
215 printf (
"Phi angle : %37s\n", strstr3.str().c_str() );
217 strstr3.str(std::string());
219 printf (
"B-factor value : %37s\n", strstr3.str().c_str() );
221 strstr3.str(std::string());
223 printf (
"B-factor change : %37s\n", strstr3.str().c_str() );
225 strstr3.str(std::string());
226 if ( this->
usePhase ) { strstr3 <<
"TRUE"; }
227 else { strstr3 <<
"FALSE"; }
228 printf (
"Use phase : %37s\n", strstr3.str().c_str() );
230 strstr3.str(std::string());
231 if ( this->
useCOM ) { strstr3 <<
"TRUE"; }
232 else { strstr3 <<
"FALSE"; }
233 printf (
"Use COM to center : %37s\n", strstr3.str().c_str() );
235 strstr3.str(std::string());
237 else { strstr3 <<
"FALSE"; }
238 printf (
"Use first line COM : %37s\n", strstr3.str().c_str() );
240 strstr3.str(std::string());
242 printf (
"Shell distances in A: %37s\n", strstr3.str().c_str() );
244 strstr3.str(std::string());
246 printf (
"Manual no shells : %37s\n", strstr3.str().c_str() );
248 strstr3.str(std::string());
250 printf (
"Extra cell space : %37s\n", strstr3.str().c_str() );
252 strstr3.str(std::string());
253 strstr3 << this->
alpha;
254 printf (
"Raise |F| to power : %37s\n", strstr3.str().c_str() );
256 strstr3.str(std::string());
258 printf (
"Cross-cor weighting : %37s\n", strstr3.str().c_str() );
260 strstr3.str(std::string());
262 printf (
"IQRs masking thres : %37s\n", strstr3.str().c_str() );
264 strstr3.str(std::string());
266 printf (
"IQRs peak thres : %37s\n", strstr3.str().c_str() );
268 strstr3.str(std::string());
270 printf (
"Peak similarity thr : %37s\n", strstr3.str().c_str() );
272 strstr3.str(std::string());
274 printf (
"Peak width : %37s\n", strstr3.str().c_str() );
276 strstr3.str(std::string());
278 else { strstr3 <<
"FALSE"; }
279 printf (
"Get cross-cor dists : %37s\n", strstr3.str().c_str() );
281 strstr3.str(std::string());
283 else { strstr3 <<
"FALSE"; }
284 printf (
"Get tr sigma dists : %37s\n", strstr3.str().c_str() );
286 strstr3.str(std::string());
288 else { strstr3 <<
"FALSE"; }
289 printf (
"Get rot func dists : %37s\n", strstr3.str().c_str() );
291 strstr3.str(std::string());
293 printf (
"Symmetry axis toler : %37s\n", strstr3.str().c_str() );
295 strstr3.str(std::string());
297 printf (
"Symmetry gap toler : %37s\n", strstr3.str().c_str() );
299 strstr3.str(std::string());
301 printf (
"Cross-cor hierar thr: %37s\n", strstr3.str().c_str() );
303 strstr3.str(std::string());
305 printf (
"Tr sigma hierar thr : %37s\n", strstr3.str().c_str() );
307 strstr3.str(std::string());
309 for (
int i = 0; i < static_cast<int> ( this->
ignoreLs.size() ); i++ )
313 strstr3 <<
", " << this->
ignoreLs.at(i);
316 printf (
"Bands to ignore : %37s\n", strstr3.str().c_str() );
318 strstr3.str(std::string());
320 printf (
"Map saving location : %37s\n", strstr3.str().c_str() );
322 strstr3.str(std::string());
324 else { strstr3 <<
"FALSE"; }
325 printf (
"Use cubic maps : %37s\n", strstr3.str().c_str() );
327 strstr3.str(std::string());
329 else { strstr3 <<
"FALSE"; }
330 printf (
"Map noice removal : %37s\n", strstr3.str().c_str() );
332 strstr3.str(std::string());
334 printf (
"Map mask blurring : %37s\n", strstr3.str().c_str() );
336 strstr3.str(std::string());
338 else { strstr3 <<
"FALSE"; }
339 printf (
"Blur. factor given : %37s\n", strstr3.str().c_str() );
341 strstr3.str(std::string());
343 printf (
"Max Rotation Error : %37s\n", strstr3.str().c_str() );
345 strstr3.str(std::string());
347 printf (
"Map fragm box size : %37s\n", strstr3.str().c_str() );
349 strstr3.str(std::string());
351 printf (
"Map fragm save name : %37s\n", strstr3.str().c_str() );
353 strstr3.str(std::string());
355 printf (
"Map frag min density: %37s\n", strstr3.str().c_str() );
357 strstr3.str(std::string());
359 printf (
"Database name : %37s\n", strstr3.str().c_str() );
361 strstr3.str(std::string());
363 printf (
"Database volume tol : %37s\n", strstr3.str().c_str() );
365 strstr3.str(std::string());
367 printf (
"Required sym fold : %37s\n", strstr3.str().c_str() );
369 strstr3.str(std::string());
371 printf (
"Required sym type : %37s\n", strstr3.str().c_str() );
373 strstr3.str(std::string());
375 printf (
"Map rotation angle : %37s\n", strstr3.str().c_str() );
377 strstr3.str(std::string());
379 printf (
"Map rotation X-axis : %37s\n", strstr3.str().c_str() );
381 strstr3.str(std::string());
383 printf (
"Map rotation Y-axis : %37s\n", strstr3.str().c_str() );
385 strstr3.str(std::string());
387 printf (
"Map rotation Z-axis : %37s\n", strstr3.str().c_str() );
389 strstr3.str(std::string());
391 printf (
"Map transl. X-axis : %37s\n", strstr3.str().c_str() );
393 strstr3.str(std::string());
395 printf (
"Map transl. Y-axis : %37s\n", strstr3.str().c_str() );
397 strstr3.str(std::string());
399 printf (
"Map transl. Z-axis : %37s\n", strstr3.str().c_str() );
401 strstr3.str(std::string());
403 printf (
"Out map axis order : %37s\n", strstr3.str().c_str() );
405 strstr3.str(std::string());
407 printf (
"Verbose : %37s\n\n", strstr3.str().c_str() );
409 strstr3.str(std::string());
410 if ( this->
taskToPerform == Symmetry ) { strstr3 <<
"SYMMETRY DETECTION"; }
411 if ( this->
taskToPerform == Distances ) { strstr3 <<
"DISTANCES COMPUTATION"; }
412 if ( this->
taskToPerform == Features ) { strstr3 <<
"MAP FEATURES EXTRACTION"; }
413 if ( this->
taskToPerform == BuildDB ) { strstr3 <<
"BUILD STRUCTURE DATABASE"; }
414 if ( this->
taskToPerform == DistancesFrag ) { strstr3 <<
"FRAGMENT DISTANCES"; }
415 if ( this->
taskToPerform == HalfMaps ) { strstr3 <<
"HALF MAPS RE-BOXING"; }
416 if ( this->
taskToPerform == RotateMap ) { strstr3 <<
"MAP ROTATION"; }
417 if ( this->
taskToPerform == OverlayMap ) { { strstr3 <<
"MAP OVERLAY"; } }
418 if ( this->
taskToPerform == SimpleRebox ) { { strstr3 <<
"MAP RE-BOXING"; } }
419 printf (
"Task to perform : %37s\n", strstr3.str().c_str() );
421 std::cout <<
"-----------------------------------------------------------" << std::endl << std::endl;
437 if ( argc == 1 ) { ProSHADE_internal_misc::printHelp ( ); }
440 const struct option longopts[] =
442 {
"version", no_argument,
nullptr,
'v' },
443 {
"help", no_argument,
nullptr,
'h' },
444 {
"distances", no_argument,
nullptr,
'D' },
445 {
"buildDB", no_argument,
nullptr,
'B' },
446 {
"features", no_argument,
nullptr,
'F' },
447 {
"symmetry", no_argument,
nullptr,
'S' },
448 {
"distancesFrag", no_argument,
nullptr,
'M' },
449 {
"halpMaps", no_argument,
nullptr,
'H' },
450 {
"strOverlay", no_argument,
nullptr,
'O' },
451 {
"reBox", no_argument,
nullptr,
'E' },
452 {
"rotate", no_argument,
nullptr,
'R' },
453 {
"no_phase", no_argument,
nullptr,
'p' },
454 {
"no_COM", no_argument,
nullptr,
'c' },
455 {
"fl_Cen", no_argument,
nullptr,
'l' },
456 {
"no_crCorr", no_argument,
nullptr,
'e' },
457 {
"no_trSig", no_argument,
nullptr,
't' },
458 {
"no_rotFn", no_argument,
nullptr,
'r' },
459 {
"clear", no_argument,
nullptr,
'y' },
460 {
"cubic", no_argument,
nullptr,
'U' },
461 {
"no_report", no_argument,
nullptr,
'A' },
462 {
"resizeOverlay", no_argument,
nullptr,
'C' },
463 {
"f", required_argument,
nullptr,
'f' },
464 {
"fileList", required_argument,
nullptr,
'i' },
465 {
"delModel", required_argument,
nullptr,
'P' },
466 {
"bandList", required_argument,
nullptr,
'b' },
467 {
"resolution", required_argument,
nullptr,
's' },
468 {
"bandWidth", required_argument,
nullptr,
'a' },
469 {
"integration", required_argument,
nullptr,
'n' },
470 {
"maxRotErr", required_argument,
nullptr,
'L' },
471 {
"sym", required_argument,
nullptr,
'u' },
472 {
"clearMap", required_argument,
nullptr,
'm' },
473 {
"axisOrder", required_argument,
nullptr,
'g' },
474 {
"dbFile", required_argument,
nullptr,
'x' },
475 {
"bValues", required_argument,
nullptr,
'{' },
476 {
"bChange", required_argument,
nullptr,
'}' },
477 {
"sphDistance", required_argument,
nullptr,
'[' },
478 {
"sphNumber", required_argument,
nullptr,
']' },
479 {
"mapMaskThres", required_argument,
nullptr,
'(' },
480 {
"mapMaskBlur", required_argument,
nullptr,
'K' },
481 {
"cellBorderSpace", required_argument,
nullptr,
')' },
482 {
"fPower", required_argument,
nullptr,
'@' },
483 {
"mPower", required_argument,
nullptr,
'%' },
484 {
"peakSize", required_argument,
nullptr,
'^' },
485 {
"peakThres", required_argument,
nullptr,
'&' },
486 {
"peakMinSim", required_argument,
nullptr,
'*' },
487 {
"axisTolerance", required_argument,
nullptr,
'Q' },
488 {
"symGap", required_argument,
nullptr,
'q' },
489 {
"CCThres", required_argument,
nullptr,
'W' },
490 {
"TSThres", required_argument,
nullptr,
'w' },
491 {
"mFrag", required_argument,
nullptr,
'o' },
492 {
"mBoxFrac", required_argument,
nullptr,
'G' },
493 {
"mBoxPath", required_argument,
nullptr,
'T' },
494 {
"dbSizeLim", required_argument,
nullptr,
'Y' },
495 {
"rotAng", required_argument,
nullptr,
'<' },
496 {
"rotX", required_argument,
nullptr,
'>' },
497 {
"rotY", required_argument,
nullptr,
'~' },
498 {
"rotZ", required_argument,
nullptr,
'|' },
499 {
"trsX", required_argument,
nullptr,
'N' },
500 {
"trsY", required_argument,
nullptr,
'J' },
501 {
"trsZ", required_argument,
nullptr,
'I' },
502 {
"verbose", optional_argument,
nullptr,
'V' },
503 {
nullptr, 0,
nullptr, 0 },
507 bool userRes =
false;
508 bool userBVal =
false;
511 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::?";
517 const auto opt = getopt_long ( argc, argv, shortopts, longopts,
nullptr );
526 const char *tmp_optarg = optarg;
607 this->
ignoreLs = std::vector<int> ();
687 this->resizeMovingStructure =
true;
694 this->
structFiles.emplace_back ( std::string ( optarg ) );
702 std::ifstream textFile ( std::string ( optarg ), std::ios::in );
705 if ( textFile.fail() )
707 std::cout <<
"!!! ProSHADE ERROR !!! The filename supplied with the \'-i\' parameter cannot be opened. Terminating..." << std::endl;
713 while ( std::getline ( textFile, hlpStr ) )
726 this->
deleteModels.emplace_back ( std::string ( optarg ) );
733 this->
ignoreLs.emplace_back ( stoi ( std::string ( optarg ) ) );
750 this->
bandwidth = stof ( std::string ( optarg ) );
765 this->
maxRotError =
static_cast<unsigned int> ( stoi ( std::string ( optarg ) ) );
772 std::string hlpStr = std::string ( optarg );
773 if ( hlpStr.at(0) ==
'C' )
779 if ( hlpStr.at(0) ==
'D' )
785 if ( hlpStr.at(0) ==
'T' )
791 if ( hlpStr.at(0) ==
'O' )
797 if ( hlpStr.at(0) ==
'I' )
803 ProSHADE_internal_misc::printHelp ( );
813 std::string numHlp ( hlpStr.begin()+1, hlpStr.end() );
814 if ( numHlp.length() > 0 )
820 std::cerr <<
"!!! ProSHADE ERROR !!! The input argument requests search for Cyclic/Dihedral symmetry, but does not specify the requested fold." << std::endl;
827 std::string numHlp ( hlpStr.begin()+1, hlpStr.end() );
830 ProSHADE_internal_misc::printHelp ( );
848 this->
axisOrder = std::string ( optarg );
849 std::transform ( this->
axisOrder.begin(),
855 std::cerr <<
"!!! ProSHADE ERROR !!! Input parameter error !!! The axisOrder parameter requires a string of three characters only." << std::endl;
860 std::cerr <<
"!!! ProSHADE ERROR !!! Input parameter error !!! The axisOrder parameter requires a string consisting of only \'x\', \'y\' and \'z\' characters." << std::endl;
865 std::cerr <<
"!!! ProSHADE ERROR !!! Input parameter error !!! The axisOrder parameter requires a string consisting of only \'x\', \'y\' and \'z\' characters." << std::endl;
870 std::cerr <<
"!!! ProSHADE ERROR !!! Input parameter error !!! The axisOrder parameter requires a string consisting of only \'x\', \'y\' and \'z\' characters." << std::endl;
875 std::cerr <<
"!!! ProSHADE ERROR !!! Input parameter error !!! The axisOrder parameter requires a string with at least one \'x\' character." << std::endl;
880 std::cerr <<
"!!! ProSHADE ERROR !!! Input parameter error !!! The axisOrder parameter requires a string with at least one \'y\' character." << std::endl;
885 std::cerr <<
"!!! ProSHADE ERROR !!! Input parameter error !!! The axisOrder parameter requires a string with at least one \'z\' character." << std::endl;
947 this->
extraSpace = stof ( std::string ( optarg ) );
955 this->
alpha = stof ( std::string ( optarg ) );
962 this->
mPower = stof ( std::string ( optarg ) );
1046 this->
rotAngle = stof ( std::string ( optarg ) );
1053 this->
rotXAxis = stof ( std::string ( optarg ) );
1060 this->
rotYAxis = stof ( std::string ( optarg ) );
1067 this->
rotZAxis = stof ( std::string ( optarg ) );
1095 if ( !optarg && argv[optind] != NULL && argv[optind][0] !=
'-' )
1097 tmp_optarg = argv[optind++];
1102 this->
verbose = stoi ( std::string ( tmp_optarg ) );
1111 printf (
"!!! ProSHADE ERROR !!! The \'--verbose\' option takes only values in range 0 to 4, including. Terminating...\n" );
1121 std::cout <<
"ProSHADE " << __PROSHADE_VERSION__ << std::endl << std::endl;
1128 ProSHADE_internal_misc::printHelp ( );
1142 ProSHADE_internal_misc::printHelp ( );
1153 void ProSHADE::ProSHADE_settings::ignoreLsAddValuePy (
const int val )
1156 this->
ignoreLs.emplace_back ( val );
1171 this->settings = setUp;
1173 this->distancesAvailable =
false;
1174 this->symmetriesAvailable =
false;
1175 this->fragmentsAvailable =
false;
1180 std::cout <<
"ProSHADE " << __PROSHADE_VERSION__ <<
" :" << std::endl;
1181 std::cout <<
"==========================" << std::endl << std::endl;
1189 std::cerr <<
"!!! ProSHADE ERROR !!! There is no task (functionality) selected for this run." << std::endl << std::endl;
1190 std::cerr <<
"Please select a functionality and supply it to the settings object (or using command line). Your options are:" << std::endl;
1191 std::cerr <<
" " << std::endl;
1192 std::cerr <<
" -D or --distances " << std::endl;
1193 std::cerr <<
" The shape distances will be computed between the first supplied " << std::endl;
1194 std::cerr <<
" structure and all other structures. Requires at least two " << std::endl;
1195 std::cerr <<
" structures. " << std::endl;
1196 std::cerr <<
" " << std::endl;
1197 std::cerr <<
" -B or --buildDB " << std::endl;
1198 std::cerr <<
" Pre-compute the spherical harmonics coefficients for all " << std::endl;
1199 std::cerr <<
" supplied structures for the given options. Save the results in " << std::endl;
1200 std::cerr <<
" a binary database file given by the \'x\' option. " << std::endl;
1201 std::cerr <<
" " << std::endl;
1202 std::cerr <<
" -F or --features " << std::endl;
1203 std::cerr <<
" Return a table of statistics for input map. To save a clean and " << std::endl;
1204 std::cerr <<
" resized map, use the \'m\' option to specify the file to save to. " << std::endl;
1205 std::cerr <<
" " << std::endl;
1206 std::cerr <<
" -S or --symmetry " << std::endl;
1207 std::cerr <<
" Detect if any C, D, T or I symmetries are present in the first " << std::endl;
1208 std::cerr <<
" structure supplied. Also prints all symmetry elements for C and " << std::endl;
1209 std::cerr <<
" D symmetries, but only two elements for T and I. " << std::endl;
1210 std::cerr <<
" " << std::endl;
1211 std::cerr <<
" -M or --distancesFrag " << std::endl;
1212 std::cerr <<
" Fragment the supplied map file and search each resulting frag- " << std::endl;
1213 std::cerr <<
" ment against the whole database supplied by the \'x\' option. Per " << std::endl;
1214 std::cerr <<
" fragment distances are reported. " << std::endl;
1215 std::cerr <<
" " << std::endl;
1216 std::cerr <<
" -R or --rotate " << std::endl;
1217 std::cerr <<
" Take a single density map and apply the rotation defined by the " << std::endl;
1218 std::cerr <<
" \'--rotAng\', \'--rotAlp\', \'--rotBet\' and \'--rotGam\' options. The " << std::endl;
1219 std::cerr <<
" resulting rotated map is saved to location given by the " << std::endl;
1220 std::cerr <<
" \'--clearMap\' option. Many of the default settings are over- " << std::endl;
1221 std::cerr <<
" written and while can be modified using the command line " << std::endl;
1222 std::cerr <<
" options, this is not recommended. " << std::endl;
1223 std::cerr <<
" " << std::endl;
1224 std::cerr <<
" -O or --strOverlay " << std::endl;
1225 std::cerr <<
" Given two structures, find the optimal overlay using the " << std::endl;
1226 std::cerr <<
" rotation and translation functions. The first structure is " << std::endl;
1227 std::cerr <<
" always unchanged, while a rotated and translated version of the " << std::endl;
1228 std::cerr <<
" second structure will be written to the \'--clearMap\' option " << std::endl;
1229 std::cerr <<
" path or \'./rotStr\' file. " << std::endl;
1230 std::cerr <<
" " << std::endl;
1231 std::cerr <<
" -E or --reBox " << std::endl;
1232 std::cerr <<
" Takes a single map structure and computes the mask. Then, finds " << std::endl;
1233 std::cerr <<
" the box around the mask, adds extra \'--cellBorderSpace\' angs. " << std::endl;
1234 std::cerr <<
" of space and outputs the re-sized map to \'--clearMap\'. " << std::endl;
1235 std::cerr <<
" " << std::endl;
1241 mkdir (
"proshade_report", 0777 );
1244 std::stringstream hlpSS;
1245 hlpSS << __PROSHADE_RVAPI__ <<
"/jsrview";
1246 rvapi_init_document (
"ProSHADE Results Report",
1247 "./proshade_report",
1248 "ProSHADE Results Report",
1251 hlpSS.str().c_str(),
1264 std::cout <<
"-----------------------------------------------------------" << std::endl;
1265 std::cout <<
"| MODE: Structure Overlay |" << std::endl;
1266 std::cout <<
"-----------------------------------------------------------" << std::endl << std::endl;
1272 rvapi_set_text (
"<h1>ProSHADE Results: Structure Overlay</h1>",
1281 rvapi_add_section (
"ProgressSection",
1296 std::stringstream hlpSS;
1297 hlpSS <<
"<font color=\"green\">" <<
"Overlay of structures started." <<
"</font>";
1298 rvapi_set_text ( hlpSS.str().c_str(),
1319 std::cout <<
"-----------------------------------------------------------" << std::endl;
1320 std::cout <<
"| MODE: Map Rotation |" << std::endl;
1321 std::cout <<
"-----------------------------------------------------------" << std::endl << std::endl;
1333 rvapi_set_text (
"<h1>ProSHADE Results: Building a database of structures</h1>",
1342 rvapi_add_section (
"ProgressSection",
1352 std::stringstream hlpSS;
1353 hlpSS <<
"<font color=\"green\">" <<
"Database building procedure started." <<
"</font>";
1354 rvapi_set_text ( hlpSS.str().c_str(),
1370 std::stringstream hlpSS;
1371 hlpSS <<
"<font color=\"green\">" <<
"COMPLETED." <<
"</font>";
1372 rvapi_set_text ( hlpSS.str().c_str(),
1390 rvapi_set_text (
"<h1>ProSHADE Results: Density map features</h1>",
1399 rvapi_add_section (
"ProgressSection",
1409 std::stringstream hlpSS;
1410 hlpSS <<
"<font color=\"green\">" <<
"Density map features detection procedure started." <<
"</font>";
1411 rvapi_set_text ( hlpSS.str().c_str(),
1430 std::cout <<
"-----------------------------------------------------------" << std::endl;
1431 std::cout <<
"| SAVING CLEAN MAP |" << std::endl;
1432 std::cout <<
"-----------------------------------------------------------" << std::endl << std::endl;
1437 std::cout <<
"Clean map saved to file: " << setUp->
clearMapFile << std::endl << std::endl;
1447 this->fragmentsAvailable =
true;
1453 std::cout <<
"-----------------------------------------------------------" << std::endl;
1454 std::cout <<
"| MAP FRAGMENTATION |" << std::endl;
1455 std::cout <<
"-----------------------------------------------------------" << std::endl << std::endl;
1457 std::cout <<
"Map fragmentation was not required." << std::endl << std::endl;
1466 this->cyclicSymmetries = symmetry.
cnSymm;
1467 this->cyclicSymmetriesClear = symmetry.
cnSymmClear;
1468 this->dihedralSymmetries = symmetry.
dnSymm;
1469 this->dihedralSymmetriesClear = symmetry.
dnSymmClear;
1470 this->tetrahedralSymmetry = symmetry.
tetrAxes;
1471 this->octahedralSymmetry = symmetry.
octaAxes;
1472 this->icosahedralSymmetry = symmetry.
icosAxes;
1473 this->symmetriesAvailable =
true;
1508 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;
1514 std::cout <<
"-----------------------------------------------------------" << std::endl;
1515 std::cout <<
"| Structure Axis Alignment |" << std::endl;
1516 std::cout <<
"-----------------------------------------------------------" << std::endl << std::endl;
1521 std::stringstream hlpSS;
1522 hlpSS <<
"<font color=\"green\">" <<
"Symmetry axes alignment started." <<
"</font>";
1523 rvapi_set_text ( hlpSS.str().c_str(),
1533 if ( static_cast<unsigned int> ( this->icosahedralSymmetry.size() ) > 0 )
1537 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;
1542 std::stringstream hlpSS;
1543 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>";
1544 rvapi_set_text ( hlpSS.str().c_str(),
1555 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]; });
1557 double maxFold = this->icosahedralSymmetry.at(0)[0];
1559 for (
unsigned int iter = 0; iter < static_cast<unsigned int> ( this->icosahedralSymmetry.size() ); iter++ )
1561 if ( this->icosahedralSymmetry.at(iter)[0] == maxFold )
1566 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]; });
1568 maxFold = this->icosahedralSymmetry.at(noMaxFold)[0];
1570 for (
unsigned int iter = 0; iter < static_cast<unsigned int> ( this->icosahedralSymmetry.size() ); iter++ )
1572 if ( this->icosahedralSymmetry.at(iter)[0] == maxFold )
1578 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]; });
1581 std::vector<std::vector<double>> origAxis;
1582 std::vector<std::vector<double>> basisAxis;
1583 std::vector<double> hlpVec;
1584 hlpVec.emplace_back ( 0.0 ); hlpVec.emplace_back ( 0.0 );
1585 origAxis.emplace_back( hlpVec ); origAxis.emplace_back( hlpVec ); origAxis.emplace_back( hlpVec );
1589 while ( static_cast<int> ( noMaxFold + noMaxFold2 + c2It ) < static_cast<int> ( this->icosahedralSymmetry.size() ) )
1591 bool firstAxis =
true;
1592 for (
unsigned int iter = noMaxFold + noMaxFold2 + c2It; iter < static_cast<unsigned int> ( this->icosahedralSymmetry.size() ); iter++ )
1597 origAxis.at(0).at(0) = this->icosahedralSymmetry.at(iter)[1];
1598 origAxis.at(1).at(0) = this->icosahedralSymmetry.at(iter)[2];
1599 origAxis.at(2).at(0) = this->icosahedralSymmetry.at(iter)[3];
1603 double dotProd = origAxis.at(0).at(0) * this->icosahedralSymmetry.at(iter)[1] +
1604 origAxis.at(1).at(0) * this->icosahedralSymmetry.at(iter)[2] +
1605 origAxis.at(2).at(0) * this->icosahedralSymmetry.at(iter)[3];
1607 if ( ( dotProd < 0.05 ) && ( dotProd > -0.05 ) )
1609 origAxis.at(0).at(1) = this->icosahedralSymmetry.at(iter)[1];
1610 origAxis.at(1).at(1) = this->icosahedralSymmetry.at(iter)[2];
1611 origAxis.at(2).at(1) = this->icosahedralSymmetry.at(iter)[3];
1618 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 ) )
1628 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 ) )
1630 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;
1633 std::stringstream hlpSS;
1634 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>";
1635 rvapi_set_text ( hlpSS.str().c_str(),
1648 hlpVec.emplace_back ( 0.0 );
1649 basisAxis.emplace_back( hlpVec ); basisAxis.emplace_back( hlpVec ); basisAxis.emplace_back( hlpVec );
1651 basisAxis.at(0).at(0) = 1.0;
1652 basisAxis.at(1).at(0) = 0.0;
1653 basisAxis.at(2).at(0) = 0.0;
1655 basisAxis.at(0).at(1) = 0.0;
1656 basisAxis.at(1).at(1) = 1.0;
1657 basisAxis.at(2).at(1) = 0.0;
1659 basisAxis.at(0).at(2) = 0.0;
1660 basisAxis.at(1).at(2) = 0.0;
1661 basisAxis.at(2).at(2) = 1.0;
1664 std::array<double,5> joinAA = ProSHADE_internal_misc::getAxisAngleFromSymmetryAxes ( origAxis, basisAxis, 0, 1 );
1679 rotSet->
ignoreLs = std::vector<int> ();
1707 std::cout <<
">> Structure rotation initiated." << std::endl;
1715 std::cout <<
"Structure with symmetry axis to box axes alignment writted in " << setUp->
clearMapFile << std::endl;
1719 else if ( static_cast<unsigned int> ( this->octahedralSymmetry.size() ) > 0 )
1723 std::cout <<
"Applying the OCTAHEDRAL axis alignment convention of Heymann, Chagoyen and Belnap (2005) (4-fold axes on X, Y and Z)." << std::endl;
1728 std::stringstream hlpSS;
1729 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>";
1730 rvapi_set_text ( hlpSS.str().c_str(),
1741 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]; });
1743 double maxFold = this->octahedralSymmetry.at(0)[0];
1745 for (
unsigned int iter = 0; iter < static_cast<unsigned int> ( this->octahedralSymmetry.size() ); iter++ )
1747 if ( this->octahedralSymmetry.at(iter)[0] == maxFold )
1752 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]; });
1754 maxFold = this->octahedralSymmetry.at(noMaxFold)[0];
1756 for (
unsigned int iter = 0; iter < static_cast<unsigned int> ( this->octahedralSymmetry.size() ); iter++ )
1758 if ( this->octahedralSymmetry.at(iter)[0] == maxFold )
1763 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]; });
1766 std::vector<std::vector<double>> origAxis;
1767 std::vector<std::vector<double>> basisAxis;
1768 std::vector<double> hlpVec;
1769 hlpVec.emplace_back ( 0.0 ); hlpVec.emplace_back ( 0.0 );
1770 origAxis.emplace_back( hlpVec ); origAxis.emplace_back( hlpVec ); origAxis.emplace_back( hlpVec );
1772 origAxis.at(0).at(0) = this->octahedralSymmetry.at(0)[1];
1773 origAxis.at(1).at(0) = this->octahedralSymmetry.at(0)[2];
1774 origAxis.at(2).at(0) = this->octahedralSymmetry.at(0)[3];
1776 origAxis.at(0).at(1) = this->octahedralSymmetry.at(1)[1];
1777 origAxis.at(1).at(1) = this->octahedralSymmetry.at(1)[2];
1778 origAxis.at(2).at(1) = this->octahedralSymmetry.at(1)[3];
1781 hlpVec.emplace_back ( 0.0 );
1782 basisAxis.emplace_back( hlpVec ); basisAxis.emplace_back( hlpVec ); basisAxis.emplace_back( hlpVec );
1784 basisAxis.at(0).at(0) = 1.0;
1785 basisAxis.at(1).at(0) = 0.0;
1786 basisAxis.at(2).at(0) = 0.0;
1788 basisAxis.at(0).at(1) = 0.0;
1789 basisAxis.at(1).at(1) = 1.0;
1790 basisAxis.at(2).at(1) = 0.0;
1792 basisAxis.at(0).at(2) = 0.0;
1793 basisAxis.at(1).at(2) = 0.0;
1794 basisAxis.at(2).at(2) = 1.0;
1797 std::array<double,5> joinAA = ProSHADE_internal_misc::getAxisAngleFromSymmetryAxes ( origAxis, basisAxis, 1, 2 );
1812 rotSet->
ignoreLs = std::vector<int> ();
1840 std::cout <<
">> Structure rotation initiated." << std::endl;
1848 std::cout <<
"Structure with symmetry axis to box axes alignment writted in " << setUp->
clearMapFile << std::endl;
1852 else if ( static_cast<unsigned int> ( this->tetrahedralSymmetry.size() ) > 0 )
1856 std::cout <<
"Applying the TETRAHEDRAL axis alignment convention from RELION (3-fold axis on Z)." << std::endl;
1861 std::stringstream hlpSS;
1862 hlpSS <<
"<font color=\"green\">" <<
"Applying axis alignment using the RELION convention (3-fold axis on Z)." <<
"</font>";
1863 rvapi_set_text ( hlpSS.str().c_str(),
1874 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]; });
1876 double maxFold = this->tetrahedralSymmetry.at(0)[0];
1878 for (
unsigned int iter = 0; iter < static_cast<unsigned int> ( this->tetrahedralSymmetry.size() ); iter++ )
1880 if ( this->tetrahedralSymmetry.at(iter)[0] == maxFold )
1885 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]; });
1886 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]; });
1889 std::vector<std::vector<double>> origAxis;
1890 std::vector<std::vector<double>> basisAxis;
1891 std::vector<double> hlpVec;
1892 hlpVec.emplace_back ( 0.0 ); hlpVec.emplace_back ( 0.0 );
1893 origAxis.emplace_back( hlpVec ); origAxis.emplace_back( hlpVec ); origAxis.emplace_back( hlpVec );
1895 origAxis.at(0).at(0) = this->tetrahedralSymmetry.at(0)[1];
1896 origAxis.at(1).at(0) = this->tetrahedralSymmetry.at(0)[2];
1897 origAxis.at(2).at(0) = this->tetrahedralSymmetry.at(0)[3];
1899 origAxis.at(0).at(1) = this->tetrahedralSymmetry.at(3)[1];
1900 origAxis.at(1).at(1) = this->tetrahedralSymmetry.at(3)[2];
1901 origAxis.at(2).at(1) = this->tetrahedralSymmetry.at(3)[3];
1904 hlpVec.emplace_back ( 0.0 );
1905 basisAxis.emplace_back( hlpVec ); basisAxis.emplace_back( hlpVec ); basisAxis.emplace_back( hlpVec );
1907 basisAxis.at(0).at(0) = 1.0;
1908 basisAxis.at(1).at(0) = 0.0;
1909 basisAxis.at(2).at(0) = 0.0;
1911 basisAxis.at(0).at(1) = 0.0;
1912 basisAxis.at(1).at(1) = 1.0;
1913 basisAxis.at(2).at(1) = 0.0;
1915 basisAxis.at(0).at(2) = 0.0;
1916 basisAxis.at(1).at(2) = 0.0;
1917 basisAxis.at(2).at(2) = 1.0;
1920 std::array<double,5> joinAA = ProSHADE_internal_misc::getAxisAngleFromSymmetryAxes ( origAxis, basisAxis, 1, 2 );
1935 rotSet->
ignoreLs = std::vector<int> ();
1963 std::cout <<
">> Structure rotation initiated." << std::endl;
1971 std::cout <<
"Structure with symmetry axis to box axes alignment writted in " << setUp->
clearMapFile << std::endl;
1976 else if ( static_cast<unsigned int> ( this->dihedralSymmetries.size() ) > 0 )
1980 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;
1985 std::stringstream hlpSS;
1986 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>";
1987 rvapi_set_text ( hlpSS.str().c_str(),
1998 for (
unsigned int iter = 0; iter < static_cast<unsigned int> ( this->dihedralSymmetries.size() ); iter++ )
2000 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]; });
2002 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]; });
2004 double maxFold = this->dihedralSymmetries.at(0).at(0)[0];
2006 for (
unsigned int iter = 0; iter < static_cast<unsigned int> ( this->dihedralSymmetries.size() ); iter++ )
2008 if ( this->dihedralSymmetries.at(iter).at(0)[0] == maxFold )
2013 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]; });
2016 std::vector<std::vector<double>> origAxis;
2017 std::vector<std::vector<double>> basisAxis;
2018 std::vector<double> hlpVec;
2019 hlpVec.emplace_back ( 0.0 ); hlpVec.emplace_back ( 0.0 );
2020 origAxis.emplace_back( hlpVec ); origAxis.emplace_back( hlpVec ); origAxis.emplace_back( hlpVec );
2022 origAxis.at(0).at(0) = this->dihedralSymmetries.at(0).at(0)[1];
2023 origAxis.at(1).at(0) = this->dihedralSymmetries.at(0).at(0)[2];
2024 origAxis.at(2).at(0) = this->dihedralSymmetries.at(0).at(0)[3];
2026 origAxis.at(0).at(1) = this->dihedralSymmetries.at(0).at(1)[1];
2027 origAxis.at(1).at(1) = this->dihedralSymmetries.at(0).at(1)[2];
2028 origAxis.at(2).at(1) = this->dihedralSymmetries.at(0).at(1)[3];
2031 hlpVec.emplace_back ( 0.0 );
2032 basisAxis.emplace_back( hlpVec ); basisAxis.emplace_back( hlpVec ); basisAxis.emplace_back( hlpVec );
2034 basisAxis.at(0).at(0) = 1.0;
2035 basisAxis.at(1).at(0) = 0.0;
2036 basisAxis.at(2).at(0) = 0.0;
2038 basisAxis.at(0).at(1) = 0.0;
2039 basisAxis.at(1).at(1) = 1.0;
2040 basisAxis.at(2).at(1) = 0.0;
2042 basisAxis.at(0).at(2) = 0.0;
2043 basisAxis.at(1).at(2) = 0.0;
2044 basisAxis.at(2).at(2) = 1.0;
2047 std::array<double,5> joinAA = ProSHADE_internal_misc::getAxisAngleFromSymmetryAxes ( origAxis, basisAxis, 1, 2 );
2062 rotSet->
ignoreLs = std::vector<int> ();
2090 std::cout <<
">> Structure rotation initiated." << std::endl;
2098 std::cout <<
"Structure with symmetry axis to box axes alignment writted in " << setUp->
clearMapFile << std::endl;
2103 else if ( static_cast<unsigned int> ( this->cyclicSymmetries.size() ) > 0 )
2107 std::cout <<
"Applying the CYCLIC axis alignment convention of Heymann, Chagoyen and Belnap (2005) (symm axis on Z)." << std::endl;
2112 std::stringstream hlpSS;
2113 hlpSS <<
"<font color=\"green\">" <<
"Applying axis alignment using the convention of Heymann, Chagoyen and Belnap (2005) (symm axis on Z)." <<
"</font>";
2114 rvapi_set_text ( hlpSS.str().c_str(),
2125 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]; });
2128 std::vector<std::vector<double>> origAxis;
2129 std::vector<std::vector<double>> basisAxis;
2130 std::vector<double> hlpVec;
2131 hlpVec.emplace_back ( 0.0 );
2132 origAxis.emplace_back( hlpVec ); origAxis.emplace_back( hlpVec ); origAxis.emplace_back( hlpVec );
2134 origAxis.at(0).at(0) = this->cyclicSymmetries.at(0)[1];
2135 origAxis.at(1).at(0) = this->cyclicSymmetries.at(0)[2];
2136 origAxis.at(2).at(0) = this->cyclicSymmetries.at(0)[3];
2139 hlpVec.emplace_back ( 0.0 ); hlpVec.emplace_back ( 0.0 );
2140 basisAxis.emplace_back( hlpVec ); basisAxis.emplace_back( hlpVec ); basisAxis.emplace_back( hlpVec );
2142 basisAxis.at(0).at(0) = 1.0;
2143 basisAxis.at(1).at(0) = 0.0;
2144 basisAxis.at(2).at(0) = 0.0;
2146 basisAxis.at(0).at(1) = 0.0;
2147 basisAxis.at(1).at(1) = 1.0;
2148 basisAxis.at(2).at(1) = 0.0;
2150 basisAxis.at(0).at(2) = 0.0;
2151 basisAxis.at(1).at(2) = 0.0;
2152 basisAxis.at(2).at(2) = 1.0;
2155 std::array<double,5> joinAA = ProSHADE_internal_misc::getAxisAngleFromSymmetryAxes ( origAxis, basisAxis, 1, 2 );
2170 rotSet->
ignoreLs = std::vector<int> ();
2198 std::cout <<
">> Structure rotation initiated." << std::endl;
2206 std::cout <<
"Structure with symmetry axis to box axes alignment writted in " << setUp->
clearMapFile << std::endl;
2213 std::stringstream hlpSS;
2214 hlpSS <<
"<font color=\"green\">" <<
"COMPLETED." <<
"</font>";
2215 rvapi_set_text ( hlpSS.str().c_str(),
2232 rvapi_set_text (
"<h1>ProSHADE Results: Half-maps re-boxing</h1>",
2241 rvapi_add_section (
"ProgressSection",
2251 std::stringstream hlpSS;
2252 hlpSS <<
"<font color=\"green\">" <<
"Starting the re-boxing of half-maps." <<
"</font>";
2253 rvapi_set_text ( hlpSS.str().c_str(),
2273 std::cout <<
"-----------------------------------------------------------" << std::endl;
2274 std::cout <<
"| MODE: Re-boxing map |" << std::endl;
2275 std::cout <<
"-----------------------------------------------------------" << std::endl << std::endl;
2281 rvapi_set_text (
"<h1>ProSHADE Results: Map Re-boxing</h1>",
2290 rvapi_add_section (
"ProgressSection",
2303 std::cerr <<
"!!! ProSHADE ERROR !!! Attampted to re-box a map, but supplied ";
2304 if ( setUp->
structFiles.size() < 1 ) { std::cerr <<
"less "; }
2305 if ( setUp->
structFiles.size() > 1 ) { std::cerr <<
"more "; }
2306 std::cerr <<
"than exactly one file. Please use the \'-f\' option to supply a single map file. Terminating ..." << std::endl << std::endl;
2310 std::stringstream hlpSS;
2311 hlpSS <<
"<font color=\"red\">" <<
"Supplied incorrect number (" << setUp->
structFiles.size() <<
") of structures - a single one expected." <<
"</font>";
2312 rvapi_set_text ( hlpSS.str().c_str(),
2314 settings->htmlReportLineProgress,
2325 std::stringstream hlpSS;
2326 hlpSS <<
"<font color=\"green\">" <<
"Starting computation of map re-boxing for the input structure " << setUp->
structFiles.at(0) <<
" ." <<
"</font>";
2327 rvapi_set_text ( hlpSS.str().c_str(),
2347 std::cout <<
"-----------------------------------------------------------" << std::endl;
2348 std::cout <<
"| MODE: Distances |" << std::endl;
2349 std::cout <<
"-----------------------------------------------------------" << std::endl << std::endl;
2355 rvapi_set_text (
"<h1>ProSHADE Results: Distances</h1>",
2364 rvapi_add_section (
"ProgressSection",
2374 std::stringstream hlpSS;
2375 hlpSS <<
"<font color=\"green\">" <<
"Starting computation of distances between input structures." <<
"</font>";
2376 rvapi_set_text ( hlpSS.str().c_str(),
2399 std::cout << std::endl <<
"-----------------------------------------------------------" << std::endl;
2400 std::cout <<
"| COMPLETED |" << std::endl;
2401 std::cout <<
"-----------------------------------------------------------" << std::endl << std::endl;
2407 std::stringstream hlpSS;
2408 hlpSS <<
"<font color=\"green\">" <<
"COMPLETED." <<
"</font>";
2409 rvapi_set_text ( hlpSS.str().c_str(),
2421 std::cout <<
"-----------------------------------------------------------" << std::endl;
2422 std::cout <<
"| RESULTS |" << std::endl;
2423 std::cout <<
"-----------------------------------------------------------" << std::endl << std::endl;
2429 rvapi_add_section (
"ResultsSection",
2439 rvapi_add_grid (
"distGrid",
2447 rvapi_add_table (
"DistancesTable",
2448 "Distances between structures",
2457 std::stringstream hlpSS;
2462 hlpSS.str ( std::string ( ) );
2463 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.";
2464 rvapi_put_horz_theader (
"DistancesTable",
"Energy Levels Distances", hlpSS.str().c_str(), columnIter );
2470 hlpSS.str ( std::string ( ) );
2471 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.";
2472 rvapi_put_horz_theader (
"DistancesTable",
"Trace Sigma Distances", hlpSS.str().c_str(), columnIter );
2478 hlpSS.str ( std::string ( ) );
2479 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.";
2480 rvapi_put_horz_theader (
"DistancesTable",
"Rotation Function Distances", hlpSS.str().c_str(), columnIter );
2485 for (
unsigned int iter = 1; iter < static_cast<unsigned int> ( setUp->
structFiles.size() ); iter++ )
2487 hlpSS.str ( std::string ( ) );
2489 rvapi_put_vert_theader (
"DistancesTable", hlpSS.str().c_str(),
"", iter-1 );
2499 printf (
"Energy Level Descriptor distances : %+.4f", this->crossCorrDists.at(0) );
2500 for (
unsigned int iter = 1; iter < static_cast<unsigned int> ( this->crossCorrDists.size() ); iter++ )
2502 printf (
" %+.4f", this->crossCorrDists.at(iter) );
2504 std::cout << std::endl;
2513 printf (
"Trace Sigma Descriptor distances : %+.4f", this->traceSigmaDists.at(0) );
2514 for (
unsigned int iter = 1; iter < static_cast<unsigned int> ( this->traceSigmaDists.size() ); iter++ )
2516 printf (
" %+.4f", this->traceSigmaDists.at(iter) );
2518 std::cout << std::endl;
2526 printf (
"Rotation Function Descriptor distances : %+.4f", this->rotFunctionDists.at(0) );
2527 for (
unsigned int iter = 1; iter < static_cast<unsigned int> ( this->rotFunctionDists.size() ); iter++ )
2529 printf (
" %+.4f", this->rotFunctionDists.at(iter) );
2531 std::cout << std::endl;
2537 for (
unsigned int iter = 1; iter < static_cast<unsigned int> ( setUp->
structFiles.size() ); iter++ )
2539 std::cout <<
"Matching structure names : " << setUp->
structFiles.at(iter) << std::endl;
2541 std::cout << std::endl;
2547 std::stringstream hlpSS;
2551 for (
unsigned int rIter = 0; rIter < static_cast<unsigned int> ( this->crossCorrDists.size() ); rIter++ )
2553 hlpSS.str ( std::string ( ) );
2554 hlpSS << this->crossCorrDists.at(rIter);
2555 rvapi_put_table_string (
"DistancesTable", hlpSS.str().c_str(), rIter, colIter );
2562 for (
unsigned int rIter = 0; rIter < static_cast<unsigned int> ( this->traceSigmaDists.size() ); rIter++ )
2564 hlpSS.str ( std::string ( ) );
2565 hlpSS << this->traceSigmaDists.at(rIter);
2566 rvapi_put_table_string (
"DistancesTable", hlpSS.str().c_str(), rIter, colIter );
2573 for (
unsigned int rIter = 0; rIter < static_cast<unsigned int> ( this->rotFunctionDists.size() ); rIter++ )
2575 hlpSS.str ( std::string ( ) );
2576 hlpSS << this->rotFunctionDists.at(rIter);
2577 rvapi_put_table_string (
"DistancesTable", hlpSS.str().c_str(), rIter, colIter );
2586 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;
2589 this->distancesAvailable =
true;
2599 std::cout <<
"-----------------------------------------------------------" << std::endl;
2600 std::cout <<
"| MODE: DistancesFrag |" << std::endl;
2601 std::cout <<
"-----------------------------------------------------------" << std::endl << std::endl;
2607 rvapi_set_text (
"<h1>ProSHADE Results: Searching fragments in database</h1>",
2616 rvapi_add_section (
"ProgressSection",
2626 std::stringstream hlpSS;
2627 hlpSS <<
"<font color=\"green\">" <<
"Starting fragment search of file " << setUp->
structFiles.at(0) <<
" against the database." <<
"</font>";
2628 rvapi_set_text ( hlpSS.str().c_str(),
2642 std::cout << std::endl <<
"-----------------------------------------------------------" << std::endl;
2643 std::cout <<
"| COMPLETED |" << std::endl;
2644 std::cout <<
"-----------------------------------------------------------" << std::endl << std::endl;
2649 std::stringstream hlpSS;
2650 hlpSS <<
"<font color=\"green\">" <<
"COMPLETED." <<
"</font>";
2651 rvapi_set_text ( hlpSS.str().c_str(),
2664 std::cout <<
"-----------------------------------------------------------" << std::endl;
2665 std::cout <<
"| RESULTS |" << std::endl;
2666 std::cout <<
"-----------------------------------------------------------" << std::endl << std::endl;
2669 std::vector< std::vector<double> > enLevDists;
2670 std::vector< std::vector<double> > trSigmaDists;
2671 std::vector< std::vector<double> > fullRotFnDists;
2689 double maxFrag = std::max ( enLevDists.size(), std::max ( trSigmaDists.size(), fullRotFnDists.size() ) );
2690 for (
unsigned int frag = 0; frag < static_cast<unsigned int> ( maxFrag ); frag++ )
2692 printf (
"Fragment %d Results:\n", frag );
2693 printf (
"--------------------\n" );
2696 printf (
"Energy levels descriptor distances : %+.4f", enLevDists.at(frag).at(0) );
2697 for (
unsigned int iter = 1; iter < static_cast<unsigned int> ( enLevDists.at(frag).size() ); iter++ )
2699 printf (
" %+.4f", enLevDists.at(frag).at(iter) );
2701 std::cout << std::endl;
2705 printf (
"Trace sigma descriptor distances : %+.4f", trSigmaDists.at(frag).at(0) );
2706 for (
unsigned int iter = 1; iter < static_cast<unsigned int> ( trSigmaDists.at(frag).size() ); iter++ )
2708 printf (
" %+.4f", trSigmaDists.at(frag).at(iter) );
2710 std::cout << std::endl;
2714 printf (
"Full RF descriptor distances : %+.4f", fullRotFnDists.at(frag).at(0) );
2715 for (
unsigned int iter = 1; iter < static_cast<unsigned int> ( fullRotFnDists.at(frag).size() ); iter++ )
2717 printf (
" %+.4f", fullRotFnDists.at(frag).at(iter) );
2719 std::cout << std::endl;
2721 std::cout << std::endl;
2724 std::cout << std::endl;
2725 for (
unsigned int iter = 1; iter < static_cast<unsigned int> ( setUp->
structFiles.size() ); iter++ )
2727 std::cout <<
"Matching structure names : " << setUp->
structFiles.at(iter) << std::endl;
2733 int maxFrag = std::max ( enLevDists.size(), std::max ( trSigmaDists.size(), fullRotFnDists.size() ) );
2736 rvapi_add_section (
"ResultsSection",
2737 "Fragment Distances",
2739 settings->htmlReportLine,
2744 settings->htmlReportLine += 1;
2747 rvapi_add_table (
"FragmentDistancesELTable",
2748 "Fragment Energy Level distances to database entries",
2753 enLevDists.at(0).size(),
2757 for (
unsigned int iter = 0; iter < static_cast<unsigned int> ( enLevDists.at(0).size() ); iter++ )
2759 std::stringstream hlpSS;
2760 hlpSS <<
"Database entry " << setUp->
structFiles.at(iter);
2761 std::stringstream hlpSS2;
2762 hlpSS2 <<
"This is the Energy Levels distance for the fragment in the row to the database entry listed here (" << setUp->
structFiles.at(iter) <<
")";
2763 rvapi_put_horz_theader (
"FragmentDistancesELTable", hlpSS.str().c_str(), hlpSS2.str().c_str(), iter );
2767 for (
unsigned int iter = 0; iter < static_cast<unsigned int> ( maxFrag ); iter++ )
2769 std::stringstream hlpSS;
2770 hlpSS <<
"Fragment Number " << iter;
2771 std::stringstream hlpSS2;
2772 hlpSS2 <<
"This is the Energy Levels distance for the fragment number " << iter <<
" to the database entry in the column header.";
2773 rvapi_put_vert_theader (
"FragmentDistancesELTable", hlpSS.str().c_str(), hlpSS2.str().c_str(), iter );
2777 for (
unsigned int rIter = 0; rIter < static_cast<unsigned int> ( enLevDists.size() ); rIter++ )
2779 for (
unsigned int cIter = 0; cIter < static_cast<unsigned int> ( enLevDists.at(rIter).size() ); cIter++ )
2781 std::stringstream hlpSS;
2782 hlpSS << std::showpos << ProSHADE_internal_misc::roundDouble ( enLevDists.at(rIter).at(cIter) * 1000.0 ) / 1000.0;
2783 if ( hlpSS.str().length() != 6 ) {
int hlp = 6 - hlpSS.str().length();
for (
int i = 0; i < hlp; i++ ) { hlpSS <<
" "; } }
2784 if ( hlpSS.str().length() > 6 ) { hlpSS.str( hlpSS.str().substr( 0, 6 ) ); }
2785 rvapi_put_table_string (
"FragmentDistancesELTable", hlpSS.str().c_str(), rIter, cIter );
2790 rvapi_add_table (
"FragmentDistancesTSTable",
2791 "Fragment Trace Sigma distances to database entries",
2793 enLevDists.size() + 1,
2795 trSigmaDists.size(),
2796 trSigmaDists.at(0).size(),
2800 for (
unsigned int iter = 0; iter < static_cast<unsigned int> ( enLevDists.at(0).size() ); iter++ )
2802 std::stringstream hlpSS;
2803 hlpSS <<
"Database entry " << setUp->
structFiles.at(iter);
2804 std::stringstream hlpSS2;
2805 hlpSS2 <<
"This is the Trace Sigma distance for the fragment in the row to the database entry listed here (" << setUp->
structFiles.at(iter) <<
")";
2806 rvapi_put_horz_theader (
"FragmentDistancesTSTable", hlpSS.str().c_str(), hlpSS2.str().c_str(), iter );
2810 for (
unsigned int iter = 0; iter < static_cast<unsigned int> ( maxFrag ); iter++ )
2812 std::stringstream hlpSS;
2813 hlpSS <<
"Fragment Number " << iter;
2814 std::stringstream hlpSS2;
2815 hlpSS2 <<
"This is the Trace Sigma distance for the fragment number " << iter <<
" to the database entry in the column header.";
2816 rvapi_put_vert_theader (
"FragmentDistancesTSTable", hlpSS.str().c_str(), hlpSS2.str().c_str(), iter );
2820 for (
unsigned int rIter = 0; rIter < static_cast<unsigned int> ( trSigmaDists.size() ); rIter++ )
2822 for (
unsigned int cIter = 0; cIter < static_cast<unsigned int> ( trSigmaDists.at(rIter).size() ); cIter++ )
2824 std::stringstream hlpSS;
2825 hlpSS << std::showpos << ProSHADE_internal_misc::roundDouble ( trSigmaDists.at(rIter).at(cIter) * 1000.0 ) / 1000.0;
2826 if ( hlpSS.str().length() != 6 ) {
int hlp = 6 - hlpSS.str().length();
for (
int i = 0; i < hlp; i++ ) { hlpSS <<
" "; } }
2827 if ( hlpSS.str().length() > 6 ) { hlpSS.str( hlpSS.str().substr( 0, 6 ) ); }
2828 rvapi_put_table_string (
"FragmentDistancesTSTable", hlpSS.str().c_str(), rIter, cIter );
2833 rvapi_add_table (
"FragmentDistancesRFTable",
2834 "Fragment Rotation Function distances to database entries",
2836 enLevDists.size() + trSigmaDists.size() + 1,
2838 fullRotFnDists.size(),
2839 fullRotFnDists.at(0).size(),
2843 for (
unsigned int iter = 0; iter < static_cast<unsigned int> ( fullRotFnDists.at(0).size() ); iter++ )
2845 std::stringstream hlpSS;
2846 hlpSS <<
"Database entry " << setUp->
structFiles.at(iter);
2847 std::stringstream hlpSS2;
2848 hlpSS2 <<
"This is the Rotation Function distance for the fragment in the row to the database entry listed here (" << setUp->
structFiles.at(iter) <<
")";
2849 rvapi_put_horz_theader (
"FragmentDistancesRFTable", hlpSS.str().c_str(), hlpSS2.str().c_str(), iter );
2853 for (
unsigned int iter = 0; iter < static_cast<unsigned int> ( maxFrag ); iter++ )
2855 std::stringstream hlpSS;
2856 hlpSS <<
"Fragment Number " << iter;
2857 std::stringstream hlpSS2;
2858 hlpSS2 <<
"This is the Rotation Function distance for the fragment number " << iter <<
" to the database entry in the column header.";
2859 rvapi_put_vert_theader (
"FragmentDistancesRFTable", hlpSS.str().c_str(), hlpSS2.str().c_str(), iter );
2863 for (
unsigned int rIter = 0; rIter < static_cast<unsigned int> ( fullRotFnDists.size() ); rIter++ )
2865 for (
unsigned int cIter = 0; cIter < static_cast<unsigned int> ( fullRotFnDists.at(rIter).size() ); cIter++ )
2867 std::stringstream hlpSS;
2868 hlpSS << std::showpos << ProSHADE_internal_misc::roundDouble ( fullRotFnDists.at(rIter).at(cIter) * 1000.0 ) / 1000.0;
2869 if ( hlpSS.str().length() != 6 ) {
int hlp = 6 - hlpSS.str().length();
for (
int i = 0; i < hlp; i++ ) { hlpSS <<
" "; } }
2870 if ( hlpSS.str().length() > 6 ) { hlpSS.str( hlpSS.str().substr( 0, 6 ) ); }
2871 rvapi_put_table_string (
"FragmentDistancesRFTable", hlpSS.str().c_str(), rIter, cIter );
2890 this->crossCorrDists.clear ( );
2891 this->traceSigmaDists.clear ( );
2892 this->rotFunctionDists.clear ( );
2893 this->cyclicSymmetries.clear ( );
2894 this->cyclicSymmetriesClear.clear ( );
2895 this->dihedralSymmetries.clear ( );
2896 this->tetrahedralSymmetry.clear ( );
2897 this->octahedralSymmetry.clear ( );
2898 this->icosahedralSymmetry.clear ( );
2899 this->fragmentList.clear ( );
2913 return ( std::string ( __PROSHADE_VERSION__ ) );
2941 if ( !this->fragmentsAvailable )
2943 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;
2948 return ( this->fragmentList );
2962 if ( this->distancesAvailable )
2964 return ( this->crossCorrDists );
2968 std::cout <<
"!!! ProSHADE WARNING !!! Attempted to access the cross-correlation distances without requesting their computation first. Returning empty vector." << std::endl;
2969 return ( std::vector<double> () );
2988 if ( this->distancesAvailable )
2990 return ( this->traceSigmaDists );
2994 std::cout <<
"!!! ProSHADE WARNING !!! Attempted to access the trace sigma distances without requesting their computation first. Returning empty vector." << std::endl;
2995 return ( std::vector<double> () );
3014 if ( this->distancesAvailable )
3016 return ( this->rotFunctionDists );
3020 std::cout <<
"!!! ProSHADE WARNING !!! Attempted to access the rotation function based distances without requesting their computation first. Returning empty vector." << std::endl;
3021 return ( std::vector<double> () );
3040 if ( this->symmetriesAvailable )
3042 return ( this->cyclicSymmetries );
3046 std::cout <<
"!!! ProSHADE WARNING !!! Attempted to access the cyclic symmetries list without requesting their computation first. Returning empty vector of arrays." << std::endl;
3047 return ( std::vector< std::array<double,5> > () );
3066 if ( this->symmetriesAvailable )
3068 return ( this->cyclicSymmetriesClear );
3072 std::cout <<
"!!! ProSHADE WARNING !!! Attempted to access the clear cyclic symmetries list without requesting their computation first. Returning empty vector of arrays." << std::endl;
3073 return ( std::vector< std::array<double,5> > () );
3094 if ( this->symmetriesAvailable )
3096 std::vector< double > ret;
3098 for (
unsigned int iter = 0; iter < static_cast<unsigned int> ( this->cyclicSymmetries.size() ); iter++ )
3100 for (
unsigned int it = 0; it < static_cast<unsigned int> ( this->cyclicSymmetries.at(iter).size() ); it++ )
3102 ret.emplace_back ( this->cyclicSymmetries.at(iter).at(it) );
3104 ret.emplace_back ( -999.999 );
3111 std::cout <<
"!!! ProSHADE WARNING !!! Attempted to access the cyclic symmetries list without requesting their computation first. Returning empty vector of arrays." << std::endl;
3112 return ( std::vector< double > () );
3134 if ( this->symmetriesAvailable )
3136 std::vector< double > ret;
3138 for (
unsigned int i = 0; i < static_cast<unsigned int> ( this->dihedralSymmetries.size() ); i++ )
3140 for (
unsigned int iter = 0; iter < static_cast<unsigned int> ( this->dihedralSymmetries.at(i).size() ); iter++ )
3142 for (
unsigned int it = 0; it < static_cast<unsigned int> ( this->dihedralSymmetries.at(i).at(iter).size() ); it++ )
3144 ret.emplace_back ( this->dihedralSymmetries.at(i).at(iter).at(it) );
3146 ret.emplace_back ( -999.999 );
3148 ret.emplace_back ( -777.777 );
3155 std::cout <<
"!!! ProSHADE WARNING !!! Attempted to access the dihedral symmetries list without requesting their computation first. Returning empty vector of arrays." << std::endl;
3156 return ( std::vector< double > () );
3176 if ( this->symmetriesAvailable )
3178 return ( this->dihedralSymmetries );
3182 std::cout <<
"!!! ProSHADE WARNING !!! Attempted to access the dihedral symmetries list without requesting their computation first. Returning empty vector of arrays." << std::endl;
3183 return ( std::vector< std::vector< std::array<double,6> > > () );
3203 if ( this->symmetriesAvailable )
3205 return ( this->dihedralSymmetriesClear );
3209 std::cout <<
"!!! ProSHADE WARNING !!! Attempted to access the clear dihedral symmetries list without requesting their computation first. Returning empty vector of arrays." << std::endl;
3210 return ( std::vector< std::vector< std::array<double,6> > > () );
3229 if ( this->symmetriesAvailable )
3231 return ( this->tetrahedralSymmetry );
3235 std::cout <<
"!!! ProSHADE WARNING !!! Attempted to access the tetrahedral symmetry list without requesting their computation first. Returning empty vector of arrays." << std::endl;
3236 return ( std::vector< std::array<double,5> > () );
3256 if ( this->symmetriesAvailable )
3258 std::vector< double > ret;
3260 for (
unsigned int iter = 0; iter < static_cast<unsigned int> ( this->tetrahedralSymmetry.size() ); iter++ )
3262 for (
unsigned int it = 0; it < static_cast<unsigned int> ( this->tetrahedralSymmetry.at(iter).size() ); it++ )
3264 ret.emplace_back ( this->tetrahedralSymmetry.at(iter).at(it) );
3266 ret.emplace_back ( -999.999 );
3273 std::cout <<
"!!! ProSHADE WARNING !!! Attempted to access the tetrahedral symmetry list without requesting their computation first. Returning empty vector of arrays." << std::endl;
3274 return ( std::vector< double > () );
3293 if ( this->symmetriesAvailable )
3295 return ( this->octahedralSymmetry );
3299 std::cout <<
"!!! ProSHADE WARNING !!! Attempted to access the octahedral symmetry list without requesting their computation first. Returning empty vector of arrays." << std::endl;
3300 return ( std::vector< std::array<double,5> > () );
3320 if ( this->symmetriesAvailable )
3322 std::vector< double > ret;
3324 for (
unsigned int iter = 0; iter < static_cast<unsigned int> ( this->octahedralSymmetry.size() ); iter++ )
3326 for (
unsigned int it = 0; it < static_cast<unsigned int> ( this->octahedralSymmetry.at(iter).size() ); it++ )
3328 ret.emplace_back ( this->octahedralSymmetry.at(iter).at(it) );
3330 ret.emplace_back ( -999.999 );
3337 std::cout <<
"!!! ProSHADE WARNING !!! Attempted to access the octahedral symmetry list without requesting their computation first. Returning empty vector of arrays." << std::endl;
3338 return ( std::vector< double > () );
3357 if ( this->symmetriesAvailable )
3359 return ( this->icosahedralSymmetry );
3363 std::cout <<
"!!! ProSHADE WARNING !!! Attempted to access the icosahedral symmetry list without requesting their computation first. Returning empty vector of arrays." << std::endl;
3364 return ( std::vector< std::array<double,5> > () );
3384 if ( this->symmetriesAvailable )
3386 std::vector< double > ret;
3388 for (
unsigned int iter = 0; iter < static_cast<unsigned int> ( this->icosahedralSymmetry.size() ); iter++ )
3390 for (
unsigned int it = 0; it < static_cast<unsigned int> ( this->icosahedralSymmetry.at(iter).size() ); it++ )
3392 ret.emplace_back ( this->icosahedralSymmetry.at(iter).at(it) );
3394 ret.emplace_back ( -999.999 );
3401 std::cout <<
"!!! ProSHADE WARNING !!! Attempted to access the icosahedral symmetry list without requesting their computation first. Returning empty vector of arrays." << std::endl;
3402 return ( std::vector< double > () );
3422 if ( this->symmetriesAvailable )
3426 std::vector< std::array<double,5> > ret;
3427 std::array<double,5> hlpArr;
3435 ret.emplace_back ( hlpArr );
3438 if ( this->icosahedralSymmetry.size() < 1 )
3440 this->icosahedralSymmetry = getIcosahedralSymmetries ( );
3443 if ( static_cast<unsigned int> ( this->icosahedralSymmetry.size() ) > 0 )
3445 std::vector< std::array<double,5> > hlp = symObj.
generateIcosElements ( this->icosahedralSymmetry, this->settings, -1 );
3446 for (
unsigned int iter = 1; iter < static_cast<unsigned int> ( hlp.size() ); iter++ )
3448 ret.emplace_back ( hlp.at(iter) );
3454 if ( this->octahedralSymmetry.size() < 1 )
3456 this->octahedralSymmetry = getOctahedralSymmetries ( );
3459 if ( static_cast<unsigned int> ( this->octahedralSymmetry.size() ) > 0 )
3461 std::vector< std::array<double,5> > hlp = symObj.
generateOctaElements ( this->octahedralSymmetry, this->settings, -1 );
3462 for (
unsigned int iter = 1; iter < static_cast<unsigned int> ( hlp.size() ); iter++ )
3464 ret.emplace_back ( hlp.at(iter) );
3470 if ( this->tetrahedralSymmetry.size() < 1 )
3472 this->tetrahedralSymmetry = getTetrahedralSymmetries ( );
3475 if ( static_cast<unsigned int> ( this->tetrahedralSymmetry.size() ) > 0 )
3477 std::vector< std::array<double,5> > hlp = symObj.
generateTetrElements ( this->tetrahedralSymmetry, this->settings, -1 );
3478 for (
unsigned int iter = 1; iter < static_cast<unsigned int> ( hlp.size() ); iter++ )
3480 ret.emplace_back ( hlp.at(iter) );
3486 if ( this->dihedralSymmetries.size() < 1 )
3488 this->dihedralSymmetries = getDihedralSymmetries ( );
3490 this->dihedralSymmetriesClear = getClearDihedralSymmetries ( );
3492 if ( static_cast<unsigned int> ( this->dihedralSymmetriesClear.size() ) > 0 )
3494 for (
unsigned int it = 0; it < 2; it++ )
3496 if ( static_cast<int> ( this->dihedralSymmetriesClear.at(0).at(it)[0] ) % 2 == 0 )
3498 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++ )
3500 if ( iter == 0 ) {
continue; }
3501 if ( iter == -std::ceil( static_cast<int> ( this->dihedralSymmetriesClear.at(0).at(it)[0] ) / 2.0 ) ) {
continue; }
3502 hlpArr[0] = this->dihedralSymmetriesClear.at(0).at(it)[0];
3503 hlpArr[1] = this->dihedralSymmetriesClear.at(0).at(it)[1];
3504 hlpArr[2] = this->dihedralSymmetriesClear.at(0).at(it)[2];
3505 hlpArr[3] = this->dihedralSymmetriesClear.at(0).at(it)[3];
3506 hlpArr[4] = iter * ( ( 2.0 * M_PI ) / static_cast<double> ( this->dihedralSymmetriesClear.at(0).at(it)[0] ) );
3507 ret.emplace_back ( hlpArr );
3512 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++ )
3514 if ( iter == 0 ) {
continue; }
3515 hlpArr[0] = this->dihedralSymmetriesClear.at(0).at(it)[0];
3516 hlpArr[1] = this->dihedralSymmetriesClear.at(0).at(it)[1];
3517 hlpArr[2] = this->dihedralSymmetriesClear.at(0).at(it)[2];
3518 hlpArr[3] = this->dihedralSymmetriesClear.at(0).at(it)[3];
3519 hlpArr[4] = iter * ( ( 2.0 * M_PI ) / static_cast<double> ( this->dihedralSymmetriesClear.at(0).at(it)[0] ) );
3520 ret.emplace_back ( hlpArr );
3529 if ( this->cyclicSymmetries.size() < 1 )
3531 this->cyclicSymmetries = getCyclicSymmetries ( );
3533 this->cyclicSymmetriesClear = getClearCyclicSymmetries ( );
3535 if ( static_cast<unsigned int> ( this->cyclicSymmetriesClear.size() ) > 0 )
3537 if ( static_cast<int> ( this->cyclicSymmetriesClear.at(0)[0] ) % 2 == 0 )
3539 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++ )
3541 if ( iter == 0 ) {
continue; }
3542 if ( iter == -std::ceil( static_cast<int> ( this->cyclicSymmetriesClear.at(0)[0] ) / 2.0 ) ) {
continue; }
3543 hlpArr[0] = this->cyclicSymmetriesClear.at(0)[0];
3544 hlpArr[1] = this->cyclicSymmetriesClear.at(0)[1];
3545 hlpArr[2] = this->cyclicSymmetriesClear.at(0)[2];
3546 hlpArr[3] = this->cyclicSymmetriesClear.at(0)[3];
3547 hlpArr[4] = iter * ( ( 2.0 * M_PI ) / static_cast<double> ( this->cyclicSymmetriesClear.at(0)[0] ) );
3548 ret.emplace_back ( hlpArr );
3553 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++ )
3555 if ( iter == 0 ) {
continue; }
3556 hlpArr[0] = this->cyclicSymmetriesClear.at(0)[0];
3557 hlpArr[1] = this->cyclicSymmetriesClear.at(0)[1];
3558 hlpArr[2] = this->cyclicSymmetriesClear.at(0)[2];
3559 hlpArr[3] = this->cyclicSymmetriesClear.at(0)[3];
3560 hlpArr[4] = iter * ( ( 2.0 * M_PI ) / static_cast<double> ( this->cyclicSymmetriesClear.at(0)[0] ) );
3561 ret.emplace_back ( hlpArr );
3568 std::cout <<
"!!! ProSHADE WARNING !!! Did not find any symmetries to report. Returning empty vector..." << std::endl;
3569 return ( std::vector< std::array<double,5> > () );
3573 std::cout <<
"!!! ProSHADE WARNING !!! Attempted to access the symmetry elements list without requesting their computation first. Returning empty vector of arrays." << std::endl;
3574 return ( std::vector< std::array<double,5> > () );
3578 std::cerr <<
"!!! ProSHADE ERROR !!! Something went wery wrong... Please report this. Returning empty vector..." << std::endl;
3579 return ( std::vector< std::array<double,5> > () );
3597 if ( this->symmetriesAvailable )
3599 std::vector< std::array< double, 5 > > hlp = this->getRecommendedSymmetry ( );
3600 std::vector< double > ret;
3602 for (
unsigned int iter = 0; iter < static_cast<unsigned int> ( hlp.size() ); iter++ )
3604 for (
unsigned int it = 0; it < static_cast<unsigned int> ( hlp.at(iter).size() ); it++ )
3606 ret.emplace_back ( hlp.at(iter).at(it) );
3608 ret.emplace_back ( -999.999 );
3615 std::cout <<
"!!! ProSHADE WARNING !!! Attempted to access the symmetry elements list without requesting their computation first. Returning empty vector." << std::endl;
3616 return ( std::vector< double > () );
3639 if ( this->symmetriesAvailable )
3643 std::vector< std::array<double,5> > ret;
3644 std::array<double,5> hlpArr;
3652 ret.emplace_back ( hlpArr );
3657 if ( symType ==
"D" )
3660 if ( this->dihedralSymmetries.size() < 1 )
3662 this->dihedralSymmetries = getDihedralSymmetries ( );
3666 symFold = this->dihedralSymmetries.at(0).at(0)[0];
3671 if ( this->cyclicSymmetries.size() < 1 )
3673 this->cyclicSymmetries = getCyclicSymmetries ( );
3677 symFold = this->cyclicSymmetries.at(0)[0];
3682 if ( symType ==
"C" )
3685 if ( this->cyclicSymmetries.size() < 1 )
3687 this->cyclicSymmetries = getCyclicSymmetries ( );
3691 bool foundSym =
false;
3692 for (
unsigned int it = 0; it < static_cast<unsigned int> ( this->cyclicSymmetries.size() ); it++ )
3694 if ( this->cyclicSymmetries.at(it)[0] == symFold )
3700 if ( static_cast<int> ( this->cyclicSymmetries.at(it)[0] ) % 2 == 0 )
3702 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++ )
3704 if ( iter == 0 ) {
continue; }
3705 if ( iter == -std::ceil( static_cast<int> ( this->cyclicSymmetries.at(it)[0] ) / 2.0 ) ) {
continue; }
3706 hlpArr[0] = this->cyclicSymmetries.at(it)[0];
3707 hlpArr[1] = this->cyclicSymmetries.at(it)[1];
3708 hlpArr[2] = this->cyclicSymmetries.at(it)[2];
3709 hlpArr[3] = this->cyclicSymmetries.at(it)[3];
3710 hlpArr[4] = iter * ( ( 2.0 * M_PI ) / static_cast<double> ( this->cyclicSymmetries.at(it)[0] ) );
3711 ret.emplace_back ( hlpArr );
3716 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++ )
3718 if ( iter == 0 ) {
continue; }
3719 hlpArr[0] = this->cyclicSymmetries.at(it)[0];
3720 hlpArr[1] = this->cyclicSymmetries.at(it)[1];
3721 hlpArr[2] = this->cyclicSymmetries.at(it)[2];
3722 hlpArr[3] = this->cyclicSymmetries.at(it)[3];
3723 hlpArr[4] = iter * ( ( 2.0 * M_PI ) / static_cast<double> ( this->cyclicSymmetries.at(it)[0] ) );
3724 ret.emplace_back ( hlpArr );
3736 std::cout <<
"!!! ProSHADE WARNING !!! Requested symmetry elements for " << symType <<
"-" << symFold <<
" symmetry, but this symmetry was not found. Returning empty vector." << std::endl;
3737 return ( std::vector< std::array<double,5> > () );
3742 if ( symType ==
"D" )
3745 if ( this->dihedralSymmetries.size() < 1 )
3747 this->dihedralSymmetries = getDihedralSymmetries ( );
3751 bool foundSym =
false;
3752 for (
unsigned int i = 0; i < static_cast<unsigned int> ( this->dihedralSymmetries.size() ); i++ )
3754 if ( this->dihedralSymmetries.at(i).at(0)[0] == symFold )
3760 for (
unsigned int it = 0; it < 2; it++ )
3762 if ( static_cast<int> ( this->dihedralSymmetries.at(i).at(it)[0] ) % 2 == 0 )
3764 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++ )
3766 if ( iter == 0 ) {
continue; }
3767 if ( iter == -std::ceil( static_cast<int> ( this->dihedralSymmetries.at(i).at(it)[0] ) / 2.0 ) ) {
continue; }
3768 hlpArr[0] = this->dihedralSymmetries.at(i).at(it)[0];
3769 hlpArr[1] = this->dihedralSymmetries.at(i).at(it)[1];
3770 hlpArr[2] = this->dihedralSymmetries.at(i).at(it)[2];
3771 hlpArr[3] = this->dihedralSymmetries.at(i).at(it)[3];
3772 hlpArr[4] = iter * ( ( 2.0 * M_PI ) / static_cast<double> ( this->dihedralSymmetries.at(i).at(it)[0] ) );
3773 ret.emplace_back ( hlpArr );
3778 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++ )
3780 if ( iter == 0 ) {
continue; }
3781 hlpArr[0] = this->dihedralSymmetries.at(i).at(it)[0];
3782 hlpArr[1] = this->dihedralSymmetries.at(i).at(it)[1];
3783 hlpArr[2] = this->dihedralSymmetries.at(i).at(it)[2];
3784 hlpArr[3] = this->dihedralSymmetries.at(i).at(it)[3];
3785 hlpArr[4] = iter * ( ( 2.0 * M_PI ) / static_cast<double> ( this->dihedralSymmetries.at(i).at(it)[0] ) );
3786 ret.emplace_back ( hlpArr );
3799 std::cout <<
"!!! ProSHADE WARNING !!! Requested symmetry elements for " << symType <<
"-" << symFold <<
" symmetry, but this symmetry was not found. Returning empty vector." << std::endl;
3800 return ( std::vector< std::array<double,5> > () );
3805 if ( symType ==
"T" )
3808 if ( this->tetrahedralSymmetry.size() < 1 )
3810 this->tetrahedralSymmetry = getTetrahedralSymmetries ( );
3814 if ( this->tetrahedralSymmetry.size() > 1 )
3816 std::vector< std::array<double,5 >> hlp = symObj.
generateTetrElements ( this->tetrahedralSymmetry, settings, -1 );
3817 for (
unsigned int iter = 1; iter < static_cast<unsigned int> ( hlp.size() ); iter++ )
3819 ret.emplace_back ( hlp.at(iter) );
3824 if ( this->tetrahedralSymmetry.size() < 1 )
3826 std::cout <<
"!!! ProSHADE WARNING !!! Requested symmetry elements for tetrahedral symmetry, but this symmetry was not found. Returning empty vector." << std::endl;
3827 return ( std::vector< std::array<double,5> > () );
3832 if ( symType ==
"O" )
3835 if ( this->octahedralSymmetry.size() < 1 )
3837 this->octahedralSymmetry = getOctahedralSymmetries ( );
3841 if ( this->octahedralSymmetry.size() > 1 )
3843 std::vector< std::array<double,5> > hlp = symObj.
generateOctaElements ( this->octahedralSymmetry, settings, -1 );
3844 for (
unsigned int iter = 1; iter < static_cast<unsigned int> ( hlp.size() ); iter++ )
3846 ret.emplace_back ( hlp.at(iter) );
3851 if ( this->octahedralSymmetry.size() < 1 )
3853 std::cout <<
"!!! ProSHADE WARNING !!! Requested symmetry elements for octahedral symmetry, but this symmetry was not found. Returning empty vector." << std::endl;
3854 return ( std::vector< std::array<double,5> > () );
3859 if ( symType ==
"I" )
3862 if ( this->icosahedralSymmetry.size() < 1 )
3864 this->icosahedralSymmetry = getIcosahedralSymmetries ( );
3868 if ( this->icosahedralSymmetry.size() > 1 )
3870 std::vector< std::array<double,5> > hlp = symObj.
generateIcosElements ( this->icosahedralSymmetry, settings, -1 );
3871 for (
unsigned int iter = 1; iter < static_cast<unsigned int> ( hlp.size() ); iter++ )
3873 ret.emplace_back ( hlp.at(iter) );
3878 if ( this->icosahedralSymmetry.size() < 1 )
3880 std::cout <<
"!!! ProSHADE WARNING !!! Requested symmetry elements for icosahedral symmetry, but this symmetry was not found. Returning empty vector." << std::endl;
3881 return ( std::vector< std::array<double,5> > () );
3885 if ( ( symType !=
"I" ) && ( symType !=
"O" ) && ( symType !=
"T" ) && ( symType !=
"D" ) && ( symType !=
"C" ) )
3887 std::cerr <<
"!!! ProSHADE ERROR !!! Unknown symmetry type supplied to the \"getSpecificSymmetryElements\" function. Allowed values are \"C\", \"D\", \"T\", \"O\" and \"I\". Terminating..." << std::endl;
3896 std::cout <<
"!!! ProSHADE WARNING !!! Attempted to access the symmetry elements list without requesting their computation first. Returning empty vector of arrays." << std::endl;
3897 return ( std::vector< std::array<double,5> > () );
3901 std::cerr <<
"!!! ProSHADE ERROR !!! Something went wery wrong... Please report this. Returning empty vector..." << std::endl;
3902 return ( std::vector< std::array<double,5> > () );
3924 if ( this->symmetriesAvailable )
3926 std::vector< std::array< double, 5 > > hlp = this->getSpecificSymmetryElements ( symType, symFold );
3927 std::vector< double > ret;
3929 for (
unsigned int iter = 0; iter < static_cast<unsigned int> ( hlp.size() ); iter++ )
3931 for (
unsigned int it = 0; it < static_cast<unsigned int> ( hlp.at(iter).size() ); it++ )
3933 ret.emplace_back ( hlp.at(iter).at(it) );
3935 ret.emplace_back ( -999.999 );
3942 std::cout <<
"!!! ProSHADE WARNING !!! Attempted to access the symmetry elements list without requesting their computation first. Returning empty vector." << std::endl;
3943 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 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.