Serial md code
/* system.h - defines the system_t type and its mpi type */
#ifndef SYSTEMH
#define SYSTEMH
#include <stddef.h>
#include <stdbool.h>
typedef struct system_t {
long long Ntot; /* number of particles in the full domain (parameter) */
double rho; /* density of the system (parameter)*/
double T0; /* initial temperature (parameter) */
double runtime; /* how long to run (parameter) */
double dt; /* duration of single time step (parameter) */
long seed; /* global random seed (parameter) */
double equil; /* when to start measuring energies etc. (parameter)*/
bool usecells; /* 1 if cells are to be used (parameter) */
double L; /* length of the box (derived parameter) */
int N; /* number of particles in the subdomain*/
double K; /* kinetic energy in the subdomain*/
double U; /* potential energy in the subdomain */
/* for cell structure: */
int totnc[3]; /* total number of cells in the whole system */
int nc[3]; /* number of cells in the subdomain in each direction */
int ncprod; /* product of nc[3], i.e., total number of cells in this subdomain */
int minc[3]; /* first cell index in 3 dimensions in the subdomain */
int maxc[3]; /* last cell index in 3 dimensions in the subdomain */
double cellsize[3]; /* size of the cells in each direction */
int* start_of_cell; /* position in atom[] of the first particles in each cell (1d using a super index) */
int* n_in_cell; /* number of particles in each cell (1d using a super index) (i.e., subsequent n_in_cell-1 particles are also in that cell */
} system_t;
bool sanity_check(system_t* sys, double rc, bool verbose);
#endif