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

Comparing trunk/OOPSE-1.0/libmdtools/Restraints.cpp (file contents):
Revision 1334 by gezelter, Fri Jul 16 18:58:03 2004 UTC vs.
Revision 1451 by chrisfen, Mon Aug 9 14:50:35 2004 UTC

# Line 16 | Line 16 | Restraints::Restraints(int nMolInfo, double lambdaVal,
16   #define PI 3.14159265359
17   #define TWO_PI 6.28318530718
18  
19 < Restraints::Restraints(int nMolInfo, double lambdaVal, double lambdaExp){
20 <  nMol = nMolInfo;
19 > Restraints::Restraints(double lambdaVal, double lambdaExp){
20    lambdaValue = lambdaVal;
21    lambdaK = lambdaExp;
22  
# Line 172 | Line 171 | double Restraints::Calc_Restraint_Forces(vector<StuntD
171  
172    factor = 1 - pow(lambdaValue, lambdaK);
173  
174 <  for (i=0; i<nMol; i++){
174 >  for (i=0; i<vecParticles.size(); i++){
175      if (vecParticles[i]->isDirectional()){
176        vecParticles[i]->getPos(pos);
177        vecParticles[i]->getA(A);
# Line 312 | Line 311 | void Restraints::Store_Init_Info(vector<StuntDouble*>
311    crystalIn.getline(inLine,999,'\n');
312    crystalIn.getline(inLine,999,'\n');
313    
314 <  for (i=0; i<nMol; i++) {
314 >  for (i=0; i<vecParticles.size(); i++) {
315      crystalIn.getline(inLine,999,'\n');
316      token = strtok(inLine,delimit);
317      token = strtok(NULL,delimit);
# Line 367 | Line 366 | void Restraints::Store_Init_Info(vector<StuntDouble*>
366    // now we can read in the zAngle.ang file
367    if (angleIn){
368      angleIn.getline(inLine,999,'\n');
369 <    for (i=0; i<nMol; i++) {
369 >    for (i=0; i<vecParticles.size(); i++) {
370        angleIn.getline(inLine,999,'\n');
371        token = strtok(inLine,delimit);
372        strcpy(inValue,token);
# Line 386 | Line 385 | void Restraints::Write_zAngle_File(vector<StuntDouble*
385  
386    ofstream angleOut(zOutName);
387    angleOut << "This file contains the omega values for the .eor file\n";
388 <  for (i=0; i<nMol; i++) {
388 >  for (i=0; i<vecParticles.size(); i++) {
389      angleOut << vecParticles[i]->getZangle() << "\n";
390    }
391    return;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines