24小时热门版块排行榜    

查看: 2065  |  回复: 7
【奖励】 本帖被评价6次,作者zhangguangping增加金币 4.6
本帖产生 1 个 1ST强帖 ,点击这里进行查看

[资源] 利用VNL-2008.10构建体系,并导出为xyz格式的方法

很多做输运的同行们对构建双电极体系的繁琐很烦恼。我之前是用Giew+自己写的一些脚本来构建体系,发现比较繁琐。ATK的界面VNL可以较方便的构建体系,但是如果做输运计算不使用atk而使用TranSIESTA或者Smeagol的话,怎么利用VNL来方便的构建体系呢?下面咱们就开始讨论这个问题。(可能也还有其他的更简便的方法来构建体系,希望那些有其他更方便方法来构建体系的同学们将自己的方法分享一下。)
首先声明:这个方法以及下面提到的脚本不是我本人原创的。我只是负责把它翻译成中文并且总结了一下而已。详细的原帖请参看:http://quantumwise.com/forum/index.php?topic=5.0
下面的实践都是在window版本的2008.10版本的VNL上面操作的。对于别的版本,可能会有些许变化,或者不可行,需要自己尝试一下。
*************************************************
①首先在window安装的QuantumWise\Virtual NanoLab 2008.10.0\atk\lib目录下添加一个目录site-packages

②将下面的内容存为文件名为xyzexport.py的文件,放到上述目录下。

##########################

from ATK.KohnSham import *

def printXYZFile (configuration):
    elements = configuration.elements()
    coordinates = configuration.cartesianCoordinates()
    print len(elements)
    print 'From VNL'
    for elem,coords in zip(elements,coordinates):
        print elem.symbol(),
        for i in coords:
            print i.inUnitsOf(Angstrom),
        print


############################

③在VNL中利用Atomic Manipulator工具构建一个双电极体系。

④利用拖动图标将体系拖到Script Editor中,假设形成的脚本为:

################################

from ATK.TwoProbe import *
# Scattering elements
left_surface_elements  = [Gold, Gold, Gold, Gold,
                          Gold, Gold, Gold, Gold,
                          Gold, Gold, Gold, Gold,
                          Gold, Gold, Gold, Gold,
                          Gold, Gold]
central_atom_elements  = [Carbon,   Carbon,   Carbon,   Carbon,   
                          Carbon,   Carbon,   Sulfur,   Hydrogen,
                          Hydrogen, Sulfur,   Hydrogen, Hydrogen]
right_surface_elements = [Gold, Gold, Gold, Gold,
                          Gold, Gold, Gold, Gold,
                          Gold, Gold, Gold, Gold,
                          Gold, Gold, Gold, Gold,
                          Gold, Gold]
scattering_elements = left_surface_elements + central_atom_elements + right_surface_elements

# Scattering coordinates
left_surface_coordinates  = [[  0.00000000e+00,   0.00000000e+00,   7.06330299e+00],
                             [ -1.44179070e+00,   2.49725485e+00,   7.06330299e+00],
                             [ -2.88358140e+00,   4.99450970e+00,   7.06330299e+00],
                             [  2.88358140e+00,   0.00000000e+00,   7.06330299e+00],
                             [  1.44179070e+00,   2.49725485e+00,   7.06330299e+00],
                             [  0.00000000e+00,   4.99450970e+00,   7.06330299e+00],
                             [  5.76716280e+00,   0.00000000e+00,   7.06330299e+00],
                             [  4.32537222e+00,   2.49725485e+00,   7.06330299e+00],
                             [  2.88358140e+00,   4.99450970e+00,   7.06330299e+00],
                             [ -2.88358140e+00,   6.65934610e+00,   9.41773796e+00],
                             [  0.00000000e+00,   1.66483653e+00,   9.41773796e+00],
                             [ -1.44179070e+00,   4.16209126e+00,   9.41773796e+00],
                             [  1.33226763e-15,   6.65934610e+00,   9.41773796e+00],
                             [  2.88358140e+00,   1.66483653e+00,   9.41773796e+00],
                             [  1.44179070e+00,   4.16209126e+00,   9.41773796e+00],
                             [  2.88358140e+00,   6.65934610e+00,   9.41773796e+00],
                             [  5.76716280e+00,   1.66483653e+00,   9.41773796e+00],
                             [  4.32537222e+00,   4.16209126e+00,   9.41773796e+00]]*Angstrom
