<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
<br><br>&gt; Date: Sat, 17 Apr 2010 14:58:22 -0400<br>&gt; From: jalemkul@vt.edu<br>&gt; To: gmx-users@gromacs.org<br>&gt; Subject: Re: [gmx-users] manual eq. 4.74-4.75 (dihedral restraints)        head        scratcher<br>&gt; <br>&gt; <br>&gt; <br>&gt; Daniel L. Ensign wrote:<br>&gt; &gt; Hello gmx-users, you rock and rollers,<br>&gt; &gt; <br>&gt; &gt; Equations 4.74 and 4.75 in my copy of the manual have (please pardon my <br>&gt; &gt; pseudo-LaTeX):<br>&gt; &gt; <br>&gt; &gt; (4.74)<br>&gt; &gt; \phi' = (\phi - \phi_0) MOD 2\pi<br>&gt; &gt; <br>&gt; &gt; (4.75)<br>&gt; &gt; V(\phi') = \frac{1}{2}k ( \phi' - \phi_0 - \Delta \phi )^2 if \phi' &gt; <br>&gt; &gt; \Delta \phi<br>&gt; &gt; or<br>&gt; &gt; V(\phi') = 0 if \phi' \leq \Delta \phi<br>&gt; &gt; <br>&gt; &gt; but should there be absolute values around all of the \phi-\phi_0? Which <br>&gt; &gt; way is it in the code -- with the absolute distance between \phi and <br>&gt; &gt; \phi_0 or the directed distance?<br>&gt; &gt; <br>&gt; <br>&gt; It looks like absolute values are considered.  From src/gmxlib/dihres.c:<br>&gt; <br>&gt;      /* phi can jump if phi0 is close to Pi/-Pi, which will cause huge<br>&gt;       * force changes if we just apply a normal harmonic.<br>&gt;       * Instead, we first calculate phi-phi0 and take it modulo (-Pi,Pi).<br>&gt;       * This means we will never have the periodicity problem, unless<br>&gt;       * the dihedral is Pi away from phiO, which is very unlikely due to<br>&gt;       * the potential.<br>&gt;       */<br>&gt;      dp = phi-phi0;<br>&gt;      if (fabs(dp) &gt; dphi) {<br>&gt;        /* dp cannot be outside (-2*pi,2*pi) */<br>&gt;        if (dp &gt;= M_PI)<br>&gt;      dp -= 2*M_PI;<br>&gt;        else if(dp &lt; -M_PI)<br>&gt;      dp += 2*M_PI;<br>&gt; <br>&gt; <br>&gt; &gt; Also, as far as I can tell (and some mornings I definitely don't read <br>&gt; &gt; too good) neither the manual nor <br>&gt; &gt; http://wiki.gromacs.org/index.php/Dihedral_Restraints define the fields <br>&gt; &gt; in [ dihedral_restraints ], although the latter does name them. There, I <br>&gt; &gt; see<br>&gt; &gt; <br>&gt; &gt; [ dihedral_restraints ]<br>&gt; &gt; ; ai   aj    ak    al  type  label  phi  dphi  kfac  power<br>&gt; &gt;     5    7     9    15     1      1  180     0     1      2<br>&gt; &gt; <br>&gt; &gt; ai, aj, ak, al = atom numbers, obviously<br>&gt; &gt; type = ?, but I'm guessing there's only one type anyway<br>&gt; <br>&gt; Probably so.<br>&gt; <br>&gt; &gt; label = what is this one?<br>&gt; <br>&gt; Looks to be bookkeeping.  The code doesn't seem to use it other than to print <br>&gt; debug information, but I could be wrong since I haven't surfed around it very long.<br>&gt; <br><br>power and label have been copied from distance restraints, but not used at all.<br>I have already removed them for the next release.<br><br>Berk<br><br>&gt; &gt; phi means phi0 ?<br>&gt; <br>&gt; Yes.<br>&gt; <br>&gt; &gt; dphi means Delta phi, I guess<br>&gt; <br>&gt; Yes.<br>&gt; <br>&gt; &gt; kfac is the force constant, probably<br>&gt; <br>&gt; Indirectly.  This term is equivalent to the fac value in distance restraints. <br>&gt; Since the force constant is specified in the .mdp file, different restraints <br>&gt; would otherwise have to be restrained with equivalent force constants.  The <br>&gt; value of kfac is multiplied by the value of dihre_fc in the .mdp file, so that <br>&gt; different restraints could have different force constants.<br>&gt; <br>&gt; &gt; power = what is this one? Does 2 give me harmonic constraints?<br>&gt; &gt; <br>&gt; <br>&gt; Not a clue on this one.  Also doesn't seem to be used in the code, but maybe <br>&gt; it's somewhere outside of dihres.c.<br>&gt; <br>&gt; &gt; I'd be happy to translate any answers given to the wiki, assuming I get <br>&gt; &gt; answered and that I'm allowed to edit the wiki.<br>&gt; &gt; <br>&gt; <br>&gt; The wiki link you posted above doesn't actually exist any more, and actually <br>&gt; points to an empty page, even though the content is still online:<br>&gt; <br>&gt; http://www.gromacs.org/index.php?title=Documentation/How-tos/Dihedral_Restraints<br>&gt; <br>&gt; The old wiki doesn't actually exist, but has been merged into the Gromacs site, <br>&gt; so if you register as a user you can make contributions.  If you have troubles, <br>&gt; I might get around to updating this page with the above information, unless <br>&gt; there is more information to be considered, or I'm wrong :)<br>&gt; <br>&gt; -Justin<br>&gt; <br>&gt; &gt; May the Force be with you (as long as it's calculated in hand-tuned <br>&gt; &gt; assembly loops),<br>&gt; &gt; Dan<br>&gt; &gt; <br>&gt; <br>&gt; -- <br>&gt; ========================================<br>&gt; <br>&gt; Justin A. Lemkul<br>&gt; Ph.D. Candidate<br>&gt; ICTAS Doctoral Scholar<br>&gt; MILES-IGERT Trainee<br>&gt; Department of Biochemistry<br>&gt; Virginia Tech<br>&gt; Blacksburg, VA<br>&gt; jalemkul[at]vt.edu | (540) 231-9080<br>&gt; http://www.bevanlab.biochem.vt.edu/Pages/Personal/justin<br>&gt; <br>&gt; ========================================<br>&gt; -- <br>&gt; gmx-users mailing list    gmx-users@gromacs.org<br>&gt; http://lists.gromacs.org/mailman/listinfo/gmx-users<br>&gt; Please search the archive at http://www.gromacs.org/search before posting!<br>&gt; Please don't post (un)subscribe requests to the list. Use the <br>&gt; www interface or send it to gmx-users-request@gromacs.org.<br>&gt; Can't post? Read http://www.gromacs.org/mailing_lists/users.php<br>                                               <br /><hr />Express yourself instantly with MSN Messenger! <a href='http://clk.atdmt.com/AVE/go/onm00200471ave/direct/01/' target='_new'>MSN Messenger</a></body>
</html>