[gmx-developers] Future developments

David van der Spoel spoel at xray.bmc.uu.se
Tue Feb 24 22:25:34 CET 2009

David van der Spoel wrote:
> Mark Abraham wrote:
>> David van der Spoel wrote:
>>> Erik Lindahl wrote:
>>>> Hi,
>>>> On Feb 24, 2009, at 1:35 PM, David van der Spoel wrote:
>>>>> Hi,
>>>>> yesterday I put a question on the developer list on where to put a 
>>>>> new mini-library for statistics. Right now it is used only from the 
>>>>> analysis tools but it might also be used from other parts of the 
>>>>> code. Hence I suggested placement in gmxlib, or even directly in 
>>>>> src. If no one object I will do this later today.
>>>>> More in general, we should decide on the future structure of the 
>>>>> source tree, do we want a src directory with dozens of 
>>>>> subdirectories, or should it be hierarchical. Do we move to one 
>>>>> library or do we keep four different ones?
>>>> Long-term I'd say we want one library, but with proper namespaces :-)
>>> What does that mean in C?
>> Nothing good :-)
>> You can simulate it by requiring prefixes to function and/or variable 
>> names, so kernel__mdrunner(), but you need some convention to keep 
>> clear what bit is the namespace name and what is the function name.
>> You can also declare a struct full of pointers to functions which are 
>> only defined statically, so that you'd have to call kernel.mdrunner(). 
>> The kernel function arrays are essentially doing this already :-) The 
>> approach comes with the upside of being partially object-oriented.
> Either of these have the problem that it is not obvious what kernel 
> means :(. Very bad name indeed, I apologize. The nonbonded kernels are 
> in src/gmxlib/nonbonded and grompp.c and mdrun.c etc. are in src/kernel.
> I've put up draft coding standards at the wiki, with an example of an 
> abstract data type. Please edit as you see fit.
> http://wiki.gromacs.org/index.php/Category:Development#Coding_Standards

In addition I have added a section


which describes how the new library structure could look like and what 
future coding will be based on. I think I have faithfully reproduced the 
conclusions from our discussions at developer meetings, but in able to 
be able to start working on new stuff we have to discuss this now.

> By the way, domdec.c does not follow the indentation rules strictly :).
>> Mark
>> _______________________________________________
>> gmx-developers mailing list
>> gmx-developers at gromacs.org
>> http://www.gromacs.org/mailman/listinfo/gmx-developers
>> Please don't post (un)subscribe requests to the list. Use the www 
>> interface or send it to gmx-developers-request at gromacs.org.

David van der Spoel, PhD, Professor of Biology
Dept. of Cell and Molecular Biology, Uppsala University.
Husargatan 3, Box 596,  	75124 Uppsala, Sweden
phone:	46 18 471 4205		fax: 46 18 511 755
spoel at xray.bmc.uu.se	spoel at gromacs.org   http://folding.bmc.uu.se

More information about the gromacs.org_gmx-developers mailing list