 |
ProSHADE
0.7.5.3 (FEB 2021)
Protein Shape Detection
|
This namespace contains the main driving functions for each task.
More...
|
void | MapManipulationTask (ProSHADE_settings *settings, std::vector< proshade_signed * > *originalBounds, std::vector< proshade_signed * > *reboxedBounds, std::vector< proshade_double * > *manipulatedMaps) |
| The re-boxing task driver function. More...
|
|
void | DistancesComputationTask (ProSHADE_settings *settings, std::vector< proshade_double > *enLevs, std::vector< proshade_double > *trSigm, std::vector< proshade_double > *rotFun) |
| The distances computation task driver function. More...
|
|
void | SymmetryDetectionTask (ProSHADE_settings *settings, std::vector< proshade_double * > *axes, std::vector< std::vector< proshade_double > > *allCs) |
| The symmetry detection task driver function. More...
|
|
void | MapOverlayTask (ProSHADE_settings *settings, std::vector< proshade_double > *rotationCentre, std::vector< proshade_double > *eulerAngles, std::vector< proshade_double > *finalTranslation) |
| The symmetry detection task driver function. More...
|
|
void | ReportDistancesResults (ProSHADE_settings *settings, std::string str1, std::string str2, proshade_double enLevDist, proshade_double trSigmDist, proshade_double rotFunDist) |
| Simple function for reporting the distances computation results. More...
|
|
void | checkMapManipulationSettings (ProSHADE_settings *settings) |
| The re-boxing settings checks. More...
|
|
void | checkDistancesSettings (ProSHADE_settings *settings) |
| The distances computation settings checks. More...
|
|
void | checkSymmetrySettings (ProSHADE_settings *settings) |
| The symmetry computation settings checks. More...
|
|
void | checkOverlaySettings (ProSHADE_settings *settings) |
| The map overlay computation settings checks. More...
|
|
This namespace contains the main driving functions for each task.
The ProSHADE_internal_tasks namespace contains the driving functions for all the tasks that can be accomplished by the ProSHADE tool. The user should not need to access this namespace when using the library.
◆ checkDistancesSettings()
The distances computation settings checks.
This function is called to check the settings object for having all the required information for the distances computation task to proceed.
- Parameters
-
[in] | settings | ProSHADE_settings object specifying the details of how distances computation should be done. |
Definition at line 258 of file ProSHADE_tasks.cpp.
263 throw ProSHADE_exception (
"There are not enough structures for distance computation.",
"ED00012", __FILE__, __LINE__, __func__,
"There needs to be at least two structures between which\n : distances are computed. The ProSHADE_settings object\n : contains less than two structures and therefore cannot\n : proceed. Please supply at least two structures by\n : repeatedly using the addStructure() function." );
269 throw ProSHADE_exception (
"Resolution value not set.",
"ED00013", __FILE__, __LINE__, __func__,
"The resolution value was not set. Please set the\n : resolution value for the distance computation by using\n : the setResolution() function." );
◆ checkMapManipulationSettings()
void ProSHADE_internal_tasks::checkMapManipulationSettings |
( |
ProSHADE_settings * |
settings | ) |
|
The re-boxing settings checks.
This function is called to check the settings object for having all the required information for the Re-Boxing task to proceed.
- Parameters
-
[in] | settings | ProSHADE_settings object specifying the details of how re-boxing should be done. |
Definition at line 106 of file ProSHADE_tasks.cpp.
111 throw ProSHADE_exception (
"There is no input structure for map manipulation.",
"EB00002", __FILE__, __LINE__, __func__,
"The ProSHADE_settings object does not contain any\n : structure that could be manipulated. Please supply exactly\n : one structure using the addStructure() function." );
117 ProSHADE_internal_messages::printWarningMessage ( settings->
verbose,
"!!! ProSHADE WARNING !!! The input file is not of the MAP (MRC) format. Will output re-boxed map, but beware that this is simple PDB->MAP conversion and REFMAC5 should be used to compute more appropriate maps.",
"WB00004" );
122 throw ProSHADE_exception (
"No resolution given for PDB file re-boxing.",
"EB00011", __FILE__, __LINE__, __func__,
"The ProSHADE_settings object does not contain any\n : resolution value. However, resolution is required when\n : re-boxing structures read from PDB files. Please supply\n : the resolution value using the setResolution() function." );
129 throw ProSHADE_exception (
"No output file name.",
"EB00016", __FILE__, __LINE__, __func__,
"There is no output file name set in the settings object.\n : Please supply the file name to where the re-boxed map\n : should be saved using the setOutputFilename() function." );
◆ checkOverlaySettings()
The map overlay computation settings checks.
This function is called to check the settings object for having all the required information for the map overlay task to proceed.
- Parameters
-
[in] | settings | ProSHADE_settings object specifying the details of how map overlay should be done. |
Definition at line 435 of file ProSHADE_tasks.cpp.
440 throw ProSHADE_exception (
"There are not enough structures for map overlay\n : computation.",
"EO00033", __FILE__, __LINE__, __func__,
"There needs to be exactly two structures for map overlay\n : mode to work; the first structure is the static and the\n : second is the moving structure." );
◆ checkSymmetrySettings()
The symmetry computation settings checks.
This function is called to check the settings object for having all the required information for the symmetry computation task to proceed.
- Parameters
-
[in] | settings | ProSHADE_settings object specifying the details of how symmetry detection should be done. |
Definition at line 342 of file ProSHADE_tasks.cpp.
347 throw ProSHADE_exception (
"There are not enough structures for symmetry detection.",
"ES00028", __FILE__, __LINE__, __func__,
"There needs to be at least one structure for which\n : symmetry is to be detected. Please supply at least one\n : structure by using the addStructure() function." );
353 throw ProSHADE_exception (
"Symmetry axis detection tolerance set to negative value.",
"ES00053", __FILE__, __LINE__, __func__,
"The symmetry axis detection tolerance was manually set to\n : negative value. This makes no sense, please supply\n : value >= 0.0." );
◆ DistancesComputationTask()
void ProSHADE_internal_tasks::DistancesComputationTask |
( |
ProSHADE_settings * |
settings, |
|
|
std::vector< proshade_double > * |
enLevs, |
|
|
std::vector< proshade_double > * |
trSigm, |
|
|
std::vector< proshade_double > * |
rotFun |
|
) |
| |
The distances computation task driver function.
This function is called to proceed with the distances computation task according to the information placed in the settings object passed as the first argument.
- Parameters
-
[in] | settings | ProSHADE_settings object specifying the details of how distances computation should be done. |
[in] | enLevs | Pointer to vector where all energy levels distances are to be saved into. |
[in] | trSigm | Pointer to vector where all trace sigma distances are to be saved into. |
[in] | rotFun | Pointer to vector where all rotation function distances are to be saved into. |
Definition at line 147 of file ProSHADE_tasks.cpp.
168 for ( proshade_unsign iter = 1; iter < static_cast<proshade_unsign> ( settings->
inputFiles.size() ); iter++ )
186 proshade_double enLevDist = 0.0;
190 proshade_double trSigmDist = 0.0;
194 proshade_double rotFunDist = 0.0;
207 delete compareChanging;
212 delete compareAgainst;
◆ MapManipulationTask()
void ProSHADE_internal_tasks::MapManipulationTask |
( |
ProSHADE_settings * |
settings, |
|
|
std::vector< proshade_signed * > * |
originalBounds, |
|
|
std::vector< proshade_signed * > * |
reboxedBounds, |
|
|
std::vector< proshade_double * > * |
manipulatedMaps |
|
) |
| |
The re-boxing task driver function.
This function is called to proceed with the map re-boxing task according to the information placed in the settings object passed as the first argument.
- Parameters
-
[in] | settings | ProSHADE_settings object specifying the details of how re-boxing should be done. |
[in] | originalBounds | Vector to which the original map boundaries of each re-boxed map will be saved into. |
[in] | reboxedBounds | Vector to which the re-boxed map boundaries of each re-boxed map will be saved into. |
[in] | manipulatedMaps | Vector to which the map values of each re-boxed map will be saved into. |
Definition at line 35 of file ProSHADE_tasks.cpp.
41 for ( proshade_unsign iter = 0; iter < static_cast<proshade_unsign> ( settings->
inputFiles.size() ); iter++ )
62 proshade_signed* nonZeroBounds =
new proshade_signed[6];
69 delete[] nonZeroBounds;
74 ss << settings->
outName <<
"_" << iter <<
".map";
77 else { strToRebox->
writeMap ( ss.str() ); }
85 proshade_double* mapCopy = NULL;
◆ MapOverlayTask()
void ProSHADE_internal_tasks::MapOverlayTask |
( |
ProSHADE_settings * |
settings, |
|
|
std::vector< proshade_double > * |
rotationCentre, |
|
|
std::vector< proshade_double > * |
eulerAngles, |
|
|
std::vector< proshade_double > * |
finalTranslation |
|
) |
| |
The symmetry detection task driver function.
This function is called to run the detect symmetries task according to the information placed in the settings object passed as the first argument.
- Parameters
-
[in] | settings | ProSHADE_settings object specifying the details of how distances computation should be done. |
[in] | rotationCentre | Pointer to vector for saving the position of the centre of rotation about which the rotation is to be done. |
[in] | eulerAngles | Pointer to vector where the three Euler angles will be saved into. |
[in] | finalTranslation | Pointer to a vector where the translation required to move structure from origin to optimal overlay with static structure will be saved into. |
Definition at line 371 of file ProSHADE_tasks.cpp.
377 proshade_double eulA, eulB, eulG, trsX, trsY, trsZ;
388 delete staticStructure;
389 delete movingStructure;
409 movingStructure->
writeOutOverlayFiles ( settings, eulA, eulB, eulG, rotationCentre, finalTranslation );
417 movingStructure->
reportOverlayResults ( settings, rotationCentre, eulerAngles, finalTranslation );
420 delete staticStructure;
421 delete movingStructure;
◆ ReportDistancesResults()
void ProSHADE_internal_tasks::ReportDistancesResults |
( |
ProSHADE_settings * |
settings, |
|
|
std::string |
str1, |
|
|
std::string |
str2, |
|
|
proshade_double |
enLevDist, |
|
|
proshade_double |
trSigmDist, |
|
|
proshade_double |
rotFunDist |
|
) |
| |
Simple function for reporting the distances computation results.
- Parameters
-
[in] | settings | ProSHADE_settings object specifying the details of how distances computation should be done. |
[in] | str1 | The name of the structure to which all other structures are to be compared to. |
[in] | str2 | The name of the structure which is compared to str1. |
[in] | enLevDist | The value of the energy levels descriptor for the two structures. |
[in] | trSimDist | The value of the trace sigma descriptor for the two structures. |
[in] | rotFunDist | The value of the roation function descriptor for the two structures. |
Definition at line 228 of file ProSHADE_tasks.cpp.
230 std::stringstream hlpSS;
231 hlpSS <<
"Distances between " << str1 <<
" and " << str2;
234 std::stringstream hlpSSE;
235 hlpSSE <<
"Energy levels distance : " << enLevDist;
238 std::stringstream hlpSSS;
239 hlpSSS <<
"Trace sigma distance : " << trSigmDist;
242 std::stringstream hlpSSR;
243 hlpSSR <<
"Rotation function distance: " << rotFunDist;
◆ SymmetryDetectionTask()
void ProSHADE_internal_tasks::SymmetryDetectionTask |
( |
ProSHADE_settings * |
settings, |
|
|
std::vector< proshade_double * > * |
axes, |
|
|
std::vector< std::vector< proshade_double > > * |
allCs |
|
) |
| |
The symmetry detection task driver function.
This function is called to run the detect symmetries task according to the information placed in the settings object passed as the first argument.
- Parameters
-
[in] | settings | ProSHADE_settings object specifying the details of how distances computation should be done. |
[in] | axes | A pointer to a vector to which all the axes of the recommended symmetry (if any) will be saved. |
[in] | allCs | A pointer to a vector to which all the detected cyclic symmetries will be saved into. |
Definition at line 286 of file ProSHADE_tasks.cpp.
292 for ( proshade_unsign iter = 0; iter < static_cast<proshade_unsign> ( settings->
inputFiles.size() ); iter++ )
327 delete symmetryStructure;
void computeSphericalHarmonics(ProSHADE_settings *settings)
This function computes the spherical harmonics decomposition for the whole structure.
bool computeTraceSigmaDesc
If true, the trace sigma descriptor will be computed, otherwise all its computations will be omitted.
bool computeRotationFuncDesc
If true, the rotation function descriptor will be computed, otherwise all its computations will be om...
void addToDblPtrVector(std::vector< proshade_double * > *vecToAddTo, proshade_double *elementToAdd)
Adds the element to the vector.
void createNewMapFromBounds(ProSHADE_settings *settings, ProSHADE_data *&newStr, proshade_signed *newBounds)
This function creates a new structure from the calling structure and new bounds values.
bool isFilePDB(std::string fName)
Function determining if the input data type is PDB.
void computeRotationFunction(ProSHADE_settings *settings)
This function computes the self-rotation function for this structure.
void getReBoxBoundaries(ProSHADE_settings *settings, proshade_signed *&ret)
This function finds the boundaries enclosing positive map values and adds some extra space.
void checkDistancesSettings(ProSHADE_settings *settings)
The distances computation settings checks.
This class is the representation of ProSHADE exception.
std::string outName
The file name where the output structure(s) should be saved.
This class contains all inputed and derived data for a single structure.
proshade_single requestedResolution
The resolution to which the calculations are to be done.
proshade_double originalPdbRotCenY
The centre of rotation as it relates to the original PDB positions (and not the ProSHADE internal map...
void checkOverlaySettings(ProSHADE_settings *settings)
The map overlay computation settings checks.
bool usePhase
If true, the full data will be used, if false, Patterson maps will be used instead and phased data wi...
void deepCopyMap(proshade_double *&saveTo, proshade_unsign verbose)
This function copies the internal map into the supplied pointer, which it also allocates.
void getOptimalRotation(ProSHADE_settings *settings, ProSHADE_internal_data::ProSHADE_data *staticStructure, ProSHADE_internal_data::ProSHADE_data *movingStructure, proshade_double *eulA, proshade_double *eulB, proshade_double *eulG)
This function finds the optimal rotation between two structures as described by the settings object.
void printWarningMessage(proshade_signed verbose, std::string message, std::string warnCode)
General stderr message printing (used for warnings).
proshade_double computeRotationunctionDescriptor(ProSHADE_internal_data::ProSHADE_data *obj1, ProSHADE_internal_data::ProSHADE_data *obj2, ProSHADE_settings *settings)
This function computes the rotation function descriptor value between two objects.
proshade_signed * getXFromPtr(void)
This function allows access to the map start along the X axis.
proshade_signed verbose
Should the software report on the progress, or just be quiet? Value between -1 (nothing) and 4 (loud)
void addToDoubleVector(std::vector< proshade_double > *vecToAddTo, proshade_double elementToAdd)
Adds the element to the vector.
proshade_double originalPdbTransX
The optimal translation vector as it relates to the original PDB positions (and not the ProSHADE inte...
void mapToSpheres(ProSHADE_settings *settings)
This function converts the internal map onto a set of concentric spheres.
proshade_double originalPdbTransY
The optimal translation vector as it relates to the original PDB positions (and not the ProSHADE inte...
void reportOverlayResults(ProSHADE_settings *settings, std::vector< proshade_double > *rotationCentre, std::vector< proshade_double > *eulerAngles, std::vector< proshade_double > *finalTranslation)
This function reports the results of the overlay mode.
void writeMap(std::string fName, std::string title="Created by ProSHADE and written by GEMMI", int mode=2)
Function for writing out the internal structure representation in MRC MAP format.
bool reBoxMap
This switch decides whether re-boxing is needed.
void getOptimalTranslation(ProSHADE_settings *settings, ProSHADE_internal_data::ProSHADE_data *staticStructure, ProSHADE_internal_data::ProSHADE_data *movingStructure, proshade_double *trsX, proshade_double *trsY, proshade_double *trsZ, proshade_double eulA, proshade_double eulB, proshade_double eulG)
This function finds the optimal translation between two structures as described by the settings objec...
proshade_double originalPdbTransZ
The optimal translation vector as it relates to the original PDB positions (and not the ProSHADE inte...
void writeOutOverlayFiles(ProSHADE_settings *settings, proshade_double eulA, proshade_double eulB, proshade_double eulG, std::vector< proshade_double > *rotCentre, std::vector< proshade_double > *ultimateTranslation)
This function writes out the rotated map, co-ordinates and transformation JSON file.
void processInternalMap(ProSHADE_settings *settings)
This function simply clusters several other functions which should be called together.
bool changeMapResolution
Should maps be re-sampled to obtain the required resolution?
void ReportDistancesResults(ProSHADE_settings *settings, std::string str1, std::string str2, proshade_double enLevDist, proshade_double trSigmDist, proshade_double rotFunDist)
Simple function for reporting the distances computation results.
proshade_double computeTraceSigmaDescriptor(ProSHADE_internal_data::ProSHADE_data *obj1, ProSHADE_internal_data::ProSHADE_data *obj2, ProSHADE_settings *settings)
This function computes the trace sigma descriptor value between two objects.
proshade_signed * getYToPtr(void)
This function allows access to the map last position along the Y axis.
void detectSymmetryInStructure(ProSHADE_settings *settings, std::vector< proshade_double * > *axes, std::vector< std::vector< proshade_double > > *allCs)
This function runs the symmetry detection algorithms on this structure and saves the results in the s...
proshade_signed * getXToPtr(void)
This function allows access to the map last position along the X axis.
proshade_signed * getYFromPtr(void)
This function allows access to the map start along the Y axis.
void reportSymmetryResults(ProSHADE_settings *settings)
This function takes prints the report for symmetry detection.
std::vector< std::string > inputFiles
This vector contains the filenames of all input structure files.
proshade_double computeEnergyLevelsDescriptor(ProSHADE_internal_data::ProSHADE_data *obj1, ProSHADE_internal_data::ProSHADE_data *obj2, ProSHADE_settings *settings)
This function computes the energy levels descriptor value between two objects.
void checkMapManipulationSettings(ProSHADE_settings *settings)
The re-boxing settings checks.
proshade_double originalPdbRotCenZ
The centre of rotation as it relates to the original PDB positions (and not the ProSHADE internal map...
proshade_double axisErrTolerance
Allowed error on vector axis in in dot product ( acos ( 1 - axErr ) is the allowed difference in radi...
void checkSymmetrySettings(ProSHADE_settings *settings)
The symmetry computation settings checks.
bool usePeakSearchInRotationFunctionSpace
This variable switch decides whether symmetry detection will be done using peak search in rotation fu...
void detectSymmetryFromAngleAxisSpace(ProSHADE_settings *settings, std::vector< proshade_double * > *axes, std::vector< std::vector< proshade_double > > *allCs)
This function runs the symmetry detection algorithms on this structure using the angle-axis space and...
proshade_double originalPdbRotCenX
The centre of rotation as it relates to the original PDB positions (and not the ProSHADE internal map...
void printProgressMessage(proshade_signed verbose, proshade_signed messageLevel, std::string message)
General stdout message printing.
void readInStructure(std::string fName, proshade_unsign inputO, ProSHADE_settings *settings)
This function initialises the basic ProSHADE_data variables and reads in a single structure.
void deepCopyBoundsSigPtrVector(std::vector< proshade_signed * > *sigPtrVec, proshade_signed *xFrom, proshade_signed *xTo, proshade_signed *yFrom, proshade_signed *yTo, proshade_signed *zFrom, proshade_signed *zTo)
Does a deep copy of a signed int array to a vector of signed int arrays.
proshade_signed * getZFromPtr(void)
This function allows access to the map start along the Z axis.
proshade_signed * getZToPtr(void)
This function allows access to the map last position along the Z axis.
bool computeEnergyLevelsDesc
If true, the energy levels descriptor will be computed, otherwise all its computations will be omitte...