[gmx-developers] Future developments

David van der Spoel spoel at xray.bmc.uu.se
Tue Feb 24 17:26:45 CET 2009


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

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, Ph.D., Professor of Biology
Molec. Biophys. group, Dept. of Cell & Molec. Biol., Uppsala University.
Box 596, 75124 Uppsala, Sweden. Phone:	+46184714205. Fax: +4618511755.
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