ProSHADE  0.7.6.1 (AUG 2021)
Protein Shape Detection
ProSHADE_internal_spheres Namespace Reference

This namespace contains the structure and functions required for storing internal map projections onto a set of concentric spheres. More...

Classes

class  ProSHADE_rotFun_sphere
 This class contains all inputed data for the rotation function angle-axis converted spheres. More...
 
class  ProSHADE_rotFun_spherePeakGroup
 This class contains peak groups detected in the rotation function mapped spheres. More...
 
class  ProSHADE_sphere
 This class contains all inputed and derived data for a single sphere. More...
 

Functions

proshade_unsign autoDetermineBandwidth (proshade_unsign circumference)
 This function determines the bandwidth for the spherical harmonics computation. More...
 
proshade_single autoDetermineSphereDistances (proshade_single maxMapRange, proshade_single resolution)
 This function determines the sphere distances for sphere mapping. More...
 
proshade_unsign autoDetermineIntegrationOrder (proshade_single maxMapRange, proshade_single sphereDist)
 This function determines the integration order for the between spheres integration. More...
 

Detailed Description

This namespace contains the structure and functions required for storing internal map projections onto a set of concentric spheres.

The ProSHADE_internal_spheres namespace contains the the structure and functions required to map the internal map data onto a set of concentric spheres as required by ProSHADE. It also has the ability to store sphere specific versions of the values such as bandwidth and angular resolution, as well as the functionality for computing spherical harmonics. Finally, the automatic spherical harmonics computation variables determination function live here.

Function Documentation

◆ autoDetermineBandwidth()

proshade_unsign ProSHADE_internal_spheres::autoDetermineBandwidth ( proshade_unsign  circumference)

This function determines the bandwidth for the spherical harmonics computation.

This function is here to automstically determine the bandwidth to which the spherical harmonics computations should be done. It accomplishes this by setting it to half of the maximum circumference of the map/sphere, in indices as recommended by Kostelec and Rockmore (2007).

Parameters
[in]circumferenceThe maximum circumference of the map/sphere.

Definition at line 515 of file ProSHADE_spheres.cpp.

516 {
517  //================================================ Determine and return
518  if ( static_cast<proshade_unsign> ( std::ceil ( circumference / 2 ) ) % 2 == 0 )
519  {
520  return ( static_cast<proshade_unsign> ( std::ceil ( circumference / 2 ) ) );
521  }
522  else
523  {
524  return ( static_cast<proshade_unsign> ( std::ceil ( circumference / 2 ) ) + 1 );
525  }
526 }

◆ autoDetermineIntegrationOrder()

proshade_unsign ProSHADE_internal_spheres::autoDetermineIntegrationOrder ( proshade_single  maxMapRange,
proshade_single  sphereDist 
)

This function determines the integration order for the between spheres integration.

This function determines the order of the Gauss-Legendre integration which needs to be done between the spheres. To do this, it uses the pre-coputed values of maxium distance between integration points for each order and the maxium distance between spheres expressed as a fraction of the total.

Parameters
[in]maxMapRangeThe maximum diagonal distance of the map in Angstroms.
[in]sphereDistThe distance between spheres.

Definition at line 561 of file ProSHADE_spheres.cpp.

562 {
563  //================================================ Initialise local variables
564  proshade_double sphereDistanceAsFractionOfTotal = static_cast<proshade_double> ( sphereDist / ( maxMapRange / 2.0f ) );
565  proshade_unsign ret = 0;
566 
567  //================================================ Compare to precomputed values
568  for ( proshade_unsign iter = 2; iter < static_cast<proshade_unsign> ( 10000 ); iter++ )
569  {
570  if ( ProSHADE_internal_precomputedVals::glIntMaxDists[iter] >= sphereDistanceAsFractionOfTotal )
571  {
572  ret = iter;
573  }
574  }
575 
576  //================================================ Return largest passing value
577  return ( ret );
578 
579 }

◆ autoDetermineSphereDistances()

proshade_single ProSHADE_internal_spheres::autoDetermineSphereDistances ( proshade_single  maxMapRange,
proshade_single  resolution 
)

This function determines the sphere distances for sphere mapping.

This function determines the distance between two consecutive spheres in the sphere mappin galgorithm. It sets it as the sampling rate (distance between any two map points). It then checks that there will be at least 10 spheres and if not, it changes the sphere distance until at least 10 spheres are to be produced.

Parameters
[in]maxMapRangeThe maximum diagonal distance of the map in Angstroms.
[in]resolutionThe resolution to which the computations are to be done.

Definition at line 537 of file ProSHADE_spheres.cpp.

538 {
539  //================================================ Get starting point
540  proshade_single ret = resolution / 2.0f;
541 
542  //================================================ Make sure at least 10 shells will exist
543  while ( std::floor ( maxMapRange / ret ) < 10 )
544  {
545  ret /= 2.0f;
546  }
547 
548  //================================================ Done
549  return ( ret );
550 }