ProSHADE  0.6.5 (NOV 2018)
Protein Shape Descriptors and Symmetry Detection
ProSHADE_internal::ProSHADE_distances Class Reference

This is the executive class for computing distances between two or more structures. More...

#include <ProSHADE_internal.h>

Public Member Functions

 ProSHADE_distances (ProSHADE::ProSHADE_settings *settings)
 This is the constructor for the ProSHADE_distances executive class the user should use to compute and access distances between any number of structures. More...
 
 ~ProSHADE_distances ()
 This is the destructor for the ProSHADE_distances class. More...
 
void saveDatabase (ProSHADE::ProSHADE_settings *settings)
 Function responsible for saving the structure database. More...
 
void compareAgainstDatabase (ProSHADE::ProSHADE_settings *settings, std::vector< std::string > *matchedStrNames)
 This function compares a single file agaisnt a database of pre-computed structures. More...
 
void compareFragAgainstDatabase (ProSHADE::ProSHADE_settings *settings, std::vector< std::string > *matchedStrNames)
 This function fragments and compares a single file agaisnt a database of pre-computed structures. More...
 
std::vector< double > getEnergyLevelsDistances ()
 This function returns a vector of energy level distances between the first and all other structures. More...
 
std::vector< double > getTraceSigmaDistances ()
 This function returns a vector of trace sigma distances between the first and all other structures. More...
 
std::vector< double > getFullRotationDistances ()
 This function returns a vector of full rotation function distances between the first and all other structures. More...
 
std::vector< std::vector< double > > getFragEnergyLevelsDistances ()
 This function returns a vector of vectors of energy level distances between each fragment and the whole database. More...
 
std::vector< std::vector< double > > getFragTraceSigmaDistances ()
 This function returns a vector of vectors of trace sigma distances between each fragment and the whole database. More...
 
std::vector< std::vector< double > > getFragFullRotationDistances ()
 This function returns a vector of vectors of full rotation function distances between each fragment and the whole database. More...
 

Detailed Description

This class is intended to be accessed by the user in order to obtain distances between two or more structures. It takes the ProSHADE_settings class instance and determines everything from these, proceeding to compute all required distances in its constructor. This can take some time for multitude of structures, but accessing and using the results once the constructor is done is immediate and easy.

Definition at line 540 of file ProSHADE_internal.h.

Constructor & Destructor Documentation

§ ProSHADE_distances()

ProSHADE_internal::ProSHADE_distances::ProSHADE_distances ( ProSHADE::ProSHADE_settings settings)

This constructor takes a list of structures and the settings required by the user and then proceeds to use the distances computation logic implemented here to obtain all required distances between the first structure and all the rest. All the computations are done as the object is being constructed, this may take some time, but all the results are then available immediately without any forther computations. This is the object user should use to obtain the shape distances.

Parameters
[in]settingsInstance of the ProSHADE_settings class containing all the settings values.
Warning
This is an internal function which should not be used by the user.

Definition at line 7284 of file ProSHADE_internal.cpp.

§ ~ProSHADE_distances()

ProSHADE_internal::ProSHADE_distances::~ProSHADE_distances ( )

The is nothing particular about this destructor, it just frees the comparison object if it has been created.

Warning
This is an internal function which should not be used by the user.

Definition at line 8062 of file ProSHADE_internal.cpp.

Member Function Documentation

§ compareAgainstDatabase()

void ProSHADE_internal::ProSHADE_distances::compareAgainstDatabase ( ProSHADE::ProSHADE_settings settings,
std::vector< std::string > *  matchedStrNames 
)

This function does basically the same thing as the constructor for the ProSHADE_distances and even does fill in the internal values like the constructor would, so that the same public functions can then be used to retrieve the results. There are, however, a few points worth noting.

1) All settings are read from the database file and therefore it is useless to supply them, the only exception being the thresholds on hierarchical comparison. Therefore, if one wants to change the settings, new database needs to be build.

2) Since structures failing the size test are removed completely from the comparison, the list of database structures becomes useless, as one does not know which were removed and which were not. To allow knowing which structures obtained which distances, the settings structFiles vector is filled with the name of the one structure followed by all database structures which passed the test, as if it were given to the standard (i.e. no database) ProSHADE_distances class instead.

Parameters
[in]settingsThe settings structure will be filled with the database data, so it only needs to contain the single file to compare against the database. Its contents can later be used by the user for other purposes.
[in]matchedStrNamesPointer to a vector of strings which will be filled with the database file names that passed the size test (whether something passed or failed is lost otherwise).
Warning
This is an internal function which should not be used by the user.

Definition at line 1359 of file ProSHADE_saveLoad.cpp.

§ compareFragAgainstDatabase()

