ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libmdtools/SimSetup.cpp
(Generate patch)

Comparing trunk/OOPSE/libmdtools/SimSetup.cpp (file contents):
Revision 829 by gezelter, Tue Oct 28 16:03:37 2003 UTC vs.
Revision 859 by mmeineke, Mon Nov 10 21:50:36 2003 UTC

# Line 696 | Line 696 | void SimSetup::gatherInfo(void){
696      }
697  
698      // check for the temperature set flag
699 <
699 >    
700      if (globals->haveTempSet())
701        info[i].setTemp = globals->getTempSet();
702  
703 <    // get some of the tricky things that may still be in the globals
704 <
705 <    double boxVector[3];
706 <    if (globals->haveBox()){
707 <      boxVector[0] = globals->getBox();
708 <      boxVector[1] = globals->getBox();
709 <      boxVector[2] = globals->getBox();
710 <
711 <      info[i].setBox(boxVector);
712 <    }
713 <    else if (globals->haveDensity()){
714 <      double vol;
715 <      vol = (double) tot_nmol / globals->getDensity();
716 <      boxVector[0] = pow(vol, (1.0 / 3.0));
717 <      boxVector[1] = boxVector[0];
718 <      boxVector[2] = boxVector[0];
719 <
720 <      info[i].setBox(boxVector);
721 <    }
722 <    else{
723 <      if (!globals->haveBoxX()){
724 <        sprintf(painCave.errMsg,
725 <                "SimSetup error, no periodic BoxX size given.\n");
726 <        painCave.isFatal = 1;
727 <        simError();
728 <      }
729 <      boxVector[0] = globals->getBoxX();
703 >    // check for the extended State init
704  
705 <      if (!globals->haveBoxY()){
706 <        sprintf(painCave.errMsg,
707 <                "SimSetup error, no periodic BoxY size given.\n");
734 <        painCave.isFatal = 1;
735 <        simError();
736 <      }
737 <      boxVector[1] = globals->getBoxY();
738 <
739 <      if (!globals->haveBoxZ()){
740 <        sprintf(painCave.errMsg,
741 <                "SimSetup error, no periodic BoxZ size given.\n");
742 <        painCave.isFatal = 1;
743 <        simError();
744 <      }
745 <      boxVector[2] = globals->getBoxZ();
746 <
747 <      info[i].setBox(boxVector);
748 <    }
705 >    info[i].useInitXSstate = globals->getUseInitXSstate();
706 >    info[i].orthoTolerance = globals->getOrthoBoxTolerance();
707 >    
708    }
709 <
709 >  
710    //setup seed for random number generator
711    int seedValue;
712  
# Line 822 | Line 781 | void SimSetup::finalInfoCheck(void){
781  
782        if (!globals->haveECR()){
783          sprintf(painCave.errMsg,
784 <                "SimSetup Warning: using default value of 1/2 the smallest "
785 <                "box length for the electrostaticCutoffRadius.\n"
827 <                "I hope you have a very fast processor!\n");
784 >                "SimSetup Warning: using default value of 15.0 angstroms"
785 >                "box length for the electrostaticCutoffRadius.\n");
786          painCave.isFatal = 0;
787          simError();
788 <        double smallest;
831 <        smallest = info[i].boxL[0];
832 <        if (info[i].boxL[1] <= smallest)
833 <          smallest = info[i].boxL[1];
834 <        if (info[i].boxL[2] <= smallest)
835 <          smallest = info[i].boxL[2];
836 <        theEcr = 0.5 * smallest;
788 >        theEcr = 15.0;
789        }
790        else{
791          theEcr = globals->getECR();
# Line 851 | Line 803 | void SimSetup::finalInfoCheck(void){
803          theEst = globals->getEST();
804        }
805  
806 <      info[i].setEcr(theEcr, theEst);
806 >      info[i].setDefaultEcr(theEcr, theEst);
807  
808        if (!globals->haveDielectric()){
809          sprintf(painCave.errMsg,
# Line 866 | Line 818 | void SimSetup::finalInfoCheck(void){
818        if (usesDipoles){
819          if (!globals->haveECR()){
820            sprintf(painCave.errMsg,
821 <                  "SimSetup Warning: using default value of 1/2 the smallest "
822 <                  "box length for the electrostaticCutoffRadius.\n"
823 <                  "I hope you have a very fast processor!\n");
824 <          painCave.isFatal = 0;
825 <          simError();
874 <          double smallest;
875 <          smallest = info[i].boxL[0];
876 <          if (info[i].boxL[1] <= smallest)
877 <            smallest = info[i].boxL[1];
878 <          if (info[i].boxL[2] <= smallest)
879 <            smallest = info[i].boxL[2];
880 <          theEcr = 0.5 * smallest;
821 >                  "SimSetup Warning: using default value of 15.0 angstroms"
822 >                  "box length for the electrostaticCutoffRadius.\n");
823 >          painCave.isFatal = 0;
824 >          simError();
825 >          theEcr = 15.0;
826          }
827          else{
828            theEcr = globals->getECR();
829          }
830 <
830 >        
831          if (!globals->haveEST()){
832            sprintf(painCave.errMsg,
833                    "SimSetup Warning: using default value of 0.05 * the "
# Line 895 | Line 840 | void SimSetup::finalInfoCheck(void){
840          else{
841            theEst = globals->getEST();
842          }
843 <
844 <        info[i].setEcr(theEcr, theEst);
843 >        
844 >        info[i].setDefaultEcr(theEcr, theEst);
845        }
846      }
847    }
903
848   #ifdef IS_MPI
849    strcpy(checkPointMsg, "post processing checks out");
850    MPIcheckPoint();
851   #endif // is_mpi
852   }
853 <
853 >  
854   void SimSetup::initSystemCoords(void){
855    int i;
856  
# Line 934 | Line 878 | void SimSetup::initSystemCoords(void){
878      delete fileInit;
879    }
880    else{
881 < #ifdef IS_MPI
938 <
881 >    
882      // no init from bass
883 <
883 >    
884      sprintf(painCave.errMsg,
885 <            "Cannot intialize a parallel simulation without an initial configuration file.\n");
885 >            "Cannot intialize a simulation without an initial configuration file.\n");
886      painCave.isFatal = 1;;
887      simError();
888 <
946 < #else
947 <
948 <    initFromBass();
949 <
950 <
951 < #endif
888 >    
889    }
890  
891   #ifdef IS_MPI
# Line 1460 | Line 1397 | void SimSetup::makeIntegrator(void){
1397  
1398          if (globals->haveTauThermostat())
1399            myNPTf->setTauThermostat(globals->getTauThermostat());
1400 +
1401          else{
1402            sprintf(painCave.errMsg,
1403                    "SimSetup error: If you use an NPT\n"
# Line 1470 | Line 1408 | void SimSetup::makeIntegrator(void){
1408  
1409          if (globals->haveTauBarostat())
1410            myNPTf->setTauBarostat(globals->getTauBarostat());
1411 +
1412          else{
1413            sprintf(painCave.errMsg,
1414                    "SimSetup error: If you use an NPT\n"

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines