int moldyn_parse_argv(t_moldyn *moldyn,int argc,char **argv) {
int i;
- t_ho_params hop;
- t_lj_params ljp;
- t_tersoff_params tp;
- double s,e;
memset(moldyn,0,sizeof(t_moldyn));
moldyn->tau=MOLDYN_TAU;
moldyn->time_steps=MOLDYN_RUNS;
moldyn->integrate=velocity_verlet;
- moldyn->potential_force_function=lennard_jones;
/* parse argv */
for(i=1;i<argc;i++) {
return 0;
}
+int moldyn_add_schedule(t_moldyn *moldyn,) {
+
+
+ return 0;
+}
+
+int moldyn_set_schedule_hook(t_moldyn *moldyn,void *hook,void *hook_params) {
+
+
+ return 0;
+}
+
/*
*
* 'integration of newtons equation' - algorithms
int moldyn_integrate(t_moldyn *moldyn) {
- int i;
+ int i,sched;
unsigned int e,m,s,d,v;
t_3dvec p;
/* calculate initial forces */
moldyn->potential_force_function(moldyn);
+ for(sched=0;sched<moldyn->schedule.content_count;sched++) {
+
+ /* setting amont of runs and finite time step size */
+ moldyn->tau=schedule->tau[sched];
+ moldyn->tau_square=moldyn->tau*moldyn->tau;
+ moldyn->timesteps=schedule->runs[sched];
+
+ /* integration according to schedule */
+
for(i=0;i<moldyn->time_steps;i++) {
/* integration step */
}
}
+ /* check for hooks */
+ if(schedule->hook)
+ schedule->hook(moldyn,schedule->hook_params);
+
return 0;
}