central_atom_coordinates  = [[  1.44      ,   2.5       ,  15.68600003],
                             [  1.44      ,   1.29100001,  14.98800001],
                             [  1.44      ,   1.29100001,  13.59199999],
                             [  1.44      ,   2.5       ,  12.89399997],
                             [  1.44      ,   3.70899999,  13.59199999],
                             [  1.44      ,   3.70899999,  14.98800001],
                             [  1.44      ,   2.5       ,  17.4400001 ],
                             [  1.44      ,   0.35299993,  15.53000001],
                             [  1.44      ,   0.35299993,  13.04999999],
                             [  1.44      ,   2.5       ,  11.1399999 ],
                             [  1.44      ,   4.64700007,  13.04999999],
                             [  1.44      ,   4.64700007,  15.53000001]]*Angstrom
right_surface_coordinates = [[ -2.88358140e+00,   6.65934610e+00,   1.91477375e+01],
                             [  0.00000000e+00,   1.66483653e+00,   1.91477375e+01],
                             [ -1.44179070e+00,   4.16209126e+00,   1.91477375e+01],
                             [  1.33226763e-15,   6.65934610e+00,   1.91477375e+01],
                             [  2.88358140e+00,   1.66483653e+00,   1.91477375e+01],
                             [  1.44179070e+00,   4.16209126e+00,   1.91477375e+01],
                             [  2.88358140e+00,   6.65934610e+00,   1.91477375e+01],
                             [  5.76716280e+00,   1.66483653e+00,   1.91477375e+01],
                             [  4.32537222e+00,   4.16209126e+00,   1.91477375e+01],
                             [ -1.44179070e+00,   5.82692766e+00,   2.15021718e+01],
                             [  1.44179070e+00,   8.32418263e-01,   2.15021718e+01],
                             [  0.00000000e+00,   3.32967305e+00,   2.15021718e+01],
                             [  1.44179070e+00,   5.82692766e+00,   2.15021718e+01],
                             [  4.32537222e+00,   8.32418263e-01,   2.15021718e+01],
                             [  2.88358140e+00,   3.32967305e+00,   2.15021718e+01],
                             [  4.32537222e+00,   5.82692766e+00,   2.15021718e+01],
                             [  7.20895386e+00,   8.32418263e-01,   2.15021718e+01],
                             [  5.76716280e+00,   3.32967305e+00,   2.15021718e+01]]*Angstrom
scattering_coordinates = left_surface_coordinates + central_atom_coordinates + right_surface_coordinates

electrode_elements = [Gold, Gold, Gold]
electrode_coordinates = [[  0.00000000e+00,   0.00000000e+00,   0.00000000e+00],
                         [  1.11022302e-16,   1.66483653e+00,   2.35443440e+00],
                         [  1.44179073e+00,   8.32418264e-01,   4.70886880e+00]]*Angstrom

electrode_cell = [[ 2.88358145,  0.        ,  0.        ],
                  [-1.44179073,  2.49725479,  0.        ],
                  [ 0.        ,  0.        ,  7.06330319]]*Angstrom

# Set up electrodes
electrode_configuration = PeriodicAtomConfiguration(
    electrode_cell,
    electrode_elements,
    electrode_coordinates
    )

# Set up two-probe configuration
twoprobe_configuration = TwoProbeConfiguration(
    (electrode_configuration,electrode_configuration),
    scattering_elements,
    scattering_coordinates,
    electrode_repetitions=[[3,3],[3,3]],
    equivalent_atoms=([0,0],[-1,-1])
    )

####################################

在窗口中,在脚本最后添加两行:

from xyzexport import printXYZFile

printXYZFile(twoprobe_configuration.equivalentBulkSystem())
⑤然后拖入Job Manager工具中,在logWindow中会出现xyz格式的结构。
如果仅仅想得到扩展分子结构而不想得到带左右电极的双电极体系,那么将④中的第二行换成:
printXYZFile(twoprobe_configuration)
即可。
如果你想转换的体系不是双电极体系而是别的体系,那么
printXYZFile(twoprobe_configuration)
中的对象换成你脚本中相应的对象名称。

注:如果用上面的方法可能得到的双电极体系不是很美观,发现左右两个电极参差不齐,这个时候,
可以在③建立好双电极体系之后,利用"Save Equivalent bulk configuration to file"选项,将体系存为bulk体系,
然后进行④
以后再使用的时候就可以省略①②步了。
*************************************************


