[gmx-developers] Writing the electric field (and its gradient) on particular atoms during an MD simulation

Erik Lindahl lindahl at cbr.su.se
Wed Apr 16 13:06:39 CEST 2008


On Apr 16, 2008, at 3:04 AM, Mark Abraham wrote:

> John Chodera wrote:
>> Mark suggests looking at the .c files in
>> src/gmxlib/nonbonded/nb_kernel/, but I admit that all of these look
>> like gibberish to me.  Is there some sort of guide to the  
>> construction
>> of these nonbonded kernels, and what all these variable names mean?
> Yes and no. The nb_kernelxxx_c.c files are auto-generated by the  
> mk_nb*c group of files in the same directory, so the authoritative  
> source is there. You can get comments in these output files by re- 
> running mk_nb with the -comment flag (see -h flag for help). The xxx  
> values indicate various options one might choose for the inner loop  
> evaluations. There are comments at the head of each nb_kernelxxx_c.c  
> file that describe these options. Pick one of the files that seem  
> useful (e.g. xxx == 100 is probably a good idea) and read over the  
> commented version.

Right. The problem is that while the modifications are  
straightforward, they would have to go inside the single most executed  
loop in the entire program, so it would kill your performance - both  
because of extra calculations, and because you're not using SSE  
kernels anymore.

However, if you modify the C kernels to calculate it, it should be  
easy to only call this version every N steps, and use the SSE kernels  
by default.



More information about the gromacs.org_gmx-developers mailing list