<br><div class="gmail_quote"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;      Anni Kauko wrote:<br>
&gt;&gt;&gt;&gt;&gt;       &gt;  Hi!<br>
&gt;&gt;&gt;&gt;&gt;       &gt;<br>
&gt;&gt;&gt;&gt;&gt;       &gt;  I try to perform pmf calculations for case where a peptide<br>
&gt;&gt;&gt; shifts<br>
&gt;&gt;&gt;&gt;&gt;       &gt;  through the membrane. My COM differences should vary from<br>
&gt;&gt;&gt;&gt;&gt; 2.3 to<br>
&gt;&gt;&gt;&gt;&gt;      -2.5.<br>
&gt;&gt;&gt;&gt;&gt;       &gt;<br>
&gt;&gt;&gt;&gt;&gt;       &gt;  My problem is that g_wham plots negative COM difference as<br>
&gt;&gt;&gt;&gt;&gt; they<br>
&gt;&gt;&gt;&gt;&gt;      would be<br>
&gt;&gt;&gt;&gt;&gt;       &gt;  positive.  In pullx-files the COM differences are treated<br>
&gt;&gt;&gt; correctly<br>
&gt;&gt;&gt;&gt;&gt;       &gt;  (look below). My peptide is not symmetric, so profile curves<br>
&gt;&gt;&gt; are not<br>
&gt;&gt;&gt;&gt;&gt;       &gt;  symmetric, so loosing the sign for COM difference screws my<br>
&gt;&gt;&gt; profile<br>
&gt;&gt;&gt;&gt;&gt;       &gt;  curve completely.<br>
&gt;&gt;&gt;&gt;&gt;       &gt;<br>
&gt;&gt;&gt;&gt;&gt;       &gt;  I did not manage to find any pre-existing answers to this<br>
&gt;&gt;&gt; problem<br>
&gt;&gt;&gt;&gt;&gt;      from<br>
&gt;&gt;&gt;&gt;&gt;       &gt;  internet.<br>
&gt;&gt;&gt;&gt;&gt;       &gt;<br>
&gt;&gt;&gt;&gt;&gt;       &gt;  First datalines from pullx files:<br>
&gt;&gt;&gt;&gt;&gt;       &gt;  (sorry for strange file names...)<br>
&gt;&gt;&gt;&gt;&gt;       &gt;<br>
&gt;&gt;&gt;&gt;&gt;       &gt;  pull_umbr_0.xvg:<br>
&gt;&gt;&gt;&gt;&gt;       &gt;  0.0000  6.26031 2.27369<br>
&gt;&gt;&gt;&gt;&gt;       &gt;<br>
&gt;&gt;&gt;&gt;&gt;       &gt;  pullz_umbr_23.xvg:<br>
&gt;&gt;&gt;&gt;&gt;       &gt;  0.0000  6.09702 0.0233141<br>
&gt;&gt;&gt;&gt;&gt;       &gt;<br>
&gt;&gt;&gt;&gt;&gt;       &gt;  pullz_umbr_50.xvg:<br>
&gt;&gt;&gt;&gt;&gt;       &gt;  0.0000  6.02097 -2.50088<br>
&gt;&gt;&gt;&gt;&gt;       &gt;<br>
&gt;&gt;&gt;&gt;&gt;       &gt;  g_wham command:<br>
&gt;&gt;&gt;&gt;&gt;       &gt;  g_wham -b 5000 -it tpr_files.dat  -ix pullz_files.dat -o<br>
&gt;&gt;&gt;&gt;&gt;       &gt;  profile_test.xvg -hist histo_test.xvg  -unit kCal<br>
&gt;&gt;&gt;&gt;&gt;       &gt;<br>
&gt;&gt;&gt;&gt;&gt;       &gt;  My pull code:<br>
&gt;&gt;&gt;&gt;&gt;       &gt;<br>
&gt;&gt;&gt;&gt;&gt;       &gt;  pull            = umbrella<br>
&gt;&gt;&gt;&gt;&gt;       &gt;  pull_geometry   = distance<br>
&gt;&gt;&gt;&gt;&gt;       &gt;  pull_dim        = N N Y<br>
&gt;&gt;&gt;&gt;&gt;       &gt;  pull_start      = yes<br>
&gt;&gt;&gt;&gt;&gt;       &gt;  pull_ngroups    = 1<br>
&gt;&gt;&gt;&gt;&gt;       &gt;  pull_group0     = POPC_POPS         ; reference group is<br>
&gt;&gt;&gt;&gt;&gt; bilayer<br>
&gt;&gt;&gt;&gt;&gt;       &gt;  pull_group1     = C-alpha_&amp;_r_92-94 ; group that is actually<br>
&gt;&gt;&gt; pulled<br>
&gt;&gt;&gt;&gt;&gt;       &gt;  pull_init1      = 0<br>
&gt;&gt;&gt;&gt;&gt;       &gt;  pull_rate1      = 0.0<br>
&gt;&gt;&gt;&gt;&gt;       &gt;  pull_k1         = 1000     ; kJ mol-1 nm-2<br>
&gt;&gt;&gt;&gt;&gt;       &gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;      Your problem stems from the use of &quot;distance&quot; geometry.  This<br>
&gt;&gt;&gt; method<br>
&gt;&gt;&gt;&gt;&gt;      assumes the<br>
&gt;&gt;&gt;&gt;&gt;      sign along the reaction coordinate does not change, i.e. always<br>
&gt;&gt;&gt;&gt;&gt;      positive or<br>
&gt;&gt;&gt;&gt;&gt;      always negative.  If the sign changes, this simple method fails.<br>
&gt;&gt;&gt;&gt;&gt;       You should be<br>
&gt;&gt;&gt;&gt;&gt;      using something like &quot;position&quot; to allow for a vector to be<br>
&gt;&gt;&gt;&gt;&gt;      specified.  Perhaps<br>
&gt;&gt;&gt;&gt;&gt;      you can reconstruct the PMF by separately analyzing the positive<br>
&gt;&gt;&gt;&gt;&gt;      restraint<br>
&gt;&gt;&gt;&gt;&gt;      distances and negative restraint distances (note here that<br>
&gt;&gt;&gt;&gt;&gt;      &quot;distance&quot; really<br>
&gt;&gt;&gt;&gt;&gt;      refers to a vector quantity, and thus it can have a sign), or<br>
&gt;&gt;&gt;&gt;&gt;      otherwise create<br>
&gt;&gt;&gt;&gt;&gt;      new .tpr files using &quot;position&quot; geometry, though I don&#39;t know if<br>
&gt;&gt;&gt;&gt;&gt;      g_wham will<br>
&gt;&gt;&gt;&gt;&gt;      accept them or not.<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;      -Justin<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;      --<br>
&gt;&gt;&gt;&gt;&gt;      ========================================<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;      Justin A. Lemkul<br>
&gt;&gt;&gt;&gt;&gt;      Ph.D. Candidate<br>
&gt;&gt;&gt;&gt;&gt;      ICTAS Doctoral Scholar<br>
&gt;&gt;&gt;&gt;&gt;      MILES-IGERT Trainee<br>
&gt;&gt;&gt;&gt;&gt;      Department of Biochemistry<br>
&gt;&gt;&gt;&gt;&gt;      Virginia Tech<br>
&gt;&gt;&gt;&gt;&gt;      Blacksburg, VA<br>
&gt;&gt;&gt;&gt;&gt;      jalemkul[at]<a href="http://vt.edu" target="_blank">vt.edu</a>&lt;<a href="http://vt.edu" target="_blank">http://vt.edu</a>&gt;  | <a href="tel:%28540%29%20231-9080" value="+15402319080" target="_blank">(540) 231-9080</a><br>


