Main Page

From PyMOLWiki
Revision as of 11:18, 11 February 2019 by Speleo3 (talk | contribs) (2.3)
Jump to navigation Jump to 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.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...

ObjectFocus

=Overview=

A simple script to walk over objects in the object menu panel.

The Code

import pymol
from pymol import cmd

UP, DOWN = -1, 1

in_focus = 0

def object_focus(direction):
    """
    A simple script that remaps the PgUp and PgDn keys to walk through
    objects in the object list.
    """

    global in_focus, UP, DOWN

    cmd.wizard()

    names = cmd.get_names("public_objects")

    in_focus += direction

    if in_focus<0:
        in_focus = 0
    if in_focus > len(names)-1:
        in_focus = len(names)-1

    cur_obj = names[in_focus]

    cmd.orient(cur_obj,animate=1)
    cmd.wizard("message", "Object: %s" % (cur_obj))


cmd.set_key("PgUp", object_focus, [UP])
cmd.set_key("PgDn", object_focus, [DOWN])
A Random PyMOL-generated Cover. See Covers.