X-Git-Url: https://hackdaworld.org/gitweb/?a=blobdiff_plain;f=moldyn.h;h=229074361363fb8d2601d92ef642c4825539735e;hb=e1080fc0dd66b0cf5b7715c5e99e7a34ac04a8cf;hp=83414dd09fc045b99f07bca932c5c855a0d6d96b;hpb=c40d54eb3e319b17b2f6174c4eddcfd6ee3a407b;p=physik%2Fposic.git diff --git a/moldyn.h b/moldyn.h index 83414dd..2290743 100644 --- a/moldyn.h +++ b/moldyn.h @@ -49,6 +49,8 @@ typedef struct s_atom { #define ATOM_ATTR_FP 0x01 /* fixed position (bulk material) */ #define ATOM_ATTR_HB 0x02 /* coupled to heat bath (velocity scaling) */ +#define ATOM_ATTR_VA 0x04 /* visualize this atom */ +#define ATOM_ATTR_VB 0x08 /* visualize the bond of this atom */ #define ATOM_ATTR_1BP 0x10 /* single paricle potential */ #define ATOM_ATTR_2BP 0x20 /* pair potential */ @@ -60,10 +62,16 @@ typedef struct s_linkcell { int cells; /* total amount of cells */ double len; /* prefered cell edge length */ double x,y,z; /* the actual cell lengthes */ +#ifdef STATIC_LISTS + int **subcell; /* pointer to the cell lists */ +#else t_list *subcell; /* pointer to the cell lists */ +#endif int dnlc; /* direct neighbour lists counter */ } t_linkcell; +#define MAX_ATOMS_PER_LIST 20 + /* moldyn schedule structure */ typedef struct s_moldyn_schedule { int count; @@ -109,6 +117,7 @@ typedef struct s_moldyn { double cutoff; /* cutoff radius */ double cutoff_square; /* square of the cutoff radius */ double nnd; /* nearest neighbour distance (optional) */ + double bondlen[3]; /* bond lengthes (only 2 atomic systems) */ t_linkcell lc; /* linked cell list interface */ @@ -395,6 +404,7 @@ int moldyn_shutdown(t_moldyn *moldyn); int set_int_alg(t_moldyn *moldyn,u8 algo); int set_cutoff(t_moldyn *moldyn,double cutoff); +int set_bondlen(t_moldyn *moldyn,double b0,double b1,double bm); int set_temperature(t_moldyn *moldyn,double t_ref); int set_pressure(t_moldyn *moldyn,double p_ref); int set_pt_scale(t_moldyn *moldyn,u8 ptype,double ptc,u8 ttype,double ttc); @@ -450,7 +460,11 @@ double estimate_time_step(t_moldyn *moldyn,double nn_dist); int link_cell_init(t_moldyn *moldyn,u8 vol); int link_cell_update(t_moldyn *moldyn); +#ifdef STATIC_LISTS +int link_cell_neighbour_index(t_moldyn *moldyn,int i,int j,int k,int **cell); +#else int link_cell_neighbour_index(t_moldyn *moldyn,int i,int j,int k,t_list *cell); +#endif int link_cell_shutdown(t_moldyn *moldyn); typedef int (*set_hook)(void *,void *); @@ -471,10 +485,15 @@ int check_per_bound(t_moldyn *moldyn,t_3dvec *a); int moldyn_bc_check(t_moldyn *moldyn); +int moldyn_read_save_file(t_moldyn *moldyn,char *file); +int moldyn_load(t_moldyn *moldyn); int get_line(int fd,char *line,int max); -int visual_init(t_visual *v,char *filebase); -int visual_atoms(t_visual *v,double time,t_atom *atom,int n); +int pair_correlation_init(t_moldyn *moldyn,double dr); +int calculate_pair_correlation(t_moldyn *moldyn,double dr,void *ptr); + +int visual_init(t_moldyn *moldyn,char *filebase); +int visual_atoms(t_moldyn *moldyn); #endif