<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; ">Hi,<DIV><BR><DIV><DIV>On Apr 10, 2007, at 9:11 PM, Justin M. Shorb wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">Greetings,</FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">I have been running a modified version of gromacs 3.3 and would like to run two kernel loops: one which is 330 and one which is 300. In the src/gmxlib/nonbonded/nb_kerneltype.h file it strictly says to use wrapper routines that are included in the gmx_nonbonded.h file, which I cannot find. I assume that in switching versions the filename has changed, and perhaps was meant to point me to nonbonded.c ? Given that nb_kerneltype.h says that it is part of the gromacs 4.0 version, I would not be surprised if a version misnomer occured. However, I would be more than happy if you can point me to where this file should be located.</FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">In a similar light, is it possible to build and call two separate kernels within one run of gromacs, or would the tabulated files end up on top of each other? The nb_kerneltype.h seems to say you can use a build routine (probably setup_kernels() in nonbonded.c, but I want to make sure I'm not missing the gmx_nonbonded.h file somewhere).<SPAN class="Apple-converted-space"> </SPAN></FONT></DIV></BLOCKQUOTE><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Certainly. Each neighborlist is attached to a specific loop, but you can have as many neighborlists as you want. Your best option is likely to create the (different) neighborlists with the nonbonded setups they should have, and then call do_nonbonded() as declared in gromacs-x.y.z/include/nonbonded.h (sorry, the gmx_ prefix was lost when backported).</DIV><BR><BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">My plan currently is to use setup_kernels() to explicitly setup both kernels needed in the nb_kernel_list (which I believe is the list of kernels to be setup ranging from 1 to eNB_NBKERNEL_NR) and then simply force the kernel 300 to be created as well as the generic propagation kernel (typically 330). Then it should be a matter of choosing a different nrnb_ind index to run the alternate kernel in the do_nonbonded() routine.</FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; min-height: 14px; "><BR></DIV></BLOCKQUOTE><DIV><BR class="khtml-block-placeholder"></DIV>As you might already have found out, setup_kernels() is a really trivial routine that sets kernel pointers based primarily on your architecture (SSE/SSE2/Altivec/ia64/etc.), and assigns NULL to the solvent-optimized kernel pointers if that type of optimization isn't present.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>You can still call all kernels, although they might be generic (though optimized) C code if no acceleration has been implemented.</DIV><DIV> <BR><BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; min-height: 14px; "></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">Are there double counting things that should be taken into account? And more importantly, is there an efficient subroutine written for such a matter that is being overlooked (hidden in a *.h file somewhere)?</FONT></DIV></BLOCKQUOTE></DIV><BR></DIV><DIV>There should be a routine in src/mdlib/ns.c that initalizes the kernel index based on the interactions in a particular neighborlist.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Cheers,</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Erik</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV></BODY></HTML>