projects
/
physik
/
posic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added offset feature
[physik/posic.git]
/
mdrun.c
diff --git
a/mdrun.c
b/mdrun.c
index
31e5f0a
..
062224b
100644
(file)
--- a/
mdrun.c
+++ b/
mdrun.c
@@
-393,6
+393,14
@@
int mdrun_parse_config(t_mdrun *mdrun) {
continue;
}
continue;
}
+ // offset
+ if(word[i][0]=='o') {
+ fp.o_params.o.x=atof(word[++i])*fp.lc;
+ fp.o_params.o.y=atof(word[++i])*fp.lc;
+ fp.o_params.o.z=atof(word[++i])*fp.lc;
+ fp.o_params.use=1;
+ continue;
+ }
i+=1;
}
add_stage(mdrun,STAGE_FILL,&fp);
i+=1;
}
add_stage(mdrun,STAGE_FILL,&fp);
@@
-1108,7
+1116,9
@@
int chaatr(t_moldyn *moldyn,t_mdrun *mdrun) {
if(cap->z1<atom->r.z)
continue;
}
if(cap->z1<atom->r.z)
continue;
}
- printf(" changing attributes of atom %d (0x%x)\n",i,cap->attr);
+ if(!(cap->type&CHAATTR_TOTALV))
+ printf(" changing attributes of atom %d (0x%x)\n",
+ i,cap->attr);
atom->attr=cap->attr;
}
atom->attr=cap->attr;
}
@@
-1315,7
+1325,8
@@
int mdrun_hook(void *ptr1,void *ptr2) {
fp->lx,fp->ly,fp->lz,
&o,
&(fp->p_params),
fp->lx,fp->ly,fp->lz,
&o,
&(fp->p_params),
- &(fp->d_params));
+ &(fp->d_params),
+ &(fp->o_params));
o.x+=0.25*fp->lc;
o.y=o.x;
o.z=o.x;
o.x+=0.25*fp->lc;
o.y=o.x;
o.z=o.x;
@@
-1326,7
+1337,8
@@
int mdrun_hook(void *ptr1,void *ptr2) {
fp->lx,fp->ly,fp->lz,
&o,
&(fp->p_params),
fp->lx,fp->ly,fp->lz,
&o,
&(fp->p_params),
- &(fp->d_params));
+ &(fp->d_params),
+ &(fp->o_params));
break;
default:
break;
default:
@@
-1339,7
+1351,8
@@
int mdrun_hook(void *ptr1,void *ptr2) {
fp->lx,fp->ly,fp->lz,
NULL,
&(fp->p_params),
fp->lx,fp->ly,fp->lz,
NULL,
&(fp->p_params),
- &(fp->d_params));
+ &(fp->d_params),
+ &(fp->o_params));
break;
}
moldyn_bc_check(moldyn);
break;
}
moldyn_bc_check(moldyn);