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

Comparing trunk/madProps/cosCorr.c (file contents):
Revision 46 by mmeineke, Tue Jul 23 20:10:49 2002 UTC vs.
Revision 103 by mmeineke, Thu Aug 29 17:21:54 2002 UTC

# Line 6 | Line 6 | void cosCorr( char* out_prefix, char* atom1, char* ato
6   #include "cosCorr.h"
7  
8   void cosCorr( char* out_prefix, char* atom1, char* atom2,
9 <              struct xyz_frame* frames, int nFrames ){
9 >              struct xyz_frame* frames, int nFrames,
10 >              int startFrame, int endFrame ){
11    
12    
13    int i,j,k;
14 <    
14 <  double atom1Dens;
15 <  double atom2Dens;
16 <  
17 <  double atom1Constant;
18 <  double atom2Constant;
19 <  
14 >      
15    double nAtom1;
16    double nAtom2;
17    
# Line 91 | Line 86 | void cosCorr( char* out_prefix, char* atom1, char* ato
86               atom2 );
87      exit(8);
88    }
89 <  
95 <  // calculate some of the constants;
96 <  
97 <  atom1Dens = nAtom1 / boxVol;
98 <  atom2Dens = nAtom2 / boxVol;
99 <  
100 <  atom1Constant = ( 4.0 * M_PI * atom1Dens ) / 3.0;
101 <  atom2Constant = ( 4.0 * M_PI * atom2Dens ) / 3.0;
102 <  
89 >    
90    // calculate the histogram
91    
92 <  for( i=0; i<nFrames; i++){
92 >  for( i=startFrame; i<endFrame; i++){
93      for( j=0; j<(frames[i].nAtoms-1); j++ ){
94        
95        if( !strcmp( frames[0].names[j], atom1 ) ){

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines