![]() |
ProSHADE
0.7.6.2 (DEC 2021)
Protein Shape Detection
|
This class contains all inputed and derived data for a single sphere. More...
#include <ProSHADE_spheres.hpp>
Public Member Functions | |
ProSHADE_sphere (proshade_unsign xDimMax, proshade_unsign yDimMax, proshade_unsign zDimMax, proshade_single xSize, proshade_single ySize, proshade_single zSize, proshade_unsign shOrder, std::vector< proshade_single > *spherePos, bool progressiveMapping, proshade_unsign band, proshade_double *map, proshade_unsign *maxShellBand) | |
Constructor for getting empty ProSHADE_sphere class. More... | |
~ProSHADE_sphere (void) | |
Destructor for the ProSHADE_sphere class. More... | |
void | allocateRotatedMap (void) |
This function allocates the rotated map memory. | |
proshade_unsign | getLocalBandwidth (void) |
This function returns the local bandwidth. More... | |
proshade_unsign | getLocalAngRes (void) |
This function returns the local angular resolution. More... | |
proshade_double * | getMappedData (void) |
This function returns the mapped data array. More... | |
proshade_double | getShellRadius (void) |
This function returns the radius of the shell in question. More... | |
void | setRotatedMappedData (proshade_unsign pos, proshade_double value) |
This function sets the rotated mapped data value to the given position. More... | |
proshade_double | getRotatedMappedData (proshade_unsign pos) |
This function gets the rotated mapped data value for a particular position. More... | |
Protected Member Functions | |
proshade_unsign | getMaxCircumference (proshade_unsign xDimMax, proshade_unsign yDimMax, proshade_unsign zDimMax, proshade_single maxRange) |
This function determines the maximum circumference of a shell. More... | |
bool | getMapPoint (proshade_double *map, proshade_unsign xDimMax, proshade_unsign yDimMax, proshade_unsign zDimMax, proshade_signed xPos, proshade_signed yPos, proshade_signed zPos, std::vector< proshade_double > *interpVec) |
This function fills in the interpolation vector for a single map point. More... | |
void | getLongitudeCutoffs (std::vector< proshade_double > *lonCO) |
This function fills in the vector of longitudal bin boarder values. More... | |
void | getLattitudeCutoffs (std::vector< proshade_double > *latCO) |
This function fills in the vector of lattitudal bin boarder values. More... | |
void | getInterpolationXYZ (proshade_double *x, proshade_double *y, proshade_double *z, proshade_double thetaIt, std::vector< proshade_double > *lonCO, proshade_unsign phiIt, std::vector< proshade_double > *latCO) |
This function finds the x, y and z positions of supplied shell point. More... | |
void | getXYZTopBottoms (proshade_unsign xDimMax, proshade_unsign yDimMax, proshade_unsign zDimMax, proshade_double x, proshade_double y, proshade_double z, proshade_signed *xBottom, proshade_signed *yBottom, proshade_signed *zBottom, proshade_signed *xTop, proshade_signed *yTop, proshade_signed *zTop) |
This function fills in the interpolation vector for a single map point. More... | |
void | interpolateAlongFirst (std::vector< proshade_double > c000, std::vector< proshade_double > c001, std::vector< proshade_double > c010, std::vector< proshade_double > c011, std::vector< proshade_double > c100, std::vector< proshade_double > c101, std::vector< proshade_double > c110, std::vector< proshade_double > c111, std::vector< proshade_double > *c00, std::vector< proshade_double > *c01, std::vector< proshade_double > *c10, std::vector< proshade_double > *c11, proshade_double xd) |
This function interpolates along the first (X) dimension. More... | |
void | interpolateAlongSecond (std::vector< proshade_double > c00, std::vector< proshade_double > c01, std::vector< proshade_double > c10, std::vector< proshade_double > c11, std::vector< proshade_double > *c0, std::vector< proshade_double > *c1, proshade_double yd) |
This function interpolates along the second (Y) dimension. More... | |
void | mapData (proshade_double *map, proshade_unsign xDimMax, proshade_unsign yDimMax, proshade_unsign zDimMax) |
This function maps the internal map to the specific sphere. More... | |
This class contains all inputed and derived data for a single sphere.
This class codes the object that contains all the information about a single concentric sphere as well as all the functionality required to process such data.
Definition at line 48 of file ProSHADE_spheres.hpp.
ProSHADE_internal_spheres::ProSHADE_sphere::ProSHADE_sphere | ( | proshade_unsign | xDimMax, |
proshade_unsign | yDimMax, | ||
proshade_unsign | zDimMax, | ||
proshade_single | xSize, | ||
proshade_single | ySize, | ||
proshade_single | zSize, | ||
proshade_unsign | shOrder, | ||
std::vector< proshade_single > * | spherePos, | ||
bool | progressiveMapping, | ||
proshade_unsign | band, | ||
proshade_double * | map, | ||
proshade_unsign * | maxShellBand | ||
) |
Constructor for getting empty ProSHADE_sphere class.
This constructor takes all the information required by the shell and proceeds to set the shell object accordingly. It can either set the spherical harmonics variables according to shell size (if the progressive mapping is allowed), or it just uses the whole map defaults (in the opposite case). It also maps the density onto the spherical grid of the shell using tri-linear interpolation.
[in] | xDimMax | The internal map maximum index in the x dimension. |
[in] | yDimMax | The internal map maximum index in the y dimension. |
[in] | zDimMax | The internal map maximum index in the z dimension. |
[in] | xSize | The integral map size in angstroms along the x-axis. |
[in] | ySize | The integral map size in angstroms along the y-axis. |
[in] | zSize | The integral map size in angstroms along the z-axis. |
[in] | shOrder | The order of the shell in the shell vector - 0 is the smallest shell. |
[in] | spherePos | A Pointer to vector of proshade_single's with the shell positions. |
[in] | progressiveMapping | Should the bandwidth and angular resolution be set by the actual number of points, or just same for all shells? |
[in] | band | The bandwidth to be set for conservative mapping. |
[in] | map | A pointer to the internal map which should be mapped to the sphere. |
[in] | maxShellBand | This pointer reference will take the shell band, if it is higher than the already known one. |
[out] | X | Data object with all values set and the appropriate map part mapped. |
Definition at line 46 of file ProSHADE_spheres.cpp.
ProSHADE_internal_spheres::ProSHADE_sphere::~ProSHADE_sphere | ( | void | ) |
Destructor for the ProSHADE_sphere class.
This destructor is responsible for releasing all memory used by the data storing object
[out] | X | N/A. |
Definition at line 102 of file ProSHADE_spheres.cpp.
|
protected |
This function finds the x, y and z positions of supplied shell point.
This function converts the angular grid longitude and lattitude position (defined as in between the cutt-offs of the given index and its neighbour) to the X, Y and Z axis positions, which it saves in the supplied variables.
[in] | x | A pointer to variable where the x position is to be saved. |
[in] | y | A pointer to variable where the y position is to be saved. |
[in] | z | A pointer to variable where the z position is to be saved. |
[in] | thetaIt | The longitude cut-off index of the grid point of which the XYZ are to be computed. |
[in] | lonCO | A pointer for vector of proshade_double's where the longitude cutt-off values are saved |
[in] | phiIt | The lattitude cut-off index of the grid point of which the XYZ are to be computed. |
[in] | lonCO | A pointer for vector of proshade_double's where the lattitude cutt-off values are saved |
Definition at line 336 of file ProSHADE_spheres.cpp.
|
protected |
This function fills in the vector of lattitudal bin boarder values.
This is a simple abstraction function which finds the boarders of the angular grid binds along the lattitudal angle.
[in] | latCO | A pointer for vector of proshade_double's to which the cutt-off values are to be saved. The vector needs to be initialised for this->localAngRes + 1 size. |
Definition at line 308 of file ProSHADE_spheres.cpp.
proshade_unsign ProSHADE_internal_spheres::ProSHADE_sphere::getLocalAngRes | ( | void | ) |
This function returns the local angular resolution.
This is a simple accessor function so that the inverse sphere to Cartesian interpolation knows the proper angular cut-offs for each sphere.
[out] | localAngRes | The value of the local angular resolution for this particular shell. |
Definition at line 403 of file ProSHADE_spheres.cpp.
proshade_unsign ProSHADE_internal_spheres::ProSHADE_sphere::getLocalBandwidth | ( | void | ) |
This function returns the local bandwidth.
This is a simple accessor function so that the spherical harmonics can allocate the proper memory given the local bandwidth of the sphere.
[out] | localBandwidth | The value of the local bandwidth for this particular shell. |
Definition at line 390 of file ProSHADE_spheres.cpp.
|
protected |
This function fills in the vector of longitudal bin boarder values.
This is a simple abstraction function which finds the boarders of the angular grid binds along the longitudal angle.
[in] | lonCO | A pointer for vector of proshade_double's to which the cutt-off values are to be saved. The vector needs to be initialised for this->localAngRes + 1 size. |
Definition at line 287 of file ProSHADE_spheres.cpp.
proshade_double * ProSHADE_internal_spheres::ProSHADE_sphere::getMappedData | ( | void | ) |
This function returns the mapped data array.
This is a simple accessor function so that the spherical harmonics can access the mapped data in an array.
[out] | mappedData | proshade_double pointer to an array of mapped data. |
Definition at line 416 of file ProSHADE_spheres.cpp.
|
protected |
This function fills in the interpolation vector for a single map point.
This function takes the index positions of a map point and a pointer to a vector of 4 proshade_double's and fills in the vector so that interpolation can easily be done using its values. It also returns boolean value, true if the point is in bounds and everything had succeeded and false if the point was out of bounds and therefore the interpolation is not required as the mapped value should just be 0.
[in] | map | The density map pointer - the map which should be mapped to the data. |
[in] | xDimMax | The internal map maximum index in the x dimension. |
[in] | yDimMax | The internal map maximum index in the y dimension. |
[in] | zDimMax | The internal map maximum index in the z dimension. |
[in] | xPos | The x axis index position of the point of which interpolation vector is to be obtained. |
[in] | yPos | The y axis index position of the point of which interpolation vector is to be obtained. |
[in] | zPos | The z axis index position of the point of which interpolation vector is to be obtained. |
[in] | interpVec | The variable to which the interpolation values are to be saved (vector of proshade_double's initialised to length 4). |
Definition at line 260 of file ProSHADE_spheres.cpp.
|
protected |
This function determines the maximum circumference of a shell.
This function takes the input variables and finds the maximum circumference of the sphere data.
[in] | xDimMax | The internal map maximum index in the x dimension. |
[in] | yDimMax | The internal map maximum index in the y dimension. |
[in] | zDimMax | The internal map maximum index in the z dimension. |
[in] | maxRange | The maximum range of shell in angstroms. |
Definition at line 121 of file ProSHADE_spheres.cpp.
proshade_double ProSHADE_internal_spheres::ProSHADE_sphere::getRotatedMappedData | ( | proshade_unsign | pos | ) |
This function gets the rotated mapped data value for a particular position.
[in] | pos | The array position from which the value should be retrieved. |
Definition at line 627 of file ProSHADE_spheres.cpp.
proshade_double ProSHADE_internal_spheres::ProSHADE_sphere::getShellRadius | ( | void | ) |
This function returns the radius of the shell in question.
This is a simple accessor function so that the sphere radius can be accessed when need be.
[out] | sphereRadius | The distance of the shell to the centre of the coordinates. |
Definition at line 587 of file ProSHADE_spheres.cpp.
|
protected |
This function fills in the interpolation vector for a single map point.
This function takes the XYZ position of a point and finds the top and bottom map points which surround the XYZ position.
[in] | xDimMax | The internal map maximum index in the x dimension. |
[in] | yDimMax | The internal map maximum index in the y dimension. |
[in] | zDimMax | The internal map maximum index in the z dimension. |
[in] | x | The x position of the point for which the surrounding indices are to be found. |
[in] | y | The y position of the point for which the surrounding indices are to be found. |
[in] | z | The z position of the point for which the surrounding indices are to be found. |
[in] | xBottom | A pointer to the variable which should now hold the x position of the lower surrounding point. |
[in] | yBottom | A pointer to the variable which should now hold the y position of the lower surrounding point. |
[in] | zBottom | A pointer to the variable which should now hold the z position of the lower surrounding point. |
[in] | xTop | A pointer to the variable which should now hold the x position of the upper surrounding point. |
[in] | yTop | A pointer to the variable which should now hold the y position of the upper surrounding point. |
[in] | zTop | A pointer to the variable which should now hold the z position of the upper surrounding point. |
Definition at line 367 of file ProSHADE_spheres.cpp.
|
protected |
This function interpolates along the first (X) dimension.
This function takes the 8 interpolation vectors for the neighbouring map points and proceeds to interpolate out the X axis from all of them, thus resulting in 4 new interpolation vectors which contain the Y and Z dimension values. This is the first step of the tri-linear interpolation procedure.
[in] | c000 | The interpolation vector for map point less less less (than the point of interest). |
[in] | c001 | The interpolation vector for map point less less more (than the point of interest). |
[in] | c010 | The interpolation vector for map point less more less (than the point of interest). |
[in] | c011 | The interpolation vector for map point less more more (than the point of interest). |
[in] | c100 | The interpolation vector for map point more less less (than the point of interest). |
[in] | c101 | The interpolation vector for map point more less more (than the point of interest). |
[in] | c110 | The interpolation vector for map point more more less (than the point of interest). |
[in] | c111 | The interpolation vector for map point more more more (than the point of interest). |
[in] | c00 | Pointer to the variable where the less less second interporetation vector will be saved. |
[in] | c01 | Pointer to the variable where the less more second interporetation vector will be saved. |
[in] | c10 | Pointer to the variable where the more less second interporetation vector will be saved. |
[in] | c11 | Pointer to the variable where the more more second interporetation vector will be saved. |
[in] | xd | The relative distance of the point of interest to the lower map point along the x axis. |
Definition at line 442 of file ProSHADE_spheres.cpp.
|
protected |
This function interpolates along the second (Y) dimension.
This function takes the 4 interpolation vectors for the neighbouring map points with the X axis already interpolate (that is, as outputted from the interpolateAlongFirst() function) and proceeds to interpolate out the Y axis from all of them, thus resulting in 2 new interpolation vectors which contain the Z dimension values only. This is the second step of the tri-linear interpolation procedure.
[in] | c00 | The interpolation vector for map point less less (than the point of interest) as returned from interpolateAlongFirst(). |
[in] | c01 | The interpolation vector for map point less more (than the point of interest) as returned from interpolateAlongFirst(). |
[in] | c10 | The interpolation vector for map point more less (than the point of interest) as returned from interpolateAlongFirst(). |
[in] | c11 | The interpolation vector for map point more more (than the point of interest) as returned from interpolateAlongFirst(). |
[in] | c0 | Pointer to the variable where the less third interporetation vector will be saved. |
[in] | c1 | Pointer to the variable where the more third interporetation vector will be saved. |
[in] | yd | The relative distance of the point of interest to the lower map point along the y axis. |
Definition at line 488 of file ProSHADE_spheres.cpp.
|
protected |
This function maps the internal map to the specific sphere.
This function deals with the map values mapping onto a sphere in abstract terms, or in programatical terms it simply interpolates the appropriate map data onto a spherical grid a given by the sphere object calling it. It uses the tri-linear interpolation in the order XYZ and saves all results internally.
[in] | map | The density map pointer - the map which should be mapped to the data. |
[in] | xDimMax | The internal map maximum index in the x dimension. |
[in] | yDimMax | The internal map maximum index in the y dimension. |
[in] | zDimMax | The internal map maximum index in the z dimension. |
Definition at line 178 of file ProSHADE_spheres.cpp.
void ProSHADE_internal_spheres::ProSHADE_sphere::setRotatedMappedData | ( | proshade_unsign | pos, |
proshade_double | value | ||
) |
This function sets the rotated mapped data value to the given position.
[in] | pos | The array position to which the value will be set to. |
[in] | value | The value which should be set to the given position. |
Definition at line 613 of file ProSHADE_spheres.cpp.