X-Git-Url: https://hackdaworld.org/gitweb/?a=blobdiff_plain;f=moldyn.h;h=c6712ba41d1508fb8e359b627c71082e1307567a;hb=0d71b08d4382b23b8217342caf138cfce36226cc;hp=49ca0b28f92133cedf8da5ee7831734f5892da17;hpb=e763f6e3072fbbbc5ecf7345b989d7d29929a38f;p=physik%2Fposic.git diff --git a/moldyn.h b/moldyn.h index 49ca0b2..c6712ba 100644 --- a/moldyn.h +++ b/moldyn.h @@ -12,35 +12,50 @@ #include "random/random.h" #include "list/list.h" + /* datatypes */ + +/* the atom of the md simulation */ + typedef struct s_atom { - t_3dvec r; /* positions */ - t_3dvec v; /* velocities */ - t_3dvec f; /* forces */ - int element; /* number of element in pse */ - double mass; /* atom mass */ + t_3dvec r; /* position */ + t_3dvec v; /* velocity */ + t_3dvec f; /* force */ + int element; /* number of element in pse */ + double mass; /* atom mass */ + unsigned char attr; /* attributes */ } t_atom; +#define ATOM_ATTR_FP 0x01 /* fixed position (bulk material) */ +#define ATOM_ATTR_HB 0x02 /* coupled to heat bath (velocity scaling) */ + +/* cell lists */ + typedef struct s_linkcell { - int listfd; - int nx,ny,nz; - int cells; - double x,y,z; - t_list *subcell; + int nx,ny,nz; /* amount of cells in x, y and z direction */ + int cells; /* total amount of cells */ + double len; /* prefered cell edge length */ + double x,y,z; /* the actual cell lengthes */ + t_list *subcell; /* pointer to the cell lists */ + int dnlc; /* direct neighbour lists counter */ } t_linkcell; #include "visual/visual.h" +# moldyn properties structure */ + typedef struct s_moldyn { - /* atoms, amount, dimensions */ - int count; - t_atom *atom; - t_3dvec dim; + + int count; /* total amount of atoms */ + t_atom *atom; /* pointer to the atoms */ + t_3dvec dim; /* dimensions of the simulation volume */ /* potential, force & parameters */ + + /* potential force funtion created by the user */ int (*potential_force_function)(struct s_moldyn *moldyn); - void *pot_params; - /* cut off radius */ + void *pot_params; /* parameters describing the potential */ + double cutoff; double cutoff_square; /* linked list / cell method */