11 |
|
#include "scdCorr.h" |
12 |
|
#include "directorHead.h" |
13 |
|
#include "directorWhole.h" |
14 |
+ |
#include "rmsd.h" |
15 |
|
|
16 |
|
|
17 |
|
#define VERSION_MAJOR 0 |
48 |
|
int scdCorr; |
49 |
|
double startTime; |
50 |
|
double maxLength; |
51 |
< |
int directorHead, directorWhole; |
51 |
> |
int directorHead, directorWhole, doRMSD; |
52 |
> |
enum atomNames rmsdType; |
53 |
|
|
54 |
|
// system initialization |
55 |
|
|
69 |
|
startTime = 0.0; |
70 |
|
directorHead = 0; |
71 |
|
directorWhole = 0; |
72 |
+ |
doRMSD = 0; |
73 |
|
|
74 |
|
|
75 |
|
// parse the command line |
86 |
|
|
87 |
|
// parse long word options |
88 |
|
|
89 |
< |
if( !strcmp( argV[i], "--gofr" ) ){ |
89 |
> |
if( !strcmp( argV[i], "--rmsd" ) ){ |
90 |
|
|
91 |
+ |
doRMSD = 1; |
92 |
|
i++; |
93 |
|
if( i>=argC ){ |
94 |
|
fprintf( stderr, |
95 |
|
"\n" |
96 |
< |
"not enough arguments for --gofr\n"); |
96 |
> |
"not enough arguments for --rmsd\n"); |
97 |
|
usage(); |
98 |
|
exit(0); |
99 |
|
} |
100 |
|
pair1 = argV[i]; |
101 |
|
|
102 |
< |
i++; |
103 |
< |
if( i>=argC ){ |
104 |
< |
fprintf( stderr, |
105 |
< |
"\n" |
106 |
< |
"not enough arguments for --gofr\n"); |
107 |
< |
usage(); |
102 |
> |
if( !strcmp(pair1, "HEAD") ) rmsdType = HEAD; |
103 |
> |
else if( !strcmp(pair1, "CH") ) rmsdType = CH; |
104 |
> |
else if( !strcmp(pair1, "CH2") )rmsdType = CH2; |
105 |
> |
else if( !strcmp(pair1, "CH3") )rmsdType = CH3; |
106 |
> |
else if( !strcmp(pair1, "SSD") )rmsdType = SSD; |
107 |
> |
else if( !strcmp(pair1, "COM") )rmsdType = COM; |
108 |
> |
else{ |
109 |
> |
fprintf( stderr, |
110 |
> |
"Unrecognized rmsd atom type \"%s\"\n", |
111 |
> |
pair1 ); |
112 |
|
exit(0); |
113 |
< |
} |
106 |
< |
pair2 = argV[i]; |
113 |
> |
} |
114 |
|
|
115 |
|
} |
116 |
|
|
485 |
|
|
486 |
|
calcDirWholeCorr( startTime, atoms, outPrefix ); |
487 |
|
} |
488 |
+ |
|
489 |
+ |
if(doRMSD){ |
490 |
+ |
|
491 |
+ |
fprintf ( stdout, |
492 |
+ |
"Calculating the RMSD\n" ); |
493 |
+ |
fflush( stdout ); |
494 |
+ |
|
495 |
+ |
rmsd( rmsdType, startTime, outPrefix ); |
496 |
+ |
} |
497 |
|
|
498 |
|
|
499 |
|
closeFile(); |
524 |
|
"\n" |
525 |
|
" long:\n" |
526 |
|
" -----\n" |
527 |
< |
" --gofr <atom1> <atom2> g(r) for atom1 and atom2\n" |
527 |
> |
" --rmsd <atom1> rmsd for atom1\n" |
528 |
|
" --gofrTheta <atom1> <atom2> g(r, theta) for atom1 and atom2\n" |
529 |
|
" --gofrOmega <atom1> <atom2> g(r, omega) for atom1 and atom2\n" |
530 |
|
" --version displays the version number\n" |