first sic tests
[physik/posic.git] / sic.c
diff --git a/sic.c b/sic.c
index 2221025..3c815ba 100644 (file)
--- a/sic.c
+++ b/sic.c
 /* potential */
 #include "potentials/harmonic_oscillator.h"
 #include "potentials/lennard_jones.h"
+
+#ifdef TERSOFF_ORIG
+#include "potentials/tersoff_orig.h"
+#else
 #include "potentials/tersoff.h"
-//#include "potentials/tersoff_orig.h"
+#endif
 
 #define INJECT         1
 #define NR_ATOMS       4
@@ -97,14 +101,16 @@ int main(int argc,char **argv) {
 
        /* choose potential */
        set_potential1b(&md,tersoff_mult_1bp);
-       //set_potential2b(&md,tersoff_mult_2bp);
-       //set_potential3b_j1(&md,tersoff_mult_2bp);
-       //set_potential3b_k1(&md,tersoff_mult_3bp);
-       //set_potential3b_j3(&md,tersoff_mult_post_2bp);
+#ifdef TERSOFF_ORIG
+       set_potential3b_j1(&md,tersoff_mult_2bp);
+       set_potential3b_k1(&md,tersoff_mult_3bp);
+       set_potential3b_j2(&md,tersoff_mult_post_2bp);
+#else
        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);
+#endif
        //set_potential2b(&md,lennard_jones);
        //set_potential2b(&md,harmonic_oscillator);
        set_potential_params(&md,&tp);
@@ -164,7 +170,8 @@ int main(int argc,char **argv) {
        tersoff_mult_complete_params(&tp);
 
        /* set (initial) dimensions of simulation volume */
-       set_dim(&md,6*LC_SI,6*LC_SI,6*LC_SI,TRUE);
+       //set_dim(&md,6*LC_SI,6*LC_SI,6*LC_SI,TRUE);
+       set_dim(&md,6*TM_LC_3C_SIC,6*TM_LC_3C_SIC,6*TM_LC_3C_SIC,TRUE);
 
        /* set periodic boundary conditions in all directions */
        set_pbc(&md,TRUE,TRUE,TRUE);
@@ -172,10 +179,21 @@ int main(int argc,char **argv) {
        /* create the lattice / place atoms */
        //create_lattice(&md,CUBIC,LC_SI,SI,M_SI,
        //create_lattice(&md,FCC,LC_SI,SI,M_SI,
-       create_lattice(&md,DIAMOND,LC_SI,SI,M_SI,
-                      ATOM_ATTR_1BP|ATOM_ATTR_2BP|ATOM_ATTR_3BP|ATOM_ATTR_HB,
+       //create_lattice(&md,DIAMOND,LC_SI,SI,M_SI,
+       //create_lattice(&md,DIAMOND,LC_C,C,M_C,
+       //               ATOM_ATTR_1BP|ATOM_ATTR_2BP|ATOM_ATTR_3BP|ATOM_ATTR_HB,
        //               ATOM_ATTR_2BP|ATOM_ATTR_HB,
-                      0,6,6,6);
+       //               1,6,6,6,NULL);
+
+       /* create centered zinc blende lattice */
+       r.x=0.5*0.25*TM_LC_3C_SIC; r.y=r.x; r.z=r.x;
+       create_lattice(&md,FCC,TM_LC_3C_SIC,SI,M_SI,
+                      ATOM_ATTR_1BP|ATOM_ATTR_2BP|ATOM_ATTR_3BP|ATOM_ATTR_HB,
+                      0,6,6,6,&r);
+       r.x+=0.25*TM_LC_3C_SIC; r.y=r.x; r.z=r.x;
+       create_lattice(&md,FCC,TM_LC_3C_SIC,C,M_C,
+                      ATOM_ATTR_1BP|ATOM_ATTR_2BP|ATOM_ATTR_3BP|ATOM_ATTR_HB,
+                      1,6,6,6,&r);
        moldyn_bc_check(&md);
 
        /* testing configuration */
@@ -225,7 +243,7 @@ int main(int argc,char **argv) {
 
        /* create the simulation schedule */
        /* initial configuration */
-       moldyn_add_schedule(&md,10000,1.0);
+       moldyn_add_schedule(&md,1000,1.0);
        /* adding atoms */
        //for(inject=0;inject<INJECT;inject++) {
        //      /* injecting atom and run with enabled t scaling */
@@ -243,8 +261,8 @@ int main(int argc,char **argv) {
        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,VISUAL_STEP,10);
+       moldyn_set_log(&md,SAVE_STEP,10);
        moldyn_set_log(&md,CREATE_REPORT,0);
 
        /*
@@ -253,6 +271,9 @@ int main(int argc,char **argv) {
         * integration of newtons equations
         */
        moldyn_integrate(&md);
+#ifdef DEBUG
+return 0;
+#endif
 
        /* close */
        moldyn_shutdown(&md);