File: cgo_3Dtext01.py

package info (click to toggle)
pymol 1.2r2-1.1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 38,716 kB
  • ctags: 23,006
  • sloc: ansic: 480,417; python: 70,953; cpp: 12,928; sh: 10,266; makefile: 530; csh: 21
file content (21 lines) | stat: -rw-r--r-- 371 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

from pymol import cmd
from pymol.cgo import *
from pymol.vfont import plain

cgo = []

axes = [[2.0,0.0,0.0],[0.0,2.0,0.0],[0.0,0.0,2.0]]

pos = [0.0,0.0,0.0]
wire_text(cgo,plain,pos,'Hello World',axes)

pos = [0.0,-3.0,0.0]
cyl_text(cgo,plain,pos,'Hello Universe',0.10,axes=axes)

cmd.set("cgo_line_radius",0.03)
cmd.load_cgo(cgo,'txt')
cmd.zoom("all",2.0)