stupid unit mistake prelax dp
authorhackbard <hackbard@sage.physik.uni-augsburg.de>
Tue, 29 Apr 2008 18:55:34 +0000 (20:55 +0200)
committerhackbard <hackbard@sage.physik.uni-augsburg.de>
Tue, 29 Apr 2008 18:55:34 +0000 (20:55 +0200)
mdrun.c

diff --git a/mdrun.c b/mdrun.c
index eff1ee5..d875822 100644 (file)
--- a/mdrun.c
+++ b/mdrun.c
@@ -332,7 +332,7 @@ int mdrun_parse_config(t_mdrun *mdrun) {
                                        csp.type|=CHSATTR_TCTRL;
                                }
                                if(!strncmp(word[i],"prelax",6)) {
-                                       csp.dp=atof(word[++i]);
+                                       csp.dp=atof(word[++i])*BAR;
                                        csp.type|=CHSATTR_PRELAX;
                                }
                                if(!strncmp(word[i],"trelax",6)) {
@@ -451,8 +451,10 @@ int check_pressure(t_moldyn *moldyn,t_mdrun *mdrun) {
 
        double delta;
 
-       if(!(mdrun->sattr&SATTR_PRELAX))
+       if(!(mdrun->sattr&SATTR_PRELAX)) {
+printf("##### gleich raus!\n");
                return TRUE;
+       }
 
        delta=moldyn->p_avg-moldyn->p_ref;
 
@@ -462,6 +464,7 @@ int check_pressure(t_moldyn *moldyn,t_mdrun *mdrun) {
        if(delta>mdrun->dp)
                return FALSE;
 
+printf("##### nach check raus (%f/%f)!\n",delta,mdrun->dp);
        return TRUE;
 }
 
@@ -682,8 +685,8 @@ int mdrun_hook(void *ptr1,void *ptr2) {
        tau=mdrun->timestep;
 
        /* check whether relaxation steps are necessary */
-       if(!((check_pressure(moldyn,mdrun)==FALSE)|\
-            (check_temperature(moldyn,mdrun)==FALSE))) {
+       if((check_pressure(moldyn,mdrun)==TRUE)&\
+          (check_temperature(moldyn,mdrun)==TRUE)) {
        
                /* be verbose */
                stage_print("\n###########################\n");