char *wptr;
char word[16][32];
int wcnt;
- int i;
+ int i,o;
t_insert_atoms_params iap;
t_continue_params cp;
mdrun->lx=atoi(word[2]);
mdrun->ly=atoi(word[3]);
mdrun->lz=atoi(word[4]);
+ mdrun->lc=atof(word[5]);
}
else if(!strncmp(word[0],"aattr",5)) {
// for aatrib line we need a special stage
break;
}
}
- i=1;
+ i=2;
if(cap.type&CHAATTR_REGION) {
cap.x0=atof(word[1]);
cap.y0=atof(word[2]);
cap.element=atoi(word[i]);
i+=1;
}
- wptr=word[i];
- for(i=0;i<strlen(wptr);i++) {
- switch(word[2][i]) {
+ for(o=0;o<strlen(word[i]);o++) {
+ switch(word[i][o]) {
case 'b':
cap.attr|=ATOM_ATTR_VB;
break;
/* default steps and tau values */
steps=mdrun->relax_steps;
-printf("-------> %d\n",mdrun->relax_steps);
tau=mdrun->timestep;
/* check whether relaxation steps are necessary */
t_moldyn moldyn;
t_3dvec o;
- /* clear mdrun struct */
+ /* clear structs */
memset(&mdrun,0,sizeof(t_mdrun));
+ memset(&moldyn,0,sizeof(t_moldyn));
/* parse arguments */
if(mdrun_parse_argv(&mdrun,argc,argv)<0)
if(set_int_alg(&moldyn,mdrun.intalgo)<0)
return -1;
set_cutoff(&moldyn,mdrun.cutoff);
- set_nn_dist(&moldyn,mdrun.nnd);
if(set_potential(&moldyn,mdrun.potential)<0)
return -1;
switch(mdrun.potential) {
switch(mdrun.lattice) {
case FCC:
create_lattice(&moldyn,FCC,mdrun.lc,mdrun.element1,
- mdrun.m1,0,0,mdrun.lx,
+ mdrun.m1,DEFAULT_ATOM_ATTR,0,mdrun.lx,
mdrun.ly,mdrun.lz,NULL);
break;
case DIAMOND:
create_lattice(&moldyn,DIAMOND,mdrun.lc,mdrun.element1,
- mdrun.m1,0,0,mdrun.lx,
+ mdrun.m1,DEFAULT_ATOM_ATTR,0,mdrun.lx,
mdrun.ly,mdrun.lz,NULL);
break;
case ZINCBLENDE:
o.x=0.5*0.25*mdrun.lc; o.y=o.x; o.z=o.x;
create_lattice(&moldyn,FCC,mdrun.lc,mdrun.element1,
- mdrun.m1,0,0,mdrun.lx,
+ mdrun.m1,DEFAULT_ATOM_ATTR,0,mdrun.lx,
mdrun.ly,mdrun.lz,&o);
o.x+=0.25*mdrun.lc; o.y=o.x; o.z=o.x;
create_lattice(&moldyn,FCC,mdrun.lc,mdrun.element2,
- mdrun.m2,0,1,mdrun.lx,
+ mdrun.m2,DEFAULT_ATOM_ATTR,1,mdrun.lx,
mdrun.ly,mdrun.lz,&o);
break;
default: