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 1313 by gezelter, Wed Oct 22 20:01:49 2008 UTC vs.
branches/development/src/brains/SimInfo.cpp (file contents), Revision 1505 by gezelter, Sun Oct 3 22:18:59 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 764 | Line 761 | namespace oopse {
761      useSF = 0;
762      useSP = 0;
763      useBoxDipole = 0;
767
764  
765      if (simParams_->haveElectrostaticSummationMethod()) {
766        std::string myMethod = simParams_->getElectrostaticSummationMethod();
# Line 865 | Line 861 | namespace oopse {
861      MPI_Allreduce(&temp, &useAtomicVirial_, 1, MPI_INT, MPI_LOR, MPI_COMM_WORLD);
862  
863   #endif
868
864      fInfo_.SIM_uses_PBC = usePBC;    
865      fInfo_.SIM_uses_DirectionalAtoms = useDirectionalAtom;
866      fInfo_.SIM_uses_LennardJones = useLennardJones;
# Line 969 | Line 964 | namespace oopse {
964        sprintf( painCave.errMsg,
965                 "There was an error setting the simulation information in fortran.\n" );
966        painCave.isFatal = 1;
967 <      painCave.severity = OOPSE_ERROR;
967 >      painCave.severity = OPENMD_ERROR;
968        simError();
969      }
970      
# Line 1053 | Line 1048 | namespace oopse {
1048      int cp =  TRADITIONAL_CUTOFF_POLICY; // Set to traditional by default
1049  
1050      // Set LJ shifting bools to false
1051 <    ljsp_ = false;
1052 <    ljsf_ = false;
1051 >    ljsp_ = 0;
1052 >    ljsf_ = 0;
1053  
1054      std::string myPolicy;
1055      if (forceFieldOptions_.haveCutoffPolicy()){
# Line 1105 | Line 1100 | namespace oopse {
1100            rsw_ = 0.85 * rcut_;
1101            sprintf(painCave.errMsg,
1102                    "SimCreator Warning: No value was set for the switchingRadius.\n"
1103 <                  "\tOOPSE will use a default value of 85 percent of the cutoffRadius.\n"
1103 >                  "\tOpenMD will use a default value of 85 percent of the cutoffRadius.\n"
1104                    "\tswitchingRadius = %f. for this simulation\n", rsw_);
1105          painCave.isFatal = 0;
1106          simError();
# Line 1113 | Line 1108 | namespace oopse {
1108            rsw_ = rcut_;
1109            sprintf(painCave.errMsg,
1110                    "SimCreator Warning: No value was set for the switchingRadius.\n"
1111 <                  "\tOOPSE will use the same value as the cutoffRadius.\n"
1111 >                  "\tOpenMD will use the same value as the cutoffRadius.\n"
1112                    "\tswitchingRadius = %f. for this simulation\n", rsw_);
1113            painCave.isFatal = 0;
1114            simError();
# Line 1125 | Line 1120 | namespace oopse {
1120          toUpper(myMethod);
1121          
1122          if (myMethod == "SHIFTED_POTENTIAL") {
1123 <          ljsp_ = true;
1123 >          ljsp_ = 1;
1124          } else if (myMethod == "SHIFTED_FORCE") {
1125 <          ljsf_ = true;
1125 >          ljsf_ = 1;
1126          }
1127        }
1128 +
1129        notifyFortranCutoffs(&rcut_, &rsw_, &ljsp_, &ljsf_);
1130        
1131      } else {
# Line 1138 | Line 1134 | namespace oopse {
1134        if (fInfo_.SIM_uses_Charges | fInfo_.SIM_uses_Dipoles | fInfo_.SIM_uses_RF) {
1135          sprintf(painCave.errMsg,
1136                  "SimCreator Warning: No value was set for the cutoffRadius.\n"
1137 <                "\tOOPSE will use a default value of 15.0 angstroms"
1137 >                "\tOpenMD will use a default value of 15.0 angstroms"
1138                  "\tfor the cutoffRadius.\n");
1139          painCave.isFatal = 0;
1140          simError();
# Line 1147 | Line 1143 | namespace oopse {
1143          if (simParams_->haveElectrostaticSummationMethod()) {
1144            std::string myMethod = simParams_->getElectrostaticSummationMethod();
1145            toUpper(myMethod);
1146 <      
1147 <      // For the time being, we're tethering the LJ shifted behavior to the
1148 <      // electrostaticSummationMethod keyword options
1146 >          
1147 >          // For the time being, we're tethering the LJ shifted behavior to the
1148 >          // electrostaticSummationMethod keyword options
1149            if (myMethod == "SHIFTED_POTENTIAL") {
1150 <            ljsp_ = true;
1150 >            ljsp_ = 1;
1151            } else if (myMethod == "SHIFTED_FORCE") {
1152 <            ljsf_ = true;
1152 >            ljsf_ = 1;
1153            }
1154            if (myMethod == "SHIFTED_POTENTIAL" || myMethod == "SHIFTED_FORCE") {
1155              if (simParams_->haveSwitchingRadius()){
# Line 1172 | Line 1168 | namespace oopse {
1168          } else {        
1169            sprintf(painCave.errMsg,
1170                    "SimCreator Warning: No value was set for switchingRadius.\n"
1171 <                  "\tOOPSE will use a default value of\n"
1171 >                  "\tOpenMD will use a default value of\n"
1172                    "\t0.85 * cutoffRadius for the switchingRadius\n");
1173            painCave.isFatal = 0;
1174            simError();
1175            rsw_ = 0.85 * rcut_;
1176          }
1177  
1178 +        Electrostatic::setElectrostaticCutoffRadius(rcut_, rsw_);
1179          notifyFortranCutoffs(&rcut_, &rsw_, &ljsp_, &ljsf_);
1180  
1181        } else {
# Line 1194 | Line 1191 | namespace oopse {
1191    void SimInfo::setupElectrostaticSummationMethod( int isError ) {    
1192      
1193      int errorOut;
1194 <    int esm =  NONE;
1195 <    int sm = UNDAMPED;
1194 >    ElectrostaticSummationMethod esm = NONE;
1195 >    ElectrostaticScreeningMethod sm = UNDAMPED;
1196      RealType alphaVal;
1197      RealType dielectric;
1198      
# Line 1282 | Line 1279 | namespace oopse {
1279        }
1280      }
1281      
1282 <    // let's pass some summation method variables to fortran
1283 <    setElectrostaticSummationMethod( &esm );
1284 <    setFortranElectrostaticMethod( &esm );
1285 <    setScreeningMethod( &sm );
1286 <    setDampingAlpha( &alphaVal );
1290 <    setReactionFieldDielectric( &dielectric );
1282 >
1283 >    Electrostatic::setElectrostaticSummationMethod( esm );
1284 >    Electrostatic::setElectrostaticScreeningMethod( sm );
1285 >    Electrostatic::setDampingAlpha( alphaVal );
1286 >    Electrostatic::setReactionFieldDielectric( dielectric );
1287      initFortranFF( &errorOut );
1288    }
1289  
# Line 1474 | Line 1470 | namespace oopse {
1470  
1471  
1472         [  Ixx -Ixy  -Ixz ]
1473 <  J =| -Iyx  Iyy  -Iyz |
1473 >    J =| -Iyx  Iyy  -Iyz |
1474         [ -Izx -Iyz   Izz ]
1475      */
1476  
# Line 1633 | Line 1629 | namespace oopse {
1629        return sdByGlobalIndex_.at(index);
1630      }  
1631   */  
1632 < }//end namespace oopse
1632 > }//end namespace OpenMD
1633  

Comparing:
trunk/src/brains/SimInfo.cpp (property svn:keywords), Revision 1313 by gezelter, Wed Oct 22 20:01:49 2008 UTC vs.
branches/development/src/brains/SimInfo.cpp (property svn:keywords), Revision 1505 by gezelter, Sun Oct 3 22:18:59 2010 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines