ProSHADE  0.7.6.6 (JUL 2022)
Protein Shape Detection
pyProSHADE.cpp
Go to the documentation of this file.
1 
22 //==================================================== Include PyBind11 header
23 #include <pybind11/pybind11.h>
24 #include <pybind11/stl.h>
25 #include <pybind11/numpy.h>
26 
27 //==================================================== Add the ProSHADE_settings and ProSHADE_run classes to the PyBind11 module
28 void add_settingsClass ( pybind11::module& pyProSHADE )
29 {
30  //================================================ Export the ProSHADE_settings class
31  pybind11::class_ < ProSHADE_settings > ( pyProSHADE, "ProSHADE_settings" )
32 
33  //============================================ Constructors (destructors do not need wrappers???)
34  .def ( pybind11::init < > ( ) )
35  .def ( pybind11::init < ProSHADE_Task > ( ), pybind11::arg ( "task" ) )
36  .def ( pybind11::init < ProSHADE_settings* > ( ), pybind11::arg ( "settings" ) )
37 
38  //============================================ Member variables
39  .def_readwrite ( "task", &ProSHADE_settings::task )
40 
41  .def_readwrite ( "inputFiles", &ProSHADE_settings::inputFiles )
42  .def_readwrite ( "forceP1", &ProSHADE_settings::forceP1 )
43  .def_readwrite ( "removeNegativeDensity", &ProSHADE_settings::removeNegativeDensity )
44  .def_readwrite ( "removeWaters", &ProSHADE_settings::removeWaters )
45  .def_readwrite ( "firstModelOnly", &ProSHADE_settings::firstModelOnly )
46 
47  .def_readwrite ( "requestedResolution", &ProSHADE_settings::requestedResolution )
48  .def_readwrite ( "changeMapResolution", &ProSHADE_settings::changeMapResolution )
49  .def_readwrite ( "changeMapResolutionTriLinear", &ProSHADE_settings::changeMapResolutionTriLinear )
50  .def_readwrite ( "resolutionOversampling", &ProSHADE_settings::resolutionOversampling )
51 
52  .def_readwrite ( "pdbBFactorNewVal", &ProSHADE_settings::pdbBFactorNewVal )
53 
54  .def_readwrite ( "maxBandwidth", &ProSHADE_settings::maxBandwidth )
55  .def_readwrite ( "rotationUncertainty", &ProSHADE_settings::rotationUncertainty )
56 
57  .def_readwrite ( "usePhase", &ProSHADE_settings::usePhase )
58 
59  .def_readwrite ( "maxSphereDists", &ProSHADE_settings::maxSphereDists )
60 
61  .def_readwrite ( "integOrder", &ProSHADE_settings::integOrder )
62  .def_readwrite ( "integApproxSteps", &ProSHADE_settings::integApproxSteps )
63  .def_readwrite ( "noIntegrationSpeedup", &ProSHADE_settings::noIntegrationSpeedup )
64 
65  .def_readwrite ( "normaliseMap", &ProSHADE_settings::normaliseMap )
66 
67  .def_readwrite ( "invertMap", &ProSHADE_settings::invertMap )
68 
69  .def_readwrite ( "blurFactor", &ProSHADE_settings::blurFactor )
70  .def_readwrite ( "maskingThresholdIQRs", &ProSHADE_settings::maskingThresholdIQRs )
71  .def_readwrite ( "maskMap", &ProSHADE_settings::maskMap )
72  .def_readwrite ( "useCorrelationMasking", &ProSHADE_settings::useCorrelationMasking )
73  .def_readwrite ( "halfMapKernel", &ProSHADE_settings::halfMapKernel )
74  .def_readwrite ( "correlationKernel", &ProSHADE_settings::correlationKernel )
75  .def_readwrite ( "saveMask", &ProSHADE_settings::saveMask )
76  .def_readwrite ( "maskFileName", &ProSHADE_settings::maskFileName )
77  .def_readwrite ( "appliedMaskFileName", &ProSHADE_settings::appliedMaskFileName )
78 
79  .def_readwrite ( "fourierWeightsFileName", &ProSHADE_settings::fourierWeightsFileName )
80 
81  .def_readwrite ( "reBoxMap", &ProSHADE_settings::reBoxMap )
82  .def_readwrite ( "boundsExtraSpace", &ProSHADE_settings::boundsExtraSpace )
83  .def_readwrite ( "boundsSimilarityThreshold", &ProSHADE_settings::boundsSimilarityThreshold )
84  .def_readwrite ( "useSameBounds", &ProSHADE_settings::useSameBounds )
85  .def_readwrite ( "forceBounds", &ProSHADE_settings::forceBounds )
86 
87  .def_readwrite ( "moveToCOM", &ProSHADE_settings::moveToCOM )
88 
89  .def_readwrite ( "addExtraSpace", &ProSHADE_settings::addExtraSpace )
90  .def_readwrite ( "coOrdsExtraSpace", &ProSHADE_settings::coOrdsExtraSpace )
91 
92  .def_readwrite ( "progressiveSphereMapping", &ProSHADE_settings::progressiveSphereMapping )
93 
94  .def_readwrite ( "outName", &ProSHADE_settings::outName )
95 
96  .def_readwrite ( "computeEnergyLevelsDesc", &ProSHADE_settings::computeEnergyLevelsDesc )
97  .def_readwrite ( "enLevMatrixPowerWeight", &ProSHADE_settings::enLevMatrixPowerWeight )
98  .def_readwrite ( "computeTraceSigmaDesc", &ProSHADE_settings::computeTraceSigmaDesc )
99  .def_readwrite ( "computeRotationFuncDesc", &ProSHADE_settings::computeRotationFuncDesc )
100 
101  .def_readwrite ( "peakNeighbours", &ProSHADE_settings::peakNeighbours )
102  .def_readwrite ( "noIQRsFromMedianNaivePeak", &ProSHADE_settings::noIQRsFromMedianNaivePeak )
103 
104  .def_readwrite ( "smoothingFactor", &ProSHADE_settings::smoothingFactor )
105 
106  .def_readwrite ( "findSymCentre", &ProSHADE_settings::findSymCentre )
107  .def_readwrite ( "symMissPeakThres", &ProSHADE_settings::symMissPeakThres )
108  .def_readwrite ( "axisErrTolerance", &ProSHADE_settings::axisErrTolerance )
109  .def_readwrite ( "axisErrToleranceDefault", &ProSHADE_settings::axisErrToleranceDefault )
110  .def_readwrite ( "minSymPeak", &ProSHADE_settings::minSymPeak )
111  .def_readwrite ( "requestedSymmetryType", &ProSHADE_settings::requestedSymmetryType )
112  .def_readwrite ( "requestedSymmetryFold", &ProSHADE_settings::requestedSymmetryFold )
113  .def_readwrite ( "maxSymmetryFold", &ProSHADE_settings::maxSymmetryFold )
114  .def_readwrite ( "supportedSymmetryFold", &ProSHADE_settings::supportedSymmetryFold )
115  .def_readwrite ( "useBiCubicInterpolationOnPeaks", &ProSHADE_settings::useBiCubicInterpolationOnPeaks )
116  .def_readwrite ( "maxSymmetryFold", &ProSHADE_settings::maxSymmetryFold )
117  .def_readwrite ( "fscThreshold", &ProSHADE_settings::fscThreshold )
118  .def_readwrite ( "peakThresholdMin", &ProSHADE_settings::peakThresholdMin )
119  .def_readwrite ( "fastISearch", &ProSHADE_settings::fastISearch )
120 
121  .def_readwrite ( "overlayStructureName", &ProSHADE_settings::overlayStructureName )
122  .def_readwrite ( "rotTrsJSONFile", &ProSHADE_settings::rotTrsJSONFile )
123 
124  .def_readwrite ( "verbose", &ProSHADE_settings::verbose )
125  .def_readwrite ( "messageShift", &ProSHADE_settings::messageShift )
126 
127  //============================================ Mutators
128  .def ( "addStructure", &ProSHADE_settings::addStructure, "Adds a structure file name to the appropriate variable.", pybind11::arg ( "structure" ) )
129  .def ( "setResolution", &ProSHADE_settings::setResolution, "This function sets the resolution in the appropriate variable.", pybind11::arg ( "resolution" ) )
130  .def ( "setPDBBFactor", &ProSHADE_settings::setPDBBFactor, "Sets the requested B-factor value for PDB files in the appropriate variable.", pybind11::arg ( "newBF" ) )
131  .def ( "setNormalisation", &ProSHADE_settings::setNormalisation, "Sets the requested map normalisation value in the appropriate variable.", pybind11::arg ( "normalise" ) )
132  .def ( "setMapInversion", &ProSHADE_settings::setMapInversion, "Sets the requested map inversion value in the appropriate variable.", pybind11::arg ( "mInv" ) )
133  .def ( "setVerbosity", &ProSHADE_settings::setVerbosity, "Sets the requested verbosity in the appropriate variable.", pybind11::arg ( "verbosity" ) )
134  .def ( "setMaskBlurFactor", &ProSHADE_settings::setMaskBlurFactor, "Sets the requested map blurring factor in the appropriate variable.", pybind11::arg ( "blurFac" ) )
135  .def ( "setMaskIQR", &ProSHADE_settings::setMaskIQR, "Sets the requested number of IQRs for masking threshold in the appropriate variable.", pybind11::arg ( "noIQRs" ) )
136  .def ( "setMasking", &ProSHADE_settings::setMasking, "Sets the requested map masking decision value in the appropriate variable.", pybind11::arg ( "mask" ) )
137  .def ( "setCorrelationMasking", &ProSHADE_settings::setCorrelationMasking, "Sets the requested map masking type in the appropriate variable.", pybind11::arg ( "corMask" ) )
138  .def ( "setTypicalNoiseSize", &ProSHADE_settings::setTypicalNoiseSize, "Sets the requested \"fake\" half-map kernel in the appropriate variable.", pybind11::arg ( "typNoi" ) )
139  .def ( "setMinimumMaskSize", &ProSHADE_settings::setMinimumMaskSize, "Sets the requested minimum mask size.", pybind11::arg ( "minMS" ) )
140  .def ( "setMaskSaving", &ProSHADE_settings::setMaskSaving, "Sets whether the mask should be saved.", pybind11::arg ( "savMsk" ) )
141  .def ( "setMaskFilename", &ProSHADE_settings::setMaskFilename, "Sets where the mask should be saved.", pybind11::arg ( "mskFln" ) )
142  .def ( "setAppliedMaskFilename", &ProSHADE_settings::setAppliedMaskFilename, "Sets the filename of the mask data that should be applied to the input map.", pybind11::arg ( "mskFln" ) )
143  .def ( "setFourierWeightsFilename", &ProSHADE_settings::setFourierWeightsFilename, "Sets the filename of the Fourier weights data that should be applied to the input map.", pybind11::arg ( "fWgFln" ) )
144  .def ( "setMapReboxing", &ProSHADE_settings::setMapReboxing, "Sets whether re-boxing needs to be done in the appropriate variable.", pybind11::arg ( "reBx" ) )
145  .def ( "setBoundsSpace", &ProSHADE_settings::setBoundsSpace, "Sets the requested number of angstroms for extra space in re-boxing in the appropriate variable.", pybind11::arg ( "boundsExSp" ) )
146  .def ( "setBoundsThreshold", &ProSHADE_settings::setBoundsThreshold, "Sets the threshold for number of indices difference acceptable to make index sizes same in the appropriate variable.", pybind11::arg ( "boundsThres" ) )
147  .def ( "setSameBoundaries", &ProSHADE_settings::setSameBoundaries, "Sets whether same boundaries should be used in the appropriate variable.", pybind11::arg ( "sameB" ) )
148  .def ( "setOutputFilename", &ProSHADE_settings::setOutputFilename, "Sets the requested output file name in the appropriate variable.", pybind11::arg ( "oFileName" ) )
149  .def ( "setMapResolutionChange", &ProSHADE_settings::setMapResolutionChange, "Sets the requested map resolution change decision in the appropriate variable.", pybind11::arg ( "mrChange" ) )
150  .def ( "setMapResolutionChangeTriLinear", &ProSHADE_settings::setMapResolutionChangeTriLinear, "Sets the requested map resolution change decision using tri-linear interpolation in the appropriate variable.", pybind11::arg ( "mrChange" ) )
151  .def ( "setMapResolutionOverSampling", &ProSHADE_settings::setMapResolutionOverSampling, "Sets the requested map resolution over-sampling.", pybind11::arg ( "overS" ) )
152  .def ( "setMapCentering", &ProSHADE_settings::setMapCentering, "Sets the requested map centering decision value in the appropriate variable.", pybind11::arg ( "com" ) )
153  .def ( "setExtraSpace", &ProSHADE_settings::setExtraSpace, "Sets the requested map extra space value in the appropriate variable.", pybind11::arg ( "exSpace" ) )
154  .def ( "setCoordExtraSpace", &ProSHADE_settings::setCoordExtraSpace, "Sets the requested co-ordinates extra space value in the appropriate variable.", pybind11::arg ( "exSpace" ) )
155  .def ( "setBoxCentering", &ProSHADE_settings::setBoxCentering, "Sets the requested centre of box to be at the real space co-ordinates supplied.", pybind11::arg ( "xPos" ), pybind11::arg ( "yPos" ), pybind11::arg ( "zPos" ) )
156  .def ( "setBandwidth", &ProSHADE_settings::setBandwidth, "Sets the requested spherical harmonics bandwidth in the appropriate variable.", pybind11::arg ( "band" ) )
157  .def ( "setProgressiveSphereMapping", &ProSHADE_settings::setProgressiveSphereMapping, "Sets the requested sphere mapping value settings approach in the appropriate variable.", pybind11::arg ( "progSphMap" ) )
158  .def ( "setSphereDistances", &ProSHADE_settings::setSphereDistances, "Sets the requested distance between spheres in the appropriate variable.", pybind11::arg ( "sphDist" ) )
159  .def ( "setIntegrationOrder", &ProSHADE_settings::setIntegrationOrder, "Sets the requested order for the Gauss-Legendre integration in the appropriate variable.", pybind11::arg ( "intOrd" ) )
160  .def ( "setIntegrationApproxSteps", &ProSHADE_settings::setIntegrationApproxSteps, "Sets the requested number of steps used in approximating Legendre polynomial decomposition to steps in the appropriate variable.", pybind11::arg ( "noSteps" ) )
161  .def ( "setIntegrationSpeedUp", &ProSHADE_settings::setIntegrationSpeedUp, "Sets the variable deciding if integration speedup should be used or not.", pybind11::arg ( "speedup" ) )
162  .def ( "setEnergyLevelsComputation", &ProSHADE_settings::setEnergyLevelsComputation, "Sets whether the energy level distance descriptor should be computed.", pybind11::arg ( "enLevDesc" ) )
163  .def ( "setTraceSigmaComputation", &ProSHADE_settings::setTraceSigmaComputation, "Sets whether the trace sigma distance descriptor should be computed.", pybind11::arg ( "trSigVal" ) )
164  .def ( "setRotationFunctionComputation", &ProSHADE_settings::setRotationFunctionComputation, "Sets whether the rotation function distance descriptor should be computed.", pybind11::arg ( "rotfVal" ) )
165  .def ( "setPeakNeighboursNumber", &ProSHADE_settings::setPeakNeighboursNumber, "Sets the number of neighbour values that have to be smaller for an index to be considered a peak.", pybind11::arg ( "pkS" ) )
166  .def ( "setPeakNaiveNoIQR", &ProSHADE_settings::setPeakNaiveNoIQR, "Sets the number of IQRs from the median for threshold height a peak needs to be considered a peak.", pybind11::arg ( "noIQRs" ) )
167  .def ( "setPhaseUsage", &ProSHADE_settings::setPhaseUsage, "Sets whether the phase information will be used.", pybind11::arg ( "phaseUsage" ) )
168  .def ( "setEnLevShellWeight", &ProSHADE_settings::setEnLevShellWeight, "Sets the weight of shell position for the energy levels computation.", pybind11::arg ( "mPower" ) )
169  .def ( "setGroupingSmoothingFactor", &ProSHADE_settings::setGroupingSmoothingFactor, "Sets the grouping smoothing factor into the proper variable.", pybind11::arg ( "smFact" ) )
170  .def ( "setMissingPeakThreshold", &ProSHADE_settings::setMissingPeakThreshold, "Sets the threshold for starting the missing peaks procedure.", pybind11::arg ( "mpThres" ) )
171  .def ( "setSymmetryCentreSearch", &ProSHADE_settings::setSymmetryCentreSearch, "Sets the symmetry centre search on or off.", pybind11::arg ( "sCen" ) )
172  .def ( "setAxisComparisonThreshold", &ProSHADE_settings::setAxisComparisonThreshold, "Sets the threshold for matching symmetry axes.", pybind11::arg ( "axThres" ) )
173  .def ( "setAxisComparisonThresholdBehaviour", &ProSHADE_settings::setAxisComparisonThresholdBehaviour, "Sets the automatic symmetry axis tolerance decreasing.", pybind11::arg ( "behav" ) )
174  .def ( "setMinimumPeakForAxis", &ProSHADE_settings::setMinimumPeakForAxis, "Sets the minimum peak height for symmetry axis to be considered.", pybind11::arg ( "minSP" ) )
175  .def ( "setRequestedSymmetry", &ProSHADE_settings::setRequestedSymmetry, "Sets the user requested symmetry type.", pybind11::arg ( "val" ) )
176  .def ( "setRequestedFold", &ProSHADE_settings::setRequestedFold, "Sets the user requested symmetry fold.", pybind11::arg ( "val" ) )
177  .def ( "setOverlaySaveFile", &ProSHADE_settings::setOverlaySaveFile, "Sets the filename to which the overlay structure is to be save into.", pybind11::arg ( "filename" ) )
178  .def ( "setOverlayJsonFile", &ProSHADE_settings::setOverlayJsonFile, "Sets the filename to which the overlay operations are to be save into.", pybind11::arg ( "filename" ) )
179  .def ( "setBicubicInterpolationSearch", &ProSHADE_settings::setBicubicInterpolationSearch, "Sets the bicubic interpolation on peaks.", pybind11::arg ( "bicubPeaks" ) )
180  .def ( "setMaxSymmetryFold", &ProSHADE_settings::setMaxSymmetryFold, "Sets the maximum symmetry fold (well, the maximum prime symmetry fold).", pybind11::arg ( "maxFold" ) )
181  .def ( "setFSCThreshold", &ProSHADE_settings::setFSCThreshold, "Sets the minimum FSC threshold for axis to be considered detected.", pybind11::arg ( "fscThr" ) )
182  .def ( "setPeakThreshold", &ProSHADE_settings::setPeakThreshold, "Sets the minimum peak height threshold for axis to be considered possible.", pybind11::arg ( "peakThr" ) )
183  .def ( "setNegativeDensity", &ProSHADE_settings::setNegativeDensity, "Sets the internal variable deciding whether input files negative density should be removed.", pybind11::arg ( "nDens" ) )
184 
185  .def ( "setSymmetryCentrePosition",
186  [] ( ProSHADE_settings &self, pybind11::array_t < proshade_double > pos )
187  {
188  //== Sanity check
189  pybind11::buffer_info pos_buf = pos.request();
190  if ( pos_buf.ndim != 1 ) { std::cerr << "!!! ProSHADE PYTHON MODULE ERROR !!! The second argument to setSymmetryCentrePosition() must be a 1D numpy array!" << std::endl; exit ( EXIT_FAILURE ); }
191  if ( pos_buf.shape.at(0) != 3 ) { std::cerr << "!!! ProSHADE PYTHON MODULE ERROR !!! The second argument to setSymmetryCentrePosition() must be an array of length 3!" << std::endl; exit ( EXIT_FAILURE ); }
192 
193  //== Copy to C++ data format
194  proshade_double* arrStart = static_cast< proshade_double* > ( pos_buf.ptr );
195  self.centrePosition.at(0) = arrStart[0];
196  self.centrePosition.at(1) = arrStart[1];
197  self.centrePosition.at(2) = arrStart[2];
198 
199  //== Done
200  return ;
201  }, "This function sets the symmetry rotation centre values from numpy vector.", pybind11::arg ( "pos" ) )
202 
203  //============================================ Command line parsing
204  .def ( "getCommandLineParams",
205  [] ( ProSHADE_settings &self, std::vector < std::string > args )
206  {
207  std::vector < char * > cstrs; cstrs.reserve ( args.size() );
208 
209  for ( auto &s : args )
210  cstrs.push_back ( const_cast < char * > ( s.c_str ( ) ) );
211 
212  return self.getCommandLineParams ( static_cast< int > ( cstrs.size ( ) ), cstrs.data ( ) );
213  }, "This function takes a VectorOfStrings and parses it as if it were command line arguments, filling in the calling ProSHADE_settings class with the values." )
214 
215  //============================================ Debugging
216  .def ( "printSettings", &ProSHADE_settings::printSettings, "This function prints the current values in the settings object." )
217 
218  //============================================ Description
219  .def ( "__repr__", [] ( ) { return "<ProSHADE_settings class object> (Settings class is used to set all settings values in a single place)"; } );
220 
221  //================================================ Export the ProSHADE_run class
222  pybind11::class_ < ProSHADE_run > ( pyProSHADE, "ProSHADE_run" )
223 
224  //============================================ Constructors (destructors do not need wrappers???)
225  .def ( pybind11::init < ProSHADE_settings* > ( ) )
226 
227  //============================================ General accessors
228  .def ( "getNoStructures", &ProSHADE_run::getNoStructures, "This function returns the number of structures used." )
229  .def ( "getVerbose", &ProSHADE_run::getVerbose, "This function returns the verbose value." )
230 
231  //============================================ Distances results accessor functions wrapped as lambda functions for numpy return types
232  .def ( "getEnergyLevelsVector",
233  [] ( ProSHADE_run &self ) -> pybind11::array_t < float >
234  {
235  //== Get the values
236  std::vector< proshade_double > vals = self.getEnergyLevelsVector ();
237 
238  //== Allocate memory for the numpy values
239  float* npVals = new float[static_cast<unsigned int> (vals.size())];
240  ProSHADE_internal_misc::checkMemoryAllocation ( npVals, __FILE__, __LINE__, __func__ );
241 
242  //== Copy values
243  for ( proshade_unsign iter = 0; iter < static_cast<proshade_unsign> ( vals.size() ); iter++ ) { npVals[iter] = static_cast< float > ( vals.at(iter) ); }
244 
245  //== Create capsules to make sure memory is released properly from the allocating language (C++ in this case)
246  pybind11::capsule pyCapsuleEnLevs ( npVals, []( void *f ) { float* foo = reinterpret_cast< float* > ( f ); delete foo; } );
247 
248  //== Copy the value
249  pybind11::array_t < float > retArr = pybind11::array_t<float> ( { static_cast<unsigned int> (vals.size()) }, // Shape
250  { sizeof(float) }, // C-stype strides
251  npVals, // Data
252  pyCapsuleEnLevs ); // Capsule (C++ destructor, basically)
253 
254  //== Done
255  return ( retArr );
256  }, "This function returns the energy level distances vector from the first to all other structures." )
257 
258  .def ( "getTraceSigmaVector",
259  [] ( ProSHADE_run &self ) -> pybind11::array_t < float >
260  {
261  //== Get the values
262  std::vector< proshade_double > vals = self.getTraceSigmaVector ();
263 
264  //== Allocate memory for the numpy values
265  float* npVals = new float[static_cast<unsigned int> (vals.size())];
266  ProSHADE_internal_misc::checkMemoryAllocation ( npVals, __FILE__, __LINE__, __func__ );
267 
268  //== Copy values
269  for ( proshade_unsign iter = 0; iter < static_cast<proshade_unsign> ( vals.size() ); iter++ ) { npVals[iter] = static_cast< float > ( vals.at(iter) ); }
270 
271  //== Create capsules to make sure memory is released properly from the allocating language (C++ in this case)
272  pybind11::capsule pyCapsuleTrSigs ( npVals, []( void *f ) { float* foo = reinterpret_cast< float* > ( f ); delete foo; } );
273 
274  //== Copy the value
275  pybind11::array_t < float > retArr = pybind11::array_t<float> ( { static_cast<unsigned int> (vals.size()) }, // Shape
276  { sizeof(float) }, // C-stype strides
277  npVals, // Data
278  pyCapsuleTrSigs ); // Capsule (C++ destructor, basically)
279 
280  //== Done
281  return ( retArr );
282  }, "This function returns the trace sigma distances vector from the first to all other structures." )
283 
284  .def ( "getRotationFunctionVector",
285  [] ( ProSHADE_run &self ) -> pybind11::array_t < float >
286  {
287  //== Get the values
288  std::vector< proshade_double > vals = self.getRotationFunctionVector ();
289 
290  //== Allocate memory for the numpy values
291  float* npVals = new float[static_cast<unsigned int> (vals.size())];
292  ProSHADE_internal_misc::checkMemoryAllocation ( npVals, __FILE__, __LINE__, __func__ );
293 
294  //== Copy values
295  for ( proshade_unsign iter = 0; iter < static_cast<proshade_unsign> ( vals.size() ); iter++ ) { npVals[iter] = static_cast< float > ( vals.at(iter) ); }
296 
297  //== Create capsules to make sure memory is released properly from the allocating language (C++ in this case)
298  pybind11::capsule pyCapsuleRotFun ( npVals, []( void *f ) { float* foo = reinterpret_cast< float* > ( f ); delete foo; } );
299 
300  //== Copy the value
301  pybind11::array_t < float > retArr = pybind11::array_t<float> ( { static_cast<unsigned int> (vals.size()) }, // Shape
302  { sizeof(float) }, // C-stype strides
303  npVals, // Data
304  pyCapsuleRotFun ); // Capsule (C++ destructor, basically)
305 
306  //== Done
307  return ( retArr );
308  }, "This function returns the full rotation function distances vector from the first to all other structures." )
309 
310  //============================================ Symmetry results accessor functions
311  .def ( "getSymmetryType", &ProSHADE_run::getSymmetryType, "This is the main accessor function for the user to get to know what symmetry type ProSHADE has detected and recommends." )
312  .def ( "getSymmetryFold", &ProSHADE_run::getSymmetryFold, "This is the main accessor function for the user to get to know what symmetry fold ProSHADE has detected and recommends." )
313  .def ( "getSymmetryAxis", &ProSHADE_run::getSymmetryAxis, "This function returns a single symmetry axis as a vector of strings from the recommended symmetry axes list.", pybind11::arg ( "axisNo" ) )
314  .def ( "getAllCSyms",
315  [] ( ProSHADE_run &self ) -> pybind11::array_t < float >
316  {
317  //== Get the values
318  std::vector< std::vector< proshade_double > > vals = self.getAllCSyms ();
319 
320  //== Allocate memory for the numpy values
321  float* npVals = new float[static_cast<unsigned int> ( vals.size() * 7 )];
322  ProSHADE_internal_misc::checkMemoryAllocation ( npVals, __FILE__, __LINE__, __func__ );
323 
324  //== Copy values
325  for ( proshade_unsign iter = 0; iter < static_cast<proshade_unsign> ( vals.size() ); iter++ ) { for ( proshade_unsign it = 0; it < 7; it++ ) { npVals[(iter*7)+it] = static_cast< float > ( vals.at(iter).at(it) ); } }
326 
327  //== Create capsules to make sure memory is released properly from the allocating language (C++ in this case)
328  pybind11::capsule pyCapsuleSymList ( npVals, []( void *f ) { float* foo = reinterpret_cast< float* > ( f ); delete foo; } );
329 
330  //== Copy the value
331  pybind11::array_t < float > retArr = pybind11::array_t<float> ( { static_cast<int> ( vals.size() ), static_cast<int> ( 7 ) }, // Shape
332  { 7 * sizeof(float), sizeof(float) }, // C-stype strides
333  npVals, // Data
334  pyCapsuleSymList ); // Capsule
335 
336  //== Done
337  return ( retArr );
338  }, "This function returns a all symmetry axes as a 2D numpy array." )
339  .def ( "getMapCOMProcessChange",
340  [] ( ProSHADE_run &self ) -> pybind11::array_t < float >
341  {
342  //== Get the values
343  std::vector< proshade_double > vals = self.getMapCOMProcessChange ();
344 
345  //== Allocate memory for the numpy values
346  float* npVals = new float[static_cast<unsigned int> ( 3 )];
347  ProSHADE_internal_misc::checkMemoryAllocation ( npVals, __FILE__, __LINE__, __func__ );
348 
349  //== Copy values
350  for ( proshade_unsign iter = 0; iter < 3; iter++ ) { npVals[iter] = static_cast< float > ( vals.at(iter) ); }
351 
352  //== Create capsules to make sure memory is released properly from the allocating language (C++ in this case)
353  pybind11::capsule pyCapsuleSymShift ( npVals, []( void *f ) { float* foo = reinterpret_cast< float* > ( f ); delete foo; } );
354 
355  //== Copy the value
356  pybind11::array_t < float > retArr = pybind11::array_t<float> ( { static_cast<int> ( vals.size() ) }, // Shape
357  { sizeof(float) }, // C-stype strides
358  npVals, // Data
359  pyCapsuleSymShift ); // Capsule
360 
361  //== Done
362  return ( retArr );
363  }, "This function returns the shift in Angstrom applied to the internal map representation in order to align its COM with the centre of box." )
364 
365  //============================================ Reboxing results accessor functions as lambda functions directly returning numpy arrays
366  .def ( "getOriginalBounds",
367  [] ( ProSHADE_run &self, proshade_unsign strNo ) -> pybind11::array_t < float >
368  {
369  //== Get values
370  std::vector< proshade_signed > vals = self.getOriginalBounds ( strNo );
371 
372  //== Allocate memory for the numpy values
373  float* npVals = new float[static_cast<proshade_unsign> ( vals.size() )];
374  ProSHADE_internal_misc::checkMemoryAllocation ( npVals, __FILE__, __LINE__, __func__ );
375 
376  //== Copy values
377  for ( proshade_unsign iter = 0; iter < static_cast<proshade_unsign> ( vals.size() ); iter++ ) { npVals[iter] = vals.at(iter); }
378 
379  //== Create capsules to make sure memory is released properly from the allocating language (C++ in this case)
380  pybind11::capsule pyCapsuleOrigBnds ( npVals, []( void *f ) { float* foo = reinterpret_cast< float* > ( f ); delete foo; } );
381 
382  //== Copy the value
383  pybind11::array_t < float > retArr = pybind11::array_t<float> ( { static_cast<proshade_unsign> ( vals.size() ) }, // Shape
384  { sizeof(float) }, // C-stype strides
385  npVals, // Data
386  pyCapsuleOrigBnds ); // Capsule (C++ destructor, basically)
387 
388  //== Done
389  return ( retArr );
390  }, "This function returns the original structure boundaries as numpy array." )
391 
392  .def ( "getReBoxedBounds",
393  [] ( ProSHADE_run &self, proshade_unsign strNo ) -> pybind11::array_t < float >
394  {
395  //== Get values
396  std::vector< proshade_signed > vals = self.getReBoxedBounds ( strNo );
397 
398  //== Allocate memory for the numpy values
399  float* npVals = new float[static_cast<proshade_unsign> ( vals.size() )];
400  ProSHADE_internal_misc::checkMemoryAllocation ( npVals, __FILE__, __LINE__, __func__ );
401 
402  //== Copy values
403  for ( proshade_unsign iter = 0; iter < static_cast<proshade_unsign> ( vals.size() ); iter++ ) { npVals[iter] = vals.at(iter); }
404 
405  //== Create capsules to make sure memory is released properly from the allocating language (C++ in this case)
406  pybind11::capsule pyCapsuleReBoBnds ( npVals, []( void *f ) { float* foo = reinterpret_cast< float* > ( f ); delete foo; } );
407 
408  //== Copy the value
409  pybind11::array_t < float > retArr = pybind11::array_t<float> ( { static_cast<proshade_unsign> ( vals.size() ) }, // Shape
410  { sizeof(float) }, // C-stype strides
411  npVals, // Data
412  pyCapsuleReBoBnds ); // Capsule (C++ destructor, basically)
413 
414  //== Done
415  return ( retArr );
416  }, "This function returns the re-boxed structure boundaries as numpy array." )
417 
418 
419  .def ( "getReBoxedMap",
420  [] ( ProSHADE_run &self, proshade_unsign strNo ) -> pybind11::array_t < float >
421  {
422  //== Get the values
423  std::vector< proshade_signed > vals = self.getReBoxedBounds ( strNo );
424 
425  //== Determine dimensions
426  proshade_unsign xDim = static_cast< proshade_unsign > ( vals.at(1) ) - static_cast< proshade_unsign > ( vals.at(0) ) + 1;
427  proshade_unsign yDim = static_cast< proshade_unsign > ( vals.at(3) ) - static_cast< proshade_unsign > ( vals.at(2) ) + 1;
428  proshade_unsign zDim = static_cast< proshade_unsign > ( vals.at(5) ) - static_cast< proshade_unsign > ( vals.at(4) ) + 1;
429 
430  //== Allocate memory for the numpy values
431  float* npVals = new float[xDim * yDim * zDim];
432  ProSHADE_internal_misc::checkMemoryAllocation ( npVals, __FILE__, __LINE__, __func__ );
433 
434  //== Copy values
435  for ( proshade_unsign iter = 0; iter < (xDim * yDim * zDim); iter++ ) { npVals[iter] = static_cast< float > ( self.getMapValue ( strNo, iter ) ); }
436 
437  //== Create capsules to make sure memory is released properly from the allocating language (C++ in this case)
438  pybind11::capsule pyCapsuleRebMap ( npVals, []( void *f ) { float* foo = reinterpret_cast< float* > ( f ); delete foo; } );
439 
440  //== Copy the value
441  pybind11::array_t < float > retArr = pybind11::array_t<float> ( { xDim, yDim, zDim }, // Shape
442  { yDim * zDim * sizeof(float), zDim * sizeof(float), sizeof(float) }, // C-stype strides
443  npVals, // Data
444  pyCapsuleRebMap ); // Capsule
445 
446  //== Done
447  return ( retArr );
448  }, "This function returns the re-boxed structure map as a numpy 3D array." )
449 
450  //============================================ Overlay results accessor functions as lambda functions directly returning numpy arrays
451  .def ( "getEulerAngles",
452  [] ( ProSHADE_run &self ) -> pybind11::array_t < float >
453  {
454  //== Get the values
455  std::vector< proshade_double > vals = self.getEulerAngles ( );
456 
457  //== Allocate memory for the numpy values
458  float* npVals = new float[static_cast<proshade_unsign> ( vals.size() )];
459  ProSHADE_internal_misc::checkMemoryAllocation ( npVals, __FILE__, __LINE__, __func__ );
460 
461  //== Copy values
462  for ( proshade_unsign iter = 0; iter < static_cast<proshade_unsign> ( vals.size() ); iter++ ) { npVals[iter] = static_cast< float > ( vals.at(iter) ); }
463 
464  //== Create capsules to make sure memory is released properly from the allocating language (C++ in this case)
465  pybind11::capsule pyCapsuleEulAngs ( npVals, []( void *f ) { float* foo = reinterpret_cast< float* > ( f ); delete foo; } );
466 
467  //== Copy the value
468  pybind11::array_t < float > retArr = pybind11::array_t<float> ( { static_cast<proshade_unsign> ( vals.size() ) }, // Shape
469  { sizeof(float) }, // C-stype strides
470  npVals, // Data
471  pyCapsuleEulAngs ); // Capsule
472 
473  //== Done
474  return ( retArr );
475  }, "This function returns the vector of Euler angles with best overlay correlation." )
476 
477  .def ( "getOptimalRotMat",
478  [] ( ProSHADE_run &self ) -> pybind11::array_t < float >
479  {
480  //== Get the values
481  std::vector< proshade_double > vals = self.getOptimalRotMat ( );
482 
483  //== Allocate memory for the numpy values
484  float* npVals = new float[static_cast<proshade_unsign> ( vals.size() )];
485  ProSHADE_internal_misc::checkMemoryAllocation ( npVals, __FILE__, __LINE__, __func__ );
486 
487  //== Copy values
488  for ( proshade_unsign iter = 0; iter < static_cast<proshade_unsign> ( vals.size() ); iter++ ) { npVals[iter] = static_cast< float > ( vals.at(iter) ); }
489 
490  //== Create capsules to make sure memory is released properly from the allocating language (C++ in this case)
491  pybind11::capsule pyCapsuleRotMat ( npVals, []( void *f ) { float* foo = reinterpret_cast< float* > ( f ); delete foo; } );
492 
493  //== Copy the value
494  pybind11::array_t < float > retArr = pybind11::array_t<float> ( { 3, 3 }, // Shape
495  { 3 * sizeof(float), sizeof(float) }, // C-stype strides
496  npVals, // Data
497  pyCapsuleRotMat ); // Capsule
498 
499  //== Done
500  return ( retArr );
501  }, "This function returns the vector of Euler angles with best overlay correlation." )
502 
503  .def ( "getTranslationToOrigin",
504  [] ( ProSHADE_run &self ) -> pybind11::array_t < float >
505  {
506  //== Get the values
507  std::vector< proshade_double > vals = self.getTranslationToOrigin ( );
508 
509  //== Allocate memory for the numpy values
510  float* npVals = new float[static_cast<proshade_unsign> ( vals.size() )];
511  ProSHADE_internal_misc::checkMemoryAllocation ( npVals, __FILE__, __LINE__, __func__ );
512 
513  //== Copy values
514  for ( proshade_unsign iter = 0; iter < static_cast<proshade_unsign> ( vals.size() ); iter++ ) { npVals[iter] = static_cast< float > ( vals.at(iter) ); }
515 
516  //== Create capsules to make sure memory is released properly from the allocating language (C++ in this case)
517  pybind11::capsule pyCapsuleTTO ( npVals, []( void *f ) { float* foo = reinterpret_cast< float* > ( f ); delete foo; } );
518 
519  //== Copy the value
520  pybind11::array_t < float > retArr = pybind11::array_t<float> ( { static_cast<proshade_unsign> ( vals.size() ) }, // Shape
521  { sizeof(float) }, // C-stype strides
522  npVals, // Data
523  pyCapsuleTTO ); // Capsule
524 
525  //== Done
526  return ( retArr );
527  }, "This function returns the negative values of the position of the rotation centre (the point about which the rotation should be done)." )
528  .def ( "getOriginToOverlayTranslation",
529  [] ( ProSHADE_run &self ) -> pybind11::array_t < float >
530  {
531  //== Get the values
532  std::vector< proshade_double > vals = self.getOriginToOverlayTranslation ( );
533 
534  //== Allocate memory for the numpy values
535  float* npVals = new float[static_cast<proshade_unsign> ( vals.size() )];
536  ProSHADE_internal_misc::checkMemoryAllocation ( npVals, __FILE__, __LINE__, __func__ );
537 
538  //== Copy values
539  for ( proshade_unsign iter = 0; iter < static_cast<proshade_unsign> ( vals.size() ); iter++ ) { npVals[iter] = static_cast< float > ( vals.at(iter) ); }
540 
541  //== Create capsules to make sure memory is released properly from the allocating language (C++ in this case)
542  pybind11::capsule pyCapsuleOTOT ( npVals, []( void *f ) { float* foo = reinterpret_cast< float* > ( f ); delete foo; } );
543 
544  //== Copy the value
545  pybind11::array_t < float > retArr = pybind11::array_t<float> ( { static_cast<proshade_unsign> ( vals.size() ) }, // Shape
546  { sizeof(float) }, // C-stype strides
547  npVals, // Data
548  pyCapsuleOTOT ); // Capsule
549 
550  //== Done
551  return ( retArr );
552  }, "This function returns the translation required to move the structure from origin to optimal overlay." )
553 
554 
555  //============================================ Description
556  .def ( "__repr__", [] ( ) { return "<ProSHADE_run class object> (Run class constructor takes a ProSHADE_settings object and completes a single run according to the settings object information)"; } );
557 }
ProSHADE_settings::noIQRsFromMedianNaivePeak
proshade_double noIQRsFromMedianNaivePeak
When doing peak searching, how many IQRs from the median the threshold for peak height should be (in ...
Definition: ProSHADE_settings.hpp:124
ProSHADE_settings::setOverlayJsonFile
void setOverlayJsonFile(std::string filename)
Sets the filename to which the overlay operations are to be save into.
Definition: ProSHADE.cpp:1564
ProSHADE_settings::setBoxCentering
void setBoxCentering(proshade_double xPos, proshade_double yPos, proshade_double zPos)
Sets the requested centre of box to be at the real space co-ordinates supplied.
Definition: ProSHADE.cpp:1041
ProSHADE_settings::maxBandwidth
proshade_unsign maxBandwidth
The bandwidth of spherical harmonics decomposition for the largest sphere.
Definition: ProSHADE_settings.hpp:59
ProSHADE_settings::integOrder
proshade_unsign integOrder
The order required for full Gauss-Legendre integration between the spheres.
Definition: ProSHADE_settings.hpp:70
ProSHADE_settings::rotTrsJSONFile
std::string rotTrsJSONFile
The filename to which the rotation and translation operations are to be saved into.
Definition: ProSHADE_settings.hpp:149
ProSHADE_settings::setEnLevShellWeight
void setEnLevShellWeight(proshade_double mPower)
Sets the weight of shell position for the energy levels computation.
Definition: ProSHADE.cpp:1359
ProSHADE_settings::computeTraceSigmaDesc
bool computeTraceSigmaDesc
If true, the trace sigma descriptor will be computed, otherwise all its computations will be omitted.
Definition: ProSHADE_settings.hpp:119
ProSHADE_settings::findSymCentre
bool findSymCentre
Should phase-less map be used to determine centre of symmetry?
Definition: ProSHADE_settings.hpp:130
ProSHADE_settings::setTraceSigmaComputation
void setTraceSigmaComputation(bool trSigVal)
Sets whether the trace sigma distance descriptor should be computed.
Definition: ProSHADE.cpp:1251
ProSHADE_settings::computeRotationFuncDesc
bool computeRotationFuncDesc
If true, the rotation function descriptor will be computed, otherwise all its computations will be om...
Definition: ProSHADE_settings.hpp:120
ProSHADE_settings::setSameBoundaries
void setSameBoundaries(bool sameB)
Sets whether same boundaries should be used in the appropriate variable.
Definition: ProSHADE.cpp:918
ProSHADE_settings::maxSymmetryFold
proshade_unsign maxSymmetryFold
The highest symmetry fold to search for.
Definition: ProSHADE_settings.hpp:138
ProSHADE_settings::setMinimumMaskSize
void setMinimumMaskSize(proshade_single minMS)
Sets the requested minimum mask size.
Definition: ProSHADE.cpp:756
ProSHADE_settings::setAppliedMaskFilename
void setAppliedMaskFilename(std::string mskFln)
Sets the filename of the mask data that should be applied to the input map.
Definition: ProSHADE.cpp:816
ProSHADE_settings::boundsExtraSpace
proshade_single boundsExtraSpace
The number of extra angstroms to be added to all re-boxing bounds just for safety.
Definition: ProSHADE_settings.hpp:97
ProSHADE_settings::setBicubicInterpolationSearch
void setBicubicInterpolationSearch(bool bicubPeaks)
Sets the bicubic interpolation on peaks.
Definition: ProSHADE.cpp:1582
ProSHADE_settings::setPeakNaiveNoIQR
void setPeakNaiveNoIQR(proshade_double noIQRs)
Sets the number of IQRs from the median for threshold height a peak needs to be considered a peak.
Definition: ProSHADE.cpp:1315
ProSHADE_settings::outName
std::string outName
The file name where the output structure(s) should be saved.
Definition: ProSHADE_settings.hpp:114
ProSHADE_settings::setMapInversion
void setMapInversion(bool mInv)
Sets the requested map inversion value in the appropriate variable.
Definition: ProSHADE.cpp:612
ProSHADE_settings::setMapResolutionChange
void setMapResolutionChange(bool mrChange)
Sets the requested map resolution change decision in the appropriate variable.
Definition: ProSHADE.cpp:959
ProSHADE_settings::setPeakNeighboursNumber
void setPeakNeighboursNumber(proshade_unsign pkS)
Sets the number of neighbour values that have to be smaller for an index to be considered a peak.
Definition: ProSHADE.cpp:1293
ProSHADE_settings::blurFactor
proshade_single blurFactor
This is the amount by which B-factors should be increased to create the blurred map for masking.
Definition: ProSHADE_settings.hpp:81
ProSHADE_settings::maskMap
bool maskMap
Should the map be masked from noise?
Definition: ProSHADE_settings.hpp:83
ProSHADE_settings::requestedSymmetryFold
proshade_unsign requestedSymmetryFold
The fold of the requested symmetry (only applicable to C and D symmetry types).
Definition: ProSHADE_settings.hpp:136
ProSHADE_settings::requestedSymmetryType
std::string requestedSymmetryType
The symmetry type requested by the user. Allowed values are C, D, T, O and I.
Definition: ProSHADE_settings.hpp:135
ProSHADE_settings::setSphereDistances
void setSphereDistances(proshade_single sphDist)
Sets the requested distance between spheres in the appropriate variable.
Definition: ProSHADE.cpp:1130
ProSHADE_settings::setVerbosity
void setVerbosity(proshade_signed verbosity)
Sets the requested verbosity in the appropriate variable.
Definition: ProSHADE.cpp:632
ProSHADE_settings::removeNegativeDensity
bool removeNegativeDensity
Should the negative density be removed from input files?
Definition: ProSHADE_settings.hpp:47
ProSHADE_settings::setMinimumPeakForAxis
void setMinimumPeakForAxis(proshade_double minSP)
Sets the minimum peak height for symmetry axis to be considered.
Definition: ProSHADE.cpp:1488
ProSHADE_settings::saveMask
bool saveMask
Should the mask be saved?
Definition: ProSHADE_settings.hpp:87
ProSHADE_settings::requestedResolution
proshade_single requestedResolution
The resolution to which the calculations are to be done.
Definition: ProSHADE_settings.hpp:50
ProSHADE_settings::minSymPeak
proshade_double minSymPeak
Minimum average peak for symmetry axis to be considered as "real".
Definition: ProSHADE_settings.hpp:134
ProSHADE_settings::setAxisComparisonThresholdBehaviour
void setAxisComparisonThresholdBehaviour(bool behav)
Sets the automatic symmetry axis tolerance decreasing.
Definition: ProSHADE.cpp:1467
ProSHADE_settings::progressiveSphereMapping
bool progressiveSphereMapping
If true, each shell will have its own angular resolution dependent on the actual number of map points...
Definition: ProSHADE_settings.hpp:111
ProSHADE_settings::maxSphereDists
proshade_single maxSphereDists
The distance between spheres in spherical mapping for the largest sphere.
Definition: ProSHADE_settings.hpp:67
ProSHADE_settings::symMissPeakThres
proshade_double symMissPeakThres
Percentage of peaks that could be missing that would warrant starting the missing peaks search proced...
Definition: ProSHADE_settings.hpp:131
ProSHADE_settings::setPDBBFactor
void setPDBBFactor(proshade_double newBF)
Sets the requested B-factor value for PDB files in the appropriate variable.
Definition: ProSHADE.cpp:572
ProSHADE_settings::addStructure
void addStructure(std::string structure)
Adds a structure file name to the appropriate variable.
Definition: ProSHADE.cpp:532
ProSHADE_settings::setMaskIQR
void setMaskIQR(proshade_single noIQRs)
Sets the requested number of IQRs for masking threshold in the appropriate variable.
Definition: ProSHADE.cpp:673
ProSHADE_settings::setMissingPeakThreshold
void setMissingPeakThreshold(proshade_double mpThres)
Sets the threshold for starting the missing peaks procedure.
Definition: ProSHADE.cpp:1402
ProSHADE_run::getVerbose
proshade_signed getVerbose(void)
This function returns the verbose value.
Definition: ProSHADE.cpp:3065
ProSHADE_settings::maskingThresholdIQRs
proshade_single maskingThresholdIQRs
Number of inter-quartile ranges from the median to be used for thresholding the blurred map for maski...
Definition: ProSHADE_settings.hpp:82
ProSHADE_settings::useCorrelationMasking
bool useCorrelationMasking
Should the blurring masking (false) or the correlation masking (true) be used?
Definition: ProSHADE_settings.hpp:84
ProSHADE_settings::usePhase
bool usePhase
If true, the full data will be used, if false, Patterson maps will be used instead and phased data wi...
Definition: ProSHADE_settings.hpp:64
ProSHADE_settings::setSymmetryCentreSearch
void setSymmetryCentreSearch(bool sCen)
Sets the symmetry centre search on or off.
Definition: ProSHADE.cpp:1423
ProSHADE_settings::setMapCentering
void setMapCentering(bool com)
Sets the requested map centering decision value in the appropriate variable.
Definition: ProSHADE.cpp:1019
ProSHADE_settings::setMaskBlurFactor
void setMaskBlurFactor(proshade_single blurFac)
Sets the requested map blurring factor in the appropriate variable.
Definition: ProSHADE.cpp:652
ProSHADE_settings::setPeakThreshold
void setPeakThreshold(proshade_double peakThr)
Sets the minimum peak height threshold for axis to be considered possible.
Definition: ProSHADE.cpp:1636
ProSHADE_settings::setPhaseUsage
void setPhaseUsage(bool phaseUsage)
Sets whether the phase information will be used.
Definition: ProSHADE.cpp:1337
ProSHADE_settings::maskFileName
std::string maskFileName
The filename to which mask should be saved.
Definition: ProSHADE_settings.hpp:88
ProSHADE_settings::verbose
proshade_signed verbose
Should the software report on the progress, or just be quiet? Value between -1 (nothing) and 4 (loud)
Definition: ProSHADE_settings.hpp:152
ProSHADE_settings::setFSCThreshold
void setFSCThreshold(proshade_double fscThr)
Sets the minimum FSC threshold for axis to be considered detected.
Definition: ProSHADE.cpp:1618
ProSHADE_settings::setBandwidth
void setBandwidth(proshade_unsign band)
Sets the requested spherical harmonics bandwidth in the appropriate variable.
Definition: ProSHADE.cpp:1110
ProSHADE_settings::messageShift
proshade_signed messageShift
This value allows shifting the messages to create more readable log for sub-processes.
Definition: ProSHADE_settings.hpp:153
ProSHADE_settings::setBoundsSpace
void setBoundsSpace(proshade_single boundsExSp)
Sets the requested number of angstroms for extra space in re-boxing in the appropriate variable.
Definition: ProSHADE.cpp:877
ProSHADE_settings::changeMapResolutionTriLinear
bool changeMapResolutionTriLinear
Should maps be re-sampled to obtain the required resolution?
Definition: ProSHADE_settings.hpp:52
ProSHADE_settings::setOutputFilename
void setOutputFilename(std::string oFileName)
Sets the requested output file name in the appropriate variable.
Definition: ProSHADE.cpp:939
ProSHADE_settings::useBiCubicInterpolationOnPeaks
bool useBiCubicInterpolationOnPeaks
This variable switch decides whether best symmetry is detected from peak indices, or whether bicubic ...
Definition: ProSHADE_settings.hpp:137
ProSHADE_run::getSymmetryAxis
std::vector< std::string > getSymmetryAxis(proshade_unsign axisNo)
This function returns a single symmetry axis as a vector of strings from the recommended symmetry axe...
Definition: ProSHADE.cpp:3099
ProSHADE_settings::setAxisComparisonThreshold
void setAxisComparisonThreshold(proshade_double axThres)
Sets the threshold for matching symmetry axes.
Definition: ProSHADE.cpp:1444
ProSHADE_settings::peakThresholdMin
proshade_double peakThresholdMin
The threshold for peak height above which axes are considered possible.
Definition: ProSHADE_settings.hpp:141
ProSHADE_settings::forceP1
bool forceP1
Should the P1 spacegroup be forced on the input PDB files?
Definition: ProSHADE_settings.hpp:44
ProSHADE_settings::setTypicalNoiseSize
void setTypicalNoiseSize(proshade_single typNoi)
Sets the requested "fake" half-map kernel in the appropriate variable.
Definition: ProSHADE.cpp:736
ProSHADE_run
This class provides the access point to the library.
Definition: ProSHADE.hpp:39
ProSHADE_settings::task
ProSHADE_Task task
This custom type variable determines which task to perfom (i.e. symmetry detection,...
Definition: ProSHADE_settings.hpp:40
ProSHADE_settings::setMaskFilename
void setMaskFilename(std::string mskFln)
Sets where the mask should be saved.
Definition: ProSHADE.cpp:796
ProSHADE_run::getSymmetryFold
proshade_unsign getSymmetryFold(void)
This is the main accessor function for the user to get to know what symmetry fold ProSHADE has detect...
Definition: ProSHADE.cpp:2047
ProSHADE_settings::setCoordExtraSpace
void setCoordExtraSpace(proshade_single exSpace)
Sets the requested co-ordinates extra space value in the appropriate variable.
Definition: ProSHADE.cpp:1090
ProSHADE_settings::reBoxMap
bool reBoxMap
This switch decides whether re-boxing is needed.
Definition: ProSHADE_settings.hpp:96
ProSHADE_settings::appliedMaskFileName
std::string appliedMaskFileName
The filename from which mask data will be read from.
Definition: ProSHADE_settings.hpp:89
ProSHADE_settings::resolutionOversampling
proshade_single resolutionOversampling
How much (%) should the requested resolution be over-sampled by map re-sampling?
Definition: ProSHADE_settings.hpp:53
ProSHADE_settings::coOrdsExtraSpace
proshade_single coOrdsExtraSpace
This number of Angstroms will be added before and any co-ordinates to make sure there is no atom dire...
Definition: ProSHADE_settings.hpp:108
ProSHADE_settings::normaliseMap
bool normaliseMap
Should the map be normalised to mean 0 sd 1?
Definition: ProSHADE_settings.hpp:75
ProSHADE_settings::addExtraSpace
proshade_single addExtraSpace
If this value is non-zero, this many angstroms of empty space will be added to the internal map.
Definition: ProSHADE_settings.hpp:107
ProSHADE_settings::setRequestedFold
void setRequestedFold(proshade_unsign val)
Sets the user requested symmetry fold.
Definition: ProSHADE.cpp:1528
ProSHADE_settings
This class stores all the settings and is passed to the executive classes instead of a multitude of p...
Definition: ProSHADE_settings.hpp:37
ProSHADE_settings::fscThreshold
proshade_double fscThreshold
The threshold for FSC value under which the axis is considered to be likely noise.
Definition: ProSHADE_settings.hpp:140
ProSHADE_settings::setIntegrationSpeedUp
void setIntegrationSpeedUp(bool speedup)
Sets the variable deciding if integration speedup should be used or not.
Definition: ProSHADE.cpp:1189
ProSHADE_settings::integApproxSteps
proshade_unsign integApproxSteps
The number of steps taken in the approximation of Legendre polynomial decomposition to terms.
Definition: ProSHADE_settings.hpp:71
ProSHADE_run::getSymmetryType
std::string getSymmetryType(void)
This is the main accessor function for the user to get to know what symmetry type ProSHADE has detect...
Definition: ProSHADE.cpp:2032
ProSHADE_settings::supportedSymmetryFold
proshade_unsign supportedSymmetryFold
Maximum supported fold by the map.
Definition: ProSHADE_settings.hpp:139
ProSHADE_settings::setMapReboxing
void setMapReboxing(bool reBx)
Sets whether re-boxing needs to be done in the appropriate variable.
Definition: ProSHADE.cpp:856
ProSHADE_settings::setMaxSymmetryFold
void setMaxSymmetryFold(proshade_unsign maxFold)
Sets the maximum symmetry fold (well, the maximum prime symmetry fold).
Definition: ProSHADE.cpp:1600
ProSHADE_settings::correlationKernel
proshade_single correlationKernel
This value in Angstrom will be used as the kernel for the map-FHM correlation computation.
Definition: ProSHADE_settings.hpp:86
ProSHADE_settings::setNegativeDensity
void setNegativeDensity(bool nDens)
Sets the internal variable deciding whether input files negative density should be removed.
Definition: ProSHADE.cpp:1654
ProSHADE_settings::invertMap
bool invertMap
Should the map be inverted? Only use this if you think you have the wrong hand in your map.
Definition: ProSHADE_settings.hpp:78
ProSHADE_settings::boundsSimilarityThreshold
proshade_signed boundsSimilarityThreshold
Number of indices which can be added just to make sure same size in indices is achieved.
Definition: ProSHADE_settings.hpp:98
ProSHADE_settings::setCorrelationMasking
void setCorrelationMasking(bool corMask)
Sets the requested map masking type in the appropriate variable.
Definition: ProSHADE.cpp:714
ProSHADE_settings::setProgressiveSphereMapping
void setProgressiveSphereMapping(bool progSphMap)
Sets the requested sphere mapping value settings approach in the appropriate variable.
Definition: ProSHADE.cpp:1209
ProSHADE_settings::setIntegrationApproxSteps
void setIntegrationApproxSteps(proshade_unsign noSteps)
Sets the requested number of steps used in approximating Legendre polynomial decomposition to steps i...
Definition: ProSHADE.cpp:1171
ProSHADE_settings::changeMapResolution
bool changeMapResolution
Should maps be re-sampled to obtain the required resolution?
Definition: ProSHADE_settings.hpp:51
ProSHADE_settings::setIntegrationOrder
void setIntegrationOrder(proshade_unsign intOrd)
Sets the requested order for the Gauss-Legendre integration in the appropriate variable.
Definition: ProSHADE.cpp:1150
ProSHADE_settings::setRotationFunctionComputation
void setRotationFunctionComputation(bool rotfVal)
Sets whether the rotation function distance descriptor should be computed.
Definition: ProSHADE.cpp:1272
ProSHADE_settings::rotationUncertainty
proshade_double rotationUncertainty
Alternative to bandwidth - the angle in degrees to which the rotation function accuracy should be com...
Definition: ProSHADE_settings.hpp:60
ProSHADE_settings::setOverlaySaveFile
void setOverlaySaveFile(std::string filename)
Sets the filename to which the overlay structure is to be save into.
Definition: ProSHADE.cpp:1546
ProSHADE_settings::overlayStructureName
std::string overlayStructureName
The filename to which the rotated and translated moving structure is to be saved.
Definition: ProSHADE_settings.hpp:148
ProSHADE_settings::moveToCOM
bool moveToCOM
Logical value stating whether the structure should be moved to have its Centre Of Mass (COM) in the m...
Definition: ProSHADE_settings.hpp:103
ProSHADE_settings::peakNeighbours
proshade_unsign peakNeighbours
Number of points in any direction that have to be lower than the considered index in order to conside...
Definition: ProSHADE_settings.hpp:123
ProSHADE_settings::smoothingFactor
proshade_double smoothingFactor
This factor decides how small the group sizes should be - larger factor means more smaller groups.
Definition: ProSHADE_settings.hpp:127
ProSHADE_settings::setMapResolutionOverSampling
void setMapResolutionOverSampling(proshade_single overS)
Sets the requested map resolution over-sampling.
Definition: ProSHADE.cpp:999
ProSHADE_settings::setFourierWeightsFilename
void setFourierWeightsFilename(std::string fWgFln)
Sets the filename of the mask data that should be applied to the input map.
Definition: ProSHADE.cpp:836
ProSHADE_settings::halfMapKernel
proshade_single halfMapKernel
This value in Angstrom will be used as the kernel for the "fake half-map" computation.
Definition: ProSHADE_settings.hpp:85
ProSHADE_internal_misc::checkMemoryAllocation
void checkMemoryAllocation(chVar checkVar, std::string fileP, unsigned int lineP, std::string funcP, std::string infoP="This error may occurs when ProSHADE requests memory to be\n : allocated to it and this operation fails. This could\n : happen when not enough memory is available, either due to\n : other processes using a lot of memory, or when the machine\n : does not have sufficient memory available. Re-run to see\n : if this problem persists.")
Checks if memory was allocated properly.
Definition: ProSHADE_misc.hpp:73
ProSHADE_settings::setGroupingSmoothingFactor
void setGroupingSmoothingFactor(proshade_double smFact)
Sets the grouping smoothing factor into the proper variable.
Definition: ProSHADE.cpp:1381
ProSHADE_settings::setRequestedSymmetry
void setRequestedSymmetry(std::string val)
Sets the user requested symmetry type.
Definition: ProSHADE.cpp:1508
ProSHADE_settings::setExtraSpace
void setExtraSpace(proshade_single exSpace)
Sets the requested map extra space value in the appropriate variable.
Definition: ProSHADE.cpp:1070
ProSHADE_settings::forceBounds
proshade_signed * forceBounds
These will be the boundaries to be forced upon the map.
Definition: ProSHADE_settings.hpp:100
ProSHADE_settings::fourierWeightsFileName
std::string fourierWeightsFileName
The filename from which Fourier weights data will be read from.
Definition: ProSHADE_settings.hpp:93
ProSHADE_settings::inputFiles
std::vector< std::string > inputFiles
This vector contains the filenames of all input structure files.
Definition: ProSHADE_settings.hpp:43
ProSHADE_settings::setMapResolutionChangeTriLinear
void setMapResolutionChangeTriLinear(bool mrChange)
Sets the requested map resolution change decision using tri-linear interpolation in the appropriate v...
Definition: ProSHADE.cpp:979
ProSHADE_settings::setMaskSaving
void setMaskSaving(bool savMsk)
Sets whether the mask should be saved.
Definition: ProSHADE.cpp:776
ProSHADE_settings::firstModelOnly
bool firstModelOnly
Shoud only the first PDB model be used, or should all models be used?
Definition: ProSHADE_settings.hpp:46
ProSHADE_settings::setBoundsThreshold
void setBoundsThreshold(proshade_signed boundsThres)
Sets the threshold for number of indices difference acceptable to make index sizes same in the approp...
Definition: ProSHADE.cpp:897
ProSHADE_settings::axisErrTolerance
proshade_double axisErrTolerance
Allowed error on vector axis in in dot product ( acos ( 1 - axErr ) is the allowed difference in radi...
Definition: ProSHADE_settings.hpp:132
ProSHADE_settings::useSameBounds
bool useSameBounds
Switch to say that the same boundaries as used for the first should be used for all input maps.
Definition: ProSHADE_settings.hpp:99
ProSHADE_settings::setMasking
void setMasking(bool mask)
Sets the requested map masking decision value in the appropriate variable.
Definition: ProSHADE.cpp:693
ProSHADE_settings::pdbBFactorNewVal
proshade_double pdbBFactorNewVal
Change all PDB B-factors to this value (for smooth maps).
Definition: ProSHADE_settings.hpp:56
ProSHADE_settings::noIntegrationSpeedup
bool noIntegrationSpeedup
This option turns off the integration speedup (only using abscissas and weights up to appropriate l f...
Definition: ProSHADE_settings.hpp:72
ProSHADE_settings::removeWaters
bool removeWaters
Should all waters be removed from input PDB files?
Definition: ProSHADE_settings.hpp:45
ProSHADE_settings::setResolution
void setResolution(proshade_single resolution)
Sets the requested resolution in the appropriate variable.
Definition: ProSHADE.cpp:552
ProSHADE_settings::printSettings
void printSettings(void)
This function prints the current values in the settings object.
Definition: ProSHADE.cpp:2716
ProSHADE_run::getNoStructures
proshade_unsign getNoStructures(void)
This function returns the number of structures used.
Definition: ProSHADE.cpp:3055
ProSHADE_settings::fastISearch
bool fastISearch
Should FSC be computed for all possible I matches, or just for the best one according to FR?
Definition: ProSHADE_settings.hpp:142
ProSHADE_settings::enLevMatrixPowerWeight
proshade_double enLevMatrixPowerWeight
If RRP matrices shell position is to be weighted by putting the position as an exponent,...
Definition: ProSHADE_settings.hpp:118
ProSHADE_settings::setNormalisation
void setNormalisation(bool normalise)
Sets the requested map normalisation value in the appropriate variable.
Definition: ProSHADE.cpp:592
ProSHADE_settings::setEnergyLevelsComputation
void setEnergyLevelsComputation(bool enLevDesc)
Sets whether the energy level distance descriptor should be computed.
Definition: ProSHADE.cpp:1230
ProSHADE_settings::computeEnergyLevelsDesc
bool computeEnergyLevelsDesc
If true, the energy levels descriptor will be computed, otherwise all its computations will be omitte...
Definition: ProSHADE_settings.hpp:117