I have a follow-up question:<br><div class="gmail_quote">On Thu, Oct 28, 2010 at 10:57 PM, Mark Abraham <span dir="ltr">&lt;<a href="mailto:Mark.Abraham@anu.edu.au">Mark.Abraham@anu.edu.au</a>&gt;</span> wrote:<br><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">On 29/10/2010 10:14 AM, Sai Pooja 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>
I want to modify the contribution to Interaction energy of different groups - say I have groups A and B and I want the energy to be scaled as E_AA + 0.1E_AB + 0.5*E_BB. Interaction parameters of each of these groups are set by a forcefield<br>


Now after multiple correspondence on the gromacs list I have concluded that there are 3 ways of doing this:<br>
1. Using tables - for this I would have to list non-bonded parameters for all atoms such that the combination rule and the table-potential is used. For the table for BB interaction, scale the Coloumb and VdW interactions in the tables by a factor of 0.5 and so on...<br>


</blockquote>
<br></div>
Sure. I think that for the above example, you&#39;d need only 2 (maybe 3) table files.<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;">
However, since tables would have to be supplied for pairs too (tablep), it may not be accurate to supply 6-12 tables with coulomb potential for these pairs. I am using CHARMM and the 1998 paper on CHARMM says that in some specific cases the 1-4 interactions many be scaled which makes me doubt this approach.<br>


</blockquote>
<br></div>
Yeah, something extra will be required here. Obviously, test and develop on a small toy system that you can compute by hand in a spreadsheet.<div class="im"><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
2. Forcefield parameters - By defining scaled [nonbonded_params] for all relevant atoms. This will change the VdW interactions, but not sure about the Coulomb interactions.<br>
</blockquote>
<br></div>
The Coulomb interactions are based on atomic charges, and there&#39;s no ready way to scale them differently for different interactions.<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;">
3. Modifying gromacs - by passing a parameter lambda to gromacs which scales the force/potential by a factor lambda when gromacs calculates force/potential.<br>
For implementing option 3, which programs in the gromacs package would be the bes tstarting points for editing the energy contributions of different groups/atoms?<br>
</blockquote>
<br></div>
I can think of two ways of approaching this. Efficiency requires that you use the energy group mechanism for your respective groups. Then you need to identify the generated non-bonded lists and do the necessary book-keeping to allocate scale factors to them. Then, either<br>


<br>
a) pass the scale factor all the way into the non-bonded kernels and use them suitably there, or<br>
b) create a copy of the force and energy arrays for each required scale factor, pass matching arrays into the appropriate kernels, and do the scaling on the respective arrays after all kernel contributions have been made, and then add the corresponding array elements.<br>


<br>
Either way, you&#39;ll need a sound understanding of the code in src/gmxlib/nonbonded.c (and the kernels it calls, and how its data structures get created in the neighbour-searching). Make a test system, like a dipeptide in a small box of water, with energy groups, and use a debugger to see how things work.<br>


<br>
a) is the easiest to develop. The kernels already have a &quot;user data&quot; pointer you can use, and it would be a fairly simple matter to adapt the generic C kernels to do your scaling. You will give up a lot of performance, however, unless you are prepared to adapt the hardware-optimized kernels similarly (not advised).<br>


<br>
b) will use somewhat more memory, have a smaller code-change footprint, keep essentially the same performance<div class="im"></div></blockquote><div> </div><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">Which of the two options will be more efficient -<br>
<br>
1. Using tables for different energy groups (as in the case of option 1) 
and then writing a separate script that runs Replica exchange (i.e. not 
using Gromacs replica exchange). This would mean that the script will 
check Epotential every 1-4ps as the case may be.<br>
<br>
2. Modifying Gromacs such that a user defined quantity(say lambda_user) scales the potential 
energy surface and the normal T based replica exchange can be used such that 
all replicas have a scaled potential energy function and are also at 
different temperatures.<br></div></blockquote><div><br>Pooja <br></div><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>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
As a more general question, how does one run a generalized Hamiltonian REM on gromacs?<br>
</blockquote>
<br></div>
You can&#39;t. GROMACS REMD requires a normal MD Hamiltonian supplied in a .tpr.<br>
<br>
Mark<br><font color="#888888">
-- <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>
</font></blockquote></div><br><br clear="all"><br>-- <br>Quaerendo Invenietis-Seek and you shall discover.<br>