ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/tcProps/tcProps.c
Revision: 1056
Committed: Tue Feb 17 14:30:48 2004 UTC (20 years, 4 months ago) by mmeineke
Content type: text/plain
File size: 1728 byte(s)
Log Message:
lmost finished with the readWrite routines

File Contents

# User Rev Content
1 mmeineke 1052 #define _FILE_OFFSET_BITS 64
2    
3 mmeineke 1049 #include <stdio.h>
4     #include <stdlib.h>
5    
6    
7     #include "params.h"
8     #include "tcProps.h"
9 mmeineke 1052 #include "readWrite.h"
10 mmeineke 1049
11    
12     int main( int argC, char *argV[] ){
13    
14     // list of 'a priori' constants
15    
16 mmeineke 1056 const int nLipAtoms = NL_ATOMS;
17     const int nBonds = NBONDS;
18     const int nLipids = NLIPIDS;
19     const int nSSD = NSSD;
20     const int nAtoms = nLipAtoms * nLipids + nSSD;
21 mmeineke 1052
22     // different needed variables
23 mmeineke 1049
24     struct atomCoord atoms[nAtoms];
25 mmeineke 1052 int i,j,k;
26     char* inName;
27     int nFrames;
28 mmeineke 1049
29 mmeineke 1052 // system initialization
30 mmeineke 1049
31 mmeineke 1052 isScanned = 0;
32 mmeineke 1056 fileOpen = 0;
33     nFrames = 0;
34     frameTimes = NULL;
35 mmeineke 1049
36 mmeineke 1052
37 mmeineke 1049 // initialize the arrays
38    
39     for(i=0;i<nLipids;i++){
40    
41     atoms[nLipAtoms*i+0].type = HEAD;
42 mmeineke 1052 atoms[nLipAtoms*i+0].u[0] = 0.0;
43     atoms[nLipAtoms*i+0].u[1] = 0.0;
44     atoms[nLipAtoms*i+0].u[2] = 1.0;
45    
46 mmeineke 1049
47     atoms[nLipAtoms*i+1].type = CH2;
48    
49     atoms[nLipAtoms*i+2].type = CH;
50    
51     atoms[nLipAtoms*i+3].type = CH2;
52    
53     atoms[nLipAtoms*i+4].type = CH2;
54    
55     atoms[nLipAtoms*i+5].type = CH2;
56    
57     atoms[nLipAtoms*i+6].type = CH2;
58    
59     atoms[nLipAtoms*i+7].type = CH2;
60    
61     atoms[nLipAtoms*i+8].type = CH2;
62    
63     atoms[nLipAtoms*i+9].type = CH2;
64    
65     atoms[nLipAtoms*i+10].type = CH3;
66    
67     atoms[nLipAtoms*i+11].type = CH2;
68    
69     atoms[nLipAtoms*i+12].type = CH2;
70    
71     atoms[nLipAtoms*i+13].type = CH2;
72    
73     atoms[nLipAtoms*i+14].type = CH2;
74    
75     atoms[nLipAtoms*i+15].type = CH2;
76    
77     atoms[nLipAtoms*i+16].type = CH2;
78    
79     atoms[nLipAtoms*i+17].type = CH2;
80    
81     atoms[nLipAtoms*i+18].type = CH3;
82     }
83    
84 mmeineke 1052 for(i=(nLipAtoms*nLipids);i<nAtoms;i++){
85 mmeineke 1049 atoms[i].type = SSD;
86 mmeineke 1052 atoms[i].u[0] = 0.0;
87     atoms[i].u[1] = 0.0;
88     atoms[i].u[2] = 1.0;
89 mmeineke 1049 }
90 mmeineke 1052
91     // read and set the frames
92    
93 mmeineke 1056 setFrames( inName );
94 mmeineke 1052