&gt;&gt;&gt;&gt;&gt;      &lt;tel:%28540%29%20231-9080&gt;<br>
&gt;&gt;&gt;&gt;&gt;      <a href="http://www.bevanlab.biochem.vt.edu/Pages/Personal/justin" target="_blank">http://www.bevanlab.biochem.vt.edu/Pages/Personal/justin</a><br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;      ========================================<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; Thank&#39;s!<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; I managed to solve my g_wham problem by doing two things:<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; 1. New tpr-files with proper pull code for g_wham.<br>
&gt;&gt;&gt;&gt;&gt; 2. I also needed to modify signs of pullf values: If value for pullx<br>
&gt;&gt;&gt;&gt;&gt; distance was negative, I reversed the sign of corresponding pullf<br>
&gt;&gt;&gt; value.<br>
&gt;&gt;&gt;&gt;&gt; I did that by my own script.<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; The new pull code:<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; ; Pull code<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; pull            = umbrella<br>
&gt;&gt;&gt;&gt;&gt; pull_geometry   = direction<br>
&gt;&gt;&gt;&gt;&gt; pull_vec1       = 0 0 1<br>
&gt;&gt;&gt;&gt;&gt; pull_start      = yes<br>
&gt;&gt;&gt;&gt;&gt; pull_ngroups    = 1<br>
&gt;&gt;&gt;&gt;&gt; pull_group0     = POPC_POPS         ; reference group is bilayer<br>
&gt;&gt;&gt;&gt;&gt; pull_group1     = C-alpha_&amp;_r_92-94 ; group that is actually pulled<br>
&gt;&gt;&gt;&gt;&gt; pull_init1      = 0<br>
&gt;&gt;&gt;&gt;&gt; pull_rate1      = 0.0<br>
&gt;&gt;&gt;&gt;&gt; pull_k1         = 1000     ; kJ mol-1 nm-2<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;&gt; I am little bit confuced, why I needed to tweak signes of pullf<br>
&gt;&gt;&gt; values.<br>
&gt;&gt;&gt;&gt;&gt; But like that I got the curve that resembles two half curve made for<br>
&gt;&gt;&gt;&gt;&gt; positive and negative pullx distances separately. That curve also<br>
&gt;&gt;&gt; makes<br>
&gt;&gt;&gt;&gt;&gt; sense from biochemical point of view.<br>
&gt;&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; Such changes do not seem appropriate to me.  If you change the sign of<br>
&gt;&gt;&gt;&gt; the<br>
&gt;&gt;&gt;&gt; pulling force, you change the implication of what that value means.<br>
&gt;&gt;&gt;&gt; What<br>
&gt;&gt;&gt;&gt; happens if you run your simulations with the new (more appropriate)<br>
&gt;&gt;&gt;&gt; .mdp file?<br>
&gt;&gt;&gt;&gt; Do the forces have the same magnitude, but opposite sign?<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; I don&#39;t think that the problem is so easy fixed. I had with another<br>
&gt;&gt;&gt; person about a month ago a lengthy discussion on the list.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; The problem is the following:<br>
&gt;&gt;&gt; If you use &#39;distance&#39; as pull_geometry the position of the minimum of<br>
&gt;&gt;&gt; the umbrella potential is determined by the vector connecting the ref-<br>
&gt;&gt;&gt; and pulled group, but there is no information about the direction.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Assume this (1D):<br>
&gt;&gt;&gt; reference particle at origin (0)<br>
&gt;&gt;&gt; minimum of umbrella potential (1) - via pull_init1 = 1<br>
&gt;&gt;&gt; pulled particle at (0.5)<br>
&gt;&gt;&gt; -&gt;  force acting of pulled particle 0.5*k<br>
&gt;&gt;&gt; -&gt;  everything ok<br>
&gt;&gt;&gt; --------------------------------------------------------<br>
&gt;&gt;&gt; we look later and pulled particle moved to (-0.5)<br>
&gt;&gt;&gt; since we are in the same umbrella sampling windows the umbrella<br>
&gt;&gt;&gt; potential minimum should still be at (1) -&gt;  force acting would be 1.5*k<br>
&gt;&gt;&gt; (this would be right if we had direction as the pull_geometry)<br>
&gt;&gt;&gt; BUT:<br>
&gt;&gt;&gt; we have pull_geometry=distance<br>
&gt;&gt;&gt; -&gt;  minimum of umbrella potential is now at (-1)<br>
&gt;&gt;&gt; (why is this: from ref seen pull-group is now in the negative direction<br>
&gt;&gt;&gt; -&gt;  pull_init tells use that we should go along this vector the distance<br>
&gt;&gt;&gt; 1 -&gt;  new position is now (-1))<br>
&gt;&gt;&gt; -&gt;  force acting is now -0.5*k<br>
&gt;&gt;&gt; which is wrong (meaning physical not sensible)<br>
&gt;&gt;&gt; ok, the force is right (from the algorithm standpoint), but the fact<br>
&gt;&gt;&gt; that our minimum of the umbrella potential jumps around during the<br>
&gt;&gt;&gt; sampling screws everything<br>
&gt;&gt;&gt; --------------------------------------------------------------<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; hope you get the idea about the origin of problem<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; greetings<br>
&gt;&gt;&gt; thomas<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt; It seems that it is safest if I simply rerun my all simulations...<br>
&gt;&gt; Then we<br>
&gt;&gt; will see how it really is.<br>
&gt;&gt;<br>
&gt;&gt; I&#39;m not sure if I understand correctly, but doesn&#39;t Thomas&#39;s experience<br>
&gt;&gt; also suggest that for some strange algoritmic reason force get&#39;s wrong<br>
&gt;&gt; sign<br>
&gt;&gt; when distance gets negative with distance geometry? Or am I completely<br>
&gt;&gt; confuced? If it is so, wouldn&#39;t my trick then be justified?<br>
&gt;&gt;<br>
&gt;&gt; At least if I plot two half curves separately for positive and negative<br>
&gt;&gt; distances (I discarded all runs around zero), I get results that are<br>
&gt;&gt; compatible with my sign trick. And It also made sense biochemically.  But<br>
&gt;&gt; well, proper rerun does not leave any questions.<br>
&gt;&gt;<br>
&gt;&gt; Does following pull code seem proper to you:<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;   pull            = umbrella<br>
&gt;&gt;   pull_geometry   = direction<br>
&gt;&gt;   pull_vec1       = 0 0 1<br>
&gt;&gt;   pull_start      = yes<br>
&gt;&gt;   pull_ngroups    = 1<br>
&gt;&gt;   pull_group0     = POPC_POPS         ; reference group is bilayer<br>
&gt;&gt;   pull_group1     = C-alpha_&amp;_r_92-94 ; group that is actually pulled<br>
&gt;&gt;   pull_init1      = 0<br>
&gt;&gt;   pull_rate1      = 0.0<br>
&gt;&gt;   pull_k1         = 1000     ; kJ mol-1 nm-2<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; Regards,<br>
&gt;&gt; Anni<br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
&gt; It&#39;s not really &#39;strange algoritmic reason&#39;, more an algorithmic<br>
&gt; problem. One could say it so: For &#39;pull_geometry=distance&#39; the problem<br>
&gt; is isotropic, you pull along the vector connecting the two groups. If<br>
&gt; the two groups switch places -&gt; the direction of the vector changes -&gt;<br>
&gt; origin of potential jumps<br>
&gt; With &#39;pull_geometry=direction&#39; you pull along a defined vector. If both<br>
&gt; groups switch places -&gt; but still vector stays the same -&gt; origin of<br>
&gt; potential stays where it was<br>
&gt;<br>
&gt; So in theory &#39;pull_geometry=direction&#39; should solve the problem with<br>
&gt; umbrella sampling a really small distances,<br>
&gt; *BUT* as far as i know &#39;g_wham&#39; doesn&#39;t like &#39;pull_geometry=direction&#39;.<br>
&gt;<br>
<br>
g_wham has supported &quot;direction&quot; and &quot;direction_periodic&quot; for some time.  The<br>
only caveat is that one cannot use pullx.xvg files for the WHAM analysis.<br>
<br>
-Justin<br>
<br>
&gt; One idea (but absolut no idea if i will work):<br>
&gt; Run the problematic windows/distances with &#39;pull_geometry=direction&#39; and<br>
&gt; make a *.tpr file with &#39;pull_geometry=distance&#39; and just feed this to<br>
&gt; g_wham. One thing which is important is the &#39;pull_dim&#39;. If it is 1D you<br>
&gt; are fine. If it is 3D, you must calculate the absolute of each force and<br>
&gt; give it the &#39;right&#39; sign.<br>
&gt;<br>
&gt; One thing to note:<br>
&gt; I think to problem occurs only for a handfull of umbrella-sampling<br>
&gt; windows around a distance of 0. And even there, for the larger (but<br>
&gt; still relative small) distances it becomes less problematic (since the<br>
&gt; switching of both groups happens less often).<br>
&gt;<br></blockquote><div><br><br>To remind you, I originally used distance geometry for my pmf calculation even<br>I needed negative &#39;distances&#39; that distance geometry cannot handle. We discussed<br>possibilities to get the proper pmf curve without rerunning everything.<br>

