Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

ATAT-mcsqs生成准随机结构(SQS)

经验分享

通常使用第一性原理计算某些多元素占据原胞中同一位置的结构会优先考虑使用准随机结构(special quasirandom structure,SQS)来进行模拟建模。此篇教程意在整理一个较为简便的操作流程,以供参考。

首先,准备原始单一元素(共格的多元素合并为一种)晶胞,并通过vaspkit获得其最原始晶胞。

例如这里准备了一个面心立方的结构,组分单一,面心和顶角元素相同,这里设置为Si。

Si                                      1.00000000000000          4    0.0000000000000000    0.0000000000000000     0.0000000000000000   4    0.0000000000000000     0.0000000000000000    0.0000000000000000    4   Si4Direct  0.0000000000000000  0.0000000000000000  0.0000000000000000  0.0000000000000000  0.5000000000000000  0.5000000000000000  0.5000000000000000  0.0000000000000000  0.5000000000000000  0.5000000000000000  0.5000000000000000  0.0000000000000000  0.0000000000000000  0.5000000000000000  0.0000000000000000

通过vaspkit 602功能获得其原胞

vaspkit -task 602  +---------------------------------------------------------------+ |         VASPKIT Standard Edition 1.3.5 (03 Jul. 2022)         | |            Running VASPKIT Under Command-Line Mode            | +---------------------------------------------------------------+ -->> (01) Reading Structural Parameters from POSCAR File... +-------------------------- Summary ----------------------------+                           Prototype: A           Total Atoms in Input Cell:   4     Lattice Constants in Input Cell:   4.000   4.000   4.000        Lattice Angles in Input Cell:  90.000  90.000  90.000       Total Atoms in Primitive Cell:   1 Lattice Constants in Primitive Cell:   2.828   2.828   2.828    Lattice Angles in Primitive Cell:  60.000  60.000  60.000                      Crystal System: Cubic                       Crystal Class: m-3m                     Bravais Lattice: cF                         Space Group: 225                         Point Group: 32 [ Oh ]                       International: Fm-3m                 Symmetry Operations: 192 +---------------------------------------------------------------+ -->> (02) Written PRIMCELL.vasp file. +---------------------------------------------------------------+

原胞信息如下,只存在一个wyckoff点位。

Primitive Cell  1.000000    0.00000000000000    2.00000000000000    2.00000000000000    2.00000000000000    0.00000000000000    2.00000000000000    2.00000000000000    2.00000000000000    0.00000000000000  Si   1DIRECT    0.0000000000000000    0.0000000000000000    0.0000000000000000    Si1

将vaspkit生成的原胞文件PRIMCELL.vasp复制为POSCAR,然后通过vaspkit 的414功能将POSCAR转化为ATAT的输入文件lat.in

vaspkit -task 414  +---------------------------------------------------------------+ |         VASPKIT Standard Edition 1.3.5 (03 Jul. 2022)         | |            Running VASPKIT Under Command-Line Mode            | +---------------------------------------------------------------+ -->> (01) Reading Structural Parameters from POSCAR File... -->> (02) Written lat.in File! +---------------------------------------------------------------+

lat.in文件内容如下,后续计算需要重命名为rndstr.in

根据实际需要的某一wyckoff点位的元素比例修改rndst.in文件。这里修改为Si和C各占50%。修改后的rndst.in文件如下

     2.82843     2.82843     2.82843   60.00   60.00   60.00    1.00000000    0.00000000    0.00000000    0.00000000    1.00000000    0.00000000    0.00000000    0.00000000    1.00000000     0.00000000    0.00000000    0.00000000  Si=0.5,C=0.5

注意:各点位各元素之间的比例与扩包比例相关联,最后确保扩包后各元素原子数量总数为整数。

这里选择扩包方式为2×2×2,最后超胞总原子数量为8。

先使用ATAT获得in文件的对称性信息,-2=x需要根据结构实际情况修改,过小会导致ATAT出现段错误。

corrdump -nop -noe -2=4 -ro -l=rndstr.in  -clus ; getclus

再根据超胞的总原子数获得结构信息,-n=后面的数值与超胞数量相同

mcsqs -n=8

ATAT产生的超胞结构信息文件为sqscell.out文件

根据既定扩包方式修改为:

12 0 00 2 00 0 2

生成超胞准随机结构:

mcsqs -rc

产生的准随机结构文件为:bestsqs.out

导出为cif文件

str2cif < bestsqs.out > pos.cif

通过vaspkit 将cif文件转化为POSCAR

vaspkit -task 105  +---------------------------------------------------------------+ |         VASPKIT Standard Edition 1.3.5 (03 Jul. 2022)         | |            Running VASPKIT Under Command-Line Mode            | +---------------------------------------------------------------+ Input the filename in cif format (e.g., POSCAR.cif): ------------>>pos.cif -->> (01) Written POSCAR file!

更为简便的方法可使用qvasp软件一键转化

qvasp -c2p

当然也可以通过VESTA导出。

POSCAR文件如下

愿有所成

引喻失义   妄自菲薄

  • 1
    点赞
  • 15
    收藏
    觉得还不错? 一键收藏
  • 4
    评论
以下是用 C 语言编写的 SJF(短作业优先)调度算法的示例代码: ```c #include<stdio.h> int main() { int n; // 进程数 int pid[20]; // 进程 ID 数组 int at[20]; // 到达时间数组 int bt[20]; // 执行时间数组 int wt[20]; // 等待时间数组 int tat[20]; // 周转时间数组 int ct[20]; // 完成时间数组 int i, j, temp; float awt = 0, atat = 0; // 平均等待时间和平均周转时间 printf("Enter the number of processes: "); scanf("%d", &n); // 读入进程信息 for (i = 0; i < n; i++) { printf("Enter process %d ID: ", i+1); scanf("%d", &pid[i]); printf("Enter process %d arrival time: ", i+1); scanf("%d", &at[i]); printf("Enter process %d burst time: ", i+1); scanf("%d", &bt[i]); } // 根据到达时间排序 for (i = 0; i < n; i++) { for (j = i + 1; j < n; j++) { if (at[i] > at[j]) { // 交换到达时间 temp = at[i]; at[i] = at[j]; at[j] = temp; // 交换执行时间 temp = bt[i]; bt[i] = bt[j]; bt[j] = temp; // 交换进程 ID temp = pid[i]; pid[i] = pid[j]; pid[j] = temp; } } } // 计算完成时间 for (i = 0; i < n; i++) { if (i == 0) { ct[i] = at[i] + bt[i]; } else { if (at[i] > ct[i-1]) { ct[i] = at[i] + bt[i]; } else { ct[i] = ct[i-1] + bt[i]; } } } // 计算等待时间和周转时间 for (i = 0; i < n; i++) { tat[i] = ct[i] - at[i]; wt[i] = tat[i] - bt[i]; awt += wt[i]; atat += tat[i]; } // 输出结果 printf("\nProcess\tAT\tBT\tCT\tTAT\tWT\n"); for (i = 0; i < n; i++) { printf("%d\t%d\t%d\t%d\t%d\t%d\n", pid[i], at[i], bt[i], ct[i], tat[i], wt[i]); } awt /= n; atat /= n; printf("\nAverage Waiting Time: %.2f\n", awt); printf("Average Turnaround Time: %.2f\n\n", atat); return 0; } ``` 此代码实现了 SJF 调度算法,可计算各个进程的等待时间、周转时间、平均等待时间和平均周转时间。
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值