Thank you for your help. I attached the page of the form of potential. The equation (5.13) gives all the potential energy of neighbours of one ion in a truncation sphere.  Rc is cut-off. Since this potential depends on all the neighbours in a cut-off distance, I cannot give the pair interaction because in this method, only the total potential energy of one ion maks sense. In Ewald summation, both the real space and reciprocal space summation can be written as the summation of pair potential. But in wolf, I cannot do that.<br>
Since I cannot use Ewald without peoriodical boundary conditions while this Wolf method can, so I cannot simply use Gromacs to do my simulation. The question is which files needed to be modified if I want to add a new one? Is there any direct way? Or I should read all the whole code?<br>
Thank you very much.<br>Shuangxing Dai<br><br>
<div class="gmail_quote">On Mon, Mar 23, 2009 at 11:55 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 style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">
<div class="im">Shuangxing Dai wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">Hi, all,<br>   I was wondering how to add another electrostatic summation method--Wolf summation into Gromacs. Wolf summation is a treatment for summation of Coulombic energy. Since the formula of total potential energy for each ion is known, how to add this into Gromacs? According to Chapter 7, I should give the f(x) and f&#39;(x). The formula of f and f&#39; depends on the neighbours and varies from ion to ion, and I can not give f and f&#39; without calculation.<br>
</blockquote><br></div>If you have a functional form that depends only on pairwise distance and two atom types, then you can use the GROMACS table lookup machinery. 
<div class="im"><br><br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">Since Wolf method uses the same error function as Ewald summation, it might be easier and possible to implement Wolf into Gromacs. If so, which files need to be modified?<br>
Hope I put my question clearly. Thank you in advance for suggestions and help.<br></blockquote><br></div>Evaluating erfc is not the core issue - but GROMACS does the evaluation of terms for the direct-space Ewald contribution via table-lookup. The big deal is whether you need a custom non-bonded kernel, and then whether you can make it run fast. You might need to post a link to some details of this summation method to get useful help.<br>
<br>Mark<br>_______________________________________________<br>gmx-users mailing list    <a target="_blank" href="mailto:gmx-users@gromacs.org">gmx-users@gromacs.org</a><br><a target="_blank" href="http://www.gromacs.org/mailman/listinfo/gmx-users">http://www.gromacs.org/mailman/listinfo/gmx-users</a><br>
Please search the archive at <a target="_blank" href="http://www.gromacs.org/search">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 target="_blank" href="mailto:gmx-users-request@gromacs.org">gmx-users-request@gromacs.org</a>.<br>
Can&#39;t post? Read <a target="_blank" href="http://www.gromacs.org/mailing_lists/users.php">http://www.gromacs.org/mailing_lists/users.php</a><br></blockquote></div><br><br clear="all"><br>-- <br>Shuangxing Dai<br>