| 查看: 490 | 回复: 4 | |||
| 当前主题已经存档。 | |||
| 当前只显示满足指定条件的回帖,点击这里查看本话题的所有回帖 | |||
[交流]
传一个PWscf构建超晶胞到脚本程序
|
|||
|
#!/bin/bash echo -e "establish a supercell from a unit cell" echo -e "Please input the number of the atoms:\c" read atomnumber echo -e "Please input the types of the atoms:\c" read atomtypes echo -e "Please in put the lattice paremeters\na b c cos(ab) cos(bc) cos(ac)" read a b c Calpha Cbeta Cgamma echo -e "please input the rule for supercell\n x1 y2 z3 " read x1 y2 z3 if [ -f input.txt ];then echo "exist" rm -f input.txt fi let kcount=0 let increase=1 while [ $kcount -ne $atomnumber ]; do echo -e "please input the $kcount atom x, y, z coordinates...\n atom type x y z" read atomtype x y z echo -e "$x $y $z\n" xx=$x; yy=$y; zz=$z kcountx=0 while [ $kcountx -lt $x1 ]; do kcounty=0 while [ $kcounty -lt $y2 ]; do kcountz=0 while [ $kcountz -lt $z3 ]; do x=`echo $x1 $kcountx $xx|awk '{printf "%0.8f\n", 1/$1*$2+$3/$1}'` y=`echo $y2 $kcounty $a $b $yy|awk '{printf "%0.8f\n", 1/$1*$2*$4/$3+$5/$1}'` z=`echo $z3 $kcountz $a $c $zz|awk '{printf "%0.8f\n", 1/$1*$2*$4/$3+$5/$1}'` echo "$x $y $z" kcountz=$((kcountz+1)); echo $atomtype $x $y $z >>input.txt done kcounty=$((kcounty+1)); done kcountx=$((kcountx+1)); done let kcount=kcount+1 done 直接cp在成.sh文件,按赵提示运行就可以构造任意大小到超晶报 有喜欢PWscf计算的虫子可以 交流交流 本人的 E-mail: liubaoshun@126.com |
» 猜你喜欢
复试调剂,一志愿郑州大学材料与化工289分
已经有23人回复
化学工程与技术专业一志愿哈工程 291分B区 国家级大创负责人 有一作论文
已经有6人回复
材料调剂
已经有10人回复
314求调剂
已经有12人回复
调剂 化学 307
已经有8人回复
一志愿211 0703化学 346分求调剂
已经有11人回复
086003调剂求助
已经有14人回复
085400 328分 求调剂
已经有5人回复
083200 初试305分 求调剂
已经有9人回复
284求调剂
已经有3人回复
3楼2008-08-19 17:55:04
haiw201
木虫 (正式写手)
- 应助: 0 (幼儿园)
- 贵宾: 0.2
- 金币: 2860.3
- 散金: 1
- 红花: 1
- 帖子: 635
- 在线: 36.6小时
- 虫号: 147102
- 注册: 2005-12-27
- 性别: GG
- 专业: 凝聚态物性 II :电子结构
4楼2008-08-19 20:31:26
回复
|
你首先自己要知道一个BaTiO3晶胞的院子坐标,然后输入处理 我给出TiO2金红石 2*2*2的supercell的构造过程 首先知道TiO2金红石的六个院子坐标 -这个可用ms求出 Ti 0.000000000 0.000000000 0.000000000 Ti 0.500000000 0.50000000 0.322500000 O 0.304800000 0.304800000 0.000000000 O 0.695200000 0.695200000 0.000000000 O 0.195200000 0.804800000 0.322500000 O 0.804800000 0.195200000 0.322500000 然后执行shell establish a supercell from a unit cell Please input the number of the atoms lease input the types of the atoms lease in put the lattice paremetersa b c cos(ab) cos(bc) cos(ac) please input the rule for supercell x1 y2 z3 exist please input the 0 atom x, y, z coordinates... atom type x y z 0.000000000 0.000000000 0.000000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.32244009 0.00000000 0.50000000 0.00000000 0.00000000 0.50000000 0.32244009 0.50000000 0.00000000 0.00000000 0.50000000 0.00000000 0.32244009 0.50000000 0.50000000 0.00000000 0.50000000 0.50000000 0.32244009 please input the 1 atom x, y, z coordinates... atom type x y z 0.500000000 0.50000000 0.322500000 0.25000000 0.25000000 0.16125000 0.25000000 0.25000000 0.48369009 0.25000000 0.75000000 0.16125000 0.25000000 0.75000000 0.48369009 0.75000000 0.25000000 0.16125000 0.75000000 0.25000000 0.48369009 0.75000000 0.75000000 0.16125000 0.75000000 0.75000000 0.48369009 please input the 2 atom x, y, z coordinates... atom type x y z 0.304800000 0.304800000 0.000000000 0.15240000 0.15240000 0.00000000 0.15240000 0.15240000 0.32244009 0.15240000 0.65240000 0.00000000 0.15240000 0.65240000 0.32244009 0.65240000 0.15240000 0.00000000 0.65240000 0.15240000 0.32244009 0.65240000 0.65240000 0.00000000 0.65240000 0.65240000 0.32244009 please input the 3 atom x, y, z coordinates... atom type x y z 0.695200000 0.695200000 0.000000000 0.34760000 0.34760000 0.00000000 0.34760000 0.34760000 0.32244009 0.34760000 0.84760000 0.00000000 0.34760000 0.84760000 0.32244009 0.84760000 0.34760000 0.00000000 0.84760000 0.34760000 0.32244009 0.84760000 0.84760000 0.00000000 0.84760000 0.84760000 0.32244009 please input the 4 atom x, y, z coordinates... atom type x y z 0.195200000 0.804800000 0.322500000 0.09760000 0.40240000 0.16125000 0.09760000 0.40240000 0.48369009 0.09760000 0.90240000 0.16125000 0.09760000 0.90240000 0.48369009 0.59760000 0.40240000 0.16125000 0.59760000 0.40240000 0.48369009 0.59760000 0.90240000 0.16125000 0.59760000 0.90240000 0.48369009 please input the 5 atom x, y, z coordinates... atom type x y z 0.804800000 0.195200000 0.322500000 0.40240000 0.09760000 0.16125000 0.40240000 0.09760000 0.48369009 0.40240000 0.59760000 0.16125000 0.40240000 0.59760000 0.48369009 0.90240000 0.09760000 0.16125000 0.90240000 0.09760000 0.48369009 0.90240000 0.59760000 0.16125000 0.90240000 0.59760000 0.48369009 输出坐标文件在input.txt 希望对你有用 |
5楼2008-08-19 22:12:20













回复此楼
lease input the types of the atoms