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

Comparing trunk/SHAPES/forcer.cpp (file contents):
Revision 1286 by chrisfen, Tue Jun 22 20:38:04 2004 UTC vs.
Revision 1287 by chrisfen, Wed Jun 23 20:18:48 2004 UTC

# Line 66 | Line 66 | int main(int argc, char* argv[]){
66    char temp[200];
67    char readLine[500];
68    char xyzFile[200];
69 +  char shapeFile[200];
70    FILE *vdwFile, *structureFile;
71    char* ffPath_env = "VDW_PATH";
72    char* ffPath;
# Line 81 | Line 82 | int main(int argc, char* argv[]){
82    int nTokens;
83    int FF;
84    int bandwidth;
85 +  int gridwidth;
86    short int gotMatch;
87  
88    //parse the command line options
# Line 99 | Line 101 | int main(int argc, char* argv[]){
101    strcpy(xyzFile, file);
102    token = strtok(xyzFile, period);
103    strcpy(xyzFile, token);
104 <  strcat(xyzFile, "ref.xyz");
104 >  strcpy(shapeFile, token);
105 >  strcat(xyzFile, "Ref.xyz");
106 >  strcat(shapeFile, ".shape");
107    ofstream xfiles(xyzFile);
108    
109    //the bandwidth has a default value (default=16), so it is always given
110    bandwidth = args_info.bandwidth_arg;
111 +  gridwidth = bandwidth*2;
112    
113    if (args_info.charmm_given) {
114      FF=CHARMM;
# Line 261 | Line 266 | int main(int argc, char* argv[]){
266    xfiles << rb->getNumAtoms() << "\n\n";
267    for (k=0; k<rb->getNumAtoms(); k++){
268      rb->getAtomRefCoor(xyz3, k);
269 <    xfiles << rb->getAtomType(k) << "\t" <<
269 >    xfiles << rb->getAtomBase(k) << "\t" <<
270                xyz3[0] << "\t" << xyz3[1] << "\t" <<
271                xyz3[2] << "\n";
272    }
273    
274 <  gb = new GridBuilder(rb, bandwidth*2);
274 >  gb = new GridBuilder(rb, gridwidth);
275  
276    cout << "Doing GridBuilder calculations...\n";
277    gb->launchProbe(FF, sigmaGrid, sGrid, epsGrid);
278    
279 <  //write out the grid files
279 >  gb->printGridFiles();
280 >  
281 >  //load the grid element values to the main grid vectors
282 >  for (k=0; k<gridwidth*gridwidth; k++){
283 >    sigmaGrid.push_back(gb->passSig(k));
284 >    sGrid.push_back(gb->passS(k));
285 >    epsGrid.push_back(gb->passEps(k));
286 >  }
287 >
288 >  
289 >  
290   }
291  
292   int count_tokens(char *line, char *delimiters) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines