ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/trunk/src/brains/SimSetup.cpp
(Generate patch)

Comparing trunk/src/brains/SimSetup.cpp (file contents):
Revision 132 by tim, Thu Oct 21 16:22:01 2004 UTC vs.
Revision 160 by gezelter, Wed Oct 27 00:01:29 2004 UTC

# Line 26 | Line 26
26   #define NPTxyz_ENS     4
27  
28  
29 < #define FF_DUFF  0
30 < #define FF_LJ    1
31 < #define FF_EAM   2
32 < #define FF_H2O   3
29 > #define FF_DUFF   0
30 > #define FF_LJ     1
31 > #define FF_EAM    2
32 > #define FF_H2O    3
33 > #define FF_SHAPES 4
34  
35   using namespace std;
36   using namespace oopse;
# Line 715 | Line 716 | void SimSetup::gatherInfo(void){
716    else if (!strcasecmp(force_field, "WATER")){
717      ffCase = FF_H2O;
718    }
719 +  else if (!strcasecmp(force_field, "SHAPES")){
720 +    ffCase = FF_SHAPES;
721 +  }
722    else{
723      sprintf(painCave.errMsg, "SimSetup Error. Unrecognized force field -> %s\n",
724              force_field);
725 <         painCave.isFatal = 1;
726 <         simError();
725 >    painCave.isFatal = 1;
726 >    simError();
727    }
728    if (globals->haveForceFieldVariant()) {
729 <    strcpy(forcefield_variant, globals->getForceFieldVariant());
729 >    forcefield_variant = globals->getForceFieldVariant();
730      has_forcefield_variant = 1;
731    }
732    
# Line 909 | Line 913 | void SimSetup::gatherInfo(void){
913    }
914    
915    for (i = 0; i < nInfo; i++) {
912    // get the mixing rule
913    
914    strcpy(info[i].mixingRule, globals->getMixingRule());
916      info[i].usePBC = globals->getPBC();
917    }
918    
# Line 1262 | Line 1263 | void SimSetup::createFF(void){
1263        the_ff = new WATER();
1264        break;
1265  
1266 +    case FF_SHAPES:
1267 +      the_ff = new Shapes_FF();
1268 +      break;
1269 +
1270      default:
1271        sprintf(painCave.errMsg,
1272                "SimSetup Error. Unrecognized force field in case statement.\n");
# Line 1765 | Line 1770 | void SimSetup::initFortran(void){
1770   void SimSetup::initFortran(void){
1771    info[0].refreshSim();
1772  
1773 <  if (!strcmp(info[0].mixingRule, "standard")){
1769 <    the_ff->initForceField(LB_MIXING_RULE);
1770 <  }
1771 <  else if (!strcmp(info[0].mixingRule, "explicit")){
1772 <    the_ff->initForceField(EXPLICIT_MIXING_RULE);
1773 <  }
1774 <  else{
1775 <    sprintf(painCave.errMsg, "SimSetup Error: unknown mixing rule -> \"%s\"\n",
1776 <            info[0].mixingRule);
1777 <    painCave.isFatal = 1;
1778 <    simError();
1779 <  }
1773 >  the_ff->initForceField();
1774  
1781
1775   #ifdef IS_MPI
1776 <  strcpy(checkPointMsg, "Successfully intialized the mixingRule for Fortran.");
1776 >  strcpy(checkPointMsg, "Successfully intialized the fortran portion of the force field.");
1777    MPIcheckPoint();
1778   #endif // is_mpi
1779   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines