ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/tcProps/tcProps.c
(Generate patch)

Comparing trunk/tcProps/tcProps.c (file contents):
Revision 1073 by mmeineke, Sat Feb 28 16:45:57 2004 UTC vs.
Revision 1085 by mmeineke, Fri Mar 5 03:10:29 2004 UTC

# Line 12 | Line 12
12   #include "directorHead.h"
13   #include "directorWhole.h"
14   #include "rmsd.h"
15 + #include "gofz.h"
16  
17  
18   #define VERSION_MAJOR 0
# Line 43 | Line 44 | int main( int argC, char *argV[] ){
44    char* conversionCheck;
45    int conversionError;
46    int optionError;
47 +  char* rmsdName;
48    char* pair1;
49    char* pair2;
50    int scdCorr;
51    double startTime;
52 +  double avgXY;
53    double maxLength;
54 <  int directorHead, directorWhole, doRMSD;
54 >
55 >  int directorHead, directorWhole, doRMSD, doGofz, doAvgXY;
56    enum atomNames rmsdType;
57  
58    // system initialization
# Line 70 | Line 74 | int main( int argC, char *argV[] ){
74    directorHead = 0;
75    directorWhole = 0;
76    doRMSD = 0;
77 +  doGofz = 0;
78 +  doAvgXY = 0;
79    
80  
81    // parse the command line
# Line 97 | Line 103 | int main( int argC, char *argV[] ){
103              usage();
104              exit(0);
105            }      
106 <          pair1 = argV[i];
106 >          rmsdName = argV[i];
107  
108 <          if( !strcmp(pair1, "HEAD") )    rmsdType = HEAD;
109 <          else if( !strcmp(pair1, "CH") ) rmsdType = CH;
110 <          else if( !strcmp(pair1, "CH2") )rmsdType = CH2;
111 <          else if( !strcmp(pair1, "CH3") )rmsdType = CH3;
112 <          else if( !strcmp(pair1, "SSD") )rmsdType = SSD;
113 <          else if( !strcmp(pair1, "COM") )rmsdType = COM;
108 >          if( !strcmp(rmsdName, "HEAD") )    rmsdType = HEAD;
109 >          else if( !strcmp(rmsdName, "CH") ) rmsdType = CH;
110 >          else if( !strcmp(rmsdName, "CH2") )rmsdType = CH2;
111 >          else if( !strcmp(rmsdName, "CH3") )rmsdType = CH3;
112 >          else if( !strcmp(rmsdName, "SSD") )rmsdType = SSD;
113 >          else if( !strcmp(rmsdName, "COM") )rmsdType = COM;
114            else{
115              fprintf( stderr,
116                       "Unrecognized rmsd atom type \"%s\"\n",
117 <                     pair1 );
117 >                     rmsdName );
118              exit(0);
119            }
120  
# Line 318 | Line 324 | int main( int argC, char *argV[] ){
324              break;
325  
326            case 'w':
327 <            // -h turn on director head
327 >            // -w turn on director head
328  
329              directorWhole = 1;
330 +            break;
331 +
332 +          case 'g':
333 +            // -g turn on gofZ
334 +
335 +            doGofz = 1;
336 +            break;
337 +
338 +          case 'v':
339 +            // -v turn on average XY
340 +
341 +            doAvgXY = 1;
342              break;
343  
344  
# Line 492 | Line 510 | int main( int argC, char *argV[] ){
510                "Calculating the RMSD\n" );
511      fflush( stdout );
512      
513 <    rmsd( rmsdType, startTime, outPrefix );
513 >    rmsd( rmsdType, startTime, outPrefix, rmsdName );
514    }
515 +
516 +  if(doGofz){
517 +
518 +    fprintf ( stdout,
519 +              "Calculating the gofZ\n" );
520 +    fflush( stdout );
521 +    
522 +    calcGofz( startTime, atoms, outPrefix );
523 +  }
524 +
525 +  if(doAvgXY){
526 +
527 +    fprintf ( stdout,
528 +              "Calculating the average XY\n" );
529 +    fflush( stdout );
530 +    
531 +    avgXY = calcAverageXY( startTime );
532 +    
533 +    fprintf ( stdout,
534 +              "Done, average XY = %6G\n", avgXY );
535 +    fflush( stdout );
536 +    
537 +  }
538    
539  
540    closeFile();
# Line 520 | Line 561 | void usage(){
561                  "                     *Defaults to 1/2 smallest length of first frame.\n"
562                  "   -s              Calculate the Scd chain correlation.\n"
563                  "   -h              Calculate the directors for the head groups\n"
564 <                "   -w              Calculate the director fro the bilayers\n"
564 >                "   -w              Calculate the director from the bilayers\n"
565 >                "   -g              Calculate the gofz profile\n"
566                  "\n"
567                  "   long:\n"
568                  "   -----\n"

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines