398 |
|
have_extra =1; |
399 |
|
|
400 |
|
n_cells = (int)temp3 - 1; |
401 |
< |
cellx = info->boxLx / temp3; |
402 |
< |
celly = info->boxLy / temp3; |
403 |
< |
cellz = info->boxLz / temp3; |
401 |
> |
cellx = info->boxL[0] / temp3; |
402 |
> |
celly = info->boxL[1] / temp3; |
403 |
> |
cellz = info->boxL[2] / temp3; |
404 |
|
n_extra = tot_nmol - ( 4 * n_cells * n_cells * n_cells ); |
405 |
|
temp1 = ((double)n_extra) / ( pow( temp3, 3.0 ) - pow( n_cells, 3.0 ) ); |
406 |
|
n_per_extra = (int)ceil( temp1 ); |
415 |
|
} |
416 |
|
else{ |
417 |
|
n_cells = (int)temp3; |
418 |
< |
cellx = info->boxLx / temp3; |
419 |
< |
celly = info->boxLy / temp3; |
420 |
< |
cellz = info->boxLz / temp3; |
418 |
> |
cellx = info->boxL[0] / temp3; |
419 |
> |
celly = info->boxL[1] / temp3; |
420 |
> |
cellz = info->boxL[2] / temp3; |
421 |
|
} |
422 |
|
|
423 |
|
current_mol = 0; |
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; |
775 |
|
painCave.isFatal = 0; |
776 |
|
simError(); |
777 |
|
double smallest; |
778 |
< |
smallest = info->boxLx; |
779 |
< |
if (info->boxLy <= smallest) smallest = info->boxLy; |
780 |
< |
if (info->boxLz <= smallest) smallest = info->boxLz; |
781 |
< |
info->ecr = 0.5 * smallest; |
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 |
> |
theEcr = 0.5 * smallest; |
782 |
|
} else { |
783 |
< |
info->ecr = globals->getECR(); |
783 |
> |
theEcr = globals->getECR(); |
784 |
|
} |
785 |
|
|
786 |
|
if( !globals->haveEST() ){ |
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, |
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->boxLx; |
822 |
< |
if (info->boxLy <= smallest) smallest = info->boxLy; |
823 |
< |
if (info->boxLz <= smallest) smallest = info->boxLz; |
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 |
|
|
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 |
|
} |