| 11 |
|
#include "scdCorr.h" |
| 12 |
|
#include "directorHead.h" |
| 13 |
|
#include "directorWhole.h" |
| 14 |
< |
#inlcude "rmsd.h" |
| 14 |
> |
#include "rmsd.h" |
| 15 |
> |
#include "gofz.h" |
| 16 |
|
|
| 17 |
|
|
| 18 |
|
#define VERSION_MAJOR 0 |
| 49 |
|
int scdCorr; |
| 50 |
|
double startTime; |
| 51 |
|
double maxLength; |
| 52 |
< |
int directorHead, directorWhole; |
| 52 |
> |
int directorHead, directorWhole, doRMSD, doGofz; |
| 53 |
> |
enum atomNames rmsdType; |
| 54 |
|
|
| 55 |
|
// system initialization |
| 56 |
|
|
| 70 |
|
startTime = 0.0; |
| 71 |
|
directorHead = 0; |
| 72 |
|
directorWhole = 0; |
| 73 |
+ |
doRMSD = 0; |
| 74 |
+ |
doGofz = 0; |
| 75 |
|
|
| 76 |
|
|
| 77 |
|
// parse the command line |
| 88 |
|
|
| 89 |
|
// parse long word options |
| 90 |
|
|
| 91 |
< |
if( !strcmp( argV[i], "--gofr" ) ){ |
| 91 |
> |
if( !strcmp( argV[i], "--rmsd" ) ){ |
| 92 |
|
|
| 93 |
+ |
doRMSD = 1; |
| 94 |
|
i++; |
| 95 |
|
if( i>=argC ){ |
| 96 |
|
fprintf( stderr, |
| 97 |
|
"\n" |
| 98 |
< |
"not enough arguments for --gofr\n"); |
| 98 |
> |
"not enough arguments for --rmsd\n"); |
| 99 |
|
usage(); |
| 100 |
|
exit(0); |
| 101 |
|
} |
| 102 |
|
pair1 = argV[i]; |
| 103 |
|
|
| 104 |
< |
i++; |
| 105 |
< |
if( i>=argC ){ |
| 104 |
> |
if( !strcmp(pair1, "HEAD") ) rmsdType = HEAD; |
| 105 |
> |
else if( !strcmp(pair1, "CH") ) rmsdType = CH; |
| 106 |
> |
else if( !strcmp(pair1, "CH2") )rmsdType = CH2; |
| 107 |
> |
else if( !strcmp(pair1, "CH3") )rmsdType = CH3; |
| 108 |
> |
else if( !strcmp(pair1, "SSD") )rmsdType = SSD; |
| 109 |
> |
else if( !strcmp(pair1, "COM") )rmsdType = COM; |
| 110 |
> |
else{ |
| 111 |
|
fprintf( stderr, |
| 112 |
< |
"\n" |
| 113 |
< |
"not enough arguments for --gofr\n"); |
| 104 |
< |
usage(); |
| 112 |
> |
"Unrecognized rmsd atom type \"%s\"\n", |
| 113 |
> |
pair1 ); |
| 114 |
|
exit(0); |
| 115 |
< |
} |
| 107 |
< |
pair2 = argV[i]; |
| 115 |
> |
} |
| 116 |
|
|
| 117 |
|
} |
| 118 |
|
|
| 320 |
|
break; |
| 321 |
|
|
| 322 |
|
case 'w': |
| 323 |
< |
// -h turn on director head |
| 323 |
> |
// -w turn on director head |
| 324 |
|
|
| 325 |
|
directorWhole = 1; |
| 326 |
|
break; |
| 327 |
|
|
| 328 |
+ |
case 'g': |
| 329 |
+ |
// -g turn on gofZ |
| 330 |
|
|
| 331 |
+ |
doGofz = 1; |
| 332 |
+ |
break; |
| 333 |
+ |
|
| 334 |
+ |
|
| 335 |
|
default: |
| 336 |
|
|
| 337 |
|
fprintf( stderr, |
| 493 |
|
|
| 494 |
|
calcDirWholeCorr( startTime, atoms, outPrefix ); |
| 495 |
|
} |
| 496 |
+ |
|
| 497 |
+ |
if(doRMSD){ |
| 498 |
+ |
|
| 499 |
+ |
fprintf ( stdout, |
| 500 |
+ |
"Calculating the RMSD\n" ); |
| 501 |
+ |
fflush( stdout ); |
| 502 |
+ |
|
| 503 |
+ |
rmsd( rmsdType, startTime, outPrefix ); |
| 504 |
+ |
} |
| 505 |
+ |
|
| 506 |
+ |
if(doGofz){ |
| 507 |
+ |
|
| 508 |
+ |
fprintf ( stdout, |
| 509 |
+ |
"Calculating the gofZ\n" ); |
| 510 |
+ |
fflush( stdout ); |
| 511 |
+ |
|
| 512 |
+ |
calcGofz( startTime, atoms, outPrefix ); |
| 513 |
+ |
} |
| 514 |
|
|
| 515 |
|
|
| 516 |
|
closeFile(); |
| 537 |
|
" *Defaults to 1/2 smallest length of first frame.\n" |
| 538 |
|
" -s Calculate the Scd chain correlation.\n" |
| 539 |
|
" -h Calculate the directors for the head groups\n" |
| 540 |
< |
" -w Calculate the director fro the bilayers\n" |
| 540 |
> |
" -w Calculate the director from the bilayers\n" |
| 541 |
> |
" -g Calculate the gofz profile\n" |
| 542 |
|
"\n" |
| 543 |
|
" long:\n" |
| 544 |
|
" -----\n" |
| 545 |
< |
" --gofr <atom1> <atom2> g(r) for atom1 and atom2\n" |
| 545 |
> |
" --rmsd <atom1> rmsd for atom1\n" |
| 546 |
|
" --gofrTheta <atom1> <atom2> g(r, theta) for atom1 and atom2\n" |
| 547 |
|
" --gofrOmega <atom1> <atom2> g(r, omega) for atom1 and atom2\n" |
| 548 |
|
" --version displays the version number\n" |