]> hackdaworld.org Git - physik/posic.git/commitdiff
added insertion type controled by config.h
authorhackbard <hackbard@sage.physik.uni-augsburg.de>
Wed, 13 Feb 2008 11:52:18 +0000 (12:52 +0100)
committerhackbard <hackbard@sage.physik.uni-augsburg.de>
Wed, 13 Feb 2008 11:52:18 +0000 (12:52 +0100)
config.h
sic.c

index f43f0060590a23441b04a11959d2ae8dc72fadfd..c46bca1d26cf8fdc8d09d4766cf60f0eb9956eac 100644 (file)
--- a/config.h
+++ b/config.h
@@ -16,7 +16,7 @@
 
 // insertrun
 
-#define INS_RUNS       620
+#define INS_RUNS       600
 #define INS_ATOMS      10
 
 #define INS_CARBON     /* comment for silicon */
  #define INS_BRAND     0
 #endif
 
-//#define INS_LENX     (1*ALBE_LC_SIC)
-//#define INS_LENY     (1*ALBE_LC_SIC)
-//#define INS_LENZ     (1*ALBE_LC_SIC)
-#define INS_LENX       (31*ALBE_LC_SI)
-#define INS_LENY       (31*ALBE_LC_SI)
-#define INS_LENZ       (31*ALBE_LC_SI)
+#define INS_RAND       0
+//#define INS_HEXA     1
+//#define INS_TETRA    2
+//#define INS_110DB    3
+
+#define INS_ATTR       ATOM_ATTR_HB                            // heat bath
+//#define INS_ATTR     ATOM_ATTR_HB|ATOM_ATTR_VB               // + vis bonds
+//#define INS_ATTR     ATOM_ATTR_HB|ATOM_ATTR_VB|ATOM_ATTR_FP  // + fixed pos
+
+//#define INS_LENX     (12*ALBE_LC_SIC)
+//#define INS_LENY     (12*ALBE_LC_SIC)
+//#define INS_LENZ     (12*ALBE_LC_SIC)
+#define INS_LENX       (9*ALBE_LC_SI)
+#define INS_LENY       (9*ALBE_LC_SI)
+#define INS_LENZ       (9*ALBE_LC_SI)
 #define INS_OFFSET     (ALBE_LC_SI/8.0)
 
 #define INS_R_C                1.5
@@ -49,7 +58,7 @@
 #define POST_RUNS      430
 #define POST_DELTA_TC  1.0
 #define POST_DT                1.0
-#define POST_RELAX     50
+#define POST_RELAX     100
 #define POST_TAU       1.0
 
 // log
diff --git a/sic.c b/sic.c
index fb20a568383b7c490df20b83dd44fc4ebea21430..cea4c3934c823a4b6d1003c1de3cb1d04a956512 100644 (file)
--- a/sic.c
+++ b/sic.c
@@ -51,32 +51,32 @@ int insert_atoms(t_moldyn *moldyn) {
        for(j=0;j<INS_ATOMS;j++) {
                run=1;
                while(run) {
+#ifdef INS_TETRA
                        // tetrahedral
-                       /*
                        r.x=0.0;
                        r.y=0.0;
                        r.z=0.0;
-                       */
+#endif
+#ifdef INS_HEXA
                        // hexagonal
-                       /*
                        r.x=-1.0/8.0*ALBE_LC_SI;
                        r.y=-1.0/8.0*ALBE_LC_SI;
                        r.z=1.0/8.0*ALBE_LC_SI;
-                       */
+#endif
+#ifdef INS_110DB
                        // 110 dumbbell
-                       /*
                        r.x=(-0.5+0.25+0.125)*ALBE_LC_SI;
                        r.y=(-0.5+0.25+0.125)*ALBE_LC_SI;
                        r.z=(-0.5+0.25)*ALBE_LC_SI;
                        md->atom[4372].r.x=(-0.5+0.125+0.125)*ALBE_LC_SI;
                        md->atom[4372].r.y=(-0.5+0.125+0.125)*ALBE_LC_SI;
-                       */
+#endif
+#ifdef INS_RAND
                        // random
-                       //
                        r.x=(rand_get_double(&(moldyn->random))-0.5)*INS_LENX;
                        r.y=(rand_get_double(&(moldyn->random))-0.5)*INS_LENY;
                        r.z=(rand_get_double(&(moldyn->random))-0.5)*INS_LENZ;
-                       //
+#endif
                        // offset
                        r.x+=INS_OFFSET;
                        r.y+=INS_OFFSET;
@@ -101,8 +101,7 @@ int insert_atoms(t_moldyn *moldyn) {
                }
                add_atom(moldyn,INS_TYPE,INS_MASS,INS_BRAND,
                         ATOM_ATTR_1BP|ATOM_ATTR_2BP|ATOM_ATTR_3BP|\
-                        //ATOM_ATTR_HB|ATOM_ATTR_VB,
-                        ATOM_ATTR_HB,
+                        INS_ATTR,
                         &r,&v);
                printf(" %02d: atom %d | %f %f %f | %f\n",
                       j,moldyn->count-1,r.x,r.y,r.z,dmin);
@@ -164,7 +163,7 @@ int sic_hook(void *moldyn,void *hook_params) {
                        dt=md->t_avg-md->t_ref;
                        if(dt<0)
                                dt=-dt;
-                       if(dt>INS_DELTA_TC)
+                       if(dt>POST_DELTA_TC)
                                break;
                        /* decrease temperature */
                        hp->postrun_count+=1;