# | Line 762 | Line 762 | void SimSetup::finalInfoCheck( void ){ | |
---|---|---|
762 | MPI_Allreduce( &myUse, &usesDipoles, 1, MPI_INT, MPI_LOR, MPI_COMM_WORLD ); | |
763 | #endif //is_mpi | |
764 | ||
765 | + | double theEcr, theEst; |
766 | ||
767 | if (globals->getUseRF() ) { | |
768 | info->useReactionField = 1; | |
# | Line 777 | Line 778 | void SimSetup::finalInfoCheck( void ){ | |
778 | smallest = info->boxL[0]; | |
779 | if (info->boxL[1] <= smallest) smallest = info->boxL[1]; | |
780 | if (info->boxL[2] <= smallest) smallest = info->boxL[2]; | |
781 | < | info->ecr = 0.5 * smallest; |
781 | > | theEcr = 0.5 * smallest; |
782 | } else { | |
783 | < | info->ecr = globals->getECR(); |
783 | > | theEcr = globals->getECR(); |
784 | } | |
785 | ||
786 | if( !globals->haveEST() ){ | |
# | Line 789 | Line 790 | void SimSetup::finalInfoCheck( void ){ | |
790 | ); | |
791 | painCave.isFatal = 0; | |
792 | simError(); | |
793 | < | info->est = 0.05 * info->ecr; |
793 | > | theEst = 0.05 * theEcr; |
794 | } else { | |
795 | < | info->est = globals->getEST(); |
795 | > | theEst= globals->getEST(); |
796 | } | |
797 | + | |
798 | + | info->setEcr( theEcr, theEst ); |
799 | ||
800 | if(!globals->haveDielectric() ){ | |
801 | sprintf( painCave.errMsg, | |
# | Line 808 | Line 811 | void SimSetup::finalInfoCheck( void ){ | |
811 | if (usesDipoles) { | |
812 | ||
813 | if( !globals->haveECR() ){ | |
814 | < | sprintf( painCave.errMsg, |
815 | < | "SimSetup Warning: using default value of 1/2 the smallest " |
816 | < | "box length for the electrostaticCutoffRadius.\n" |
817 | < | "I hope you have a very fast processor!\n"); |
818 | < | painCave.isFatal = 0; |
819 | < | simError(); |
820 | < | double smallest; |
821 | < | smallest = info->boxL[0]; |
822 | < | if (info->boxL[1] <= smallest) smallest = info->boxL[1]; |
823 | < | if (info->boxL[2] <= smallest) smallest = info->boxL[2]; |
824 | < | info->ecr = 0.5 * smallest; |
814 | > | sprintf( painCave.errMsg, |
815 | > | "SimSetup Warning: using default value of 1/2 the smallest " |
816 | > | "box length for the electrostaticCutoffRadius.\n" |
817 | > | "I hope you have a very fast processor!\n"); |
818 | > | painCave.isFatal = 0; |
819 | > | simError(); |
820 | > | double smallest; |
821 | > | smallest = info->boxL[0]; |
822 | > | if (info->boxL[1] <= smallest) smallest = info->boxL[1]; |
823 | > | if (info->boxL[2] <= smallest) smallest = info->boxL[2]; |
824 | > | theEcr = 0.5 * smallest; |
825 | } else { | |
826 | < | info->ecr = globals->getECR(); |
826 | > | theEcr = globals->getECR(); |
827 | } | |
828 | ||
829 | if( !globals->haveEST() ){ | |
830 | < | sprintf( painCave.errMsg, |
831 | < | "SimSetup Warning: using default value of 5%% of the " |
832 | < | "electrostaticCutoffRadius for the " |
833 | < | "electrostaticSkinThickness\n" |
834 | < | ); |
835 | < | painCave.isFatal = 0; |
836 | < | simError(); |
837 | < | info->est = 0.05 * info->ecr; |
838 | < | } else { |
839 | < | info->est = globals->getEST(); |
830 | > | sprintf( painCave.errMsg, |
831 | > | "SimSetup Warning: using default value of 0.05 * the " |
832 | > | "electrostaticCutoffRadius for the " |
833 | > | "electrostaticSkinThickness\n" |
834 | > | ); |
835 | > | painCave.isFatal = 0; |
836 | > | simError(); |
837 | > | theEst = 0.05 * theEcr; |
838 | > | } else { |
839 | > | theEst= globals->getEST(); |
840 | } | |
841 | + | |
842 | + | info->setEcr( theEcr, theEst ); |
843 | } | |
844 | } | |
845 | ||
# | Line 857 | Line 862 | void SimSetup::initSystemCoords( void ){ | |
862 | #ifdef IS_MPI | |
863 | }else fileInit = new InitializeFromFile( NULL ); | |
864 | #endif | |
865 | < | fileInit->read_xyz( info ); // default velocities on |
865 | > | fileInit->readInit( info ); // default velocities on |
866 | ||
867 | delete fileInit; | |
868 | } | |
# | Line 1276 | Line 1281 | void SimSetup::makeIntegrator( void ){ | |
1281 | ||
1282 | void SimSetup::makeIntegrator( void ){ | |
1283 | ||
1284 | < | NVT* myNVT = NULL; |
1285 | < | NPTi* myNPTi = NULL; |
1286 | < | NPTf* myNPTf = NULL; |
1287 | < | NPTim* myNPTim = NULL; |
1288 | < | NPTfm* myNPTfm = NULL; |
1284 | > | NVT<RealIntegrator>* myNVT = NULL; |
1285 | > | NPTi<RealIntegrator>* myNPTi = NULL; |
1286 | > | NPTf<RealIntegrator>* myNPTf = NULL; |
1287 | > | NPTim<RealIntegrator>* myNPTim = NULL; |
1288 | > | NPTfm<RealIntegrator>* myNPTfm = NULL; |
1289 | ||
1290 | switch( ensembleCase ){ | |
1291 | ||
1292 | case NVE_ENS: | |
1293 | < | new NVE( info, the_ff ); |
1293 | > | new NVE<RealIntegrator>( info, the_ff ); |
1294 | break; | |
1295 | ||
1296 | case NVT_ENS: | |
1297 | < | myNVT = new NVT( info, the_ff ); |
1297 | > | myNVT = new NVT<RealIntegrator>( info, the_ff ); |
1298 | myNVT->setTargetTemp(globals->getTargetTemp()); | |
1299 | ||
1300 | if (globals->haveTauThermostat()) | |
# | Line 1305 | Line 1310 | void SimSetup::makeIntegrator( void ){ | |
1310 | break; | |
1311 | ||
1312 | case NPTi_ENS: | |
1313 | < | myNPTi = new NPTi( info, the_ff ); |
1313 | > | myNPTi = new NPTi<RealIntegrator>( info, the_ff ); |
1314 | myNPTi->setTargetTemp( globals->getTargetTemp() ); | |
1315 | ||
1316 | if (globals->haveTargetPressure()) | |
# | Line 1340 | Line 1345 | void SimSetup::makeIntegrator( void ){ | |
1345 | break; | |
1346 | ||
1347 | case NPTf_ENS: | |
1348 | < | myNPTf = new NPTf( info, the_ff ); |
1348 | > | myNPTf = new NPTf<RealIntegrator>( info, the_ff ); |
1349 | myNPTf->setTargetTemp( globals->getTargetTemp()); | |
1350 | ||
1351 | if (globals->haveTargetPressure()) | |
# | Line 1375 | Line 1380 | void SimSetup::makeIntegrator( void ){ | |
1380 | break; | |
1381 | ||
1382 | case NPTim_ENS: | |
1383 | < | myNPTim = new NPTim( info, the_ff ); |
1383 | > | myNPTim = new NPTim<RealIntegrator>( info, the_ff ); |
1384 | myNPTim->setTargetTemp( globals->getTargetTemp()); | |
1385 | ||
1386 | if (globals->haveTargetPressure()) | |
# | Line 1410 | Line 1415 | void SimSetup::makeIntegrator( void ){ | |
1415 | break; | |
1416 | ||
1417 | case NPTfm_ENS: | |
1418 | < | myNPTfm = new NPTfm( info, the_ff ); |
1418 | > | myNPTfm = new NPTfm<RealIntegrator>( info, the_ff ); |
1419 | myNPTfm->setTargetTemp( globals->getTargetTemp()); | |
1420 | ||
1421 | if (globals->haveTargetPressure()) |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |