 |
ProSHADE
0.7.5.1 (JAN 2021)
Protein Shape Detection
|
This class contains all inputed and derived data for a single structure.
More...
#include <ProSHADE_data.hpp>
|
| ProSHADE_data (ProSHADE_settings *settings) |
| Constructor for getting empty ProSHADE_data class. More...
|
|
| ProSHADE_data (ProSHADE_settings *settings, std::string strName, double *mapVals, int len, proshade_single xDmSz, proshade_single yDmSz, proshade_single zDmSz, proshade_unsign xDmInd, proshade_unsign yDmInd, proshade_unsign zDmInd, proshade_signed xFr, proshade_signed yFr, proshade_signed zFr, proshade_signed xT, proshade_signed yT, proshade_signed zT, proshade_unsign inputO) |
| Constructor for creating ProSHADE_data structure with data. More...
|
|
| ~ProSHADE_data (void) |
| Destructor for the ProSHADE_data class. More...
|
|
void | readInStructure (std::string fName, proshade_unsign inputO, ProSHADE_settings *settings) |
| This function initialises the basic ProSHADE_data variables and reads in a single structure. More...
|
|
void | writeMap (std::string fName, std::string title="Created by ProSHADE and written by GEMMI", int mode=2) |
| Function for writing out the internal structure representation in MRC MAP format. More...
|
|
void | writePdb (std::string fName, proshade_double euA=0.0, proshade_double euB=0.0, proshade_double euG=0.0, proshade_double trsX=0.0, proshade_double trsY=0.0, proshade_double trsZ=0.0, bool firstModel=true) |
| This function writes out the PDB formatted file coresponding to the structure so that its COM is at specific position. More...
|
|
void | writeMask (std::string fName, proshade_double *mask) |
| Function for writing out a mask in MRC MAP format. More...
|
|
void | invertMirrorMap (ProSHADE_settings *settings) |
| Function for inverting the map to its mirror image. More...
|
|
void | normaliseMap (ProSHADE_settings *settings) |
| Function for normalising the map values to mean 0 and sd 1.. More...
|
|
void | maskMap (ProSHADE_settings *settings) |
| Function for computing the map mask using blurring and X IQRs from median. More...
|
|
void | getReBoxBoundaries (ProSHADE_settings *settings, proshade_signed *&ret) |
| This function finds the boundaries enclosing positive map values and adds some extra space. More...
|
|
void | createNewMapFromBounds (ProSHADE_settings *settings, ProSHADE_data *&newStr, proshade_signed *newBounds) |
| This function creates a new structure from the calling structure and new bounds values. More...
|
|
void | reSampleMap (ProSHADE_settings *settings) |
| This function changes the internal map sampling to conform to particular resolution value. More...
|
|
void | centreMapOnCOM (ProSHADE_settings *settings) |
| This function shits the map so that its COM is in the centre of the map. More...
|
|
void | addExtraSpace (ProSHADE_settings *settings) |
| This function increases the size of the map so that it can add empty space around it. More...
|
|
void | removePhaseInormation (ProSHADE_settings *settings) |
| This function removes phase from the map, effectively converting it to Patterson map. More...
|
|
void | processInternalMap (ProSHADE_settings *settings) |
| This function simply clusters several other functions which should be called together. More...
|
|
void | getSpherePositions (ProSHADE_settings *settings) |
| This function determines the sphere positions (radii) for sphere mapping. More...
|
|
void | mapToSpheres (ProSHADE_settings *settings) |
| This function converts the internal map onto a set of concentric spheres. More...
|
|
void | computeSphericalHarmonics (ProSHADE_settings *settings) |
| This function computes the spherical harmonics decomposition for the whole structure. More...
|
|
bool | shellBandExists (proshade_unsign shell, proshade_unsign bandVal) |
| This function checks if particular shell has a particular band. More...
|
|
void | computeRRPMatrices (ProSHADE_settings *settings) |
| This function pre-computes the RRP matrices for a data object. More...
|
|
void | allocateEMatrices (ProSHADE_settings *settings, proshade_unsign band) |
| This function allocates the required memory for the E matrices. More...
|
|
void | allocateSO3CoeffsSpace (proshade_unsign band) |
| This function allocates the memory for the SO(3) coefficients and the inverse for that calling object. More...
|
|
void | allocateWignerMatricesSpace (ProSHADE_settings *settings) |
| This function allocates the memory for the Wigner matrices for the calling object. More...
|
|
void | computeRotationFunction (ProSHADE_settings *settings) |
| This function computes the self-rotation function for this structure. More...
|
|
void | convertRotationFunction (ProSHADE_settings *settings) |
| This function converts the self-rotation function of this structure to angle-axis representation. More...
|
|
void | getRealEMatrixValuesForLM (proshade_signed band, proshade_signed order1, double *eMatsLMReal, int len) |
| This function fills the input array with the real E matrix values for particular band and order1 (l as opposed to l'). More...
|
|
void | getImagEMatrixValuesForLM (proshade_signed band, proshade_signed order1, double *eMatsLMImag, int len) |
| This function fills the input array with the imaginary E matrix values for particular band and order1 (l as opposed to l'). More...
|
|
void | getRealSO3Coeffs (double *so3CoefsReal, int len) |
| This function fills the input array with the real SO(3) coefficient values. More...
|
|
void | getImagSO3Coeffs (double *so3CoefsImag, int len) |
| This function fills the input array with the imaginary SO(3) coefficient values. More...
|
|
void | getRealRotFunction (double *rotFunReal, int len) |
| This function fills the input array with the real rotation function values. More...
|
|
void | getImagRotFunction (double *rotFunImag, int len) |
| This function fills the input array with the imaginary rotation function values. More...
|
|
void | getRealTranslationFunction (double *trsFunReal, int len) |
| This function fills the input array with the real translation function values. More...
|
|
void | getImagTranslationFunction (double *trsFunImag, int len) |
| This function fills the input array with the imaginary translation function values. More...
|
|
void | getRotMatrixFromRotFunInds (proshade_signed aI, proshade_signed bI, proshade_signed gI, double *rotMat, int len) |
| This function takes rotation function indices, converts them to Euler angles and these to rotation matrix, which it then returns. More...
|
|
int | so3CoeffsArrayIndex (proshade_signed order1, proshade_signed order2, proshade_signed band) |
| This function gets the SO(3) coefficients array index for a particular so(3) band, order1 and order2 position. More...
|
|
std::vector< proshade_double * > | getCyclicSymmetriesList (ProSHADE_settings *settings) |
| This function obtains a list of all C symmetries from already computed self-rotation map. More...
|
|
std::vector< proshade_double * > | getDihedralSymmetriesList (ProSHADE_settings *settings, std::vector< proshade_double * > *CSymList) |
| This function obtains a list of all D symmetries from already computed C symmetries list. More...
|
|
std::vector< proshade_double * > | getTetrahedralSymmetriesList (ProSHADE_settings *settings, std::vector< proshade_double * > *CSymList) |
| This function obtains a list of all T symmetry axes from the already computed C symmetries list. More...
|
|
std::vector< proshade_double * > | getOctahedralSymmetriesList (ProSHADE_settings *settings, std::vector< proshade_double * > *CSymList) |
| This function obtains a list of all O symmetry axes from the already computed C symmetries list. More...
|
|
std::vector< proshade_double * > | getIcosahedralSymmetriesList (ProSHADE_settings *settings, std::vector< proshade_double * > *CSymList) |
| This function obtains a list of all I symmetry axes from the already computed C symmetries list. More...
|
|
std::vector< proshade_double * > | getPredictedIcosahedralSymmetriesList (ProSHADE_settings *settings, std::vector< proshade_double * > *CSymList, proshade_double matrixTolerance) |
| This function predicts a list of all I symmetry axes from the already computed C symmetries list. More...
|
|
std::vector< proshade_double * > | getPredictedOctahedralSymmetriesList (ProSHADE_settings *settings, std::vector< proshade_double * > *CSymList, proshade_double matrixTolerance) |
| This function predicts a list of all O symmetry axes from the already computed C symmetries list. More...
|
|
void | detectSymmetryInStructure (ProSHADE_settings *settings, std::vector< proshade_double * > *axes, std::vector< std::vector< proshade_double > > *allCs) |
| This function runs the symmetry detection algorithms on this structure and saves the results in the settings object. More...
|
|
void | detectSymmetryInStructurePython (ProSHADE_settings *settings) |
| This function runs the symmetry detection algorithms on this structure saving the axes in the settings object only. More...
|
|
void | detectSymmetryFromAngleAxisSpace (ProSHADE_settings *settings, std::vector< proshade_double * > *axes, std::vector< std::vector< proshade_double > > *allCs) |
| This function runs the symmetry detection algorithms on this structure using the angle-axis space and saving the results in the settings object. More...
|
|
std::vector< proshade_double * > | getCyclicSymmetriesListFromAngleAxis (ProSHADE_settings *settings) |
| This function obtains a list of all C symmetries from the angle-axis space mapped rotation function values. More...
|
|
std::vector< proshade_double * > | findRequestedCSymmetryFromAngleAxis (ProSHADE_settings *settings, proshade_unsign fold, proshade_double *peakThres) |
| This function searches the angle-axis representation of the rotation function for a cyclic point group with given fold. More...
|
|
std::vector< proshade_double * > | optimiseDihedralAngleFromAngleAxis (ProSHADE_settings *settings, proshade_double angle, proshade_double *axis1, proshade_double *axis2) |
| ... More...
|
|
void | saveDetectedSymmetries (ProSHADE_settings *settings, std::vector< proshade_double * > *CSyms, std::vector< std::vector< proshade_double > > *allCs) |
| This function takes the results of point group searches and saves then into the output variables. More...
|
|
std::string | getRecommendedSymmetryType (ProSHADE_settings *settings) |
| This function simply returns the detected recommended symmetry type. More...
|
|
proshade_unsign | getRecommendedSymmetryFold (ProSHADE_settings *settings) |
| This function simply returns the detected recommended symmetry fold. More...
|
|
proshade_unsign | getNoRecommendedSymmetryAxes (ProSHADE_settings *settings) |
| This function returns the number of detected recommended symmetry axes. More...
|
|
std::vector< std::string > | getSymmetryAxis (ProSHADE_settings *settings, proshade_unsign axisNo) |
| This function returns a single symmetry axis as a vector of strings from the recommended symmetry axes list. More...
|
|
proshade_double | findBestCScore (std::vector< proshade_double * > *CSym, proshade_unsign *symInd) |
| This function locates the best scoring C symmetry axis, returning the score and best symmetry index. More...
|
|
proshade_double | findBestDScore (std::vector< proshade_double * > *DSym, proshade_unsign *symInd) |
| This function locates the best scoring D symmetry axis, returning the score and best symmetry index. More...
|
|
proshade_double | findTScore (std::vector< proshade_double * > *TSym) |
| This function takes the list of tetrahedral axes and returns a score for deciding whether T symmetry should be recommended. More...
|
|
proshade_double | findOScore (std::vector< proshade_double * > *OSym) |
| This function takes the list of octahedral axes and returns a score for deciding whether O symmetry should be recommended. More...
|
|
proshade_double | findIScore (std::vector< proshade_double * > *ISym) |
| This function takes the list of icosahedral axes and returns a score for deciding whether I symmetry should be recommended. More...
|
|
void | saveRecommendedSymmetry (ProSHADE_settings *settings, std::vector< proshade_double * > *CSym, std::vector< proshade_double * > *DSym, std::vector< proshade_double * > *TSym, std::vector< proshade_double * > *OSym, std::vector< proshade_double * > *ISym, std::vector< proshade_double * > *axes) |
| This function takes all the detected symmetry results and decides on which are to be recommended for this structure. More...
|
|
void | saveRequestedSymmetryC (ProSHADE_settings *settings, std::vector< proshade_double * > *CSym, std::vector< proshade_double * > *axes) |
| This function takes the C symmetries and searched for the requested symmetry. More...
|
|
void | saveRequestedSymmetryD (ProSHADE_settings *settings, std::vector< proshade_double * > *DSym, std::vector< proshade_double * > *axes) |
| This function takes the D symmetries and searched for the requested symmetry. More...
|
|
std::vector< std::vector< proshade_double > > | computeGroupElementsForGroup (std::vector< std::vector< proshade_double > > *allCSyms, proshade_unsign grPosition) |
| This function computes the group elements as rotation matrices (except for the identity element) for any detected cyclic point group. More...
|
|
std::vector< std::vector< proshade_double > > | computeGroupElementsForGroup (std::vector< proshade_double * > *allCSyms, proshade_unsign grPosition) |
| This function computes the group elements as rotation matrices (except for the identity element) for any detected cyclic point group. More...
|
|
std::vector< std::vector< proshade_double > > | getAllGroupElements (ProSHADE_settings *settings, std::vector< proshade_unsign > axesList, std::string groupType="", proshade_double matrixTolerance=0.05) |
| This function returns the group elements as rotation matrices of any defined point group. More...
|
|
void | reportSymmetryResults (ProSHADE_settings *settings) |
| This function takes prints the report for symmetry detection. More...
|
|
void | getOverlayRotationFunction (ProSHADE_settings *settings, ProSHADE_internal_data::ProSHADE_data *obj2) |
| This function computes the overlay rotation function (i.e. the correlation function in SO(3) space). More...
|
|
std::vector< proshade_double > | getBestRotationMapPeaksEulerAngles (ProSHADE_settings *settings) |
| This function returns a vector of three floats, the three Euler angles of the best peak in the rotation map. More...
|
|
std::vector< proshade_double > | getBestTranslationMapPeaksAngstrom (ProSHADE_internal_data::ProSHADE_data *staticStructure, proshade_double eulA, proshade_double eulB, proshade_double eulG) |
| This function gets the optimal translation vector and returns it as a standard library vector. It also applies the translation to the internal map. More...
|
|
void | zeroPaddToDims (proshade_unsign xDim, proshade_unsign yDim, proshade_unsign zDim) |
| This function changes the size of a structure to fit the supplied new limits. More...
|
|
void | rotateMap (ProSHADE_settings *settings, proshade_double eulerAlpha, proshade_double eulerBeta, proshade_double eulerGamma) |
| This function rotates a map based on the given Euler angles. More...
|
|
void | translateMap (ProSHADE_settings *settings, proshade_double trsX, proshade_double trsY, proshade_double trsZ) |
| This function simply translates the map by a given number of Angstroms along the three axes. More...
|
|
void | allocateRotatedSHMemory (ProSHADE_settings *settings) |
| This function allocates the memory required for storing the rotated Spherical Harmonics coefficients. More...
|
|
void | computeRotatedSH (ProSHADE_settings *settings) |
| This function multiplies the objects spherical harmonics with the Wigner D matrices, obtaining rotated spherical harmonics coefficients. More...
|
|
void | invertSHCoefficients (void) |
| This function computes the shell mapped data from inverting the Spherical Harmonics coefficients. More...
|
|
void | interpolateMapFromSpheres (ProSHADE_settings *settings, proshade_double *&densityMapRotated) |
| This function interpolates the density map from the sphere mapped data. More...
|
|
void | computeTranslationMap (ProSHADE_internal_data::ProSHADE_data *obj1) |
| This function does the computation of the translation map and saves results internally. More...
|
|
void | findMapCOM (void) |
| This function finds the centre of mass of the internal map representation. More...
|
|
void | computePdbRotationCentre (void) |
| This function computes the optimal rotation centre for co-ordinates. More...
|
|
void | computeOptimalTranslation (proshade_double eulA, proshade_double eulB, proshade_double eulG, proshade_double trsX, proshade_double trsY, proshade_double trsZ) |
| This function computes and saves the optimal translation vector from the already determined translation function results. More...
|
|
void | writeOutOverlayFiles (ProSHADE_settings *settings, proshade_double eulA, proshade_double eulB, proshade_double eulG, std::vector< proshade_double > *rotCentre, std::vector< proshade_double > *ultimateTranslation) |
| This function writes out the rotated map, co-ordinates and transformation JSON file. More...
|
|
void | reportOverlayResults (ProSHADE_settings *settings, std::vector< proshade_double > *rotationCentre, std::vector< proshade_double > *eulerAngles, std::vector< proshade_double > *finalTranslation) |
| This function reports the results of the overlay mode. More...
|
|
void | deepCopyMap (proshade_double *&saveTo, proshade_unsign verbose) |
| This function copies the internal map into the supplied pointer, which it also allocates. More...
|
|
proshade_double | getMapValue (proshade_unsign pos) |
| This function returns the internal map representation value of a particular array position. More...
|
|
proshade_unsign | getMaxSpheres (void) |
| This function returns the number of spheres which contain the whole object. More...
|
|
proshade_unsign | getMaxBand (void) |
| This function returns the maximum band value for the object. More...
|
|
proshade_double * | getRealSphHarmValue (proshade_unsign band, proshade_unsign order, proshade_unsign shell) |
| This function allows access to the private internal real spherical harmonics values. More...
|
|
proshade_double * | getImagSphHarmValue (proshade_unsign band, proshade_unsign order, proshade_unsign shell) |
| This function allows access to the private internal imaginary spherical harmonics values. More...
|
|
proshade_double | getRRPValue (proshade_unsign band, proshade_unsign sh1, proshade_unsign sh2) |
| This function allows access to the priva internal RRP matrices. More...
|
|
proshade_double | getAnySphereRadius (proshade_unsign shell) |
| This function allows access to the radius of any particular sphere. More...
|
|
proshade_double | getIntegrationWeight (void) |
| This function allows access to the integration weight for the object. More...
|
|
proshade_unsign | getShellBandwidth (proshade_unsign shell) |
| This function allows access to the bandwidth of a particular shell. More...
|
|
proshade_double | getSpherePosValue (proshade_unsign shell) |
| This function allows access to sphere positions. More...
|
|
proshade_complex ** | getEMatrixByBand (proshade_unsign band) |
| This function allows access to E matrix for a particular band. More...
|
|
void | getEMatrixValue (proshade_unsign band, proshade_unsign order1, proshade_unsign order2, proshade_double *valueReal, proshade_double *valueImag) |
| This function allows access to E matrix by knowing the band, order1 and order2 indices. More...
|
|
proshade_complex * | getInvSO3Coeffs (void) |
| This function allows access to the inverse SO(3) coefficients array. More...
|
|
proshade_complex * | getSO3Coeffs (void) |
| This function allows access to the SO(3) coefficients array. More...
|
|
proshade_unsign | getComparisonBand (void) |
| This function allows access to the maximum band for the comparison. More...
|
|
void | getWignerMatrixValue (proshade_unsign band, proshade_unsign order1, proshade_unsign order2, proshade_double *valueReal, proshade_double *valueImag) |
| This function allows access to the Wigner D matrix by knowing the band, order1 and order2 indices. More...
|
|
proshade_single | getXDimSize (void) |
| This function allows access to the map size in angstroms along the X axis. More...
|
|
proshade_single | getYDimSize (void) |
| This function allows access to the map size in angstroms along the Y axis. More...
|
|
proshade_single | getZDimSize (void) |
| This function allows access to the map size in angstroms along the Z axis. More...
|
|
proshade_unsign | getXDim (void) |
| This function allows access to the map size in indices along the X axis. More...
|
|
proshade_unsign | getYDim (void) |
| This function allows access to the map size in indices along the Y axis. More...
|
|
proshade_unsign | getZDim (void) |
| This function allows access to the map size in indices along the Z axis. More...
|
|
proshade_signed * | getXFromPtr (void) |
| This function allows access to the map start along the X axis. More...
|
|
proshade_signed * | getYFromPtr (void) |
| This function allows access to the map start along the Y axis. More...
|
|
proshade_signed * | getZFromPtr (void) |
| This function allows access to the map start along the Z axis. More...
|
|
proshade_signed * | getXToPtr (void) |
| This function allows access to the map last position along the X axis. More...
|
|
proshade_signed * | getYToPtr (void) |
| This function allows access to the map last position along the Y axis. More...
|
|
proshade_signed * | getZToPtr (void) |
| This function allows access to the map last position along the Z axis. More...
|
|
proshade_signed * | getXAxisOrigin (void) |
| This function allows access to the map X axis origin value. More...
|
|
proshade_signed * | getYAxisOrigin (void) |
| This function allows access to the map Y axis origin value. More...
|
|
proshade_signed * | getZAxisOrigin (void) |
| This function allows access to the map Z axis origin value. More...
|
|
proshade_double *& | getInternalMap (void) |
| This function allows access to the first map array value address. More...
|
|
proshade_complex * | getTranslationFnPointer (void) |
| This function allows access to the translation function through a pointer. More...
|
|
void | setIntegrationWeight (proshade_double intW) |
| This function allows setting the integration weight for the object. More...
|
|
void | setIntegrationWeightCumul (proshade_double intW) |
| This function allows setting the cumulative integration weight for the object. More...
|
|
void | setEMatrixValue (proshade_unsign band, proshade_unsign order1, proshade_unsign order2, proshade_complex val) |
| This function allows setting the E matrix value. More...
|
|
void | normaliseEMatrixValue (proshade_unsign band, proshade_unsign order1, proshade_unsign order2, proshade_double normF) |
| This function allows normalising the E matrix value. More...
|
|
void | setSO3CoeffValue (proshade_unsign position, proshade_complex val) |
| This function allows setting the SOFT coefficient values using array position and value. More...
|
|
void | setWignerMatrixValue (proshade_complex val, proshade_unsign band, proshade_unsign order1, proshade_unsign order2) |
| This function allows setting the Wigner D matrix value by its band, order1 and order2 co-ordinate. More...
|
|
|
std::string | fileName |
| This is the original file from which the data were obtained.
|
|
ProSHADE_internal_io::InputType | fileType |
| This is the type of the input file.
|
|
proshade_double * | internalMap |
| The internal map data representation, which may be amended as the run progresses.
|
|
proshade_single | xDimSize |
| This is the size of the map cell x dimension in Angstroms.
|
|
proshade_single | yDimSize |
| This is the size of the map cell y dimension in Angstroms.
|
|
proshade_single | zDimSize |
| This is the size of the map cell z dimension in Angstroms.
|
|
proshade_single | aAngle |
| This is the angle a of the map cell in degrees.
|
|
proshade_single | bAngle |
| This is the angle b of the map cell in degrees.
|
|
proshade_single | cAngle |
| This is the angle c of the map cell in degrees.
|
|
proshade_unsign | xDimIndices |
| This is the size of the map cell x dimension in indices.
|
|
proshade_unsign | yDimIndices |
| This is the size of the map cell y dimension in indices.
|
|
proshade_unsign | zDimIndices |
| This is the size of the map cell z dimension in indices.
|
|
proshade_unsign | xGridIndices |
| As far as I know, this is identical to the xDimIndices.
|
|
proshade_unsign | yGridIndices |
| As far as I know, this is identical to the yDimIndices.
|
|
proshade_unsign | zGridIndices |
| As far as I know, this is identical to the zDimIndices.
|
|
proshade_unsign | xAxisOrder |
| This is the order of the x axis.
|
|
proshade_unsign | yAxisOrder |
| This is the order of the y axis.
|
|
proshade_unsign | zAxisOrder |
| This is the order of the z axis.
|
|
proshade_signed | xAxisOrigin |
| This is the origin position along the x axis.
|
|
proshade_signed | yAxisOrigin |
| This is the origin position along the y axis.
|
|
proshade_signed | zAxisOrigin |
| This is the origin position along the z axis.
|
|
proshade_double | xCom |
| The COM of the map after processing along the X-axis.
|
|
proshade_double | yCom |
| The COM of the map after processing along the Y-axis.
|
|
proshade_double | zCom |
| The COM of the map after processing along the Z-axis.
|
|
proshade_single | xDimSizeOriginal |
| This is the size of the map cell x dimension in Angstroms.
|
|
proshade_single | yDimSizeOriginal |
| This is the size of the map cell y dimension in Angstroms.
|
|
proshade_single | zDimSizeOriginal |
| This is the size of the map cell z dimension in Angstroms.
|
|
proshade_unsign | xDimIndicesOriginal |
| This is the size of the map cell x dimension in indices.
|
|
proshade_unsign | yDimIndicesOriginal |
| This is the size of the map cell y dimension in indices.
|
|
proshade_unsign | zDimIndicesOriginal |
| This is the size of the map cell z dimension in indices.
|
|
proshade_signed | xAxisOriginOriginal |
| This is the origin position along the x axis.
|
|
proshade_signed | yAxisOriginOriginal |
| This is the origin position along the y axis.
|
|
proshade_signed | zAxisOriginOriginal |
| This is the origin position along the z axis.
|
|
proshade_double | originalMapXCom |
| The COM of the first map to be loaded/computed without any furhter changes being reflacted along the X axis.
|
|
proshade_double | originalMapYCom |
| The COM of the first map to be loaded/computed without any furhter changes being reflacted along the Y axis.
|
|
proshade_double | originalMapZCom |
| The COM of the first map to be loaded/computed without any furhter changes being reflacted along the Z axis.
|
|
proshade_double | mapMovFromsChangeX |
| When the map is translated, the xFrom and xTo values are changed. This variable holds how much they have changed.
|
|
proshade_double | mapMovFromsChangeY |
| When the map is translated, the yFrom and yTo values are changed. This variable holds how much they have changed.
|
|
proshade_double | mapMovFromsChangeZ |
| When the map is translated, the zFrom and zTo values are changed. This variable holds how much they have changed.
|
|
proshade_double | mapCOMProcessChangeX |
| The change in X axis between the creation of the structure (originalMapXCom) and just before rotation.
|
|
proshade_double | mapCOMProcessChangeY |
| The change in Y axis between the creation of the structure (originalMapYCom) and just before rotation.
|
|
proshade_double | mapCOMProcessChangeZ |
| The change in Z axis between the creation of the structure (originalMapZCom) and just before rotation.
|
|
proshade_double | originalPdbRotCenX |
| The centre of rotation as it relates to the original PDB positions (and not the ProSHADE internal map) along the x-axis.
|
|
proshade_double | originalPdbRotCenY |
| The centre of rotation as it relates to the original PDB positions (and not the ProSHADE internal map) along the y-axis.
|
|
proshade_double | originalPdbRotCenZ |
| The centre of rotation as it relates to the original PDB positions (and not the ProSHADE internal map) along the z-axis.
|
|
proshade_double | originalPdbTransX |
| The optimal translation vector as it relates to the original PDB positions (and not the ProSHADE internal map) along the x-axis.
|
|
proshade_double | originalPdbTransY |
| The optimal translation vector as it relates to the original PDB positions (and not the ProSHADE internal map) along the y-axis.
|
|
proshade_double | originalPdbTransZ |
| The optimal translation vector as it relates to the original PDB positions (and not the ProSHADE internal map) along the z-axis.
|
|
proshade_signed | xFrom |
| This is the starting index along the x axis.
|
|
proshade_signed | yFrom |
| This is the starting index along the y axis.
|
|
proshade_signed | zFrom |
| This is the starting index along the z axis.
|
|
proshade_signed | xTo |
| This is the final index along the x axis.
|
|
proshade_signed | yTo |
| This is the final index along the y axis.
|
|
proshade_signed | zTo |
| This is the final index along the z axis.
|
|
std::vector< proshade_single > | spherePos |
| Vector of sphere radii from the centre of the map.
|
|
proshade_unsign | noSpheres |
| The number of spheres with map projected onto them.
|
|
ProSHADE_internal_spheres::ProSHADE_sphere ** | spheres |
| The set of concentric spheres to which the intermal density map has been projected.
|
|
proshade_complex ** | sphericalHarmonics |
| A set of spherical harmonics values arrays for each sphere.
|
|
proshade_complex ** | rotSphericalHarmonics |
| A set of rotated spherical harmonics values arrays for each sphere, used only if map rotation is required.
|
|
proshade_unsign | maxShellBand |
| The maximum band for any shell of the object.
|
|
proshade_double *** | rrpMatrices |
| The energy levels descriptor shell correlation tables.
|
|
proshade_complex *** | eMatrices |
| The trace sigma and full rotation function c*conj(c) integral tables.
|
|
proshade_double | integrationWeight |
| The Pearson's c.c. type weighting for the integration.
|
|
proshade_complex * | so3Coeffs |
| The coefficients obtained by SO(3) Fourier Transform (SOFT), in this case derived from the E matrices.
|
|
proshade_complex * | so3CoeffsInverse |
| The inverse coefficients obtained by inverse SO(3) Fourier Transform (SOFT) - i.e. rotation function.
|
|
proshade_complex *** | wignerMatrices |
| These matrices are computed for a particular rotation to be done in spherical harmonics.
|
|
proshade_unsign | maxCompBand |
| The largest comparison band - this variable tells how large arrays will be allocated for the comparison.
|
|
proshade_complex * | translationMap |
| This is where the translation map will be held, if at all used.
|
|
std::vector< ProSHADE_internal_spheres::ProSHADE_rotFun_sphere * > | sphereMappedRotFun |
|
bool | isEmpty |
| This variable stated whether the class contains any information.
|
|
proshade_unsign | inputOrder |
| This value is the input order - it is useful to know for writing out files, so that they would not overwrite the same name multiple times.
|
|
This class contains all inputed and derived data for a single structure.
This class codes the object that contains all the information about the input data and the derived information as well. It does not, however, provide the computation code as that lives elsewhere, except for the forward declarations.
Definition at line 48 of file ProSHADE_data.hpp.
◆ ProSHADE_data() [1/2]
Constructor for getting empty ProSHADE_data class.
This constructor creates an empty data structure which can later be filled with data and used to process these data further.
- Parameters
-
[in] | settings | ProSHADE_settings object specifying what should be done. |
[out] | X | Empty data object with deault values. |
Definition at line 39 of file ProSHADE_data.cpp.
44 this->
fileType = ProSHADE_internal_io::UNKNOWN;
109 this->
spherePos = std::vector<proshade_single> ( );
◆ ProSHADE_data() [2/2]
ProSHADE_internal_data::ProSHADE_data::ProSHADE_data |
( |
ProSHADE_settings * |
settings, |
|
|
std::string |
strName, |
|
|
double * |
mapVals, |
|
|
int |
len, |
|
|
proshade_single |
xDmSz, |
|
|
proshade_single |
yDmSz, |
|
|
proshade_single |
zDmSz, |
|
|
proshade_unsign |
xDmInd, |
|
|
proshade_unsign |
yDmInd, |
|
|
proshade_unsign |
zDmInd, |
|
|
proshade_signed |
xFr, |
|
|
proshade_signed |
yFr, |
|
|
proshade_signed |
zFr, |
|
|
proshade_signed |
xT, |
|
|
proshade_signed |
yT, |
|
|
proshade_signed |
zT, |
|
|
proshade_unsign |
inputO |
|
) |
| |
Constructor for creating ProSHADE_data structure with data.
This constructor creates a data structure with all the map information, so that maps obtained from other software could be loeaded and used. This function makes a lot of assumptions (all angles are 90 degrees, axis grids are equal to indices, axis order is XYZ and axis origin is the first index in all dimensions). If any of these are not true, the user is required to change the appropriate internal values after this function has returned the object.
- Parameters
-
[in] | settings | ProSHADE_settings object specifying what should be done. |
[in] | strName | The name of the structure for reference. |
[in] | mapVals | A pointer to array where all the map data are. |
[in] | len | The length of this map values array. |
[in] | xDmSz | The size of the x-axis dimension in Angstroms. |
[in] | yDmSz | The size of the y-axis dimension in Angstroms. |
[in] | zDmSz | The size of the z-axis dimension in Angstroms. |
[in] | xDmInd | The size of the x-axis dimension in indices. |
[in] | yDmInd | The size of the y-axis dimension in indices. |
[in] | zDmInd | The size of the z-axis dimension in indices. |
[in] | xFr | The first index statting position along the x-axis. |
[in] | yFr | The first index statting position along the y-axis. |
[in] | zFr | The first index statting position along the z-axis. |
[in] | xT | The last index end position along the x-axis. |
[in] | yT | The last index end position along the y-axis. |
[in] | zT | The last index end position along the z-axis. |
[in] | inputO | The input order for this structure. |
[out] | X | Empty data object with filled in values and map. |
Definition at line 160 of file ProSHADE_data.cpp.
165 this->
fileType = ProSHADE_internal_io::MAP;
230 this->
spherePos = std::vector<proshade_single> ( );
252 if (
static_cast<proshade_unsign
> ( len ) != ( xDmInd * yDmInd * zDmInd ) )
254 throw ProSHADE_exception (
"Structure class input map has wrong dimensions.",
"EP00044", __FILE__, __LINE__, __func__,
"The supplied map array size has different dimensions to\n : the required map dimensions." );
257 if ( (
static_cast<proshade_signed
> ( xT - xFr ) !=
static_cast<proshade_signed
> ( xDmInd - 1 ) ) ||
258 (
static_cast<proshade_signed
> ( yT - yFr ) !=
static_cast<proshade_signed
> ( yDmInd - 1 ) ) ||
259 (
static_cast<proshade_signed
> ( zT - zFr ) !=
static_cast<proshade_signed
> ( zDmInd - 1 ) ) )
261 throw ProSHADE_exception (
"Structure class input dimensions not in line with map\n : to/from indices.",
"EP00045", __FILE__, __LINE__, __func__,
"The supplied map information does not add up. The\n : dimensions are not in line with the indexing start/stop\n : position distances and therefore proper map indexing\n : cannot be done. Please check the input values." );
269 proshade_unsign arrPos = 0;
270 for ( proshade_unsign xIt = 0; xIt < this->
xDimIndices; xIt++ )
272 for ( proshade_unsign yIt = 0; yIt < this->
yDimIndices; yIt++ )
274 for ( proshade_unsign zIt = 0; zIt < this->
zDimIndices; zIt++ )
276 arrPos = zIt + this->zDimIndices * ( yIt + this->yDimIndices * xIt );
277 this->
internalMap[arrPos] =
static_cast<proshade_double
> ( mapVals[arrPos] );
◆ ~ProSHADE_data()
ProSHADE_internal_data::ProSHADE_data::~ProSHADE_data |
( |
void |
| ) |
|
Destructor for the ProSHADE_data class.
This destructor is responsible for releasing all memory used by the data storing object
- Parameters
-
Definition at line 295 of file ProSHADE_data.cpp.
306 for ( proshade_unsign iter = 0; iter < this->
noSpheres; iter++ )
308 if ( this->
spheres[iter] != NULL )
320 for ( proshade_unsign iter = 0; iter < this->
noSpheres; iter++ )
334 for ( proshade_unsign iter = 0; iter < this->
noSpheres; iter++ )
348 for ( proshade_unsign bwIt = 0; bwIt < this->
maxShellBand; bwIt++ )
352 for ( proshade_unsign shIt = 0; shIt < this->
noSpheres; shIt++ )
370 for ( proshade_unsign bandIter = 0; bandIter < this->
maxCompBand; bandIter++ )
374 for ( proshade_unsign band2Iter = 0; band2Iter < static_cast<proshade_unsign> ( ( bandIter * 2 ) + 1 ); band2Iter++ )
376 if ( this->
eMatrices[bandIter][band2Iter] != NULL )
378 delete[] this->
eMatrices[bandIter][band2Iter];
402 for ( proshade_unsign bandIter = 1; bandIter < this->
maxCompBand; bandIter++ )
406 for ( proshade_unsign order1Iter = 0; order1Iter < ( (bandIter * 2) + 1 ); order1Iter++ )
426 if ( this->sphereMappedRotFun.size() > 0 )
428 for ( proshade_unsign spIt = 0; spIt < static_cast<proshade_unsign> ( this->sphereMappedRotFun.size() ); spIt++ )
430 delete this->sphereMappedRotFun.at(spIt);
◆ addExtraSpace()
void ProSHADE_internal_data::ProSHADE_data::addExtraSpace |
( |
ProSHADE_settings * |
settings | ) |
|
This function increases the size of the map so that it can add empty space around it.
This function adds a given number of angstroms (as given in the settings object) to the internal structure map. This requires all the internal variables to be adjusted for the extra space at the begginning and at the end, while also copying the map into a larger one with appropriate extra space.
- Parameters
-
[in] | settings | A pointer to settings class containing all the information required for map manipulation. |
Definition at line 1289 of file ProSHADE_data.cpp.
1292 std::stringstream hlpSS;
1293 hlpSS <<
"Adding extra " << settings->
addExtraSpace <<
" angstroms.";
1302 this->
xDimSize +=
static_cast<proshade_single
> ( 2 * xAddIndices ) *
static_cast<proshade_single
> ( this->
xDimSize / this->
xDimIndices );
1303 this->
yDimSize +=
static_cast<proshade_single
> ( 2 * yAddIndices ) *
static_cast<proshade_single
> ( this->
yDimSize / this->
yDimIndices );
1304 this->
zDimSize +=
static_cast<proshade_single
> ( 2 * zAddIndices ) *
static_cast<proshade_single
> ( this->
zDimSize / this->
zDimIndices );
1318 this->
xFrom -= xAddIndices;
1319 this->
yFrom -= yAddIndices;
1320 this->
zFrom -= zAddIndices;
1322 this->
xTo += xAddIndices;
1323 this->
yTo += yAddIndices;
1324 this->
zTo += zAddIndices;
1337 proshade_unsign newMapIndex, oldMapIndex;
1338 for ( proshade_unsign xIt = 0; xIt < (this->
xDimIndices - xAddIndices); xIt++ )
1341 if ( xIt < xAddIndices ) {
continue; }
1343 for ( proshade_unsign yIt = 0; yIt < (this->
yDimIndices - yAddIndices); yIt++ )
1346 if ( yIt < yAddIndices ) {
continue; }
1348 for ( proshade_unsign zIt = 0; zIt < (this->
zDimIndices - zAddIndices); zIt++ )
1351 if ( zIt < zAddIndices ) {
continue; }
1355 oldMapIndex = (zIt - zAddIndices) + (this->
zDimIndices - ( 2 * zAddIndices ) ) * ( (yIt - yAddIndices) + (this->
yDimIndices - ( 2 * yAddIndices ) ) * (xIt - xAddIndices) );
1357 newMap[newMapIndex] = this->
internalMap[oldMapIndex];
◆ allocateEMatrices()
void ProSHADE_internal_data::ProSHADE_data::allocateEMatrices |
( |
ProSHADE_settings * |
settings, |
|
|
proshade_unsign |
band |
|
) |
| |
This function allocates the required memory for the E matrices.
This function belongs to the ProSHADE_data class and its role is to allocate the require memory for the E matrices required by both, the Trace Sigma and Full Rotational descriptors, as well as symmetry and rotation tasks.
- Parameters
-
[in] | settings | A pointer to settings class containing all the information required for the task. |
[in] | band | The minimal band of the comparison for which E matrices are computed. |
Definition at line 280 of file ProSHADE_distances.cpp.
289 for ( proshade_unsign bandIter = 0; bandIter < this->
maxCompBand; bandIter++ )
292 this->
eMatrices[bandIter] =
new proshade_complex* [
static_cast<proshade_unsign
> ( ( bandIter * 2 ) + 1 )];
295 for ( proshade_unsign band2Iter = 0; band2Iter < static_cast<proshade_unsign> ( ( bandIter * 2 ) + 1 ); band2Iter++ )
297 this->
eMatrices[bandIter][band2Iter] =
new proshade_complex [
static_cast<proshade_unsign
> ( ( bandIter * 2 ) + 1 )];
◆ allocateRotatedSHMemory()
void ProSHADE_internal_data::ProSHADE_data::allocateRotatedSHMemory |
( |
ProSHADE_settings * |
settings | ) |
|
This function allocates the memory required for storing the rotated Spherical Harmonics coefficients.
- Parameters
-
[in] | settings | The settings object specifying how exactly the rotation is to be done. |
Definition at line 818 of file ProSHADE_overlay.cpp.
825 for ( proshade_unsign iter = 0; iter < this->
noSpheres; iter++ )
828 this->
rotSphericalHarmonics[iter] =
new proshade_complex [
static_cast<proshade_unsign
> ( pow ( (this->
spheres[iter]->getLocalBandwidth() * 2), 2) )];
832 for ( proshade_unsign it = 0; it < static_cast<proshade_unsign> ( pow ( (this->
spheres[iter]->getLocalBandwidth() * 2), 2) ); it++ )
◆ allocateRRPMemory()
void ProSHADE_internal_data::ProSHADE_data::allocateRRPMemory |
( |
ProSHADE_settings * |
settings | ) |
|
|
protected |
This function allocates the required memory for the RRP matrices.
This function belongs to the ProSHADE_data class and its role is to allocate the require memory for the RRP matrices, given the already determined bandwidths and shell count.
- Parameters
-
[in] | settings | A pointer to settings class containing all the information required for the task. |
Definition at line 33 of file ProSHADE_distances.cpp.
39 for ( proshade_unsign bwIt = 0; bwIt < this->
maxShellBand; bwIt++ )
45 for ( proshade_unsign shIt = 0; shIt < this->
noSpheres; shIt++ )
◆ allocateSO3CoeffsSpace()
void ProSHADE_internal_data::ProSHADE_data::allocateSO3CoeffsSpace |
( |
proshade_unsign |
band | ) |
|
This function allocates the memory for the SO(3) coefficients and the inverse for that calling object.
- Parameters
-
[in] | band | The bandwidth to which the computation will be done. |
Definition at line 680 of file ProSHADE_distances.cpp.
683 this->
so3Coeffs =
new fftw_complex [
static_cast<proshade_unsign
>( ( 4 * pow(
static_cast<proshade_double
> ( band ), 3.0 ) -
static_cast<proshade_double
> ( band ) ) / 3.0 )];
684 this->
so3CoeffsInverse =
new fftw_complex [
static_cast<proshade_unsign
>( pow(
static_cast<proshade_double
> ( band ) * 2.0, 3.0 ) )];
◆ allocateWignerMatricesSpace()
void ProSHADE_internal_data::ProSHADE_data::allocateWignerMatricesSpace |
( |
ProSHADE_settings * |
settings | ) |
|
This function allocates the memory for the Wigner matrices for the calling object.
- Parameters
-
[in] | settings | A pointer to settings class containing all the information required for the task. |
Definition at line 29 of file ProSHADE_wignerMatrices.cpp.
34 throw ProSHADE_exception (
"Attempted allocating Wigner D matrices before\n : allocating E matrices memory.",
"EW00024", __FILE__, __LINE__, __func__,
"The E matrices and Wigner matrices both require to know\n : the bandwidth of the comparison (which may differ from the\n : object bandwidth). This is set when allocating E matrices\n : and therefore if it is 0 now, E matrices were not yet\n : allocated." );
42 for ( proshade_unsign bandIter = 0; bandIter < this->
maxCompBand; bandIter++ )
45 this->
wignerMatrices[bandIter] =
new proshade_complex* [(bandIter * 2) + 1];
49 for ( proshade_unsign order1Iter = 0; order1Iter < ( (bandIter * 2) + 1 ); order1Iter++ )
51 this->
wignerMatrices[bandIter][order1Iter] =
new proshade_complex [(bandIter * 2) + 1];
◆ centreMapOnCOM()
void ProSHADE_internal_data::ProSHADE_data::centreMapOnCOM |
( |
ProSHADE_settings * |
settings | ) |
|
This function shits the map so that its COM is in the centre of the map.
This function finds the Centre Of Mass (COM) for the internal map and proceeds to use Fourier to shift the COM to the centre of the map. There is an assumption that the COM and centre of map are close, as if they were far apart, the shift could move some part of the map through the boundaries and cause the map to become messy.
- Parameters
-
[in] | settings | A pointer to settings class containing all the information required for map manipulation. |
Definition at line 1228 of file ProSHADE_data.cpp.
1234 proshade_unsign arrPos = 0;
1235 proshade_single xCOM = 0.0;
1236 proshade_single yCOM = 0.0;
1237 proshade_single zCOM = 0.0;
1238 proshade_single totDens = 0.0;
1241 for ( proshade_unsign xIt = 0; xIt < this->
xDimIndices; xIt++ )
1243 for ( proshade_unsign yIt = 0; yIt < this->
yDimIndices; yIt++ )
1245 for ( proshade_unsign zIt = 0; zIt < this->
zDimIndices; zIt++ )
1248 arrPos = zIt + this->zDimIndices * ( yIt + this->yDimIndices * xIt );
1253 xCOM +=
static_cast<proshade_single
> ( this->
internalMap[arrPos] * xIt );
1254 yCOM +=
static_cast<proshade_single
> ( this->
internalMap[arrPos] * yIt );
1255 zCOM +=
static_cast<proshade_single
> ( this->
internalMap[arrPos] * zIt );
1256 totDens +=
static_cast<proshade_single
> ( this->
internalMap[arrPos] );
1266 proshade_single xDist = (
static_cast<proshade_single
> ( this->xDimIndices / 2.0 ) - xCOM ) *
static_cast<proshade_single
> ( this->
xDimSize / this->
xDimIndices );
1267 proshade_single yDist = (
static_cast<proshade_single
> ( this->yDimIndices / 2.0 ) - yCOM ) *
static_cast<proshade_single
> ( this->
yDimSize / this->
yDimIndices );
1268 proshade_single zDist = (
static_cast<proshade_single
> ( this->
zDimIndices / 2.0 ) - zCOM ) *
static_cast<proshade_single
> ( this->
zDimSize / this->
zDimIndices );
◆ computeGroupElementsForGroup() [1/2]
std::vector< std::vector< proshade_double > > ProSHADE_internal_data::ProSHADE_data::computeGroupElementsForGroup |
( |
std::vector< proshade_double * > * |
allCSyms, |
|
|
proshade_unsign |
grPosition |
|
) |
| |
This function computes the group elements as rotation matrices (except for the identity element) for any detected cyclic point group.
- Parameters
-
[in] | allCSyms | A vector of double pointers, each array being a single Cyclic symmetry entry in a vector of all detected Cyclic symmetries. |
[in] | grPosition | An index of the C symmetry group which should have its group elements computed and returned. |
[out] | val | A vector containing vectors of 9 (rotation matrix) for each group element for the requested group, except for the identity element. |
Definition at line 2317 of file ProSHADE_data.cpp.
2320 if ( grPosition >=
static_cast<proshade_unsign
> ( allCSyms->size() ) )
2322 std::stringstream hlpSS;
2323 hlpSS <<
"The request for group elements of group " << grPosition <<
" cannot be\n : processed, as the list of all groups does not have\n : group with this index.";
2324 throw ProSHADE_exception (
"Requested group elements for group which does not exist.",
"ES00057", __FILE__, __LINE__, __func__, hlpSS.str() );
2328 std::vector<std::vector< proshade_double > > ret;
2329 proshade_double groupAngle = ( 2 * M_PI ) /
static_cast<proshade_double
> ( allCSyms->at(grPosition)[0] );
2330 proshade_double thisElementAngle;
2331 proshade_double* rotMat =
new proshade_double[9];
2336 for ( proshade_unsign elIt = 1; elIt < static_cast<proshade_unsign> ( allCSyms->at(grPosition)[0] ); elIt++ )
2339 thisElementAngle =
static_cast<proshade_double
> ( elIt ) * groupAngle;
2343 allCSyms->at(grPosition)[1],
2344 allCSyms->at(grPosition)[2],
2345 allCSyms->at(grPosition)[3],
2349 std::vector<proshade_double> retEl;
2350 for (
unsigned int matIt = 0; matIt < 9; matIt++ )
◆ computeGroupElementsForGroup() [2/2]
std::vector< std::vector< proshade_double > > ProSHADE_internal_data::ProSHADE_data::computeGroupElementsForGroup |
( |
std::vector< std::vector< proshade_double > > * |
allCSyms, |
|
|
proshade_unsign |
grPosition |
|
) |
| |
This function computes the group elements as rotation matrices (except for the identity element) for any detected cyclic point group.
- Parameters
-
[in] | allCSyms | A vector of vectors of doubles, each array being a single Cyclic symmetry entry in a vector of all detected Cyclic symmetries. |
[in] | grPosition | An index of the C symmetry group which should have its group elements computed and returned. |
[out] | val | A vector containing vectors of 9 (rotation matrix) for each group element for the requested group, except for the identity element. |
Definition at line 2263 of file ProSHADE_data.cpp.
2266 if ( grPosition >=
static_cast<proshade_unsign
> ( allCSyms->size() ) )
2268 std::stringstream hlpSS;
2269 hlpSS <<
"The request for group elements of group " << grPosition <<
" cannot be\n : processed, as the list of all groups does not have\n : group with this index.";
2270 throw ProSHADE_exception (
"Requested group elements for group which does not exist.",
"ES00057", __FILE__, __LINE__, __func__, hlpSS.str() );
2274 std::vector<std::vector< proshade_double > > ret;
2275 proshade_double groupAngle = ( 2 * M_PI ) /
static_cast<proshade_double
> ( allCSyms->at(grPosition).at(0) );
2276 proshade_double thisElementAngle;
2277 proshade_double* rotMat =
new proshade_double[9];
2282 for ( proshade_unsign elIt = 1; elIt < static_cast<proshade_unsign> ( allCSyms->at(grPosition).at(0) ); elIt++ )
2285 thisElementAngle =
static_cast<proshade_double
> ( elIt ) * groupAngle;
2289 allCSyms->at(grPosition).at(1),
2290 allCSyms->at(grPosition).at(2),
2291 allCSyms->at(grPosition).at(3),
2295 std::vector<proshade_double> retEl;
2296 for (
unsigned int matIt = 0; matIt < 9; matIt++ )
◆ computeOptimalTranslation()
void ProSHADE_internal_data::ProSHADE_data::computeOptimalTranslation |
( |
proshade_double |
eulA, |
|
|
proshade_double |
eulB, |
|
|
proshade_double |
eulG, |
|
|
proshade_double |
trsX, |
|
|
proshade_double |
trsY, |
|
|
proshade_double |
trsZ |
|
) |
| |
This function computes and saves the optimal translation vector from the already determined translation function results.
This function simply saves the determined optimal translation to the appropriate variable and does a simple modification to take into account any modifications that ProSHADE may have done to the internal map.
- Parameters
-
[in] | euA | The Euler angle alpha by which the co-ordinates should be rotated (leave empty if no rotation is required). |
[in] | euB | The Euler angle beta by which the co-ordinates should be rotated (leave empty if no rotation is required). |
[in] | euG | The Euler angle gamma by which the co-ordinates should be rotated (leave empty if no rotation is required). |
[in] | transX | The translation to be done along the X-axis in Angstroms. |
[in] | transY | The translation to be done along the Y-axis in Angstroms. |
[in] | transZ | The translation to be done along the Z-axis in Angstroms. |
- Warning
- This function will be called automatically by the getOptimalTranslation() function, so unless directAccess is being used, the user should not need to use this function.
Definition at line 109 of file ProSHADE_overlay.cpp.
117 if ( ( eulA != 0.0 ) || ( eulB != 0.0 ) || ( eulG != 0.0 ) )
◆ computePdbRotationCentre()
void ProSHADE_internal_data::ProSHADE_data::computePdbRotationCentre |
( |
void |
| ) |
|
This function computes the optimal rotation centre for co-ordinates.
This function computes the "visualisation world" (or co-ordinates space) position of the point about which the map was rotated, taking into account the internal ProSHADE map manipulations and other factors. By rotating the co-ordinates about this point, their position and orientation will be the same as the map position before translation function is computed.
- Warning
- This function will be called automatically by the getOptimalTranslation() function, so unless directAccess is being used, the user should not need to use this function.
Definition at line 68 of file ProSHADE_overlay.cpp.
76 proshade_double xRotPos = (
static_cast<proshade_double
> ( this->
xFrom - this->
mapMovFromsChangeX ) * xSamplRate ) +
77 ( ( (
static_cast<proshade_double
> ( this->
xTo ) -
static_cast<proshade_double
> ( this->
xFrom ) ) / 2.0 ) * xSamplRate );
79 proshade_double yRotPos = (
static_cast<proshade_double
> ( this->
yFrom - this->
mapMovFromsChangeY ) * ySamplRate ) +
80 ( ( (
static_cast<proshade_double
> ( this->
yTo ) -
static_cast<proshade_double
> ( this->
yFrom ) ) / 2.0 ) * ySamplRate );
82 proshade_double zRotPos = (
static_cast<proshade_double
> ( this->
zFrom - this->
mapMovFromsChangeZ ) * zSamplRate ) +
83 ( ( (
static_cast<proshade_double
> ( this->
zTo ) -
static_cast<proshade_double
> ( this->
zFrom ) ) / 2.0 ) * zSamplRate );
◆ computeRotatedSH()
void ProSHADE_internal_data::ProSHADE_data::computeRotatedSH |
( |
ProSHADE_settings * |
settings | ) |
|
This function multiplies the objects spherical harmonics with the Wigner D matrices, obtaining rotated spherical harmonics coefficients.
- Parameters
-
[in] | settings | The settings object specifying how exactly the rotation is to be done. |
Definition at line 848 of file ProSHADE_overlay.cpp.
851 proshade_double WigDR, WigDI, *ShR, *ShI, retR, retI;
852 proshade_unsign arrPos;
855 for ( proshade_signed shell = 0; shell < static_cast<proshade_signed> ( this->
noSpheres ); shell++ )
858 for ( proshade_signed bandIter = 0; bandIter < static_cast<proshade_signed> ( this->
spheres[shell]->getLocalBandwidth() ); bandIter++ )
861 for ( proshade_signed order1 = 0; order1 < ( ( bandIter * 2 ) + 1 ); order1++ )
868 for ( proshade_signed order2 = 0; order2 < ( ( bandIter * 2 ) + 1 ); order2++ )
877 arrPos =
static_cast<proshade_unsign
> ( seanindex ( order2-bandIter, bandIter, this->
spheres[shell]->getLocalBandwidth() ) );
◆ computeRotationFunction()
void ProSHADE_internal_data::ProSHADE_data::computeRotationFunction |
( |
ProSHADE_settings * |
settings | ) |
|
This function computes the self-rotation function for this structure.
This function assumes that the spherical harmonics have been computed for a data object. It can be then called on this object and it will proceed to compute the E matrices for this object against itself. From these "self E matrices", the function will generate the SO(3) transform coefficients and finally it will invert transform these coefficients back, thus getting the self-rotation function.
- Parameters
-
[in] | settings | A pointer to settings class containing all the information required for map self-rotation function computation. |
Definition at line 34 of file ProSHADE_symmetry.cpp.
◆ computeRRPMatrices()
void ProSHADE_internal_data::ProSHADE_data::computeRRPMatrices |
( |
ProSHADE_settings * |
settings | ) |
|
This function pre-computes the RRP matrices for a data object.
This function belongs to the ProSHADE_data class and its role is to set the objects internal variables properly and provide all the required calculations, so that the object will in the end have all the RRP matrices computed and be ready for the energy levels calculation.
- Parameters
-
[in] | settings | A pointer to settings class containing all the information required for the task. |
Definition at line 61 of file ProSHADE_distances.cpp.
70 proshade_double descValR = 0.0;
71 proshade_unsign arrPos1, arrPos2;
72 for ( proshade_unsign band = 0; band < this->
maxShellBand; band++ )
75 for ( proshade_unsign shell1 = 0; shell1 < this->
noSpheres; shell1++ )
80 for ( proshade_unsign shell2 = 0; shell2 < this->
noSpheres; shell2++ )
88 for ( proshade_unsign shell2 = 0; shell2 < this->
noSpheres; shell2++ )
91 if ( shell1 > shell2 ) {
continue; }
105 for ( proshade_unsign order = 0; order < static_cast<proshade_unsign> ( ( 2 * band ) + 1 ); order++ )
107 arrPos1 =
static_cast<proshade_unsign
> ( seanindex (
static_cast<proshade_signed
> ( order ) -
108 static_cast<proshade_signed
> ( band ),
109 band, this->
spheres[shell1]->getLocalBandwidth() ) );
110 arrPos2 =
static_cast<proshade_unsign
> ( seanindex (
static_cast<proshade_signed
> ( order ) -
111 static_cast<proshade_signed
> ( band ),
112 band, this->
spheres[shell2]->getLocalBandwidth() ) );
120 this->
rrpMatrices[band][shell1][shell2] = descValR;
121 this->
rrpMatrices[band][shell2][shell1] = descValR;
◆ computeSphericalHarmonics()
void ProSHADE_internal_data::ProSHADE_data::computeSphericalHarmonics |
( |
ProSHADE_settings * |
settings | ) |
|
This function computes the spherical harmonics decomposition for the whole structure.
This function is called to compute the spherical harmonics decomposition of the mapped data on every available sphere. This is done sphere-wise and there is some sub-optimal memory management stemming from different shells having different resolutions.
- Parameters
-
[in] | settings | A pointer to settings class containing all the information required for map manipulation. |
Definition at line 1542 of file ProSHADE_data.cpp.
1550 for ( proshade_unsign iter = 0; iter < this->
noSpheres; iter++ )
1557 for ( proshade_unsign iter = 0; iter < this->
noSpheres; iter++ )
1560 std::stringstream ss;
1561 ss <<
"Now decomposing sphere " << iter <<
". " <<
"( Band is: " << this->
spheres[iter]->
getLocalBandwidth() <<
").";
◆ computeTranslationMap()
This function does the computation of the translation map and saves results internally.
This function takes the static structure, the optimal translation to which should be found and then it proceeds to compute the Fourier transform of both this and the static structures. It then combines the coefficients for translation function and computes the inverse Fourier transform, thus obtaining the translation function. This function is then saved, while all other internal data are deleted.
- Parameters
-
[in] | staticStructure | A pointer to the data class object of the other ( static ) structure. |
Definition at line 389 of file ProSHADE_overlay.cpp.
392 fftw_complex *tmpIn1 = NULL, *tmpOut1 = NULL, *tmpIn2 = NULL, *tmpOut2 = NULL, *resOut = NULL;
393 fftw_plan forwardFourierObj1, forwardFourierObj2, inverseFourierCombo;
394 proshade_unsign dimMult = staticStructure->
getXDim() * staticStructure->
getYDim() * staticStructure->
getZDim();
395 ProSHADE_internal_overlay::allocateTranslationFunctionMemory ( tmpIn1, tmpOut1, tmpIn2, tmpOut2, this->
translationMap, resOut, forwardFourierObj1, forwardFourierObj2, inverseFourierCombo, staticStructure->
getXDim(), staticStructure->
getYDim(), staticStructure->
getZDim() );
398 for ( proshade_unsign iter = 0; iter < dimMult; iter++ ) { tmpIn1[iter][0] = staticStructure->
getMapValue ( iter ); tmpIn1[iter][1] = 0.0; }
399 for ( proshade_unsign iter = 0; iter < dimMult; iter++ ) { tmpIn2[iter][0] = this->
getMapValue ( iter ); tmpIn2[iter][1] = 0.0; }
402 fftw_execute ( forwardFourierObj1 );
403 fftw_execute ( forwardFourierObj2 );
407 fftw_execute ( inverseFourierCombo );
◆ convertRotationFunction()
void ProSHADE_internal_data::ProSHADE_data::convertRotationFunction |
( |
ProSHADE_settings * |
settings | ) |
|
This function converts the self-rotation function of this structure to angle-axis representation.
This function creates a set of concentric spheres in a spherical co-ordinates space, where the radius is the angle-axis representation angle and the lattitude and longitude angles are the angle-axis representation axis vector. I.e. each of the spheres contains all angle-axis representation axes for a single given angle.
Then, it proceeds to interpolate the rotation function for each point in this space, thus effectivelly re-sampling the rotation function onto the required space.
- Parameters
-
[in] | settings | A pointer to settings class containing all the information required for map self-rotation function computation. |
Definition at line 113 of file ProSHADE_symmetry.cpp.
119 proshade_double shellSpacing = ( 2.0 * M_PI ) /
static_cast<proshade_double
> ( this->
maxShellBand * 2.0 );
120 std::vector< proshade_double > allPeakHeights;
123 for ( proshade_unsign spIt = 1; spIt < ( this->
maxShellBand * 2 ); spIt++ )
128 static_cast<proshade_double
> ( spIt ) * shellSpacing,
133 for ( proshade_unsign shIt = 0; shIt < static_cast<proshade_unsign> ( sphereMappedRotFun.size() ); shIt++ )
136 std::stringstream hlpSS;
137 hlpSS <<
"Interpolating sphere " << shIt <<
" ( radius: " << this->sphereMappedRotFun.at(shIt)->getRadius() <<
" ).";
141 this->sphereMappedRotFun.at(shIt)->interpolateSphereValues ( this->
getInvSO3Coeffs ( ) );
149 for ( proshade_unsign shIt = 0; shIt < static_cast<proshade_unsign> ( this->sphereMappedRotFun.size() ); shIt++ )
151 this->sphereMappedRotFun.at(shIt)->findAllPeaks ( settings->
peakNeighbours, &allPeakHeights );
155 std::stringstream hlpSS;
156 hlpSS <<
"Detected " << allPeakHeights.size() <<
" peaks with any height.";
163 std::stringstream hlpSS2;
164 hlpSS2 <<
"From these peaks, decided the threshold will be " << peakThres <<
" peak height.";
168 for ( proshade_unsign shIt = 0; shIt < static_cast<proshade_unsign> ( this->sphereMappedRotFun.size() ); shIt++ )
170 this->sphereMappedRotFun.at(shIt)->removeSmallPeaks ( peakThres );
◆ createNewMapFromBounds()
void ProSHADE_internal_data::ProSHADE_data::createNewMapFromBounds |
( |
ProSHADE_settings * |
settings, |
|
|
ProSHADE_data *& |
newStr, |
|
|
proshade_signed * |
newBounds |
|
) |
| |
This function creates a new structure from the calling structure and new bounds values.
This function takes a pointer to uninitialised structure and fills it with the calling structure values adjusted for the new bounds. If the bounds are the same, the two structures should be identical except the file (the new structure does not have an input file associated) and the type (no type for the new structure). It can deal with both larger and smaller bounds than the original values.
- Parameters
-
[in] | settings | A pointer to settings class containing all the information required for reading in the map. |
[in] | newStr | A pointer reference to a new structure class which has all the same values except for the new bounds and adequately changed map. |
[in] | newBounds | A pointer to proshade_signed array of 6 storing the results - (0 = minX; 1 = maxX; 2 = minY; 3 = maxY; 4 - minZ; 5 = maxZ). |
Definition at line 1090 of file ProSHADE_data.cpp.
1096 newStr->fileName =
"N/A";
1097 newStr->fileType = ProSHADE_internal_io::MAP;
1100 newStr->xDimIndices =
static_cast<proshade_signed
> ( newBounds[1] ) -
static_cast<proshade_signed
> ( newBounds[0] ) + 1;
1101 newStr->yDimIndices =
static_cast<proshade_signed
> ( newBounds[3] ) -
static_cast<proshade_signed
> ( newBounds[2] ) + 1;
1102 newStr->zDimIndices =
static_cast<proshade_signed
> ( newBounds[5] ) -
static_cast<proshade_signed
> ( newBounds[4] ) + 1;
1104 newStr->aAngle = this->
aAngle;
1105 newStr->bAngle = this->
aAngle;
1106 newStr->cAngle = this->
aAngle;
1108 newStr->xDimSize =
static_cast<proshade_single
> ( newStr->xDimIndices ) * ( this->
xDimSize /
static_cast<proshade_single
> ( this->
xDimIndices ) );
1109 newStr->yDimSize =
static_cast<proshade_single
> ( newStr->yDimIndices ) * ( this->
yDimSize /
static_cast<proshade_single
> ( this->
yDimIndices ) );
1110 newStr->zDimSize =
static_cast<proshade_single
> ( newStr->zDimIndices ) * ( this->
zDimSize /
static_cast<proshade_single
> ( this->
zDimIndices ) );
1112 newStr->xGridIndices = newStr->xDimIndices;
1113 newStr->yGridIndices = newStr->yDimIndices;
1114 newStr->zGridIndices = newStr->zDimIndices;
1120 newStr->xAxisOrigin = this->
xAxisOrigin + newBounds[0];
1121 newStr->yAxisOrigin = this->
yAxisOrigin + newBounds[2];
1122 newStr->zAxisOrigin = this->
zAxisOrigin + newBounds[4];
1124 newStr->xFrom = this->
xFrom + newBounds[0];
1125 newStr->yFrom = this->
yFrom + newBounds[2];
1126 newStr->zFrom = this->
zFrom + newBounds[4];
1128 newStr->xTo = this->
xTo - ( (this->
xDimIndices-1) - newBounds[1] );
1129 newStr->yTo = this->
yTo - ( (this->
yDimIndices-1) - newBounds[3] );
1130 newStr->zTo = this->
zTo - ( (this->
zDimIndices-1) - newBounds[5] );
1133 newStr->internalMap =
new proshade_double[newStr->xDimIndices * newStr->yDimIndices * newStr->zDimIndices];
1138 this->xFrom, this->yFrom, this->zFrom, newStr->yDimIndices, newStr->zDimIndices,
1139 this->xDimIndices, this->yDimIndices, this->zDimIndices, newStr->internalMap, this->internalMap );
◆ deepCopyMap()
void ProSHADE_internal_data::ProSHADE_data::deepCopyMap |
( |
proshade_double *& |
saveTo, |
|
|
proshade_unsign |
verbose |
|
) |
| |
This function copies the internal map into the supplied pointer, which it also allocates.
This function is provided so that the user can provide a pointer and have it allocated and filled with the map values.
- Parameters
-
[in] | saveTo | A pointer where the internal map should be deep copied into. |
[in] | verbose | How loud the run should be? |
Definition at line 2796 of file ProSHADE_data.cpp.
2799 if ( saveTo != NULL )
◆ detectSymmetryFromAngleAxisSpace()
void ProSHADE_internal_data::ProSHADE_data::detectSymmetryFromAngleAxisSpace |
( |
ProSHADE_settings * |
settings, |
|
|
std::vector< proshade_double * > * |
axes, |
|
|
std::vector< std::vector< proshade_double > > * |
allCs |
|
) |
| |
This function runs the symmetry detection algorithms on this structure using the angle-axis space and saving the results in the settings object.
This function firstly decides whether specific C symmetry was requested or not. This decision is important as knowing the required fold allows for a rather simplified algorithm to be applied. Thus, if specific fold is known, simplified algorithm will be used. Otherwise, this function will do a general search by firstly finding all cyclic point groups and then applying the dihedral, tetrahedral, octahedral and icosahedral searches.
Once complete, the function will save both, the vector of ProSHADE formatted array pointers as well as vector of vectors of doubles with the same information containing all detected cyclic point groups into the supplied vector pointers.
- Parameters
-
[in] | settings | A pointer to settings class containing all the information required for map symmetry detection. |
[in] | axes | A vector to which all the axes of the recommended symmetry (if any) will be saved. |
[in] | allCs | A vector to which all the detected cyclic symmetries will be saved into. |
Definition at line 1707 of file ProSHADE_data.cpp.
1710 if ( settings->axisErrToleranceDefault )
1720 std::stringstream hlpSS;
1725 proshade_double symThres = 0.0;
1730 if ( CSyms.size() > 0 )
1755 if ( this->sphereMappedRotFun.size() < 1 )
1757 throw ProSHADE_exception (
"Rotation function was not converted into angle-axis space.",
"ES00062", __FILE__, __LINE__, __func__,
"It seems that the convertRotationFunction() function was\n : not yet called. Therefore, there are no data to detect the\n : symmetry from; please call the convertRotationFunction()\n : function before the detectSymmetryFromAngleAxisSpace()\n : function." );
1763 throw ProSHADE_exception (
"Requested symmetry supplied, but not recognised.",
"ES00032", __FILE__, __LINE__, __func__,
"There are only the following value allowed for the\n : symmetry type request: \"C\", \"D\", \"T\", \"O\" and \"I\". Any\n : other value will result in this error." );
1772 std::vector< proshade_double* > OSyms; std::vector< proshade_double* > TSyms;
1790 std::cerr <<
"Sadly, this functionality is not yet implemented. Please use the -z option to use the original peak searching symmetry detection algorithm." << std::endl;
1799 std::cerr <<
"Sadly, this functionality is not yet implemented. Please use the -z option to use the original peak searching symmetry detection algorithm." << std::endl;
1804 std::cerr <<
"Sadly, this functionality is not yet implemented. Please use the -z option to use the original peak searching symmetry detection algorithm." << std::endl;
◆ detectSymmetryInStructure()
void ProSHADE_internal_data::ProSHADE_data::detectSymmetryInStructure |
( |
ProSHADE_settings * |
settings, |
|
|
std::vector< proshade_double * > * |
axes, |
|
|
std::vector< std::vector< proshade_double > > * |
allCs |
|
) |
| |
This function runs the symmetry detection algorithms on this structure and saves the results in the settings object.
This function is the symmetry detection starting point. It decides whether a specific symmetry is being sought after, or whether a general symmetry search is required. Consequently, it calls the appropriate functions and ends up with saving the resulting predictions into the settings object supplied. It also saves all the detected symmetry groups to the settings object for further processing and programmatical access.
- Parameters
-
[in] | settings | A pointer to settings class containing all the information required for map symmetry detection. |
[in] | axes | A vector to which all the axes of the recommended symmetry (if any) will be saved. |
[in] | allCs | A vector to which all the detected cyclic symmetries will be saved into. |
Definition at line 1587 of file ProSHADE_data.cpp.
1598 std::vector< proshade_double* > OSyms; std::vector< proshade_double* > TSyms;
1647 throw ProSHADE_exception (
"Requested symmetry supplied, but not recognised.",
"ES00032", __FILE__, __LINE__, __func__,
"There are only the following value allowed for the\n : symmetry type request: \"C\", \"D\", \"T\", \"O\" and \"I\". Any\n : other value will result in this error." );
1651 bool isArgSameAsSettings =
true;
1652 for ( proshade_unsign cIt = 0; cIt < static_cast<proshade_unsign> ( CSyms.size() ); cIt++ )
1654 std::vector< proshade_double > nextSym;
1663 if ( ( cIt == 0 ) && ( settings->
allDetectedCAxes.size() == 0 ) ) { isArgSameAsSettings =
false; }
1670 for ( proshade_unsign it = 0; it < static_cast<proshade_unsign> ( CSyms.size() ); it++ ) {
delete[] CSyms.at(it); }
◆ detectSymmetryInStructurePython()
void ProSHADE_internal_data::ProSHADE_data::detectSymmetryInStructurePython |
( |
ProSHADE_settings * |
settings | ) |
|
This function runs the symmetry detection algorithms on this structure saving the axes in the settings object only.
This function runs the detectSymmetryInStructure() function without requiring the vector of double pointers arguments, so that it is simply callable from Python. The axes are saved in the settings object for later retrieval.
- Parameters
-
[in] | settings | A pointer to settings class containing all the information required for map symmetry detection. |
Definition at line 1684 of file ProSHADE_data.cpp.
◆ figureIndexStartStop()
void ProSHADE_internal_data::ProSHADE_data::figureIndexStartStop |
( |
void |
| ) |
|
|
protected |
Function for determining iterator start and stop positions.
This function is called to set the xFrom, yFrom, ..., yTo and zTo iterator values for easier further calculations. It assumes that gemmi has read in the xFrom, yFrom and zFrom values already.
Definition at line 719 of file ProSHADE_data.cpp.
◆ findBestCScore()
proshade_double ProSHADE_internal_data::ProSHADE_data::findBestCScore |
( |
std::vector< proshade_double * > * |
CSym, |
|
|
proshade_unsign * |
symInd |
|
) |
| |
This function locates the best scoring C symmetry axis, returning the score and best symmetry index.
This function takes the list of detected C symmetries and decides which of them is the best, taking into account the folds and the average heights. This is not the best approach, I would look into MLE of symmetry presence givent the height and fold, but for now this should do.
- Parameters
-
[in] | CSym | This is the complete list of the ProSHADE detected C axes in the ProSHADE format. |
[in] | symInd | A pointer to variable where the best symmetry axis index will be stored. |
[out] | ret | The score of the best scoring C axis. |
Definition at line 1870 of file ProSHADE_data.cpp.
1873 if ( CSym->size() == 0 ) { *symInd = 0;
return ( 0.0 ); }
1876 proshade_double ret = CSym->at(0)[5];
1878 proshade_double frac = 0.0;
1882 for ( proshade_unsign ind = 1; ind < static_cast<proshade_unsign>( CSym->size() ); ind++ )
1885 if ( CSym->at(ind)[0] > CSym->at(*symInd)[0] )
1888 frac = ( std::abs( CSym->at(ind)[5]- 0.5 ) / std::abs( CSym->at(*symInd)[5] - 0.5 ) ) / ( CSym->at(*symInd)[0] / CSym->at(ind)[0] );
1891 if ( frac >= 1.0 && ( ( CSym->at(*symInd)[5] * 0.85 ) < CSym->at(ind)[5] ) )
1895 ret = CSym->at(ind)[5];
◆ findBestDScore()
proshade_double ProSHADE_internal_data::ProSHADE_data::findBestDScore |
( |
std::vector< proshade_double * > * |
DSym, |
|
|
proshade_unsign * |
symInd |
|
) |
| |
This function locates the best scoring D symmetry axis, returning the score and best symmetry index.
This function takes the list of detected D symmetries and decides which of them is the best, taking into account the folds and the average heights. This is not the best approach, I would look into MLE of symmetry presence givent the height and folds, but for now this should do.
- Parameters
-
[in] | DSym | This is the complete list of the ProSHADE detected D axes in the ProSHADE format. |
[in] | symInd | A pointer to variable where the best symmetry axis index will be stored. |
[out] | ret | The score of the best scoring D axis. |
Definition at line 1914 of file ProSHADE_data.cpp.
1920 proshade_double ret = 0.0;
1921 proshade_double frac = 0.0;
1922 if ( DSym->size() > 0 )
1924 ret = ( ( DSym->at(0)[0] * DSym->at(0)[5] ) + ( DSym->at(0)[6] * DSym->at(0)[11] ) ) / ( DSym->at(0)[0] + DSym->at(0)[6] );
1927 else {
return ( ret ); }
1931 for ( proshade_unsign ind = 1; ind < static_cast<proshade_unsign>( DSym->size() ); ind++ )
1934 if ( ( DSym->at(ind)[0] + DSym->at(ind)[6] ) > ( DSym->at(*symInd)[0] + DSym->at(*symInd)[6] ) )
1937 frac = std::max ( std::min ( ( ( DSym->at(*symInd)[0] + DSym->at(*symInd)[6] ) / ( DSym->at(ind)[0] + DSym->at(ind)[6] ) ) * 1.5, 0.9 ), 0.6 );
1940 if ( ( ( ( DSym->at(*symInd)[0] * DSym->at(*symInd)[5] ) + ( DSym->at(*symInd)[6] * DSym->at(*symInd)[11] ) ) / ( DSym->at(*symInd)[0] + DSym->at(*symInd)[6] ) * frac ) < ( ( DSym->at(ind)[0] * DSym->at(ind)[5] ) + ( DSym->at(ind)[6] * DSym->at(ind)[11] ) ) / ( DSym->at(ind)[0] + DSym->at(ind)[6] ) )
1944 ret = ( ( DSym->at(ind)[0] * DSym->at(ind)[5] ) + ( DSym->at(ind)[6] * DSym->at(ind)[11] ) ) / ( DSym->at(ind)[0] + DSym->at(ind)[6] );
◆ findIScore()
proshade_double ProSHADE_internal_data::ProSHADE_data::findIScore |
( |
std::vector< proshade_double * > * |
ISym | ) |
|
This function takes the list of icosahedral axes and returns a score for deciding whether I symmetry should be recommended.
This function simply checks if the complete I symmetry is present (returning 0.0 if not). If present, the function will compute the fold weighted average axis height for the whole symmetry and return this number.
- Parameters
-
[in] | ISym | This is the complete list of the ProSHADE detected I symmetry axes in the ProSHADE format. |
[out] | ret | The score of the I symmetry. |
Definition at line 2028 of file ProSHADE_data.cpp.
2031 proshade_double ret = 0.0;
2032 proshade_double foldSum = 0.0;
2035 if ( ISym->size() == 31 )
2038 for ( proshade_unsign cIt = 0; cIt < static_cast<proshade_unsign> ( ISym->size() ); cIt++ )
2040 ret += ISym->at(cIt)[0] * ISym->at(cIt)[5];
2041 foldSum += ISym->at(cIt)[0];
◆ findMapCOM()
void ProSHADE_internal_data::ProSHADE_data::findMapCOM |
( |
void |
| ) |
|
This function finds the centre of mass of the internal map representation.
This function simply computes the centre of mass for the given ProSHADE_data object map in the "real space" (i.e. the space that counts Angstroms from the bottom left further corner). These are then saved into the ProSHADE_data object.
Definition at line 2910 of file ProSHADE_data.cpp.
2916 proshade_double totNonZeroPoints = 0.0;
2917 proshade_signed mapIt = 0;
2920 for ( proshade_signed xIt = 0; xIt < static_cast<proshade_signed> ( this->
xDimIndices ); xIt++ )
2922 for ( proshade_signed yIt = 0; yIt < static_cast<proshade_signed> ( this->
yDimIndices ); yIt++ )
2924 for ( proshade_signed zIt = 0; zIt < static_cast<proshade_signed> ( this->
zDimIndices ); zIt++ )
2930 if ( this->
internalMap[mapIt] <= 0.0 ) {
continue; }
2941 this->
xCom /= totNonZeroPoints;
2942 this->
yCom /= totNonZeroPoints;
2943 this->
zCom /= totNonZeroPoints;
2947 ( ( this->
xCom -
static_cast<proshade_double
> ( this->
xFrom ) ) *
2950 ( ( this->
yCom -
static_cast<proshade_double
> ( this->
yFrom ) ) *
2953 ( ( this->
zCom -
static_cast<proshade_double
> ( this->
zFrom ) ) *
◆ findOScore()
proshade_double ProSHADE_internal_data::ProSHADE_data::findOScore |
( |
std::vector< proshade_double * > * |
OSym | ) |
|
This function takes the list of octahedral axes and returns a score for deciding whether O symmetry should be recommended.
This function simply checks if the complete O symmetry is present (returning 0.0 if not). If present, the function will compute the fold weighted average axis height for the whole symmetry and return this number.
- Parameters
-
[in] | OSym | This is the complete list of the ProSHADE detected O symmetry axes in the ProSHADE format. |
[out] | ret | The score of the O symmetry. |
Definition at line 1995 of file ProSHADE_data.cpp.
1998 proshade_double ret = 0.0;
1999 proshade_double foldSum = 0.0;
2002 if ( OSym->size() == 13 )
2005 for ( proshade_unsign cIt = 0; cIt < static_cast<proshade_unsign> ( OSym->size() ); cIt++ )
2007 ret += OSym->at(cIt)[0] * OSym->at(cIt)[5];
2008 foldSum += OSym->at(cIt)[0];
◆ findRequestedCSymmetryFromAngleAxis()
std::vector< proshade_double * > ProSHADE_internal_data::ProSHADE_data::findRequestedCSymmetryFromAngleAxis |
( |
ProSHADE_settings * |
settings, |
|
|
proshade_unsign |
fold, |
|
|
proshade_double * |
peakThres |
|
) |
| |
This function searches the angle-axis representation of the rotation function for a cyclic point group with given fold.
This function is a simplification of the getCyclicSymmetriesListFromAngleAxis() function, where this function does not map the whole rotation function, but rothar only to the spheres it knows it will required. Moreover, it does not search for all cyclic point groups, but only those which span all the spheres (angles) and therefore have the required fold.
In terms of operations, this function interpolates the rotation function values onto the spheres it requires, then it finds peaks and removes the small peaks, so that these can then be grouped. For each group which spans all the angles it then finds the index with highest sum of peak height over all spheres. It can then do the bi-cubic interpolation if requested. Finally, all the detected peaks are sorted by the peak height and returned.
- Parameters
-
[in] | settings | ProSHADE_settings object containing all the settings for this run. |
[in] | fold | The fold which should be sought for by the function. |
[in] | peakThres | The threshold used to cut peaks. |
[out] | ret | Vector of double pointers to arrays having the standard ProSHADE symmetry group structure. |
Definition at line 3713 of file ProSHADE_symmetry.cpp.
3716 proshade_double soughtAngle;
3717 std::vector< proshade_double > allPeakHeights;
3718 std::vector< ProSHADE_internal_spheres::ProSHADE_rotFun_spherePeakGroup* > peakGroups;
3719 std::vector< proshade_double* > ret;
3723 this->sphereMappedRotFun.clear();
3726 for ( proshade_double angIt = 1.0; angIt < static_cast<proshade_double> ( fold ); angIt += 1.0 )
3729 soughtAngle = angIt * ( 2.0 * M_PI /
static_cast<proshade_double
> ( fold ) );
3733 M_PI /
static_cast<proshade_double
> ( fold ),
3736 static_cast<proshade_unsign
> ( angIt - 1.0 ) ) );
3739 this->sphereMappedRotFun.at(
static_cast<proshade_unsign
> ( angIt - 1.0 ))->interpolateSphereValues ( this->
getInvSO3Coeffs ( ) );
3742 this->sphereMappedRotFun.at(
static_cast<proshade_unsign
> ( angIt - 1.0 ))->findAllPeaks ( settings->
peakNeighbours, &allPeakHeights );
3746 std::stringstream hlpSS;
3747 hlpSS <<
"Found a total of " << std::pow ( this->
maxShellBand * 2.0 * (fold-1), 2.0 ) - allPeakHeights.size() <<
" non-peaks for thresholding.";
3754 std::stringstream hlpSS2;
3755 hlpSS2 <<
"Determined peak threshold " << *peakThres <<
".";
3759 for ( proshade_unsign shIt = 0; shIt < static_cast<proshade_unsign> ( this->sphereMappedRotFun.size() ); shIt++ )
3761 this->sphereMappedRotFun.at(shIt)->removeSmallPeaks ( *peakThres );
3765 for ( proshade_unsign sphIt = 0; sphIt < static_cast<proshade_unsign> ( this->sphereMappedRotFun.size() ); sphIt++ )
3768 for ( proshade_unsign pkIt = 0; pkIt < static_cast<proshade_unsign> ( this->sphereMappedRotFun.at(sphIt)->getPeaks().size() ); pkIt++ )
3772 for ( proshade_unsign pkGrpIt = 0; pkGrpIt < static_cast<proshade_unsign> ( peakGroups.size() ); pkGrpIt++ )
3774 if ( peakGroups.at(pkGrpIt)->checkIfPeakBelongs ( this->sphereMappedRotFun.at(sphIt)->getPeaks().at(pkIt).first, this->sphereMappedRotFun.at(sphIt)->getPeaks().at(pkIt).second, sphIt, settings->
axisErrTolerance, settings->
verbose ) ) { newPeak =
false;
break; }
3778 if ( !newPeak ) {
continue; }
3782 this->sphereMappedRotFun.at(sphIt)->getPeaks().at(pkIt).second,
3784 this->sphereMappedRotFun.at(sphIt)->getAngularDim() ) );
3789 for ( proshade_unsign grIt = 0; grIt < static_cast<proshade_unsign> ( peakGroups.size() ); grIt++ )
3792 std::stringstream hlpSS3;
3793 hlpSS3 <<
"Now considering group with LAT " << peakGroups.at(grIt)->getLatFromIndices() <<
" - " << peakGroups.at(grIt)->getLatToIndices() <<
" and LON " << peakGroups.at(grIt)->getLonFromIndices() <<
" - " << peakGroups.at(grIt)->getLonToIndices() <<
" spanning spheres ";
3794 for ( proshade_unsign sphIt = 0; sphIt < static_cast<proshade_unsign> ( peakGroups.at(grIt)->getSpherePositions().size() ); sphIt++ ) { hlpSS3 << peakGroups.at(grIt)->getSpherePositions().at(sphIt) <<
" ; "; }
3801 delete peakGroups.at(grIt);
◆ findTScore()
proshade_double ProSHADE_internal_data::ProSHADE_data::findTScore |
( |
std::vector< proshade_double * > * |
TSym | ) |
|
This function takes the list of tetrahedral axes and returns a score for deciding whether T symmetry should be recommended.
This function simply checks if the complete T symmetry is present (returning 0.0 if not). If present, the function will compute the fold weighted average axis height for the whole symmetry and return this number.
- Parameters
-
[in] | TSym | This is the complete list of the ProSHADE detected T symmetry axes in the ProSHADE format. |
[out] | ret | The score of the T symmetry. |
Definition at line 1962 of file ProSHADE_data.cpp.
1965 proshade_double ret = 0.0;
1966 proshade_double foldSum = 0.0;
1969 if ( TSym->size() == 7 )
1972 for ( proshade_unsign cIt = 0; cIt < static_cast<proshade_unsign> ( TSym->size() ); cIt++ )
1974 ret += TSym->at(cIt)[0] * TSym->at(cIt)[5];
1975 foldSum += TSym->at(cIt)[0];
◆ getAllGroupElements()
std::vector< std::vector< proshade_double > > ProSHADE_internal_data::ProSHADE_data::getAllGroupElements |
( |
ProSHADE_settings * |
settings, |
|
|
std::vector< proshade_unsign > |
axesList, |
|
|
std::string |
groupType = "" , |
|
|
proshade_double |
matrixTolerance = 0.05 |
|
) |
| |
This function returns the group elements as rotation matrices of any defined point group.
This function generates a list of all point group elements for any group defined by a set of cyclic point groups. The set is supplied using the second parameter, where these need to be detected by ProSHADE first and then their index in the ProSHADE cyclic group detected list can be given here.
This function can generate appropriate elementes for all ProSHADE supported point group types (i.e. C, D, T, O and I) as well as for any supplied set of cyclic point groups (use the groupType value of "X").
Please note that the final set of point group elements will be checked for being a point group, i.e. for the fact that a product of any two members will be another already present member. If this condition is not met, error will be thrown. This poses some isses when the point group axes are slightly off, as this can lead to the point group check failing...
- Parameters
-
[in] | settings | A pointer to settings class containing all the information required for map symmetry detection. |
[in] | axesList | A vector of ints specifying which C axes from the full list are members of the group. |
[in] | groupType | An optional string specifying for which symmetry type the group elements are to be computed. Leave empty if you want to use the supplied axes without any questions being asked. |
[in] | matrixTolerance | The maximum allowed trace difference for two matrices to still be considered the same. |
[out] | val | A vector containing a vector of 9 doubles (rotation matrix) for each group element for the requested group. |
Definition at line 2552 of file ProSHADE_data.cpp.
2555 std::vector<std::vector< proshade_double > > ret;
2558 if ( groupType ==
"C" )
2573 throw ProSHADE_exception (
"Computed point group elements do not form a group.",
"ES00060", __FILE__, __LINE__, __func__,
"The supplied cyclic groups list does not form a group and\n : therefore such group's elements cannot be obtained. Please\n : check the cyclic groups list supplied to the\n : getAllGroupElements() function." );
2576 else if ( groupType ==
"D" )
2595 throw ProSHADE_exception (
"Computed point group elements do not form a group.",
"ES00060", __FILE__, __LINE__, __func__,
"The supplied cyclic groups list does not form a group and\n : therefore such group's elements cannot be obtained. Please\n : check the cyclic groups list supplied to the\n : getAllGroupElements() function." );
2598 else if ( groupType ==
"T" )
2604 for ( proshade_unsign grIt = 0; grIt < static_cast<proshade_unsign> ( axesList.size() ); grIt++ )
2618 for ( proshade_unsign grIt = 0; grIt < static_cast<proshade_unsign> ( axesList.size() ); grIt++ )
2638 throw ProSHADE_exception (
"Computed point group elements do not form a group.",
"ES00060", __FILE__, __LINE__, __func__,
"The supplied cyclic groups list does not form a group and\n : therefore such group's elements cannot be obtained. Please\n : check the cyclic groups list supplied to the\n : getAllGroupElements() function." );
2641 else if ( groupType ==
"O" )
2647 for ( proshade_unsign grIt = 0; grIt < static_cast<proshade_unsign> ( axesList.size() ); grIt++ )
2661 for ( proshade_unsign grIt = 0; grIt < static_cast<proshade_unsign> ( axesList.size() ); grIt++ )
2675 for ( proshade_unsign grIt = 0; grIt < static_cast<proshade_unsign> ( axesList.size() ); grIt++ )
2695 throw ProSHADE_exception (
"Computed point group elements do not form a group.",
"ES00060", __FILE__, __LINE__, __func__,
"The supplied cyclic groups list does not form a group and\n : therefore such group's elements cannot be obtained. Please\n : check the cyclic groups list supplied to the\n : getAllGroupElements() function." );
2698 else if ( groupType ==
"I" )
2704 for ( proshade_unsign grIt = 0; grIt < static_cast<proshade_unsign> ( axesList.size() ); grIt++ )
2718 for ( proshade_unsign grIt = 0; grIt < static_cast<proshade_unsign> ( axesList.size() ); grIt++ )
2732 for ( proshade_unsign grIt = 0; grIt < static_cast<proshade_unsign> ( axesList.size() ); grIt++ )
2752 throw ProSHADE_exception (
"Computed point group elements do not form a group.",
"ES00060", __FILE__, __LINE__, __func__,
"The supplied cyclic groups list does not form a group and\n : therefore such group's elements cannot be obtained. Please\n : check the cyclic groups list supplied to the\n : getAllGroupElements() function." );
2755 else if ( groupType ==
"X" )
2758 for ( proshade_unsign grIt = 0; grIt < static_cast<proshade_unsign> ( axesList.size() ); grIt++ )
2774 throw ProSHADE_exception (
"Computed point group elements do not form a group.",
"ES00060", __FILE__, __LINE__, __func__,
"The supplied cyclic groups list does not form a group and\n : therefore such group's elements cannot be obtained. Please\n : check the cyclic groups list supplied to the\n : getAllGroupElements() function." );
2779 std::stringstream hlpSS;
2780 hlpSS <<
"Unknown symmetry type: >" << groupType <<
"<";
2781 throw ProSHADE_exception ( hlpSS.str().c_str(),
"ES00058", __FILE__, __LINE__, __func__,
"Function getAllGroupElements was called with symmetry type\n : value outside of the allowed values C, D, T, O, I\n : or empty for using all supplied axes." );
◆ getAnySphereRadius()
proshade_double ProSHADE_internal_data::ProSHADE_data::getAnySphereRadius |
( |
proshade_unsign |
shell | ) |
|
This function allows access to the radius of any particular sphere.
- Parameters
-
[out] | X | The distance of the requested sphere to the centre of the coordinates. |
Definition at line 3136 of file ProSHADE_data.cpp.
3139 return ( this->
spheres[shell]->getShellRadius() );
◆ getBestRotationMapPeaksEulerAngles()
std::vector< proshade_double > ProSHADE_internal_data::ProSHADE_data::getBestRotationMapPeaksEulerAngles |
( |
ProSHADE_settings * |
settings | ) |
|
This function returns a vector of three floats, the three Euler angles of the best peak in the rotation map.
- Parameters
-
[in] | settings | A pointer to settings class containing all the information required for map overlay. |
[out] | val | A vector of the Euler angles of the best peak in the rotation function map. |
Definition at line 1228 of file ProSHADE_overlay.cpp.
1231 std::vector < proshade_double > ret;
1232 proshade_double eulA, eulB, eulG;
1237 &eulA, &eulB, &eulG, settings );
◆ getBestTranslationMapPeaksAngstrom()
std::vector< proshade_double > ProSHADE_internal_data::ProSHADE_data::getBestTranslationMapPeaksAngstrom |
( |
ProSHADE_internal_data::ProSHADE_data * |
staticStructure, |
|
|
proshade_double |
eulA, |
|
|
proshade_double |
eulB, |
|
|
proshade_double |
eulG |
|
) |
| |
This function gets the optimal translation vector and returns it as a standard library vector. It also applies the translation to the internal map.
- Parameters
-
[in] | staticStructure | A pointer to the data class object of the other ( static ) structure. |
[out] | X | A vector of doubles with the optimal translation vector in Angstroms. |
Definition at line 308 of file ProSHADE_overlay.cpp.
311 std::vector< proshade_double > ret;
312 proshade_double mapPeak = 0.0;
313 proshade_double trsX = 0.0, trsY = 0.0, trsZ = 0.0;
324 if ( trsX > ( staticStructure->
getXDim() / 2 ) ) { trsX = trsX - this->
getXDim(); }
325 if ( trsY > ( staticStructure->
getYDim() / 2 ) ) { trsY = trsY - this->
getYDim(); }
326 if ( trsZ > ( staticStructure->
getZDim() / 2 ) ) { trsZ = trsZ - this->
getZDim(); }
329 proshade_single xCor = ( staticStructure->
xFrom - this->
xFrom ) *
330 (
static_cast<proshade_double
> ( staticStructure->
getXDimSize() ) / staticStructure->
getXDim() );
331 proshade_single yCor = ( staticStructure->
yFrom - this->
yFrom ) *
332 (
static_cast<proshade_double
> ( staticStructure->
getYDimSize() ) / staticStructure->
getYDim() );
333 proshade_single zCor = ( staticStructure->
zFrom - this->
zFrom ) *
334 (
static_cast<proshade_double
> ( staticStructure->
getZDimSize() ) / staticStructure->
getZDim() );
336 ( trsX *
static_cast<proshade_double
> ( staticStructure->
getXDimSize() ) / staticStructure->
getXDim() );
338 ( trsY *
static_cast<proshade_double
> ( staticStructure->
getYDimSize() ) / staticStructure->
getYDim() );
340 ( trsZ *
static_cast<proshade_double
> ( staticStructure->
getZDimSize() ) / staticStructure->
getZDim() );
341 proshade_single modXMov = xMov;
342 proshade_single modYMov = yMov;
343 proshade_single modZMov = zMov;
◆ getComparisonBand()
proshade_unsign ProSHADE_internal_data::ProSHADE_data::getComparisonBand |
( |
void |
| ) |
|
This function allows access to the maximum band for the comparison.
- Parameters
-
[out] | X | The bandwidth used for this comparison. |
Definition at line 3235 of file ProSHADE_data.cpp.
◆ getCyclicSymmetriesList()
std::vector< proshade_double * > ProSHADE_internal_data::ProSHADE_data::getCyclicSymmetriesList |
( |
ProSHADE_settings * |
settings | ) |
|
This function obtains a list of all C symmetries from already computed self-rotation map.
This function starts by finding all peaks in the self-rotation map, which are outliers in terms of height. It then proceeds to group these by the height, searching for C symmetries in each peak height group (thus making sure symmetries with higher peak heights are found first). The symmetry detection proceeds by detecting possible C symmetry folds and searching whether the all peaks are present to support the prospective C symmetry. If only few are missing, it will even search for the missing peaks. Finally, the function returns all detected symmetries in the order of decreasing average peak height.
- Parameters
-
[in] | settings | A pointer to settings class containing all the information required for symmetry detection. |
Definition at line 191 of file ProSHADE_symmetry.cpp.
194 std::vector< proshade_double* > ret;
211 std::vector< std::vector< proshade_unsign > > detectedCSymmetries;
212 for ( proshade_signed iter =
static_cast<proshade_unsign
> ( peakGroupsBoundaries.size() - 1 ); iter >= 0; iter-- )
215 std::vector< proshade_double* > symPeaks;
216 for ( proshade_unsign it = 0; it < static_cast<proshade_unsign> ( peaksAA.size() ); it++ )
226 settings->axisErrToleranceDefault,
237 for ( proshade_unsign iter = 0; iter < static_cast<proshade_unsign> ( peaksAA.size() ); iter++ ) {
delete[] allPeaks.at(iter);
delete[] peaksAA.at(iter); }
◆ getCyclicSymmetriesListFromAngleAxis()
std::vector< proshade_double * > ProSHADE_internal_data::ProSHADE_data::getCyclicSymmetriesListFromAngleAxis |
( |
ProSHADE_settings * |
settings | ) |
|
This function obtains a list of all C symmetries from the angle-axis space mapped rotation function values.
This function oversees the full search for cyclic point groups in the self-rotation function. It starts with finding all prime numbers up to the user specified limit. It then checks for each of the prime numbers whether there is a cyclic point group with fold equal to the prime number.
If any such point groups are found, the function searches for nultiples of these folds, making use of the fact that any structure with cyclic point group of fold n must also contain a point group of fold n/2 if n/2 is an integer. In this manner, cyclic point group with any fold can be found using a small number of specific fold searches, thus eliminating the need to determine which folds should be considered.
- Parameters
-
[in] | settings | A pointer to settings class containing all the information required for symmetry detection. |
[out] | ret | A vector of arrays containing all detected cyclic point groups in the standard ProSHADE format, i.e. [0] = fold, [1] = x-axis, [2] = y-axis, [3] = z-axis, [4] = angle, [5] = average peak height. |
Definition at line 3574 of file ProSHADE_symmetry.cpp.
3578 std::vector< proshade_double* > ret, tmpHolder;
3579 std::vector< proshade_unsign > testedFolds;
3580 proshade_double symThres;
3581 proshade_unsign foldToTest;
3582 bool foldDone, anyNewSyms =
true;
3585 for ( proshade_unsign prIt = 0; prIt < static_cast< proshade_unsign > ( primes.size() ); prIt++ )
3588 std::stringstream hlpSS;
3589 hlpSS <<
"Searching for prime fold symmetry C" << primes.at(prIt) <<
".";
3596 for ( proshade_unsign axIt = 0; axIt < static_cast< proshade_unsign > ( prSyms.size() ); axIt++ )
3599 if ( prSyms.at(axIt)[5] >= symThres )
3609 delete[] prSyms.at(axIt);
3614 if ( ret.size() < 1 ) {
return ( ret ); }
3617 while ( anyNewSyms )
3623 for ( proshade_unsign axIt1 = 0; axIt1 < static_cast< proshade_unsign > ( ret.size() ); axIt1++ )
3625 for ( proshade_unsign axIt2 = 0; axIt2 < static_cast< proshade_unsign > ( ret.size() ); axIt2++ )
3628 foldToTest = ret.at(axIt1)[0] * ret.at(axIt2)[0];
3633 for ( proshade_unsign fIt = 0; fIt < static_cast< proshade_unsign > ( testedFolds.size() ); fIt++ ) {
if ( testedFolds.at(fIt) == foldToTest ) { foldDone =
true;
break; } }
3634 if ( foldDone ) {
continue; }
3638 std::stringstream hlpSS2;
3639 hlpSS2 <<
"Searching for fold combination of detected folds " << ret.at(axIt1)[0] <<
" and " << ret.at(axIt2)[0] <<
", i.e. C" << foldToTest <<
".";
3646 for ( proshade_unsign newAxIt = 0; newAxIt < static_cast< proshade_unsign > ( prSyms.size() ); newAxIt++ )
3648 if ( prSyms.at(newAxIt)[5] >= symThres )
3658 delete[] prSyms.at(newAxIt);
3664 if ( tmpHolder.size() > 0 )
3666 for ( proshade_unsign tmpIt = 0; tmpIt < static_cast< proshade_unsign > ( tmpHolder.size() ); tmpIt++ )
3669 delete[] tmpHolder.at(tmpIt);
3673 tmpHolder.clear ( );
◆ getDihedralSymmetriesList()
std::vector< proshade_double * > ProSHADE_internal_data::ProSHADE_data::getDihedralSymmetriesList |
( |
ProSHADE_settings * |
settings, |
|
|
std::vector< proshade_double * > * |
CSymList |
|
) |
| |
This function obtains a list of all D symmetries from already computed C symmetries list.
This function simply returns a vector of C symmetry pairs which are perpendicular to each other (and therefore form dihedral symmetry). The vector contains arrays of 12 double numbers with the following format: [0] = Fold of axis 1; [1] = X-axis of axis 1; [2] Y-axis of axis 1; [3] = Z-axis of axis 1; [4] = angle of axis 1; [5] = average peak height of axis 1; [6] = Fold of axis 2; [7] = X-axis of axis 2; [8] Y-axis of axis 2; [9] = Z-axis of axis 2; [10] = angle of axis 2; [11] = average peak height of axis 2. Note that the larger fold axis is listed first in this format.
- Parameters
-
[in] | settings | A pointer to settings class containing all the information required for symmetry detection. |
[in] | CSymList | A vector containing the already detected Cyclic symmetries. |
Definition at line 1222 of file ProSHADE_symmetry.cpp.
1225 std::vector< proshade_double* > ret;
1226 proshade_double dotProduct;
1232 if ( CSymList->size() < 2 ) {
return ( ret ); }
1235 for ( proshade_unsign ax1 = 0; ax1 < static_cast<proshade_unsign> ( CSymList->size() ); ax1++ )
1238 if ( CSymList->at(ax1)[5] < settings->
minSymPeak ) {
continue; }
1240 for ( proshade_unsign ax2 = 1; ax2 < static_cast<proshade_unsign> ( CSymList->size() ); ax2++ )
1243 if ( ax1 >= ax2 ) {
continue; }
1246 if ( CSymList->at(ax2)[5] < settings->
minSymPeak ) {
continue; }
1250 &CSymList->at(ax1)[3], &CSymList->at(ax2)[1],
1251 &CSymList->at(ax2)[2], &CSymList->at(ax2)[3] );
1257 if ( CSymList->at(ax1)[0] >= CSymList->at(ax2)[0] )
1261 std::vector< proshade_unsign > DSymInd;
1271 std::vector< proshade_unsign > DSymInd;
1281 std::stringstream hlpSS;
1282 hlpSS <<
"Detected " << ret.size() <<
" D symmetries.";
◆ getEMatrixByBand()
proshade_complex ** ProSHADE_internal_data::ProSHADE_data::getEMatrixByBand |
( |
proshade_unsign |
band | ) |
|
This function allows access to E matrix for a particular band.
- Parameters
-
[in] | band | The band for which the E matrix subset order * order should be returned. |
[out] | X | Pointer to pointer of complex matrix with dimensions order * order of the E matrices. |
Definition at line 3183 of file ProSHADE_data.cpp.
◆ getEMatrixValue()
void ProSHADE_internal_data::ProSHADE_data::getEMatrixValue |
( |
proshade_unsign |
band, |
|
|
proshade_unsign |
order1, |
|
|
proshade_unsign |
order2, |
|
|
proshade_double * |
valueReal, |
|
|
proshade_double * |
valueImag |
|
) |
| |
This function allows access to E matrix by knowing the band, order1 and order2 indices.
- Parameters
-
[in] | band | The band for which the E matrix value should be returned. |
[in] | order1 | The first order for which the E matrix value should be returned. |
[in] | order2 | The second order for which the E matrix value should be returned. |
[in] | valueReal | The proshade_double number pointer to where the real part of the value will be saved. |
[in] | valueImag | The proshade_double number pointer to where the imaginary part of the value will be saved. |
Definition at line 3198 of file ProSHADE_data.cpp.
3201 *valueReal = this->
eMatrices[band][order1][order2][0];
3202 *valueImag = this->
eMatrices[band][order1][order2][1];
◆ getIcosahedralSymmetriesList()
std::vector< proshade_double * > ProSHADE_internal_data::ProSHADE_data::getIcosahedralSymmetriesList |
( |
ProSHADE_settings * |
settings, |
|
|
std::vector< proshade_double * > * |
CSymList |
|
) |
| |
This function obtains a list of all I symmetry axes from the already computed C symmetries list.
This function starts by checking if there is a pair of C3 and C4 symmetries with the octahedron dihedral angle ( acos ( 1/sqrt(3) ) ). If so, it will then assume existence of octahedral symmetry and it will search for three C4 axes, four C3 axes and six C2 axes with the correct angle to each other and within the group. If all required axes are detected, it will return a list of 13 axes, otherwise it will return empty or shorter list. Automated missing symmetry axis detection is also included.
- Parameters
-
[in] | settings | A pointer to settings class containing all the information required for symmetry detection. |
[in] | CSymList | A vector containing the already detected Cyclic symmetries. |
Definition at line 2629 of file ProSHADE_symmetry.cpp.
2632 std::vector< proshade_double* > ret;
2651 for ( proshade_unsign csIt = 0; csIt < static_cast<proshade_unsign> ( CSymList->size() ); csIt++ )
2653 for ( proshade_unsign retIt = 0; retIt < static_cast<proshade_unsign> ( ret.size() ); retIt++ )
2655 if ( ( CSymList->at(csIt)[0] == ret.at(retIt)[0] ) &&
2656 ( CSymList->at(csIt)[1] == ret.at(retIt)[1] ) &&
2657 ( CSymList->at(csIt)[2] == ret.at(retIt)[2] ) &&
2658 ( CSymList->at(csIt)[3] == ret.at(retIt)[3] ) &&
2659 ( CSymList->at(csIt)[4] == ret.at(retIt)[4] ) &&
2660 ( CSymList->at(csIt)[5] == ret.at(retIt)[5] ) )
◆ getImagEMatrixValuesForLM()
void ProSHADE_internal_data::ProSHADE_data::getImagEMatrixValuesForLM |
( |
proshade_signed |
band, |
|
|
proshade_signed |
order1, |
|
|
double * |
eMatsLMImag, |
|
|
int |
len |
|
) |
| |
This function fills the input array with the imaginary E matrix values for particular band and order1 (l as opposed to l').
- Parameters
-
[in] | band | The band for which the imaginary E matrix values are requested. |
[in] | order | The order for which the imaginary E matrix values are requested. |
[in] | eMatsLMImag | The array to which the values will be written into. |
[in] | len | The lenght of the array. |
Definition at line 3556 of file ProSHADE_data.cpp.
3559 for ( proshade_unsign iter = 0; iter < static_cast<proshade_unsign> ( len ); iter++ )
3561 eMatsLMImag[iter] =
static_cast<double> ( this->
eMatrices[band][order1][iter][1] );
◆ getImagRotFunction()
void ProSHADE_internal_data::ProSHADE_data::getImagRotFunction |
( |
double * |
rotFunImag, |
|
|
int |
len |
|
) |
| |
This function fills the input array with the imaginary rotation function values.
- Parameters
-
[in] | rotFunImag | The array to which the values will be written into. |
[in] | len | The lenght of the array. |
Definition at line 3643 of file ProSHADE_data.cpp.
3646 for ( proshade_unsign iter = 0; iter < static_cast<proshade_unsign> ( len ); iter++ )
3648 rotFunImag[iter] =
static_cast<double> ( this->
so3CoeffsInverse[iter][1] );
◆ getImagSO3Coeffs()
void ProSHADE_internal_data::ProSHADE_data::getImagSO3Coeffs |
( |
double * |
so3CoefsImag, |
|
|
int |
len |
|
) |
| |
This function fills the input array with the imaginary SO(3) coefficient values.
- Parameters
-
[in] | so3CoefsImag | The array to which the values will be written into. |
[in] | len | The lenght of the array. |
Definition at line 3592 of file ProSHADE_data.cpp.
3595 for ( proshade_unsign iter = 0; iter < static_cast<proshade_unsign> ( len ); iter++ )
3597 so3CoefsImag[iter] =
static_cast<double> ( this->
so3Coeffs[iter][1] );
◆ getImagSphHarmValue()
proshade_double * ProSHADE_internal_data::ProSHADE_data::getImagSphHarmValue |
( |
proshade_unsign |
band, |
|
|
proshade_unsign |
order, |
|
|
proshade_unsign |
shell |
|
) |
| |
This function allows access to the private internal imaginary spherical harmonics values.
- Parameters
-
[out] | X | Pointer to the value of the internal private spherical harmonics imaginary value of the given index. |
Definition at line 3123 of file ProSHADE_data.cpp.
3126 return ( &this->
sphericalHarmonics[shell][seanindex (
static_cast<proshade_signed
> ( order ) -
static_cast<proshade_signed
> ( band ),
3128 this->
spheres[shell]->getLocalBandwidth() )][1] );
◆ getImagTranslationFunction()
void ProSHADE_internal_data::ProSHADE_data::getImagTranslationFunction |
( |
double * |
trsFunImag, |
|
|
int |
len |
|
) |
| |
This function fills the input array with the imaginary translation function values.
- Parameters
-
[in] | trsFunImag | The array to which the values will be written into. |
[in] | len | The lenght of the array. |
Definition at line 3679 of file ProSHADE_data.cpp.
3682 for ( proshade_unsign iter = 0; iter < static_cast<proshade_unsign> ( len ); iter++ )
3684 trsFunImag[iter] =
static_cast<double> ( this->
translationMap[iter][1] );
◆ getIntegrationWeight()
proshade_double ProSHADE_internal_data::ProSHADE_data::getIntegrationWeight |
( |
void |
| ) |
|
This function allows access to the integration weight for the object.
- Parameters
-
[out] | X | The integration weight for the object or 0.0 if not yet computed. |
Definition at line 3147 of file ProSHADE_data.cpp.
◆ getInternalMap()
proshade_double *& ProSHADE_internal_data::ProSHADE_data::getInternalMap |
( |
void |
| ) |
|
This function allows access to the first map array value address.
- Parameters
-
[out] | internalMap | Pointer to the first position in the internal map array. |
Definition at line 3415 of file ProSHADE_data.cpp.
◆ getInvSO3Coeffs()
proshade_complex * ProSHADE_internal_data::ProSHADE_data::getInvSO3Coeffs |
( |
void |
| ) |
|
This function allows access to the inverse SO(3) coefficients array.
- Parameters
-
[out] | X | The internal inverse SO(3) coefficients array variable. |
Definition at line 3213 of file ProSHADE_data.cpp.
◆ getMapValue()
proshade_double ProSHADE_internal_data::ProSHADE_data::getMapValue |
( |
proshade_unsign |
pos | ) |
|
This function returns the internal map representation value of a particular array position.
- Parameters
-
[in] | pos | The position in the map array, of which the value should be returned. |
[out] | X | The internal map representation value at position pos. |
Definition at line 2976 of file ProSHADE_data.cpp.
◆ getMaxBand()
proshade_unsign ProSHADE_internal_data::ProSHADE_data::getMaxBand |
( |
void |
| ) |
|
This function returns the maximum band value for the object.
- Parameters
-
[out] | X | The largest number of bands used in any shell of the object. |
Definition at line 2986 of file ProSHADE_data.cpp.
◆ getMaxSpheres()
proshade_unsign ProSHADE_internal_data::ProSHADE_data::getMaxSpheres |
( |
void |
| ) |
|
This function returns the number of spheres which contain the whole object.
- Parameters
-
[out] | X | The total number of spheres to which the structure is mapped. |
Definition at line 2965 of file ProSHADE_data.cpp.
◆ getNoRecommendedSymmetryAxes()
proshade_unsign ProSHADE_internal_data::ProSHADE_data::getNoRecommendedSymmetryAxes |
( |
ProSHADE_settings * |
settings | ) |
|
This function returns the number of detected recommended symmetry axes.
- Parameters
-
[in] | settings | A pointer to settings class containing all the information required for map manipulation. |
[out] | val | The length of the recommended symmetry axes vector. |
Definition at line 3755 of file ProSHADE_data.cpp.
3758 return (
static_cast<proshade_unsign
> ( settings->
detectedSymmetry.size() ) );
◆ getOctahedralSymmetriesList()
std::vector< proshade_double * > ProSHADE_internal_data::ProSHADE_data::getOctahedralSymmetriesList |
( |
ProSHADE_settings * |
settings, |
|
|
std::vector< proshade_double * > * |
CSymList |
|
) |
| |
This function obtains a list of all O symmetry axes from the already computed C symmetries list.
This function starts by checking if there is a pair of C3 and C4 symmetries with the octahedron dihedral angle ( acos ( 1/sqrt(3) ) ). If so, it will then assume existence of octahedral symmetry and it will search for three C4 axes, four C3 axes and six C2 axes with the correct angle to each other and within the group. If all required axes are detected, it will return a list of 13 axes, otherwise it will return empty or shorter list. Automated missing symmetry axis detection is also included.
- Parameters
-
[in] | settings | A pointer to settings class containing all the information required for symmetry detection. |
[in] | CSymList | A vector containing the already detected Cyclic symmetries. |
Definition at line 2093 of file ProSHADE_symmetry.cpp.
2096 std::vector< proshade_double* > ret;
2115 for ( proshade_unsign csIt = 0; csIt < static_cast<proshade_unsign> ( CSymList->size() ); csIt++ )
2117 for ( proshade_unsign retIt = 0; retIt < static_cast<proshade_unsign> ( ret.size() ); retIt++ )
2119 if ( ( CSymList->at(csIt)[0] == ret.at(retIt)[0] ) &&
2120 ( CSymList->at(csIt)[1] == ret.at(retIt)[1] ) &&
2121 ( CSymList->at(csIt)[2] == ret.at(retIt)[2] ) &&
2122 ( CSymList->at(csIt)[3] == ret.at(retIt)[3] ) &&
2123 ( CSymList->at(csIt)[4] == ret.at(retIt)[4] ) &&
2124 ( CSymList->at(csIt)[5] == ret.at(retIt)[5] ) )
◆ getOverlayRotationFunction()
This function computes the overlay rotation function (i.e. the correlation function in SO(3) space).
This function assumes it is called from the object to which the rotation function is to be assigned to (presumably the moving rather than static structure). It starts by computing the E matrices, normalising these using the Patterson-like normalisation, generating SO(3) coefficients from the E matrices and finally computing their inverse SOFT transform to get the rotation function.
- Parameters
-
[in] | settings | A pointer to settings class containing all the information required for map symmetry detection. |
[in] | obj2 | A pointer to the data class object of the other ( static ) structure. |
Definition at line 35 of file ProSHADE_overlay.cpp.
◆ getPredictedIcosahedralSymmetriesList()
std::vector< proshade_double * > ProSHADE_internal_data::ProSHADE_data::getPredictedIcosahedralSymmetriesList |
( |
ProSHADE_settings * |
settings, |
|
|
std::vector< proshade_double * > * |
CSymList, |
|
|
proshade_double |
matrixTolerance |
|
) |
| |
This function predicts a list of all I symmetry axes from the already computed C symmetries list.
This function starts by checking if there is a pair of C3 and C5 symmetries with the icosahedron dihedral angle ( acos( sqrt ( 5.0 ) / 3.0 ) ). If found, it calls the predictIcosAxes() function, which uses the knowledge of the two axes (C5 and C3) which are closest to the dihedral angle to generate their combinations point group elements. These can in turn be used to generate the remainder of the axes (iteratively). Once complete, all the predicted axes are in the ret variable.
\Warning This function does not check if the correct number of C axes was found, it is assumed this will be checked when the determination of which symmetry was found.
- Parameters
-
[in] | settings | A pointer to settings class containing all the information required for symmetry detection. |
[in] | CSymList | A vector containing the already detected Cyclic symmetries. |
[in] | matrixTolerance | The maximum allowed trace difference for two matrices to be still considered the same. |
[out] | ret | A vector of all the detected axes in the standard ProSHADE format with height either the detected value (for the detected ones) or 0 for the predicted ones. |
Definition at line 2692 of file ProSHADE_symmetry.cpp.
2695 std::vector< proshade_double* > ret;
2706 std::cout <<
"The Icos search is now complete..." << std::endl;
◆ getPredictedOctahedralSymmetriesList()
std::vector< proshade_double * > ProSHADE_internal_data::ProSHADE_data::getPredictedOctahedralSymmetriesList |
( |
ProSHADE_settings * |
settings, |
|
|
std::vector< proshade_double * > * |
CSymList, |
|
|
proshade_double |
matrixTolerance |
|
) |
| |
This function predicts a list of all O symmetry axes from the already computed C symmetries list.
This function starts by checking if there is a pair of C3 and C4 symmetries with the octahedron dihedral angle ( acos( 1.0 / sqrt ( 3.0 ) ). If found, it calls the predictOctaAxes() function, which uses the knowledge of the two axes (C4 and C3) which are closest to the dihedral angle to generate their combinations point group elements. These can in turn be used to generate the remainder of the axes (iteratively). Once complete, all the predicted axes are in the ret variable.
\Warning This function does not check if the correct number of C axes was found, it is assumed this will be checked when the determination of which symmetry was found.
- Parameters
-
[in] | settings | A pointer to settings class containing all the information required for symmetry detection. |
[in] | CSymList | A vector containing the already detected Cyclic symmetries. |
[in] | matrixTolerance | The maximum allowed trace difference for two matrices to be still considered the same. |
[out] | ret | A vector of all the detected axes in the standard ProSHADE format with height either the detected value (for the detected ones) or 0 for the predicted ones. |
Definition at line 2731 of file ProSHADE_symmetry.cpp.
2734 std::vector< proshade_double* > ret;
◆ getRealEMatrixValuesForLM()
void ProSHADE_internal_data::ProSHADE_data::getRealEMatrixValuesForLM |
( |
proshade_signed |
band, |
|
|
proshade_signed |
order1, |
|
|
double * |
eMatsLMReal, |
|
|
int |
len |
|
) |
| |
This function fills the input array with the real E matrix values for particular band and order1 (l as opposed to l').
- Parameters
-
[in] | band | The band for which the real E matrix values are requested. |
[in] | order | The order for which the real E matrix values are requested. |
[in] | eMatsLMReal | The array to which the values will be written into. |
[in] | len | The lenght of the array. |
Definition at line 3536 of file ProSHADE_data.cpp.
3539 for ( proshade_unsign iter = 0; iter < static_cast<proshade_unsign> ( len ); iter++ )
3541 eMatsLMReal[iter] =
static_cast<double> ( this->
eMatrices[band][order1][iter][0] );
◆ getRealRotFunction()
void ProSHADE_internal_data::ProSHADE_data::getRealRotFunction |
( |
double * |
rotFunReal, |
|
|
int |
len |
|
) |
| |
This function fills the input array with the real rotation function values.
- Parameters
-
[in] | rotFunReal | The array to which the values will be written into. |
[in] | len | The lenght of the array. |
Definition at line 3625 of file ProSHADE_data.cpp.
3628 for ( proshade_unsign iter = 0; iter < static_cast<proshade_unsign> ( len ); iter++ )
3630 rotFunReal[iter] =
static_cast<double> ( this->
so3CoeffsInverse[iter][0] );
◆ getRealSO3Coeffs()
void ProSHADE_internal_data::ProSHADE_data::getRealSO3Coeffs |
( |
double * |
so3CoefsReal, |
|
|
int |
len |
|
) |
| |
This function fills the input array with the real SO(3) coefficient values.
- Parameters
-
[in] | so3CoefsReal | The array to which the values will be written into. |
[in] | len | The lenght of the array. |
Definition at line 3574 of file ProSHADE_data.cpp.
3577 for ( proshade_unsign iter = 0; iter < static_cast<proshade_unsign> ( len ); iter++ )
3579 so3CoefsReal[iter] =
static_cast<double> ( this->
so3Coeffs[iter][0] );
◆ getRealSphHarmValue()
proshade_double * ProSHADE_internal_data::ProSHADE_data::getRealSphHarmValue |
( |
proshade_unsign |
band, |
|
|
proshade_unsign |
order, |
|
|
proshade_unsign |
shell |
|
) |
| |
This function allows access to the private internal real spherical harmonics values.
- Parameters
-
[out] | X | Pointer to the value of the internal private spherical harmonics real value of the given index. |
Definition at line 3110 of file ProSHADE_data.cpp.
3113 return ( &this->
sphericalHarmonics[shell][seanindex (
static_cast<proshade_signed
> ( order ) -
static_cast<proshade_signed
> ( band ),
3115 this->
spheres[shell]->getLocalBandwidth() )][0] );
◆ getRealTranslationFunction()
void ProSHADE_internal_data::ProSHADE_data::getRealTranslationFunction |
( |
double * |
trsFunReal, |
|
|
int |
len |
|
) |
| |
This function fills the input array with the real translation function values.
- Parameters
-
[in] | trsFunReal | The array to which the values will be written into. |
[in] | len | The lenght of the array. |
Definition at line 3661 of file ProSHADE_data.cpp.
3664 for ( proshade_unsign iter = 0; iter < static_cast<proshade_unsign> ( len ); iter++ )
3666 trsFunReal[iter] =
static_cast<double> ( this->
translationMap[iter][0] );
◆ getReBoxBoundaries()
void ProSHADE_internal_data::ProSHADE_data::getReBoxBoundaries |
( |
ProSHADE_settings * |
settings, |
|
|
proshade_signed *& |
ret |
|
) |
| |
This function finds the boundaries enclosing positive map values and adds some extra space.
This function firstly finds the boundaries which enclose the positive map values and then it proceeds to add a given amount of space to all dimensions (positive and negative) to make sure the map does not end exactly at the bounds. It returns the new boundaries in the ret variable if they are smaller than the original bounds, or just the original bounds in case decrease was not achieved.
- Parameters
-
[in] | settings | A pointer to settings class containing all the information required for reading in the map. |
[in] | ret | A pointer to proshade_signed array of 6 storing the results - (0 = minX; 1 = maxX; 2 = minY; 3 = maxY; 4 - minZ; 5 = maxZ). |
Definition at line 1035 of file ProSHADE_data.cpp.
1043 for ( proshade_unsign iter = 0; iter < 6; iter++ ) { ret[iter] = settings->
forceBounds[iter]; }
1060 std::stringstream ssHlp;
1061 ssHlp <<
"New boundaries are: " << ret[1] - ret[0] + 1 <<
" x " << ret[3] - ret[2] + 1 <<
" x " << ret[5] - ret[4] + 1;
1067 for ( proshade_unsign iter = 0; iter < 6; iter++ ) { settings->
forceBounds[iter] = ret[iter]; }
◆ getRecommendedSymmetryFold()
proshade_unsign ProSHADE_internal_data::ProSHADE_data::getRecommendedSymmetryFold |
( |
ProSHADE_settings * |
settings | ) |
|
This function simply returns the detected recommended symmetry fold.
- Parameters
-
[in] | settings | A pointer to settings class containing all the information required for map manipulation. |
Definition at line 3743 of file ProSHADE_data.cpp.
◆ getRecommendedSymmetryType()
std::string ProSHADE_internal_data::ProSHADE_data::getRecommendedSymmetryType |
( |
ProSHADE_settings * |
settings | ) |
|
This function simply returns the detected recommended symmetry type.
- Parameters
-
[in] | settings | A pointer to settings class containing all the information required for map manipulation. |
Definition at line 3732 of file ProSHADE_data.cpp.
◆ getRotMatrixFromRotFunInds()
void ProSHADE_internal_data::ProSHADE_data::getRotMatrixFromRotFunInds |
( |
proshade_signed |
aI, |
|
|
proshade_signed |
bI, |
|
|
proshade_signed |
gI, |
|
|
double * |
rotMat, |
|
|
int |
len |
|
) |
| |
This function takes rotation function indices, converts them to Euler angles and these to rotation matrix, which it then returns.
- Parameters
-
[in] | aI | The index along the Euler alpha dimension. |
[in] | bI | The index along the Euler beta dimension. |
[in] | gI | The index along the Euler gamma dimension. |
[in] | rotMat | The array to which the rotation matrix will be written into. |
[in] | len | The lenght of the array (must be 9). |
Definition at line 3700 of file ProSHADE_data.cpp.
3703 proshade_double eA, eB, eG;
3707 proshade_double* rMat = NULL;
3708 rMat =
new proshade_double[9];
3715 for ( proshade_unsign iter = 0; iter < static_cast<proshade_unsign> ( len ); iter++ )
3717 rotMat[iter] =
static_cast<double> ( rMat[iter] );
◆ getRRPValue()
proshade_double ProSHADE_internal_data::ProSHADE_data::getRRPValue |
( |
proshade_unsign |
band, |
|
|
proshade_unsign |
sh1, |
|
|
proshade_unsign |
sh2 |
|
) |
| |
This function allows access to the priva internal RRP matrices.
- Parameters
-
[out] | X | The value of the internal private RRP matrix for the given indices. |
Definition at line 2996 of file ProSHADE_data.cpp.
◆ getShellBandwidth()
proshade_unsign ProSHADE_internal_data::ProSHADE_data::getShellBandwidth |
( |
proshade_unsign |
shell | ) |
|
This function allows access to the bandwidth of a particular shell.
- Parameters
-
[in] | shell | The index of the shell for which the bandwidth is required. |
[out] | X | The bandwidth of the requested shell. |
Definition at line 3159 of file ProSHADE_data.cpp.
3162 return ( this->
spheres[shell]->getLocalBandwidth ( ) );
◆ getSO3Coeffs()
proshade_complex * ProSHADE_internal_data::ProSHADE_data::getSO3Coeffs |
( |
void |
| ) |
|
This function allows access to the SO(3) coefficients array.
- Parameters
-
[out] | X | The internal SO(3) coefficients array variable. |
Definition at line 3224 of file ProSHADE_data.cpp.
◆ getSpherePositions()
void ProSHADE_internal_data::ProSHADE_data::getSpherePositions |
( |
ProSHADE_settings * |
settings | ) |
|
This function determines the sphere positions (radii) for sphere mapping.
This function determines the radii of the concentric spheres (as measured from the centre of the map). This is done by checking if these values have already been as and if not, then the radii are placed between points of the map starting between the centre point and its neighbours and then adding spheres until the most outlying diagonal point is covered.
- Parameters
-
[in] | settings | A pointer to settings class containing all the information required for map manipulation. |
Definition at line 1442 of file ProSHADE_data.cpp.
1447 std::stringstream hlpSS;
1448 hlpSS <<
"The sphere distances were determined as " << this->
spherePos.at(0);
1449 for ( proshade_unsign iter = 1; iter < static_cast<proshade_unsign> ( this->
spherePos.size() ); iter++ ) { hlpSS <<
"; " << this->
spherePos.at(iter); }
1450 hlpSS <<
" Angstroms.";
1458 proshade_unsign midDim = 0;
1463 proshade_single maxDiag = std::sqrt ( std::pow (
static_cast<proshade_single
> ( maxDim ), 2.0 ) +
1464 std::pow (
static_cast<proshade_single
> ( midDim ), 2.0 ) );
1467 for ( proshade_single iter = 0.5; ( iter * settings->
maxSphereDists ) < ( maxDiag / 2.0 ); iter += 1.0 )
1476 std::stringstream hlpSS;
1477 hlpSS <<
"The sphere distances were determined as " << this->
spherePos.at(0);
1478 for ( proshade_unsign iter = 1; iter < static_cast<proshade_unsign> ( this->
spherePos.size() ); iter++ ) { hlpSS <<
"; " << this->
spherePos.at(iter); }
1479 hlpSS <<
" Angstroms.";
◆ getSpherePosValue()
proshade_double ProSHADE_internal_data::ProSHADE_data::getSpherePosValue |
( |
proshade_unsign |
shell | ) |
|
This function allows access to sphere positions.
- Parameters
-
[in] | shell | The index of the sphere for which the position (radius) is to be obtained. |
[out] | X | The radius of the sphere with index shell. |
Definition at line 3171 of file ProSHADE_data.cpp.
◆ getSymmetryAxis()
std::vector< std::string > ProSHADE_internal_data::ProSHADE_data::getSymmetryAxis |
( |
ProSHADE_settings * |
settings, |
|
|
proshade_unsign |
axisNo |
|
) |
| |
This function returns a single symmetry axis as a vector of strings from the recommended symmetry axes list.
- Parameters
-
[in] | settings | A pointer to settings class containing all the information required for map symmetry detection. |
[in] | axisNo | The index of the axis to be returned. |
[out] | val | A vector of strings containing the symmetry axis fold, x, y, z axis element, angle and peak height in this order. |
Definition at line 3767 of file ProSHADE_data.cpp.
3770 if (
static_cast<proshade_unsign
> ( settings->
detectedSymmetry.size() ) <= axisNo )
3773 return ( std::vector< std::string > ( ) );
3777 std::vector< std::string > ret;
3780 std::stringstream ssHlp;
◆ getTetrahedralSymmetriesList()
std::vector< proshade_double * > ProSHADE_internal_data::ProSHADE_data::getTetrahedralSymmetriesList |
( |
ProSHADE_settings * |
settings, |
|
|
std::vector< proshade_double * > * |
CSymList |
|
) |
| |
This function obtains a list of all T symmetry axes from the already computed C symmetries list.
This function starts by checking if there are two C3 symmetries with the tetrahedral dihedral angle. If so, it proceeds to search for all seven symmetry axes expected to form a full tetrahedral symmetry. It then returns the list of found symmetries; if full tetrahedral symmetry was found, seven axes (four C3s and three C2s) are returned. If less than seven symmetries are returned, the procedure has failed and no tetrahedral symmetry was found.
- Parameters
-
[in] | settings | A pointer to settings class containing all the information required for symmetry detection. |
[in] | CSymList | A vector containing the already detected Cyclic symmetries. |
Definition at line 1340 of file ProSHADE_symmetry.cpp.
1343 std::vector< proshade_double* > ret;
1359 for ( proshade_unsign csIt = 0; csIt < static_cast<proshade_unsign> ( CSymList->size() ); csIt++ )
1361 for ( proshade_unsign retIt = 0; retIt < static_cast<proshade_unsign> ( ret.size() ); retIt++ )
1363 if ( ( CSymList->at(csIt)[0] == ret.at(retIt)[0] ) &&
1364 ( CSymList->at(csIt)[1] == ret.at(retIt)[1] ) &&
1365 ( CSymList->at(csIt)[2] == ret.at(retIt)[2] ) &&
1366 ( CSymList->at(csIt)[3] == ret.at(retIt)[3] ) &&
1367 ( CSymList->at(csIt)[4] == ret.at(retIt)[4] ) &&
1368 ( CSymList->at(csIt)[5] == ret.at(retIt)[5] ) )
◆ getTranslationFnPointer()
proshade_complex * ProSHADE_internal_data::ProSHADE_data::getTranslationFnPointer |
( |
void |
| ) |
|
This function allows access to the translation function through a pointer.
- Parameters
-
[out] | translationMap | Pointer to the first position in the translation function map array. |
Definition at line 3425 of file ProSHADE_data.cpp.
◆ getWignerMatrixValue()
void ProSHADE_internal_data::ProSHADE_data::getWignerMatrixValue |
( |
proshade_unsign |
band, |
|
|
proshade_unsign |
order1, |
|
|
proshade_unsign |
order2, |
|
|
proshade_double * |
valueReal, |
|
|
proshade_double * |
valueImag |
|
) |
| |
This function allows access to the Wigner D matrix by knowing the band, order1 and order2 indices.
- Parameters
-
[in] | band | The band for which the Wigner D matrix value should be returned. |
[in] | order1 | The first order for which the Wigner D matrix value should be returned. |
[in] | order2 | The second order for which the Wigner D matrix value should be returned. |
[in] | valueReal | The proshade_double number pointer to where the real part of the value will be saved. |
[in] | valueImag | The proshade_double number pointer to where the imaginary part of the value will be saved. |
Definition at line 3250 of file ProSHADE_data.cpp.
◆ getXAxisOrigin()
proshade_signed * ProSHADE_internal_data::ProSHADE_data::getXAxisOrigin |
( |
void |
| ) |
|
This function allows access to the map X axis origin value.
- Parameters
-
[out] | xAxisOrigin | The value of X axis origin for the map. |
Definition at line 3385 of file ProSHADE_data.cpp.
◆ getXDim()
proshade_unsign ProSHADE_internal_data::ProSHADE_data::getXDim |
( |
void |
| ) |
|
This function allows access to the map size in indices along the X axis.
- Parameters
-
[out] | xDimSize | The size of the internal map in indices along the X axis. |
Definition at line 3295 of file ProSHADE_data.cpp.
◆ getXDimSize()
proshade_single ProSHADE_internal_data::ProSHADE_data::getXDimSize |
( |
void |
| ) |
|
This function allows access to the map size in angstroms along the X axis.
- Parameters
-
[out] | xDimSize | The size of the internal map in angstroms along the X axis. |
Definition at line 3265 of file ProSHADE_data.cpp.
◆ getXFromPtr()
proshade_signed * ProSHADE_internal_data::ProSHADE_data::getXFromPtr |
( |
void |
| ) |
|
This function allows access to the map start along the X axis.
- Parameters
-
[out] | xFrom | Pointer to the starting index along the X axis. |
Definition at line 3325 of file ProSHADE_data.cpp.
3328 return ( &this->
xFrom );
◆ getXToPtr()
proshade_signed * ProSHADE_internal_data::ProSHADE_data::getXToPtr |
( |
void |
| ) |
|
This function allows access to the map last position along the X axis.
- Parameters
-
[out] | xFrom | Pointer to the final index along the X axis. |
Definition at line 3355 of file ProSHADE_data.cpp.
3358 return ( &this->
xTo );
◆ getYAxisOrigin()
proshade_signed * ProSHADE_internal_data::ProSHADE_data::getYAxisOrigin |
( |
void |
| ) |
|
This function allows access to the map Y axis origin value.
- Parameters
-
[out] | yAxisOrigin | The value of Y axis origin for the map. |
Definition at line 3395 of file ProSHADE_data.cpp.
◆ getYDim()
proshade_unsign ProSHADE_internal_data::ProSHADE_data::getYDim |
( |
void |
| ) |
|
This function allows access to the map size in indices along the Y axis.
- Parameters
-
[out] | xDimSize | The size of the internal map in indices along the Y axis. |
Definition at line 3305 of file ProSHADE_data.cpp.
◆ getYDimSize()
proshade_single ProSHADE_internal_data::ProSHADE_data::getYDimSize |
( |
void |
| ) |
|
This function allows access to the map size in angstroms along the Y axis.
- Parameters
-
[out] | xDimSize | The size of the internal map in angstroms along the Y axis. |
Definition at line 3275 of file ProSHADE_data.cpp.
◆ getYFromPtr()
proshade_signed * ProSHADE_internal_data::ProSHADE_data::getYFromPtr |
( |
void |
| ) |
|
This function allows access to the map start along the Y axis.
- Parameters
-
[out] | yFrom | Pointer to the starting index along the Y axis. |
Definition at line 3335 of file ProSHADE_data.cpp.
3338 return ( &this->
yFrom );
◆ getYToPtr()
proshade_signed * ProSHADE_internal_data::ProSHADE_data::getYToPtr |
( |
void |
| ) |
|
This function allows access to the map last position along the Y axis.
- Parameters
-
[out] | yFrom | Pointer to the final index along the Y axis. |
Definition at line 3365 of file ProSHADE_data.cpp.
3368 return ( &this->
yTo );
◆ getZAxisOrigin()
proshade_signed * ProSHADE_internal_data::ProSHADE_data::getZAxisOrigin |
( |
void |
| ) |
|
This function allows access to the map Z axis origin value.
- Parameters
-
[out] | zAxisOrigin | The value of Z axis origin for the map. |
Definition at line 3405 of file ProSHADE_data.cpp.
◆ getZDim()
proshade_unsign ProSHADE_internal_data::ProSHADE_data::getZDim |
( |
void |
| ) |
|
This function allows access to the map size in indices along the Z axis.
- Parameters
-
[out] | xDimSize | The size of the internal map in indices along the Z axis. |
Definition at line 3315 of file ProSHADE_data.cpp.
◆ getZDimSize()
proshade_single ProSHADE_internal_data::ProSHADE_data::getZDimSize |
( |
void |
| ) |
|
This function allows access to the map size in angstroms along the Z axis.
- Parameters
-
[out] | xDimSize | The size of the internal map in angstroms along the Z axis. |
Definition at line 3285 of file ProSHADE_data.cpp.
◆ getZFromPtr()
proshade_signed * ProSHADE_internal_data::ProSHADE_data::getZFromPtr |
( |
void |
| ) |
|
This function allows access to the map start along the Z axis.
- Parameters
-
[out] | zFrom | Pointer to the starting index along the Z axis. |
Definition at line 3345 of file ProSHADE_data.cpp.
3348 return ( &this->
zFrom );
◆ getZToPtr()
proshade_signed * ProSHADE_internal_data::ProSHADE_data::getZToPtr |
( |
void |
| ) |
|
This function allows access to the map last position along the Z axis.
- Parameters
-
[out] | zFrom | Pointer to the final index along the Z axis. |
Definition at line 3375 of file ProSHADE_data.cpp.
3378 return ( &this->
zTo );
◆ interpolateMapFromSpheres()
void ProSHADE_internal_data::ProSHADE_data::interpolateMapFromSpheres |
( |
ProSHADE_settings * |
settings, |
|
|
proshade_double *& |
densityMapRotated |
|
) |
| |
This function interpolates the density map from the sphere mapped data.
- Parameters
-
[in] | settings | The settings object specifying how exactly the rotation is to be done. |
[in] | densityMapRotated | The pointer to allocated memory where the new map values will be held. |
Definition at line 1042 of file ProSHADE_overlay.cpp.
1045 proshade_double rad = 0.0, lon = 0.0, lat = 0.0, newU = 0.0, newV = 0.0, newW = 0.0;
1046 proshade_unsign lowerLonL = 0, upperLonL = 0, lowerLonU = 0, upperLonU = 0, lowerLatL = 0, upperLatL = 0, lowerLatU = 0, upperLatU = 0, lowerShell = 0, upperShell = 0;
1047 proshade_double x00 = 0.0, x01 = 0.0, x10 = 0.0, x11 = 0.0, distLLon = 0.0, distLLat = 0.0, distLRad = 0.0, valLLon = 0.0, valULon = 0.0;
1048 proshade_double lowerShellValue = 0.0, upperShellValue = 0.0;
1049 proshade_double xSamplingRate =
static_cast<proshade_double
> ( this->
xDimSize ) / this->
xDimIndices;
1050 proshade_double ySamplingRate =
static_cast<proshade_double
> ( this->
yDimSize ) / this->
yDimIndices;
1051 proshade_double zSamplingRate =
static_cast<proshade_double
> ( this->
zDimSize ) / this->
zDimIndices;
1052 proshade_signed arrPos;
1053 std::vector<proshade_double> lonCOU, latCOU, lonCOL, latCOL;
1055 for ( proshade_signed uIt = 0; uIt < static_cast<proshade_signed> (this->
xDimIndices); uIt++ )
1057 for ( proshade_signed vIt = 0; vIt < static_cast<proshade_signed> (this->
yDimIndices); vIt++ )
1059 for ( proshade_signed wIt = 0; wIt < static_cast<proshade_signed> (this->
zDimIndices); wIt++ )
1062 newU =
static_cast<proshade_double
> ( uIt - (
static_cast<proshade_signed
> (this->
xDimIndices) / 2 ) );
1063 newV =
static_cast<proshade_double
> ( vIt - (
static_cast<proshade_signed
> (this->
yDimIndices) / 2 ) );
1064 newW =
static_cast<proshade_double
> ( wIt - (
static_cast<proshade_signed
> (this->
zDimIndices) / 2 ) );
1067 if ( ( newU == 0.0 ) && ( newV == 0.0 ) && ( newW == 0.0 ) )
1070 densityMapRotated[arrPos] = this->
internalMap[arrPos];
1075 rad = sqrt ( pow( ( newU * xSamplingRate ), 2.0 ) +
1076 pow( ( newV * ySamplingRate ), 2.0 ) +
1077 pow( ( newW * zSamplingRate ), 2.0 ) );
1078 lon = atan2 ( ( newV * ySamplingRate ), ( newU * xSamplingRate ) );
1079 lat = asin ( ( newW * zSamplingRate ) / rad );
1082 if ( rad != rad ) { rad = 0.0; }
1083 if ( lon != lon ) { lon = 0.0; }
1084 if ( lat != lat ) { lat = 0.0; }
1089 for ( proshade_unsign iter = 0; iter < (this->
noSpheres-1); iter++ )
1094 upperShell = iter+1;
1099 if ( upperShell == 0 )
1102 densityMapRotated[arrPos] = 0.0;
1107 lonCOL.clear(); latCOL.clear(); lonCOU.clear(); latCOU.clear();
1112 for ( proshade_unsign iter = 0; iter < static_cast<proshade_unsign> ( lonCOL.size() ); iter++ )
1114 if ( iter == (
static_cast<proshade_unsign
> ( lonCOL.size() ) - 1 ) )
1120 if ( ( std::floor(10000. * lonCOL.at(iter)) <= std::floor(10000. * lon) ) && ( std::floor(10000. * lonCOL.at(iter+1)) > std::floor(10000. * lon) ) )
1127 if ( upperLonL == this->
spheres[lowerShell]->getLocalAngRes() ) { upperLonL = 0; }
1129 for ( proshade_unsign iter = 0; iter < static_cast<proshade_unsign> ( lonCOU.size() ); iter++ )
1131 if ( iter == (
static_cast<proshade_unsign
> ( lonCOU.size() ) - 1 ) )
1137 if ( ( std::floor(10000. * lonCOU.at(iter)) <= std::floor(10000. * lon) ) && ( std::floor(10000. * lonCOU.at(iter+1)) > std::floor(10000. * lon) ) )
1144 if ( upperLonU == this->
spheres[upperShell]->getLocalAngRes() ) { upperLonU = 0; }
1146 for ( proshade_unsign iter = 0; iter < static_cast<proshade_unsign> ( latCOL.size() ); iter++ )
1148 if ( iter == (
static_cast<proshade_unsign
> ( latCOL.size() ) - 1 ) )
1154 if ( ( std::floor(10000. * latCOL.at(iter)) <= std::floor(10000. * lat) ) && ( std::floor(10000. * latCOL.at(iter+1)) > std::floor(10000. * lat) ) )
1161 if ( upperLatL == this->
spheres[lowerShell]->getLocalAngRes() ) { upperLatL = 0; }
1163 for ( proshade_unsign iter = 0; iter < static_cast<proshade_unsign> ( latCOU.size() ); iter++ )
1165 if ( iter == (
static_cast<proshade_unsign
> ( latCOU.size() ) - 1 ) )
1171 if ( ( std::floor(10000. * latCOU.at(iter)) <= std::floor(10000. * lat) ) && ( std::floor(10000. * latCOU.at(iter+1)) > std::floor(10000. * lat) ) )
1178 if ( upperLatU == this->
spheres[upperShell]->getLocalAngRes() ) { upperLatU = 0; }
1186 distLLon = std::abs ( lon - lonCOL.at(lowerLonL) ) / ( std::abs( lon - lonCOL.at(lowerLonL) ) + std::abs( lon - lonCOL.at(upperLonL) ) );
1187 valLLon = ( ( 1.0 - distLLon ) * x00 ) + ( distLLon * x01 );
1188 valULon = ( ( 1.0 - distLLon ) * x10 ) + ( distLLon * x11 );
1190 distLLat = std::abs ( lat - latCOL.at(lowerLatL) ) / ( std::abs( lat - latCOL.at(lowerLatL) ) + std::abs( lat - latCOL.at(upperLatL) ) );
1191 lowerShellValue = ( ( 1.0 - distLLat ) * valLLon ) + ( distLLat * valULon );
1199 distLLon = std::abs ( lon - lonCOU.at(lowerLonU) ) / ( std::abs( lon - lonCOU.at(lowerLonU) ) + std::abs( lon - lonCOU.at(upperLonU) ) );
1200 valLLon = ( ( 1.0 - distLLon ) * x00 ) + ( distLLon * x01 );
1201 valULon = ( ( 1.0 - distLLon ) * x10 ) + ( distLLon * x11 );
1203 distLLat = std::abs ( lat - latCOU.at(lowerLatU) ) / ( std::abs( lat - latCOU.at(lowerLatU) ) + std::abs( lat - latCOU.at(upperLatU) ) );
1204 upperShellValue = ( ( 1.0 - distLLat ) * valLLon ) + ( distLLat * valULon );
1207 distLRad = std::abs ( rad - this->
spherePos.at(lowerShell) ) / ( std::abs( rad - this->
spherePos.at(lowerShell) ) +
1208 std::abs( rad - this->
spherePos.at(upperShell) ) );
1211 densityMapRotated[arrPos] = ( ( 1.0 - distLRad ) * lowerShellValue ) + ( distLRad * upperShellValue );
◆ invertMirrorMap()
void ProSHADE_internal_data::ProSHADE_data::invertMirrorMap |
( |
ProSHADE_settings * |
settings | ) |
|
Function for inverting the map to its mirror image.
This function switches all index values along the three axes from 0 ... max to max ... 0. This should not normally be done, but in the case where the wrong hand has been used in the map re-construction process, this may be helpful.
- Parameters
-
[in] | settings | A pointer to settings class containing all the information required for reading in the map. |
Definition at line 894 of file ProSHADE_data.cpp.
900 proshade_signed arrayPos, invPos;
913 for ( proshade_signed xIt = 0; xIt < static_cast<proshade_signed> ( this->
xDimIndices ); xIt++ )
915 for ( proshade_signed yIt = 0; yIt < static_cast<proshade_signed> ( this->
yDimIndices ); yIt++ )
917 for ( proshade_signed zIt = 0; zIt < static_cast<proshade_signed> ( this->
zDimIndices ); zIt++ )
◆ invertSHCoefficients()
void ProSHADE_internal_data::ProSHADE_data::invertSHCoefficients |
( |
void |
| ) |
|
This function computes the shell mapped data from inverting the Spherical Harmonics coefficients.
Definition at line 948 of file ProSHADE_overlay.cpp.
951 double *sigR = NULL, *sigI = NULL, *rcoeffs = NULL, *icoeffs = NULL, *weights = NULL, *workspace = NULL;
952 fftw_plan idctPlan, ifftPlan;
955 for (
int shell = 0; shell < static_cast<int> ( this->
noSpheres ); shell++ )
964 makeweights ( this->
spheres[shell]->getLocalBandwidth(), weights );
970 for (
unsigned int iter = 0; iter < static_cast<unsigned int> ( oneDim * oneDim ); iter++ )
979 InvFST_semi_fly ( rcoeffs,
983 this->
spheres[shell]->getLocalBandwidth(),
986 this->
spheres[shell]->getLocalBandwidth(),
991 for (
unsigned int iter = 0; iter < static_cast<unsigned int> ( oneDim * oneDim ); iter++ )
997 fftw_destroy_plan ( idctPlan );
998 fftw_destroy_plan ( ifftPlan );
◆ mapToSpheres()
void ProSHADE_internal_data::ProSHADE_data::mapToSpheres |
( |
ProSHADE_settings * |
settings | ) |
|
This function converts the internal map onto a set of concentric spheres.
This function starts by determining the spherical harmonics values which were not supplied by the user, these may be bandwidth, taylor series cap, integration order, etc. It then proceeds to determine the optimal sphere distances, unless these were determined by the user.
Finally, the function creates a new instance of the ProSHADE_sphere class for each of the already determined sphere positions. Note: The constructor of ProSHADE_sphere is where the mapping then happens.
- Parameters
-
[in] | settings | A pointer to settings class containing all the information required for map manipulation. |
Definition at line 1499 of file ProSHADE_data.cpp.
1514 for ( proshade_unsign iter = 0; iter < static_cast<proshade_unsign> ( this->
spherePos.size() ); iter++ )
1516 std::stringstream ss;
1517 ss <<
"Now mapping sphere " << iter <<
" .";
1523 this->internalMap, &this->maxShellBand );
◆ maskMap()
Function for computing the map mask using blurring and X IQRs from median.
This function takes all the internal map representation information from the calling object and the internal map itself and proceeds to write all this information in MRC MAP format for visualisation and further processing by other software. It is dependent on the internal information being correct.
- Parameters
-
[in] | settings | A pointer to settings class containing all the information required for reading in the map. |
Definition at line 995 of file ProSHADE_data.cpp.
1015 delete[] blurredMap;
◆ normaliseEMatrixValue()
void ProSHADE_internal_data::ProSHADE_data::normaliseEMatrixValue |
( |
proshade_unsign |
band, |
|
|
proshade_unsign |
order1, |
|
|
proshade_unsign |
order2, |
|
|
proshade_double |
normF |
|
) |
| |
This function allows normalising the E matrix value.
- Parameters
-
[in] | band | The band indice of the E matrix to which the value should be assigned. |
[in] | order1 | The first order indice of the E matrix to which the value should be assigned. |
[in] | order2 | The second order indice of the E matrix to which the value should be assigned. |
[in] | normF | The value by which the original E matrix value will be divided to normalise it. |
Definition at line 3484 of file ProSHADE_data.cpp.
3487 this->
eMatrices[band][order1][order2][0] /= normF;
3488 this->
eMatrices[band][order1][order2][1] /= normF;
◆ normaliseMap()
void ProSHADE_internal_data::ProSHADE_data::normaliseMap |
( |
ProSHADE_settings * |
settings | ) |
|
Function for normalising the map values to mean 0 and sd 1..
This function takes the map and changes its value to have mean 0 and standard deviation of 1. This should make wo maps with very different density levels more comparable, but it remains to be seen if this causes any trouble. Can be turned off using the settings options.
- Parameters
-
[in] | settings | A pointer to settings class containing all the information required for reading in the map. |
Definition at line 948 of file ProSHADE_data.cpp.
963 proshade_double* meanSD =
new proshade_double[2];
◆ optimiseDihedralAngleFromAngleAxis()
std::vector< proshade_double * > ProSHADE_internal_data::ProSHADE_data::optimiseDihedralAngleFromAngleAxis |
( |
ProSHADE_settings * |
settings, |
|
|
proshade_double |
angle, |
|
|
proshade_double * |
axis1, |
|
|
proshade_double * |
axis2 |
|
) |
| |
...
...
- Parameters
-
[in] | settings | ProSHADE_settings object containing all the settings for this run. |
[in] | angle | The cosine of angle to which the two axes should be optimised to. |
[in] | axis1 | The first axis to be optimised. |
[in] | axis2 | The second axis to be optimised. |
[out] | ret | Vector of double pointers to arrays having the standard ProSHADE symmetry group structure. |
Definition at line 3822 of file ProSHADE_symmetry.cpp.
3825 std::vector< proshade_double* > ret;
3826 std::vector<ProSHADE_internal_spheres::ProSHADE_rotFun_sphere*> ax1SphereMappedRotFun, ax2SphereMappedRotFun;
3827 std::cout <<
"ANGLE: " << angle << std::endl;
3830 for ( proshade_double angIt = 1.0; angIt < axis1[0]; angIt += 1.0 )
3834 M_PI /
static_cast<proshade_double
> ( axis1[0] ),
3837 static_cast<proshade_unsign
> ( angIt - 1.0 ) ) );
3840 ax1SphereMappedRotFun.at(
static_cast<proshade_unsign
> ( angIt - 1.0 ))->interpolateSphereValues ( this->
getInvSO3Coeffs ( ) );
3844 for ( proshade_double angIt = 1.0; angIt < axis2[0]; angIt += 1.0 )
3848 M_PI /
static_cast<proshade_double
> ( axis2[0] ),
3851 static_cast<proshade_unsign
> ( angIt - 1.0 ) ) );
3854 ax2SphereMappedRotFun.at(
static_cast<proshade_unsign
> ( angIt - 1.0 ))->interpolateSphereValues ( this->
getInvSO3Coeffs ( ) );
3858 std::cout <<
"Original axes : " << axis1[1] <<
" ; " << axis1[2] <<
" ; " << axis1[3] <<
" AND " << axis2[1] <<
" ; " << axis2[2] <<
" ; " << axis2[3] << std::endl;
3859 proshade_double angErr = 0.05;
3860 proshade_double dotProd, dotProdHlp, bestAngErr, axNorm, bestX = 0.0, bestY = 0.0, bestZ = 0.0;
3861 bool axisImproved =
true;
3862 while ( axisImproved && angErr > 0.0001 )
3866 angErr = std::abs ( std::abs ( angle ) - std::abs ( dotProd ) );
3867 std::cout <<
" !!! Angle error : " << angErr << std::endl;
3870 axisImproved =
false;
3871 bestAngErr = angErr;
3872 for ( proshade_double xCh = -1.0; xCh < 1.1; xCh += 1.0 )
3874 for ( proshade_double yCh = -1.0; yCh < 1.1; yCh += 1.0 )
3876 for ( proshade_double zCh = -1.0; zCh < 1.1; zCh += 1.0 )
3879 axNorm = std::sqrt ( std::pow( axis1[1] + (xCh * angErr), 2.0 ) + std::pow( axis1[2] + (yCh * angErr), 2.0 ) + std::pow ( axis1[3] + (zCh * angErr), 2.0 ) );
3881 ( axis1[2] + (yCh * angErr) ) / axNorm,
3882 ( axis1[3] + (zCh * angErr) ) / axNorm, axis2[1], axis2[2], axis2[3] );
3884 if ( bestAngErr > std::abs ( std::abs ( angle ) - std::abs ( dotProdHlp ) ) )
3887 bestX = ( axis1[1] + (xCh * angErr) ) / axNorm;
3888 bestY = ( axis1[2] + (yCh * angErr) ) / axNorm;
3889 bestZ = ( axis1[3] + (zCh * angErr) ) / axNorm;
3890 axisImproved =
true;
3891 bestAngErr = std::abs ( std::abs ( angle ) - std::abs ( dotProdHlp ) );
3898 if ( axisImproved ) { axis1[1] = bestX; axis1[2] = bestY; axis1[3] = bestZ; }
3901 std::cout <<
"Angle improved axes: " << axis1[1] <<
" ; " << axis1[2] <<
" ; " << axis1[3] <<
" AND " << axis2[1] <<
" ; " << axis2[2] <<
" ; " << axis2[3] << std::endl;
3904 proshade_double curSum = 0.0;
3905 proshade_double lat, lon, bestSumChange, bestSum = 0.0, sumChange = 0.005;
3906 bool sumImproved =
true;
3907 while ( sumImproved && sumChange > 0.00001 )
3909 std::cout << std::endl <<
" !!! New iteration axes: " << axis1[1] <<
" ; " << axis1[2] <<
" ; " << axis1[3] <<
" AND " << axis2[1] <<
" ; " << axis2[2] <<
" ; " << axis2[3] << std::endl;
3910 sumImproved =
false;
3913 lon = atan2 ( axis1[2], axis1[1] );
3914 lat = asin ( axis1[3] );
3915 for ( proshade_unsign sph1It = 0; sph1It < static_cast< proshade_unsign > ( ax1SphereMappedRotFun.size() ); sph1It++ )
3917 bestSum += ax1SphereMappedRotFun.at(sph1It)->getSphereLatLonLinearInterpolationPos ( lat, lon );
3920 lon = atan2 ( axis2[2], axis2[1] );
3921 lat = asin ( axis2[3] );
3922 for ( proshade_unsign sph2It = 0; sph2It < static_cast< proshade_unsign > ( ax2SphereMappedRotFun.size() ); sph2It++ )
3924 bestSum += ax2SphereMappedRotFun.at(sph2It)->getSphereLatLonLinearInterpolationPos ( lat, lon );
3927 std::cout <<
" !!! !!! Current best sum is: " << bestSum << std::endl;
3929 bestSumChange = bestSum;
3930 for ( proshade_double xCh = -1.0; xCh < 1.1; xCh += 1.0 )
3932 for ( proshade_double yCh = -1.0; yCh < 1.1; yCh += 1.0 )
3934 for ( proshade_double zCh = -1.0; zCh < 1.1; zCh += 1.0 )
3938 axNorm = std::sqrt ( std::pow( axis1[1] + ( xCh * sumChange ), 2.0 ) + std::pow( axis1[2] + ( yCh * sumChange ), 2.0 ) + std::pow ( axis1[3] + ( zCh * sumChange ), 2.0 ) );
3939 lon = atan2 ( ( axis1[2] + ( yCh * sumChange ) ) / axNorm, ( axis1[1] + ( xCh * sumChange ) ) / axNorm );
3940 lat = asin ( ( axis1[3] + ( zCh * sumChange ) ) / axNorm );
3941 for ( proshade_unsign sph1It = 0; sph1It < static_cast< proshade_unsign > ( ax1SphereMappedRotFun.size() ); sph1It++ )
3943 curSum += ax1SphereMappedRotFun.at(sph1It)->getSphereLatLonLinearInterpolationPos ( lat, lon );
3946 axNorm = std::sqrt ( std::pow( axis2[1] + ( xCh * sumChange ), 2.0 ) + std::pow( axis2[2] + ( yCh * sumChange ), 2.0 ) + std::pow ( axis2[3] + ( zCh * sumChange ), 2.0 ) );
3947 lon = atan2 ( ( axis2[2] + ( yCh * sumChange ) ) / axNorm, ( axis2[1] + ( xCh * sumChange ) ) / axNorm );
3948 lat = asin ( ( axis2[3] + ( zCh * sumChange ) ) / axNorm );
3949 for ( proshade_unsign sph2It = 0; sph2It < static_cast< proshade_unsign > ( ax2SphereMappedRotFun.size() ); sph2It++ )
3951 curSum += ax2SphereMappedRotFun.at(sph2It)->getSphereLatLonLinearInterpolationPos ( lat, lon );
3954 if ( curSum > bestSumChange )
3957 bestX = ( xCh * sumChange );
3958 bestY = ( yCh * sumChange );
3959 bestZ = ( zCh * sumChange );
3960 bestSumChange = curSum;
3971 axNorm = std::sqrt ( std::pow( axis1[1], 2.0 ) + std::pow( axis1[2], 2.0 ) + std::pow ( axis1[3], 2.0 ) );
3980 axNorm = std::sqrt ( std::pow( axis2[1], 2.0 ) + std::pow( axis2[2], 2.0 ) + std::pow ( axis2[3], 2.0 ) );
3986 sumChange = bestSumChange - bestSum;
3987 std::cout <<
" !!! END iteration axes: " << axis1[1] <<
" ; " << axis1[2] <<
" ; " << axis1[3] <<
" AND " << axis2[1] <<
" ; " << axis2[2] <<
" ; " << axis2[3] << std::endl;
3991 std::cout <<
"Sum improved axes: " << axis1[1] <<
" ; " << axis1[2] <<
" ; " << axis1[3] <<
" AND " << axis2[1] <<
" ; " << axis2[2] <<
" ; " << axis2[3] << std::endl;
3994 std::cout <<
"Finally, the best sum on changed axes is " << bestSum <<
" ." << std::endl;
◆ processInternalMap()
void ProSHADE_internal_data::ProSHADE_data::processInternalMap |
( |
ProSHADE_settings * |
settings | ) |
|
This function simply clusters several other functions which should be called together.
This function serves to cluster the map normalisation, map masking, map centering and map extra space addition into a single function. This allows for simpler code and does not take any control away, as all the decisions are ultimately driven by the settings.
This function also does some internal value saving and auto-determination of any parameters that the user did not supply. This, however, means, that this function MUST be called for every structure that is to be processed by ProSHADE. This is of importance to people whe want to use only a perticular functions.
- Parameters
-
[in] | settings | A pointer to settings class containing all the information required for map manipulation. |
- Warning
- This function MUST be called on any structure that is to be processed by ProSHADE.
Definition at line 1398 of file ProSHADE_data.cpp.
◆ readInMAP()
void ProSHADE_internal_data::ProSHADE_data::readInMAP |
( |
ProSHADE_settings * |
settings | ) |
|
|
protected |
Function for reading map data using gemmi library.
This function reads in the map data using the information from the settings object and saves all the results into the structure calling it.
- Parameters
-
[in] | settings | A pointer to settings class containing all the information required for reading in the map. |
Definition at line 501 of file ProSHADE_data.cpp.
504 gemmi::Ccp4<float> map;
505 map.read_ccp4 ( gemmi::MaybeGzipped ( this->
fileName.c_str() ) );
508 map.setup ( gemmi::GridSetup::ReorderOnly, NAN );
527 std::min (
static_cast<proshade_double
> ( this->
yDimSize ) /
static_cast<proshade_double
> ( this->
yDimIndices ),
528 static_cast<proshade_double
> ( this->
zDimSize ) /
static_cast<proshade_double
> ( this->
zDimIndices ) ) ) * 2.0 );
◆ readInPDB()
void ProSHADE_internal_data::ProSHADE_data::readInPDB |
( |
ProSHADE_settings * |
settings | ) |
|
|
protected |
Function for reading pdb data.
This function reads in the pdb data using the information from the settings object, converts the co-ordinates onto a theoretical map and and saves all the results into the structure calling it.
- Parameters
-
[in] | settings | A pointer to settings class containing all the information required for reading in the map. |
- Warning
- For multiple models, this function works, but the map is not perfectly fitted to the PDB file.
Definition at line 574 of file ProSHADE_data.cpp.
583 gemmi::Structure pdbFile = gemmi::read_structure ( gemmi::MaybeGzipped ( this->
fileName ) );
598 proshade_double xCOMPdb, yCOMPdb, zCOMPdb;
602 proshade_single xF, xT, yF, yT, zF, zT;
606 proshade_single xMov = 20.0 - xF;
607 proshade_single yMov = 20.0 - yF;
608 proshade_single zMov = 20.0 - zF;
617 ProSHADE_internal_mapManip::generateMapFromPDB ( pdbFile, this->
internalMap, settings->
requestedResolution, this->xDimSize, this->yDimSize, this->zDimSize, &this->xTo, &this->yTo, &this->zTo, settings->
forceP1, settings->
firstModelOnly );
623 proshade_double xCOMMap, yCOMMap, zCOMMap;
628 if ( pdbFile.models.size() > 1 )
630 xMov = xCOMMap - xCOMPdb;
631 yMov = yCOMMap - yCOMPdb;
632 zMov = zCOMMap - zCOMPdb;
◆ readInStructure()
void ProSHADE_internal_data::ProSHADE_data::readInStructure |
( |
std::string |
fName, |
|
|
proshade_unsign |
inputO, |
|
|
ProSHADE_settings * |
settings |
|
) |
| |
This function initialises the basic ProSHADE_data variables and reads in a single structure.
This function is basically the constructor for the ProSHADE_data class. It reads in a structure (independent of the structure type) and fills in all the appropriate variables of the class.
- Parameters
-
[in] | fName | The file name of the file which should be loaded. |
[in] | inputO | The order of this structure in this run's input. |
[in] | settings | A pointer to settings class containing all the information required for reading in the map. |
Definition at line 447 of file ProSHADE_data.cpp.
455 throw ProSHADE_exception (
"Structure data class not empty.",
"E000005", __FILE__, __LINE__, __func__,
"Attempted to read in structure into a ProSHADE_data\n : object which already does have structure read in\n : i.e. " + this->
fileName );
470 case ProSHADE_internal_io::UNKNOWN:
471 throw ProSHADE_exception (
"Unknown file type.",
"E000006", __FILE__, __LINE__, __func__,
"When attempting to read the file\n : " + this->
fileName +
"\n : the file extension was determined as unknown. This could\n : mean either that the file does not exist, or that it is\n : not one of the supported extensions." );
474 case ProSHADE_internal_io::PDB:
478 case ProSHADE_internal_io::MAP:
◆ removePhaseInormation()
void ProSHADE_internal_data::ProSHADE_data::removePhaseInormation |
( |
ProSHADE_settings * |
settings | ) |
|
This function removes phase from the map, effectively converting it to Patterson map.
This function is called when the phase information needs to be removed from the internal map representation. It does the forward Fourier transform, removes the phase from the Fourier coefficients and then the inverse Fourier transform, thus resulting with the Patterson map. It does write over the original map.
- Parameters
-
[in] | settings | A pointer to settings class containing all the information required for map manipulation. |
Definition at line 3032 of file ProSHADE_data.cpp.
3049 pattersonMap[iter][1] = 0.0;
3054 pattersonMap, mapCoeffs, FFTW_FORWARD, FFTW_ESTIMATE );
3056 mapCoeffs, pattersonMap, FFTW_BACKWARD, FFTW_ESTIMATE );
3059 fftw_execute ( forward );
3065 fftw_execute ( inverse );
3068 proshade_signed mapIt, patIt, patX, patY, patZ;
3069 for ( proshade_signed xIt = 0; xIt < static_cast<proshade_signed> ( this->
xDimIndices ); xIt++ )
3071 for ( proshade_signed yIt = 0; yIt < static_cast<proshade_signed> ( this->
yDimIndices ); yIt++ )
3073 for ( proshade_signed zIt = 0; zIt < static_cast<proshade_signed> ( this->
zDimIndices ); zIt++ )
3076 patX = xIt - (
static_cast<proshade_signed
> ( this->
xDimIndices ) / 2 );
if ( patX < 0 ) { patX += this->
xDimIndices; }
3077 patY = yIt - (
static_cast<proshade_signed
> ( this->
yDimIndices ) / 2 );
if ( patY < 0 ) { patY += this->
yDimIndices; }
3078 patZ = zIt - (
static_cast<proshade_signed
> ( this->
zDimIndices ) / 2 );
if ( patZ < 0 ) { patZ += this->
zDimIndices; }
3085 this->
internalMap[mapIt] = pattersonMap[patIt][0];
3091 delete[] pattersonMap;
3095 fftw_destroy_plan ( forward );
3096 fftw_destroy_plan ( inverse );
◆ reportOverlayResults()
void ProSHADE_internal_data::ProSHADE_data::reportOverlayResults |
( |
ProSHADE_settings * |
settings, |
|
|
std::vector< proshade_double > * |
rotationCentre, |
|
|
std::vector< proshade_double > * |
eulerAngles, |
|
|
std::vector< proshade_double > * |
finalTranslation |
|
) |
| |
This function reports the results of the overlay mode.
- Parameters
-
[in] | settings | ProSHADE_settings object specifying the details of how the computations should be done. |
[in] | rotationCentre | Pointer to vector for saving the position of the centre of rotation about which the rotation is to be done. |
[in] | mapBoxMovement | Pointer to vector for saving the sum of all translations done internally by ProSHADE to this input map. |
[in] | eulerAngles | Pointer to vector where the three Euler angles will be saved into. |
[in] | finalTranslation | Pointer to a vector where the translation required to move structure from origin to optimal overlay with static structure will be saved into. |
Definition at line 3856 of file ProSHADE_data.cpp.
3862 std::stringstream rotCen; rotCen << std::setprecision (3) << std::showpos <<
"The rotation centre to origin translation vector is: " << -rotationCentre->at(0) <<
" " << -rotationCentre->at(1) <<
" " << -rotationCentre->at(2);
3866 proshade_double* rotMat =
new proshade_double[9];
3870 std::stringstream rotMatSS;
3871 rotMatSS << std::setprecision (3) << std::showpos <<
"The rotation matrix about origin is : " << rotMat[0] <<
" " << rotMat[1] <<
" " << rotMat[2] << std::endl;
3872 rotMatSS << std::setprecision (3) << std::showpos <<
" : " << rotMat[3] <<
" " << rotMat[4] <<
" " << rotMat[5] << std::endl;
3873 rotMatSS << std::setprecision (3) << std::showpos <<
" : " << rotMat[6] <<
" " << rotMat[7] <<
" " << rotMat[8];
3879 std::stringstream finTrs; finTrs << std::setprecision (3) << std::showpos <<
"The rotation centre to overlay translation vector is: " << finalTranslation->at(0) <<
" " << finalTranslation->at(1) <<
" " << finalTranslation->at(2);
◆ reportSymmetryResults()
void ProSHADE_internal_data::ProSHADE_data::reportSymmetryResults |
( |
ProSHADE_settings * |
settings | ) |
|
This function takes prints the report for symmetry detection.
This is a very simple function which provides the basic textual output for the symmetry detection task.
- Parameters
-
[in] | settings | A pointer to settings class containing all the information required for map symmetry detection reporting. |
Definition at line 2828 of file ProSHADE_data.cpp.
2837 std::stringstream ssHlp;
2843 ssHlp.clear(); ssHlp.str (
"" );
2844 ssHlp <<
" Fold X Y Z Angle Height";
2847 for ( proshade_unsign symIt = 0; symIt < static_cast<proshade_unsign> ( settings->
detectedSymmetry.size() ); symIt++ )
2849 ssHlp.clear(); ssHlp.str (
"" );
2854 std::stringstream hlpSS3;
2855 ssHlp.clear(); ssHlp.str (
"" );
2856 hlpSS3 << std::endl <<
"However, since the selection of the recommended symmetry needs improvement, here is a list of all detected C symmetries:";
2861 ssHlp.clear(); ssHlp.str (
"" );
2862 ssHlp <<
" Fold X Y Z Angle Height";
2865 for ( proshade_unsign symIt = 0; symIt < static_cast<proshade_unsign> ( settings->
allDetectedCAxes.size() ); symIt++ )
2867 ssHlp.clear(); ssHlp.str (
"" );
2872 hlpSS3.clear(); hlpSS3.str (
"" );
2873 hlpSS3 << std::endl <<
"Also, for the same reason, here is a list of all detected D symmetries:";
2878 ssHlp.clear(); ssHlp.str (
"" );
2879 ssHlp <<
" Fold X Y Z Angle Height";
2882 for ( proshade_unsign symIt = 0; symIt < static_cast<proshade_unsign> ( settings->
allDetectedDAxes.size() ); symIt++ )
2884 ssHlp.clear(); ssHlp.str (
"" );
2888 for ( proshade_unsign axIt = 1; axIt < static_cast<proshade_unsign> ( settings->
allDetectedDAxes.at(symIt).size() ); axIt++ )
2890 ssHlp.clear(); ssHlp.str (
"" );
2895 ssHlp.clear(); ssHlp.str (
"" );
◆ reSampleMap()
void ProSHADE_internal_data::ProSHADE_data::reSampleMap |
( |
ProSHADE_settings * |
settings | ) |
|
This function changes the internal map sampling to conform to particular resolution value.
This function will take the requested resolution value from the settings object and will proceed to change the internal map sampling to conform to requested resolution / 2 and therefore to the requested resolution map.
- Parameters
-
[in] | settings | A pointer to settings class containing all the information required for reading in the map. |
Definition at line 1156 of file ProSHADE_data.cpp.
1159 proshade_single* changeVals =
new proshade_single[6];
1165 this->xDimSize, this->yDimSize, this->zDimSize, changeVals );
1175 this->xDimSize, this->yDimSize, this->zDimSize, changeVals );
1180 this->
xDimIndices +=
static_cast<proshade_unsign
> ( changeVals[0] );
1181 this->
yDimIndices +=
static_cast<proshade_unsign
> ( changeVals[1] );
1182 this->
zDimIndices +=
static_cast<proshade_unsign
> ( changeVals[2] );
1188 this->
xTo +=
static_cast<proshade_unsign
> ( changeVals[0] );
1189 this->
yTo +=
static_cast<proshade_unsign
> ( changeVals[1] );
1190 this->
zTo +=
static_cast<proshade_unsign
> ( changeVals[2] );
1197 proshade_single xMov = -( ( this->
xFrom * ( this->
xDimSize /
static_cast<proshade_single
> ( this->
xDimIndices - changeVals[0] ) ) ) -
1199 proshade_single yMov = -( ( this->
yFrom * ( this->
yDimSize /
static_cast<proshade_single
> ( this->
yDimIndices - changeVals[1] ) ) ) -
1201 proshade_single zMov = -( ( this->
zFrom * ( this->
zDimSize /
static_cast<proshade_single
> ( this->
zDimIndices - changeVals[2] ) ) ) -
1212 delete[] changeVals;
◆ rotateMap()
void ProSHADE_internal_data::ProSHADE_data::rotateMap |
( |
ProSHADE_settings * |
settings, |
|
|
proshade_double |
eulerAlpha, |
|
|
proshade_double |
eulerBeta, |
|
|
proshade_double |
eulerGamma |
|
) |
| |
This function rotates a map based on the given Euler angles.
This function starts by computing the Wigner D matrices for the given Euler angles and then it proceeds to multiply the spherical harmonics coefficients with these, thus producing spherical harmonics coefficients of a rotated structure. Then, it computes the inverse spherical harmonics decomposition, thus obtaining the sphere mapped values for the rotated structure. Finally, it interpolates these sphere mapped values back to Cartesian grid, thus obtaining a map rotated by the given Euler angles.
- Parameters
-
[in] | settings | The settings object specifying how exactly the rotation is to be done. |
[in] | eulerAlpha | The rotation expressed as a pointer to Euler alpha angle. |
[in] | eulerBeta | The rotation expressed as a pointer to Euler beta angle. |
[in] | eulerGamma | The rotation expressed as a pointer to Euler gamma angle. |
Definition at line 736 of file ProSHADE_overlay.cpp.
760 std::vector<proshade_double> lonCO, latCO;
766 for (
unsigned int iter = 0; iter < static_cast<unsigned int> ( this->
xDimIndices * this->
yDimIndices * this->
zDimIndices ); iter++ ) { densityMapRotated[iter] = 0.0; }
778 delete[] densityMapRotated;
◆ saveDetectedSymmetries()
void ProSHADE_internal_data::ProSHADE_data::saveDetectedSymmetries |
( |
ProSHADE_settings * |
settings, |
|
|
std::vector< proshade_double * > * |
CSyms, |
|
|
std::vector< std::vector< proshade_double > > * |
allCs |
|
) |
| |
This function takes the results of point group searches and saves then into the output variables.
This function takes the CSyms as they are returned by the findRequestedCSymmetryFromAngleAxis() or the getCyclicSymmetriesListFromAngleAxis() functions and re-saves then to the output variables of the detectSymmetryFromAngleAxisSpace() function. It also releases the memory of the CSyms argument.
- Warning
- This function releases the memory of the CSyms argument.
- Parameters
-
[in] | settings | A pointer to settings class containing all the information required for map symmetry detection. |
[in] | CSyms | A pointer to vector |
[in] | axes | A pointer to a vector to which all the axes of the recommended symmetry (if any) will be saved. |
[in] | allCs | A pointer to a vector to which all the detected cyclic symmetries will be saved into. |
Definition at line 1828 of file ProSHADE_data.cpp.
1831 bool isArgSameAsSettings =
true;
1834 for ( proshade_unsign cIt = 0; cIt < static_cast<proshade_unsign> ( CSyms->size() ); cIt++ )
1837 std::vector< proshade_double > nextSym;
1847 if ( ( cIt == 0 ) && ( settings->
allDetectedCAxes.size() == 0 ) ) { isArgSameAsSettings =
false; }
1852 delete[] CSyms->at(cIt);
◆ saveRecommendedSymmetry()
void ProSHADE_internal_data::ProSHADE_data::saveRecommendedSymmetry |
( |
ProSHADE_settings * |
settings, |
|
|
std::vector< proshade_double * > * |
CSym, |
|
|
std::vector< proshade_double * > * |
DSym, |
|
|
std::vector< proshade_double * > * |
TSym, |
|
|
std::vector< proshade_double * > * |
OSym, |
|
|
std::vector< proshade_double * > * |
ISym, |
|
|
std::vector< proshade_double * > * |
axes |
|
) |
| |
This function takes all the detected symmetry results and decides on which are to be recommended for this structure.
This function starts by obtaining the scores (fold weighted height averages) for each of the detectable symmetry types. Then, it proceeds to compute which of these should be recommended by ProSHADE based on a little shaky combination of axes number and score. This part needs to be improved by using ML estimation, when I get the time.
- Parameters
-
[in] | settings | A pointer to settings class containing all the information required for map symmetry detection. |
[in] | CSym | A vector of pointers to double arrays, each array being a single Cyclic symmetry entry. |
[in] | DSym | A vector of pointers to double arrays, each array being a single Dihedral symmetry entry. |
[in] | TSym | A vector of pointers to double arrays, all of which together form the axes of tetrahedral symmetry. |
[in] | OSym | A vector of pointers to double arrays, all of which together form the axes of octahedral symmetry. |
[in] | ISym | A vector of pointers to double arrays, all of which together form the axes of icosahedral symmetry. |
[in] | axes | A vector to which all the axes of the recommended symmetry (if any) will be saved. |
Definition at line 2067 of file ProSHADE_data.cpp.
2070 proshade_double cScore = 0.0, dScore = 0.0, tScore = 0.0, oScore = 0.0, iScore = 0.0;
2071 proshade_unsign bestCIndex, bestDIndex;
2081 proshade_double bestWeightedScore = std::max ( cScore, std::max ( dScore * 1.1, std::max ( tScore * 3000.0, std::max ( oScore * 4000.0, iScore * 5000.0 ) ) ) );
2086 if ( bestWeightedScore == cScore )
2094 if ( ( ( 360.0 /
static_cast<double> ( CSym->at(bestCIndex)[0] ) ) - ( 360.0 /
static_cast<double> ( CSym->at(bestCIndex)[0] + 1 ) ) ) <
2095 ( 360.0 /
static_cast<double> ( settings->
maxBandwidth * 4.0 ) ) )
2097 std::stringstream hlpSS;
2098 hlpSS <<
"!!! ProSHADE WARNING !!! Reporting symmetry C" << CSym->at(bestCIndex)[0] <<
", however, the grid sampling does not provide reasonable accuracy for symmetry with such high fold and therefore ProSHADE cannot responsibly claim this symmetry to be correct. It is suggested that the grid sampling is increased for more accurate symmetry detection. (Set higher resolution using -r).";
2102 if ( bestWeightedScore == dScore * 1.1 )
2105 settings->
setRecommendedFold ( std::max ( DSym->at(bestDIndex)[0], DSym->at(bestDIndex)[6] ) );
2115 if ( ( ( 360.0 /
static_cast<double> ( std::max ( DSym->at(bestDIndex)[0], DSym->at(bestDIndex)[6] ) ) ) - ( 360.0 /
static_cast<double> ( std::max ( DSym->at(bestDIndex)[0], DSym->at(bestDIndex)[6] ) + 1 ) ) ) <
2116 ( 360.0 /
static_cast<double> ( settings->
maxBandwidth * 4.0 ) ) )
2118 std::stringstream hlpSS;
2119 hlpSS <<
"!!! ProSHADE WARNING !!! Reporting symmetry D" << std::max ( DSym->at(bestDIndex)[0], DSym->at(bestDIndex)[6] ) <<
", however, the grid sampling does not provide reasonable accuracy for symmetry with such high fold and therefore ProSHADE cannot responsibly claim this symmetry to be correct. It is suggested that the grid sampling is increased for more accurate symmetry detection. (Set higher resolution using -r).";
2123 if ( bestWeightedScore == tScore * 3000.0 )
2128 if ( settings->
detectedSymmetry.size() == 0 ) {
for ( proshade_unsign it = 0; it < static_cast<proshade_unsign> ( TSym->size() ); it++ ) { settings->
setDetectedSymmetry ( TSym->at(it) ); } }
2130 if ( bestWeightedScore == oScore * 4000.0 )
2135 if ( settings->
detectedSymmetry.size() == 0 ) {
for ( proshade_unsign it = 0; it < static_cast<proshade_unsign> ( OSym->size() ); it++ ) { settings->
setDetectedSymmetry ( OSym->at(it) ); } }
2137 if ( bestWeightedScore == iScore * 5000.0 )
2142 if ( settings->
detectedSymmetry.size() == 0 ) {
for ( proshade_unsign it = 0; it < static_cast<proshade_unsign> ( ISym->size() ); it++ ) { settings->
setDetectedSymmetry ( ISym->at(it) ); } }
◆ saveRequestedSymmetryC()
void ProSHADE_internal_data::ProSHADE_data::saveRequestedSymmetryC |
( |
ProSHADE_settings * |
settings, |
|
|
std::vector< proshade_double * > * |
CSym, |
|
|
std::vector< proshade_double * > * |
axes |
|
) |
| |
This function takes the C symmetries and searched for the requested symmetry.
This is a simple search function, which searches the symmetry results for the requested symmetry fold, and if more such symmetries are found, takes the one with the highest average peak height. If the requested fold was found, it will save it to the settings object, while it will set the object to fold 0 if the requested symmetry was not found (although there may be other symmetries present).
- Parameters
-
[in] | settings | A pointer to settings class containing all the information required for map symmetry detection. |
[in] | CSym | A vector of pointers to double arrays, each array being a single Cyclic symmetry entry. |
[in] | axes | A vector to which all the axes of the requested symmetry (if any) will be saved. |
Definition at line 2161 of file ProSHADE_data.cpp.
2164 proshade_unsign bestIndex = 0;
2165 proshade_double highestSym = 0.0;
2168 for ( proshade_unsign iter = 0; iter < static_cast<proshade_unsign> ( CSym->size() ); iter++ )
2174 if ( CSym->at(iter)[5] > highestSym )
2176 highestSym = CSym->at(iter)[5];
2182 if ( highestSym > 0.0 )
◆ saveRequestedSymmetryD()
void ProSHADE_internal_data::ProSHADE_data::saveRequestedSymmetryD |
( |
ProSHADE_settings * |
settings, |
|
|
std::vector< proshade_double * > * |
DSym, |
|
|
std::vector< proshade_double * > * |
axes |
|
) |
| |
This function takes the D symmetries and searched for the requested symmetry.
This is a simple search function, which searches the symmetry results for the requested symmetry fold, and if more such symmetries are found, takes the one with the highest average peak height sum. If the requested fold was found, it will save it to the settings object, while it will set the object to fold 0 if the requested symmetry was not found (albeit there may be other symmetries present).
- Parameters
-
[in] | settings | A pointer to settings class containing all the information required for map symmetry detection. |
[in] | DSym | A vector of pointers to double arrays, each array being a single Dihedral symmetry entry. |
[in] | axes | A vector to which all the axes of the requested symmetry (if any) will be saved. |
Definition at line 2212 of file ProSHADE_data.cpp.
2215 proshade_unsign bestIndex = 0;
2216 proshade_double highestSym = 0.0;
2219 for ( proshade_unsign iter = 0; iter < static_cast<proshade_unsign> ( DSym->size() ); iter++ )
2222 if ( std::max ( DSym->at(iter)[0], DSym->at(iter)[6] ) != settings->
requestedSymmetryFold ) {
continue; }
2225 if ( ( DSym->at(iter)[5] + DSym->at(iter)[11] ) > highestSym )
2227 highestSym = ( DSym->at(iter)[5] + DSym->at(iter)[11] );
2233 if ( highestSym > 0.0 )
2236 settings->
setRecommendedFold ( std::max ( DSym->at(bestIndex)[0], DSym->at(bestIndex)[6] ) );
◆ setEMatrixValue()
void ProSHADE_internal_data::ProSHADE_data::setEMatrixValue |
( |
proshade_unsign |
band, |
|
|
proshade_unsign |
order1, |
|
|
proshade_unsign |
order2, |
|
|
proshade_complex |
val |
|
) |
| |
This function allows setting the E matrix value.
- Parameters
-
[in] | band | The band indice of the E matrix to which the value should be assigned. |
[in] | order1 | The first order indice of the E matrix to which the value should be assigned. |
[in] | order2 | The second order indice of the E matrix to which the value should be assigned. |
[in] | val | The value which should be saved. |
Definition at line 3466 of file ProSHADE_data.cpp.
3469 this->
eMatrices[band][order1][order2][0] = val[0];
3470 this->
eMatrices[band][order1][order2][1] = val[1];
◆ setIntegrationWeight()
void ProSHADE_internal_data::ProSHADE_data::setIntegrationWeight |
( |
proshade_double |
intW | ) |
|
This function allows setting the integration weight for the object.
- Parameters
-
[in] | intW | The integration weight to be set for this object. |
Definition at line 3435 of file ProSHADE_data.cpp.
◆ setIntegrationWeightCumul()
void ProSHADE_internal_data::ProSHADE_data::setIntegrationWeightCumul |
( |
proshade_double |
intW | ) |
|
This function allows setting the cumulative integration weight for the object.
- Parameters
-
[in] | intW | The integration weight to be added to the current value for this object. |
Definition at line 3449 of file ProSHADE_data.cpp.
◆ setPDBMapValues()
void ProSHADE_internal_data::ProSHADE_data::setPDBMapValues |
( |
void |
| ) |
|
|
protected |
Function for determining iterator start and stop positions.
This function is called to set the xFrom, yFrom, ..., yTo and zTo iterator values for easier further calculations.
Definition at line 678 of file ProSHADE_data.cpp.
◆ setSO3CoeffValue()
void ProSHADE_internal_data::ProSHADE_data::setSO3CoeffValue |
( |
proshade_unsign |
position, |
|
|
proshade_complex |
val |
|
) |
| |
This function allows setting the SOFT coefficient values using array position and value.
- Parameters
-
[in] | position | The 1D array position at which the new value should be saved. |
[in] | val | Complex value to be saved into the array. |
Definition at line 3500 of file ProSHADE_data.cpp.
◆ setWignerMatrixValue()
void ProSHADE_internal_data::ProSHADE_data::setWignerMatrixValue |
( |
proshade_complex |
val, |
|
|
proshade_unsign |
band, |
|
|
proshade_unsign |
order1, |
|
|
proshade_unsign |
order2 |
|
) |
| |
This function allows setting the Wigner D matrix value by its band, order1 and order2 co-ordinate.
- Parameters
-
[in] | val | proshade_complex value of the Wigner D matrix at position band, order1, order2. |
[in] | band | The band of the Wigner D matrix value. |
[in] | order1 | The first order of the Wigner D matrix value. |
[in] | order2 | The second order of the Wigner D matrix value. |
Definition at line 3518 of file ProSHADE_data.cpp.
◆ shellBandExists()
bool ProSHADE_internal_data::ProSHADE_data::shellBandExists |
( |
proshade_unsign |
shell, |
|
|
proshade_unsign |
bandVal |
|
) |
| |
This function checks if particular shell has a particular band.
This function is useful for the progressive shell mapping, where it may not be clear in one part of the code whether a particular shell does or does not have a particular band value. Therefore, this function allows simple check.
- Parameters
-
[in] | shell | The index (number) of the shell for which the check should be done. |
[in] | bandVal | The band value which should be sought for the shell. |
[out] | X | True if the shell has the band, false otherwise. |
Definition at line 3012 of file ProSHADE_data.cpp.
3014 if ( this->
spheres[shell]->getLocalBandwidth( ) >= bandVal )
◆ so3CoeffsArrayIndex()
int ProSHADE_internal_data::ProSHADE_data::so3CoeffsArrayIndex |
( |
proshade_signed |
order1, |
|
|
proshade_signed |
order2, |
|
|
proshade_signed |
band |
|
) |
| |
This function gets the SO(3) coefficients array index for a particular so(3) band, order1 and order2 position.
It should be noted that this function assumes that the orders are in the format -l < 0 < l and NOT 0 < 2l + 1.
- Parameters
-
[in] | order1 | The first order for which the SO(3) value index is requested. |
[in] | order2 | The second order for which the SO(3) value index is requested. |
[in] | band | The band for which the SO(3) value index is requested. |
[out] | val | Index position of the SO(3) value. |
Definition at line 3614 of file ProSHADE_data.cpp.
3617 return (
static_cast<int> ( so3CoefLoc ( order1, order2, band, this->
getMaxBand() ) ) );
◆ translateMap()
void ProSHADE_internal_data::ProSHADE_data::translateMap |
( |
ProSHADE_settings * |
settings, |
|
|
proshade_double |
trsX, |
|
|
proshade_double |
trsY, |
|
|
proshade_double |
trsZ |
|
) |
| |
This function simply translates the map by a given number of Angstroms along the three axes.
This function calls the internal functions to first provide the maximum possible movement by changing the frame of the map and secondly, it make the precise movement within this new frame using the Fourier translation approach.
- Parameters
-
[in] | settings | The settings object specifying how exactly the rotation is to be done. |
[in] | trsX | The translation expressed as a number of angstroms to move by along the x-axis. |
[in] | trsY | The translation expressed as a number of angstroms to move by along the y-axis. |
[in] | trsZ | The translation expressed as a number of angstroms to move by along the z-axis. |
Definition at line 795 of file ProSHADE_overlay.cpp.
798 proshade_single xMov = -trsX, yMov = -trsY, zMov = -trsZ;
◆ writeMap()
void ProSHADE_internal_data::ProSHADE_data::writeMap |
( |
std::string |
fName, |
|
|
std::string |
title = "Created by ProSHADE and written by GEMMI" , |
|
|
int |
mode = 2 |
|
) |
| |
Function for writing out the internal structure representation in MRC MAP format.
This function takes all the internal map representation information from the calling object and proceeds to write all this information in MRC MAP format for visualisation and possibly further processing by other software. This function will write out axis order XYZ and spacegroup P1 irrespective of the input axis order and spacegroup.
- Parameters
-
[in] | fName | The filename (including path) to where the output MAP file should be saved. |
[in] | title | String with the map title to be written into the header - default value is "Created by ProSHADE and written by GEMMI" |
[in] | mode | The type of the data, leave at default 2 (mean float type) unless you specifically required other types. |
Definition at line 741 of file ProSHADE_data.cpp.
744 gemmi::Grid<float> mapData;
747 mapData.axis_order = gemmi::AxisOrder::XYZ;
748 mapData.spacegroup = &gemmi::get_spacegroup_p1();
751 gemmi::Ccp4<float> map;
753 map.update_ccp4_header ( mode );
767 proshade_unsign arrPos = 0;
768 for ( proshade_unsign uIt = 0; uIt < this->
xDimIndices; uIt++ )
770 for ( proshade_unsign vIt = 0; vIt < this->
yDimIndices; vIt++ )
772 for ( proshade_unsign wIt = 0; wIt < this->
zDimIndices; wIt++ )
774 arrPos = wIt + this->zDimIndices * ( vIt + this->yDimIndices * uIt );
775 map.grid.set_value ( uIt, vIt, wIt,
static_cast<float> ( this->
internalMap[arrPos] ) );
781 map.update_ccp4_header ( mode,
true );
784 map.write_ccp4_map ( fName );
◆ writeMask()
void ProSHADE_internal_data::ProSHADE_data::writeMask |
( |
std::string |
fName, |
|
|
proshade_double * |
mask |
|
) |
| |
Function for writing out a mask in MRC MAP format.
This function takes a mask map and the filename and proceeds to write out the mask into the requested file name in th MRC MAP format. It assumes that the mask has the same dimmensions as the map.
- Parameters
-
[in] | fileName | The filename (including path) to where the output should be saved. |
[in] | mask | Pointer to the mask map array. |
Definition at line 857 of file ProSHADE_data.cpp.
◆ writeOutOverlayFiles()
void ProSHADE_internal_data::ProSHADE_data::writeOutOverlayFiles |
( |
ProSHADE_settings * |
settings, |
|
|
proshade_double |
eulA, |
|
|
proshade_double |
eulB, |
|
|
proshade_double |
eulG, |
|
|
std::vector< proshade_double > * |
rotCentre, |
|
|
std::vector< proshade_double > * |
ultimateTranslation |
|
) |
| |
This function writes out the rotated map, co-ordinates and transformation JSON file.
This function takes basically all the results of the overlay mode and appropriately applies them to write out the moved density map, if possible the moved co-ordinates and also the overlay operations listing JSON file.
- Parameters
-
[in] | settings | A pointer to settings class containing all the information required for map manipulation. |
[in] | eulA | The Euler alpha angle value, by which the moving structure is to be rotated by. |
[in] | eulB | The Euler beta angle value, by which the moving structure is to be rotated by. |
[in] | eulG | The Euler gamma angle value, by which the moving structure is to be rotated by. |
[in] | rotCentre | The rotation centre position. |
[in] | ultimateTranslation | The final translation as determined by the translation function. |
Definition at line 3822 of file ProSHADE_data.cpp.
3825 std::stringstream fNameHlp;
3834 this->
writePdb ( fNameHlp.str(), eulA, eulB, eulG, ultimateTranslation->at(0), ultimateTranslation->at(1), ultimateTranslation->at(2), settings->
firstModelOnly );
3840 ultimateTranslation->at(0), ultimateTranslation->at(1), ultimateTranslation->at(2),
◆ writePdb()
void ProSHADE_internal_data::ProSHADE_data::writePdb |
( |
std::string |
fName, |
|
|
proshade_double |
euA = 0.0 , |
|
|
proshade_double |
euB = 0.0 , |
|
|
proshade_double |
euG = 0.0 , |
|
|
proshade_double |
trsX = 0.0 , |
|
|
proshade_double |
trsY = 0.0 , |
|
|
proshade_double |
trsZ = 0.0 , |
|
|
bool |
firstModel = true |
|
) |
| |
This function writes out the PDB formatted file coresponding to the structure so that its COM is at specific position.
This function first checks if this internal structure originated from co-ordinate file (only if co-ordinates are provided can they be written out). If so, it will proceed to read in the original co-ordinates, rotate and translate them according to the arguments and then write the resulting co-ordinates into a new file.
- Parameters
-
[in] | fName | The filename (including path) to where the output PDB file should be saved. |
[in] | euA | The Euler angle alpha by which the co-ordinates should be rotated (leave empty if no rotation is required). |
[in] | euB | The Euler angle beta by which the co-ordinates should be rotated (leave empty if no rotation is required). |
[in] | euG | The Euler angle gamma by which the co-ordinates should be rotated (leave empty if no rotation is required). |
[in] | trsX | The translation to be done along X-axis in Angstroms. |
[in] | trsY | The translation to be done along Y-axis in Angstroms. |
[in] | trsZ | The translation to be done along Z-axis in Angstroms. |
[in] | firstModel | Should only the first model, or rather all of them be used? |
Definition at line 806 of file ProSHADE_data.cpp.
811 throw ProSHADE_exception (
"Cannot write co-ordinate file if the input file did not contain co-ordinates.",
"EP00047", __FILE__, __LINE__, __func__,
"You have called the WritePDB function on structure which\n : was created by reading in a map. This is not allowed as\n : ProSHADE cannot create co-ordinates from map file." );
815 gemmi::Structure pdbFile = gemmi::read_structure ( gemmi::MaybeGzipped ( this->
fileName ) );
818 if ( ( euA != 0.0 ) || ( euB != 0.0 ) || ( euG != 0.0 ) )
828 std::ofstream outCoOrdFile;
829 outCoOrdFile.open ( fName.c_str() );
831 if ( outCoOrdFile.is_open() )
833 gemmi::PdbWriteOptions opt;
834 write_pdb ( pdbFile, outCoOrdFile, opt );
838 std::stringstream hlpMessage;
839 hlpMessage <<
"Failed to open the PDB file " << fName <<
" for output.";
840 throw ProSHADE_exception ( hlpMessage.str().c_str(),
"EP00048", __FILE__, __LINE__, __func__,
"ProSHADE has failed to open the PDB output file. This is\n : likely caused by either not having the write privileges\n : to the required output path, or by making a mistake in\n : the path." );
843 outCoOrdFile.close ( );
◆ zeroPaddToDims()
void ProSHADE_internal_data::ProSHADE_data::zeroPaddToDims |
( |
proshade_unsign |
xDim, |
|
|
proshade_unsign |
yDim, |
|
|
proshade_unsign |
zDim |
|
) |
| |
This function changes the size of a structure to fit the supplied new limits.
This function increases the map size by symetrically adding zeroes in each required dimension. The first zero is always added AFTER the structure, so for even size increases, there will be misplacement of centre of mass. The map position in the "real" world should not change.
- Parameters
-
[in] | xDim | The X dimension size to which this structure should be padded into. |
[in] | yDim | The Y dimension size to which this structure should be padded into. |
[in] | zDim | The Z dimension size to which this structure should be padded into. |
Definition at line 598 of file ProSHADE_overlay.cpp.
603 throw ProSHADE_exception (
"Cannot zero-pad in negative direction.",
"EO00034", __FILE__, __LINE__, __func__,
"The requested padded size of a structure is smaller than\n : the current size. If the user sees this error, there is\n : likely a considerable bug. Please report this error." );
610 proshade_unsign addXPre, addYPre, addZPre, addXPost, addYPost, addZPost;
611 ProSHADE_internal_overlay::computeBeforeAfterZeroCounts ( &addXPre, &addYPre, &addZPre, &addXPost, &addYPost, &addZPost, xDim, yDim, zDim, this->
xDimIndices, this->
yDimIndices, this->
zDimIndices );
614 proshade_double* newMap =
new proshade_double [xDim * yDim * zDim];
617 ProSHADE_internal_overlay::paddMapWithZeroes ( this->
internalMap, newMap, xDim, yDim, zDim, this->
xDimIndices, this->
yDimIndices, this->
zDimIndices, addXPre, addYPre, addZPre );
621 this->
internalMap =
new proshade_double [xDim * yDim * zDim];
622 for ( proshade_unsign iter = 0; iter < static_cast<proshade_unsign> ( xDim * yDim * zDim ); iter++ ) { this->
internalMap[iter] = newMap[iter]; }
633 this->
xFrom -= addXPre ; this->
yFrom -= addYPre ; this->
zFrom -= addZPre;
634 this->
xTo += addXPost; this->
yTo += addYPost; this->
zTo += addZPost;
The documentation for this class was generated from the following files:
proshade_double noIQRsFromMedianNaivePeak
When doing peak searching, how many IQRs from the median the threshold for peak height should be (in ...
void normaliseEMatrices(ProSHADE_internal_data::ProSHADE_data *obj1, ProSHADE_internal_data::ProSHADE_data *obj2, ProSHADE_settings *settings)
This function normalises the E matrices.
bool sortProSHADESymmetryByPeak(proshade_double *a, proshade_double *b)
This function allows using std::sort to sort vectors of ProSHADE symmetry format..
proshade_double originalMapYCom
The COM of the first map to be loaded/computed without any furhter changes being reflacted along the ...
proshade_unsign maxBandwidth
The bandwidth of spherical harmonics decomposition for the largest sphere.
void addExtraBoundSpace(proshade_unsign xDim, proshade_unsign yDim, proshade_unsign zDim, proshade_single xAngs, proshade_single yAngs, proshade_single zAngs, proshade_signed *&bounds, proshade_single extraSpace)
This function takes a set of bounds and adds a given number of Angstroms to them.
proshade_double mapMovFromsChangeX
When the map is translated, the xFrom and xTo values are changed. This variable holds how much they h...
std::string recommendedSymmetryType
The symmetry type that ProSHADE finds the best fitting for the structure. Possible values are "" for ...
void determinePDBRanges(gemmi::Structure pdbFile, proshade_single *xFrom, proshade_single *xTo, proshade_single *yFrom, proshade_single *yTo, proshade_single *zFrom, proshade_single *zTo, bool firstModel)
Function for finding the PDB file ranges.
std::string fileName
This is the original file from which the data were obtained.
proshade_signed zFrom
This is the starting index along the z axis.
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 s...
std::string rotTrsJSONFile
The filename to which the rotation and translation operations are to be saved into.
proshade_unsign xDimIndices
This is the size of the map cell x dimension in indices.
proshade_single getZDimSize(void)
This function allows access to the map size in angstroms along the Z axis.
void changePDBBFactors(gemmi::Structure *pdbFile, proshade_double newBFactorValue, bool firstModel)
Function for changing the PDB B-factor values to a specific single value.
void interpolateMapFromSpheres(ProSHADE_settings *settings, proshade_double *&densityMapRotated)
This function interpolates the density map from the sphere mapped data.
proshade_single zDimSizeOriginal
This is the size of the map cell z dimension in Angstroms.
void vectorMeanAndSD(std::vector< proshade_double > *vec, proshade_double *&ret)
Function to get vector mean and standard deviation.
void addToDblPtrVector(std::vector< proshade_double * > *vecToAddTo, proshade_double *elementToAdd)
Adds the element to the vector.
void determineAllSHValues(proshade_unsign xDim, proshade_unsign yDim, proshade_unsign zDim)
This function determines all the required values for spherical harmonics computation.
bool isFilePDB(std::string fName)
Function determining if the input data type is PDB.
proshade_unsign getLocalBandwidth(void)
This function returns the local bandwidth.
proshade_unsign maxSymmetryFold
The highest symmetry fold to search for.
proshade_unsign xGridIndices
As far as I know, this is identical to the xDimIndices.
void computeOptimalTranslation(proshade_double eulA, proshade_double eulB, proshade_double eulG, proshade_double trsX, proshade_double trsY, proshade_double trsZ)
This function computes and saves the optimal translation vector from the already determined translati...
proshade_complex * translationMap
This is where the translation map will be held, if at all used.
std::vector< std::vector< proshade_double > > joinElementsFromDifferentGroups(std::vector< std::vector< proshade_double > > *first, std::vector< std::vector< proshade_double > > *second, proshade_double matrixTolerance, bool combine)
This function joins two group element lists using only unique elements.
proshade_unsign xAxisOrder
This is the order of the x axis.
void findTetra3C2s(std::vector< proshade_double * > *CSymList, std::vector< proshade_double * > *ret, proshade_double axErr, ProSHADE_internal_data::ProSHADE_data *dataObj, proshade_unsign verbose, proshade_double minPeakHeight)
This function takes the list of C symmetries and finds the 3 C2 symmetries with correct angles requir...
proshade_complex ** rotSphericalHarmonics
A set of rotated spherical harmonics values arrays for each sphere, used only if map rotation is requ...
proshade_double findIScore(std::vector< proshade_double * > *ISym)
This function takes the list of icosahedral axes and returns a score for deciding whether I symmetry ...
proshade_complex ** sphericalHarmonics
A set of spherical harmonics values arrays for each sphere.
proshade_single cAngle
This is the angle c of the map cell in degrees.
proshade_complex * so3CoeffsInverse
The inverse coefficients obtained by inverse SO(3) Fourier Transform (SOFT) - i.e....
void saveRequestedSymmetryD(ProSHADE_settings *settings, std::vector< proshade_double * > *DSym, std::vector< proshade_double * > *axes)
This function takes the D symmetries and searched for the requested symmetry.
proshade_signed * getXAxisOrigin(void)
This function allows access to the map X axis origin value.
proshade_double yCom
The COM of the map after processing along the Y-axis.
proshade_single boundsExtraSpace
The number of extra angstroms to be added to all re-boxing bounds just for safety.
This class contains all inputed data for the rotation function angle-axis converted spheres.
This class is the representation of ProSHADE exception.
void saveAllCSymmetries(std::vector< std::vector< proshade_unsign > > detected, std::vector< proshade_double * > peaks, std::vector< proshade_double * > *ret, proshade_double axErr)
This function takes the detected symmetries indices and peaks and saves these in the main cyclic symm...
std::vector< std::vector< proshade_unsign > > allDetectedDAxes
The vector of all detected dihedral symmetry axes indices in allDetectedCAxes.
proshade_single blurFactor
This is the amount by which B-factors should be increased to create the blurred map for masking.
void saveDetectedSymmetries(ProSHADE_settings *settings, std::vector< proshade_double * > *CSyms, std::vector< std::vector< proshade_double > > *allCs)
This function takes the results of point group searches and saves then into the output variables.
bool maskMap
Should the map be masked from noise?
proshade_unsign requestedSymmetryFold
The fold of the requested symmetry (only applicable to C and D symmetry types).
std::string requestedSymmetryType
The symmetry type requested by the user. Allowed values are C, D, T, O and I.
proshade_single getXDimSize(void)
This function allows access to the map size in angstroms along the X axis.
void addToUnsignVectorVector(std::vector< std::vector< proshade_unsign > > *vecToAddTo, std::vector< proshade_unsign > elementToAdd)
Adds the element to the vector of vectors.
proshade_double *& getInternalMap(void)
This function allows access to the first map array value address.
std::vector< proshade_double * > getAllPeaksNaive(proshade_complex *map, proshade_unsign dim, proshade_signed peakSize, proshade_double noIQRs)
This function finds peaks in the 3D map using the "naive" approach.
proshade_unsign noSpheres
The number of spheres with map projected onto them.
proshade_single getYDimSize(void)
This function allows access to the map size in angstroms along the Y axis.
std::vector< proshade_double > findPeaksByHeightBoundaries(std::vector< proshade_double * > allPeaks, proshade_double smoothing)
This function groups the peaks by height and returns the boundaries between such groups.
proshade_unsign inputOrder
This value is the input order - it is useful to know for writing out files, so that they would not ov...
void getMaskFromBlurr(proshade_double *&blurMap, proshade_double *&outMap, proshade_unsign xDimS, proshade_unsign yDimS, proshade_unsign zDimS, proshade_single noIQRs)
Function for computing mask from blurred map.
proshade_single zDimSize
This is the size of the map cell z dimension in Angstroms.
proshade_complex * so3Coeffs
The coefficients obtained by SO(3) Fourier Transform (SOFT), in this case derived from the E matrices...
bool saveMask
Should the mask be saved?
proshade_single requestedResolution
The resolution to which the calculations are to be done.
bool isBandWithinShell(proshade_unsign bandInQuestion, proshade_unsign shellInQuestion, ProSHADE_internal_spheres::ProSHADE_sphere **spheres)
This function checks if a band is available for a given shell.
proshade_double mapCOMProcessChangeX
The change in X axis between the creation of the structure (originalMapXCom) and just before rotation...
proshade_double minSymPeak
Minimum average peak for symmetry axis to be considered as "real".
void findMAPCOMValues(proshade_double *map, proshade_double *xCom, proshade_double *yCom, proshade_double *zCom, proshade_single xAngs, proshade_single yAngs, proshade_single zAngs, proshade_signed xFrom, proshade_signed xTo, proshade_signed yFrom, proshade_signed yTo, proshade_signed zFrom, proshade_signed zTo)
This function finds the Centre of Mass for a map.
void blurSharpenMap(proshade_double *&map, proshade_double *&maskedMap, proshade_unsign xDimS, proshade_unsign yDimS, proshade_unsign zDimS, proshade_single xAngs, proshade_single yAngs, proshade_single zAngs, proshade_single blurringFactor)
Function for blurring/sharpening maps.
proshade_double originalMapXCom
The COM of the first map to be loaded/computed without any furhter changes being reflacted along the ...
void setDetectedSymmetry(proshade_double *sym)
Sets the final detected symmetry axes information.
proshade_unsign xDimIndicesOriginal
This is the size of the map cell x dimension in indices.
void moveMapByFourier(proshade_double *&map, proshade_single xMov, proshade_single yMov, proshade_single zMov, proshade_single xAngs, proshade_single yAngs, proshade_single zAngs, proshade_signed xDim, proshade_signed yDim, proshade_signed zDim)
Function for moving map back to original PDB location by using Fourier transformation.
void predictIcosAxes(ProSHADE_settings *settings, std::vector< proshade_double * > *CSymList, std::vector< proshade_double * > *ret, proshade_double axErr, ProSHADE_internal_data::ProSHADE_data *dataObj, proshade_unsign verbose, proshade_double minPeakHeight, proshade_double matrixTolerance)
This function predicts all icosahedral point group symmetry axes from the cyclic point groups list.
bool progressiveSphereMapping
If true, each shell will have its own angular resolution dependent on the actual number of map points...
void movePDBForMapCalc(gemmi::Structure *pdbFile, proshade_single xMov, proshade_single yMov, proshade_single zMov, bool firstModel)
Function for moving co-ordinate atoms to better suit theoretical map computation.
proshade_single maxSphereDists
The distance between spheres in spherical mapping for the largest sphere.
proshade_unsign maxShellBand
The maximum band for any shell of the object.
proshade_double symMissPeakThres
Percentage of peaks that could be missing that would warrant starting the missing peaks search proced...
proshade_double originalPdbRotCenY
The centre of rotation as it relates to the original PDB positions (and not the ProSHADE internal map...
void getSpherePositions(ProSHADE_settings *settings)
This function determines the sphere positions (radii) for sphere mapping.
void invertMirrorMap(ProSHADE_settings *settings)
Function for inverting the map to its mirror image.
void getRotationMatrixFromEulerZXZAngles(proshade_double eulerAlpha, proshade_double eulerBeta, proshade_double eulerGamma, proshade_double *matrix)
Function to find the rotation matrix from Euler angles (ZXZ convention).
std::vector< proshade_double * > getDihedralSymmetriesList(ProSHADE_settings *settings, std::vector< proshade_double * > *CSymList)
This function obtains a list of all D symmetries from already computed C symmetries list.
bool checkElementsFormGroup(std::vector< std::vector< proshade_double > > *elements, proshade_double matrixTolerance)
This function checks if all group element products produce another group element.
void computeBeforeAfterZeroCounts(proshade_unsign *addXPre, proshade_unsign *addYPre, proshade_unsign *addZPre, proshade_unsign *addXPost, proshade_unsign *addYPost, proshade_unsign *addZPost, proshade_unsign xDim, proshade_unsign yDim, proshade_unsign zDim, proshade_unsign xDimIndices, proshade_unsign yDimIndices, proshade_unsign zDimIndices)
This function finds the number of zeroes to be added after and before the structure along each dimens...
proshade_double findBestCScore(std::vector< proshade_double * > *CSym, proshade_unsign *symInd)
This function locates the best scoring C symmetry axis, returning the score and best symmetry index.
std::vector< std::vector< proshade_double > > computeGroupElementsForGroup(std::vector< std::vector< proshade_double > > *allCSyms, proshade_unsign grPosition)
This function computes the group elements as rotation matrices (except for the identity element) for ...
proshade_double mapCOMProcessChangeZ
The change in Z axis between the creation of the structure (originalMapZCom) and just before rotation...
proshade_single maskingThresholdIQRs
Number of inter-quartile ranges from the median to be used for thresholding the blurred map for maski...
void computePdbRotationCentre(void)
This function computes the optimal rotation centre for co-ordinates.
bool usePhase
If true, the full data will be used, if false, Patterson maps will be used instead and phased data wi...
void findOcta3C4s(std::vector< proshade_double * > *CSymList, std::vector< proshade_double * > *ret, proshade_double axErr, ProSHADE_internal_data::ProSHADE_data *dataObj, proshade_unsign verbose, proshade_double minPeakHeight)
This function takes the list of C symmetries and finds the 3 C4 symmetries with perpendicular angles ...
proshade_single xDimSizeOriginal
This is the size of the map cell x dimension in Angstroms.
void complexMultiplication(proshade_double *r1, proshade_double *i1, proshade_double *r2, proshade_double *i2, proshade_double *retReal, proshade_double *retImag)
Function to multiply two complex numbers.
std::vector< proshade_unsign > allDetectedTAxes
The vector of all detected tetrahedral symmetry axes indices in allDetectedCAxes.
void printWarningMessage(proshade_signed verbose, std::string message, std::string warnCode)
General stderr message printing (used for warnings).
InputType figureDataType(std::string fName)
Function determining input data type.
void reSampleMapToResolutionTrilinear(proshade_double *&map, proshade_single resolution, proshade_unsign xDimS, proshade_unsign yDimS, proshade_unsign zDimS, proshade_single xAngs, proshade_single yAngs, proshade_single zAngs, proshade_single *&corrs)
This function re-samples a map to conform to given resolution using tri-linear interpolation.
proshade_signed zAxisOriginOriginal
This is the origin position along the z axis.
This class contains all inputed and derived data for a single sphere.
proshade_double getRotatedMappedData(proshade_unsign pos)
This function gets the rotated mapped data value for a particular position.
std::vector< std::vector< proshade_unsign > > findPeaksCSymmetry(std::vector< proshade_double * > *peaks, proshade_signed verbose, proshade_unsign band, proshade_double missPeakThres, proshade_double axisErrTolerance, bool axisErrToleranceDef, ProSHADE_internal_data::ProSHADE_data *dataObj)
This function searches the list of peaks for presence of cyclic symmetry.
std::string maskFileName
The filename to which mask should be saved.
std::vector< proshade_unsign > allDetectedOAxes
The vector of all detected octahedral symmetry axes indices in allDetectedCAxes.
void freeTranslationFunctionMemory(fftw_complex *&tmpIn1, fftw_complex *&tmpOut1, fftw_complex *&tmpIn2, fftw_complex *&tmpOut2, fftw_complex *&resOut, fftw_plan &forwardFourierObj1, fftw_plan &forwardFourierObj2, fftw_plan &inverseFourierCombo)
This function releases the memory for the Fourier transforms required for translation function comput...
proshade_complex *** eMatrices
The trace sigma and full rotation function c*conj(c) integral tables.
void centreMapOnCOM(ProSHADE_settings *settings)
This function shits the map so that its COM is in the centre of the map.
proshade_signed * getXFromPtr(void)
This function allows access to the map start along the X axis.
proshade_signed verbose
Should the software report on the progress, or just be quiet? Value between -1 (nothing) and 4 (loud)
void beautifyBoundaries(proshade_signed *&bounds, proshade_unsign xDim, proshade_unsign yDim, proshade_unsign zDim, proshade_signed boundsDiffThres, proshade_signed verbose)
Function for modifying boundaries to a mathematically more pleasant values.
void printSymmetryGroup(std::vector< proshade_unsign > grp, std::vector< proshade_double * > peaks, proshade_signed verbose)
This function simply prints the detected symmetry and all its supporting peaks.
proshade_unsign yDimIndices
This is the size of the map cell y dimension in indices.
proshade_signed xAxisOriginOriginal
This is the origin position along the x axis.
void saveRecommendedSymmetry(ProSHADE_settings *settings, std::vector< proshade_double * > *CSym, std::vector< proshade_double * > *DSym, std::vector< proshade_double * > *TSym, std::vector< proshade_double * > *OSym, std::vector< proshade_double * > *ISym, std::vector< proshade_double * > *axes)
This function takes all the detected symmetry results and decides on which are to be recommended for ...
void getWignerMatrixValue(proshade_unsign band, proshade_unsign order1, proshade_unsign order2, proshade_double *valueReal, proshade_double *valueImag)
This function allows access to the Wigner D matrix by knowing the band, order1 and order2 indices.
proshade_unsign yGridIndices
As far as I know, this is identical to the yDimIndices.
bool changeMapResolutionTriLinear
Should maps be re-sampled to obtain the required resolution?
proshade_signed zAxisOrigin
This is the origin position along the z axis.
void addToDoubleVector(std::vector< proshade_double > *vecToAddTo, proshade_double elementToAdd)
Adds the element to the vector.
void setPDBMapValues(void)
Function for determining iterator start and stop positions.
void findMapCOM(void)
This function finds the centre of mass of the internal map representation.
proshade_unsign yDimIndicesOriginal
This is the size of the map cell y dimension in indices.
proshade_unsign getXDim(void)
This function allows access to the map size in indices along the X axis.
void removeWaters(gemmi::Structure *pdbFile, bool firstModel)
This function removed all waters from PDB input file.
bool useBiCubicInterpolationOnPeaks
This variable switch decides whether best symmetry is detected from peak indices, or whether bicubic ...
proshade_double originalPdbTransX
The optimal translation vector as it relates to the original PDB positions (and not the ProSHADE inte...
proshade_double determinePeakThreshold(std::vector< proshade_double > inArr, proshade_double noIQRsFromMedian)
This function takes a vector of values and determines the threshold for removing noise from it.
proshade_signed zTo
This is the final index along the z axis.
proshade_signed xTo
This is the final index along the x axis.
void writeMask(std::string fName, proshade_double *mask)
Function for writing out a mask in MRC MAP format.
proshade_double integrationWeight
The Pearson's c.c. type weighting for the integration.
void saveRequestedSymmetryC(ProSHADE_settings *settings, std::vector< proshade_double * > *CSym, std::vector< proshade_double * > *axes)
This function takes the C symmetries and searched for the requested symmetry.
proshade_signed xAxisOrigin
This is the origin position along the x axis.
proshade_double originalPdbTransY
The optimal translation vector as it relates to the original PDB positions (and not the ProSHADE inte...
void computeWignerMatricesForRotation(ProSHADE_settings *settings, ProSHADE_internal_data::ProSHADE_data *obj, proshade_double eulerAlpha, proshade_double eulerBeta, proshade_double eulerGamma)
This function computes the Wigner D matrices for a particular set of Euler angles.
proshade_double *** rrpMatrices
The energy levels descriptor shell correlation tables.
proshade_signed yTo
This is the final index along the y axis.
bool forceP1
Should the P1 spacegroup be forced on the input PDB files?
proshade_single xDimSize
This is the size of the map cell x dimension in Angstroms.
proshade_double computeDotProduct(proshade_double *x1, proshade_double *y1, proshade_double *z1, proshade_double *x2, proshade_double *y2, proshade_double *z2)
Simple 3D vector dot product computation.
void findPDBCOMValues(gemmi::Structure pdbFile, proshade_double *xCom, proshade_double *yCom, proshade_double *zCom, bool firstModel)
This function finds the Centre of Mass for the co-ordinate file.
proshade_double mapMovFromsChangeY
When the map is translated, the yFrom and yTo values are changed. This variable holds how much they h...
bool sortDSymHlpInv(const proshade_double *a, const proshade_double *b)
This function compares two arrays of the ProSHADE dihedral symmetry list based on combination of axes...
proshade_signed yAxisOrigin
This is the origin position along the y axis.
void getBestPeakEulerAngsNaive(proshade_complex *map, proshade_unsign dim, proshade_double *eulA, proshade_double *eulB, proshade_double *eulG, ProSHADE_settings *settings)
This function finds the highest peaks optimised Euler angles using the "naive" approach.
void findIcos6C5s(std::vector< proshade_double * > *CSymList, std::vector< proshade_double * > *ret, proshade_double axErr, ProSHADE_internal_data::ProSHADE_data *dataObj, proshade_unsign verbose, proshade_double minPeakHeight)
This function takes the list of C symmetries and finds the six C5 symmetries with given angles requir...
void deepCopyAxisToDblPtrVector(std::vector< proshade_double * > *dblPtrVec, proshade_double *axis)
Does a deep copy of a double array to a vector of double arrays.
proshade_unsign yAxisOrder
This is the order of the y axis.
proshade_double * getRealSphHarmValue(proshade_unsign band, proshade_unsign order, proshade_unsign shell)
This function allows access to the private internal real spherical harmonics values.
proshade_double * internalMap
The internal map data representation, which may be amended as the run progresses.
proshade_unsign zDimIndicesOriginal
This is the size of the map cell z dimension in indices.
proshade_double complexMultiplicationConjugRealOnly(proshade_double *r1, proshade_double *i1, proshade_double *r2, proshade_double *i2)
Function to conjuggate multiply two complex numbers and return the real part only.
proshade_signed xFrom
This is the starting index along the x axis.
void getRotationMatrixFromAngleAxis(proshade_double *rotMat, proshade_double x, proshade_double y, proshade_double z, proshade_double ang)
This function converts the axis-angle representation to the rotation matrix representation.
void writeMap(std::string fName, std::string title="Created by ProSHADE and written by GEMMI", int mode=2)
Function for writing out the internal structure representation in MRC MAP format.
proshade_unsign getMaxBand(void)
This function returns the maximum band value for the object.
void invertSHCoefficients(void)
This function computes the shell mapped data from inverting the Spherical Harmonics coefficients.
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 s...
bool normaliseMap
Should the map be normalised to mean 0 sd 1?
proshade_single addExtraSpace
If this value is non-zero, this many angstroms of empty space will be added to the internal map.
void getNonZeroBounds(proshade_double *map, proshade_signed xDim, proshade_signed yDim, proshade_signed zDim, proshade_single xAngs, proshade_single yAngs, proshade_single zAngs, proshade_signed *&ret)
Function for finding the map boundaries enclosing positive only values.
proshade_unsign getYDim(void)
This function allows access to the map size in indices along the Y axis.
proshade_unsign maxCompBand
The largest comparison band - this variable tells how large arrays will be allocated for the comparis...
void maskMap(ProSHADE_settings *settings)
Function for computing the map mask using blurring and X IQRs from median.
void findTetra4C3s(std::vector< proshade_double * > *CSymList, std::vector< proshade_double * > *ret, proshade_double axErr, ProSHADE_internal_data::ProSHADE_data *dataObj, proshade_unsign verbose, proshade_double minPeakHeight)
This function takes the list of C symmetries and finds the 4 C3 symmetries with correct angles requir...
proshade_double xCom
The COM of the map after processing along the X-axis.
std::vector< proshade_double * > getCyclicSymmetriesList(ProSHADE_settings *settings)
This function obtains a list of all C symmetries from already computed self-rotation map.
void copyMapByBounds(proshade_signed xFrom, proshade_signed xTo, proshade_signed yFrom, proshade_signed yTo, proshade_signed zFrom, proshade_signed zTo, proshade_signed origXFrom, proshade_signed origYFrom, proshade_signed origZFrom, proshade_signed yDimIndices, proshade_signed zDimIndices, proshade_signed origXDimIndices, proshade_signed origYDimIndices, proshade_signed origZDimIndices, proshade_double *&newMap, proshade_double *origMap)
This function copies an old map to a new map with different boundaries.
proshade_double * getImagSphHarmValue(proshade_unsign band, proshade_unsign order, proshade_unsign shell)
This function allows access to the private internal imaginary spherical harmonics values.
proshade_double originalPdbTransZ
The optimal translation vector as it relates to the original PDB positions (and not the ProSHADE inte...
proshade_double findBestDScore(std::vector< proshade_double * > *DSym, proshade_unsign *symInd)
This function locates the best scoring D symmetry axis, returning the score and best symmetry index.
void readInMapData(gemmi::Ccp4< float > *gemmiMap, proshade_double *&map, proshade_unsign xDimInds, proshade_unsign yDimInds, proshade_unsign zDimInds, proshade_unsign xAxOrder, proshade_unsign yAxOrder, proshade_unsign zAxOrder)
This function converts the gemmi Ccp4 object data to ProSHADE internal map representation.
void computeEMatrices(ProSHADE_internal_data::ProSHADE_data *obj1, ProSHADE_internal_data::ProSHADE_data *obj2, ProSHADE_settings *settings)
This function computes the complete E matrices and their weights between any two objects.
proshade_complex * getTranslationFnPointer(void)
This function allows access to the translation function through a pointer.
void setRecommendedSymmetry(std::string val)
Sets the ProSHADE detected symmetry type.
proshade_double zCom
The COM of the map after processing along the Z-axis.
std::vector< proshade_single > spherePos
Vector of sphere radii from the centre of the map.
bool invertMap
Should the map be inverted? Only use this if you think you have the wrong hand in your map.
proshade_double findOScore(std::vector< proshade_double * > *OSym)
This function takes the list of octahedral axes and returns a score for deciding whether O symmetry s...
proshade_unsign getZDim(void)
This function allows access to the map size in indices along the Z axis.
void removeMapPhase(fftw_complex *&mapCoeffs, proshade_unsign xDim, proshade_unsign yDim, proshade_unsign zDim)
This function removes the phase from reciprocal (frequency) map.
proshade_signed boundsSimilarityThreshold
Number of indices which can be added just to make sure same size in indices is achieved.
void writePdb(std::string fName, proshade_double euA=0.0, proshade_double euB=0.0, proshade_double euG=0.0, proshade_double trsX=0.0, proshade_double trsY=0.0, proshade_double trsZ=0.0, bool firstModel=true)
This function writes out the PDB formatted file coresponding to the structure so that its COM is at s...
void computeAngularThreshold(std::vector< proshade_double > *lonCO, std::vector< proshade_double > *latCO, proshade_unsign angRes)
This function computes the angular thresholds for longitude and lattitude angles.
void initialiseInverseSHComputation(proshade_unsign shBand, double *&sigR, double *&sigI, double *&rcoeffs, double *&icoeffs, double *&weights, double *&workspace, fftw_plan &idctPlan, fftw_plan &ifftPlan)
This function initialises internal variables for inverse Spherical Harmonics computation.
void findHighestValueInMap(fftw_complex *resIn, proshade_unsign xD, proshade_unsign yD, proshade_unsign zD, proshade_double *trsX, proshade_double *trsY, proshade_double *trsZ, proshade_double *mapPeak)
This function simply finds the highest value in fftw_complex map and returns its position and value.
bool changeMapResolution
Should maps be re-sampled to obtain the required resolution?
void writeRotationTranslationJSON(proshade_double trsX1, proshade_double trsY1, proshade_double trsZ1, proshade_double eulA, proshade_double eulB, proshade_double eulG, proshade_double trsX2, proshade_double trsY2, proshade_double trsZ2, std::string fileName)
Function for writing out the optimal rotation and translation into a JSON file.
proshade_double mapMovFromsChangeZ
When the map is translated, the zFrom and zTo values are changed. This variable holds how much they h...
void axesToGroupTypeSanityCheck(proshade_unsign requiredAxes, proshade_unsign obtainedAxes, std::string groupType)
This function checks that the required and obtained numbers of axes are correct, printing error if th...
void computeInverseSOFTTransform(ProSHADE_internal_data::ProSHADE_data *obj1, ProSHADE_internal_data::ProSHADE_data *obj2, ProSHADE_settings *settings)
This function computes the inverse SO(3) transform.
void prependIdentity(std::vector< std::vector< proshade_double > > *vecToPrepend)
This function adds identity matrix as the first element of the vector of vectors of doubles.
This class contains peak groups detected in the rotation function mapped spheres.
std::string overlayStructureName
The filename to which the rotated and translated moving structure is to be saved.
bool isAxisUnique(std::vector< proshade_double * > *CSymList, proshade_double *axis, proshade_double tolerance=0.1, bool improve=false)
This function checks if new axis is unique, or already detected.
proshade_double getMapValue(proshade_unsign pos)
This function returns the internal map representation value of a particular array position.
proshade_signed * getYToPtr(void)
This function allows access to the map last position along the Y axis.
bool moveToCOM
Logical value stating whether the structure should be moved to have its Centre Of Mass (COM) in the m...
proshade_unsign peakNeighbours
Number of points in any direction that have to be lower than the considered index in order to conside...
void readInMAP(ProSHADE_settings *settings)
Function for reading map data using gemmi library.
void predictOctaAxes(std::vector< proshade_double * > *CSymList, std::vector< proshade_double * > *ret, proshade_double axErr, ProSHADE_internal_data::ProSHADE_data *dataObj, proshade_unsign verbose, proshade_double minPeakHeight, proshade_double matrixTolerance)
This function predicts all octahedral point group symmetry axes from the cyclic point groups list.
std::vector< proshade_double * > getPeaksAngleAxisPositions(std::vector< proshade_double * > allPeaks, proshade_unsign verbose)
This function converts peaks ZXZ Euler anles to angle-axis representation for further processing.
proshade_complex *** wignerMatrices
These matrices are computed for a particular rotation to be done in spherical harmonics.
void detectSymmetryInStructure(ProSHADE_settings *settings, std::vector< proshade_double * > *axes, std::vector< std::vector< proshade_double > > *allCs)
This function runs the symmetry detection algorithms on this structure and saves the results in the s...
ProSHADE_internal_io::InputType fileType
This is the type of the input file.
proshade_signed * getZAxisOrigin(void)
This function allows access to the map Z axis origin value.
void writeOutMapHeader(gemmi::Ccp4< float > *map, proshade_unsign xDimInds, proshade_unsign yDimInds, proshade_unsign zDimInds, proshade_single xDim, proshade_single yDim, proshade_single zDim, proshade_single aAng, proshade_single bAng, proshade_single cAng, proshade_signed xFrom, proshade_signed yFrom, proshade_signed zFrom, proshade_signed xAxOrigin, proshade_signed yAxOrigin, proshade_signed zAxOrigin, proshade_unsign xAxOrder, proshade_unsign yAxOrder, proshade_unsign zAxOrder, proshade_unsign xGridInds, proshade_unsign yGridInds, proshade_unsign zGridInds, std::string title, int mode)
This function parses the CCP4 MAP file header as read in by gemmi.
void findIcos10C3s(std::vector< proshade_double * > *CSymList, std::vector< proshade_double * > *ret, proshade_double axErr, ProSHADE_internal_data::ProSHADE_data *dataObj, proshade_unsign verbose, proshade_double minPeakHeight)
This function takes the list of C symmetries and finds the ten C3 symmetries with correct angles requ...
proshade_double smoothingFactor
This factor decides how small the group sizes should be - larger factor means more smaller groups.
proshade_signed myRound(proshade_double x)
Calls the appropriate version of round function depending on compiler version.
proshade_single yDimSizeOriginal
This is the size of the map cell y dimension in Angstroms.
proshade_unsign zAxisOrder
This is the order of the z axis.
void reSampleMap(ProSHADE_settings *settings)
This function changes the internal map sampling to conform to particular resolution value.
void rotatePDBCoordinates(gemmi::Structure *pdbFile, proshade_double euA, proshade_double euB, proshade_double euG, proshade_double xCom, proshade_double yCom, proshade_double zCom, bool firstModel)
Function for rotating the PDB file co-ordinates by Euler angles.
void findOcta4C3s(std::vector< proshade_double * > *CSymList, std::vector< proshade_double * > *ret, proshade_double axErr, ProSHADE_internal_data::ProSHADE_data *dataObj, proshade_unsign verbose, proshade_double minPeakHeight)
This function takes the list of C symmetries and finds the four C3 symmetries with correct angles req...
void generateMapFromPDB(gemmi::Structure pdbFile, proshade_double *&map, proshade_single requestedResolution, proshade_single xCell, proshade_single yCell, proshade_single zCell, proshade_signed *xTo, proshade_signed *yTo, proshade_signed *zTo, bool forceP1, bool firstModel)
This function generates a theoretical map from co-ordinate input files.
void checkMemoryAllocation(chVar checkVar, std::string fileP, unsigned int lineP, std::string funcP, std::string infoP="This error may occurs when ProSHADE requests memory to be\n : allocated to it and this operation fails. This could\n : happen when not enough memory is available, either due to\n : other processes using a lot of memory, or when the machine\n : does not have sufficient memory available. Re-run to see\n : if this problem persists.")
Checks if memory was allocated properly.
proshade_signed * getXToPtr(void)
This function allows access to the map last position along the X axis.
proshade_signed * getYFromPtr(void)
This function allows access to the map start along the Y axis.
void translatePDBCoordinates(gemmi::Structure *pdbFile, proshade_double transX, proshade_double transY, proshade_double transZ, bool firstModel)
Function for translating the PDB file co-ordinates by given distances in Angstroms.
proshade_double mapCOMProcessChangeY
The change in Y axis between the creation of the structure (originalMapYCom) and just before rotation...
proshade_single bAngle
This is the angle b of the map cell in degrees.
void getEulerZXZFromSOFTPosition(proshade_signed band, proshade_signed x, proshade_signed y, proshade_signed z, proshade_double *eulerAlpha, proshade_double *eulerBeta, proshade_double *eulerGamma)
Function to find Euler angles (ZXZ convention) from index position in the inverse SOFT map.
proshade_signed yAxisOriginOriginal
This is the origin position along the y axis.
void saveDSymmetry(std::vector< proshade_double * > *ret, std::vector< proshade_double * > *CSymList, proshade_unsign axisOne, proshade_unsign axisTwo)
This function saves a detected dihedral symmetry to the dihedral symmetries list.
proshade_single aAngle
This is the angle a of the map cell in degrees.
void addToDoubleVectorVector(std::vector< std::vector< proshade_double > > *vecToAddTo, std::vector< proshade_double > elementToAdd)
Adds the element to the vector of vectors.
proshade_double findTScore(std::vector< proshade_double * > *TSym)
This function takes the list of tetrahedral axes and returns a score for deciding whether T symmetry ...
void figureIndexStartStop(void)
Function for determining iterator start and stop positions.
bool isEmpty
This variable stated whether the class contains any information.
void allocateTranslationFunctionMemory(fftw_complex *&tmpIn1, fftw_complex *&tmpOut1, fftw_complex *&tmpIn2, fftw_complex *&tmpOut2, fftw_complex *&resIn, fftw_complex *&resOut, fftw_plan &forwardFourierObj1, fftw_plan &forwardFourierObj2, fftw_plan &inverseFourierCombo, proshade_unsign xD, proshade_unsign yD, proshade_unsign zD)
This function allocates the memory for the Fourier transforms required for translation function compu...
proshade_complex * getInvSO3Coeffs(void)
This function allows access to the inverse SO(3) coefficients array.
std::vector< proshade_unsign > allDetectedIAxes
The vector of all detected icosahedral symmetry axes indices in allDetectedCAxes.
proshade_signed * forceBounds
These will be the boundaries to be forced upon the map.
std::vector< proshade_double * > detectedSymmetry
The vector of detected symmetry axes.
proshade_signed yFrom
This is the starting index along the y axis.
proshade_unsign recommendedSymmetryFold
The fold of the recommended symmetry C or D type, 0 otherwise.
void addToUnsignVector(std::vector< proshade_unsign > *vecToAddTo, proshade_unsign elementToAdd)
Adds the element to the vector.
void allocateRRPMemory(ProSHADE_settings *settings)
This function allocates the required memory for the RRP matrices.
std::vector< proshade_double * > getIcosahedralSymmetriesList(ProSHADE_settings *settings, std::vector< proshade_double * > *CSymList)
This function obtains a list of all I symmetry axes from the already computed C symmetries list.
void reSampleMapToResolutionFourier(proshade_double *&map, proshade_single resolution, proshade_unsign xDimS, proshade_unsign yDimS, proshade_unsign zDimS, proshade_single xAngs, proshade_single yAngs, proshade_single zAngs, proshade_single *&corrs)
This function re-samples a map to conform to given resolution using Fourier.
proshade_signed * getYAxisOrigin(void)
This function allows access to the map Y axis origin value.
std::vector< proshade_double * > getCyclicSymmetriesListFromAngleAxis(ProSHADE_settings *settings)
This function obtains a list of all C symmetries from the angle-axis space mapped rotation function v...
void computeRotatedSH(ProSHADE_settings *settings)
This function multiplies the objects spherical harmonics with the Wigner D matrices,...
std::vector< proshade_double * > getTetrahedralSymmetriesList(ProSHADE_settings *settings, std::vector< proshade_double * > *CSymList)
This function obtains a list of all T symmetry axes from the already computed C symmetries list.
proshade_double originalPdbRotCenZ
The centre of rotation as it relates to the original PDB positions (and not the ProSHADE internal map...
void paddMapWithZeroes(proshade_double *oldMap, proshade_double *&newMap, proshade_unsign xDim, proshade_unsign yDim, proshade_unsign zDim, proshade_unsign xDimIndices, proshade_unsign yDimIndices, proshade_unsign zDimIndices, proshade_unsign addXPre, proshade_unsign addYPre, proshade_unsign addZPre)
This function adds zeroes before and after the central map and copies the central map values into a n...
void addToSingleVector(std::vector< proshade_single > *vecToAddTo, proshade_single elementToAdd)
Adds the element to the vector.
bool firstModelOnly
Shoud only the first PDB model be used, or should all models be used?
void combineFourierForTranslation(fftw_complex *tmpOut1, fftw_complex *tmpOut2, fftw_complex *&resOut, proshade_unsign xD, proshade_unsign yD, proshade_unsign zD)
This function combines Fourier coefficients of two structures in a way, so that inverse Fourier of th...
void findOcta6C2s(std::vector< proshade_double * > *CSymList, std::vector< proshade_double * > *ret, proshade_double axErr, ProSHADE_internal_data::ProSHADE_data *dataObj, proshade_unsign verbose, proshade_double minPeakHeight)
This function takes the list of C symmetries and finds the six C2 symmetries with correct angles requ...
proshade_double axisErrTolerance
Allowed error on vector axis in in dot product ( acos ( 1 - axErr ) is the allowed difference in radi...
bool useSameBounds
Switch to say that the same boundaries as used for the first should be used for all input maps.
proshade_unsign zDimIndices
This is the size of the map cell z dimension in indices.
proshade_double pdbBFactorNewVal
Change all PDB B-factors to this value (for smooth maps).
void allocateRotatedMap(void)
This function allocates the rotated map memory.
proshade_unsign zGridIndices
As far as I know, this is identical to the zDimIndices.
void setRecommendedFold(proshade_unsign val)
Sets the ProSHADE detected symmetry fold.
void generateSO3CoeffsFromEMatrices(ProSHADE_internal_data::ProSHADE_data *obj1, ProSHADE_internal_data::ProSHADE_data *obj2, ProSHADE_settings *settings)
This function converts the E matrices to SO(3) coefficients.
void setVariablesLeftOnAuto(void)
Function to determine general values that the user left on auto-determination.
bool removeWaters
Should all waters be removed from input PDB files?
ProSHADE_internal_spheres::ProSHADE_sphere ** spheres
The set of concentric spheres to which the intermal density map has been projected.
void normaliseMap(ProSHADE_settings *settings)
Function for normalising the map values to mean 0 and sd 1..
std::vector< proshade_double * > findRequestedCSymmetryFromAngleAxis(ProSHADE_settings *settings, proshade_unsign fold, proshade_double *peakThres)
This function searches the angle-axis representation of the rotation function for a cyclic point grou...
std::vector< proshade_unsign > findAllPrimes(proshade_unsign upTo)
This function finds all prime numbers up to the supplied limit.
proshade_double originalPdbRotCenX
The centre of rotation as it relates to the original PDB positions (and not the ProSHADE internal map...
proshade_double originalMapZCom
The COM of the first map to be loaded/computed without any furhter changes being reflacted along the ...
std::vector< proshade_double * > getOctahedralSymmetriesList(ProSHADE_settings *settings, std::vector< proshade_double * > *CSymList)
This function obtains a list of all O symmetry axes from the already computed C symmetries list.
void printProgressMessage(proshade_signed verbose, proshade_signed messageLevel, std::string message)
General stdout message printing.
proshade_single yDimSize
This is the size of the map cell y dimension in Angstroms.
void setResolution(proshade_single resolution)
Sets the requested resolution in the appropriate variable.
void printSymmetryCompletion(proshade_unsign noSyms, proshade_unsign verbose)
This function simply prints the summary and warnings for cyclic symmetries detection completion.
std::vector< std::vector< proshade_double > > allDetectedCAxes
The vector of all detected cyclic symmetry axes.
void removePhaseInormation(ProSHADE_settings *settings)
This function removes phase from the map, effectively converting it to Patterson map.
void moveMapByIndices(proshade_single *xMov, proshade_single *yMov, proshade_single *zMov, proshade_single xAngs, proshade_single yAngs, proshade_single zAngs, proshade_signed *xFrom, proshade_signed *xTo, proshade_signed *yFrom, proshade_signed *yTo, proshade_signed *zFrom, proshade_signed *zTo, proshade_signed *xOrigin, proshade_signed *yOrigin, proshade_signed *zOrigin)
Function for moving map back to original PDB location by changing the indices.
void readInMapHeader(gemmi::Ccp4< float > *map, proshade_unsign *xDimInds, proshade_unsign *yDimInds, proshade_unsign *zDimInds, proshade_single *xDim, proshade_single *yDim, proshade_single *zDim, proshade_single *aAng, proshade_single *bAng, proshade_single *cAng, proshade_signed *xFrom, proshade_signed *yFrom, proshade_signed *zFrom, proshade_signed *xAxOrigin, proshade_signed *yAxOrigin, proshade_signed *zAxOrigin, proshade_unsign *xAxOrder, proshade_unsign *yAxOrder, proshade_unsign *zAxOrder, proshade_unsign *xGridInds, proshade_unsign *yGridInds, proshade_unsign *zGridInds)
This function parses the CCP4 MAP file header as read in by gemmi.
void addExtraSpace(ProSHADE_settings *settings)
This function increases the size of the map so that it can add empty space around it.
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 s...
bool sortSymHlpInv(const proshade_double *a, const proshade_double *b)
This function compares two arrays of two based on the fifth number, sorting highest first.
void addToStringVector(std::vector< std::string > *vecToAddTo, std::string elementToAdd)
Adds the element to the vector.
void computeSphericalHarmonics(proshade_unsign band, proshade_double *sphereMappedData, proshade_complex *&shArray)
This function computes the spherical harmonics of a aingle shell, saving them in supplied pointer.
void readInPDB(ProSHADE_settings *settings)
Function for reading pdb data.
void setRotatedMappedData(proshade_unsign pos, proshade_double value)
This function sets the rotated mapped data value to the given position.
proshade_signed * getZFromPtr(void)
This function allows access to the map start along the Z axis.
proshade_signed * getZToPtr(void)
This function allows access to the map last position along the Z axis.
void allocateRotatedSHMemory(ProSHADE_settings *settings)
This function allocates the memory required for storing the rotated Spherical Harmonics coefficients.
void findIcos15C2s(std::vector< proshade_double * > *CSymList, std::vector< proshade_double * > *ret, proshade_double axErr, ProSHADE_internal_data::ProSHADE_data *dataObj, proshade_unsign verbose, proshade_double minPeakHeight)
This function takes the list of C symmetries and finds the fifteen C3 symmetries with correct angles ...