Difference for src/ComputeQM.C from version 1.2 to 1.3

version 1.2version 1.3
Line 999
Line 999
             iout << iWARN << "Could not compute all QM groups in parallel.\n" << endi ;             iout << iWARN << "Could not compute all QM groups in parallel.\n" << endi ;
         }         }
                  
         iout << iINFO << "Ranks running QM simulations: " << qmPEs[0] ;         iout << iINFO << "List of ranks running QM simulations: " << qmPEs[0] ;
         for (int i=1; i < qmPEs.size(); i++) {         for (int i=1; i < qmPEs.size(); i++) {
             iout << ", " << qmPEs[i] ;             iout << ", " << qmPEs[i] ;
         }         }
Line 2598
Line 2598
         NAMD_die("QM calculation could not be ran. Check your qmBaseDir!");         NAMD_die("QM calculation could not be ran. Check your qmBaseDir!");
     }     }
     else if (! (stat(baseDir.c_str(), &info) == 0 && S_ISDIR(info.st_mode)) ) {     else if (! (stat(baseDir.c_str(), &info) == 0 && S_ISDIR(info.st_mode)) ) {
         DebugM(4,"Creating directory " << baseDir << std::endl);         DebugM(4,"Creating directory " << baseDir.c_str() << std::endl);
         int retVal = mkdir(baseDir.c_str(), S_IRWXU);         int retVal = mkdir(baseDir.c_str(), S_IRWXU);
     }     }
          
Line 2622
Line 2622
          
     // Builds the command that will be executed     // Builds the command that will be executed
     qmCommand.clear();     qmCommand.clear();
      qmCommand.append("cd ");
      qmCommand.append(baseDir);
      qmCommand.append(" ; ");
     qmCommand.append(msg->execPath) ;     qmCommand.append(msg->execPath) ;
     qmCommand.append(" ") ;     qmCommand.append(" ") ;
     qmCommand.append(inputFileName) ;     qmCommand.append(inputFileName) ;
Line 2663
Line 2666
     if ( iret < 0 ) { NAMD_die(strerror(errno)); }     if ( iret < 0 ) { NAMD_die(strerror(errno)); }
          
     DebugM(4, "Writing " << msg->numAllAtoms << " QM atom coords in file "      DebugM(4, "Writing " << msg->numAllAtoms << " QM atom coords in file " 
     << inputFileName << " and " << msg->numAllPntChrgs      << inputFileName.c_str() << " and " << msg->numAllPntChrgs 
     << " point charges in file " << pntChrgFileName << "\n");     << " point charges in file " << pntChrgFileName.c_str() << "\n");
          
     // write QM and dummy atom coordinates to input file and     // write QM and dummy atom coordinates to input file and
     // MM electric field from MM point charges.     // MM electric field from MM point charges.
Line 2728
Line 2731
     }     }
          
     // runs QM command     // runs QM command
     DebugM(4,"Running command ->" << qmCommand << "<-" << std::endl);     DebugM(4,"Running command ->" << qmCommand.c_str() << "<-" << std::endl);
     iret = system(qmCommand.c_str());     iret = system(qmCommand.c_str());
          
     if ( iret == -1 ) { NAMD_die(strerror(errno)); }     if ( iret == -1 ) { NAMD_die(strerror(errno)); }
Line 2753
Line 2756
 //     if ( iret ) { NAMD_die(strerror(errno)); } //     if ( iret ) { NAMD_die(strerror(errno)); }
          
     // opens output file     // opens output file
     DebugM(4,"Reading QM data from file " << outputFileName << std::endl);     DebugM(4,"Reading QM data from file " << outputFileName.c_str() << std::endl);
     outputFile = fopen(outputFileName.c_str(),"r");     outputFile = fopen(outputFileName.c_str(),"r");
     if ( ! outputFile ) {     if ( ! outputFile ) {
         iout << iERROR << "Could not find QM output file!\n" << endi;         iout << iERROR << "Could not find QM output file!\n" << endi;
Line 3280
Line 3283
         NAMD_die("QM calculation could not be ran. Check your qmBaseDir!");         NAMD_die("QM calculation could not be ran. Check your qmBaseDir!");
     }     }
     else if (! (stat(baseDir.c_str(), &info) == 0 && S_ISDIR(info.st_mode)) ) {     else if (! (stat(baseDir.c_str(), &info) == 0 && S_ISDIR(info.st_mode)) ) {
         DebugM(4,"Creating directory " << baseDir << std::endl);         DebugM(4,"Creating directory " << baseDir.c_str() << std::endl);
         int retVal = mkdir(baseDir.c_str(), S_IRWXU);         int retVal = mkdir(baseDir.c_str(), S_IRWXU);
     }     }
          
Line 3304
Line 3307
          
     // Builds the command that will be executed     // Builds the command that will be executed
     qmCommand.clear();     qmCommand.clear();
      qmCommand.append("cd ");
      qmCommand.append(baseDir);
      qmCommand.append(" ; ");
     qmCommand.append(msg->execPath) ;     qmCommand.append(msg->execPath) ;
     qmCommand.append(" ") ;     qmCommand.append(" ") ;
     qmCommand.append(inputFileName) ;     qmCommand.append(inputFileName) ;
