Hello again<br><br>Still trying to get this carbonate forcefield to work with gromacs.  I now know that the tables and so on are being read in correctly as I can get gromacs to reproduce the energies that I get for the various terms when I calculate them by hand/with a separate program.  There is stilla a problem with the charge groups however.  As when I attempt to split up the atoms in the water molecule the simulation fails.  Again checking that I am doing this correctly I would replace:<br>
<br>;       at type       res nr  res name  at name       cg nr     charge     mass<br>1       amber99_61      1       SOL      OW            1       0        16.00000<br>2       amber99_60      1       SOL     HW2            1       0.52422   1.00800<br>
3       amber99_60      1       SOL     HW3            1       0.52422   1.00800<br>4       MW                  1       SOL     MW4           1      -1.04844   0.00000<br><br>with<br><br>;       at type       res nr  res name  at name       cg nr     charge     mass<br>

1       amber99_61      1       SOL      OW            1       0        16.00000<br>
2       amber99_60      1       SOL     HW2            2       0.52422   1.00800<br>
3       amber99_60      1       SOL     HW3            3       0.52422   1.00800<br>
4       MW                  1       SOL     MW4           4      -1.04844   0.00000<br><br>The problem I get (even if I just run water without any carbonate/tabulated potentials) if I do the above is that the settles algorithm fails.<br>
<br>I&#39;m obviously missing something fundamental - I&#39;m not even sure that cg nr stands for the charge group.  Any help would be greatly appreciated.<br><br>Gareth<br><br><div class="gmail_quote">On Thu, Mar 25, 2010 at 11:07 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="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="h5">On 26/03/2010 7:03 AM, Gareth Tribello wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello again<br>
<br>
I have tried to do as you suggest and use tables but I have a new<br>
problem.  First let me describe my process and then you can let me know<br>
if there is anything wrong in the stages:<br>
<br>
OK so first you include the following directives into the mdp file:<br>
<br>
coulombtype = pme   (or whatever sort of coulomb interaction you are using)<br>
vdw-type = user<br>
<br>
energygrps          = Ca CCA OCA OW HW<br>
energygrp_table   = Ca OCA Ca CCA OCA OCA OCA OW OCA HW<br>
<br>
Gromacs is then (at some stage) going to look for a series of files called<br>
<br>
table.xvg  -   which is the default 6-12 Lennard Jones that will be used<br>
for most of the atoms<br>
table_Ca_OCA.xvg  - which are the Buckingham interactions between your<br>
various atom types.<br>
table_Ca_CCA.xvg<br>
table_OCA_OCA.xvg<br>
table_OCA_OW.xvg<br>
table_OCA_HW.xvg<br>
<br>
These files have the format (and contents) described in section 6.7 of<br>
the manual.  Finally, you define the various energy groups Ca, OCA and<br>
so on in your index.ndx file.<br>
<br>
The problem is that grompp gives me the following error:<br>
<br>
&quot;atoms 1 and 2 in charge group 1 of molecule type &#39;SOL&#39; are in different<br>
energy groups&quot;<br>
<br>
(incidentally these atoms 1 and 2 are OW and HW)<br>
<br>
Does this mean that I cannot use different tabulated potentials for<br>
different atoms in a molecules?  By which I mean that I can&#39;t use<br>
different tabulated potentials for the OW Ca and HW Ca interactions for<br>
example?<br>
</blockquote>
<br></div></div>
Charge groups are the fundamental unit GROMACS uses in constructing a simulation. Energy groups are the next &quot;higher&quot; layer in the data structures, and these must be sets of whole charge groups. With some electrostatics models, looping over charge groups whose charge is preferably an integer is essential for modelling correct behaviour. GROMACS does a complex sorting of all the interactions between charge groups into lists that allow it to iterate over charge groups and energy groups. A user table then gets applied to a whole intra- or inter- energy-group loop. Thus your attempt violates this precondition.<br>

<br>
However, PME does not require the use of charge groups for accurate results, since all inter-atomic electrostatic interactions get treated, regardless of distance. So you could decompose your water molecules into two charge groups, O and Hs. (Caveat, a near-brokenly bad PME approximation might get a little worse with arbitrary charge groups)<div class="im">
<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Final question, as its not clear to me from the manual, if you use a<br>
tabulated potential for Lennard Jones and you use mix type 2 (so are you<br>
are providing epsilon and sigma in the input rather than A and B) does<br>
gromacs still know that it has to manipulate the input parameters in<br>
order to get the coefficients of the (tabulated) g(r) and h(r)<br>
dispersion and repulsion functions (I mean the g(r) and h(r) defined in<br>
section 6.7 of the manual here)?  At the same time does it also know not<br>
to do anything to the parameters you input for the (tabulated)<br>
buckingham potentials (as for a buckingham you are providing A and C)?<br>
</blockquote>
<br></div>
I expect the point of the tables is that GROMACS just uses them per equation 6.23. Thus I&#39;d expect C6 and C12 in that equation to be constructed according to whatever combination rule is in force. If you&#39;ve specified them explicitly in the topology (see chapter 5), then they will not be constructed.<br>

<br>
You should be very careful to test your assumptions and deductions about how all this machinery is working. Do take the time to set up a tabulated version of a quick non-tabulated calculation to at least make sure you&#39;ve done the simple things right! To test the function of eq 6.23, do a non-table constructed-parameter calculation, a non-table topology-specified-parameter calculation, a table constructed-parameter calculation, etc. to be sure you understand what is going on - and that the code works right! Please consider contributing any insights to a wiki page on the GROMACS webpage.<br>

<br>
Before you go to all this work please consider my advice of last email. Unless you have an existing reason to expect some ad-hoc combination of different interaction functions to work well together, you may find that your best possible result is a correctly-functioning random number generator.<br>

<br>
Mark<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">
On Wed, Mar 24, 2010 at 2:25 AM, Mark Abraham &lt;<a href="mailto:mark.abraham@anu.edu.au" target="_blank">mark.abraham@anu.edu.au</a><br></div><div class="im">
&lt;mailto:<a href="mailto:mark.abraham@anu.edu.au" target="_blank">mark.abraham@anu.edu.au</a>&gt;&gt; wrote:<br>
<br>
<br>
<br>
    ----- Original Message -----<br>
    From: Matthew Watkins &lt;<a href="mailto:matthew.watkins@ucl.ac.uk" target="_blank">matthew.watkins@ucl.ac.uk</a><br></div><div class="im">
    &lt;mailto:<a href="mailto:matthew.watkins@ucl.ac.uk" target="_blank">matthew.watkins@ucl.ac.uk</a>&gt;&gt;<br>
    Date: Wednesday, March 24, 2010 2:59<br>
    Subject: Re: [gmx-users] Using lennard jones and buckingham terms<br>
         simultaneously<br>
    To: Discussion list for GROMACS users &lt;<a href="mailto:gmx-users@gromacs.org" target="_blank">gmx-users@gromacs.org</a><br></div><div class="im">
    &lt;mailto:<a href="mailto:gmx-users@gromacs.org" target="_blank">gmx-users@gromacs.org</a>&gt;&gt;<br>
<br>
     &gt; Hi Gareth,<br>
     &gt;<br>
     &gt; as Vitaly suggested tabulated potentials seem to be the only way<br>
     &gt; to go, it took me a while to get up to speed on the Gromacs way<br>
     &gt; of doing this, so get in touch if you wish.<br>
     &gt;<br>
     &gt; The tables for buck potentials need to include the standard 1/r6<br>
     &gt; term whilst what would be the 1/r12 term needs to contain exp(-<br>
     &gt; Bx.rho), the C6 and C12 coefficients can then be put in a<br>
     &gt; standard nonbonded section.  You&#39;ll need a separated table<br>
     &gt; for each pair of interactions that interact with buckingham<br>
     &gt; potential.  Each pair must be an energy group as well.<br>
     &gt;<br>
     &gt; If there is a simpler method I&#39;d love to hear it.<br>
<br>
    There&#39;s probably not a simpler method because it&#39;s not a widely-used<br>
    procedure. It shouldn&#39;t be used at all unless you have established<br>
    that the combination of functional forms is effective...<br>
<br>
    Mark<br>
    --<br>
    gmx-users mailing list <a href="mailto:gmx-users@gromacs.org" target="_blank">gmx-users@gromacs.org</a><br></div>
    &lt;mailto:<a href="mailto:gmx-users@gromacs.org" target="_blank">gmx-users@gromacs.org</a>&gt;<div class="im"><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/search" target="_blank">http://www.gromacs.org/search</a> before<br>
    posting!<br>
    Please don&#39;t post (un)subscribe requests to the list. Use the<br>
    www interface or send it to <a href="mailto:gmx-users-request@gromacs.org" target="_blank">gmx-users-request@gromacs.org</a><br></div>
    &lt;mailto:<a href="mailto:gmx-users-request@gromacs.org" target="_blank">gmx-users-request@gromacs.org</a>&gt;.<div class="im"><br>
    Can&#39;t post? Read <a href="http://www.gromacs.org/mailing_lists/users.php" target="_blank">http://www.gromacs.org/mailing_lists/users.php</a><br>
<br>
<br>
</div></blockquote>
-- <br><div><div></div><div class="h5">
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/search" target="_blank">http://www.gromacs.org/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/mailing_lists/users.php" target="_blank">http://www.gromacs.org/mailing_lists/users.php</a><br>
</div></div></blockquote></div><br>