Page last modified 20:14, 15 Nov 2009 by JLemkul?

Programming Guide

From $1

Table of contents

Coding Standards

In order to make the GROMACS code more accessible to non-experts we are working on a set of rules for new code, that will successively be implemented for existing code as well.

Library Structure

An important point of confusion for many would-be developers is the structure of the code. Which file resides in which directory and why? Why does code from the gmxlib refer to functions from mdlib? Why is there pure MD code in gmxlib? Many of these issues are due to history, decades of sloppy programming. But now we know better. Please have a look at the Library Structure page, and contribute to the discussion.

Projects

Here a number of projects are described which we would like volunteers to work on. Since these are new algorithms and extensions to the current code they have to be based on the latest CVS code. If you are interested in helping out, please send email to the gmx-developers mailing list and note your interest on the discussion page for this wiki entry or the special entry for each topic. It is a good idea to thoroughly discuss things with other developers before starting to code. An estimate of the amount of time for each project is given for an experienced C developer. To make the deal somewhat sweeter, some of these projects may be publishable if completed successfully, and one or more of the core developers will probably be interested to make that happen.

A number of "other projects" do not require C-programming, but they do require thorough GROMACS and/or other specialist knowledge.

Item Target Version Description Time Estimate Status
    CODE RESTRUCTURING    
Comments in code 4.1 Restructuring the comments in the code using the http://www.doxygen.org system. Boring but very useful 1 month TBD
XTC Library 4.1 Fork off the code for reading XDR based files like XTC, EDR, TRR to a separate library, probably to be licensed under a less restrictive license. 1 week Assigned
Abstract Types 4.x Change existing structure types to be abstract. 2 weeks TBD
    MOLECULAR DYNAMICS    
Fast multipole 4.x Implementation of a parallel Fast Multipole solver for computing electrostatic interactions into GROMACS. 6 weeks TBD
FFTW-3D 4.1 Implementation of 3D decomposition for FFTs (needed for the PME algorithm). 1 month Assigned
Free Energy Perturbation 4.x Add the ability to evaluate the energy at a list of alternate lambda values specified in the mdp file every (nstlambda?) steps, where nstlambda or similar is a new flag that specifies how often these should be evaluated. Energies should be dumped to energy file. ? TBD
Neighborlist-Update 4.0 Dynamically updated neighborlists. Instead of updating every nstlist, regardless of whether there was movement out or in of the cutoff distance, the distance each particle moves can be calculated, and then updating occurs if any particle has moved too far. < 1 week Done
Integrator 4.x Implement better MD integrators than Leap-Frog 1 month TBD
Monte Carlo 4.x Implement a Monte Carlo integrator. 1 month TBD
Docking 4.x Implement a docking engine 2 months TBD
Implicit Solvent 4.1 Implement options for implicit solvent simulations. 4 months Done
Barostat 4.x Implement better functioning Rahman-Parinello barostat ? TBD
Interactive Molecular Dynamics 4.x Implement the IMD protocol into Gromacs. ? Assigned
Position Restraints Development 4.x Implement new position restraint algorithms 2 weeks TBD
PME-vdW 4.x Implement the PME algorithm for long-range vdW interactions 1 month TBD
    UTILITIES    
Edit traj 4.1 Merging trjconv, trjcat and trjorder into one program. The combined program will be rather complicated and it would be good to make the code a whole lot more modular 2 weeks TBD
Edit box 4.1 Merging genbox, genion, editconf and genconf into one program. The combined program will be rather complicated and usability needs to be improved 2 weeks TBD
GUI-devel 4.x Extend/implement (part of) a graphical user interface (GUI) for GROMACS 2-6 months TBD
    PREPROCESSING    
Genvsites 4.x Write a program that generates virtual sites based on a topology (.top) file and writes another topology 4 weeks Assigned
XML-devel 4.x Implementation of the XML specification 2 months Assigned
Topology Generation 4.x Extension of the x2top program for different force fields, mainly non-programming chores 1 month Assigned
Topology Handling 4.x Modification of the GROMACS topology/coordinate file handling/atom numbering so that distance/angle/dihedral restraints can be used between "molecules" (in the topology sense); currently they can only be used between atoms within the same "molecule" (although not all components of the "molecule" need to be connected) ? Assigned
MDP Chaining 4.x Make it possible to have a few mdp files that are run sequentially on the same topology, e.g. to allow a complete E.M., P.R., M.D. protocol in a single simulation. Obviously this can be scripted as well, but that gives quite a mess of files. ? TBD
Force-Field Organization 5.0 Organize the force field files in a more logical way using a new directory structure 1 week TBD
Cpp replacement 4.0 write a small code snippet to replace the C-preprocessor call in grompp 1 week Done
Extend tpbconv 4.1 Permit tpbconv to act on multiple files with -extend etc. to suit REMD and multiple MD (this overlaps with Multi I/O below). 2 weeks TBD
Modularize pdb2gmx 4.1 Divide pdb2gmx into a set of routines that perform the separate functionality. 2 weeks TBD
    ANALYSIS    
