2 * mdrun.h - mdrun header file
4 * author: Frank Zirkelbach <frank.zirkelbach@physik.uni-augsburg.de>
11 #include <sys/types.h>
18 /* main molecular dynamics api */
22 #include "list/list.h"
25 #include "potentials/harmonic_oscillator.h"
26 #include "potentials/lennard_jones.h"
27 #include "potentials/albe.h"
29 #include "potentials/tersoff_orig.h"
31 #include "potentials/tersoff.h"
35 * datatypes & definitions
38 typedef struct s_stage {
44 #define STAGE_DISPLACE_ATOM 0x00
45 #define STAGE_INSERT_ATOMS 0x01
46 #define STAGE_INSERT_MIXED_ATOMS 0x02
47 #define STAGE_CONTINUE 0x03
48 #define STAGE_ANNEAL 0x04
49 #define STAGE_CHAATTR 0x05
50 #define STAGE_CHSATTR 0x06
51 #define STAGE_SET_TEMP 0x07
52 #define STAGE_SET_TIMESTEP 0x08
53 #define STAGE_FILL 0x09
54 #define STAGE_THERMAL_INIT 0x10
55 #define STAGE_DEL_ATOMS 0x11
56 #define STAGE_MODIFY_ATOMS 0x12
57 #define STAGE_CRT 0x13
59 typedef struct s_mdrun {
60 char cfile[128]; // config file
62 char continue_file[128]; // moldyn save file to continue
64 u8 intalgo; // integration algorithm
65 double timestep; // timestep
67 u8 potential; // potential
68 double cutoff; // cutoff radius
69 double nnd; // next neighbour distance
71 t_3dvec dim; // simulation volume
72 u8 pbcx; // periodic boundary conditions
76 int element1; // element 1
77 int element2; // element 2
79 double lc; // lattice constant
80 u8 lattice; // type of lattice
82 u8 sattr; // system attributes
83 double temperature; // temperature
84 double pressure; // pressure
87 int relax_steps; // amount of relaxation steps
89 int prerun; // amount of loops in first run
98 int avgskip; // average skip
99 char sdir[128]; // save root
101 t_list stage; // stages
102 int s_cnt; // stage counter
105 #define SATTR_PRELAX 0x01
106 #define SATTR_TRELAX 0x02
107 #define SATTR_AVGRST 0x04
109 typedef struct s_displace_atom_params {
112 } t_displace_atom_params;
114 typedef struct s_del_atoms_params {
117 } t_del_atoms_params;
119 typedef struct s_modify_aoms_params {
123 } t_modify_atoms_params;
125 typedef struct s_insert_atoms_params {
127 double x0,y0,z0,x1,y1,z1;
135 } t_insert_atoms_params;
137 typedef struct s_insert_mixed_atoms_params {
148 } t_insert_mixed_atoms_params;
150 #define INS_TOTAL 0x01
151 #define INS_RECT 0x02
152 #define INS_SPHERE 0x03
154 #define INS_RELPOS 0x05
156 typedef struct s_continue_params {
160 typedef struct s_anneal_params {
167 typedef struct s_chaattr_params {
175 #define CHAATTR_TOTALV 0x01
176 #define CHAATTR_REGION 0x02
177 #define CHAATTR_ELEMENT 0x04
178 #define CHAATTR_NUMBER 0x08
180 typedef struct s_chsattr_params {
190 #define CHSATTR_PCTRL 0x01
191 #define CHSATTR_TCTRL 0x02
192 #define CHSATTR_PRELAX 0x04
193 #define CHSATTR_TRELAX 0x08
194 #define CHSATTR_AVGRST 0x10
195 #define CHSATTR_RSTEPS 0x20
197 typedef struct s_set_temp_params {
202 #define SET_TEMP_CURRENT 0x01
203 #define SET_TEMP_VALUE 0x02
205 typedef struct s_set_timestep_params {
207 } t_set_timestep_params;
209 typedef struct s_fill_params {
210 double lc; // lattice constant
211 int lx; // amount of lc units
217 t_part_params p_params;
218 t_defect_params d_params;
219 t_offset_params o_params;
222 typedef struct s_crt_params {
235 // constraint relaxation technique
237 extern u8 *constraints;
238 extern double *trafo_angle;
241 * function prototypes