希望上述方法能够帮助那些平时利用Smeagol和TranSIESTA做计算的那些同志们构建体系。

[ Last edited by zhangguangping on 2011-7-31 at 12:05 ]
回复此楼

» 收录本帖的淘帖专辑推荐

第一性原理相关文档 Siesta(Transiesta、ATK) SIESTA atk&transiesta
我的小木虫 siesta & vasp

» 猜你喜欢

» 本主题相关商家推荐: (我也要在这里推广)

» 本主题相关价值贴推荐,对您同样有帮助:

已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

yongma2008

木虫 (著名写手)


★★★★★ 五星级,优秀推荐

支持一下
2楼2011-07-31 23:35:40
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

★★★★★ 五星级,优秀推荐

★★★★★
5楼2011-08-30 12:19:51
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

mengfc

金虫 (正式写手)


★★★★★ 五星级,优秀推荐

请问这个VNL在哪里下载呢?
6楼2012-11-26 09:05:26
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

@@@@0000

新虫 (小有名气)


★★★★★ 五星级,优秀推荐

лл
7楼2012-12-03 21:22:13
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
简单回复
2011-08-01 08:06   回复  
2011-08-25 21:52   回复  
五星好评  顶
wekow8楼
2013-06-27 12:58   回复  
三星好评  
相关版块跳转 我要订阅楼主 zhangguangping 的主题更新
☆ 无星级 ★ 一星级 ★★★ 三星级 ★★★★★ 五星级
普通表情 高级回复 (可上传附件)
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[考研] 求材料调剂 +8 隔壁陈先生 2026-03-12 8/400 2026-03-18 22:19 by li123456789.
[考研] 085600材料与化工调剂 324分 +8 llllkkkhh 2026-03-18 8/400 2026-03-18 21:01 by Catalysis25
[考研] 328求调剂,英语六级551,有科研经历 +3 生物工程调剂 2026-03-17 7/350 2026-03-18 20:41 by Wangjingyue
[考研] 一志愿中国海洋大学,生物学,301分,求调剂 +4 1孙悟空 2026-03-17 4/200 2026-03-18 17:59 by fivewind
[教师之家] 焦虑 +8 水冰月月野兔 2026-03-13 12/600 2026-03-18 15:27 by 咪呜喵呜
[考研] 材料与化工一志愿南昌大学327求调剂推荐 +8 Ncdx123456 2026-03-13 9/450 2026-03-18 14:40 by haxia
[考研] 288求调剂,一志愿华南理工大学071005 +4 ioodiiij 2026-03-17 4/200 2026-03-18 12:36 by Linda Hu
[考研] 0703化学求调剂 总分331 +3 ZY-05 2026-03-13 3/150 2026-03-18 10:58 by macy2011
[考研] 0703化学336分求调剂 +6 zbzihdhd 2026-03-15 7/350 2026-03-18 09:53 by zhukairuo
[考研] 296求调剂 +5 大口吃饭 身体健 2026-03-13 5/250 2026-03-17 21:05 by 不惑可乐
[考研] 326求调剂 +5 上岸的小葡 2026-03-15 6/300 2026-03-17 17:26 by ruiyingmiao
[考研] 332求调剂 +6 Zz版 2026-03-13 6/300 2026-03-17 17:03 by ruiyingmiao
[考研] 290求调剂 +3 p asserby. 2026-03-15 4/200 2026-03-17 16:35 by wangkm
[考研] 283求调剂 +10 小楼。 2026-03-12 14/700 2026-03-16 16:08 by 13811244083
[考研] 26考研一志愿中国石油大学(华东)305分求调剂 +3 嘉年新程 2026-03-15 3/150 2026-03-15 13:58 by 哈哈哈哈嘿嘿嘿
[考研] 070305求调剂 +3 mlpqaz03 2026-03-14 4/200 2026-03-15 11:04 by peike
[考研] 288求调剂 +4 奇点0314 2026-03-14 4/200 2026-03-14 23:04 by JourneyLucky
[考研] 297求调剂 +4 学海漂泊 2026-03-13 4/200 2026-03-14 11:51 by 热情沙漠
[考研] 材料与化工(0856)304求B区调剂 +6 邱gl 2026-03-12 7/350 2026-03-13 23:24 by 邱gl
[考研] 085600材料与化工 309分请求调剂 +7 dtdxzxx 2026-03-12 8/400 2026-03-13 14:43 by jxchenghu
信息提示
请填处理意见