+ // default values
+ fp.fill_element=mdrun->element1;
+ fp.fill_brand=0;
+ fp.lattice=mdrun->lattice;
+ fp.p_params.type=0;
+ fp.d_params.type=0;
+ fp.d_params.stype=0;
+ // parse fill command
+ i=1;
+ while(i<wcnt) {
+ if(!strncmp(word[i],"lc",2)) {
+ fp.lx=atoi(word[++i]);
+ fp.ly=atoi(word[++i]);
+ 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;
+ switch(word[i][0]) {
+ case 'i':
+ if(word[i][1]=='r')
+ fp.p_params.type=PART_INSIDE_R;
+ else
+ fp.p_params.type=PART_INSIDE_D;
+ break;
+ case 'o':
+ if(word[i][1]=='r')
+ fp.p_params.type=PART_OUTSIDE_R;
+ else
+ fp.p_params.type=PART_OUTSIDE_D;
+ break;
+ default:
+ break;
+ }
+ if((fp.p_params.type==PART_INSIDE_R)||
+ (fp.p_params.type==PART_OUTSIDE_R)) {
+ fp.p_params.r=atof(word[++i]);
+ fp.p_params.p.x=atof(word[++i]);
+ fp.p_params.p.y=atof(word[++i]);
+ fp.p_params.p.z=atof(word[++i]);
+ }
+ if((fp.p_params.type==PART_INSIDE_D)||
+ (fp.p_params.type==PART_OUTSIDE_D)) {
+ fp.p_params.p.x=atof(word[++i]);
+ fp.p_params.p.y=atof(word[++i]);
+ fp.p_params.p.z=atof(word[++i]);
+ fp.p_params.d.x=atof(word[++i]);
+ 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]) {
+ case '0':
+
+ fp.d_params.type=DEFECT_TYPE_0D;
+ if(!strncmp(word[i+1],"dbx",3)) {
+ fp.d_params.stype=DEFECT_STYPE_DB_X;
+ }
+ if(!strncmp(word[i+1],"dby",3)) {
+ fp.d_params.stype=DEFECT_STYPE_DB_Y;
+ }
+ if(!strncmp(word[i+1],"dbz",3)) {
+ fp.d_params.stype=DEFECT_STYPE_DB_Z;
+ }
+ if(!strncmp(word[i+1],"dbr",3)) {
+ fp.d_params.stype=DEFECT_STYPE_DB_R;
+ }
+ i+=1;
+ fp.d_params.od=atof(word[++i]);
+ fp.d_params.dd=atof(word[++i]);
+ fp.d_params.element=atoi(word[++i]);
+ fp.d_params.brand=atoi(word[++i]);
+ // parsed in future
+ fp.d_params.attr=ATOM_ATTR_HB|ATOM_ATTR_VA;
+ fp.d_params.attr|=ATOM_ATTR_1BP|ATOM_ATTR_2BP|ATOM_ATTR_3BP;
+ break;
+
+ case '1':
+ fp.d_params.type=DEFECT_TYPE_1D;
+ break;
+ case '2':
+ fp.d_params.type=DEFECT_TYPE_2D;
+ break;
+ case '3':
+ fp.d_params.type=DEFECT_TYPE_3D;
+ break;
+ default:
+ break;
+ }
+ continue;
+
+ }
+ i+=1;
+ }
+ add_stage(mdrun,STAGE_FILL,&fp);
+ }
+ else if(!strncmp(word[0],"thermal_init",12)) {
+ add_stage(mdrun,STAGE_THERMAL_INIT,NULL);