<br>Now I tested my pmf curve with different recreated tpr-files and other settings:<br><br>1. I can get reasonable curve by procedure suggested by you: I recreated tpr-files<br>with position geometry and rerun simulations only at three zero crossing windows.<br>

Here pullx files must be used as input. I will use this curve.<br><br>2. If I use pullf files, recreated tpr-files (either position or direction<br>geometry) and if zero is crossed, then the profile curve is inverted at negative<br>

&#39;distances&#39;. My sign trick inverts the curve back, and the curve seems <br>essentially fine, though I cannot be 100 % sure if it handles region around zero<br>exactly correctly, as there is of course small differences to above case, where<br>

three windows were rerun. <br><br>3. If I recreate tpr-files with position and distance geometry I get curves <br>that are in practice identical, but not exactly identical. I don&#39;t understand<br>the reason why they are not exactly identical. My pull codes are shown below. <br>

Which one you would recommend if I would do the whole thing from beginning? (I might need to do full rerun for other reasons, so then I will be free to choose the best pull code.)<br><br>I personally like Direction geometry, because it is simper than Position<br>

geometry, though I got feeling from your earlier answers, that Position geometry<br>would somehow be conceptually more correct. <br><br>Position geometry:<br><br>pull            = umbrella<br>pull_geometry   = position<br>

pull_dim    = N N Y<br>pull_vec1       = 0 0 1<br>pull_start      = yes<br>pull_ngroups    = 1<br>pull_group0     = POPC_POPS         ; reference group is bilayer<br>pull_group1     = C-alpha_&amp;_r_92-94 ; group that is actually pulled<br>

pull_init1      = 0 0 0<br>pull_rate1      = 0.0<br>pull_k1         = 1000     ; kJ mol^-1 nm^-2<br>    <br>Direction geometry:<br><br>pull            = umbrella<br>pull_geometry   = direction<br>pull_vec1       = 0 0 1<br>

pull_start      = yes<br>pull_ngroups    = 1<br>pull_group0     = POPC_POPS         ; reference group is bilayer<br>pull_group1     = C-alpha_&amp;_r_92-94 ; group that is actually pulled<br>pull_init1      = 0<br>pull_rate1      = 0.0<br>

pull_k1         = 1000     ; kJ mol^-1 nm^-2<br>    <br>The original pull code with Distance geometry:<br><br>pull            = umbrella<br>pull_geometry   = distance<br>pull_dim        = N N Y<br>pull_start      = yes<br>

pull_ngroups    = 1<br>pull_group0     = POPC_POPS         ; reference group is bilayer<br>pull_group1     = C-alpha_&amp;_r_92-94 ; group that is actually pulled<br>pull_init1      = 0<br>pull_rate1      = 0.0<br>pull_k1         = 1000     ; kJ mol^-1 nm^-2<br>

<br><br>Regards,<br>Anni<br><br>... and thank&#39;s for your time.<br> </div></div>-- <br>************************************************<br>Anni Kauko, Ph.D.<br>Post Doctoral Researcher<br><br>Structural Bioinformatics Laboratory<br>

Dept. of Biosciences, Biochemistry<br>Åbo Akademi University<br>20520 Turku, Finland<br>phone:  <a href="tel:%2B358%20%280%292%20215%204006" value="+35822154006" target="_blank">+358 (0)2 215 4006</a><br>mobile: <a href="tel:%2B358%20%280%2950-576%208656" value="+358505768656" target="_blank">+358 (0)50-576 8656</a><br>
<br>************************************************<br>
</div>
</div><br><br>