Main Page

From PyMOLWiki
Jump to: navigation, search
hosted by SBGridlogo2.jpg
Welcome to the PyMOL Wiki!
The community-run support site for the PyMOL molecular viewer.
To request a new account, email SBGrid at: accounts (@) sbgrid dot org
Quick Links
Tutorials Table of Contents Commands
Script Library Plugins FAQ
Gallery | Covers PyMOL Cheat Sheet (PDF) Getting Help
News & Updates
Official Release PyMOL v2.4 has been released on May 20, 2020.
Python 3 New Python 3 compatibility guide for scripts and plugins
Official Release PyMOL v2.3 has been released on February 11, 2019.
POSF New PyMOL fellows announced for 2018-2019
Tutorial Plugins Tutorial updated for PyQt5
New Plugin ProBiS H2O is a new plugin for identification of conserved waters in protein structures.
Selection keywords New polymer.protein and polymer.nucleic selection keywords. Thanks everyone who participated in the poll!
Plugin Update MOLE 2.5 is an updated version of channel analysis software in PyMOL
New Script dssr_block is a wrapper for DSSR (3dna) and creates block-shaped nucleic acid cartoons
Older News See Older News.
Did you know...

Plane Wizard

== 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))
    ..→
A Random PyMOL-generated Cover. See Covers.