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 82 by mmeineke, Fri Aug 16 04:05:45 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 74 | Line 79 | int main(argc, argv)
79            strcpy( muCorr, argv[i] );
80          }
81          
82 <        else if( !strcmp( argv[i], "--CosCorr" ) ){
83 <          calcCosCorr = 1;
82 >        else if( !strcmp( argv[i], "--startFrame" ) ){
83 >          haveStartFrame = 1;
84            i++;
85 <          strcpy( cosCorr1, argv[i] );
85 >          startFrame = atoi(argv[i]);
86 >        }
87 >
88 >        else if( !strcmp( argv[i], "--endFrame" ) ){
89 >          haveEndFrame = 1;
90            i++;
91 <          strcpy( cosCorr2, argv[i] );
91 >          endFrame = atoi(argv[i]);
92          }
93  
94          else{
# Line 167 | Line 176 | int main(argc, argv)
176    fflush( stdout );
177    
178    nFrames = frameCount( in_name );
179 +  if( !haveEndFrame ) endFrame = nFrames;
180  
181    printf( "done.\n"
182            "nframes = %d\n"
# Line 354 | Line 364 | int main(argc, argv)
364      fflush( stdout );
365      
366      // gofr call
367 <    GofR( out_prefix, gofR1, gofR2, dumpArray, nFrames );
367 >    GofR( out_prefix, gofR1, gofR2, dumpArray, nFrames, startFrame, endFrame );
368      
369      fprintf( stdout,
370               " done.\n"
# Line 400 | Line 410 | int main(argc, argv)
410               cosCorr1, cosCorr2 );
411      fflush( stdout );
412      
413 <    cosCorr( out_prefix, cosCorr1, cosCorr2, dumpArray, nFrames );
413 >    cosCorr( out_prefix, cosCorr1, cosCorr2, dumpArray, nFrames, startFrame,
414 >             endFrame );
415      
416      fprintf( stdout,
417               " done.\n"
# Line 447 | Line 458 | void usage(){
458                  "                               -note: \"all\" will do all atoms\n"
459                  "   --MuCorr <atom>           Calculate mu correlation of atom\n"
460                  "   --CosCorr <atom1> <atom2> Calculate the cos correlation between atom1 and atom2\n"
461 +                "  --startFrame <frame#>      Specifies a frame to start correlating\n"
462 +                "  --endFrame <frame#>        Specifies a frame to stop correlating.\n"
463                  
451                
464                  "\n"
465                  "\n",
466                  program_name);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines