Thank you Justin and Emanuel for helpful remarks. I am a little confused what is the proper detailed procedure to perform FE using TI and BAR when decoupling nonboded terms separately. I write down my understanding and would appreciate your comments.<br>
<br>Summary:<br><br>TI: One needs to vary init_lambda (=native) from 0 to 10 (say 0.1 increments) and obtain 11 xvg files. (for simultaneous decoupling)<br><br>1- Here  foreign_lambda does not make sense as it pertains to BAR.<br>
2- If one intends to do separate decoupling, for each native labmda run two times with the appropriate couple-lambda0  &amp;  couple-lambda1. For each native lambda we end up with two xvg files. coul-0 to coul-11 and vdw-0 to vdw-11. (actually I am not sure what is easiest way of summing up two columns from coul-0 +  vdw-0 ... aside from EXCEL..). Move the total sum at each point to the file total-0 to total 11. Run g_average on each total-? and perform numerical integration to get delta G or H.<br>
<br>BAR: Run 2*11 times with the following settings for appropriate couple-lambda0  &amp;  couple-lambda1 to get coul-0 to coul-11 and vdw-0 to vdw-11.<br><br>Interval 1:<br>
init_lambda = 0<br>
foreign_lambda = 0.05<br>
<br>
Interval 2:<br>
init_lambda = 0.05<br>
foreign_lambda = 0 0.1<br>
<br>
Interval 3:<br>
init_lambda = 0.1<br>
foreign_lambda = 0.05 0.15<br><br><br>Add up coul-0+vdw-0 &gt; total-0  (again I dont know the proper tool for adding up columns)<br>.<br>.                                          (for intermedaite steps there are 3 columns to sum. one before and after native lambda)<br>
.                               <br>                                        &gt; total 11<br>
<br><br>Run g_bar on total-?.xvg files.<br><br><br>1- I am wondering for each interval say <br><br>Interval 2:<br>

init_lambda = 0.05 <br>

foreign_lambda = 0 0.1<br><br>how this foreign_lambda 0 is related to the init_lambda = 0 from interval 1 and the same for  foreign_lambda = 0.1 in interval 2 and init_lambda = 0.1 in interval 3? Is there a physical meaning?<br>
<br>2- If one needs to run multiple native lambda for both methods what is the adnatage of BAR over TI. I thought using foreign_lambda facilitates FE calculations in terms of amount of work but it seems it is only a different method (BAR).<br>
<br>Thanks for your help.<br><br><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;"><div class="im"><br>
<br>
Emanuel Birru wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Yeah, I am using IT and do analyse the result using another method not<br>
bar. But I used g_bar when I was using the foreign_lambda and simulate<br>
all in a single file. I have already sent my suspect few weeks back. <br>
</blockquote>
<br></div>
Is there an active redmine issue?  I cannot find any post from you in the list archive from the last few months.  What is the issue?<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
I am a bit confused on the g_bar part, when it says -f expects multiple<br>
dhdl files. Do we need to run still multiple independent simulations<br>
using different foreign_lambda values? I do not see why we should run<br>
independent simulations, if we use for couple-lambda0 and couple-lambda1<br>
vdw-q and none respectively.<br>
<br>
</blockquote>
<br></div>
As I mentioned to the OP of this thread, simultaneous (de)coupling of vdW and Coulombic interactions is not stable.  The output energies are not trustworthy, in my experience due to physically unreasonable configurations and the potential for numerical singularities.<br>

<br>
The multiple files that g_bar expects are not simply from two separate processes, however.  It expects dhdl.xvg files from multiple values of native lambda that have corresponding foreign_lambda values in it, i.e.:<br>
<br>
Interval 1:<br>
init_lambda = 0<br>
foreign_lambda = 0.05<br>
<br>
Interval 2:<br>
init_lambda = 0.05<br>
foreign_lambda = 0 0.1<br>
<br>
Interval 3:<br>
init_lambda = 0.1<br>
foreign_lambda = 0.05 0.15<br>
<br>
etc.<br><font color="#888888">
<br>
-Justin</font><div><div></div><div class="h5"><br>
<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
For IT I am using 4.5.3 and it is working good so far.<br>
<br>
Cheers,<br>
<br>
-----Original Message-----<br>
From: <a href="mailto:gmx-users-bounces@gromacs.org" target="_blank">gmx-users-bounces@gromacs.org</a><br>
[mailto:<a href="mailto:gmx-users-bounces@gromacs.org" target="_blank">gmx-users-bounces@gromacs.org</a>] On Behalf Of Justin A. Lemkul<br>
Sent: Thursday, 24 March 2011 1:36 PM<br>
To: Gromacs Users&#39; List<br>
Subject: Re: [gmx-users] no output dgdl file<br>
<br>
<br>
<br>
Emanuel Birru wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi Justin,<br>
<br>
It good that the issue is solved. As per my experience if you want to<br>
</blockquote>
do<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
a series of simulations it is not necessary to use foreign_lambda, for<br>
each simulation we can give different lambda values starting from 0 to<br>
1( from fully interactive to non-interactive) no need of foreign_lamda<br>
</blockquote>
<br>
This is certainly a viable method, but it is thermodynamic integration,<br>
not BAR.   The purpose of lambda/foreign_lambda is to use the BAR method.<br>
<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
and certainly no need of generating dhdl.xvg to calculate FE. I think<br>
-dhdl is an optional it will not be generated just because<br>
</blockquote>
&quot;free_energy<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
= yes&quot; is present. The problem with the 4.5.3 is not the problem of<br>
</blockquote>
<br>
It has always been my experience (in versions 3.3.3 and 4.5.3) that if<br>
the free energy code is activated, this file is written.  I never specify the<br>
file names independently.<br>
<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
generating dhdl data by using single simulation with all<br>
</blockquote>
foreign_lambda<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
values. The problem is with g_bar, when I tried to analyse the<br>
</blockquote>
dhdl.xvg<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
output (with all the necessary data in it) using g_bar, it doesn&#39;t<br>
function properly. The error is related with the source code. I guess<br>
</blockquote>
<br>
If you suspect a bug, you should report it.  If you don&#39;t use<br>
foreign_lambda, you can&#39;t use the BAR method.  You&#39;re doing TI, not BAR.  They are<br>
fundamentally different, and the analysis for TI is done independently of any Gromacs<br>
tool.<br>
<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
the main advantage of using 4.5.3 to calculated FE using<br>
</blockquote>
foreign_lambda<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
was to avoid running series of independent simulations. May be it is<br>
solved on the newer version 4.5.4., didn&#39;t try it yet.<br>
<br>
</blockquote>
<br>
Version 4.5.3 has worked just fine for all free energy calculations I<br>
have done.    Perhaps BAR can be done with a single simulation and multiple<br>
foreign_lambda, but that was not my understanding of the proper procedure (based on some<br>
posts by developers a few months ago).  Multiple simulations, each at &quot;native&quot;<br>
lambda, are conducted with values of foreign_lambda above and below the native<br>
value at some lambda spacing (except for end points).  Invoking g_bar gives the<br>
total DeltaG over all lambda intervals according to the BAR algorithm.<br>
<br>
-Justin<br>
<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Cheers,<br>
<br>
  <br>
-----Original Message-----<br>
From: <a href="mailto:gmx-users-bounces@gromacs.org" target="_blank">gmx-users-bounces@gromacs.org</a><br>
[mailto:<a href="mailto:gmx-users-bounces@gromacs.org" target="_blank">gmx-users-bounces@gromacs.org</a>] On Behalf Of Justin A. Lemkul<br>
Sent: Thursday, 24 March 2011 12:54 PM<br>
To: Gromacs Users&#39; List<br>
Subject: Re: [gmx-users] no output dgdl file<br>
<br>
<br>
<br>
Emanuel Birru wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi Justin,<br>
<br>
Sure what you wrote is correct, what I am trying to tell to him is<br>
</blockquote>
that<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
if he has more than one foreign lambda it is better to put all of<br>
</blockquote></blockquote>
them<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

as it is not logical to use only one foreign lambda to calculate FE<br>
</blockquote></blockquote>
(0<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
-<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
0.1) and he doesn&#39;t have delta lambda too. -Deffnm is sure all about<br>
</blockquote>
You can do a series of simulations at many values of lambda, each<br>
specifying their own foreign_lambda.  It seems to me that this method would be<br>
</blockquote>
more<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
reliable, but I have not tested simply attempting a single simulation<br>
with all values of foreign_lambda.  Using delta_lambda is (from all that I have<br>
read) not reliable, as there are known issues with &quot;slow growth&quot; methods.<br>
<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
file names but it also generate all the necessary files including the<br>
xvg&#39;s without the need of using -dhdl.<br>
<br>
</blockquote>
Whether or not one specifies -dhdl or -deffnm is independent of<br>
</blockquote>
whether<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
or not dhdl.xvg (or whatever name) is written.  It is controlled purely by<br>
</blockquote>
the<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
presence of &quot;free_energy = yes&quot; in the input file.<br>
<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
I would appreciate if you come up with a new solution for him.<br>
<br>
</blockquote>
As reported by the OP, this issue had been effectively solved already:<br>
<br>
<a href="http://lists.gromacs.org/pipermail/gmx-users/2011-March/059631.html" target="_blank">http://lists.gromacs.org/pipermail/gmx-users/2011-March/059631.html</a><br>
<br>
-Justin<br>
<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Cheers <br>
-----Original Message-----<br>
From: <a href="mailto:gmx-users-bounces@gromacs.org" target="_blank">gmx-users-bounces@gromacs.org</a><br>
[mailto:<a href="mailto:gmx-users-bounces@gromacs.org" target="_blank">gmx-users-bounces@gromacs.org</a>] On Behalf Of Justin A. Lemkul<br>
Sent: Thursday, 24 March 2011 12:35 PM<br>
To: Discussion list for GROMACS users<br>
Subject: Re: [gmx-users] no output dgdl file<br>
<br>
<br>
<br>
Emanuel Birru wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi,<br>
<br>
 <br>
Your foreign_lambda value is only one, please put all your lambda<br>
</blockquote>
values <br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
separated by space and you will get the dhdl file. And make sure<br>
</blockquote></blockquote></blockquote>
that<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

This is not required.  You can specify as many or as few<br>
</blockquote>
foreign_lambda<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
values as you like.<br>
<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
you use -deffnm when you run your mdrun to get all the out put files<br>
</blockquote>
by <br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
default.<br>
<br>
</blockquote>
The -deffnm flag controls the names of the files, not which ones are<br>
written.<br>
<br>
-Justin<br>
<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
 <br>
Cheers,<br>
<br>
 <br>
*From:* <a href="mailto:gmx-users-bounces@gromacs.org" target="_blank">gmx-users-bounces@gromacs.org</a> [mailto:<a href="mailto:gmx-users-bounces@gromacs.org" target="_blank">gmx-users-bounces@gromacs.org</a>] *On Behalf Of *Moeed<br>

*Sent:* Thursday, 24 March 2011 4:13 AM<br>
*To:* <a href="mailto:gmx-users@gromacs.org" target="_blank">gmx-users@gromacs.org</a><br>
*Subject:* [gmx-users] no output dgdl file<br>
<br>
 <br>
Hello,<br>
<br>
I have a little problem with FE output file. Below is the settings<br>
</blockquote></blockquote>
and<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

also I am including -dgdl in the command I issue but no dgdl (or<br>
</blockquote></blockquote>
dhdl)<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

file generates. I dont figure where the problem lies ! (version<br>
</blockquote>
4.5.3).<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
free_energy          =   yes<br>
init_lambda          =   0 delta_lambda         =   0<br>
sc_alpha             =   0.5<br>
sc-power             =   1<br>
sc_sigma             =   0.3<br>
foreign_lambda       =   0.1<br>
dhdl_derivatives     =   yes<br>
couple-moltype       =   Polymer<br>
couple-lambda0       =   vdw-q   couple-lambda1       =   none<br>
couple-intramol      =   yes<br>
nstdhdl              =   10<br>
separate_dhdl_file   =   yes<br>
dh_hist_size         =   0<br>
dh_hist_spacing      =   0.1<br>
<br>
Best<br>
<br>
</blockquote></blockquote></blockquote>
<br>
</blockquote>
<br>
-- <br>
========================================<br>
<br>
Justin A. Lemkul<br>
Ph.D. Candidate<br>
ICTAS Doctoral Scholar<br>
MILES-IGERT Trainee<br>
Department of Biochemistry<br>
Virginia Tech<br>
Blacksburg, VA<br>
jalemkul[at]<a href="http://vt.edu" target="_blank">vt.edu</a> | (540) 231-9080<br>
<a href="http://www.bevanlab.biochem.vt.edu/Pages/Personal/justin" target="_blank">http://www.bevanlab.biochem.vt.edu/Pages/Personal/justin</a><br>
<br>
========================================<br>
-- <br>
gmx-users mailing list    <a href="mailto:gmx-users@gromacs.org" target="_blank">gmx-users@gromacs.org</a><br>
<a href="http://lists.gromacs.org/mailman/listinfo/gmx-users" target="_blank">http://lists.gromacs.org/mailman/listinfo/gmx-users</a><br>
Please search the archive at <a href="http://www.gromacs.org/Support/Mailing_Lists/Search" target="_blank">http://www.gromacs.org/Support/Mailing_Lists/Search</a> before posting!<br>
Please don&#39;t post (un)subscribe requests to the list. Use the www interface or send it to <a href="mailto:gmx-users-request@gromacs.org" target="_blank">gmx-users-request@gromacs.org</a>.<br>
Can&#39;t post? Read <a href="http://www.gromacs.org/Support/Mailing_Lists" target="_blank">http://www.gromacs.org/Support/Mailing_Lists</a><br>
</div></div></blockquote></div><br>