Bsoft 2.1.4
Bernard's software package
model_compare.h File Reference

Functions to compare models and components. More...

#include "rwmodel.h"
#include "Matrix.h"

Functions

long model_component_number_difference (Bmodel *model1, Bmodel *model2)
 Compares the numbers of components in two models. More...
 
long model_maxnum_components (Bmodel *model)
 Calculates the largest number of components in a model. More...
 
double model_compare (Bmodel *model1, Bmodel *model2)
 Compares two models. More...
 
Matrix model_distance_matrix (Bmodel *model, int view_flag)
 Calculates the distance matrix for a model. More...
 
Matrix model_distance_matrix (Bmodel *m1, Bmodel *m2)
 Calculates the distance matrix between two models. More...
 
Matrix model_adjacency_matrix (Bmodel *model)
 Constructs the adjacency matrix for a model. More...
 
long model_consolidate (Bmodel *model, double distance)
 Consolidates close components within a model. More...
 
Bmodelmodels_consensus (Bmodel *model, double distance)
 Determines a consensus between models in a list. More...
 

Detailed Description

Functions to compare models and components.

Author
Bernard Heymann
Date
Created: 20060908
Modified: 20161011

Function Documentation

◆ model_adjacency_matrix()

Matrix model_adjacency_matrix ( Bmodel model)

Constructs the adjacency matrix for a model.

Parameters
*modelmodel structure.
Returns
Matrix adjacency matrix.
The matrix contains ones for adjacent components and zero elsewhere. 
Only the first model in the linked list is used.
The component selections are reset.

◆ model_compare()

double model_compare ( Bmodel model1,
Bmodel model2 
)

Compares two models.

Parameters
*model1first model structure.
*model2second model structure.
Returns
double RMSD.
Only the first models in the linked lists are compared.

◆ model_component_number_difference()

long model_component_number_difference ( Bmodel model1,
Bmodel model2 
)

Compares the numbers of components in two models.

Parameters
*model1first model.
*model2second model.
Returns
long difference in the number of components.
Only the first models in the lists are compared.

◆ model_consolidate()

long model_consolidate ( Bmodel model,
double  distance 
)

Consolidates close components within a model.

Parameters
*modelmodel structure.
distancecutoff distance to consider components to be the same.
Returns
long number of components retained.
A matrix is calculated from the pairwise distances between selected components.
Components closer to each other than the given distance are consolidated. 
Only the first model in the linked list is used.

◆ model_distance_matrix() [1/2]

Matrix model_distance_matrix ( Bmodel m1,
Bmodel m2 
)

Calculates the distance matrix between two models.

Parameters
*m1first model structure.
*m2second model structure.
Returns
Matrix distance matrix.
The matrix is calculated from the pairwise distances between selected 
components. 
Only the first model in each linked list is used.

◆ model_distance_matrix() [2/2]

Matrix model_distance_matrix ( Bmodel model,
int  view_flag 
)

Calculates the distance matrix for a model.

Parameters
*modelmodel structure.
view_flagflag to include views.
Returns
Matrix distance matrix.
The matrix is calculated from the pairwise distances between selected 
components, with the option to include the views.
When the views are included, the euclidean distances are rescaled to
the maximum so that their ranges are similar to the view differences. 
Only the first model in the linked list is used.

◆ model_maxnum_components()

long model_maxnum_components ( Bmodel model)

Calculates the largest number of components in a model.

Parameters
*modelmodel.
Returns
long largest number of components in a model.

◆ models_consensus()

Bmodel * models_consensus ( Bmodel model,
double  distance 
)

Determines a consensus between models in a list.

Parameters
*modelmodel list.
distancecutoff distance to consider components to be the same.
Returns
long number of components retained.
A matrix is calculated from the pairwise distances between selected components
from each apir of models.
Components closer to each other than the given distance in different
models are consolidated.
The component selection field contains the number of contributing components.
A new model containing the result is returned.