Dear David: Sorry again. I realized that it is much better than
> Modify the line in mdlib/sim_util.c (function calc_f_el) as in the > followings, > > if (Et[m].n == 3) > { > t0 = Et[m].a[1]; > Ext[m] = > cos(Et[m].a[0]*(t-t0))*exp(-sqr(t-t0)/(2.0*sqr(Et[m].a[2]))); > } > else > { > /* Ext[m] = cos(Et[m].a[0]*t); original > form */ > Ext[m] = cos(Et[m].a[0]*(t-Et[m].phi[0])); /* modified > form with phase */ > } > > add the phase term for the simple cos-wave field. > Then, mdp file lines in the followings, > > ; Electric fields > ; Format is number of terms (int) and for all terms an amplitude (real) > ; and a phase angle (real) > E-x = 1 1.0 0.0 > E-xt = 1 3.1415e-2 50.0 > > makes cos-wave electric fields with omega=3.1415e-2 (1/ps, period=200ps) > and phase=50ps, i.e. sin-wave. to Modify the line in mdlib/sim_util.c (function calc_f_el) as in the followings, if (Et[m].n == 3) { t0 = Et[m].a[1]; Ext[m] =cos(Et[m].a[0]*(t-t0))*exp(-sqr(t-t0)/(2.0*sqr(Et[m].a[2]))); } else { /* Ext[m] = cos(Et[m].a[0]*t); original form */ Ext[m] = cos(Et[m].a[0]*t-Et[m].phi[0]); /* modified form with phase */ } add the phase term for the simple cos-wave field. Then, mdp file lines in the followings, ; Electric fields ; Format is number of terms (int) and for all terms an amplitude (real) ; and a phase angle (real) E-x = 1 1.0 0.0 E-xt = 1 3.1415e-2 1.57075 makes cos-wave electric fields with omega=3.1415e-2 (1/ps, period=200ps) and phase=1.57075=pi/2, i.e. sin-wave. Makoto Yoneya, Dr. AIST, Tsukuba JAPAN -- Gromacs Users mailing list * Please search the archive at http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before posting! * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists * For (un)subscribe requests visit https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or send a mail to gmx-users-requ...@gromacs.org.