|
本帖最后由 tjuptz 于 2019-10-17 21:59 编辑
前面我整理了论坛中关于固体表面cluster/slab模型的问题讨论以及界面建模考虑表面弛豫或重构时考虑的层数问题讨论。MD中建立表面模型,可以用MS切面扩胞加真空管后直接使用,这样固体表面在盒子最底部;也可以在GROMACS中用editconf命令对盒子尺寸调整,默认情况下会把表面挪到盒子中间,这样适用于某些体系。有时候我们想建立类似三明治结构,两层表面模型中间真空用来填充一些分子,比如研究流体输运或材料剪切问题时。http://bbs.keinsci.com/thread-13806-1-1.html中有人问这种模型怎么建,我尝试写了个VMD脚本,如下:- display rendermode GLSL
- display depthcue off
- display projection Orthographic
- mol new 1.gro
- pbc box
- rotate x by -90
- mol modstyle 0 top CPK 1.000000 0.300000 12.000000 12.000000
- puts "Use like 'transform 30 x 2'. The first value is the distance bewteen two slabs and the last value is for mode selection. 'x' and 'y' representing X and Y axis are equivalent in isotropic condition!"
- puts "The built model would be saved automatically into 2.gro. You should copy the coordinates from 10.gro to 2.gro manually!"
- puts "CAUTION:cut mode without manual operation after cut!"
- puts "CAUTION:split mode without manual operation after split!"
- proc transform {d {axis x} {isoXY 2}} {
- set dis {0 0}
- lappend dis $d
- set sel [atomselect top all]
- $sel writegro 10.gro
- set vec [measure center $sel]
- if {$isoXY==1} {
- #inversion mode:isotropic for X/Y direction
- $sel moveby [vecinvert $vec]
- $sel move [transaxis $axis 180]
- $sel moveby $vec
- $sel moveby $dis
- $sel writegro 2.gro
- } elseif {$isoXY==0} {
- #inversion mode:anisotropic for X/Y direction
- $sel moveby [vecinvert $vec]
- $sel move [transaxis $axis 180]
- $sel move [transaxis z 180]
- $sel moveby $vec
- $sel moveby $dis
- $sel writegro 2.gro
- } else {
- #translation mode
- $sel moveby $dis
- $sel writegro 2.gro
- }
- }
- proc cut {d} {
- #cut mode
- set sel [atomselect top all]
- lassign [lindex [measure minmax $sel] 1] a b c
- set range "z<=($c-$d)/2 or z>=($c+$d)/2"
- mol modselect 0 top $range
- set model [atomselect top $range]
- $model writegro 2.gro
- }
- proc split {d} {
- #split mode
- set sel [atomselect top all]
- lassign [lindex [measure minmax $sel] 1] a b c
- set dis {0 0}
- lappend dis $d
- set range "z>=$c/2"
- set upper [atomselect top $range]
- $upper moveby $dis
- $sel writegro 2.gro
- }
复制代码
把脚本和改名为1.gro的原始模型放到VMD目录下使用。切完除了窗口显示以外,会自动保存到VMD自动目录下为2.gro。10.gro是原结构的副本,用于使用transfrom时与2.gro合并。
固体有不同情况,1.点阵点是单个原子的晶体如金属、单原子离子盐,2.点阵点是原子但共价连接的晶体如金刚石、硅,3.点阵点包含多个分子片段的晶体如碳酸盐、分子晶体,4.无规堆垛、无定形或短程有序长程无序的片层。该脚本给出了三个命令,功能上存在冗余,我是想到了多种情况就都写进来了,可认为适用于不同目的。split命令是在MS建好的带真空模型上把底层slab劈开并将上半部分挪到上层;cut命令是把建好的不带真空的厚厚slab切掉中间层;transform命令则是把底部slab变换成顶部slab,又分了几种情况:直接移动对应isoXY不等于0或1,倒置后再移动又分为XY向同性isoXY=1与异性isoXY=0。
注意:对于晶体而言,晶层经过重复总会有一个周期,所以不同命令可能建的模一样;对2.情况,使用cut和split需要恰当处理切除原子造成的悬挂键问题;对3.情况,使用cut或split,适当添加“same resid as……”语句保证片段完整性。MS建模时,Z尺寸应为d+2c,d是真空厚度,c是slab厚度。
用什么命令还是要看你想模拟什么情景。比如我对建好的底部slab最表面进行了嫁接改性,为了上表面也是如此而且不用再做一遍,用transform就好了,至于XY异性时到底让上下板呈镜面还是倒反另考虑。
PS:tcl语言对空格太敏感了,格式困扰了好久
|
评分 Rate
-
查看全部评分 View all ratings
|