 |
ProSHADE
0.7.6.1 (AUG 2021)
Protein Shape Detection
|
This class provides the access point to the library.
More...
#include <ProSHADE.hpp>
|
| | ProSHADE_run (ProSHADE_settings *settings) |
| | Contructor for the ProSHADE_run class. More...
|
| |
| | ~ProSHADE_run (void) |
| | Destructor for the ProSHADE class. More...
|
| |
| proshade_unsign | getNoStructures (void) |
| | This function returns the number of structures used. More...
|
| |
| proshade_signed | getVerbose (void) |
| | This function returns the verbose value. More...
|
| |
| proshade_unsign | getNoRecommendedSymmetryAxes (void) |
| | This function returns the number of detected recommended symmetry axes. More...
|
| |
| proshade_unsign | getNoSymmetryAxes (void) |
| | This function returns the number of detected recommended symmetry axes. More...
|
| |
| std::vector< proshade_double > | getEnergyLevelsVector (void) |
| | This function returns the energy level distances vector from the first to all other structures. More...
|
| |
| std::vector< proshade_double > | getTraceSigmaVector (void) |
| | This function returns the trace sigma distances vector from the first to all other structures. More...
|
| |
| std::vector< proshade_double > | getRotationFunctionVector (void) |
| | This function returns the full rotation function distances vector from the first to all other structures. More...
|
| |
| std::string | getSymmetryType (void) |
| | This is the main accessor function for the user to get to know what symmetry type ProSHADE has detected and recommends. More...
|
| |
| proshade_unsign | getSymmetryFold (void) |
| | This is the main accessor function for the user to get to know what symmetry fold ProSHADE has detected and recommends. More...
|
| |
| std::vector< std::string > | getSymmetryAxis (proshade_unsign axisNo) |
| | This function returns a single symmetry axis as a vector of strings from the recommended symmetry axes list. More...
|
| |
| std::vector< std::vector< proshade_double > > | getAllCSyms (void) |
| | This function returns a all symmetry axes as a vector of vectors of doubles. More...
|
| |
| std::vector< proshade_double > | getMapCOMProcessChange (void) |
| | This function returns the internal map COM shift. More...
|
| |
| std::vector< proshade_signed > | getOriginalBounds (proshade_unsign strNo) |
| | This function returns a specific structure original bounds. More...
|
| |
| std::vector< proshade_signed > | getReBoxedBounds (proshade_unsign strNo) |
| | This function returns a specific structure re-boxed bounds. More...
|
| |
| proshade_double | getMapValue (proshade_unsign strNo, proshade_unsign mapIndex) |
| | This function returns a single, specific structure map value. More...
|
| |
| std::vector< proshade_double > | getEulerAngles (void) |
| | This function returns the vector of Euler angles with best overlay correlation. More...
|
| |
| std::vector< proshade_double > | getOptimalRotMat (void) |
| | This function returns the vector forming rotation matrix (rows first) with best overlay correlation. More...
|
| |
| std::vector< proshade_double > | getTranslationToOrigin (void) |
| | This function returns the negative values of the position of the rotation centre (the point about which the rotation should be done). More...
|
| |
| std::vector< proshade_double > | getOriginToOverlayTranslation (void) |
| | This function returns the translation required to move the structure from origin to optimal overlay. More...
|
| |
This class provides the access point to the library.
This class codes the object that the user of the library needs to create (and presumably delete) in order to get access to the ProSHADE library.
Definition at line 38 of file ProSHADE.hpp.
◆ ProSHADE_run()
Contructor for the ProSHADE_run class.
This is where all the decisions regarding what should be done are made. It takes the settings and based on them, it decides what to do and how to report the results.
- Parameters
-
Definition at line 1667 of file ProSHADE.cpp.
1674 this->noStructures =
static_cast<proshade_unsign
> ( settings->
inputFiles.size() );
1675 this->verbose =
static_cast<proshade_signed
> ( settings->
verbose );
1681 switch ( settings->
task )
1684 throw ProSHADE_exception (
"No task has been specified.",
"E000001", __FILE__, __LINE__, __func__,
"ProSHADE requires to be told which particular functiona-\n : lity (task) is requested from it. In order to do so, the\n : command line arguments specifying task need to be used\n : (if used from command line), or the ProSHADE_settings\n : object needs to have the member variable \'Task\' set to\n : one of the following values: Distances, Symmetry,\n : OverlayMap or MapManip." );
1688 this->setSymmetryResults ( settings );
1708 std::cerr << std::endl <<
"=====================" << std::endl <<
"!! ProSHADE ERROR !!" << std::endl <<
"=====================" << std::endl << std::flush;
1709 std::cerr <<
"Error Code : " << err.
get_errc() << std::endl << std::flush;
1710 std::cerr <<
"ProSHADE version : " << PROSHADE_VERSION << std::endl << std::flush;
1711 std::cerr <<
"File : " << err.
get_file() << std::endl << std::flush;
1712 std::cerr <<
"Line : " << err.
get_line() << std::endl << std::flush;
1713 std::cerr <<
"Function : " << err.
get_func() << std::endl << std::flush;
1714 std::cerr <<
"Message : " << err.what() << std::endl << std::flush;
1715 std::cerr <<
"Further information : " << err.
get_info() << std::endl << std::endl << std::flush;
1719 exit ( EXIT_FAILURE );
1725 std::cerr << std::endl <<
"=====================" << std::endl <<
"!! ProSHADE ERROR !!" << std::endl <<
"=====================" << std::endl << std::flush;
1728 #if __cplusplus >= 201103L
1729 std::exception_ptr exc = std::current_exception();
1734 std::rethrow_exception ( exc );
1737 catch (
const std::exception& e )
1739 std::cerr <<
"Caught unknown exception with following information: " << e.what() << std::endl << std::flush;
1742 std::cerr <<
"Unknown error with no further explanation available. Please contact the author for help." << std::endl << std::flush;
1744 std::cerr <<
"Terminating..." << std::endl << std::endl << std::flush;
1748 exit ( EXIT_FAILURE );
◆ ~ProSHADE_run()
| ProSHADE_run::~ProSHADE_run |
( |
void |
| ) |
|
Destructor for the ProSHADE class.
This destructor is responsible for releasing all memory used by the executing object
Definition at line 1765 of file ProSHADE.cpp.
1769 if ( this->originalBounds.size() > 0 ) {
for ( proshade_unsign iter = 0; iter < static_cast<proshade_unsign> ( this->originalBounds.size() ); iter++ ) {
delete[] this->originalBounds.at(iter); } }
1770 if ( this->reboxedBounds.size() > 0 ) {
for ( proshade_unsign iter = 0; iter < static_cast<proshade_unsign> ( this->reboxedBounds.size() ); iter++ ) {
delete[] this->reboxedBounds.at(iter); } }
1771 if ( this->manipulatedMaps.size() > 0 ) {
for ( proshade_unsign iter = 0; iter < static_cast<proshade_unsign> ( this->manipulatedMaps.size() ); iter++ ) {
delete[] this->manipulatedMaps.at(iter); } }
1774 this->enLevs.clear ( );
1775 this->trSigm.clear ( );
1776 this->rotFun.clear ( );
1779 if ( this->RecomSymAxes.size() > 0 )
1781 for ( proshade_unsign iter = 0; iter < static_cast<proshade_unsign> ( this->RecomSymAxes.size() ); iter++ )
1783 delete[] this->RecomSymAxes.at(iter);
1785 this->RecomSymAxes.clear ( );
◆ getAllCSyms()
| std::vector< std::vector< proshade_double > > ProSHADE_run::getAllCSyms |
( |
void |
| ) |
|
This function returns a all symmetry axes as a vector of vectors of doubles.
- Parameters
-
| [out] | val | A vector of vectors of doubles containing all the symmetries axis fold, x, y, z axis element, angle and peak height in this order. |
Definition at line 2881 of file ProSHADE.cpp.
2885 return ( this->allCSymAxes );
◆ getEnergyLevelsVector()
| std::vector< proshade_double > ProSHADE_run::getEnergyLevelsVector |
( |
void |
| ) |
|
This function returns the energy level distances vector from the first to all other structures.
- Parameters
-
| [out] | enLevs | Vector of doubles of the distances. |
Definition at line 2743 of file ProSHADE.cpp.
2747 return ( this->enLevs );
◆ getEulerAngles()
| std::vector< proshade_double > ProSHADE_run::getEulerAngles |
( |
void |
| ) |
|
This function returns the vector of Euler angles with best overlay correlation.
- Parameters
-
| [out] | ret | Vector of Euler angles (ZXZ convention) which lead to the globally best overlay correlation. |
Definition at line 3022 of file ProSHADE.cpp.
3026 if ( this->eulerAngles.size() != 3 )
3028 ProSHADE_internal_messages::printWarningMessage ( this->verbose,
"!!! ProSHADE WARNING !!! Requested rotation/translation values for Overlay functionality without having successfully computed it. Please check the correct task was used and no other warnings/errors were obtained.",
"WO00042" );
3029 return ( std::vector< proshade_double > ( ) );
3033 return ( this->eulerAngles );
◆ getMapCOMProcessChange()
| std::vector< proshade_double > ProSHADE_run::getMapCOMProcessChange |
( |
void |
| ) |
|
This function returns the internal map COM shift.
- Parameters
-
| [out] | val | The shift used to centre the internal map COM to the centre of the box. |
Definition at line 2896 of file ProSHADE.cpp.
2900 return ( this->mapCOMShift );
◆ getMapValue()
| proshade_double ProSHADE_run::getMapValue |
( |
proshade_unsign |
strNo, |
|
|
proshade_unsign |
mapIndex |
|
) |
| |
This function returns a single, specific structure map value.
- Parameters
-
| [in] | strNo | The index of the structure for which the map value is to be returned. |
| [in] | mapIndex | The map array index of which the value is returned. |
| [out] | val | The map density value for the particular mapIndex position. |
Definition at line 2977 of file ProSHADE.cpp.
2981 return ( this->manipulatedMaps.at(strNo)[mapIndex] );
◆ getNoRecommendedSymmetryAxes()
| proshade_unsign ProSHADE_run::getNoRecommendedSymmetryAxes |
( |
void |
| ) |
|
This function returns the number of detected recommended symmetry axes.
- Parameters
-
| [out] | val | The length of the recommended symmetry axes vector. |
Definition at line 2812 of file ProSHADE.cpp.
2815 return (
static_cast<proshade_unsign
> ( this->RecomSymAxes.size() ) );
◆ getNoStructures()
| proshade_unsign ProSHADE_run::getNoStructures |
( |
void |
| ) |
|
This function returns the number of structures used.
- Parameters
-
| [in] | noStructures | Number of structures supplied to the settings object. |
Definition at line 2782 of file ProSHADE.cpp.
2785 return ( this->noStructures );
◆ getNoSymmetryAxes()
| proshade_unsign ProSHADE_run::getNoSymmetryAxes |
( |
void |
| ) |
|
This function returns the number of detected recommended symmetry axes.
- Parameters
-
| [out] | val | The length of the recommended symmetry axes vector. |
Definition at line 2802 of file ProSHADE.cpp.
2805 return (
static_cast<proshade_unsign
> ( this->RecomSymAxes.size() ) );
◆ getOptimalRotMat()
| std::vector< proshade_double > ProSHADE_run::getOptimalRotMat |
( |
void |
| ) |
|
This function returns the vector forming rotation matrix (rows first) with best overlay correlation.
- Parameters
-
| [out] | ret | Vector forming rotation matrix (rows first) which lead to the globally best overlay correlation. |
Definition at line 3044 of file ProSHADE.cpp.
3048 if ( this->eulerAngles.size() != 3 )
3050 ProSHADE_internal_messages::printWarningMessage ( this->verbose,
"!!! ProSHADE WARNING !!! Requested rotation/translation values for Overlay functionality without having successfully computed it. Please check the correct task was used and no other warnings/errors were obtained.",
"WO00042" );
3051 return ( std::vector< proshade_double > ( ) );
3055 proshade_double* rotMat =
new proshade_double[9];
3060 std::vector< proshade_double > ret;
◆ getOriginalBounds()
| std::vector< proshade_signed > ProSHADE_run::getOriginalBounds |
( |
proshade_unsign |
strNo | ) |
|
This function returns a specific structure original bounds.
- Parameters
-
| [in] | strNo | The index of the structure for which the bounds are to be returned. |
Definition at line 2911 of file ProSHADE.cpp.
2915 if ( noStructures <= strNo )
2918 return ( std::vector< proshade_signed > ( ) );
2922 std::vector< proshade_signed > ret;
◆ getOriginToOverlayTranslation()
| std::vector< proshade_double > ProSHADE_run::getOriginToOverlayTranslation |
( |
void |
| ) |
|
This function returns the translation required to move the structure from origin to optimal overlay.
- Parameters
-
| [out] | ret | Translation required to move structure from origin to optimal overlay. |
Definition at line 3106 of file ProSHADE.cpp.
3110 if ( this->overlayTranslation.size() != 3 )
3112 ProSHADE_internal_messages::printWarningMessage ( this->verbose,
"!!! ProSHADE WARNING !!! Requested rotation/translation values for Overlay functionality without having successfully computed it. Please check the correct task was used and no other warnings/errors were obtained.",
"WO00042" );
3113 return ( std::vector< proshade_double > ( ) );
3117 return ( this->overlayTranslation );
◆ getReBoxedBounds()
| std::vector< proshade_signed > ProSHADE_run::getReBoxedBounds |
( |
proshade_unsign |
strNo | ) |
|
This function returns a specific structure re-boxed bounds.
- Parameters
-
| [in] | strNo | The index of the structure for which the bounds are to be returned. |
Definition at line 2943 of file ProSHADE.cpp.
2947 if ( noStructures <= strNo )
2950 return ( std::vector< proshade_signed > ( ) );
2954 std::vector< proshade_signed > ret;
◆ getRotationFunctionVector()
| std::vector< proshade_double > ProSHADE_run::getRotationFunctionVector |
( |
void |
| ) |
|
This function returns the full rotation function distances vector from the first to all other structures.
- Parameters
-
| [out] | rotFun | Vector of doubles of the distances. |
Definition at line 2771 of file ProSHADE.cpp.
2775 return ( this->rotFun );
◆ getSymmetryAxis()
| std::vector< std::string > ProSHADE_run::getSymmetryAxis |
( |
proshade_unsign |
axisNo | ) |
|
This function returns a single symmetry axis as a vector of strings from the recommended symmetry axes list.
- Parameters
-
| [in] | axisNo | The index of the axis to be returned. |
| [out] | val | A vector of strings containing the symmetry axis fold, x, y, z axis element, angle and peak height in this order. |
Definition at line 2826 of file ProSHADE.cpp.
2830 if (
static_cast<proshade_unsign
> ( this->RecomSymAxes.size() ) <= axisNo )
2833 return ( std::vector< std::string > ( ) );
2837 std::vector< std::string > ret;
2840 std::stringstream ssHlp;
2841 ssHlp << this->RecomSymAxes.at(axisNo)[0];
2845 ssHlp << this->RecomSymAxes.at(axisNo)[1];
2849 ssHlp << this->RecomSymAxes.at(axisNo)[2];
2853 ssHlp << this->RecomSymAxes.at(axisNo)[3];
2857 ssHlp << this->RecomSymAxes.at(axisNo)[4];
2861 ssHlp << this->RecomSymAxes.at(axisNo)[5];
2865 ssHlp << this->RecomSymAxes.at(axisNo)[6];
◆ getSymmetryFold()
| proshade_unsign ProSHADE_run::getSymmetryFold |
( |
void |
| ) |
|
This is the main accessor function for the user to get to know what symmetry fold ProSHADE has detected and recommends.
- Parameters
-
| [out] | symRecommFold | This is the fold of ProSHADE detected and recommended symmetry (C and D symmetry types only). |
Definition at line 1814 of file ProSHADE.cpp.
1818 return ( this->symRecommFold );
◆ getSymmetryType()
| std::string ProSHADE_run::getSymmetryType |
( |
void |
| ) |
|
This is the main accessor function for the user to get to know what symmetry type ProSHADE has detected and recommends.
- Parameters
-
| [out] | symRecommType | This is the value ( ""=None, C=cyclic, D=Dihedral, T=Tetrahedral, O=Octahedral or I=Icosahedral) of ProSHADE detected and recommended symmetry. |
Definition at line 1799 of file ProSHADE.cpp.
1804 return ( this->symRecommType );
◆ getTraceSigmaVector()
| std::vector< proshade_double > ProSHADE_run::getTraceSigmaVector |
( |
void |
| ) |
|
This function returns the trace sigma distances vector from the first to all other structures.
- Parameters
-
| [out] | trSigm | Vector of doubles of the distances. |
Definition at line 2757 of file ProSHADE.cpp.
2761 return ( this->trSigm );
◆ getTranslationToOrigin()
| std::vector< proshade_double > ProSHADE_run::getTranslationToOrigin |
( |
void |
| ) |
|
This function returns the negative values of the position of the rotation centre (the point about which the rotation should be done).
- Parameters
-
| [out] | ret | Vector specifying the negative values of the rotation centre - i.e. the translation of the rotation centre to the origin. |
Definition at line 3078 of file ProSHADE.cpp.
3082 if ( this->coordRotationCentre.size() != 3 )
3084 ProSHADE_internal_messages::printWarningMessage ( this->verbose,
"!!! ProSHADE WARNING !!! Requested rotation/translation values for Overlay functionality without having successfully computed it. Please check the correct task was used and no other warnings/errors were obtained.",
"WO00042" );
3085 return ( std::vector< proshade_double > ( ) );
3089 std::vector < proshade_double > ret;
◆ getVerbose()
| proshade_signed ProSHADE_run::getVerbose |
( |
void |
| ) |
|
This function returns the verbose value.
- Parameters
-
| [in] | verbose | How loud the run should be? |
Definition at line 2792 of file ProSHADE.cpp.
2795 return ( this->verbose );
The documentation for this class was generated from the following files:
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.
This class is the representation of ProSHADE exception.
virtual std::string get_errc(void)
This function returns the exception error code.
virtual std::string get_info(void)
This function returns the exception description.
void getRotationMatrixFromEulerZXZAngles(proshade_double eulerAlpha, proshade_double eulerBeta, proshade_double eulerGamma, proshade_double *matrix)
Function to find the rotation matrix from Euler angles (ZXZ convention).
void printWarningMessage(proshade_signed verbose, std::string message, std::string warnCode)
General stderr message printing (used for warnings).
proshade_signed verbose
Should the software report on the progress, or just be quiet? Value between -1 (nothing) and 4 (loud)
virtual std::string get_func(void)
This function returns the exception causing function name.
void addToDoubleVector(std::vector< proshade_double > *vecToAddTo, proshade_double elementToAdd)
Adds the element to the vector.
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.
void addToSignedVector(std::vector< proshade_signed > *vecToAddTo, proshade_signed elementToAdd)
Adds the element to the vector.
ProSHADE_Task task
This custom type variable determines which task to perfom (i.e. symmetry detection,...
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.
void printWellcomeMessage(proshade_signed verbose)
Wellcome message printing.
void printTerminateMessage(proshade_signed verbose)
Final message printing.
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.
virtual int long get_line(void)
This function returns the exception location line.
std::vector< std::string > inputFiles
This vector contains the filenames of all input structure files.
virtual std::string get_file(void)
This function returns the exception location file name.
void addToStringVector(std::vector< std::string > *vecToAddTo, std::string elementToAdd)
Adds the element to the vector.
void SymmetryDetectionTask(ProSHADE_settings *settings, std::vector< proshade_double * > *axes, std::vector< std::vector< proshade_double > > *allCs, std::vector< proshade_double > *mapCOMShift)
The symmetry detection task driver function.