[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ESPResSo-users] Triple Cos term formula for Dihedral potential

From: Muhammad Anwar
Subject: Re: [ESPResSo-users] Triple Cos term formula for Dihedral potential
Date: Thu, 26 May 2011 15:53:02 +0200
User-agent: Thunderbird (X11/20101027)

Axel Arnold wrote:

the better option is to copy the relevant code for the dihedral interaction, and make a second one with a different name, e.g. dihedral3cos. As for the implementation, best simply copy the dihedral.h and replace there the force and energy formulas, and of course the names. You then just need to modify interaction_data.[ch], energy.h, force.h and pressure.h to add the glue code. You can basically just copy the dihedral code, and have to find a constant in interaction_data.h (BONDED_IA_DIHEDRAL3COS).

Many regards,

On Thursday 26 May 2011 08:47:19 Muhammad Anwar wrote:
Dear Users,
I want to use triple cos term dihedral potential in my simulation, which is
V = 0.5 *( K1 * (1 - cos(phi) + K2 * (1 - cos(2*phi) + K3 * (1 -
cos(3phi) ).. Can anybody give any suggestion, how can i amend the given
dihedral potential to use this potential? There may be two
possibilities, one in which i just put the tcl command like this

inter 3 dihedral 1 1 0
and change the dihedral file according to my need by putting the
different values of K and phi, but this would be more specific for only
one case. The second option may be i write separate header file for it
and use it. If i use first option i will just change the fac value by
adding new terms for force and energy. Is it ok? or should i write new
code for it, if yes how can i write and add? Please guide me?

Best Regards,
Muhammad Anwar

Dear Dr Arnold,
I am modifying the dihedral potential code, I am not understanding how and why you divide the equation for force by sin(phi)

sinmphi_sinphi = sin(iaparams->p.dihedral.mult*phi - iaparams->p.dihedral.phase)/sin(phi);

Secondly, when sin(phi) is small how you get this equation

sinmphi_sinphi = iaparams->p.dihedral.mult*
cos(iaparams->p.dihedral.mult*phi - iaparams->p.dihedral.phase)/cosphi;

I would really appreciate your guideline.
Best Regards,
Muhammad Anwar

reply via email to

[Prev in Thread] Current Thread [Next in Thread]