![]() |
ProSHADE
0.7.5.4 (MAR 2021)
Protein Shape Detection
|
This class contains peak groups detected in the rotation function mapped spheres. More...
#include <ProSHADE_spheres.hpp>
Public Member Functions | |
ProSHADE_rotFun_spherePeakGroup (proshade_double lat, proshade_double lon, proshade_unsign sphPos, proshade_unsign angDim) | |
Constructor for getting empty ProSHADE_rotFun_spherePeakGroup class. More... | |
~ProSHADE_rotFun_spherePeakGroup (void) | |
Destructor for the ProSHADE_rotFun_spherePeakGroup class. More... | |
bool | checkIfPeakBelongs (proshade_double lat, proshade_double lon, proshade_unsign sphPos, proshade_double cosTol, proshade_signed verbose) |
This function takes a new prospective peak and tests if it belongs to this peak group or not. More... | |
void | findCyclicPointGroupsGivenFold (std::vector< ProSHADE_internal_spheres::ProSHADE_rotFun_sphere * > sphereVals, proshade_double axisTolerance, std::vector< proshade_double * > *detectedCs, bool bicubicInterp, proshade_unsign fold, proshade_unsign verbose) |
Function detecting cyclic point groups with a particular fold in a peak group. More... | |
proshade_double | getLatFromIndices (void) |
Accessor function for the private variable latFromInds. More... | |
proshade_double | getLatToIndices (void) |
Accessor function for the private variable latToInds. More... | |
proshade_double | getLonFromIndices (void) |
Accessor function for the private variable lonFromInds. More... | |
proshade_double | getLonToIndices (void) |
Accessor function for the private variable lonToInds. More... | |
std::vector< proshade_unsign > | getSpherePositions (void) |
Accessor function for the private variable spherePositions. More... | |
Protected Member Functions | |
void | computeCornerPositions (void) |
This function computes the group corner vectors, saving results into internal variables. | |
proshade_signed | angularDistanceWithBorders (proshade_signed origLat, proshade_signed testedLat) |
This function takes two lattitude or longitude positions and finds the smallest distance between them considering the border periodicity. More... | |
void | getAllAngleDifferences (std::vector< proshade_double > *angDiffs, std::vector< ProSHADE_internal_spheres::ProSHADE_rotFun_sphere * > sphereVals) |
This function takes all angles present in this peak group and finds the set of unique angle differeces. More... | |
void | getAllPossibleFolds (std::vector< proshade_double > *angDiffs, std::vector< proshade_unsign > *foldsToTry, std::vector< ProSHADE_internal_spheres::ProSHADE_rotFun_sphere * > sphereVals) |
This function angle differences and creates a list of folds that may be present in the group. More... | |
void | getSpheresFormingFold (proshade_unsign foldToTry, std::vector< proshade_unsign > *spheresFormingFold, std::vector< ProSHADE_internal_spheres::ProSHADE_rotFun_sphere * > sphereVals, proshade_double sphereAngleTolerance) |
This function simply finds the indices of the spheres which form the requested form. More... | |
void | getBestIndexForFold (proshade_double *bestPosVal, proshade_double *bestLatInd, proshade_double *bestLonInd, std::vector< proshade_unsign > *spheresFormingFold, std::vector< ProSHADE_internal_spheres::ProSHADE_rotFun_sphere * > sphereVals) |
Function which does simple search through all peak groups indices and saves the index with the highest peak height sum over all spheres. More... | |
This class contains peak groups detected in the rotation function mapped spheres.
This class codes the object that contains all the information about a single group of peaks found in the set of ProSHADE_rotFun_sphere objects with mapped rotation function values.
Definition at line 129 of file ProSHADE_spheres.hpp.
ProSHADE_internal_spheres::ProSHADE_rotFun_spherePeakGroup::ProSHADE_rotFun_spherePeakGroup | ( | proshade_double | lat, |
proshade_double | lon, | ||
proshade_unsign | sphPos, | ||
proshade_unsign | angDim | ||
) |
Constructor for getting empty ProSHADE_rotFun_spherePeakGroup class.
This function simply creates an object of the ProSHADE_rotFun_spherePeakGroup class and fills in the initial data.
[in] | lat | The lattitude value of the first peak of the group. |
[in] | lon | The longitude value of the first peak of the group. |
[in] | sphPos | The sphere number of the peak. |
[in] | angDim | The dimensionality of the sphere grid that we are processing. |
[out] | X | Data object with all values set and ready to add new data or search for point groups in the supplied peaks. |
Definition at line 1029 of file ProSHADE_spheres.cpp.
ProSHADE_internal_spheres::ProSHADE_rotFun_spherePeakGroup::~ProSHADE_rotFun_spherePeakGroup | ( | void | ) |
Destructor for the ProSHADE_rotFun_spherePeakGroup class.
This function releases all memory allocated by the ProSHADE_rotFun_spherePeakGroup object.
Definition at line 1068 of file ProSHADE_spheres.cpp.
|
protected |
This function takes two lattitude or longitude positions and finds the smallest distance between them considering the border periodicity.
[in] | newAngul | The first lattitude or longitude value. |
[in] | currentAngul | The second lattitude or longitude value. |
[out] | ret | The smallest distance between the first and the second lattitude or longitude values. |
Definition at line 1109 of file ProSHADE_spheres.cpp.
bool ProSHADE_internal_spheres::ProSHADE_rotFun_spherePeakGroup::checkIfPeakBelongs | ( | proshade_double | lat, |
proshade_double | lon, | ||
proshade_unsign | sphPos, | ||
proshade_double | cosTol, | ||
proshade_signed | verbose | ||
) |
This function takes a new prospective peak and tests if it belongs to this peak group or not.
This function takes a new peak position in terms of lattitude and longitude and proceeds to convert these to XYZ position. It then checks this XYZ position against this group's "corners" (i.e. the group's lattitude and longitude minimum and maximum borders). If the tested position belongs to the group (i.e. it has small cosine distance to one of the corners), then it is added and the group corners are updated. Otherwise, false is returned and nothing changes in the group.
[in] | lat | The lattitude value of the first peak of the group. |
[in] | lon | The longitude value of the first peak of the group. |
[in] | sphPos | The sphere number of the peak. |
[in] | cosTol | The tolerance for cosine distance similarity to consider the two vectors similar. |
[in] | verbose | How verbose should the run be? Use -1 if you do not want any standard output output. |
[out] | res | Boolean value signifying if the peak was added. |
Definition at line 1137 of file ProSHADE_spheres.cpp.
void ProSHADE_internal_spheres::ProSHADE_rotFun_spherePeakGroup::findCyclicPointGroupsGivenFold | ( | std::vector< ProSHADE_internal_spheres::ProSHADE_rotFun_sphere * > | sphereVals, |
proshade_double | axisTolerance, | ||
std::vector< proshade_double * > * | detectedCs, | ||
bool | bicubicInterp, | ||
proshade_unsign | fold, | ||
proshade_unsign | verbose | ||
) |
Function detecting cyclic point groups with a particular fold in a peak group.
This function is a simplification of the findCyclicPointGroups function for the cases where the required fold is known. It simply assumes that all the supplied mapped spheres are to be used to find the fold, i.e. that fold-1 is equal to the length of sphereVals. With this assumption, the function can go directly for finding the peak index with highest peak height sum.
At this point, this function can also optionally do bi-cubic interpolation around this index with highest peak sum to try to improve the symmetry axis by searching between the lattitude and longitude indices. Finally, this function will create the ProSHADE formatted array of symmetry group information and save it into the supplied vector, terminating thereafter.
[in] | sphereVals | A vector of spheres with mapped rotation function values. |
[in] | axisTolerance | The tolerance for cosine distance to consider two angles identical. |
[in] | detectedCs | A vector of double pointers pointer to which any detected axis will be added in the ProSHADE format - [0] = fold, [1] = x-axis, [2] = y-axis, [3] = z-axis, [4] = angle, [5] = average peak height. |
[in] | bicubicInterp | Should the bicubic interpolation between the peak indices be done? |
[in] | fold | The fold for which we are searching for cyclic point groups. |
[in] | verbose | The verbosity of the run. |
Definition at line 1366 of file ProSHADE_spheres.cpp.
|
protected |
This function takes all angles present in this peak group and finds the set of unique angle differeces.
[in] | angDiffs | A pointer to a vector to which all angle differences will be saved into. |
[in] | sphereVals | A vector of spheres with mapped rotation function values. |
Definition at line 1430 of file ProSHADE_spheres.cpp.
|
protected |
This function angle differences and creates a list of folds that may be present in the group.
The function starts by taking each detected angle difference and checking how well it divides a circle (2 Pi). The remainder of this division is then check against a tolerance threshold, which takes into account how many peaks in the rotation function space is the distance off from the theoretical exact value.
[in] | angDiffs | A pointer to a vector containing all the unique angle differences for this peak group. |
[in] | foldsToTry | A pointer to a vector to which the predicted fold to try to find are to be saved into. |
[in] | sphereVals | A vector of spheres with mapped rotation function values. |
Definition at line 1473 of file ProSHADE_spheres.cpp.
|
protected |
Function which does simple search through all peak groups indices and saves the index with the highest peak height sum over all spheres.
[in] | bestPosVal | Pointer to double where the highest sum of heights will be stored. |
[in] | bestLatInd | Pointer to double where the highest values lattitude index will be held. |
[in] | bestLonInd | Pointer to double where the highest values longitude index will be held. |
[in] | spheresFormingFold | A vector pointer to a vector containing the indices of the spheres forming this fold. |
[in] | sphereVals | A vector of spheres with mapped rotation function values. |
Definition at line 1582 of file ProSHADE_spheres.cpp.
proshade_double ProSHADE_internal_spheres::ProSHADE_rotFun_spherePeakGroup::getLatFromIndices | ( | void | ) |
Accessor function for the private variable latFromInds.
[out] | latFromInds | The lattitude index start for the group. |
Definition at line 1295 of file ProSHADE_spheres.cpp.
proshade_double ProSHADE_internal_spheres::ProSHADE_rotFun_spherePeakGroup::getLatToIndices | ( | void | ) |
Accessor function for the private variable latToInds.
[out] | latToInds | The lattitude index end for the group. |
Definition at line 1306 of file ProSHADE_spheres.cpp.
proshade_double ProSHADE_internal_spheres::ProSHADE_rotFun_spherePeakGroup::getLonFromIndices | ( | void | ) |
Accessor function for the private variable lonFromInds.
[out] | lonFromInds | The longitude index start for the group. |
Definition at line 1317 of file ProSHADE_spheres.cpp.
proshade_double ProSHADE_internal_spheres::ProSHADE_rotFun_spherePeakGroup::getLonToIndices | ( | void | ) |
Accessor function for the private variable lonToInds.
[out] | lonToInds | The longitude index end for the group. |
Definition at line 1328 of file ProSHADE_spheres.cpp.
std::vector< proshade_unsign > ProSHADE_internal_spheres::ProSHADE_rotFun_spherePeakGroup::getSpherePositions | ( | void | ) |
Accessor function for the private variable spherePositions.
[out] | spherePositions | A vector of all angles (spheres) indices present in this group. |
Definition at line 1339 of file ProSHADE_spheres.cpp.
|
protected |
This function simply finds the indices of the spheres which form the requested form.
[in] | foldToTry | The value of the fold for which all the required spheres are to be sought. |
[in] | spheresFormingFold | A pointer to vector to which the sphere indices of spheres forming this fold will be saved into. |
[in] | sphereVals | A vector of spheres with mapped rotation function values. |
[in] | sphereAngleTolerance | The tolerance for how different the sphere angle can be for the sphere to be still considered. |
Definition at line 1535 of file ProSHADE_spheres.cpp.