Difference for src/Molecule.C from version 1.1260 to 1.1261

version 1.1260version 1.1261
Line 4116
Line 4116
     UniqueSet<Exclusion> fepExclusionSet;     UniqueSet<Exclusion> fepExclusionSet;
     UniqueSetIter<Exclusion> exclIter(exclusionSet);     UniqueSetIter<Exclusion> exclIter(exclusionSet);
  
     if ( simParams->alchFepOn || simParams->alchThermIntOn || simParams->lesOn ) {     if ( simParams->alchOn || simParams->lesOn ) {
        for ( exclIter=exclIter.begin(); exclIter != exclIter.end(); exclIter++ )        for ( exclIter=exclIter.begin(); exclIter != exclIter.end(); exclIter++ )
        {        {
          int t1 = get_fep_type(exclIter->atom1);          int t1 = get_fep_type(exclIter->atom1);
Line 5239
Line 5239
      
   //fepb   //fepb
   // send fep atom info   // send fep atom info
   if (simParams->alchFepOn || simParams->alchThermIntOn || simParams->lesOn || simParams->pairInteractionOn) {   if (simParams->alchOn || simParams->lesOn || simParams->pairInteractionOn) {
     msg->put(numFepInitial);     msg->put(numFepInitial);
     msg->put(numFepFinal);     msg->put(numFepFinal);
     msg->put(numAtoms*sizeof(char), (char*)fepAtomFlags);     msg->put(numAtoms*sizeof(char), (char*)fepAtomFlags);
Line 5640
Line 5640
  
 //fepb //fepb
       //receive fep atom info       //receive fep atom info
       if (simParams->alchFepOn || simParams->lesOn || simParams->alchThermIntOn || simParams->pairInteractionOn) {       if (simParams->alchOn || simParams->lesOn || simParams->pairInteractionOn) {
         delete [] fepAtomFlags;         delete [] fepAtomFlags;
         fepAtomFlags = new unsigned char[numAtoms];         fepAtomFlags = new unsigned char[numAtoms];
  
Line 8166
Line 8166
  
  
 //Modifications for alchemical fep //Modifications for alchemical fep
    // /*
    //  FUNCTION build_fep_flags  FUNCTION build_fep_flags
    // 
    // INPUTS: 
    // alchfile - Value of alchfile read from config file 
    // alchcol - Value of alch column, read from config file 
    // initial_pdb - PDB object that contains the initial positions 
    //  cwd - current working directory 
    // 
    // This function builds the array of state values necessary 
    // for FEP or TI. It takes the name of the PDB file and column in 
    // the PDB file that contains the alch flag. It then builds 
    // the array FepParams for use in the program. 
    // 
    // function doubles up for TI as well 
        
    void Molecule::build_fep_flags(StringList *alchfile,  INPUTS:
          StringList *alchcol,  alchfile - Value of alchfile read from config file
          PDB *initial_pdb,  alchcol - Value of alch column, read from config file
          char *cwd, const char *simmethod)  initial_pdb - PDB object that contains the initial positions
    {   cwd - current working directory
  
   This function builds the array of state values necessary
   for FEP or TI. It takes the name of the PDB file and column in
   the PDB file that contains the alch flag. It then builds
   the array FepParams for use in the program.
  
   function doubles up for TI as well 
  */
  void Molecule::build_fep_flags(StringList *alchfile, StringList *alchcol,
                                PDB *initial_pdb, char *cwd, 
                                const char *simmethod) {
      PDB *bPDB;  //Pointer to PDB object to use      PDB *bPDB;  //Pointer to PDB object to use
      int bcol = 5;  //Column that the data is in      int bcol = 5;  //Column that the data is in
      Real bval = 0; //flag from PDB file      Real bval = 0; //flag from PDB file
      int i;         // loop counter      int i;         // loop counter
      char filename[129]; // filename      char filename[129]; // filename
  
  
      // get the pdb object that contains the alch flags.      // get the pdb object that contains the alch flags.
      // if the user gave another filename, use it, else      // if the user gave another filename, use it, else
      // use the pdb file with the initial coordinates      // use the pdb file with the initial coordinates
Line 8262
Line 8259
       }       }
     }     }
  
    iout << iINFO << "To read " << simmethod << "data from file: " << filename << "\n" << endi;   iout << iINFO << "To read " << simmethod << "data from file: " << filename 
    iout << iINFO << "To read " << simmethod << "flag data from column: " << bcol << "\n" << endi;        << "\n" << endi;
    iout << iINFO << "To read " << simmethod << "flag data from column: " << bcol
         << "\n" << endi;
    
    //  Allocate the array to hold all the alch data    //  Allocate the array to hold all the alch data
    fepAtomFlags = new unsigned char[numAtoms];    fepAtomFlags = new unsigned char[numAtoms];
Line 8315
Line 8314
       } else {       } else {
         fepAtomFlags[i] = 0;         fepAtomFlags[i] = 0;
       }       }
     } else if (simParams->alchFepOn || simParams->alchThermIntOn) {     } else if (simParams->alchOn) {
       if (bval == 1.0) {       if (bval == 1.0) {
         fepAtomFlags[i] = 1;         fepAtomFlags[i] = 1;
         numFepFinal++;         numFepFinal++;
Line 8355
Line 8354
   if (alchfile != NULL) {   if (alchfile != NULL) {
     delete bPDB;     delete bPDB;
   }   }
  
 } }
  // End of function build_fep_flags  // End of function build_fep_flags
    


Legend:
Removed in v.1.1260 
changed lines
 Added in v.1.1261



Made by using version 1.53 of cvs2html