X-Git-Url: https://hackdaworld.org/gitweb/?a=blobdiff_plain;f=mdrun.c;h=1bf983d883a924a958131570fec2e7da13d76a9c;hb=7b4610a1a7f7a27c866bf85815c63aeff17978dc;hp=bd70d007ab1f430e031de6b879aface7dd5713f3;hpb=a16579f010cb5d53b7bf44e854089019ab9b1df0;p=physik%2Fposic.git diff --git a/mdrun.c b/mdrun.c index bd70d00..1bf983d 100644 --- a/mdrun.c +++ b/mdrun.c @@ -308,10 +308,12 @@ int mdrun_parse_config(t_mdrun *mdrun) { fp.lz=atoi(word[++i]); fp.lc=atof(word[++i]); mdrun->lc=fp.lc; + continue; } if(!strncmp(word[i],"eb",2)) { fp.fill_element=atoi(word[++i]); fp.fill_brand=atoi(word[++i]); + continue; } if(word[i][0]=='p') { i+=1; @@ -347,6 +349,7 @@ int mdrun_parse_config(t_mdrun *mdrun) { fp.p_params.d.y=atof(word[++i]); fp.p_params.d.z=atof(word[++i]); } + continue; } if(word[i][0]=='d') { switch(word[++i][0]) { @@ -387,6 +390,7 @@ int mdrun_parse_config(t_mdrun *mdrun) { default: break; } + continue; } i+=1; @@ -463,7 +467,9 @@ int mdrun_parse_config(t_mdrun *mdrun) { csp.type=0; for(i=1;i0) + csp.ptau=0.01/(csp.ptau*GPA); csp.type|=CHSATTR_PCTRL; } if(!strncmp(word[i],"tctrl",5)) { @@ -1056,13 +1062,13 @@ int chsattr(t_moldyn *moldyn,t_mdrun *mdrun) { if(csp->ptau>0) set_p_scale(moldyn,P_SCALE_BERENDSEN,csp->ptau); else - set_p_scale(moldyn,P_SCALE_BERENDSEN,csp->ptau); + set_p_scale(moldyn,P_SCALE_NONE,1.0); } if(csp->type&CHSATTR_TCTRL) { if(csp->ttau>0) set_t_scale(moldyn,T_SCALE_BERENDSEN,csp->ttau); else - set_t_scale(moldyn,T_SCALE_BERENDSEN,csp->ttau); + set_t_scale(moldyn,T_SCALE_NONE,1.0); } if(csp->type&CHSATTR_PRELAX) { if(csp->dp<0) @@ -1255,8 +1261,9 @@ int mdrun_hook(void *ptr1,void *ptr2) { create_lattice(moldyn, fp->lattice,fp->lc, - mdrun->element1, - DEFAULT_ATOM_ATTR,0, + fp->fill_element, + DEFAULT_ATOM_ATTR, + fp->fill_brand, fp->lx,fp->ly,fp->lz, NULL, &(fp->p_params),