![]() |
ProSHADE
0.7.6.6 (JUL 2022)
Protein Shape Detection
|
This namespace contains all the functions required for map overlays. More...
Functions | |
void | getOptimalRotation (ProSHADE_settings *settings, ProSHADE_internal_data::ProSHADE_data *staticStructure, ProSHADE_internal_data::ProSHADE_data *movingStructure, proshade_double *eulA, proshade_double *eulB, proshade_double *eulG) |
This function finds the optimal rotation between two structures as described by the settings object. More... | |
void | getOptimalTranslation (ProSHADE_settings *settings, ProSHADE_internal_data::ProSHADE_data *staticStructure, ProSHADE_internal_data::ProSHADE_data *movingStructure, proshade_double *trsX, proshade_double *trsY, proshade_double *trsZ, proshade_double eulA, proshade_double eulB, proshade_double eulG) |
This function finds the optimal translation between two structures as described by the settings object given a rotation between the two objects. More... | |
void | computeTranslationsFromPeak (ProSHADE_internal_data::ProSHADE_data *staticStructure, ProSHADE_internal_data::ProSHADE_data *movingStructure, proshade_double *trsX, proshade_double *trsY, proshade_double *trsZ) |
This function computes the translation in Angstroms that corresponds to the translation function peak. More... | |
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 dimension. More... | |
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 new map. More... | |
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 computation. More... | |
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 computation. More... | |
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. More... | |
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. More... | |
This namespace contains all the functions required for map overlays.
The map overlay task does have some specific functions that are betters groupped together for higher clarity of the code and also simple modifications later. This is where these live.
void ProSHADE_internal_overlay::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 computation.
[in] | tmpIn1 | Array to hold the static structure Fourier inputs. |
[in] | tmpOut1 | Array to hold the static structure Fourier outputs. |
[in] | tmpIn2 | Array to hold the moving structure Fourier inputs. |
[in] | tmpOut2 | Array to hold the moving structure Fourier outputs. |
[in] | resIn | Array to hold the final translation function values. |
[in] | resOut | Array to hold the combined Fourier coefficients of both structures. |
[in] | forwardFourierObj1 | FFTW plan for the forward Fourier of the static structure. |
[in] | forwardFourierObj2 | FFTW plan for the forward Fourier of the moving structure. |
[in] | inverseFourierCombo | FFTW plan for the backward Fourier of the combined Fourier factors of both structures. |
[in] | xD | The dimension of the X axis of the structures (assumes both structures have the same sizes and sampling). |
[in] | yD | The dimension of the Y axis of the structures (assumes both structures have the same sizes and sampling). |
[in] | zD | The dimension of the Z axis of the structures (assumes both structures have the same sizes and sampling). |
Definition at line 367 of file ProSHADE_overlay.cpp.
void ProSHADE_internal_overlay::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.
[in] | lonCO | Pointer to vector where longitude thresholds are to be stored at. |
[in] | latCO | Pointer to vector where lattitude thresholds are to be stored at. |
[in] | angRes | The angular resolution of the computation. |
Definition at line 1287 of file ProSHADE_overlay.cpp.
void ProSHADE_internal_overlay::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 dimension.
[in] | addXPre | Variable pointer where the number of zeroes to be added before the map along X axis is saved. |
[in] | addYPre | Variable pointer where the number of zeroes to be added before the map along Y axis is saved. |
[in] | addZPre | Variable pointer where the number of zeroes to be added before the map along Z axis is saved. |
[in] | addXPost | Variable pointer where the number of zeroes to be added after the map along X axis is saved. |
[in] | addYPost | Variable pointer where the number of zeroes to be added after the map along Y axis is saved. |
[in] | addZPost | Variable pointer where the number of zeroes to be added after the map along Z axis is saved. |
[in] | xDim | The X dimension size in indices of the new map. |
[in] | yDim | The Y dimension size in indices of the new map. |
[in] | zDim | The Z dimension size in indices of the new map. |
[in] | xDimIndices | The X dimension size in indices of the old map. |
[in] | yDimIndices | The Y dimension size in indices of the old map. |
[in] | zDimIndices | The Z dimension size in indices of the old map. |
Definition at line 492 of file ProSHADE_overlay.cpp.
void ProSHADE_internal_overlay::computeTranslationsFromPeak | ( | ProSHADE_internal_data::ProSHADE_data * | staticStructure, |
ProSHADE_internal_data::ProSHADE_data * | movingStructure, | ||
proshade_double * | trsX, | ||
proshade_double * | trsY, | ||
proshade_double * | trsZ | ||
) |
This function computes the translation in Angstroms that corresponds to the translation function peak.
[in] | staticStructure | A pointer to the data class object of the static structure. |
[in] | movingStructure | A pointer to the data class object of the moving structure. |
[in] | trsX | The variable to which the best X-axis position value will be saved to. |
[in] | trsY | The variable to which the best Y-axis position value will be saved to. |
[in] | trsZ | The variable to which the best Z-axis position value will be saved to. |
Definition at line 220 of file ProSHADE_overlay.cpp.
void ProSHADE_internal_overlay::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 computation.
[in] | tmpIn1 | Array to hold the static structure Fourier inputs. |
[in] | tmpOut1 | Array to hold the static structure Fourier outputs. |
[in] | tmpIn2 | Array to hold the moving structure Fourier inputs. |
[in] | tmpOut2 | Array to hold the moving structure Fourier outputs. |
[in] | resOut | Array to hold the combined Fourier coefficients of both structures. |
[in] | forwardFourierObj1 | FFTW plan for the forward Fourier of the static structure. |
[in] | forwardFourierObj2 | FFTW plan for the forward Fourier of the moving structure. |
[in] | inverseFourierCombo | FFTW plan for the backward Fourier of the combined Fourier factors of both structures. |
Definition at line 406 of file ProSHADE_overlay.cpp.
void ProSHADE_internal_overlay::getOptimalRotation | ( | ProSHADE_settings * | settings, |
ProSHADE_internal_data::ProSHADE_data * | staticStructure, | ||
ProSHADE_internal_data::ProSHADE_data * | movingStructure, | ||
proshade_double * | eulA, | ||
proshade_double * | eulB, | ||
proshade_double * | eulG | ||
) |
This function finds the optimal rotation between two structures as described by the settings object.
This function takes the settings and two structure classes. It then reads in and processes both structures so that the globally optimal rotation overlay Euler angles are detected. However, this is only the case for rotation along the centre of the map of the second structure; therefore, either use Patterson data (usePhase = false), or be aware that better rotation may exist for different centre of rotation.
[in] | settings | A pointer to settings class containing all the information required for map symmetry detection. |
[in] | obj1 | A pointer to the data class object of the other ( static ) structure. |
[in] | obj2 | A pointer to the data class object of the first ( moving ) structure. |
[in] | eulA | The variable to which the best Euler alpha angle value will be saved to. |
[in] | eulB | The variable to which the best Euler beta angle value will be saved to. |
[in] | eulG | The variable to which the best Euler gamma angle value will be saved to. |
Definition at line 74 of file ProSHADE_overlay.cpp.
void ProSHADE_internal_overlay::getOptimalTranslation | ( | ProSHADE_settings * | settings, |
ProSHADE_internal_data::ProSHADE_data * | staticStructure, | ||
ProSHADE_internal_data::ProSHADE_data * | movingStructure, | ||
proshade_double * | trsX, | ||
proshade_double * | trsY, | ||
proshade_double * | trsZ, | ||
proshade_double | eulA, | ||
proshade_double | eulB, | ||
proshade_double | eulG | ||
) |
This function finds the optimal translation between two structures as described by the settings object given a rotation between the two objects.
This function starts by loading and processing the structures according to the settings object (keeping phase is assumed, but callers responsibility). It then applies the required rotation to the second (moing) strucutre and then it follows with zero padding to make sure the structures have the same dimensions (again, it assumes map re-sampling was done, but setting to is callers responsibility). It then computes the translation function, finds the highest peak and returns the positions as well as height of this peak.
[in] | settings | A pointer to settings class containing all the information required for map overlay computation. |
[in] | staticStructure | A pointer to the data class object of the other ( static ) structure. |
[in] | movingStructure | A pointer to the data class object of the first ( moving ) structure. |
[in] | trsX | The variable to which the best X-axis position value will be saved to. |
[in] | trsY | The variable to which the best Y-axis position value will be saved to. |
[in] | trsZ | The variable to which the best Z-axis position value will be saved to. |
[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. |
Definition at line 123 of file ProSHADE_overlay.cpp.
void ProSHADE_internal_overlay::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.
[in] | shBand | The bandwidth for this particular shell. |
[in] | sigR | Pointer to be initialised for the real signal values. |
[in] | sigI | Pointer to be initialised for the imaginary signal values. |
[in] | rcoeffs | Pointer to be initialised for the real coefficient values. |
[in] | icoeffs | Pointer to be initialised for the imaginary coefficient values. |
[in] | weights | Pointer to be initialised for the transform weight values. |
[in] | workspace | Pointer to be initialised for the computation screatch space. |
[in] | idctPlan | Pointer reference to the cosine/sine transform plan to be created. |
[in] | ifftPlan | Pointer reference to the discrete 3D Fourier transform plan to be created. |
Definition at line 1171 of file ProSHADE_overlay.cpp.
void ProSHADE_internal_overlay::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 new map.
[in] | oldMap | The original, unpadded map. |
[in] | newMap | The array to which the new map will be saved into. |
[in] | xDim | The X dimension size of the new map. |
[in] | yDim | The Y dimension size of the new map. |
[in] | zDim | The Z dimension size of the new map. |
[in] | xDimIndices | The X dimension size in indices of the old map. |
[in] | yDimIndices | The Y dimension size in indices of the old map. |
[in] | zDimIndices | The Z dimension size in indices of the old map. |
[in] | addXPre | How many zeroes are to be added before the central map along the X axis? |
[in] | addYPre | How many zeroes are to be added before the central map along the Y axis? |
[in] | addZPre | How many zeroes are to be added before the central map along the Z axis? |
Definition at line 521 of file ProSHADE_overlay.cpp.