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 221 by chrisfen, Tue Nov 23 22:48:31 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 714 | Line 715 | void SimSetup::gatherInfo(void){
715    }
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 1194 | Line 1195 | void SimSetup::makeOutNames(void){
1195        info[k].finalName = prefix + ".eor";      
1196        info[k].sampleName = prefix + ".dump";
1197        info[k].statusName = prefix + ".stat";
1198 +      
1199 +      if (info[k].useSolidThermInt && !info[k].useLiquidThermInt)
1200 +        info[k].zAngleName = prefix + ".ang";
1201  
1202   #ifdef IS_MPI
1203  
# Line 1260 | Line 1264 | void SimSetup::createFF(void){
1264  
1265      case FF_H2O:
1266        the_ff = new WATER();
1267 +      break;
1268 +
1269 +    case FF_SHAPES:
1270 +      the_ff = new Shapes_FF();
1271        break;
1272  
1273      default:
# Line 1765 | Line 1773 | void SimSetup::initFortran(void){
1773   void SimSetup::initFortran(void){
1774    info[0].refreshSim();
1775  
1776 <  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 <  }
1776 >  the_ff->initForceField();
1777  
1781
1778   #ifdef IS_MPI
1779 <  strcpy(checkPointMsg, "Successfully intialized the mixingRule for Fortran.");
1779 >  strcpy(checkPointMsg, "Successfully intialized the fortran portion of the force field.");
1780    MPIcheckPoint();
1781   #endif // is_mpi
1782   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines