Yes. The pow function is expensive though. The code will run much faster if you can use rinvsix, such as check for 2*rinvsix > c6/c12. (I forgot the factor 2 in my previous mail).
Berk > From: makoto-yon...@aist.go.jp > To: gmx-users@gromacs.org > Date: Tue, 11 Jan 2011 10:10:56 +0900 > Subject: [gmx-users] truncated LJ potential > > Dear Berk: > > Thanks again for the further reply. > > >> The LJ potential and force code in the above looks like in the c6-c12 > form > >> not in epsilon-sigma one. > >> The LJ potential modification I'd like to try is based on the epsilon- > >> sigma form and the mixing rule is the Lorents-Bertelot's one. > >> Could you kindly tell me the LJ potential and force routine in the > epsilon- > >> Sigma form. > > > >There is no such code. > > > >You can simply check for rinvsix > c6/c12 > > Is it means that the LJ potential in epsion-sigma form (with the > Lorents-Bertelot > mixing rule) is evaluated after the coversion into c6-c12 form in GROMACS? > Then, may I evaluate the modified LJ potential: > > > > V(r) > > > = 4*epsilon*{ (sigma/r)^(12) - (sigma/r)^6 + (1/4) } for r<= > > > 2^(1/6)*sigma > > > = 0 for r> 2^(1/6)*sigma > > with translated into the equivalent c6-c12 form: > > V(r) > = (c12/r)^(12) - (c6/r)^6 + (c6/2)*(c6/2*c12) for r<= (2*c12/c6)^(1/6) > = 0 for r > (2*c12/c6)^(1/6) > > in the following routines. > > > You can also set the environment variable nb_generic.c and modify > > > src/gmxlib/nonbonded/nb_generic.c, but might lead to somewhat > > > slower simulations. > > If my understanding in the above would correct, I'll try that. > > Thank you for advance. > > Makoto Yoneya, Dr. > http://staff.aist.go.jp/makoto-yoneya/ > > -- > gmx-users mailing list gmx-users@gromacs.org > http://lists.gromacs.org/mailman/listinfo/gmx-users > Please search the archive at > http://www.gromacs.org/Support/Mailing_Lists/Search before posting! > Please don't post (un)subscribe requests to the list. Use the > www interface or send it to gmx-users-requ...@gromacs.org. > Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
-- gmx-users mailing list gmx-users@gromacs.org http://lists.gromacs.org/mailman/listinfo/gmx-users Please search the archive at http://www.gromacs.org/Support/Mailing_Lists/Search before posting! Please don't post (un)subscribe requests to the list. Use the www interface or send it to gmx-users-requ...@gromacs.org. Can't post? Read http://www.gromacs.org/Support/Mailing_Lists