+/*
+ * lattice types
+ */
+
+#define CUBIC 0x01
+#define FCC 0x02
+#define DIAMOND 0x04
+#define ZINCBLENDE 0x08
+#define NONE 0x80
+
+/*
+ * more includes
+ */
+
+//#include "pse.h"
+
+/*
+ *
+ * function prototypes
+ *
+ */
+
+int moldyn_init(t_moldyn *moldyn,int argc,char **argv);
+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_temperature(t_moldyn *moldyn,double t_ref);
+int set_pressure(t_moldyn *moldyn,double p_ref);
+int set_p_scale(t_moldyn *moldyn,u8 ptype,double ptc);
+int set_t_scale(t_moldyn *moldyn,u8 ttype,double ttc);
+int set_pt_scale(t_moldyn *moldyn,u8 ptype,double ptc,u8 ttype,double ttc);
+int set_dim(t_moldyn *moldyn,double x,double y,double z,u8 visualize);
+int set_nn_dist(t_moldyn *moldyn,double dist);
+int set_pbc(t_moldyn *moldyn,u8 x,u8 y,u8 z);
+int set_potential(t_moldyn *moldyn,u8 type);
+
+int set_avg_skip(t_moldyn *moldyn,int skip);
+
+int moldyn_set_log_dir(t_moldyn *moldyn,char *dir);
+int moldyn_set_report(t_moldyn *moldyn,char *author,char *title);
+int moldyn_set_log(t_moldyn *moldyn,u8 type,int timer);
+int moldyn_log_shutdown(t_moldyn *moldyn);
+
+int create_lattice(t_moldyn *moldyn,u8 type,double lc,int element,
+ u8 attr,u8 brand,int a,int b,int c,t_3dvec *origin,
+ t_part_params *p_params,t_defect_params *d_params,
+ t_offset_params *o_params);
+int add_atom(t_moldyn *moldyn,int element,u8 brand,u8 attr,
+ t_3dvec *r,t_3dvec *v);
+int del_atom(t_moldyn *moldyn,int tag);
+int cubic_init(int a,int b,int c,double lc,t_atom *atom,t_3dvec *origin,
+ t_part_params *p_params,t_defect_params *d_params);
+int fcc_init(int a,int b,int c,double lc,t_atom *atom,t_3dvec *origin,
+ t_part_params *p_params,t_defect_params *d_params);
+int diamond_init(int a,int b,int c,double lc,t_atom *atom,t_3dvec *origin,
+ t_part_params *p_params,t_defect_params *d_params);
+int destroy_atoms(t_moldyn *moldyn);
+
+int thermal_init(t_moldyn *moldyn,u8 equi_init);
+double total_mass_calc(t_moldyn *moldyn);
+double temperature_calc(t_moldyn *moldyn);
+double get_temperature(t_moldyn *moldyn);
+int scale_velocity(t_moldyn *moldyn,u8 equi_init);
+double virial_sum(t_moldyn *moldyn);
+double pressure_calc(t_moldyn *moldyn);
+int average_reset(t_moldyn *moldyn);
+int average_and_fluctuation_calc(t_moldyn *moldyn);
+int get_heat_capacity(t_moldyn *moldyn);
+double thermodynamic_pressure_calc(t_moldyn *moldyn);
+double get_pressure(t_moldyn *moldyn);
+int scale_volume(t_moldyn *moldyn);
+int scale_dim(t_moldyn *moldyn,u8 dir,double scale,u8 x,u8 y,u8 z);
+int scale_atoms(t_moldyn *moldyn,u8 dir,double scale,u8 x,u8 y,u8 z);
+
+double e_kin_calc(t_moldyn *moldyn);
+double get_total_energy(t_moldyn *moldyn);
+t_3dvec get_total_p(t_moldyn *moldyn);
+
+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);
+#elif LOWMEM_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 *);
+
+int moldyn_add_schedule(t_moldyn *moldyn,int runs,double tau);
+int moldyn_set_schedule_hook(t_moldyn *moldyn,set_hook hook,void *hook_params);
+
+int moldyn_integrate(t_moldyn *moldyn);
+int velocity_verlet(t_moldyn *moldyn);
+
+int potential_force_calc(t_moldyn *moldyn);
+int virial_calc(t_atom *a,t_3dvec *f,t_3dvec *d);
+//inline int virial_calc(t_atom *a,t_3dvec *f,t_3dvec *d)
+// __attribute__((always_inline));
+int check_per_bound(t_moldyn *moldyn,t_3dvec *a);
+int check_per_bound_and_care_for_pbc(t_moldyn *moldyn,t_atom *a);
+//inline int check_per_bound(t_moldyn *moldyn,t_3dvec *a)
+// __attribute__((always_inline));
+
+int moldyn_bc_check(t_moldyn *moldyn);
+
+int moldyn_read_save_file(t_moldyn *moldyn,char *file);
+int moldyn_free_save_file(t_moldyn *moldyn);
+int moldyn_load(t_moldyn *moldyn);
+int process_2b_bonds(t_moldyn *moldyn,void *data,
+ int (*process)(t_moldyn *moldyn,t_atom *itom,t_atom *jtom,
+ void *data,u8 bc));
+int process_neighbours(t_moldyn *moldyn,void *data,t_atom *atom,
+ int (*process)(t_moldyn *moldyn,t_atom *atom,t_atom *natom,
+ void *data,u8 bc));
+
+int get_line(int fd,char *line,int max);
+
+int pair_correlation_init(t_moldyn *moldyn,double dr);
+int calculate_diffusion_coefficient(t_moldyn *moldyn,double *dc);
+int calculate_msd(t_moldyn *moldyn,double *msd);
+int calculate_pair_correlation_process(t_moldyn *moldyn,t_atom *itom,
+ t_atom *jtom,void *data,u8 bc);
+int calculate_pair_correlation(t_moldyn *moldyn,double dr,void *ptr);
+int bond_analyze_process(t_moldyn *moldyn,t_atom *itom,t_atom *jtom,
+ void *data,u8 bc);
+int bond_analyze(t_moldyn *moldyn,double *quality);
+
+int visual_init(t_moldyn *moldyn,char *filebase);
+int visual_bonds_process(t_moldyn *moldyn,t_atom *itom,t_atom *jtom,
+ void *data,u8 bc);
+#ifdef VISUAL_THREAD
+void *visual_atoms(void *ptr);
+#else
+int visual_atoms(t_moldyn *moldyn);
+#endif
+
+int fpu_set_rtd(void);