safety ci
[physik/posic.git] / sic.c
diff --git a/sic.c b/sic.c
index 45e671f..7ab3dc9 100644 (file)
--- a/sic.c
+++ b/sic.c
 #include "posic.h"
 
 int main(int argc,char **argv) {
+
+       /* check argv */
+       if(argc!=2) {
+               printf("[sic] error: arg1 (vis/log/save location) ");
+               printf("must be given!\n");
+               return -1;
+       }
+
        /* main moldyn structure */
        t_moldyn md;
 
@@ -24,7 +32,7 @@ int main(int argc,char **argv) {
        double tau;
 
        /* testing location & velocity vector */
-       t_3dvec r,v;
+       //t_3dvec r,v;
 
        /* values */
        tau=1.0e-15;    /* delta t = 1 fs */
@@ -129,8 +137,8 @@ int main(int argc,char **argv) {
 
        /* set temperature */
        printf("[sic] setting temperature\n");
-       set_temperature(&md,273.0+1410.0);
-       //set_temperature(&md,273.0+450.0);
+       //set_temperature(&md,273.0+1410.0);
+       set_temperature(&md,273.0+450.0);
        //set_temperature(&md,273.0);
        //set_temperature(&md,1.0);
        //set_temperature(&md,0.0);
@@ -150,11 +158,11 @@ int main(int argc,char **argv) {
 
        /* create the simulation schedule */
        printf("[sic] adding schedule\n");
-       moldyn_add_schedule(&md,100001,1.0);
+       moldyn_add_schedule(&md,30001,1.0);
 
        /* activate logging */
        printf("[sic] activate logging\n");
-       moldyn_set_log_dir(&md,"saves/si_melting_point");
+       moldyn_set_log_dir(&md,argv[1]);
        moldyn_set_log(&md,LOG_TOTAL_ENERGY,200);
        moldyn_set_log(&md,VISUAL_STEP,200);