EWALD SUMMATIONS OF LONG RANGE INTERACTIONS IN MOIL, 11.11.96 the current version does not include PME for VdW CHANGES MADE BY JM IN: ./makefile -> new procedures and common blocks included, see below ./COMMON -> EWALD.BLOCK: ewaldyes, cutd, dtol, ewaldcof, e_self, e_corr, e_ew_receip, e_dir, nfft1, nfft2, nfft3, sgridx, sgridy, sgridz, intrpord, (and necessary structures and parameters) LENGTH.BLOCK: NOTE - memory requirements are essentially defined by parameters: maxt - relevant for fft and charge grid maxtau - relevant for interpolating grid for erfc ./dynamics -> dyna.f: cmmn, init_dyna.f: cmmn, ccall ewald_init.f line_loop.f: cmmn, switch for ewald, reading parameters for ewald ./symm -> sym_init.f: cmmn, EWALD_INIT.F: set up parameters for Ewald sums, prepare table for erfc SYMWAT_EWALD.F: sum impart of water contributions to ds SYMCDIE_EWALD.F: sum non-water impart contributions to ds ERFCFUN.C: for calculating compl. error function (obsolate) ./pot -> eforce.f: cmmn, ccall watwat_ewald.f symwat_ewald.f symdie_ewald.f cdie_ewald.f receip_ewald.f wener.f: cmmn, ccall for alternative print of results WATWAT_EWALD.F: sum rpart of water contributions to ds (except for corr.) CDIE_EWALD.F: sum non-water rpart contributions to ds (all corr. here) EWALD_RECEIP.F: sum all contributions to rs, contains fft ----------------- ----------------- CAPITAL LETTERS : NEW (the real names use small lett. only however) small letters : modified cmmn : new common added ccall : conditional call mic : minimal image convention mic=impart + rpart (image part + real part) ds : direct sum (together with exclusion and self terms) rs : receiprocal sum (without any restrictions - all corrections in ds) ----------------- ----------------- INPUT PARAMETERS : ewald -> the ONLY ONE necessary keyword for PME all other parameters are optional (default values in parenth.): dtol (5*10E-5) -> tolerance for direct space summation - it essentially sets up the Ewald coefficient (for a given direct space cutoff) grdx, grdy, grdz (function of box sizes) -> grid dimensions (nfft1,2,3 in the program) defining the accuracy of PME - one grid point per A is recommended choice, choose also powers of 2,3 or 5 if possible (for speed of fft) iord (4) -> another parameter defining accuracy of PME, namely inter- poletion order (replaced by order in many places in the code) - notice, the real interpolation order is equal to iord - 1 sgdx, sgdy, sgdz (1) -> additional scaling parametrs for further adjustment of automatically chosen xgrd, ygrd, zgrd ----------------- ----------------- INPUT EXAMPLES : file conn name=(memb5.WCON) read file rcrd name=(memb5_4.CRD) read file wcrd name=(memb_16.DCD) bina wovr file wvel name=(memb_16.VCD) bina wovr relx=12. rvmx=8. epsi=1. cdie v14f=8. e14f=2. step=0.001 #ste=300 #equ=300 info=1 #crd=500 #vel=200 #lis=5 mshk mtol=1.d-12 shkb shac=1.d-12 shav=1.d-12 itsh=2000 symm xtra=70.0 ytra=106.3 ztra=50 ewald dtol=0.000001 iord=6 grdx=81 grdy=81 grdz=64 ~ the above line is relevant for PME rand=-1111111 tmpi=300. tmpf=300. action ----------------- ----------------- HOW TO IMPROVE ACCURACY ... 1. Suppose the box sizes are fixed. Let the tolerance for the direct sum be also fixed. Then enlarging the cutoff for the direct sum means that you don't have to "dump" the direct energy as much as previously - you get the same (1/cutoff)*erfc(ewaldcof*cutoff) with smaller ewaldcof, which means in turn, that you include more in the direct sum (erfc in- creases as ewaldcof decreases for a given r) comparing to the total energy. Thus, enlarging the cutoff when the dtol and box sizes are fixed (cutoff is now nothing but parameter for controling the ewaldcof and hence the splitting of the total energy into direct and receiprocal energies) you "feel" inaccuracy of griding in the receiprocal sum less. 2. It may be cheaper however to keep your cutoff small and enlarge the grid density instead (using xgrd, ygrd, zgrd) or/and enlarge the inter- polation order for the receiprocal sum. 3. For the evaluation of the direct sum one uses interpolated values of erfc - in order to increase accuracy of its evaluation you must enlarge the number of grid points per unit interval - perft. 4. You may also tune the splitting into direct and receiprocal part by changing the tolerance dtol when keeping other parameters fixed. Decreasing dtol, you "dump" more direct energy and you shift more to the receiprocal part (opposit to 1. - good when you want to check invarian- ce of your results with respect to changes of ewaldcof). The above solutions are certainly only applicable if you have some memory still available and enough time to await for the results. Good luck!!!