== Introduction ==
This wizard has a simple purpose - to draw a cgo plane that passes through three points picked by the user. Most of the wizard itself was copied from the measure wizard.
To use, put it in the same directory as the other wizards. This is not quality code, and there may be bugs, but it seems to work okay.
Original
<syntaxhighlight lang="python">
import pymol
from pymol import cmd
from pymol.wizard import Wizard
from chempy import cpv
from pymol.cgo import *
def makePrimitive(cgo, name):
az = cmd.get('auto_zoom', quiet=1)
cmd.set('auto_zoom', 0, quiet=1)
cmd.load_cgo(cgo, name)
cmd.set('auto_zoom', az, quiet=1)
def point(p):
x, y, z = p
return [COLOR, 1, 1, 1, SPHERE, float(x), float(y), float(z), 0.5]
def line(p1, p2):
x1, y1, z1 = p1
x2, y2, z2 = p2
return [CYLINDER, float(x1), float(y1), float(z1), float(x2), float(y2), float(z2), 0.25, 1, 1, 1, 1, 1, 1]
def plane(corner1, corner2, corner3, corner4, normal):
planeObj = []
planeObj.extend(point(corner1))
..→