![]() |
ProSHADE
0.7.6.6 (JUL 2022)
Protein Shape Detection
|
This namespace contains the symmetry detection related code. More...
Functions | |
proshade_signed | addAxisUnlessSame (proshade_unsign fold, proshade_double axX, proshade_double axY, proshade_double axZ, proshade_double axHeight, proshade_double averageFSC, 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... | |
void | findPredictedAxesHeights (std::vector< proshade_double * > *ret, ProSHADE_internal_data::ProSHADE_data *dataObj, ProSHADE_settings *settings) |
This function finds the rotation function value for all axes supplied in the ret parameter. More... | |
bool | isSymmetrySame (std::vector< proshade_double * > *ret, proshade_double *sym, proshade_double simThres, proshade_signed *matchedPos) |
This function checks if a very similar symmetry is not already saved. More... | |
bool | isSymmetrySame (std::vector< proshade_double * > *ret, proshade_double *sym, proshade_double simThres, proshade_signed *matchedPos, proshade_double fscVal) |
This function checks if a very similar symmetry is not already saved. 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_signed verbose, proshade_signed messageShift, 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_signed verbose, proshade_signed messageShift, 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_signed verbose, proshade_signed messageShift, 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_signed verbose, proshade_signed messageShift, 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_signed verbose, proshade_signed messageShift, 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... | |
proshade_signed | 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_signed verbose, proshade_signed messageShift, 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 | findIcos10C3s (std::vector< proshade_double * > *CSymList, std::vector< proshade_double * > *ret, proshade_double axErr, ProSHADE_internal_data::ProSHADE_data *dataObj, proshade_signed verbose, proshade_signed messageShift, 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_signed verbose, proshade_signed messageShift, 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... | |
proshade_double | findPredictedSingleAxisHeight (proshade_double *axis, proshade_double fold, ProSHADE_internal_data::ProSHADE_data *dataObj, ProSHADE_settings *settings) |
This function finds the rotation function value for a single axis. More... | |
void | optimiseDGroupAngleFromAxesHeights (std::vector< std::vector< proshade_double > > *ret, ProSHADE_internal_data::ProSHADE_data *dataObj, ProSHADE_settings *settings) |
This function takes two axes with almost dihedral angle and optimises their relative positions as well as orientation with respect to the optimal angle and the rotation function. More... | |
void | optimiseDGroupAngleFromAxesHeights (std::vector< std::vector< proshade_double > > *allCs, std::vector< proshade_unsign > selection, ProSHADE_internal_data::ProSHADE_data *dataObj, ProSHADE_settings *settings) |
This function takes two axes with almost dihedral angle and optimises their relative positions as well as orientation with respect to the optimal angle and the rotation function. More... | |
void | predictIcosAxes (std::vector< proshade_double * > *CSymList, std::vector< std::vector< proshade_double * > > *ret, proshade_double axErr, proshade_double minPeakHeight) |
This function predicts all possible icosahedral point groups symmetry axes from the cyclic point groups list. More... | |
void | predictOctaAxes (std::vector< proshade_double * > *CSymList, std::vector< std::vector< proshade_double * > > *ret, proshade_double axErr, proshade_double minPeakHeight) |
This function predicts all octahedral point group symmetry axes from the cyclic point groups list. More... | |
void | predictTetraAxes (std::vector< proshade_double * > *CSymList, std::vector< std::vector< proshade_double * > > *ret, proshade_double axErr, proshade_double minPeakHeight) |
This function predicts all tetrahedral point group symmetry axes from the cyclic point groups list. More... | |
std::vector< proshade_unsign > | findReliableUnphasedSymmetries (std::vector< proshade_double * > *allCs, std::vector< std::vector< proshade_double * > > *allDs, proshade_signed verbose, proshade_signed messageShift, proshade_double tolerance) |
This function checks the list of detected axes (presumably from phaseless symmetry detection) and returns the best dihedral (or cyclic, if no dihedral is found) point group, or empty vector if nothing is found. More... | |
void | allocateCentreOfMapFourierTransforms (proshade_unsign xDim, proshade_unsign yDim, proshade_unsign zDim, fftw_complex *&origMap, fftw_complex *&origCoeffs, fftw_complex *&rotMapComplex, fftw_complex *&rotCoeffs, fftw_complex *&trFunc, fftw_complex *&trFuncCoeffs, fftw_plan *planForwardFourier, fftw_plan *planForwardFourierRot, fftw_plan *planReverseFourierComb) |
This function allocates the required memory for the Fourier transforms required to find the centre of the map. More... | |
void | releaseCentreOfMapFourierTransforms (fftw_complex *origMap, fftw_complex *origCoeffs, fftw_complex *rotMapComplex, fftw_complex *rotCoeffs, fftw_complex *trFunc, fftw_complex *trFuncCoeffs, fftw_plan planForwardFourier, fftw_plan planForwardFourierRot, fftw_plan planReverseFourierComb) |
This function releases the allocated memory for the Fourier transforms used to find the centre of the map. More... | |
std::vector< proshade_double > | findTranslationBetweenRotatedAndOriginalMap (ProSHADE_internal_data::ProSHADE_data *symStr, std::vector< proshade_double > symElem, fftw_complex *origCoeffs, fftw_complex *rotMapComplex, fftw_complex *rotCoeffs, fftw_plan planForwardFourierRot, fftw_complex *trFuncCoeffs, fftw_complex *trFunc, fftw_plan planReverseFourierComb) |
This function takes a single rotation matrix and procceds to compute the optimal translation between the original map and a map rotated by the supplied rotation matrix. More... | |
std::vector< proshade_double > | findPointFromTranslations (ProSHADE_internal_data::ProSHADE_data *symStr, std::vector< std::vector< proshade_double > > symElems, fftw_complex *origCoeffs, fftw_complex *rotMapComplex, fftw_complex *rotCoeffs, fftw_plan planForwardFourierRot, fftw_complex *trFuncCoeffs, fftw_complex *trFunc, fftw_plan planReverseFourierComb) |
This function computes the average of optimal translations for a cyclic point group. More... | |
This namespace contains the symmetry detection related code.
The ProSHADE_internal_symmetry namespace contains the functions related to the symmetry detection task.
proshade_signed ProSHADE_internal_symmetry::addAxisUnlessSame | ( | proshade_unsign | fold, |
proshade_double | axX, | ||
proshade_double | axY, | ||
proshade_double | axZ, | ||
proshade_double | axHeight, | ||
proshade_double | averageFSC, | ||
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] | averageFSC | The value of average FSC, if computed - otherwise enter -1.0. |
[in] | prosp | The vector to which the axis is to be saved. |
[in] | axErr | The error tolerance on angle matching. |
[out] | addedNo | Position at which the symmetry either already is, or was added to. |
Definition at line 1511 of file ProSHADE_symmetry.cpp.
proshade_signed 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. |
[out] | addedNo | Position at which the symmetry either already is, or was added to. |
Definition at line 1557 of file ProSHADE_symmetry.cpp.
void ProSHADE_internal_symmetry::allocateCentreOfMapFourierTransforms | ( | proshade_unsign | xDim, |
proshade_unsign | yDim, | ||
proshade_unsign | zDim, | ||
fftw_complex *& | origMap, | ||
fftw_complex *& | origCoeffs, | ||
fftw_complex *& | rotMapComplex, | ||
fftw_complex *& | rotCoeffs, | ||
fftw_complex *& | trFunc, | ||
fftw_complex *& | trFuncCoeffs, | ||
fftw_plan * | planForwardFourier, | ||
fftw_plan * | planForwardFourierRot, | ||
fftw_plan * | planReverseFourierComb | ||
) |
This function allocates the required memory for the Fourier transforms required to find the centre of the map.
[in] | xDim | The size of the x-axis in indices. |
[in] | yDim | The size of the y-axis in indices. |
[in] | zDim | The size of the z-axis in indices. |
[in] | origMap | Array to which the original map will be saved before Fourier transform computation. |
[in] | origCoeffs | Array to which the result of the Fourier transform of the original map will be saved into. |
[in] | rotMapComplex | Array to which the rotated map will be saved before Fourier transform computation. |
[in] | rotCoeffs | Array to which the result of the Fourier transform of the rotated map will be saved into. |
[in] | trFunc | Array to which the results of inverse Fourier transform of the conbined coefficients will be saved. |
[in] | trFuncCoeffs | Array to which the two maps coefficients will be combined into before inverse Fourier transform computation. |
[in] | planForwardFourier | FFTW3 plan for the original map Fourier transform. |
[in] | planForwardFourierRot | FFTW3 plat for the rotated map Fourier transform. |
[in] | planReverseFourierComb | FFTW3 plan for the inverse Fourier transform from the combined coefficients to translation function. |
Definition at line 3841 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 1610 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 2604 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 1854 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 1127 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 410 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_signed | verbose, | ||
proshade_signed | messageShift, | ||
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] | verbose | How loud the announcments should be? |
[in] | messageShift | Are we in a subprocess, so that the log should be shifted for this function call? If so, by how much? |
Definition at line 2337 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_signed | verbose, | ||
proshade_signed | messageShift, | ||
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] | verbose | How loud the announcments should be? |
[in] | messageShift | Are we in a subprocess, so that the log should be shifted for this function call? If so, by how much? |
Definition at line 2410 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_signed | verbose, | ||
proshade_signed | messageShift, | ||
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] | verbose | How loud the announcments should be? |
[in] | messageShift | Are we in a subprocess, so that the log should be shifted for this function call? If so, by how much? |
Definition at line 1912 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 598 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 1416 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 2493 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 743 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_signed | verbose, | ||
proshade_signed | messageShift, | ||
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] | verbose | How loud the announcments should be? |
[in] | messageShift | Are we in a subprocess, so that the log should be shifted for this function call? If so, by how much? |
[in] | minPeakHeight | The threshold for peak height. |
Definition at line 1185 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_signed | verbose, | ||
proshade_signed | messageShift, | ||
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] | verbose | How loud the announcments should be? |
[in] | messageShift | Are we in a subprocess, so that the log should be shifted for this function call? If so, by how much? |
[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 1252 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_signed | verbose, | ||
proshade_signed | messageShift, | ||
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] | verbose | How loud the announcments should be? |
[in] | messageShift | Are we in a subprocess, so that the log should be shifted for this function call? If so, by how much? |
[in] | minPeakHeight | The minimum average peak height for axis to be considered. |
Definition at line 1335 of file ProSHADE_symmetry.cpp.
std::vector< proshade_double > ProSHADE_internal_symmetry::findPointFromTranslations | ( | ProSHADE_internal_data::ProSHADE_data * | symStr, |
std::vector< std::vector< proshade_double > > | symElems, | ||
fftw_complex * | origCoeffs, | ||
fftw_complex * | rotMapComplex, | ||
fftw_complex * | rotCoeffs, | ||
fftw_plan | planForwardFourierRot, | ||
fftw_complex * | trFuncCoeffs, | ||
fftw_complex * | trFunc, | ||
fftw_plan | planReverseFourierComb | ||
) |
This function computes the average of optimal translations for a cyclic point group.
This function takes a single cyclic point group elements and proceeds to compute all optimal translations between the original map and map rotated by each point group element. The sum of these translations divided by the number of the point group elements (including the identity element) then gives a point that must lie on the symmetry axis.
[in] | symStr | A ProSHADE_data structure containing the structure for which the line on which the centre of rotation lies is to be found. |
[in] | symElems | Vector containing single symmetry element (rotaiton matrix) which is not identity. |
[in] | origCoeffs | The Fourier coefficients of the original (non-rotated) map. |
[in] | rotMapComplex | Array to which the rotated map will be saved and from which the Fourier transform plan (planForwardFourierRot) is prepared. |
[in] | rotCoeffs | Array to which the result of the Fourier transform of the rotated map will be saved into by the supplied plan (planForwardFourierRot). |
[in] | planForwardFourierRot | FFTW3 plan for forward Fourier transform from rotMapComplex to rotCoeffs. |
[in] | trFuncCoeffs | The array to which the combined Fourier coefficients for translation function will be saved into and also for which the inverse Fourier transform plan (planReverseFourierComb) is prepared for. |
[in] | trFunc | The array to which the translation function will be saved into by the reverse Fourier transform planned by the plan (planReverseFourierComb). |
[in] | planReverseFourierComb | FFTW3 plan for reverse Fourier transform from the combined coefficients (trFuncCoeffs) to the translation function array (trFunc). |
[in] | verbose | How loud the function should be? |
[out] | pointOnLine | A vector specifying a point that lies on the symmetry axis (given by the averaged sum of the translations of the rotated maps). |
Definition at line 3985 of file ProSHADE_symmetry.cpp.
void ProSHADE_internal_symmetry::findPredictedAxesHeights | ( | std::vector< proshade_double * > * | ret, |
ProSHADE_internal_data::ProSHADE_data * | dataObj, | ||
ProSHADE_settings * | settings | ||
) |
This function finds the rotation function value for all axes supplied in the ret parameter.
This function supplements the polyhedral symmetry prediction functions, as these functions predict the symmetry axes, but do not find their peak heights. This function, then, firstly finds all the individual folds in the symmetry axes set and for each fold computes the appropriate angles. Next. it computes the sphere mappings of the rotation function for all detected angles and for each symmetry axes, it finds the rotation function average as well as the average for the whole symmetry (i.e. over all axes). Finally, the function attempts to locally optimise the detected symmetry group by searching for slightly rotated axes having higher rotation function average.
[in] | ret | The list of axes for which the heights are to be found. |
[in] | dataObj | The structure object with computed rotation function in which the peaks are to be found. |
[in] | settings | ProSHADE_settings object containing all the settings for this run. |
Definition at line 3063 of file ProSHADE_symmetry.cpp.
proshade_double ProSHADE_internal_symmetry::findPredictedSingleAxisHeight | ( | proshade_double * | axis, |
proshade_double | fold, | ||
ProSHADE_internal_data::ProSHADE_data * | dataObj, | ||
ProSHADE_settings * | settings | ||
) |
This function finds the rotation function value for a single axis.
This function is a simplified version of the findPredictedAxesHeights, except this one searches for the density map peak height for a single supplied axis (with the format of the array being x = [0], y = [1] and z = [2] and the fold being supplied separately).
[in] | axis | A single axis for which the height is to be found. |
[in] | fold | The fold the axis should have. |
[in] | dataObj | The structure object with computed rotation function in which the peaks are to be found. |
[in] | settings | ProSHADE_settings object containing all the settings for this run. |
[out] | height | The height for this axis. |
Definition at line 3409 of file ProSHADE_symmetry.cpp.
std::vector< proshade_unsign > ProSHADE_internal_symmetry::findReliableUnphasedSymmetries | ( | std::vector< proshade_double * > * | allCs, |
std::vector< std::vector< proshade_double * > > * | allDs, | ||
proshade_signed | verbose, | ||
proshade_signed | messageShift, | ||
proshade_double | tolerance | ||
) |
This function checks the list of detected axes (presumably from phaseless symmetry detection) and returns the best dihedral (or cyclic, if no dihedral is found) point group, or empty vector if nothing is found.
This function starts by computing a stringent rotation function height threshold and proceeds to search for orthogonal pair of axes with at least this threshold RF value. If more than one pair is found, the pair with the highest sum of RF value and FSC value is chosen and returned, while if no pair is found, a single axis passing the threshold (and with the highest RF + FSC value sum) is returned. If no axis passes, empty vector is returned.
[in] | allCs | A list of all detected symmetries in the phase-less map. |
[in] | allDs | A list of all detected dohedral symmetries in the phase-less map. |
[in] | verbose | How loud the function should be in the standard output? |
[in] | messageShift | Are we in a subprocess, so that the log should be shifted for this function call? If so, by how much? |
[in] | tolerance | What is the tolerance on the perpendicularity of two axes in terms of the dot product? |
[out] | ret | A vector containing a) zero entries if no reliable symmetry axis was found, b) a single symmetry axis index if only a reliable cyclic symmetry axis was found or c) two axes indices in the case where two perpendicular reliable axes were detected. |
Definition at line 3735 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_signed | verbose, | ||
proshade_signed | messageShift, | ||
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] | messageShift | Are we in a subprocess, so that the log should be shifted for this function call? If so, by how much? |
[in] | minPeakHeight | The minimum average peak height for axis to be considered. |
Definition at line 998 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_signed | verbose, | ||
proshade_signed | messageShift, | ||
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] | verbose | How loud the announcments should be? |
[in] | messageShift | Are we in a subprocess, so that the log should be shifted for this function call? If so, by how much? |
[in] | minPeakHeight | The minimum average peak height for axis to be considered. |
Definition at line 461 of file ProSHADE_symmetry.cpp.
std::vector< proshade_double > ProSHADE_internal_symmetry::findTranslationBetweenRotatedAndOriginalMap | ( | ProSHADE_internal_data::ProSHADE_data * | symStr, |
std::vector< proshade_double > | symElem, | ||
fftw_complex * | origCoeffs, | ||
fftw_complex * | rotMapComplex, | ||
fftw_complex * | rotCoeffs, | ||
fftw_plan | planForwardFourierRot, | ||
fftw_complex * | trFuncCoeffs, | ||
fftw_complex * | trFunc, | ||
fftw_plan | planReverseFourierComb | ||
) |
This function takes a single rotation matrix and procceds to compute the optimal translation between the original map and a map rotated by the supplied rotation matrix.
[in] | symStr | A ProSHADE_data structure containing the structure for which the line on which the centre of rotation lies is to be found. |
[in] | symElems | Vector containing single symmetry element (rotaiton matrix) which is not identity. |
[in] | origCoeffs | The Fourier coefficients of the original (non-rotated) map. |
[in] | rotMapComplex | Array to which the rotated map will be saved and from which the Fourier transform plan (planForwardFourierRot) is prepared. |
[in] | rotCoeffs | Array to which the result of the Fourier transform of the rotated map will be saved into by the supplied plan (planForwardFourierRot). |
[in] | planForwardFourierRot | FFTW3 plan for forward Fourier transform from rotMapComplex to rotCoeffs. |
[in] | trFuncCoeffs | The array to which the combined Fourier coefficients for translation function will be saved into and also for which the inverse Fourier transform plan (planReverseFourierComb) is prepared for. |
[in] | trFunc | The array to which the translation function will be saved into by the reverse Fourier transform planned by the plan (planReverseFourierComb). |
[in] | planReverseFourierComb | FFTW3 plan for reverse Fourier transform from the combined coefficients (trFuncCoeffs) to the translation function array (trFunc). |
[out] | trsVec | A vector containing the optimal translation between the original and the rotated maps in Angstroms. |
Definition at line 3919 of file ProSHADE_symmetry.cpp.
bool ProSHADE_internal_symmetry::isSymmetrySame | ( | std::vector< proshade_double * > * | ret, |
proshade_double * | sym, | ||
proshade_double | simThres, | ||
proshade_signed * | matchedPos | ||
) |
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. |
[in] | matchedPos | Pointer to variable where the matched position (if any axis is matched) is saved, or -1 is written. |
[out] | X | Boolean value stating whether a similar entry has been found (true = it was, false = it was not). |
Definition at line 215 of file ProSHADE_symmetry.cpp.
bool ProSHADE_internal_symmetry::isSymmetrySame | ( | std::vector< proshade_double * > * | ret, |
proshade_double * | sym, | ||
proshade_double | simThres, | ||
proshade_signed * | matchedPos, | ||
proshade_double | fscVal | ||
) |
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. |
[in] | matchedPos | Pointer to variable where the matched position (if any axis is matched) is saved, or -1 is written. |
[in] | fscVal | Value to be used as FSC in case of a match. |
[out] | X | Boolean value stating whether a similar entry has been found (true = it was, false = it was not). |
Definition at line 266 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 679 of file ProSHADE_symmetry.cpp.
void ProSHADE_internal_symmetry::optimiseDGroupAngleFromAxesHeights | ( | std::vector< std::vector< proshade_double > > * | allCs, |
std::vector< proshade_unsign > | selection, | ||
ProSHADE_internal_data::ProSHADE_data * | dataObj, | ||
ProSHADE_settings * | settings | ||
) |
This function takes two axes with almost dihedral angle and optimises their relative positions as well as orientation with respect to the optimal angle and the rotation function.
This function is basically a wrapper to the overloaded function with the same name. It starts with converting the axes list and index vector to a single vactor containing the axes in the correct format and then it proceeds to call the overloaded version of this function to do the actual work. Once it completes, this function saves the results into the original input vector and terminates itself.
[in] | allCs | The list of axes for a subset of which the optimisation is to be done. |
[in] | selection | A vector of two indices (of the allCs vector) specifying which axes to optimise. |
[in] | dataObj | The structure object with computed rotation function in which the peaks are to be found. |
[in] | settings | ProSHADE_settings object containing all the settings for this run. |
Definition at line 3366 of file ProSHADE_symmetry.cpp.
void ProSHADE_internal_symmetry::optimiseDGroupAngleFromAxesHeights | ( | std::vector< std::vector< proshade_double > > * | ret, |
ProSHADE_internal_data::ProSHADE_data * | dataObj, | ||
ProSHADE_settings * | settings | ||
) |
This function takes two axes with almost dihedral angle and optimises their relative positions as well as orientation with respect to the optimal angle and the rotation function.
This function has two parts. Firstly, it makes the assumption that the two axes supplied are almost perpendicular, but that there may be an error. To correct for this, the function will find the vector perpendicular to the plane formed by the two supplied axes and then it will find a vector perpendicular to the plane between this new vector and the axis with higher rotation function value. The resulting new vector is perpendicular to the axis with higher rotation function value and replaces the axis vector with the lower rotation function values (after normalisation).
Secondly, this function supplies the two axes to the findPredictedAxesHeights() function, which does the maximisation of the rotation function values for both supplied axes at the same time. The resulting optimised axes are then returned in place of the inputted axes.
[in] | ret | The list of axes for which the optimisation is to be done. |
[in] | dataObj | The structure object with computed rotation function in which the peaks are to be found. |
[in] | settings | ProSHADE_settings object containing all the settings for this run. |
Definition at line 3269 of file ProSHADE_symmetry.cpp.
void ProSHADE_internal_symmetry::predictIcosAxes | ( | std::vector< proshade_double * > * | CSymList, |
std::vector< std::vector< proshade_double * > > * | ret, | ||
proshade_double | axErr, | ||
proshade_double | minPeakHeight | ||
) |
This function predicts all possible icosahedral point groups symmetry axes from the cyclic point groups list.
This function starts by finding the rotation matrix corresponding to the angle between the predicted C5 axis and the C5 axis found in the pre-computed Icosahedron model available in the ProSHADE_precomputedValues file. It then proceeds to use this rotation matrix to rotate the pre-computed model C3 axis to now be in the correct orientation to the detected C5 axis.
Next, the function computes the rotation matrix corresponding to rotation along the detected C5 axis about the angle between the rotated pre-computed model C3 axis and the detected C3 axis. Finally, when these two rotation matrices are combined, the resulting rotation matrix is the optimal match rotation between the pre-computed model and the detected axes positions. This final rotation matrix is then used to rotate the model axes and these rotated model axes are then the predicted axes in the structre.
Please note that the peak heights are set to 0.0 for all predicted axes, as they were not detected in the structure, but were only predicted.
[in] | CSymList | A vector containing the already detected Cyclic symmetries. |
[in] | ret | The vector containing all the axes forming icosahedral group or empty vector. |
[in] | axErr | The error tolerance on angle matching. |
[in] | minPeakHeight | The minimum average peak height for axis to be considered. |
Definition at line 2034 of file ProSHADE_symmetry.cpp.
void ProSHADE_internal_symmetry::predictOctaAxes | ( | std::vector< proshade_double * > * | CSymList, |
std::vector< std::vector< proshade_double * > > * | ret, | ||
proshade_double | axErr, | ||
proshade_double | minPeakHeight | ||
) |
This function predicts all octahedral point group symmetry axes from the cyclic point groups list.
This function starts by finding the rotation matrix corresponding to the angle between the predicted C4 axis and the C4 axis found in the pre-computed octahedron model available in the ProSHADE_precomputedValues file. It then proceeds to use this rotation matrix to rotate the pre-computed model C3 axis to now be in the correct orientation to the detected C4 axis.
Next, the function computes the rotation matrix corresponding to rotation along the detected C4 axis about the angle between the rotated pre-computed model C3 axis and the detected C3 axis. Finally, when these two rotation matrices are combined, the resulting rotation matrix is the optimal match rotation between the pre-computed model and the detected axes positions. This final rotation matrix is then used to rotate the model axes and these rotated model axes are then the predicted axes in the structre.
Please note that the peak heights are set to 0.0 for all predicted axes, as they were not detected in the structure, but were only predicted.
[in] | CSymList | A vector containing the already detected Cyclic symmetries. |
[in] | ret | The vector containing all the axes forming icosahedral group or empty vector. |
[in] | axErr | The error tolerance on angle matching. |
[in] | minPeakHeight | The minimum average peak height for axis to be considered. |
Definition at line 2214 of file ProSHADE_symmetry.cpp.
void ProSHADE_internal_symmetry::predictTetraAxes | ( | std::vector< proshade_double * > * | CSymList, |
std::vector< std::vector< proshade_double * > > * | ret, | ||
proshade_double | axErr, | ||
proshade_double | minPeakHeight | ||
) |
This function predicts all tetrahedral point group symmetry axes from the cyclic point groups list.
This function starts by finding the rotation matrix corresponding to the angle between the predicted C3 axis and the C3 axis found in the pre-computed tetrahedron model available in the ProSHADE_precomputedValues file. It then proceeds to use this rotation matrix to rotate the pre-computed model C2 axis to now be in the correct orientation to the detected C3 axis.
Next, the function computes the rotation matrix corresponding to rotation along the detected C3 axis about the angle between the rotated pre-computed model C2axis and the detected C2 axis. Finally, when these two rotation matrices are combined, the resulting rotation matrix is the optimal match rotation between the pre-computed model and the detected axes positions. This final rotation matrix is then used to rotate the model axes and these rotated model axes are then the predicted axes in the structre.
Please note that the peak heights are set to 0.0 for all predicted axes, as they were not detected in the structure, but were only predicted.
[in] | CSymList | A vector containing the already detected Cyclic symmetries. |
[in] | ret | The vector containing all the axes forming icosahedral group or empty vector. |
[in] | axErr | The error tolerance on angle matching. |
[in] | minPeakHeight | The minimum average peak height for axis to be considered. |
Definition at line 3609 of file ProSHADE_symmetry.cpp.
void ProSHADE_internal_symmetry::releaseCentreOfMapFourierTransforms | ( | fftw_complex * | origMap, |
fftw_complex * | origCoeffs, | ||
fftw_complex * | rotMapComplex, | ||
fftw_complex * | rotCoeffs, | ||
fftw_complex * | trFunc, | ||
fftw_complex * | trFuncCoeffs, | ||
fftw_plan | planForwardFourier, | ||
fftw_plan | planForwardFourierRot, | ||
fftw_plan | planReverseFourierComb | ||
) |
This function releases the allocated memory for the Fourier transforms used to find the centre of the map.
[in] | origMap | Array to which the original map will be saved before Fourier transform computation. |
[in] | origCoeffs | Array to which the result of the Fourier transform of the original map will be saved into. |
[in] | rotMapComplex | Array to which the rotated map will be saved before Fourier transform computation. |
[in] | rotCoeffs | Array to which the result of the Fourier transform of the rotated map will be saved into. |
[in] | trFunc | Array to which the results of inverse Fourier transform of the conbined coefficients will be saved. |
[in] | trFuncCoeffs | Array to which the two maps coefficients will be combined into before inverse Fourier transform computation. |
[in] | planForwardFourier | FFTW3 plan for the original map Fourier transform. |
[in] | planForwardFourierRot | FFTW3 plat for the rotated map Fourier transform. |
[in] | planReverseFourierComb | FFTW3 plan for the inverse Fourier transform from the combined coefficients to translation function. |
Definition at line 3881 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 821 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 890 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 658 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 1083 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 531 of file ProSHADE_symmetry.cpp.