# Re: Is the TMD equation in the user manual correct?

From: JC Gumbart (gumbart_at_ks.uiuc.edu)
Date: Fri Oct 05 2012 - 15:47:39 CDT

I think you're right. That being said, the choice of k in TMD is rather ad hoc anyway, so it doesn't matter terribly much. Obviously it can't be fixed in the code (or would mess up all previous configs), but a change to the manual should be mostly harmless. One would just have to change the equation to be k, not k/N, but note that k is effectively scaled by N in the force (so really nothing changes in how one thinks about it). It makes sense intuitively anyway that k should NOT be scaled in U, which is the potential for the ENTIRE domain, but will be scaled (once) in F, which is applied to INDIVIDUAL atoms.

I'm copying the last person to work on that part of the code to see if he agrees.

On Oct 5, 2012, at 3:01 PM, Mert Gür wrote:

> Hi JC,
>
> Thanks a lot for your response.
>
> The potential in TMD is
>
> U= 0.5 k/N ( RMS(t)-RMS*(t) )^2
>
> If you take the gradient of it then the force becomes (According to my derivation),
> F= -k/N^2 ( 1-RMS*(t)/RMS(t) ) (R-R_target)
> So there is an extra N. Does " k = K/it->second.size()" takes care of that ?
> I use the following definition for RMS. Maybe the person who implemented it used a different definition.
> http://en.wikipedia.org/wiki/Root-mean-square_deviation_(bioinformatics)
> I am sending you a separate e-mail with my detailed derivation.
> Best,
> Mert
>
> On Fri, Oct 5, 2012 at 2:26 PM, JC Gumbart <gumbart_at_ks.uiuc.edu> wrote:
>
> k = K/it->second.size();
>
>
> On Oct 2, 2012, at 12:43 PM, Mert Gür wrote:
>
>> Dear all,
>>
>> I wonder if the equation shown in the following link is correct?
>>
>> http://www.ks.uiuc.edu/Research/namd/2.7/ug/node41.html
>>
>> Is it k or k/N. If it is k/N (as written in the link) then there must be a second division by N in the source code (http://www.ks.uiuc.edu/Research/namd/doxygen/GlobalMasterTMD_8C-source.html) which I can not find.
>>
>> Can anyone comment on this?
>>
>> Best,
>>
>> Mert
>
>

This archive was generated by hypermail 2.1.6 : Mon Dec 31 2012 - 23:22:09 CST