1

我正在尝试使用 C 代码制作 FCC 100 和 FCC 111 晶格。我已经配置了 FCC 100 lattice,而且我做得正确。但是,当我尝试制作 FCC 111 晶格时,它看起来与我的预期不同。我使用参考 FCC 111 格(由另一个 GUI 程序“Amsterdam Density Functional”构建)来比较我的 FCC 111 格(使用 C 代码)。我的问题是,我用来在我的代码中制作 FCC(111)的参数是否正确?如果它们不正确,请帮助我构建 FCC 111 lattice。提前致谢

/**** To create FCC 100 lattice*********/
for(i=0; i<Xatom; i++){            // Number of Atoms in the X direction
for(j=0; j<Yatom; j++){        // Number of Atoms in the Y direction
    for(k=0; k<nL; k++) {       // Number of layers in the Z direction

x[i]= I * a_lattice;   y[j]= j * a_lattice;   z[k]= k * a_lattice;
fprintf(fpo," %s\t %lf\t %lf\t %lf\n", AtomName, x[i], y[j], z[k]);

x[i]= I * a_lattice;   y[j]= 0.5 * a_lattice +  j * a_lattice;    z[k]= 0.5 * a_lattice + k * a_lattice;
fprintf(fpo," %s\t %lf\t %lf\t %lf\n", AtomName, x[i], y[j], z[k]);

x[i]= 0.5 * a_lattice + I * a_lattice;  y[j]= j * a_lattice;   z[k]= 0.5 * a_lattice + k *a_lattice;
fprintf(fpo," %s\t %lf\t %lf\t %lf\n", AtomName, x[i], y[j], z[k]);

x[i]= 0.5 * a_lattice + i*a_lattice;  y[j] = 0.5 * a_lattice + j * a_lattice;   z[k]= k * a_lattice;
fprintf(fpo," %s\t %lf\t %lf\t %lf\n", AtomName, x[i], y[j], z[k]);
        }   
    }
}

/**** To create FCC 111 lattice*********/
ax = a_lattice * sqrt(2)/2;
ay = a_lattice * sqrt(6)/2;
az = a_lattice * sqrt(3);

x2 = sqrt(2)/4 * a_lattice;
y2 = sqrt(6)/4 * a_lattice;
y3 = sqrt(6)/6 * a_lattice;
y4 = sqrt(6)*5/12 * a_lattice;
y5 = sqrt(6)*2/6 * a_lattice;
y6 = sqrt(6)/12 * a_lattice;

for(i=0; i<Xatom; i++){
for(j=0; j<Yatom; j++){
  layer = 0;
for(k=0; k<nL; k++){

x[i] = I * ax;  y[j] = j * ay;  z[k]= layer/ 3.0 * az;
fprintf(fpo," %s\t %lf\t %lf\t %lf\n", AtomName, x[i], y[j], z[k]);


x[i] = x2 + I * ax;   y[j] = y2 + j * ay;   z[k] = layer/3.0 * az;
fprintf(fpo," %s\t %lf\t %lf\t %lf\n", AtomName, x[i], y[j], z[k]);

layer = layer + 1;

x[i] = I * ax;  y[j] = y3 + j*ay;  z[k] = layer/3.0 * az;
fprintf(fpo," %s\t %lf\t %lf\t %lf\n", AtomName, x[i], y[j], z[k]);

x[i] = x2 + I * ax;   y[j] = y4 + j * ay;   z[k]=layer/3.0 * az;
fprintf(fpo," %s\t %lf\t %lf\t %lf\n", AtomName, x[i], y[j], z[k]);

layer = layer + 1;

x[i] = I * ax;  y[j] = y5 + j * ay;     z[k] = layer/3.0 * az;
fprintf(fpo," %s\t %lf\t %lf\t %lf\n", AtomName, x[i], y[j], z[k]);

x[i] = x2 + I * ax;   y[j] = y6 + j * ay;   z[k] = layer/3.0 * az;
fprintf(fpo," %s\t %lf\t %lf\t %lf\n", AtomName, x[i], y[j], z[k]);
layer = layer + 1; 
        }
    }
}

在这里,我还展示了我的代码中的参考结构和输出结构

在此处输入图像描述

4

1 回答 1

0

如果有人可以查看用于制作具有矩形横截面的 FCC (111) 晶格的 C 代码并建议可以在此代码中修改哪些内容以使 FCC (111) 晶格具有菱形横截面,与此问题中提供的 GUI-REF 相同。

于 2015-11-24T13:38:39.833 回答