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.
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.
The main loop calls
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()).
The epilog code handles end of run bookkeeping such as
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.