 |
Bsoft
2.1.0
Bernard's software package
|
Go to the documentation of this file.
31 for ( n1 = 0, comp1 = model1->
comp; comp1; comp1 = comp1->
next ) n1++;
33 for ( n2 = 0, comp2 = model2->
comp; comp2; comp2 = comp2->
next ) n2++;
49 for ( ncomp = 0, mp =
model; mp; mp = mp->
next ) {
50 for ( n=0, comp = mp->
comp; comp; comp = comp->
next ) n++;
51 if ( ncomp < n ) ncomp = n;
72 long n(0), n1(0), n2(0);
82 cout <<
"Comparing " << model1->
id <<
" with " << model2->
id <<
":" << endl;
83 cout <<
"Comp1\tComp2\tDmin" << endl;
86 for ( comp1 = model1->
comp; comp1; comp1 = comp1->
next )
if ( comp1->
sel ) {
89 for ( comp2 = model2->
comp; comp2; comp2 = comp2->
next )
if ( comp2->
sel ) {
103 for ( comp2 = model2->
comp; comp2; comp2 = comp2->
next )
if ( comp2->
sel ) {
106 for ( comp1 = model1->
comp; comp1; comp1 = comp1->
next )
if ( comp1->
sel ) {
120 for ( comp1 = model1->
comp; comp1; comp1 = comp1->
next )
if ( comp1->
sel ) {
123 R += comp1->
fom*comp1->
fom;
126 cout << comp1->
id <<
tab << comp2->
id <<
tab << comp1->
fom << endl;
133 cout <<
"Components compared: " << n << endl;
134 cout <<
"Model 1 components: " << n1 <<
" (" << n*100.0/n1 <<
"%)" << endl;
135 cout <<
"Model 2 components: " << n2 <<
" (" << n*100.0/n2 <<
"%)" << endl;
136 cout <<
"RMSD: " << R << endl << endl;
157 for ( ncomp = 0, comp =
model->
comp; comp; comp = comp->
next, ncomp++ )
196 for ( n=0, dmax = 0, comp =
model->
comp; comp; comp = comp->
next )
if ( comp->
sel ) {
198 if ( dmax < d ) dmax = d;
203 cout <<
"Calculating a " << n <<
" x " << n <<
" distance matrix:" << endl << endl;
208 for ( j=i+1, comp2 = comp->
next; comp2; comp2 = comp2->
next )
if ( comp2->
sel ) {
210 dmat[i][j] = dmat[j][i] =
220 cout << dmat << endl;
238 long i, j, n1(0), n2(0);
246 for ( i=0, c1 = m1->
comp; c1; c1 = c1->
next, ++i )
247 for ( j=0, c2 = m2->
comp; c2; c2 = c2->
next, ++j )
283 for ( i=n=0, c1 =
model->
comp; c1; c1 = c1->
next, ++i )
if ( mat[i][i] ) {
288 for ( j=i+1, k=1, c2 = c1->
next; c2; c2 = c2->
next, ++j ) {
295 if ( k > 1 ) c->
loc *= 1.0L/k;
303 cout <<
"Number of components: " << n << endl << endl;
324 long nmod(0), i, j, k, n;
328 for ( m1 =
model; m1; m1 = m1->
next ) nmod++;
338 for ( m2 = m1->
next; m2; m2 = m2->
next, ++i ) {
341 cout << m1->
id <<
" vs " << m2->
id << endl;
350 for ( m2 = m1->
next; m2; m2 = m2->
next, ++i ) {
351 for ( j=0, c1 = m1->
comp; c1; c1 = c1->
next, ++j )
if ( c1->
sel ) {
353 for ( k=0, c2 = m2->
comp; c2; c2 = c2->
next, ++k )
if ( c2->
sel ) {
371 int* ns =
new int[nmod+1];
372 for ( i=0; i<=nmod; i++ ) ns[i] = 0;
380 for ( c1 = m1->
comp; c1; c1 = c1->
next )
if ( c1->
sel ) {
387 c2->
fom = c2->
sel*1.0L/nmod;
397 cout <<
"Number\tCount\t%" << endl;
398 for ( i=0; i<=nmod; i++ )
399 cout << i <<
tab << ns[i] <<
tab << ns[i]*100.0/n << endl;
Matrix model_distance_matrix(Bmodel *model, int view_flag)
Calculates the distance matrix for a model.
double model_compare(Bmodel *model1, Bmodel *model2)
Compares two models.
Bcomponent * component_add(Bcomponent **comp, Bstring &id)
Adds a component to a linked list.
3x3 Matrix manipulation functions
double factorial(int n)
Calculates the factorial of n.
long models_process(Bmodel *model, long(modfunc)(Bmodel *))
Process a list of models using the specified function.
Bmodel * model_init(Bstring &id)
Initializes a model structure.
int component_list_kill(Bcomponent *comp)
Deallocates memory for a list of components.
double distance(const Vector3 &v)
Header file for reading and writing atomic model files.
double distance(vector< T1 > &v1, vector< T2 > &v2)
long model_reset_selection(Bmodel *model)
Resets the selection to all components.
void spectrum(double value, double cmin, double cmax)
Matrix model_adjacency_matrix(Bmodel *model)
Constructs the adjacency matrix for a model.
Header file for general utilities.
ostream & tab(ostream &out)
long model_component_number_difference(Bmodel *model1, Bmodel *model2)
Compares the numbers of components in two models.
void show_below_cutoff(double d)
long model_maxnum_components(Bmodel *model)
Calculates the largest number of components in a model.
Library routines used for model processing.
Bcomptype * model_add_type_by_id(Bmodel *model, Bstring &id)
Add a type to a model if the identifier does not exist already.
double residual(const View &view)
int component_copy(Bcomponent *fromcomp, Bcomponent *tocomp)
Copies all elements from one component to another.
Bmodel * models_consensus(Bmodel *model, double distance)
Determines a consensus between models in a list.
Bcomponent * link[MAXLINK]
long component_count(Bcomponent *comp)
Counts the total number of components.
long model_consolidate(Bmodel *model, double distance)
Consolidates close components within a model.