--- trunk/tcProps/tcProps.c 2004/02/27 20:39:17 1072 +++ trunk/tcProps/tcProps.c 2004/02/28 16:45:57 1073 @@ -11,7 +11,7 @@ #include "scdCorr.h" #include "directorHead.h" #include "directorWhole.h" -#inlcude "rmsd.h" +#include "rmsd.h" #define VERSION_MAJOR 0 @@ -48,7 +48,8 @@ int main( int argC, char *argV[] ){ int scdCorr; double startTime; double maxLength; - int directorHead, directorWhole; + int directorHead, directorWhole, doRMSD; + enum atomNames rmsdType; // system initialization @@ -68,6 +69,7 @@ int main( int argC, char *argV[] ){ startTime = 0.0; directorHead = 0; directorWhole = 0; + doRMSD = 0; // parse the command line @@ -84,27 +86,31 @@ int main( int argC, char *argV[] ){ // parse long word options - if( !strcmp( argV[i], "--gofr" ) ){ + if( !strcmp( argV[i], "--rmsd" ) ){ + doRMSD = 1; i++; if( i>=argC ){ fprintf( stderr, "\n" - "not enough arguments for --gofr\n"); + "not enough arguments for --rmsd\n"); usage(); exit(0); } pair1 = argV[i]; - i++; - if( i>=argC ){ - fprintf( stderr, - "\n" - "not enough arguments for --gofr\n"); - usage(); + if( !strcmp(pair1, "HEAD") ) rmsdType = HEAD; + else if( !strcmp(pair1, "CH") ) rmsdType = CH; + else if( !strcmp(pair1, "CH2") )rmsdType = CH2; + else if( !strcmp(pair1, "CH3") )rmsdType = CH3; + else if( !strcmp(pair1, "SSD") )rmsdType = SSD; + else if( !strcmp(pair1, "COM") )rmsdType = COM; + else{ + fprintf( stderr, + "Unrecognized rmsd atom type \"%s\"\n", + pair1 ); exit(0); - } - pair2 = argV[i]; + } } @@ -478,6 +484,15 @@ int main( int argC, char *argV[] ){ fflush( stdout ); calcDirWholeCorr( startTime, atoms, outPrefix ); + } + + if(doRMSD){ + + fprintf ( stdout, + "Calculating the RMSD\n" ); + fflush( stdout ); + + rmsd( rmsdType, startTime, outPrefix ); } @@ -509,7 +524,7 @@ void usage(){ "\n" " long:\n" " -----\n" - " --gofr g(r) for atom1 and atom2\n" + " --rmsd rmsd for atom1\n" " --gofrTheta g(r, theta) for atom1 and atom2\n" " --gofrOmega g(r, omega) for atom1 and atom2\n" " --version displays the version number\n"