ProSHADE  0.7.6.2 (DEC 2021)
Protein Shape Detection
ProSHADE_symmetry.hpp File Reference

This header file declares all the functions required for symmetry detection and construction. More...

Go to the source code of this file.

Namespaces

 ProSHADE_internal_symmetry
 This namespace contains the symmetry detection related code.
 

Functions

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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
bool ProSHADE_internal_symmetry::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 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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
void ProSHADE_internal_symmetry::predictOctaAxes (std::vector< proshade_double * > *CSymList, 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 ProSHADE_internal_symmetry::predictTetraAxes (std::vector< proshade_double * > *CSymList, 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 > ProSHADE_internal_symmetry::findReliableUnphasedSymmetries (std::vector< std::vector< proshade_double > > *allCs, 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 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. More...
 
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. More...
 
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. More...
 
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. More...
 

Detailed Description

This header file declares all the functions required for symmetry detection and construction.

This header file declares the ProSHADE_internal_symmetry namespace, which groups all the function required to detect symmetry axes and subsequently to detect symmetry type from the combination of all detected symmetry axes. Currently, this code can detect C, D, T, O and I symmetries with the C and D symmetries having their fold detected as well.

Copyright by Michal Tykac and individual contributors. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1) Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2) Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3) Neither the name of Michal Tykac nor the names of this code's contributors may be used to endorse or promote products derived from this software without specific prior written permission.

This software is provided by the copyright holder and contributors "as is" and any express or implied warranties, including, but not limitted to, the implied warranties of merchantibility and fitness for a particular purpose are disclaimed. In no event shall the copyright owner or the contributors be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limitted to, procurement of substitute goods or services, loss of use, data or profits, or business interuption) however caused and on any theory of liability, whether in contract, strict liability or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage.

Author
Michal Tykac
Garib N. Murshudov
Version
0.7.6.2
Date
DEC 2021

Definition in file ProSHADE_symmetry.hpp.