Line 3373
Line 3379
     iret = fprintf(inputFile,"  Units Angs\n  coords\n\n");     iret = fprintf(inputFile,"  Units Angs\n  coords\n\n");
     if ( iret < 0 ) { NAMD_die(strerror(errno)); }     if ( iret < 0 ) { NAMD_die(strerror(errno)); }
          
     DebugM(4, "Writing " << msg->numAllAtoms << " QM atom coords in file " << inputFileName << " and " << msg->numAllPntChrgs << " point charges in file " << pntChrgFileName << std::endl);     DebugM(4, "Writing " << msg->numAllAtoms << " QM atom coords in file " << 
      inputFileName.c_str() << " and " << msg->numAllPntChrgs << 
      " point charges in file " << pntChrgFileName.c_str() << "\n");
          
     // write QM and dummy atom coordinates to input file.     // write QM and dummy atom coordinates to input file.
     QMAtomData *atmP = msg->data ;     QMAtomData *atmP = msg->data ;
Line 3428
Line 3436
     }     }
          
         // runs QM command         // runs QM command
     DebugM(4,"Running command ->" << qmCommand << "<-" << std::endl);     DebugM(4,"Running command ->" << qmCommand.c_str() << "<-" << std::endl);
     iret = system(qmCommand.c_str());     iret = system(qmCommand.c_str());
          
     if ( iret == -1 ) { NAMD_die(strerror(errno)); }     if ( iret == -1 ) { NAMD_die(strerror(errno)); }
Line 4047
Line 4055
         NAMD_die("QM calculation could not be ran. Check your qmBaseDir!");         NAMD_die("QM calculation could not be ran. Check your qmBaseDir!");
     }     }
     else if (! (stat(baseDir.c_str(), &info) == 0 && S_ISDIR(info.st_mode)) ) {     else if (! (stat(baseDir.c_str(), &info) == 0 && S_ISDIR(info.st_mode)) ) {
         DebugM(4,"Creating directory " << baseDir << std::endl);         DebugM(4,"Creating directory " << baseDir.c_str() << std::endl);
         int retVal = mkdir(baseDir.c_str(), S_IRWXU);         int retVal = mkdir(baseDir.c_str(), S_IRWXU);
     }     }
          
Line 4071
Line 4079
          
     // Builds the command that will be executed     // Builds the command that will be executed
     qmCommand.clear();     qmCommand.clear();
      qmCommand.append("cd ");
      qmCommand.append(baseDir);
      qmCommand.append(" ; ");
     qmCommand.append(msg->execPath) ;     qmCommand.append(msg->execPath) ;
     qmCommand.append(" ") ;     qmCommand.append(" ") ;
     qmCommand.append(inputFileName) ;     qmCommand.append(inputFileName) ;
Line 4090
Line 4101
     iret = fprintf(inputFile,"%d %d\n",msg->numAllAtoms, numPntChrgs);     iret = fprintf(inputFile,"%d %d\n",msg->numAllAtoms, numPntChrgs);
     if ( iret < 0 ) { NAMD_die(strerror(errno)); }     if ( iret < 0 ) { NAMD_die(strerror(errno)); }
          
     DebugM(4, "Writing " << msg->numAllAtoms << " QM atom coords in file " << inputFileName << " and " << msg->numAllPntChrgs << " point charges." << std::endl);     DebugM(4, "Writing " << msg->numAllAtoms << " QM atom coords in file " << 
          inputFileName.c_str() << " and " << msg->numAllPntChrgs << 
          " point charges." << std::endl);
          
     // write QM and dummy atom coordinates to input file.     // write QM and dummy atom coordinates to input file.
     QMAtomData *atmP = msg->data ;     QMAtomData *atmP = msg->data ;
Line 4138
Line 4151
     }     }
          
         // runs QM command         // runs QM command
     DebugM(4,"Running command ->" << qmCommand << "<-" << std::endl);     DebugM(4,"Running command ->" << qmCommand.c_str() << "<-" << std::endl);
     iret = system(qmCommand.c_str());     iret = system(qmCommand.c_str());
          
     if ( iret == -1 ) { NAMD_die(strerror(errno)); }     if ( iret == -1 ) { NAMD_die(strerror(errno)); }
Line 4533
Line 4546
  
 void ComputeQMMgr::pntChrgSwitching(QMGrpCalcMsg *msg) { void ComputeQMMgr::pntChrgSwitching(QMGrpCalcMsg *msg) {
          
     // We apply a switching function to the point charges to that there is a      // We apply a switching function to the point charges so that there is a 
     // smooth decay of the electrostatic environment seen by the QM system.     // smooth decay of the electrostatic environment seen by the QM system.
          
     BigReal cutoff2 = msg->cutoff*msg->cutoff;     BigReal cutoff2 = msg->cutoff*msg->cutoff;


Legend:
Removed in v.1.2 
changed lines
 Added in v.1.3



Made by using version 1.53 of cvs2html