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

Comparing trunk/OOPSE/libmdtools/SimInfo.cpp (file contents):
Revision 597 by mmeineke, Mon Jul 14 21:28:54 2003 UTC vs.
Revision 619 by mmeineke, Tue Jul 15 22:22:41 2003 UTC

# Line 34 | Line 34 | SimInfo::SimInfo(){
34    setTemp = 0;
35    thermalTime = 0.0;
36    rCut = 0.0;
37 +  ecr = 0.0;
38 +  est = 0.0;
39  
40    usePBC = 0;
41    useLJ = 0;
# Line 77 | Line 79 | void SimInfo::setBoxM( double theBox[3][3] ){
79    for(i=0; i < 3; i++)
80      for (j=0; j < 3; j++) Hmat[i][j] = theBox[i][j];
81    
82 <  cerr
83 <    << "setting Hmat ->\n"
84 <    << "[ " << Hmat[0][0] << ", " << Hmat[0][1] << ", " << Hmat[0][2] << " ]\n"
85 <    << "[ " << Hmat[1][0] << ", " << Hmat[1][1] << ", " << Hmat[1][2] << " ]\n"
86 <    << "[ " << Hmat[2][0] << ", " << Hmat[2][1] << ", " << Hmat[2][2] << " ]\n";
82 >  //  cerr
83 >  // << "setting Hmat ->\n"
84 >  // << "[ " << Hmat[0][0] << ", " << Hmat[0][1] << ", " << Hmat[0][2] << " ]\n"
85 >  // << "[ " << Hmat[1][0] << ", " << Hmat[1][1] << ", " << Hmat[1][2] << " ]\n"
86 >  // << "[ " << Hmat[2][0] << ", " << Hmat[2][1] << ", " << Hmat[2][2] << " ]\n";
87  
88    calcBoxL();
89    calcHmatInv();
# Line 122 | Line 124 | void SimInfo::setBoxM( double theBox[3][3] ){
124      refreshSim();
125    }
126  
127 <  if (rCut > maxCutoff) {
127 >  if( ecr > maxCutoff ){
128 >
129      sprintf( painCave.errMsg,
130 <             "New Box size is forcing cutoff radius down to %lf\n",
130 >             "New Box size is forcing electrostatic cutoff radius "
131 >             "down to %lf\n",
132               maxCutoff );
133      painCave.isFatal = 0;
134      simError();
135  
136 <    status = 0;
137 <    LJ_new_rcut(&rCut, &status);
138 <    if (status != 0) {
139 <      sprintf( painCave.errMsg,
136 <               "Error in recomputing LJ shifts based on new rcut\n");
137 <      painCave.isFatal = 1;
138 <      simError();
139 <    }
136 >    ecr = maxCutoff;
137 >    est = 0.05 * ecr;
138 >
139 >    refreshSim();
140    }
141 +    
142   }
143  
144  
# Line 153 | Line 154 | void SimInfo::scaleBox(double scale) {
154    double theBox[3][3];
155    int i, j;
156  
157 <  cerr << "Scaling box by " << scale << "\n";
157 >  // cerr << "Scaling box by " << scale << "\n";
158  
159    for(i=0; i<3; i++)
160      for (j=0; j<3; j++) theBox[i][j] = Hmat[i][j]*scale;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines