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

Comparing trunk/madProps/madProps.c (file contents):
Revision 46 by mmeineke, Tue Jul 23 20:10:49 2002 UTC vs.
Revision 85 by mmeineke, Fri Aug 16 16:55:46 2002 UTC

# Line 48 | Line 48 | int main(argc, argv)
48    char cosCorr1[30];
49    char cosCorr2[30];
50  
51 +  int startFrame = 0;
52 +  int haveStartFrame = 0;
53 +  int endFrame = 0;
54 +  int haveEndFrame = 0;
55 +
56    program_name = argv[0]; /*save the program name in case we need it*/
57    
58    for( i = 1; i < argc; i++){
# Line 63 | Line 68 | int main(argc, argv)
68          if( !strcmp( argv[i], "--GofR" ) ){
69            calcGofR = 1;
70            i++;
71 +          strcpy( cosCorr1, argv[i] );
72 +          i++;
73 +          strcpy( cosCorr2, argv[i] );
74 +        }
75 +
76 +        else if( !strcmp( argv[i], "--CosCorr" ) ){
77 +          calcCosCorr = 1;
78 +          i++;
79            strcpy( gofR1, argv[i] );
80            i++;
81            strcpy( gofR2, argv[i] );
# Line 74 | Line 87 | int main(argc, argv)
87            strcpy( muCorr, argv[i] );
88          }
89          
90 <        else if( !strcmp( argv[i], "--CosCorr" ) ){
91 <          calcCosCorr = 1;
90 >        else if( !strcmp( argv[i], "--startFrame" ) ){
91 >          haveStartFrame = 1;
92            i++;
93 <          strcpy( cosCorr1, argv[i] );
93 >          startFrame = atoi(argv[i]);
94 >          startFrame--;
95 >        }
96 >
97 >        else if( !strcmp( argv[i], "--endFrame" ) ){
98 >          haveEndFrame = 1;
99            i++;
100 <          strcpy( cosCorr2, argv[i] );
100 >          endFrame = atoi(argv[i]);
101          }
102  
103          else{
# Line 167 | Line 185 | int main(argc, argv)
185    fflush( stdout );
186    
187    nFrames = frameCount( in_name );
188 +  if( !haveEndFrame ) endFrame = nFrames;
189  
190    printf( "done.\n"
191            "nframes = %d\n"
# Line 354 | Line 373 | int main(argc, argv)
373      fflush( stdout );
374      
375      // gofr call
376 <    GofR( out_prefix, gofR1, gofR2, dumpArray, nFrames );
376 >    GofR( out_prefix, gofR1, gofR2, dumpArray, nFrames, startFrame, endFrame );
377      
378      fprintf( stdout,
379               " done.\n"
# Line 400 | Line 419 | int main(argc, argv)
419               cosCorr1, cosCorr2 );
420      fflush( stdout );
421      
422 <    cosCorr( out_prefix, cosCorr1, cosCorr2, dumpArray, nFrames );
422 >    cosCorr( out_prefix, cosCorr1, cosCorr2, dumpArray, nFrames, startFrame,
423 >             endFrame );
424      
425      fprintf( stdout,
426               " done.\n"
# Line 447 | Line 467 | void usage(){
467                  "                               -note: \"all\" will do all atoms\n"
468                  "   --MuCorr <atom>           Calculate mu correlation of atom\n"
469                  "   --CosCorr <atom1> <atom2> Calculate the cos correlation between atom1 and atom2\n"
470 +                "   --startFrame <frame#>     Specifies a frame to start correlating\n"
471 +                "   --endFrame <frame#>       Specifies a frame to stop correlating.\n"
472                  
451                
473                  "\n"
474                  "\n",
475                  program_name);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines