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 618 by mmeineke, Tue Jul 15 21:34:56 2003 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines