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

Comparing:
trunk/src/brains/SimInfo.cpp (file contents), Revision 1290 by cli2, Wed Sep 10 19:51:45 2008 UTC vs.
branches/development/src/brains/SimInfo.cpp (file contents), Revision 1503 by gezelter, Sat Oct 2 19:54:41 2010 UTC

# Line 6 | Line 6
6   * redistribute this software in source and binary code form, provided
7   * that the following conditions are met:
8   *
9 < * 1. Acknowledgement of the program authors must be made in any
10 < *    publication of scientific results based in part on use of the
11 < *    program.  An acceptable form of acknowledgement is citation of
12 < *    the article in which the program was described (Matthew
13 < *    A. Meineke, Charles F. Vardeman II, Teng Lin, Christopher
14 < *    J. Fennell and J. Daniel Gezelter, "OOPSE: An Object-Oriented
15 < *    Parallel Simulation Engine for Molecular Dynamics,"
16 < *    J. Comput. Chem. 26, pp. 252-271 (2005))
17 < *
18 < * 2. Redistributions of source code must retain the above copyright
9 > * 1. Redistributions of source code must retain the above copyright
10   *    notice, this list of conditions and the following disclaimer.
11   *
12 < * 3. Redistributions in binary form must reproduce the above copyright
12 > * 2. Redistributions in binary form must reproduce the above copyright
13   *    notice, this list of conditions and the following disclaimer in the
14   *    documentation and/or other materials provided with the
15   *    distribution.
# Line 37 | Line 28
28   * arising out of the use of or inability to use software, even if the
29   * University of Notre Dame has been advised of the possibility of
30   * such damages.
31 + *
32 + * SUPPORT OPEN SCIENCE!  If you use OpenMD or its source code in your
33 + * research, please cite the appropriate papers when you publish your
34 + * work.  Good starting points are:
35 + *                                                                      
36 + * [1]  Meineke, et al., J. Comp. Chem. 26, 252-271 (2005).            
37 + * [2]  Fennell & Gezelter, J. Chem. Phys. 124, 234104 (2006).          
38 + * [3]  Sun, Lin & Gezelter, J. Chem. Phys. 128, 24107 (2008).          
39 + * [4]  Vardeman & Gezelter, in progress (2009).                        
40   */
41  
42   /**
# Line 55 | Line 55
55   #include "primitives/Molecule.hpp"
56   #include "primitives/StuntDouble.hpp"
57   #include "UseTheForce/fCutoffPolicy.h"
58 #include "UseTheForce/DarkSide/fElectrostaticSummationMethod.h"
59 #include "UseTheForce/DarkSide/fElectrostaticScreeningMethod.h"
58   #include "UseTheForce/DarkSide/fSwitchingFunctionType.h"
59   #include "UseTheForce/doForces_interface.h"
60   #include "UseTheForce/DarkSide/neighborLists_interface.h"
63 #include "UseTheForce/DarkSide/electrostatic_interface.h"
61   #include "UseTheForce/DarkSide/switcheroo_interface.h"
62   #include "utils/MemoryUtils.hpp"
63   #include "utils/simError.h"
# Line 74 | Line 71
71   #include "UseTheForce/DarkSide/simParallel_interface.h"
72   #endif
73  
74 < namespace oopse {
74 > namespace OpenMD {
75    std::set<int> getRigidSet(int index, std::map<int, std::set<int> >& container) {
76      std::map<int, std::set<int> >::iterator i = container.find(index);
77      std::set<int> result;
# Line 763 | Line 760 | namespace oopse {
760      useRF = 0;
761      useSF = 0;
762      useSP = 0;
763 +    useBoxDipole = 0;
764  
765  
766      if (simParams_->haveElectrostaticSummationMethod()) {
# Line 950 | Line 948 | namespace oopse {
948      nOneThree = oneThreeInteractions_.getSize();
949      nOneFour = oneFourInteractions_.getSize();
950  
953    std::cerr << "excludedInteractions contains: " << excludedInteractions_.getSize() << " pairs \n";
954    std::cerr << "oneTwoInteractions contains: " << oneTwoInteractions_.getSize() << " pairs \n";
955    std::cerr << "oneThreeInteractions contains: " << oneThreeInteractions_.getSize() << " pairs \n";
956    std::cerr << "oneFourInteractions contains: " << oneFourInteractions_.getSize() << " pairs \n";
957
951      int* excludeList = excludedInteractions_.getPairList();
952      int* oneTwoList = oneTwoInteractions_.getPairList();
953      int* oneThreeList = oneThreeInteractions_.getPairList();
# Line 973 | Line 966 | namespace oopse {
966        sprintf( painCave.errMsg,
967                 "There was an error setting the simulation information in fortran.\n" );
968        painCave.isFatal = 1;
969 <      painCave.severity = OOPSE_ERROR;
969 >      painCave.severity = OPENMD_ERROR;
970        simError();
971      }
972      
# Line 1057 | Line 1050 | namespace oopse {
1050      int cp =  TRADITIONAL_CUTOFF_POLICY; // Set to traditional by default
1051  
1052      // Set LJ shifting bools to false
1053 <    ljsp_ = false;
1054 <    ljsf_ = false;
1053 >    ljsp_ = 0;
1054 >    ljsf_ = 0;
1055  
1056      std::string myPolicy;
1057      if (forceFieldOptions_.haveCutoffPolicy()){
# Line 1109 | Line 1102 | namespace oopse {
1102            rsw_ = 0.85 * rcut_;
1103            sprintf(painCave.errMsg,
1104                    "SimCreator Warning: No value was set for the switchingRadius.\n"
1105 <                  "\tOOPSE will use a default value of 85 percent of the cutoffRadius.\n"
1105 >                  "\tOpenMD will use a default value of 85 percent of the cutoffRadius.\n"
1106                    "\tswitchingRadius = %f. for this simulation\n", rsw_);
1107          painCave.isFatal = 0;
1108          simError();
# Line 1117 | Line 1110 | namespace oopse {
1110            rsw_ = rcut_;
1111            sprintf(painCave.errMsg,
1112                    "SimCreator Warning: No value was set for the switchingRadius.\n"
1113 <                  "\tOOPSE will use the same value as the cutoffRadius.\n"
1113 >                  "\tOpenMD will use the same value as the cutoffRadius.\n"
1114                    "\tswitchingRadius = %f. for this simulation\n", rsw_);
1115            painCave.isFatal = 0;
1116            simError();
# Line 1129 | Line 1122 | namespace oopse {
1122          toUpper(myMethod);
1123          
1124          if (myMethod == "SHIFTED_POTENTIAL") {
1125 <          ljsp_ = true;
1125 >          ljsp_ = 1;
1126          } else if (myMethod == "SHIFTED_FORCE") {
1127 <          ljsf_ = true;
1127 >          ljsf_ = 1;
1128          }
1129        }
1130 +
1131        notifyFortranCutoffs(&rcut_, &rsw_, &ljsp_, &ljsf_);
1132        
1133      } else {
# Line 1142 | Line 1136 | namespace oopse {
1136        if (fInfo_.SIM_uses_Charges | fInfo_.SIM_uses_Dipoles | fInfo_.SIM_uses_RF) {
1137          sprintf(painCave.errMsg,
1138                  "SimCreator Warning: No value was set for the cutoffRadius.\n"
1139 <                "\tOOPSE will use a default value of 15.0 angstroms"
1139 >                "\tOpenMD will use a default value of 15.0 angstroms"
1140                  "\tfor the cutoffRadius.\n");
1141          painCave.isFatal = 0;
1142          simError();
# Line 1151 | Line 1145 | namespace oopse {
1145          if (simParams_->haveElectrostaticSummationMethod()) {
1146            std::string myMethod = simParams_->getElectrostaticSummationMethod();
1147            toUpper(myMethod);
1148 <      
1149 <      // For the time being, we're tethering the LJ shifted behavior to the
1150 <      // electrostaticSummationMethod keyword options
1148 >          
1149 >          // For the time being, we're tethering the LJ shifted behavior to the
1150 >          // electrostaticSummationMethod keyword options
1151            if (myMethod == "SHIFTED_POTENTIAL") {
1152 <            ljsp_ = true;
1152 >            ljsp_ = 1;
1153            } else if (myMethod == "SHIFTED_FORCE") {
1154 <            ljsf_ = true;
1154 >            ljsf_ = 1;
1155            }
1156            if (myMethod == "SHIFTED_POTENTIAL" || myMethod == "SHIFTED_FORCE") {
1157              if (simParams_->haveSwitchingRadius()){
# Line 1176 | Line 1170 | namespace oopse {
1170          } else {        
1171            sprintf(painCave.errMsg,
1172                    "SimCreator Warning: No value was set for switchingRadius.\n"
1173 <                  "\tOOPSE will use a default value of\n"
1173 >                  "\tOpenMD will use a default value of\n"
1174                    "\t0.85 * cutoffRadius for the switchingRadius\n");
1175            painCave.isFatal = 0;
1176            simError();
1177            rsw_ = 0.85 * rcut_;
1178          }
1179  
1180 +        Electrostatic::setElectrostaticCutoffRadius(rcut_, rsw_);
1181          notifyFortranCutoffs(&rcut_, &rsw_, &ljsp_, &ljsf_);
1182  
1183        } else {
# Line 1198 | Line 1193 | namespace oopse {
1193    void SimInfo::setupElectrostaticSummationMethod( int isError ) {    
1194      
1195      int errorOut;
1196 <    int esm =  NONE;
1197 <    int sm = UNDAMPED;
1196 >    ElectrostaticSummationMethod esm = NONE;
1197 >    ElectrostaticScreeningMethod sm = UNDAMPED;
1198      RealType alphaVal;
1199      RealType dielectric;
1200      
# Line 1286 | Line 1281 | namespace oopse {
1281        }
1282      }
1283      
1284 <    // let's pass some summation method variables to fortran
1285 <    setElectrostaticSummationMethod( &esm );
1286 <    setFortranElectrostaticMethod( &esm );
1287 <    setScreeningMethod( &sm );
1288 <    setDampingAlpha( &alphaVal );
1294 <    setReactionFieldDielectric( &dielectric );
1284 >
1285 >    Electrostatic::setElectrostaticSummationMethod( esm );
1286 >    Electrostatic::setElectrostaticScreeningMethod( sm );
1287 >    Electrostatic::setDampingAlpha( alphaVal );
1288 >    Electrostatic::setReactionFieldDielectric( dielectric );
1289      initFortranFF( &errorOut );
1290    }
1291  
# Line 1637 | Line 1631 | namespace oopse {
1631        return sdByGlobalIndex_.at(index);
1632      }  
1633   */  
1634 < }//end namespace oopse
1634 > }//end namespace OpenMD
1635  

Comparing:
trunk/src/brains/SimInfo.cpp (property svn:keywords), Revision 1290 by cli2, Wed Sep 10 19:51:45 2008 UTC vs.
branches/development/src/brains/SimInfo.cpp (property svn:keywords), Revision 1503 by gezelter, Sat Oct 2 19:54:41 2010 UTC

# Line 0 | Line 1
1 + Author Id Revision Date

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines