add another way of calculating tersoff + small moldyn mods
[physik/posic.git] / sic.c
diff --git a/sic.c b/sic.c
index 682d89e..a78f3a0 100644 (file)
--- a/sic.c
+++ b/sic.c
 #include "potentials/harmonic_oscillator.h"
 #include "potentials/lennard_jones.h"
 #include "potentials/tersoff.h"
+//#include "potentials/tersoff_orig.h"
 
-#define INJECT         20
-#define NR_ATOMS       20      
+#define INJECT         1
+#define NR_ATOMS       4
 
 int hook(void *moldyn,void *hook_params) {
 
@@ -97,8 +98,13 @@ int main(int argc,char **argv) {
        /* choose potential */
        set_potential1b(&md,tersoff_mult_1bp);
        set_potential2b(&md,tersoff_mult_2bp);
-       set_potential2b_post(&md,tersoff_mult_post_2bp);
-       set_potential3b(&md,tersoff_mult_3bp);
+       //set_potential3b_j1(&md,tersoff_mult_2bp);
+       //set_potential3b_k1(&md,tersoff_mult_3bp);
+       //set_potential3b_j3(&md,tersoff_mult_post_2bp);
+       set_potential3b_j1(&md,tersoff_mult_3bp_j1);
+       set_potential3b_k1(&md,tersoff_mult_3bp_k1);
+       set_potential3b_j2(&md,tersoff_mult_3bp_j2);
+       set_potential3b_k2(&md,tersoff_mult_3bp_k2);
        //set_potential2b(&md,lennard_jones);
        //set_potential2b(&md,harmonic_oscillator);
        set_potential_params(&md,&tp);
@@ -198,7 +204,7 @@ int main(int argc,char **argv) {
 
        /* set temperature & pressure */
        set_temperature(&md,atof(argv[2])+273.0);
-       set_pressure(&md,ATM);
+       set_pressure(&md,BAR);
 
        /* set p/t scaling */
        //set_pt_scale(&md,P_SCALE_BERENDSEN,0.001,
@@ -211,14 +217,14 @@ int main(int argc,char **argv) {
 
        /* create the simulation schedule */
        /* initial configuration */
-       moldyn_add_schedule(&md,500,1.0);
+       moldyn_add_schedule(&md,10000,1.0);
        /* adding atoms */
-       for(inject=0;inject<INJECT;inject++) {
-               /* injecting atom and run with enabled t scaling */
-               moldyn_add_schedule(&md,400,1.0);
-               /* continue running with disabled t scaling */
-               moldyn_add_schedule(&md,100,1.0);
-       }
+       //for(inject=0;inject<INJECT;inject++) {
+       //      /* injecting atom and run with enabled t scaling */
+       //      moldyn_add_schedule(&md,900,1.0);
+       //      /* continue running with disabled t scaling */
+       //      moldyn_add_schedule(&md,1100,1.0);
+       //}
 
        /* schedule hook function */
        moldyn_set_schedule_hook(&md,&hook,NULL);
@@ -226,9 +232,9 @@ int main(int argc,char **argv) {
        /* activate logging */
        moldyn_set_log_dir(&md,argv[1]);
        moldyn_set_report(&md,"Frank Zirkelbach","Test 1");
-       moldyn_set_log(&md,LOG_TOTAL_ENERGY,10);
-       moldyn_set_log(&md,LOG_TEMPERATURE,10);
-       moldyn_set_log(&md,LOG_PRESSURE,10);
+       moldyn_set_log(&md,LOG_TOTAL_ENERGY,1);
+       moldyn_set_log(&md,LOG_TEMPERATURE,1);
+       moldyn_set_log(&md,LOG_PRESSURE,1);
        moldyn_set_log(&md,VISUAL_STEP,100);
        moldyn_set_log(&md,SAVE_STEP,100);
        moldyn_set_log(&md,CREATE_REPORT,0);