 |
ProSHADE
0.7.6.1 (AUG 2021)
Protein Shape Detection
|
Go to the documentation of this file.
41 for ( proshade_unsign iter = 0; iter < static_cast<proshade_unsign> ( settings->
inputFiles.size() ); iter++ )
62 proshade_signed* nonZeroBounds =
new proshade_signed[6];
69 delete[] nonZeroBounds;
74 ss << settings->
outName <<
"_" << iter <<
".map";
77 else { strToRebox->
writeMap ( ss.str() ); }
85 proshade_double* mapCopy =
nullptr;
111 throw ProSHADE_exception (
"There is no input structure for map manipulation.",
"EB00002", __FILE__, __LINE__, __func__,
"The ProSHADE_settings object does not contain any\n : structure that could be manipulated. Please supply exactly\n : one structure using the addStructure() function." );
117 ProSHADE_internal_messages::printWarningMessage ( settings->
verbose,
"!!! ProSHADE WARNING !!! The input file is not of the MAP (MRC) format. Will output re-boxed map, but beware that this is simple PDB->MAP conversion and REFMAC5 should be used to compute more appropriate maps.",
"WB00004" );
122 throw ProSHADE_exception (
"No resolution given for PDB file re-boxing.",
"EB00011", __FILE__, __LINE__, __func__,
"The ProSHADE_settings object does not contain any\n : resolution value. However, resolution is required when\n : re-boxing structures read from PDB files. Please supply\n : the resolution value using the setResolution() function." );
129 throw ProSHADE_exception (
"No output file name.",
"EB00016", __FILE__, __LINE__, __func__,
"There is no output file name set in the settings object.\n : Please supply the file name to where the re-boxed map\n : should be saved using the setOutputFilename() function." );
168 for ( proshade_unsign iter = 1; iter < static_cast<proshade_unsign> ( settings->
inputFiles.size() ); iter++ )
186 proshade_double enLevDist = 0.0;
190 proshade_double trSigmDist = 0.0;
194 proshade_double rotFunDist = 0.0;
207 delete compareChanging;
212 delete compareAgainst;
230 std::stringstream hlpSS;
231 hlpSS <<
"Distances between " << str1 <<
" and " << str2;
234 std::stringstream hlpSSE;
235 hlpSSE <<
"Energy levels distance : " << enLevDist;
238 std::stringstream hlpSSS;
239 hlpSSS <<
"Trace sigma distance : " << trSigmDist;
242 std::stringstream hlpSSR;
243 hlpSSR <<
"Rotation function distance: " << rotFunDist;
263 throw ProSHADE_exception (
"There are not enough structures for distance computation.",
"ED00012", __FILE__, __LINE__, __func__,
"There needs to be at least two structures between which\n : distances are computed. The ProSHADE_settings object\n : contains less than two structures and therefore cannot\n : proceed. Please supply at least two structures by\n : repeatedly using the addStructure() function." );
267 const FloatingPoint< proshade_single > lhs ( settings->
requestedResolution ), rhs ( -1.0f );
268 if ( lhs.AlmostEquals ( rhs ) )
270 throw ProSHADE_exception (
"Resolution value not set.",
"ED00013", __FILE__, __LINE__, __func__,
"The resolution value was not set. Please set the\n : resolution value for the distance computation by using\n : the setResolution() function." );
293 for ( proshade_unsign iter = 0; iter < static_cast<proshade_unsign> ( settings->
inputFiles.size() ); iter++ )
325 delete symmetryStructure;
345 throw ProSHADE_exception (
"There are not enough structures for symmetry detection.",
"ES00028", __FILE__, __LINE__, __func__,
"There needs to be at least one structure for which\n : symmetry is to be detected. Please supply at least one\n : structure by using the addStructure() function." );
351 throw ProSHADE_exception (
"Symmetry axis detection tolerance set to negative value.",
"ES00053", __FILE__, __LINE__, __func__,
"The symmetry axis detection tolerance was manually set to\n : negative value. This makes no sense, please supply\n : value >= 0.0." );
375 proshade_double eulA, eulB, eulG, trsX, trsY, trsZ;
386 delete staticStructure;
387 delete movingStructure;
407 movingStructure->
writeOutOverlayFiles ( settings, eulA, eulB, eulG, rotationCentre, finalTranslation );
415 movingStructure->
reportOverlayResults ( settings, rotationCentre, eulerAngles, finalTranslation );
418 delete staticStructure;
419 delete movingStructure;
438 throw ProSHADE_exception (
"There are not enough structures for map overlay\n : computation.",
"EO00033", __FILE__, __LINE__, __func__,
"There needs to be exactly two structures for map overlay\n : mode to work; the first structure is the static and the\n : second is the moving structure." );
void MapOverlayTask(ProSHADE_settings *settings, std::vector< proshade_double > *rotationCentre, std::vector< proshade_double > *eulerAngles, std::vector< proshade_double > *finalTranslation)
The symmetry detection task driver function.
void computeSphericalHarmonics(ProSHADE_settings *settings)
This function computes the spherical harmonics decomposition for the whole structure.
bool computeTraceSigmaDesc
If true, the trace sigma descriptor will be computed, otherwise all its computations will be omitted.
bool computeRotationFuncDesc
If true, the rotation function descriptor will be computed, otherwise all its computations will be om...
void addToDblPtrVector(std::vector< proshade_double * > *vecToAddTo, proshade_double *elementToAdd)
Adds the element to the vector.
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.
bool isFilePDB(std::string fName)
Function determining if the input data type is PDB.
void computeRotationFunction(ProSHADE_settings *settings)
This function computes the self-rotation function for this structure.
void getReBoxBoundaries(ProSHADE_settings *settings, proshade_signed *&ret)
This function finds the boundaries enclosing positive map values and adds some extra space.
void checkDistancesSettings(ProSHADE_settings *settings)
The distances computation settings checks.
This class is the representation of ProSHADE exception.
std::string outName
The file name where the output structure(s) should be saved.
This class contains all inputed and derived data for a single structure.
proshade_single requestedResolution
The resolution to which the calculations are to be done.
proshade_double mapCOMProcessChangeX
The change in X axis between the creation of the structure (originalMapXCom) and just before rotation...
proshade_double originalPdbRotCenY
The centre of rotation as it relates to the original PDB positions (and not the ProSHADE internal map...
void checkOverlaySettings(ProSHADE_settings *settings)
The map overlay computation settings checks.
proshade_double mapCOMProcessChangeZ
The change in Z axis between the creation of the structure (originalMapZCom) and just before rotation...
bool usePhase
If true, the full data will be used, if false, Patterson maps will be used instead and phased data wi...
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.
void printWarningMessage(proshade_signed verbose, std::string message, std::string warnCode)
General stderr message printing (used for warnings).
proshade_double computeRotationunctionDescriptor(ProSHADE_internal_data::ProSHADE_data *obj1, ProSHADE_internal_data::ProSHADE_data *obj2, ProSHADE_settings *settings)
This function computes the rotation function descriptor value between two objects.
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 deepCopyMap(proshade_double *&saveTo, proshade_signed verbose)
This function copies the internal map into the supplied pointer, which it also allocates.
void addToDoubleVector(std::vector< proshade_double > *vecToAddTo, proshade_double elementToAdd)
Adds the element to the vector.
proshade_double originalPdbTransX
The optimal translation vector as it relates to the original PDB positions (and not the ProSHADE inte...
void readInStructure(std::string fName, proshade_unsign inputO, ProSHADE_settings *settings, proshade_double *maskArr=nullptr, proshade_unsign maskXDim=0, proshade_unsign maskYDim=0, proshade_unsign maskZDim=0, proshade_double *weightsArr=nullptr, proshade_unsign weigXDim=0, proshade_unsign weigYDim=0, proshade_unsign weigZDim=0)
This function initialises the basic ProSHADE_data variables and reads in a single structure.
void mapToSpheres(ProSHADE_settings *settings)
This function converts the internal map onto a set of concentric spheres.
proshade_double originalPdbTransY
The optimal translation vector as it relates to the original PDB positions (and not the ProSHADE inte...
void MapManipulationTask(ProSHADE_settings *settings, std::vector< proshade_signed * > *originalBounds, std::vector< proshade_signed * > *reboxedBounds, std::vector< proshade_double * > *manipulatedMaps)
The re-boxing task driver function.
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.
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.
bool reBoxMap
This switch decides whether re-boxing is needed.
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 objec...
This class stores all the settings and is passed to the executive classes instead of a multitude of p...
proshade_double originalPdbTransZ
The optimal translation vector as it relates to the original PDB positions (and not the ProSHADE inte...
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.
void DistancesComputationTask(ProSHADE_settings *settings, std::vector< proshade_double > *enLevs, std::vector< proshade_double > *trSigm, std::vector< proshade_double > *rotFun)
The distances computation task driver function.
void processInternalMap(ProSHADE_settings *settings)
This function simply clusters several other functions which should be called together.
bool changeMapResolution
Should maps be re-sampled to obtain the required resolution?
void ReportDistancesResults(ProSHADE_settings *settings, std::string str1, std::string str2, proshade_double enLevDist, proshade_double trSigmDist, proshade_double rotFunDist)
Simple function for reporting the distances computation results.
proshade_double computeTraceSigmaDescriptor(ProSHADE_internal_data::ProSHADE_data *obj1, ProSHADE_internal_data::ProSHADE_data *obj2, ProSHADE_settings *settings)
This function computes the trace sigma descriptor value between two objects.
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_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.
proshade_double mapCOMProcessChangeY
The change in Y axis between the creation of the structure (originalMapYCom) and just before rotation...
void reportSymmetryResults(ProSHADE_settings *settings)
This function takes prints the report for symmetry detection.
std::vector< std::string > inputFiles
This vector contains the filenames of all input structure files.
proshade_double computeEnergyLevelsDescriptor(ProSHADE_internal_data::ProSHADE_data *obj1, ProSHADE_internal_data::ProSHADE_data *obj2, ProSHADE_settings *settings)
This function computes the energy levels descriptor value between two objects.
void checkMapManipulationSettings(ProSHADE_settings *settings)
The re-boxing settings checks.
This header declares all the taks functions.
proshade_double originalPdbRotCenZ
The centre of rotation as it relates to the original PDB positions (and not the ProSHADE internal map...
proshade_double axisErrTolerance
Allowed error on vector axis in in dot product ( acos ( 1 - axErr ) is the allowed difference in radi...
void checkSymmetrySettings(ProSHADE_settings *settings)
The symmetry computation settings checks.
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...
proshade_double originalPdbRotCenX
The centre of rotation as it relates to the original PDB positions (and not the ProSHADE internal map...
void printProgressMessage(proshade_signed verbose, proshade_signed messageLevel, std::string message)
General stdout message printing.
void deepCopyBoundsSigPtrVector(std::vector< proshade_signed * > *sigPtrVec, proshade_signed *xFrom, proshade_signed *xTo, proshade_signed *yFrom, proshade_signed *yTo, proshade_signed *zFrom, proshade_signed *zTo)
Does a deep copy of a signed int array to a vector of signed int arrays.
void SymmetryDetectionTask(ProSHADE_settings *settings, std::vector< proshade_double * > *axes, std::vector< std::vector< proshade_double > > *allCs, std::vector< proshade_double > *mapCOMShift)
The symmetry detection task driver function.
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.
bool computeEnergyLevelsDesc
If true, the energy levels descriptor will be computed, otherwise all its computations will be omitte...