void ProSHADE_internal::ProSHADE_distances::compareFragAgainstDatabase ( ProSHADE::ProSHADE_settings settings,
std::vector< std::string > *  matchedStrNames 
)

This function reads in the settings of the database and applies them to a single structure supplied in the settings parameter. It then fragments this single structure according to the settings and searches each fragment independently against the database, thus allowing finding fragments in the database.

Parameters
[in]settingsThe settings structure will be filled with the database data, so it only needs to contain the single file to compare against the database. Its contents can later be used by the user for other purposes.
[in]matchedStrNamesPointer to a vector of strings which will be filled with the database file names that passed the size test (whether something passed or failed is lost otherwise).
Warning
This is an internal function which should not be used by the user.

Definition at line 2154 of file ProSHADE_saveLoad.cpp.

§ getEnergyLevelsDistances()

std::vector< double > ProSHADE_internal::ProSHADE_distances::getEnergyLevelsDistances ( )

This function allows programmatical access to the results of the ProSHADE distances calculations. It returns a vector of energy level distances from the first structure to all remaining structures.

Parameters
[out]XVector of energy level distances.
Warning
The results are reported in double precision.
This is an internal function which should not be used by the user.

Definition at line 8077 of file ProSHADE_internal.cpp.

§ getFragEnergyLevelsDistances()

std::vector< std::vector< double > > ProSHADE_internal::ProSHADE_distances::getFragEnergyLevelsDistances ( )

This function allows programmatical access to the results of the ProSHADE distances calculations. It returns a vector of vectors of energy level distances from the fragment to all passing database entries.

Parameters
[out]XVector of vectors of energy level distances.
Warning
The results are reported in double precision.
This is an internal function which should not be used by the user.

Definition at line 8110 of file ProSHADE_internal.cpp.

§ getFragFullRotationDistances()

std::vector< std::vector< double > > ProSHADE_internal::ProSHADE_distances::getFragFullRotationDistances ( )

This function allows programmatical access to the results of the ProSHADE distances calculations. It returns a vector of vectors of full rotation function distances from the fragment to all passing database entries.

Parameters
[out]XVector of vectors of full rotation function distances.
Warning
The results are reported in double precision.
This is an internal function which should not be used by the user.

Definition at line 8228 of file ProSHADE_internal.cpp.

§ getFragTraceSigmaDistances()

std::vector< std::vector< double > > ProSHADE_internal::ProSHADE_distances::getFragTraceSigmaDistances ( )

This function allows programmatical access to the results of the ProSHADE distances calculations. It returns a vector of vectors of trace sigma distances from the fragment to all passing database entries.

Parameters
[out]XVector of vectors of trace sigma distances.
Warning
The results are reported in double precision.
This is an internal function which should not be used by the user.

Definition at line 8169 of file ProSHADE_internal.cpp.

§ getFullRotationDistances()

std::vector< double > ProSHADE_internal::ProSHADE_distances::getFullRotationDistances ( )

This function allows programmatical access to the results of the ProSHADE distances calculations. It returns a vector of full rotation function distances from the first structure to all remaining structures. If it contains values -999.9, then these mean that this structure did not pass the threshold for energy level or trace sigma descriptors and therefore was not subjected to trace sigma descriptor computation.

Parameters
[out]XVector of full rotation function distances.
Warning
The results are reported in double precision.
This is an internal function which should not be used by the user.

Definition at line 8195 of file ProSHADE_internal.cpp.

§ getTraceSigmaDistances()

std::vector< double > ProSHADE_internal::ProSHADE_distances::getTraceSigmaDistances ( )

This function allows programmatical access to the results of the ProSHADE distances calculations. It returns a vector of trace sigma distances from the first structure to all remaining structures. If it contains values -999.9, then these mean that this structure did not pass the threshold for energy level descriptor and therefore was not subjected to trace sigma descriptor computation.

Parameters
[out]XVector of trace sigma distances.
Warning
The results are reported in double precision.
This is an internal function which should not be used by the user.

Definition at line 8136 of file ProSHADE_internal.cpp.

§ saveDatabase()

void ProSHADE_internal::ProSHADE_distances::saveDatabase ( ProSHADE::ProSHADE_settings settings)

This function saves all the settings into a binary file and then proceeds to compute the spherical harmonics decomposition using these same settings. Consequently, it saves the SH coefficients for all supplied structures as well as the pre-computed RRP matrices (first descriptor requirements) into the same binary file. This file now becomes the 'database' of structures against which other structures can be compared without the need for computing the SH and RRP again and again.

Parameters
[in]settingsThe proper settings to be applied and saved with the database.
Warning
This is an internal function which should not be used by the user.

Definition at line 40 of file ProSHADE_saveLoad.cpp.


The documentation for this class was generated from the following files: