lots of mostly small changes ...
[physik/posic.git] / posic.c
diff --git a/posic.c b/posic.c
index f026abe..992f9d1 100644 (file)
--- a/posic.c
+++ b/posic.c
@@ -53,14 +53,14 @@ int main(int argc,char **argv) {
        vis.dim.y=b*LC_SI;
        vis.dim.z=c*LC_SI;
 
-       /* init lattice
+       /* init lattice */
        printf("placing silicon atoms ... ");
        count=create_lattice(DIAMOND,SI,M_SI,LC_SI,a,b,c,&si);
-       printf("(%d) ok!\n",count); */
-       /* testing purpose */
+       printf("(%d) ok!\n",count);
+       /* testing purpose
        count=2;
        si=malloc(2*sizeof(t_atom));
-       si[0].r.x=0.35*sqrt(3.0)*LC_SI/2.0;
+       si[0].r.x=0.23*sqrt(3.0)*LC_SI/2.0;
        si[0].r.y=0;
        si[0].r.z=0;
        si[0].element=SI;
@@ -70,7 +70,7 @@ int main(int argc,char **argv) {
        si[1].r.z=0;
        si[1].element=SI;
        si[1].mass=M_SI;
-       /* */
+       */
 
        /* moldyn init (now si is a valid address) */
        md.count=count;
@@ -90,10 +90,8 @@ int main(int argc,char **argv) {
        md.visual=&vis;
 
        printf("setting thermal fluctuations (T=%f K)\n",md.t);
-       //thermal_init(&md,&random,count);
-       for(a=0;a<count;a++) v3_zero(&(si[0].v));
-       //v3_zero(&(si[0].v));
-       //v3_zero(&(si[1].v));
+       thermal_init(&md,&random,count);
+       //for(a=0;a<count;a++) v3_zero(&(si[0].v));
 
        /* check kinetic energy */
 
@@ -110,10 +108,10 @@ int main(int argc,char **argv) {
        help=lj.sigma6*lj.sigma6;
        lj.sigma6*=help;
        lj.sigma12=lj.sigma6*lj.sigma6;
-       lj.epsilon=LJ_EPSILON_SI;
+       lj.epsilon4=4.0*LJ_EPSILON_SI;
 
        ho.equilibrium_distance=0.25*sqrt(3.0)*LC_SI;
-       ho.spring_constant=LJ_EPSILON_SI;
+       ho.spring_constant=4.0*LJ_EPSILON_SI;
 
        u=get_e_pot(&md);