|
|
本帖最后由 liucw 于 2022-10-19 10:08 编辑
###绘制桥位苯环中心与桥位中心的连线#draw color red
draw color yellow
set bb [atomselect top "type C1 or type C2 or type C3 or type C4 or type C5 or type C6"]
set ben [measure center $bb]
set xw [lindex $ben 0]
set yw [lindex $ben 1]
set zw [lindex $ben 2]
set n1 122
set n2 131
set aa [atomselect top "index $n1 or index $n2"]
set com [measure center $aa]
set xq [lindex $com 0]
set yq [lindex $com 1]
set zq [lindex $com 2]
#draw sphere "$xq $yq $zq" radius 0.5
draw line "$xw $yw $zw" "$xq $yq $zq" width 1 style dashed
###绘制桥位苯环中心与洞位中心的连线- draw color red
- #draw color yellow
- set bb [atomselect top "type C1 or type C2 or type C3 or type C4 or type C5 or type C6"]
- set ben [measure center $bb]
- set xw [lindex $ben 0]
- set yw [lindex $ben 1]
- set zw [lindex $ben 2]
- set bb [atomselect top "index 128 or index 131 or index 122"]
- set com [measure center $bb]
- set xq [lindex $com 0]
- set yq [lindex $com 1]
- set zq [lindex $com 2]
- #set xq [lindex [$bb get {x y z}] 0]
- #set yq [lindex [$bb get {x y z}] 1]
- #set zq [lindex [$bb get {x y z}] 2]
- #draw sphere "$xq $yq $zq" radius 0.2
- draw line "$xw $yw $zw" "$xq $yq $zq" width 1
复制代码 效果如下图所示:
|
评分 Rate
-
查看全部评分 View all ratings
|