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 1060 by mmeineke, Thu Feb 19 21:10:06 2004 UTC vs.
Revision 1080 by mmeineke, Wed Mar 3 15:16:15 2004 UTC

# Line 10 | Line 10
10   #include "readWrite.h"
11   #include "scdCorr.h"
12   #include "directorHead.h"
13 + #include "directorWhole.h"
14 + #include "rmsd.h"
15 + #include "gofz.h"
16  
17  
18   #define VERSION_MAJOR 0
# Line 46 | Line 49 | int main( int argC, char *argV[] ){
49    int scdCorr;
50    double startTime;
51    double maxLength;
52 <  int directorHead;
52 >  int directorHead, directorWhole, doRMSD, doGofz;
53 >  enum atomNames rmsdType;
54  
55    // system initialization
56    
# Line 65 | Line 69 | int main( int argC, char *argV[] ){
69    scdCorr = 0;
70    startTime = 0.0;
71    directorHead = 0;
72 +  directorWhole = 0;
73 +  doRMSD = 0;
74 +  doGofz = 0;
75    
76  
77    // parse the command line
# Line 81 | Line 88 | int main( int argC, char *argV[] ){
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 ){
106 <            fprintf( stderr,
107 <                     "\n"
108 <                     "not enough arguments for --gofr\n");
109 <            usage();
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 >                     "Unrecognized rmsd atom type \"%s\"\n",
113 >                     pair1 );
114              exit(0);
115 <          }      
104 <          pair2 = argV[i];
115 >          }
116  
117          }
118  
# Line 308 | Line 319 | int main( int argC, char *argV[] ){
319              directorHead = 1;
320              break;
321  
322 +          case 'w':
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,
# Line 356 | Line 379 | int main( int argC, char *argV[] ){
379    for(i=0;i<nLipids;i++){
380  
381      atoms[nLipAtoms*i+0].type = HEAD;
382 +    atoms[nLipAtoms*i+0].mass = 72;
383      atoms[nLipAtoms*i+0].u[0] = 0.0;
384      atoms[nLipAtoms*i+0].u[1] = 0.0;
385      atoms[nLipAtoms*i+0].u[2] = 1.0;
386      
387 +    
388  
389      atoms[nLipAtoms*i+1].type = CH2;
390 +    atoms[nLipAtoms*i+1].mass = 14.03;
391  
392      atoms[nLipAtoms*i+2].type = CH;
393 +    atoms[nLipAtoms*i+2].mass = 13.02;
394  
395      atoms[nLipAtoms*i+3].type = CH2;
396 +    atoms[nLipAtoms*i+3].mass = 14.03;
397  
398      atoms[nLipAtoms*i+4].type = CH2;
399 +    atoms[nLipAtoms*i+4].mass = 14.03;
400  
401      atoms[nLipAtoms*i+5].type = CH2;
402 +    atoms[nLipAtoms*i+5].mass = 14.03;
403  
404      atoms[nLipAtoms*i+6].type = CH2;
405 +    atoms[nLipAtoms*i+6].mass = 14.03;
406  
407      atoms[nLipAtoms*i+7].type = CH2;
408 +    atoms[nLipAtoms*i+7].mass = 14.03;
409  
410      atoms[nLipAtoms*i+8].type = CH2;
411 +    atoms[nLipAtoms*i+8].mass = 14.03;
412  
413      atoms[nLipAtoms*i+9].type = CH2;
414 +    atoms[nLipAtoms*i+9].mass = 14.03;
415  
416      atoms[nLipAtoms*i+10].type = CH3;
417 +    atoms[nLipAtoms*i+10].mass = 15.04;
418  
419      atoms[nLipAtoms*i+11].type = CH2;
420 +    atoms[nLipAtoms*i+11].mass = 14.03;
421  
422      atoms[nLipAtoms*i+12].type = CH2;
423 +    atoms[nLipAtoms*i+12].mass = 14.03;
424  
425 <    atoms[nLipAtoms*i+13].type = CH2;
425 >    atoms[nLipAtoms*i+13].type = CH2;    
426 >    atoms[nLipAtoms*i+13].mass = 14.03;
427  
428      atoms[nLipAtoms*i+14].type = CH2;
429 +    atoms[nLipAtoms*i+14].mass = 14.03;
430    
431      atoms[nLipAtoms*i+15].type = CH2;
432 +    atoms[nLipAtoms*i+15].mass = 14.03;
433    
434      atoms[nLipAtoms*i+16].type = CH2;
435 +    atoms[nLipAtoms*i+16].mass = 14.03;
436    
437      atoms[nLipAtoms*i+17].type = CH2;
438 +    atoms[nLipAtoms*i+17].mass = 14.03;
439    
440      atoms[nLipAtoms*i+18].type = CH3;
441 +    atoms[nLipAtoms*i+18].mass = 15.04;
442    }
443    
444    for(i=(nLipAtoms*nLipids);i<nAtoms;i++){
445      atoms[i].type = SSD;
446 +    atoms[i].mass = 18.03;
447      atoms[i].u[0] = 0.0;
448      atoms[i].u[1] = 0.0;
449      atoms[i].u[2] = 1.0;
# Line 440 | Line 484 | int main( int argC, char *argV[] ){
484      
485      calcDirHeadCorr( startTime, atoms, outPrefix );
486    }
487 +
488 +  if(directorWhole){
489 +
490 +    fprintf ( stdout,
491 +              "Calculating the bilayer director\n" );
492 +    fflush( stdout );
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();
# Line 465 | Line 536 | void usage(){
536                  "   -l <maxLength>  set the maximum value of r\n"
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 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"

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines