![]() |
ProSHADE
0.7.5.1 (JAN 2021)
Protein Shape Detection
|
This namespace contains the symmetry detection related code. More...
Functions | |
std::vector< proshade_double * > | getPeaksAngleAxisPositions (std::vector< proshade_double * > allPeaks, proshade_unsign verbose) |
This function converts peaks ZXZ Euler anles to angle-axis representation for further processing. More... | |
std::vector< proshade_double > | findPeaksByHeightBoundaries (std::vector< proshade_double * > allPeaks, proshade_double smoothing) |
This function groups the peaks by height and returns the boundaries between such groups. More... | |
std::vector< std::vector< proshade_unsign > > | findPeaksCSymmetry (std::vector< proshade_double * > *peaks, proshade_signed verbose, proshade_unsign band, proshade_double missPeakThres, proshade_double axisErrTolerance, bool axisErrToleranceDef, ProSHADE_internal_data::ProSHADE_data *dataObj) |
This function searches the list of peaks for presence of cyclic symmetry. More... | |
std::vector< std::vector< proshade_unsign > > | groupSameAxes (std::vector< proshade_double * > &peaks, proshade_double errTolerance) |
This function groups the peaks by their axes of rotation. More... | |
void | giveOppositeAxesSameDirection (std::vector< proshade_double * > peaks) |
This function modifiest the axes so that the highest vector element is always positive. More... | |
void | printSymmetryPeaks (std::vector< proshade_unsign > grp, std::vector< proshade_double * > peaks, proshade_signed verbose, proshade_unsign groupNo) |
This function simply prints the symmetry axis group supplied in the first parameter from the second parameter values. More... | |
bool | smallestDistanceBetweenAngles (std::vector< proshade_unsign > grp, std::vector< proshade_double * > peaks, std::vector< proshade_double > *tried, proshade_double *dist) |
This function finds the smallest distance between the rotation angles within a group. More... | |
void | addZeroPeakToGroups (std::vector< std::vector< proshade_unsign > > &grpsVec, std::vector< proshade_double * > &peaks) |
This function takes the peak groups and adds zero peak to each of them. More... | |
bool | determineFoldToTry (proshade_double dist, proshade_double *divBasis, proshade_double *divRem, proshade_double peakErr, proshade_double *symmErr, std::vector< proshade_unsign > *angsToTry) |
This function determines the symmetry fold to be searched for. More... | |
void | findExpectedPeakRotations (proshade_unsign fold, std::vector< proshade_double > *expAngs) |
This function computes the expected peak rotations for given fold. More... | |
proshade_unsign | checkExpectedAgainstFound (std::vector< proshade_unsign > grp, std::vector< proshade_double * > peaks, std::vector< proshade_double > *expAngs, std::vector< proshade_unsign > *matchedAngs, std::vector< proshade_unsign > *missingAngs, proshade_double axisTol) |
This function computes the expected peak rotations for given fold. More... | |
proshade_double | checkForMissingPeak (ProSHADE_internal_data::ProSHADE_data *dataObj, proshade_double x, proshade_double y, proshade_double z, proshade_double angle, proshade_double heightThres, proshade_double axTol) |
This function checks for the high of the correlation for particular rotation angle and axis. More... | |
void | saveDetectedCSymmetry (proshade_unsign fold, std::vector< proshade_unsign > *matchedPeaks, std::vector< std::vector< proshade_unsign > > *ret, proshade_signed verbose) |
This function saves a detected symmetry for reporting to the user. More... | |
bool | completeMissingCSymmetry (ProSHADE_internal_data::ProSHADE_data *dataObj, proshade_unsign fold, std::vector< proshade_unsign > *grp, std::vector< proshade_double * > *peaks, std::vector< proshade_unsign > *missingPeaks, std::vector< proshade_double > *expectedAngles, std::vector< proshade_unsign > *matchedPeaks, proshade_double axErrTolerance, proshade_unsign verbose) |
This function does the complete missing peak searching and filling in the missing peaks. More... | |
void | findSymmetryUsingFold (ProSHADE_internal_data::ProSHADE_data *dataObj, std::vector< proshade_unsign > *angsToTry, std::vector< proshade_unsign > *grp, std::vector< proshade_double * > *peaks, std::vector< std::vector< proshade_unsign > > *ret, std::vector< proshade_unsign > *testedAlready, proshade_double axErrTolerance, bool axErrToleranceDefault, proshade_double missPeakThres, proshade_unsign verbose) |
This function tests all supplied folds for being supported by the peaks (i.e. and being complete present symmetry). More... | |
void | printSymmetryGroup (std::vector< proshade_unsign > grp, std::vector< proshade_double * > peaks, proshade_signed verbose) |
This function simply prints the detected symmetry and all its supporting peaks. More... | |
void | printSymmetryCompletion (proshade_unsign noSyms, proshade_unsign verbose) |
This function simply prints the summary and warnings for cyclic symmetries detection completion. More... | |
void | saveAllCSymmetries (std::vector< std::vector< proshade_unsign > > detected, std::vector< proshade_double * > peaks, std::vector< proshade_double * > *ret, proshade_double axErr) |
This function takes the detected symmetries indices and peaks and saves these in the main cyclic symmetries detection output format. More... | |
bool | isSymmetrySame (std::vector< proshade_double * > *ret, proshade_double *sym, proshade_double simThres) |
This function checks if a very similar symmetry is not already saved. More... | |
void | saveDSymmetry (std::vector< proshade_double * > *ret, std::vector< proshade_double * > *CSymList, proshade_unsign axisOne, proshade_unsign axisTwo) |
This function saves a detected dihedral symmetry to the dihedral symmetries list. More... | |
bool | detectTetrahedralSymmetry (std::vector< proshade_double * > *CSymList, proshade_double axErr, proshade_double minPeakHeight) |
This function takes the list of C symmetries and decides whether basic requirements for tetrahedral symmetry are there. More... | |
void | findTetra4C3s (std::vector< proshade_double * > *CSymList, std::vector< proshade_double * > *ret, proshade_double axErr, ProSHADE_internal_data::ProSHADE_data *dataObj, proshade_unsign verbose, proshade_double minPeakHeight) |
This function takes the list of C symmetries and finds the 4 C3 symmetries with correct angles required for full tetrahedral symmetry. More... | |
bool | testGroupAgainstSymmetry (std::vector< proshade_double * > *CSymList, std::vector< proshade_unsign > *grp, proshade_double *sym, proshade_double axErr, proshade_double angle, bool improve, proshade_unsign pos=0) |
This function tests whether a symmetry has particular angle to all members of a group. More... | |
bool | findMissingAxes (std::vector< std::vector< proshade_unsign > > *possibilities, std::vector< proshade_double * > *CSymList, proshade_unsign requiredNoAxes, proshade_double axErr, proshade_double angle, proshade_unsign fold, ProSHADE_internal_data::ProSHADE_data *dataObj, proshade_double minPeakHeight) |
This function tries to find an axis which would complete a particular group of axes for polyhedral symmetry detection. More... | |
proshade_double | missingAxisHeight (proshade_double xVal, proshade_double yVal, proshade_double zVal, ProSHADE_internal_data::ProSHADE_data *dataObj, proshade_unsign fold, proshade_double axErr) |
This function searches for the highest peaks average that would produce the required axis and fold. More... | |
std::vector< proshade_double * > | findMissingAxisPoints (proshade_double xVal, proshade_double yVal, proshade_double zVal, ProSHADE_internal_data::ProSHADE_data *dataObj, proshade_double axErr) |
This function searches for all the self-rotation map points conforming to the axis, returning their angles and heights. More... | |
bool | sortArrVecHlp (const proshade_double *a, const proshade_double *b) |
This function compares two arrays of two based on the first number. More... | |
void | saveMissingAxisNewOnly (std::vector< proshade_double * > *axVec, proshade_double axX, proshade_double axY, proshade_double axZ, proshade_double height, proshade_unsign fold, proshade_double axErr) |
This function saves the recovered information about missing axis into a full symmetry, making sure no duplicates are created. More... | |
void | searchMissingSymmetrySpace (ProSHADE_internal_data::ProSHADE_data *dataObj, std::vector< proshade_double * > *CSymList, std::vector< proshade_unsign > *grp, std::vector< proshade_double * > *hlpVec, proshade_double axErr, proshade_double angle, proshade_unsign fold, proshade_double minPeakHeight) |
This function tests feasible axes against the missing axis criteria, returning a set of matching axes. More... | |
void | findTetra3C2s (std::vector< proshade_double * > *CSymList, std::vector< proshade_double * > *ret, proshade_double axErr, ProSHADE_internal_data::ProSHADE_data *dataObj, proshade_unsign verbose, proshade_double minPeakHeight) |
This function takes the list of C symmetries and finds the 3 C2 symmetries with correct angles required for full tetrahedral symmetry. More... | |
bool | testGroupAgainstGroup (std::vector< proshade_double * > *CSymList, std::vector< proshade_unsign > *grp1, std::vector< proshade_double * > *RetList, std::vector< proshade_unsign > *grp2, proshade_double angle, proshade_double axErr) |
This function compares two groups of axes for a single pair having the required angle. More... | |
bool | detectOctahedralSymmetry (std::vector< proshade_double * > *CSymList, proshade_double axErr, proshade_double minPeakHeight) |
This function takes the list of C symmetries and decides whether basic requirements for octahhedral symmetry are there. More... | |
void | findOcta3C4s (std::vector< proshade_double * > *CSymList, std::vector< proshade_double * > *ret, proshade_double axErr, ProSHADE_internal_data::ProSHADE_data *dataObj, proshade_unsign verbose, proshade_double minPeakHeight) |
This function takes the list of C symmetries and finds the 3 C4 symmetries with perpendicular angles required for full octahedral symmetry. More... | |
void | findOcta4C3s (std::vector< proshade_double * > *CSymList, std::vector< proshade_double * > *ret, proshade_double axErr, ProSHADE_internal_data::ProSHADE_data *dataObj, proshade_unsign verbose, proshade_double minPeakHeight) |
This function takes the list of C symmetries and finds the four C3 symmetries with correct angles required for full octahedral symmetry. More... | |
void | findOcta6C2s (std::vector< proshade_double * > *CSymList, std::vector< proshade_double * > *ret, proshade_double axErr, ProSHADE_internal_data::ProSHADE_data *dataObj, proshade_unsign verbose, proshade_double minPeakHeight) |
This function takes the list of C symmetries and finds the six C2 symmetries with correct angles required for full octahedral symmetry. More... | |
bool | findMissingAxesDual (std::vector< proshade_unsign > *possibilities, std::vector< proshade_double * > *CSymList, std::vector< proshade_double * > *ret, std::vector< proshade_unsign > *retGroup, proshade_unsign requiredNoAxes, proshade_double axErr, proshade_unsign noMatchesG1, proshade_double angle1, proshade_unsign noMatchesG2, proshade_double angle2, proshade_unsign fold, ProSHADE_internal_data::ProSHADE_data *dataObj) |
This function tries to find a particular symmetry axes which would complete a group of symmetries with two different angle requirement to another group. More... | |
void | addAxisUnlessSame (proshade_unsign fold, proshade_double axX, proshade_double axY, proshade_double axZ, proshade_double axHeight, std::vector< proshade_double * > *prosp, proshade_double axErr) |
This function simply creates a new axis from information in aruments and tests if no such axis already exists, saving it if need be. More... | |
bool | checkFittingAxisDualAndSave (std::vector< proshade_unsign > *retGroup, std::vector< proshade_double * > *ret, proshade_unsign fold, proshade_double axX, proshade_double axY, proshade_double axZ, std::vector< proshade_double * > *prosp, proshade_double axErr, proshade_unsign noMatchesG1, proshade_double angle1, proshade_unsign noMatchesG2, proshade_double angle2, ProSHADE_internal_data::ProSHADE_data *dataObj) |
This function takes a newly detected "missing" axis and tests it for belonging to the group, checking the height and replacing lower height members with better members. More... | |
bool | detectIcosahedralSymmetry (std::vector< proshade_double * > *CSymList, proshade_double axErr, proshade_double minPeakHeight) |
This function takes the list of C symmetries and decides whether basic requirements for isosahedral symmetry are there. More... | |
void | findIcos6C5s (std::vector< proshade_double * > *CSymList, std::vector< proshade_double * > *ret, proshade_double axErr, ProSHADE_internal_data::ProSHADE_data *dataObj, proshade_unsign verbose, proshade_double minPeakHeight) |
This function takes the list of C symmetries and finds the six C5 symmetries with given angles required for full icosahedral symmetry. More... | |
void | predictIcosAxes (ProSHADE_settings *settings, std::vector< proshade_double * > *CSymList, std::vector< proshade_double * > *ret, proshade_double axErr, ProSHADE_internal_data::ProSHADE_data *dataObj, proshade_unsign verbose, proshade_double minPeakHeight, proshade_double matrixTolerance) |
This function predicts all icosahedral point group symmetry axes from the cyclic point groups list. More... | |
void | predictOctaAxes (std::vector< proshade_double * > *CSymList, std::vector< proshade_double * > *ret, proshade_double axErr, ProSHADE_internal_data::ProSHADE_data *dataObj, proshade_unsign verbose, proshade_double minPeakHeight, proshade_double matrixTolerance) |
This function predicts all octahedral point group symmetry axes from the cyclic point groups list. More... | |
void | findIcos10C3s (std::vector< proshade_double * > *CSymList, std::vector< proshade_double * > *ret, proshade_double axErr, ProSHADE_internal_data::ProSHADE_data *dataObj, proshade_unsign verbose, proshade_double minPeakHeight) |
This function takes the list of C symmetries and finds the ten C3 symmetries with correct angles required for full icosahedral symmetry. More... | |
void | findIcos15C2s (std::vector< proshade_double * > *CSymList, std::vector< proshade_double * > *ret, proshade_double axErr, ProSHADE_internal_data::ProSHADE_data *dataObj, proshade_unsign verbose, proshade_double minPeakHeight) |
This function takes the list of C symmetries and finds the fifteen C3 symmetries with correct angles required for full icosahedral symmetry. More... | |
bool | findMissingAxesTriple (std::vector< proshade_unsign > *possibilities, std::vector< proshade_double * > *CSymList, std::vector< proshade_double * > *ret, std::vector< proshade_unsign > *retGroup, proshade_unsign requiredNoAxes, proshade_double axErr, proshade_unsign noMatchesG1, proshade_double angle1, proshade_unsign noMatchesG2, proshade_double angle2, proshade_unsign noMatchesG3, proshade_double angle3, proshade_unsign fold, ProSHADE_internal_data::ProSHADE_data *dataObj) |
This function tries to find a particular symmetry axis which would complete a group of symmetries with three different angle requirement to another group. More... | |
void | checkFittingAxisTripleAndSave (std::vector< proshade_unsign > *retGroup, std::vector< proshade_double * > *ret, proshade_unsign fold, proshade_double axX, proshade_double axY, proshade_double axZ, std::vector< proshade_double * > *prosp, proshade_double axErr, proshade_unsign noMatchesG1, proshade_double angle1, proshade_unsign noMatchesG2, proshade_double angle2, proshade_unsign noMatchesG3, proshade_double angle3, ProSHADE_internal_data::ProSHADE_data *dataObj) |
This function takes a newly detected "missing" axis and tests it for belonging to the group, checking the height and replacing lower height members with better members. More... | |
This namespace contains the symmetry detection related code.
The ProSHADE_internal_symmetry namespace contains the functions related to the symmetry detection task.
void ProSHADE_internal_symmetry::addAxisUnlessSame | ( | proshade_unsign | fold, |
proshade_double | axX, | ||
proshade_double | axY, | ||
proshade_double | axZ, | ||
proshade_double | axHeight, | ||
std::vector< proshade_double * > * | prosp, | ||
proshade_double | axErr | ||
) |
This function simply creates a new axis from information in aruments and tests if no such axis already exists, saving it if need be.
This is a simple helper function, which takes all the new axis information and creates the ProSHADE axis representation from these. It then proceeds to check if such axis does not already exist in the supplied vector, if not, it saves the new axis; alternatively, it just discards the created axis and terminates.
[in] | fold | The fold of the searched for axis. |
[in] | axX | The x-axis element of the new axis. |
[in] | axY | The y-axis element of the new axis. |
[in] | axZ | The z-axis element of the new axis. |
[in] | axHeight | The average peak height of the new axis. |
[in] | prosp | The vector to which the axis is to be saved. |
[in] | axErr | The error tolerance on angle matching. |
Definition at line 2527 of file ProSHADE_symmetry.cpp.
void ProSHADE_internal_symmetry::addZeroPeakToGroups | ( | std::vector< std::vector< proshade_unsign > > & | grpsVec, |
std::vector< proshade_double * > & | peaks | ||
) |
This function takes the peak groups and adds zero peak to each of them.
This function takes all of the detected peak axis groups and the list of peaks. It then proceeds to add a single peak per a group to the peaks list; this newly added peak has the same axis as the group, but zero angle. The function also adds the index of this new peak to the peak group, so that the group now has a new member, a peak with zero angle and the same axis.
[in] | grpsVec | A list of all symmetry axis groups. |
[in] | peaks | The vector of all peaks from which the group indices are to be drawn. |
Definition at line 621 of file ProSHADE_symmetry.cpp.
proshade_unsign ProSHADE_internal_symmetry::checkExpectedAgainstFound | ( | std::vector< proshade_unsign > | grp, |
std::vector< proshade_double * > | peaks, | ||
std::vector< proshade_double > * | expAngs, | ||
std::vector< proshade_unsign > * | matchedAngs, | ||
std::vector< proshade_unsign > * | missingAngs, | ||
proshade_double | angTol | ||
) |
This function computes the expected peak rotations for given fold.
This function compares the expected and the detected peak rotation angle values to check if the complete C symmetry is found within this peak axis group. It also saves the indices of the matched and missing peaks and returns the number of consecutive mathes.
[in] | grp | A single symmetry axis group indices to be processed. |
[in] | peaks | The vector of all peaks from which the indices are drawn. |
[in] | expAngs | A vector where the expected peak rotation values are saved. |
[in] | matchedAngs | A vector where the indices of matched peaks will be saved. |
[in] | missingAngs | A vector where the indices of missing peaks will be saved. |
[in] | angTol | The tolerance for matching the expected and found peak rotation angles. |
[out] | X | An integer with the longest consecutive streak of matched values. |
Definition at line 734 of file ProSHADE_symmetry.cpp.
bool ProSHADE_internal_symmetry::checkFittingAxisDualAndSave | ( | std::vector< proshade_unsign > * | retGroup, |
std::vector< proshade_double * > * | ret, | ||
proshade_unsign | fold, | ||
proshade_double | axX, | ||
proshade_double | axY, | ||
proshade_double | axZ, | ||
std::vector< proshade_double * > * | prosp, | ||
proshade_double | axErr, | ||
proshade_unsign | noMatchesG1, | ||
proshade_double | angle1, | ||
proshade_unsign | noMatchesG2, | ||
proshade_double | angle2, | ||
ProSHADE_internal_data::ProSHADE_data * | dataObj | ||
) |
This function takes a newly detected "missing" axis and tests it for belonging to the group, checking the height and replacing lower height members with better members.
This function takes the list of already detected axes, information about the tested new axis and the conditions for belonging. It then proceeds to check if the new axis conforms to the conditions of belonging. If so, it then checks if the axis height is high enough to be considered as part of the group. Again, if so, it will save this new axis to the old set, replacing any old axis with this new one, if it is the same and has better height.
[in] | retGroup | A vector of indices in the ret list which form the group to which new axes are compared to. |
[in] | ret | A list of already detected axes. |
[in] | fold | The fold of the searched for axis. |
[in] | axX | The x-axis element of the new axis. |
[in] | axY | The y-axis element of the new axis. |
[in] | axZ | The z-axis element of the new axis. |
[in] | prosp | The vector to which the axis is to be saved. |
[in] | axErr | The error tolerance on angle matching. |
[in] | noMatchesG1 | The number of axes from ret that need to be matched with angle1. |
[in] | angle1 | The angle with which noMatchesG1 axes need to be matched with the retGroup axes. |
[in] | noMatchesG2 | The number of axes from ret that need to be matched with angle2. |
[in] | angle2 | The angle with which noMatchesG2 axes need to be matched with the retGroup axes. |
[in] | dataObj | The full data holding object pointer - this is to get access to self-rotation function values. |
[out] | Bool | True if the axis was added to the group, false otherwise. |
Definition at line 2577 of file ProSHADE_symmetry.cpp.
void ProSHADE_internal_symmetry::checkFittingAxisTripleAndSave | ( | std::vector< proshade_unsign > * | retGroup, |
std::vector< proshade_double * > * | ret, | ||
proshade_unsign | fold, | ||
proshade_double | axX, | ||
proshade_double | axY, | ||
proshade_double | axZ, | ||
std::vector< proshade_double * > * | prosp, | ||
proshade_double | axErr, | ||
proshade_unsign | noMatchesG1, | ||
proshade_double | angle1, | ||
proshade_unsign | noMatchesG2, | ||
proshade_double | angle2, | ||
proshade_unsign | noMatchesG3, | ||
proshade_double | angle3, | ||
ProSHADE_internal_data::ProSHADE_data * | dataObj | ||
) |
This function takes a newly detected "missing" axis and tests it for belonging to the group, checking the height and replacing lower height members with better members.
This function takes the list of already detected axes, information about the tested new axis and the conditions for belonging. It then proceeds to check if the new axis conforms to the conditions of belonging. If so, it then checks if the axis height is high enough to be considered as part of the group. Again, if so, it will save this new axis to the old set, replacing any old axis with this new one, if it is the same and has better height.
[in] | retGroup | A vector of indices in the ret list which form the group to which new axes are compared to. |
[in] | ret | A list of already detected axes. |
[in] | fold | The fold of the searched for axis. |
[in] | axX | The x-axis element of the new axis. |
[in] | axY | The y-axis element of the new axis. |
[in] | axZ | The z-axis element of the new axis. |
[in] | prosp | The vector to which the axis is to be saved. |
[in] | axErr | The error tolerance on angle matching. |
[in] | noMatchesG1 | The number of axes from ret that need to be matched with angle1. |
[in] | angle1 | The angle with which noMatchesG1 axes need to be matched with the retGroup axes. |
[in] | noMatchesG2 | The number of axes from ret that need to be matched with angle2. |
[in] | angle2 | The angle with which noMatchesG2 axes need to be matched with the retGroup axes. |
[in] | noMatchesG3 | The number of axes from ret that need to be matched with angle3. |
[in] | angle3 | The angle with which noMatchesG3 axes need to be matched with the retGroup axes. |
[in] | dataObj | The full data holding object pointer - this is to get access to self-rotation function values. |
Definition at line 3522 of file ProSHADE_symmetry.cpp.
proshade_double ProSHADE_internal_symmetry::checkForMissingPeak | ( | ProSHADE_internal_data::ProSHADE_data * | dataObj, |
proshade_double | x, | ||
proshade_double | y, | ||
proshade_double | z, | ||
proshade_double | angle, | ||
proshade_double | heightThres, | ||
proshade_double | axTol | ||
) |
This function checks for the high of the correlation for particular rotation angle and axis.
This is the core of missing peaks procedure. This function takes the angle-axis representation of the sought after peak/rotation and searches the data objects (respectivelly its inverse SO(3) Fourier Transform map) for the highest point conforming to these specifications. It then returns the highest value found, so that it could be decided whether the symmetry search has been successfully completed or whether the symmetry was not found.
[in] | dataObj | The data object for which symmetry is being searched. |
[in] | x | The x-axis element of the searched for rotation angle-axis representation. |
[in] | y | The y-axis element of the searched for rotation angle-axis representation. |
[in] | z | The z-axis element of the searched for rotation angle-axis representation. |
[in] | angle | The angle element of the searched for rotation angle-axis representation. |
[in] | heightThres | The required self-rotation map height for this rotation. |
[in] | axTol | The tolerance on axis matching when searching for the rotation. |
[out] | X | The height of highest matching map point. |
Definition at line 816 of file ProSHADE_symmetry.cpp.
bool ProSHADE_internal_symmetry::completeMissingCSymmetry | ( | ProSHADE_internal_data::ProSHADE_data * | dataObj, |
proshade_unsign | fold, | ||
std::vector< proshade_unsign > * | grp, | ||
std::vector< proshade_double * > * | peaks, | ||
std::vector< proshade_unsign > * | missingPeaks, | ||
std::vector< proshade_double > * | expectedAngles, | ||
std::vector< proshade_unsign > * | matchedPeaks, | ||
proshade_double | axErrTolerance, | ||
proshade_unsign | verbose | ||
) |
This function does the complete missing peak searching and filling in the missing peaks.
This function does the complete work on missing peaks and detection of symmetries affected by them. It firstly decides on the threshold for a missing peak height and it then proceeds to check all missing peaks for being in the inverse SO(3) FT map. Any detected peaks will be saved to all appropriate variables (as supplied) and finally, if all missing peaks were sucessfully found, it will return true, otherwise false.
[in] | dataObj | The data object for which symmetry is being searched. |
[in] | fold | This is the fold value of the detected C symmetry. |
[in] | grp | Vector with the indices of members of this symmetry axis group. |
[in] | peaks | A vector of pointers where angle-axis representations of the peaks is saved. |
[in] | missingPeaks | Vector with the indices of missing rotation angles (indices are from the expected peaks vector, not peaks vector!). |
[in] | expectedAngles | Vector with the expected rotation angle values. |
[in] | axErrTolerance | The allowed error on matching axes. |
[in] | verbose | How loud the standard output of this run should be? |
[out] | X | Was the missing symmetry part completion successfull? |
Definition at line 924 of file ProSHADE_symmetry.cpp.
bool ProSHADE_internal_symmetry::detectIcosahedralSymmetry | ( | std::vector< proshade_double * > * | CSymList, |
proshade_double | axErr, | ||
proshade_double | minPeakHeight | ||
) |
This function takes the list of C symmetries and decides whether basic requirements for isosahedral symmetry are there.
This function first finds all the C5 symmetries in the C symmetries list and then it checks each present C5 against all C3 symmetries for having the angle between the pair equal to the dihedral angle of an icosahedron ( acos( sqrt(5)/3 ) ). If a single such pair is detected, this is likely an icosahedral symmetry and all other axes need to be located. Otherwise, false is returned.
[in] | CSymList | A vector containing the already detected Cyclic symmetries. |
[in] | axErr | The error tolerance on angle matching. |
[in] | minPeakHeight | The minimum average peak height required for symmetry axis to be considered. |
[out] | X | Boolean value telling whether there are C5 and C3 symmetries with icosahedral dihhedral angle. |
Definition at line 2765 of file ProSHADE_symmetry.cpp.
bool ProSHADE_internal_symmetry::detectOctahedralSymmetry | ( | std::vector< proshade_double * > * | CSymList, |
proshade_double | axErr, | ||
proshade_double | minPeakHeight | ||
) |
This function takes the list of C symmetries and decides whether basic requirements for octahhedral symmetry are there.
This function first finds all the C4 symmetries in the C symmetries list and then it checks each present C4 against all C3 symmetries for having the angle between the pair equal to the dihedral angle of an octahedron ( acos(1/sqrt(3)) ). If a single such pair is detected, this is likely an octahedral symmetry and all other axes need to be located. Otherwise, false is returned.
[in] | CSymList | A vector containing the already detected Cyclic symmetries. |
[in] | axErr | The error tolerance on angle matching. |
[in] | minPeakHeight | The minimum average peak height for axis to be considered. |
[out] | X | Boolean value telling whether there are C4 and C3 symmetries with octahedral dihhedral angle. |
Definition at line 2152 of file ProSHADE_symmetry.cpp.
bool ProSHADE_internal_symmetry::detectTetrahedralSymmetry | ( | std::vector< proshade_double * > * | CSymList, |
proshade_double | axErr, | ||
proshade_double | minPeakHeight | ||
) |
This function takes the list of C symmetries and decides whether basic requirements for tetrahedral symmetry are there.
This function first finds all the C3 symmetries in the C symmetries list and then it checks all pais of such present C3s for have the angle between the pair equal to the dihedral angle of a tetrahedron ( acos(1/3) ). If a single such pair is detected, this is likely a tetrahedral symmetry and all other axes need to be located. Otherwise, false is returned.
[in] | CSymList | A vector containing the already detected Cyclic symmetries. |
[in] | axErr | The error tolerance on angle matching. |
[in] | minPeakHeight | The minimum average peak height for axis to be considered. |
[out] | X | Boolean value telling whether there are two C3 symmetries with tetrahedral dihhedral angle. |
Definition at line 1396 of file ProSHADE_symmetry.cpp.
bool ProSHADE_internal_symmetry::determineFoldToTry | ( | proshade_double | dist, |
proshade_double * | divBasis, | ||
proshade_double * | divRem, | ||
proshade_double | peakErr, | ||
proshade_double * | symmErr, | ||
std::vector< proshade_unsign > * | angsToTry | ||
) |
This function determines the symmetry fold to be searched for.
This function detects which fold would belong to the rotation angle distance supplied. This is done by finding the division basis for the simple 2pi/dist equation and minimising the remainder. The function then checks whether the remainder is smaller than a threshold and whether the error on fold detection is not close to fold+1 value in terms of peak misplacement in the map - if it is, then surrounding fold values are also added to be tested. Finally, the function returns boolean value stating whether at least one testable fold value passed the checks.
[in] | dist | The distance between rotation angles that should form the symmetry group. |
[in] | divBasis | Pointer to where to save the basis of the division 2pi/dist. |
[in] | divRem | Pointer to where to save the remainder of the division 2pi/dist. |
[in] | peakErr | The error in radians which would be the result of misplacing a peak by single map index. |
[in] | symmErr | Pointer to where to save the error which would be caused by mis-predicting the fold by 1. |
[in] | angsToTry | A vector where all the suggested fold values to be tested are saved. |
[out] | X | Boolean value whether at least single testable fold value was found |
Definition at line 658 of file ProSHADE_symmetry.cpp.
void ProSHADE_internal_symmetry::findExpectedPeakRotations | ( | proshade_unsign | fold, |
std::vector< proshade_double > * | expAngs | ||
) |
This function computes the expected peak rotations for given fold.
This function computes the expected peak rotation angle values for the peak range between -180 to +180 degrees plus one distance on both sides for a good measure. The resulting values are then saved to the second parameter vector.
[in] | fold | The fold for which peak rotation angles should be predicted. |
[in] | expAngs | A vector where the expected peak rotation values will be saved to. |
Definition at line 705 of file ProSHADE_symmetry.cpp.
void ProSHADE_internal_symmetry::findIcos10C3s | ( | std::vector< proshade_double * > * | CSymList, |
std::vector< proshade_double * > * | ret, | ||
proshade_double | axErr, | ||
ProSHADE_internal_data::ProSHADE_data * | dataObj, | ||
proshade_unsign | verbose, | ||
proshade_double | minPeakHeight | ||
) |
This function takes the list of C symmetries and finds the ten C3 symmetries with correct angles required for full icosahedral symmetry.
This function is specific to detecting the icosahedral symmetry. It should be called once icosahedral symmetry is suspected (by detecting its dihedral angles) and it needs to be fully described. This function specifically searches for the ten C3 symmetries which must all be detected in order to fully describe icosahedral symmetry. If all ten are found, the ret vector will have these ten axes added to the already present six C5 axes; alternatively, the ret array size will not change.
[in] | CSymList | A vector containing the already detected Cyclic symmetries. |
[in] | ret | The vector containing the already detected axes to which newly detected axes (if any) will be added. |
[in] | axErr | The error tolerance on angle matching. |
[in] | minPeakHeight | The minimum average peak height for axis to be considered. |
[in] | verobse | How loud the announcments should be? |
Definition at line 3257 of file ProSHADE_symmetry.cpp.
void ProSHADE_internal_symmetry::findIcos15C2s | ( | std::vector< proshade_double * > * | CSymList, |
std::vector< proshade_double * > * | ret, | ||
proshade_double | axErr, | ||
ProSHADE_internal_data::ProSHADE_data * | dataObj, | ||
proshade_unsign | verbose, | ||
proshade_double | minPeakHeight | ||
) |
This function takes the list of C symmetries and finds the fifteen C3 symmetries with correct angles required for full icosahedral symmetry.
This function is specific to detecting the icosahedral symmetry. It should be called once icosahedral symmetry is suspected (by detecting its dihedral angles) and it needs to be fully described. This function specifically searches for the ten C3 symmetries which must all be detected in order to fully describe icosahedral symmetry. If all ten are found, the ret vector will have these ten axes added to the already present six C5 axes; alternatively, the ret array size will not change.
[in] | CSymList | A vector containing the already detected Cyclic symmetries. |
[in] | ret | The vector containing the already detected axes to which newly detected axes (if any) will be added. |
[in] | axErr | The error tolerance on angle matching. |
[in] | minPeakHeight | The minimum average peak height for axis to be considered. |
[in] | verobse | How loud the announcments should be? |
Definition at line 3329 of file ProSHADE_symmetry.cpp.
void ProSHADE_internal_symmetry::findIcos6C5s | ( | std::vector< proshade_double * > * | CSymList, |
std::vector< proshade_double * > * | ret, | ||
proshade_double | axErr, | ||
ProSHADE_internal_data::ProSHADE_data * | dataObj, | ||
proshade_unsign | verbose, | ||
proshade_double | minPeakHeight | ||
) |
This function takes the list of C symmetries and finds the six C5 symmetries with given angles required for full icosahedral symmetry.
This function searches the list of all detected C symmetries for the presence of six C5 symmetries, which have the angle of acos (0.5) to each other; this ability is specifically required for detection of icosahedral symmetry. This function allows for multiple groups of C5 symmetries, doing the missing symmetry axis checks and returning the group with highest average peak height. If successfull, the ret vector will have 6 entries, otherwise it will be empty.
This function is specific to detecting the octahedral symmetry. It should be called once octahedral symmetry is suspected (by detecting its dihedral angles) and it needs to be fully described. This function specifically searches for the three C4 symmetries which must all be detected in order to fully describe octahedral symmetry. If all three are found, the ret vector will contain these as its only four entries, while it will be empty if some of the C4 symmetries are not found. The missing symmetry axis detection is implemented as part of this function as well.
[in] | CSymList | A vector containing the already detected Cyclic symmetries. |
[in] | ret | The vector . |
[in] | axErr | The error tolerance on angle matching. |
[in] | minPeakHeight | The minimum average peak height for axis to be considered. |
[in] | verobse | How loud the announcments should be? |
Definition at line 2823 of file ProSHADE_symmetry.cpp.
bool ProSHADE_internal_symmetry::findMissingAxes | ( | std::vector< std::vector< proshade_unsign > > * | possibilities, |
std::vector< proshade_double * > * | CSymList, | ||
proshade_unsign | requiredNoAxes, | ||
proshade_double | axErr, | ||
proshade_double | angle, | ||
proshade_unsign | fold, | ||
ProSHADE_internal_data::ProSHADE_data * | dataObj, | ||
proshade_double | minPeakHeight | ||
) |
This function tries to find an axis which would complete a particular group of axes for polyhedral symmetry detection.
This function assumes that there is a set of already detected axes and that for a polyhedral symmetry, another axis with known fold and angle to some of the already detected axis needs to be found. It uses algebraic solution to try to find such an axis (or a given number of them) and also tests for these newly detected axes being unique and having at least minPeakHeight average peak height. If such axes are found, they are added to the CSymList vector and their indices are also added to the possibilities vector.
[in] | possibilities | A vector of vectors of indices to the cyclic symmetries list with all the already determined axes. |
[in] | CSymList | A vector containing the already detected Cyclic symmetries. |
[in] | requiredNoAxes | Number of axes required for positive result. |
[in] | axErr | The error tolerance on angle matching. |
[in] | angle | The angle that each group member is required to have against the symmetry. |
[in] | fold | The fold of the searched for axis. |
[in] | dataObj | The full data holding object pointer - this is to get access to self-rotation function values. |
[in] | minPeakHeight | The minimum new axis average peak height in order for the axis to be added. |
[out] | atLeastOne | Boolean value speciying whether at least the minimum required number of axes was found. |
Definition at line 1582 of file ProSHADE_symmetry.cpp.
bool ProSHADE_internal_symmetry::findMissingAxesDual | ( | std::vector< proshade_unsign > * | possibilities, |
std::vector< proshade_double * > * | CSymList, | ||
std::vector< proshade_double * > * | ret, | ||
std::vector< proshade_unsign > * | retGroup, | ||
proshade_unsign | requiredNoAxes, | ||
proshade_double | axErr, | ||
proshade_unsign | noMatchesG1, | ||
proshade_double | angle1, | ||
proshade_unsign | noMatchesG2, | ||
proshade_double | angle2, | ||
proshade_unsign | fold, | ||
ProSHADE_internal_data::ProSHADE_data * | dataObj | ||
) |
This function tries to find a particular symmetry axes which would complete a group of symmetries with two different angle requirement to another group.
This function takes a list of axes to which a new axis should have two particular angles (to two different group members, that is). It then uses algebraic solution finding approach to compute possible solutions which would satisfy this condition, testing whether such solutions comply with the appropriate number of angles to number of members and for the new solutions being unique. If the required number of solutions is found, it will add the newly detected solutions to the CSymList vector and update the possibilities indices list, otherwise it will leave both alone.
[in] | possibilities | A vector of already detected axis indices which should be extended. |
[in] | CSymList | A vector containing the already detected Cyclic symmetries. |
[in] | ret | A list of already detected octahedral axes. |
[in] | retGroup | A vector of indices in the ret list which form the group to which new axes are compared to. |
[in] | requiredNoAxes | Number of axes required for positive result. |
[in] | axErr | The error tolerance on angle matching. |
[in] | noMatchesG1 | The number of axes from ret that need to be matched with angle1. |
[in] | angle1 | The angle with which noMatchesG1 axes need to be matched with the retGroup axes. |
[in] | noMatchesG2 | The number of axes from ret that need to be matched with angle2. |
[in] | angle2 | The angle with which noMatchesG2 axes need to be matched with the retGroup axes. |
[in] | fold | The fold of the searched for axis. |
[in] | dataObj | The full data holding object pointer - this is to get access to self-rotation function values. |
[out] | atLeastOne | Boolean value speciying whether at least the minimum required number of axes was found. |
Definition at line 2434 of file ProSHADE_symmetry.cpp.
bool ProSHADE_internal_symmetry::findMissingAxesTriple | ( | std::vector< proshade_unsign > * | possibilities, |
std::vector< proshade_double * > * | CSymList, | ||
std::vector< proshade_double * > * | ret, | ||
std::vector< proshade_unsign > * | retGroup, | ||
proshade_unsign | requiredNoAxes, | ||
proshade_double | axErr, | ||
proshade_unsign | noMatchesG1, | ||
proshade_double | angle1, | ||
proshade_unsign | noMatchesG2, | ||
proshade_double | angle2, | ||
proshade_unsign | noMatchesG3, | ||
proshade_double | angle3, | ||
proshade_unsign | fold, | ||
ProSHADE_internal_data::ProSHADE_data * | dataObj | ||
) |
This function tries to find a particular symmetry axis which would complete a group of symmetries with three different angle requirement to another group.
Assuming there is a group of symmetry axis, which have particular number of particular angles to each other, but some are missing, this function tries to find any such missing axes. This is a solution for the group of axes having three different angles to the other group members. For all newly detected group members, the average peak height and the uniqueness are both tested for.
[in] | possibilities | A vector of already detected axis indices which should be extended. |
[in] | CSymList | A vector containing the already detected Cyclic symmetries. |
[in] | ret | A list of already detected octahedral axes. |
[in] | retGroup | A vector of indices in the ret list which form the group to which new axes are compared to. |
[in] | requiredNoAxes | Number of axes required for positive result. |
[in] | axErr | The error tolerance on angle matching. |
[in] | noMatchesG1 | The number of axes from ret that need to be matched with angle1. |
[in] | angle1 | The angle with which noMatchesG1 axes need to be matched with the retGroup axes. |
[in] | noMatchesG2 | The number of axes from ret that need to be matched with angle2. |
[in] | angle2 | The angle with which noMatchesG2 axes need to be matched with the retGroup axes. |
[in] | noMatchesG3 | The number of axes from ret that need to be matched with angle3. |
[in] | angle3 | The angle with which noMatchesG3 axes need to be matched with the retGroup axes. |
[in] | fold | The fold of the searched for axis. |
[in] | dataObj | The full data holding object pointer - this is to get access to self-rotation function values. |
[out] | atLeastOne | Boolean value speciying whether at least the minimum required number of axes was found. |
Definition at line 3411 of file ProSHADE_symmetry.cpp.
std::vector< proshade_double * > ProSHADE_internal_symmetry::findMissingAxisPoints | ( | proshade_double | xVal, |
proshade_double | yVal, | ||
proshade_double | zVal, | ||
ProSHADE_internal_data::ProSHADE_data * | dataObj, | ||
proshade_double | axErr | ||
) |
This function searches for all the self-rotation map points conforming to the axis, returning their angles and heights.
This helper function searches the self-rotation map point by point for all points which represent the same rotation axis as required by the input parameters. For all such points, it records the angle they represent and the map height associated with them. Finally, it returns a vector of all detected points.
[in] | xVal | The x-axis element of the axis to have the height detected. |
[in] | yVal | The y-axis element of the axis to have the height detected. |
[in] | zVal | The z-axis element of the axis to have the height detected. |
[in] | dataObj | The full data holding object pointer - this is to get access to self-rotation function values. |
[in] | axErr | The error tolerance on angle matching. |
[out] | angVec | Vector containing all map points which conform to the required axis along with their heights. |
Definition at line 1725 of file ProSHADE_symmetry.cpp.
void ProSHADE_internal_symmetry::findOcta3C4s | ( | std::vector< proshade_double * > * | CSymList, |
std::vector< proshade_double * > * | ret, | ||
proshade_double | axErr, | ||
ProSHADE_internal_data::ProSHADE_data * | dataObj, | ||
proshade_unsign | verbose, | ||
proshade_double | minPeakHeight | ||
) |
This function takes the list of C symmetries and finds the 3 C4 symmetries with perpendicular angles required for full octahedral symmetry.
This function is specific to detecting the octahedral symmetry. It should be called once octahedral symmetry is suspected (by detecting its dihedral angles) and it needs to be fully described. This function specifically searches for the three C4 symmetries which must all be detected in order to fully describe octahedral symmetry. If all three are found, the ret vector will contain these as its only four entries, while it will be empty if some of the C4 symmetries are not found. The missing symmetry axis detection is implemented as part of this function as well.
[in] | CSymList | A vector containing the already detected Cyclic symmetries. |
[in] | ret | The vector containing all axes required for the octahedral symmetry detected so far. |
[in] | axErr | The error tolerance on angle matching. |
[in] | minPeakHeight | The minimum average peak height for axis to be considered. |
[in] | verobse | How loud the announcments should be? |
Definition at line 2206 of file ProSHADE_symmetry.cpp.
void ProSHADE_internal_symmetry::findOcta4C3s | ( | std::vector< proshade_double * > * | CSymList, |
std::vector< proshade_double * > * | ret, | ||
proshade_double | axErr, | ||
ProSHADE_internal_data::ProSHADE_data * | dataObj, | ||
proshade_unsign | verbose, | ||
proshade_double | minPeakHeight | ||
) |
This function takes the list of C symmetries and finds the four C3 symmetries with correct angles required for full octahedral symmetry.
This function is specific to detecting the tetrahedral symmetry. It should be called once tetrahedral symmetry is suspected (by detecting its dihedral angles) and it needs to be fully described. This function specifically searches for the four C3 symmetries which must all be detected in order to fully describe octahedral symmetry. If all four are found, the ret vector will have these four axes added to the already present three C4 axes; alternatively, the ret array size will not change. In order not to replicate computations, if tetrahedral symmetry has already been detected, the four axes sought here are the same as the first four axes detected there, so simple copying is used instead of re-computing the results anew.
[in] | CSymList | A vector containing the already detected Cyclic symmetries. |
[in] | ret | The vector . |
[in] | axErr | The error tolerance on angle matching. |
[in] | verobse | How loud the announcments should be? |
[in] | minPeakHeight | The minimum average peak height for axis to be considered. |
[in] | TetraSymList | A vector containing the already detected tetrahedral symmetries - this is to avoid the same search for four C3 symmetry axes. |
Definition at line 2272 of file ProSHADE_symmetry.cpp.
void ProSHADE_internal_symmetry::findOcta6C2s | ( | std::vector< proshade_double * > * | CSymList, |
std::vector< proshade_double * > * | ret, | ||
proshade_double | axErr, | ||
ProSHADE_internal_data::ProSHADE_data * | dataObj, | ||
proshade_unsign | verbose, | ||
proshade_double | minPeakHeight | ||
) |
This function takes the list of C symmetries and finds the six C2 symmetries with correct angles required for full octahedral symmetry.
This function is specific to detecting the octahedral symmetry. It should be called once octahedral symmetry is suspected (by detecting its dihedral angles) and it needs to be fully described. This function specifically searches for the six C2 symmetries which must all be detected in order to fully describe octahedral symmetry. If all six are found, the ret vector will have these six axes added to the already present three C4 axes and the four C3 axes; alternatively, the ret array size will not change.
[in] | CSymList | A vector containing the already detected Cyclic symmetries. |
[in] | ret | The vector containing the already detected axes to which newly detected axes (if any) will be added. |
[in] | axErr | The error tolerance on angle matching. |
[in] | verobse | How loud the announcments should be? |
[in] | minPeakHeight | The minimum average peak height for axis to be considered. |
Definition at line 2354 of file ProSHADE_symmetry.cpp.
std::vector< proshade_double > ProSHADE_internal_symmetry::findPeaksByHeightBoundaries | ( | std::vector< proshade_double * > | allPeaks, |
proshade_double | smoothing | ||
) |
This function groups the peaks by height and returns the boundaries between such groups.
This function allows for a list of peaks to be divided into multiple groups based on the peak heights, so that only the most confident values would be used for symmetry detection first.
[in] | allPeaks | A vector of pointers where angle-axis representations of the peaks is saved. |
[in] | smoothing | Value determining how smooth the distribution of peaks should be made. Larger number means more groups. |
[out] | X | The boundaries for peak groups by height as determined by 1D grouping. |
Definition at line 310 of file ProSHADE_symmetry.cpp.
std::vector< std::vector< proshade_unsign > > ProSHADE_internal_symmetry::findPeaksCSymmetry | ( | std::vector< proshade_double * > * | peaks, |
proshade_signed | verbose, | ||
proshade_unsign | band, | ||
proshade_double | missPeakThres, | ||
proshade_double | axisErrTolerance, | ||
bool | axisErrToleranceDef, | ||
ProSHADE_internal_data::ProSHADE_data * | dataObj | ||
) |
This function searches the list of peaks for presence of cyclic symmetry.
This function takes a set of peaks and a bunch of settings parameters and proceeds to search these peaks for containing any Cyclic (C) symmetries. It contains all the functionality including missing peaks searching and automatic possible fold detection including allowing for errors. It will finally save all the results in the vector of vectors it returns.
[in] | peaks | A vector of pointers where angle-axis representations of the peaks is saved. |
[in] | verbose | How loud the standard output of this run should be? |
[in] | band | The bandwidth of these computations. |
[in] | missPeakThres | Threshold for the percentage of missing peaks there can be to warrant a full search for missing peaks. |
[in] | axisErrTolerance | Tolerance for symmetry axis identity. |
[in] | axisErrToleranceDef | Should the automatic axis tolerance decrease be applied? |
[in] | dataObj | The data object for which symmetry is being searched. This is only needed for missing peaks search, but needed nonetheless. |
[out] | X | Vector of vectors with first number being the detected fold and all remaining numbers being the indices of peaks forming the symmetry. |
Definition at line 368 of file ProSHADE_symmetry.cpp.
void ProSHADE_internal_symmetry::findSymmetryUsingFold | ( | ProSHADE_internal_data::ProSHADE_data * | dataObj, |
std::vector< proshade_unsign > * | angsToTry, | ||
std::vector< proshade_unsign > * | grp, | ||
std::vector< proshade_double * > * | peaks, | ||
std::vector< std::vector< proshade_unsign > > * | ret, | ||
std::vector< proshade_unsign > * | testedAlready, | ||
proshade_double | axErrTolerance, | ||
bool | axErrToleranceDefault, | ||
proshade_double | missPeakThres, | ||
proshade_unsign | verbose | ||
) |
This function tests all supplied folds for being supported by the peaks (i.e. and being complete present symmetry).
This function takes all the possible folds which could be in the set of peaks and checks if these are indeed full symmetries, or whether these were random.
[in] | dataObj | The data object for which symmetry is being searched. |
[in] | angsToTry | This vector contains all the folds that should be attempted. |
[in] | grp | Vector with the indices of members of this symmetry axis group. |
[in] | peaks | A vector of pointers where angle-axis representations of the peaks is saved. |
[in] | ret | The final variable holding all results (i.e. detected symmetries). |
[in] | testedAlready | A vector in which the already tested folds for this symmetry axis are saved. |
[in] | axErrTolerance | The allowed error on matching axes. |
[in] | axErrToleranceDefault | Should the axErrTolerance be decreased with increasing fold? |
[in] | missPeakThres | Threshold for the percentage of missing peaks there can be to warrant a full search for missing peaks. |
[in] | verbose | How loud the standard output of this run should be? |
Definition at line 989 of file ProSHADE_symmetry.cpp.
void ProSHADE_internal_symmetry::findTetra3C2s | ( | std::vector< proshade_double * > * | CSymList, |
std::vector< proshade_double * > * | ret, | ||
proshade_double | axErr, | ||
ProSHADE_internal_data::ProSHADE_data * | dataObj, | ||
proshade_unsign | verbose, | ||
proshade_double | minPeakHeight | ||
) |
This function takes the list of C symmetries and finds the 3 C2 symmetries with correct angles required for full tetrahedral symmetry.
This is a specific helper function for detecting three C2 symmetries perpendicular to each other hand having a specific angle ( acos(0.5) ) to one of the already detected C3 symmetries of the sought after tetrahedral symmetry. It firstly finds all C2s and tests these for having the acos(0.5) angle to the already found C3s. From this list of passing C2s, it then tries to find three mutually perpendicular axes, including searching for missing axes. If no such axes are found, the ret array will still have 4 entries, while if they are found, the ret array will have these added to the total of 7 entries.
[in] | CSymList | A vector containing the already detected Cyclic symmetries. |
[in] | ret | The vector . |
[in] | axErr | The error tolerance on angle matching. |
[in] | verobse | How loud the announcments should be? |
[in] | minPeakHeight | The minimum average peak height for axis to be considered. |
Definition at line 1966 of file ProSHADE_symmetry.cpp.
void ProSHADE_internal_symmetry::findTetra4C3s | ( | std::vector< proshade_double * > * | CSymList, |
std::vector< proshade_double * > * | ret, | ||
proshade_double | axErr, | ||
ProSHADE_internal_data::ProSHADE_data * | dataObj, | ||
proshade_unsign | verbose, | ||
proshade_double | minPeakHeight | ||
) |
This function takes the list of C symmetries and finds the 4 C3 symmetries with correct angles required for full tetrahedral symmetry.
This function is specific to detecting the tetrahedral symmetry. It should be called once tetrahedral symmetry is suspected (by detecting its dihedral angles) and it needs to be fully described. This function specifically searches for the four C3 symmetries which must all be detected in order to fully describe tetrahedral symmetry. If all four are found, the ret vector will contain these as its only four entries, while it will be empty if some of the C3 symmetries are not found. The missing symmetry axis detection is implemented as part of this function as well.
[in] | CSymList | A vector containing the already detected Cyclic symmetries. |
[in] | ret | The vector . |
[in] | axErr | The error tolerance on angle matching. |
[in] | verobse | How loud the announcments should be? |
[in] | minPeakHeight | The minimum average peak height for axis to be considered. |
Definition at line 1445 of file ProSHADE_symmetry.cpp.
std::vector< proshade_double * > ProSHADE_internal_symmetry::getPeaksAngleAxisPositions | ( | std::vector< proshade_double * > | allPeaks, |
proshade_unsign | verbose | ||
) |
This function converts peaks ZXZ Euler anles to angle-axis representation for further processing.
The only functionality here is taking a vector of Euler ZXZ angles and converting these though the rotation matrices to a vector of angle-axis representation of the same angles.
[in] | allPeaks | A vector of pointers where Euler ZXZ representations of the peaks are saved. |
[in] | verbose | How loud the standard output of this run should be? |
[out] | X | A vector of pointers where angle-axis representations of the peaks will be saved. |
Definition at line 256 of file ProSHADE_symmetry.cpp.
void ProSHADE_internal_symmetry::giveOppositeAxesSameDirection | ( | std::vector< proshade_double * > | peaks | ) |
This function modifiest the axes so that the highest vector element is always positive.
This function modifies the angle-axis representation of the peak positions so that the leargest dimmension of the rotation axis would be positive. This is important in order to make sure that the AA representations [0,0,1;3.14] and [0,0,-1;-3.14] are equal and not considered as completely different.
[in] | peaks | A vector of pointers where angle-axis representations of the peaks is saved. |
Definition at line 491 of file ProSHADE_symmetry.cpp.
std::vector< std::vector< proshade_unsign > > ProSHADE_internal_symmetry::groupSameAxes | ( | std::vector< proshade_double * > & | peaks, |
proshade_double | errTolerance | ||
) |
This function groups the peaks by their axes of rotation.
This function takes the list of peaks so far detected and groups these by their axis or rotation, ignoring peaks with zero rotation angle. The return value is a vector of vectors of the groups and their members, but not re-organised list of peaks. This function also adds a zero angle peak to all peak groups (so that the zero angle peak has the same axis as all other group members for all groups).
[in] | peaks | A vector of pointers where angle-axis representations of the peaks is saved. |
[in] | errTolerance | A value within which two axes are considered equal. |
[out] | X | A vector of peak groups with each group entry being a vector of groups member indices in the peaks vector. |
Definition at line 419 of file ProSHADE_symmetry.cpp.
bool ProSHADE_internal_symmetry::isSymmetrySame | ( | std::vector< proshade_double * > * | ret, |
proshade_double * | sym, | ||
proshade_double | simThres | ||
) |
This function checks if a very similar symmetry is not already saved.
This is a simple function comparing a single double array of 6 to a vector of these, returning whether the vector already contains a very similar entry to the rested one. If the new has better height, replacement will take place.
[in] | ret | This is the variable where the tested array will be saved if passed. It is a vector of double[6] arrays with the following meaning: [0] = fold, [1] = x-axis, [2] = y-axis, [3] = z-axis, [4] = angle, [5] = average peak height. |
[in] | sym | This is a double array of 6 which is to be compared to all the vector entries. |
[in] | simThres | The threshold for dot product comparison similarity. |
[out] | X | Boolean value stating whether a similar entry has been found (true = it was, false = it was not). |
Definition at line 1177 of file ProSHADE_symmetry.cpp.
proshade_double ProSHADE_internal_symmetry::missingAxisHeight | ( | proshade_double | xVal, |
proshade_double | yVal, | ||
proshade_double | zVal, | ||
ProSHADE_internal_data::ProSHADE_data * | dataObj, | ||
proshade_unsign | fold, | ||
proshade_double | axErr | ||
) |
This function searches for the highest peaks average that would produce the required axis and fold.
This function starts by finding all self-rotation map points with corresponding axis and recording the angle and map heights of these points. It then sorts these and searches for a combination of fold points separated by the 2pi/fold distance with the highest average map height. In this way, the highest average symmetry height is determined for any axis. This does not, however, check if such symmetry does indeed exist!
[in] | xVal | The x-axis element of the axis to have the height detected. |
[in] | yVal | The y-axis element of the axis to have the height detected. |
[in] | zVal | The z-axis element of the axis to have the height detected. |
[in] | dataObj | The full data holding object pointer - this is to get access to self-rotation function values. |
[in] | fold | The fold of the searched for axis. |
[in] | axErr | The error tolerance on angle matching. |
[out] | X | The highest height value found for the axis with the given fold. |
Definition at line 1663 of file ProSHADE_symmetry.cpp.
void ProSHADE_internal_symmetry::predictIcosAxes | ( | ProSHADE_settings * | settings, |
std::vector< proshade_double * > * | CSymList, | ||
std::vector< proshade_double * > * | ret, | ||
proshade_double | axErr, | ||
ProSHADE_internal_data::ProSHADE_data * | dataObj, | ||
proshade_unsign | verbose, | ||
proshade_double | minPeakHeight, | ||
proshade_double | matrixTolerance | ||
) |
This function predicts all icosahedral point group symmetry axes from the cyclic point groups list.
This function starts with finding the best detected cyclic symmetries of the right folds and having the closest angle to the icosahedron dihedral angle. It then proceeds to generate all the point group elements and their combinations. From these it then computes some of the missing axes and their associated angles. These steps can then be repeated until no more new elements are found (a group exists) or the process fails. The the detected axes (as obtained back from the point group elements) are then returned without checking for having the correct number of them.
[in] | CSymList | A vector containing the already detected Cyclic symmetries. |
[in] | ret | The vector . |
[in] | axErr | The error tolerance on angle matching. |
[in] | minPeakHeight | The minimum average peak height for axis to be considered. |
[in] | verobse | How loud the announcments should be? |
[in] | axisTolerance | The tolerance for two axes to be considered similar in terms of cosine distance. |
[in] | matrixTolerance | The maximum allowed rotation matrix trace difference allowed for the matrices to be considered the same. |
Definition at line 2944 of file ProSHADE_symmetry.cpp.
void ProSHADE_internal_symmetry::predictOctaAxes | ( | std::vector< proshade_double * > * | CSymList, |
std::vector< proshade_double * > * | ret, | ||
proshade_double | axErr, | ||
ProSHADE_internal_data::ProSHADE_data * | dataObj, | ||
proshade_unsign | verbose, | ||
proshade_double | minPeakHeight, | ||
proshade_double | matrixTolerance | ||
) |
This function predicts all octahedral point group symmetry axes from the cyclic point groups list.
This function starts with finding the best detected cyclic symmetries of the right folds and having the closest angle to the octahedron dihedral angle. It then proceeds to generate all the point group elements and their combinations. From these it then computes some of the missing axes and their associated angles. These steps can then be repeated until no more new elements are found (a group exists) or the process fails. The the detected axes (as obtained back from the point group elements) are then returned without checking for having the correct number of them.
[in] | CSymList | A vector containing the already detected Cyclic symmetries. |
[in] | ret | The vector . |
[in] | axErr | The error tolerance on angle matching. |
[in] | minPeakHeight | The minimum average peak height for axis to be considered. |
[in] | verobse | How loud the announcments should be? |
[in] | axisTolerance | The tolerance for two axes to be considered similar in terms of cosine distance. |
[in] | matrixTolerance | The maximum allowed rotation matrix trace difference allowed for the matrices to be considered the same. |
Definition at line 3161 of file ProSHADE_symmetry.cpp.
void ProSHADE_internal_symmetry::printSymmetryCompletion | ( | proshade_unsign | noSyms, |
proshade_unsign | verbose | ||
) |
This function simply prints the summary and warnings for cyclic symmetries detection completion.
[in] | noSyms | The number of symmetries that were detected. |
[in] | verbose | How loud the run should be and therefore if anything should be printed at all. |
Definition at line 1085 of file ProSHADE_symmetry.cpp.
void ProSHADE_internal_symmetry::printSymmetryGroup | ( | std::vector< proshade_unsign > | grp, |
std::vector< proshade_double * > | peaks, | ||
proshade_signed | verbose | ||
) |
This function simply prints the detected symmetry and all its supporting peaks.
[in] | grp | A single symmetry axis group indices to be printed. |
[in] | peaks | The vector of all peaks from which the indices are drawn. |
[in] | verbose | How loud the run should be and therefore if anything should be printed at all. |
Definition at line 1059 of file ProSHADE_symmetry.cpp.
void ProSHADE_internal_symmetry::printSymmetryPeaks | ( | std::vector< proshade_unsign > | grp, |
std::vector< proshade_double * > | peaks, | ||
proshade_signed | verbose, | ||
proshade_unsign | groupNo | ||
) |
This function simply prints the symmetry axis group supplied in the first parameter from the second parameter values.
[in] | grp | A single symmetry axis group indices to be printed. |
[in] | peaks | The vector of all peaks from which the indices are drawn. |
[in] | verbose | How loud the run should be and therefore if anything should be printed at all. |
Definition at line 518 of file ProSHADE_symmetry.cpp.
void ProSHADE_internal_symmetry::saveAllCSymmetries | ( | std::vector< std::vector< proshade_unsign > > | detected, |
std::vector< proshade_double * > | peaks, | ||
std::vector< proshade_double * > * | ret, | ||
proshade_double | axErr | ||
) |
This function takes the detected symmetries indices and peaks and saves these in the main cyclic symmetries detection output format.
This function uses the indices of peaks forming a detected symmetry along with the peak values corresponding to these indices in order to compute the symmetry description - that is the fold, average x, y and z-axis elements, angle (2pi/fold) and the average peak height. With all this computed for each detected symmetry, it saves these as double arrays to the output vector of double arrays for further processing. The function also does not save redundant symmetries.
[in] | detected | This is a vector of vectors with the indices of detected symmetry peaks. |
[in] | peaks | These are the peaks and their values which come together to form the detected symmetry. |
[in] | ret | This is the variable where the results will be saved. It is a vector of double[6] arrays with the following meaning: [0] = fold, [1] = x-axis, [2] = y-axis, [3] = z-axis, [4] = angle, [5] = average peak height. |
[in] | axErr | The tolerance on axis matching. |
Definition at line 1115 of file ProSHADE_symmetry.cpp.
void ProSHADE_internal_symmetry::saveDetectedCSymmetry | ( | proshade_unsign | fold, |
std::vector< proshade_unsign > * | matchedPeaks, | ||
std::vector< std::vector< proshade_unsign > > * | ret, | ||
proshade_signed | verbose | ||
) |
This function saves a detected symmetry for reporting to the user.
This function simply saves the supplied group members and fold value to the main output vector of vectors (also supplied). It makes sure the saving format (fold first, then all symmetry peak indices) is upheld.
[in] | fold | This is the fold value of the detected C symmetry. |
[in] | matchedPeaks | A vector containing the indices of all peaks forming this symmetry. |
[in] | ret | The vector of vectors to be returned by findPeaksCSymmetry() and containing all detected symmetries (to which we are saving here). |
[in] | verbose | How loud the standard output of this run should be? |
Definition at line 884 of file ProSHADE_symmetry.cpp.
void ProSHADE_internal_symmetry::saveDSymmetry | ( | std::vector< proshade_double * > * | ret, |
std::vector< proshade_double * > * | CSymList, | ||
proshade_unsign | axisOne, | ||
proshade_unsign | axisTwo | ||
) |
This function saves a detected dihedral symmetry to the dihedral symmetries list.
This function takes two C symmetry axes as supplied by the calling function and the list of the detected C symmetries. It then produces the saving structure for a dihedral symmetry formed by the two supplied axes and saves this structure to the supplied dihedral symmetry list vector - ret.
[in] | ret | The vector of double pointers to which the symmetry is to be saved to. |
[in] | CSymList | A vector containing the already detected Cyclic symmetries. |
[in] | axisOne | The index of the first C symmetry forming the dihedral symmetry. |
[in] | axisTwo | The index of the second C symmetry forming the dihedral symmetry. |
Definition at line 1301 of file ProSHADE_symmetry.cpp.
void ProSHADE_internal_symmetry::saveMissingAxisNewOnly | ( | std::vector< proshade_double * > * | axVec, |
proshade_double | axX, | ||
proshade_double | axY, | ||
proshade_double | axZ, | ||
proshade_double | height, | ||
proshade_unsign | fold, | ||
proshade_double | axErr | ||
) |
This function saves the recovered information about missing axis into a full symmetry, making sure no duplicates are created.
This function takes the information about the missing symmetry and proceeds to create a full symmetry description out of it. It then checks whether the vector already contains similar symmetry, either replacing the old or ignoring the new symmetry based on which has hiher height. If the symmetry does not match anything in the vector, it will be copied as a new vector entry.
[in] | axVec | Vector containing all already detected missing axes. |
[in] | axX | The x-axis element of the missing axis. |
[in] | axY | The y-axis element of the missing axis. |
[in] | axZ | The z-axis element of the missing axis. |
[in] | height | The average map height for this new axis. |
[in] | fold | The fold of the searched for axis. |
[in] | axErr | The error tolerance on angle matching. |
Definition at line 1799 of file ProSHADE_symmetry.cpp.
void ProSHADE_internal_symmetry::searchMissingSymmetrySpace | ( | ProSHADE_internal_data::ProSHADE_data * | dataObj, |
std::vector< proshade_double * > * | CSymList, | ||
std::vector< proshade_unsign > * | grp, | ||
std::vector< proshade_double * > * | hlpVec, | ||
proshade_double | axErr, | ||
proshade_double | angle, | ||
proshade_unsign | fold, | ||
proshade_double | minPeakHeight | ||
) |
This function tests feasible axes against the missing axis criteria, returning a set of matching axes.
This function does the real missing axis searching. It starts by taking all supplied axes and algebraically computing the vector which has the required angle to two of the supplied axes. This computed axis is then tested against the group for being unique and having an average height at least as high as required. If such axis is found, it is added to the axes list.
[in] | dataObj | The full data holding object pointer - this is to get access to self-rotation function values. |
[in] | CSymList | A vector containing the already detected Cyclic symmetries. |
[in] | grp | A vector of indices (relating to CSymList) of the group members. |
[in] | hlpVec | A vector which will hold the detected, but not verified axes to be returned to the caller function. |
[in] | axErr | The error tolerance on angle matching. |
[in] | angle | The angle that each group member is required to have against the symmetry. |
[in] | fold | The fold of the searched for axis. |
[in] | minPeakHeight | The minimum new axis average peak height in order for the axis to be added. |
Definition at line 1867 of file ProSHADE_symmetry.cpp.
bool ProSHADE_internal_symmetry::smallestDistanceBetweenAngles | ( | std::vector< proshade_unsign > | grp, |
std::vector< proshade_double * > | peaks, | ||
std::vector< proshade_double > * | tried, | ||
proshade_double * | dist | ||
) |
This function finds the smallest distance between the rotation angles within a group.
This function is used to control the while loop in the findPeaksCSymmetry() function. It has two outputs, the standard returned value is a boolean stating whether a new distance between group rotation angles was found; the second output is the distance itself, which is saved in the dist variable.
[in] | grp | A single symmetry axis group indices to be printed. |
[in] | peaks | The vector of all peaks from which the indices are drawn. |
[in] | tried | A vector of doubles holding the already tried distances and group combinations, so that they would not be tried again. |
[in] | dist | A pointer to the variable where the smallest distance (if found) will be saved. |
[out] | X | Bool whether a new distance was found. |
Definition at line 551 of file ProSHADE_symmetry.cpp.
bool ProSHADE_internal_symmetry::sortArrVecHlp | ( | const proshade_double * | a, |
const proshade_double * | b | ||
) |
This function compares two arrays of two based on the first number.
[in] | a | The first array to compare. |
[in] | b | The second array to compare. |
[out] | X | Boolean whether the first is smaller than the second. |
Definition at line 1642 of file ProSHADE_symmetry.cpp.
bool ProSHADE_internal_symmetry::testGroupAgainstGroup | ( | std::vector< proshade_double * > * | GrList1, |
std::vector< proshade_unsign > * | grp1, | ||
std::vector< proshade_double * > * | GrList2, | ||
std::vector< proshade_unsign > * | grp2, | ||
proshade_double | angle, | ||
proshade_double | axErr | ||
) |
This function compares two groups of axes for a single pair having the required angle.
This simple helper function takes two sets of symmetry axes and two vectors of indices, each relating to one of the two sets. It then proceeds to check each of the indexed axes in each set against all the indexed axes in the other set, searching for a particular angle. If this angle is found for at least one pair, true is returned, while otherwise false is returned.
[in] | GrList1 | A vector containing the symmetries for the group 1. |
[in] | grp1 | The indices respective to GrList1 which form group 1. |
[in] | GrList2 | A vector containing the symmetries for the group 2. |
[in] | grp2 | The indices respective to GrList1 which form group 2. |
[in] | angle | The angle which needs to be found between any pair of axes in group 1 and 2. |
[in] | axErr | The error tolerance on angle matching. |
[out] | ret | True if succeeded, false otherwise. |
Definition at line 2050 of file ProSHADE_symmetry.cpp.
bool ProSHADE_internal_symmetry::testGroupAgainstSymmetry | ( | std::vector< proshade_double * > * | CSymList, |
std::vector< proshade_unsign > * | grp, | ||
proshade_double * | sym, | ||
proshade_double | axErr, | ||
proshade_double | angle, | ||
bool | improve, | ||
proshade_unsign | pos = 0 |
||
) |
This function tests whether a symmetry has particular angle to all members of a group.
This utility function tests if a sinlge symmetry axis has a given angle to all member of a particular symmetry group as given by the vector of indices and a vector of all symmetries. If the improve parameter is true, that it will also check for the tested axis for being parallel to any of the group axes while having higher average peak height - and in such cases, the function will replace the existing axis with the tested axis index as given in the pos argument. This utility is useful when searching for all axes of polyhedral symmetry groups.
[in] | CSymList | A vector containing the already detected Cyclic symmetries. |
[in] | grp | A vector of indices (relating to CSymList) of the group members. |
[in] | sym | A double pointer to array containing the symmetry to be tested against the group. |
[in] | axErr | The error tolerance on angle matching. |
[in] | angle | The angle that each group member is required to have against the symmetry. |
[in] | improve | Boolead value stating whether an axis with higher average height should be used instead of equal axis with lower average height, if such axis is found. |
[in] | pos | This is the CSymList index of the axis tested against the group. It will be used if improve = true to change the grp entry which is identical, but has lower height. |
[out] | X | Boolean value speciying whether all group members have the angle to the symmetry or not. |
Definition at line 1515 of file ProSHADE_symmetry.cpp.