insert mixed atoms feature added (will be renamed an cleand up later)
[physik/posic.git] / moldyn.c
index b79dea6..eb3c4b0 100644 (file)
--- a/moldyn.c
+++ b/moldyn.c
@@ -485,6 +485,10 @@ int create_lattice(t_moldyn *moldyn,u8 type,double lc,int element,double mass,
        count=moldyn->count;
 
        /* how many atoms do we expect */
+       if(type==NONE) {
+               new*=1;
+               printf("[moldyn] WARNING: create 'none' lattice called");
+       }
        if(type==CUBIC) new*=1;
        if(type==FCC) new*=4;
        if(type==DIAMOND) new*=8;
@@ -1574,9 +1578,11 @@ int moldyn_integrate(t_moldyn *moldyn) {
                printf("[moldyn] WARNING: cutoff > 0.5 x dim.y\n");
        if(moldyn->cutoff>0.5*moldyn->dim.z)
                printf("[moldyn] WARNING: cutoff > 0.5 x dim.z\n");
-       ds=0.5*atom[0].f.x*moldyn->tau_square/atom[0].mass;
-       if(ds>0.05*moldyn->nnd)
+       if(moldyn->count) {
+               ds=0.5*atom[0].f.x*moldyn->tau_square/atom[0].mass;
+               if(ds>0.05*moldyn->nnd)
                printf("[moldyn] WARNING: forces too high / tau too small!\n");
+       }
 
        /* zero absolute time */
        // should have right values!