Raw matrix data output 4.x Allow output of raw data from analysis tools, rather than xpm files 1 day TBD
Support for GNUplot 4.x Allow output of results to GNUplot rather than xmgrace (or data without formatting at all). This includes checking analysis programs that may write xmgrace style command straight to a file 2 days TBD
Multi I/O 4.1 Porting the routines that give trjcat and eneconv the possibility to read in many files (e.g. trjcat -f *.xtc -o out.xtc) to all analysis routines 2 weeks TBD
Analysis Library 4.x Modularizing the analysis tools such that one can e.g. compute a radial distribution function for a given set of coordinates. This means separating core of the analysis tools from the main function 1 month TBD
Analysis Embedding 4.x Following the previous project: make the analysis library a true callable library for interfacing with scripting languages such as Perl and Python 1 month TBD
Dynamic Indices 4.x Replacing index files by make_ndx queries that are executed for each new coordinate set 1 week Assigned
DSSP 4.x Implement a native DSSP algorithm (secondary structure calculation) 2 weeks TBD
    OTHER PROJECTS    
GUI 4.x Investigate status of different GUI projects for GROMACS and report to the wiki 2 weeks TBD
XML-spec 5.0 Development of an XML specification for the description of molecules and input for computer simulations 1-2 months TBD
Test-set 3.3.2 Development of a more rigorous test set, for mdrun and all other programs 4 weeks Done
Test-set 4.0 Update the Test Set for 4.0 2 weeks Done
Web maintenance Any Clean up the GROMACS website (running under Joomla), plus subsequent maintenance 2 weeks TBD
Tutorial writing Any Writing new tutorials about different topics, plus subsequent maintenance 1 week TBD
Wiki FAQ Any Add more FAQs, plus subsequent maintenance 1 week TBD
Teaching material Any Work on material for teaching MD at different levels of sophistication weeks to months TBD

Wish list

  • Ability to supply a .ndx group of arbitrary size to pull_pbcatom0. When more than one atom is included in this group, each atom in the group is used in turn to create the image of pull_group0 and is assigned a "score" = sum of distances to other atoms in the group. The atom with the lowest "score" is used as pull_pbcatom0 for that integration step. This will allow smaller box sizes when pull_group0 represents something dynamic like a detergent micelle where even the distal carbon of the acyl-chain may spend a non-zero time on the surface of the semi-spherical micelle (far from the center). Since this may affect performance, one might also add new .mdp option pull_pbcatom_selection_frequency that controls how often (in integration steps) this test is performed. Note that even if the performance cost is 5-10%, this will be greatly overwhelmed by the time savings due to the ability to use a smaller unit cell.
  • Alternative option that may have better performance: Addition of a new mdp option pull_pbcatom_two_iterations that, when selected, has the following behaviour. The first iteration is exactly the same as the current implementation. However, after each atom of the pull_group0 has been put in its proper image, the geometrical center of mass of that group is determined (no additional pbc here) and used as the central point for one more round of pbc_group0 atom placement. In cases where only a few atoms were placed in an undesired image during the first round, this procedure should correct that.
  • Two new .mdp options: 1) "nstfrcout" that defines the number of steps between outputting selected forces to a special file = "traj.frc". and 2) "force_grps" that controls output selection to the new file = "traj.frc". Note: This is intended to have no effect on nstfout.
  • The ability to make more than one .xtc file with different output selections nstxtcout, xtc_grps, xtc_precision, is desirable for example when one wants to save a small group of selected coordinates every step for processing and the entire coordinates once and a while for later system analysis.
  • Adding Canonical sampling through velocity rescaling (G. Bussi, D. Donadio, M. Parrinello J. Chem. Phys. 2007, 126 (1), Art. No. 014101)
  • Adding -nopbc option to g_dist and g_mindist.
  • The ability to read in multiple .ppa files, for example to allow one pull-code implementation of an umbrella in absolute coordinates and one relative to a reference group, or one umbrella and one constraint and one afm, etc.
  • Since the pull code is now integrated into the mdp file in gromacs 4, this request now has a different format, but the functionality requested remains the same.
  • Adding "-dt" flag to gmxdump which reports the time step of a trajectory and exits immediately. Very useful!

Developer resources

Tags:
 
Images (0)
 
Comments (0)