CoMD
A Mini-app for Co-Design of Classical Molecular Dynamics.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
CoMD Architecture

Program Flow

We have attempted to make the program flow in CoMD 1.1 as simple and transparent as possible. The main program consists of three blocks: prolog, main loop, and epilog.

Prolog

The job of the prolog is to initialize the simulation and prepare for the main loop. Notable tasks in the prolog include calling

In CoMD 1.1 all atomic structures are internally generated so there is no need to read large files with atom coordinate data.

Main Loop

The main loop calls

  • timestep(), the integrator to update particle positions,
  • printThings() to periodically prints simulation information

The timestep() function is the heart of the code as it choreographs updating the particle positions, along with computing forces (computeForce()) and communicating atoms between ranks (redistributeAtoms()).

Epilog

The epilog code handles end of run bookkeeping such as

Key Data Structures

Practically all data in CoMD belongs to the SimFlatSt structure. This includes:

Consult the individual pages for each of these structures to learn more. The descriptions in haloExchange.c and initLinkCells() are especially useful to understand how the atoms are commuicated between tasks and stored in link cells for fast pair finding.