Jump to content

Main Page

From PyMOL Wiki
Revision as of 02:52, 4 December 2025 by JustinOConnor (talk | contribs)
hosted by
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
New Setup PyMOL-open-source-windows-setup v3.1 has been released on January 20, 2025. More information under Windows Install.
New Plugin PySSA aims to combine PyMOL and ColabFold to enable the prediction and analysis of 3D protein structures for the scientific end-user. v1.0 has been released on July 10, 2024.
Official Release PyMOL v3.0 has been released on March 12, 2024.
New Plugin CavitOmiX calculate Catalophore™ cavities, predict protein structures with OpenFold by NVIDIA-BioNeMo, ESMFold and retrieve Alphafold models
Official Release PyMOL v2.5 has been released on May 10, 2021.
Python 3 New Python 3 compatibility guide for scripts and plugins
POSF New PyMOL fellowship announced for 2022-2023
Tutorial Plugins Tutorial updated for PyQt5
New Plugin PICv is a new plugin for clustering protein-protein interactions and visualization with available data from PDBe
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...
NOTOC NOEDITSECTIONThe Group command creates or updates a "group" object. The grouped objects are collected underneath a + sign in the object tree (see images) in the Pymol Internal Gui.

Group is tremendously helpful with multi-state or multi-structure sessions. Wildcards work great, for example:

# put all of objState into the group "ensemble".
group ensemble, objState*

Usage

group name, members, action

Actions:

  • add - Add member to group
  • remove - Remove members from group
  • open - Open the group in the panel so objects can be dragged in
  • close - Close the group in the panel so nothing can be dragged in
  • toggle - Switch between open or close based on current state
  • auto - (Deprecated)
  • ungroup - (Deprecated) use the ungroup command instead
  • empty - Move members to top level but do not delete groups
  • purge - Delete members but do not delete groups
  • excise - Delete groups but do not delete members
  • raise - (Incentive 3.1+ only) Move the specified group to the top level, relevant for groups within groups

Examples

Creating, opening and closing

group efHand, 1cll 1ggz 1sra

# allow addition and removal from the group
# If a group is open, objects can be added to or removed from 
# it by right-click+drag from the control panel
group efHand, open
# disallow addition/removal from the group
group efHand, close

More advanced usage of groups and naming

# names with dots are treated special

set group_auto_mode, 2

# load the example protein

load $TUT/1hpv.pdb, 1hpv.other

# create the new entry called ".protein" in group 1hpv

extract 1hpv.protein, 1hpv.other and polymer

# create ".ligand in the 1hpv group

extract 1hpv.ligand, 1hpv.other and organic

# supports wildcards

show sticks, *.ligand

hide lines, *.protein

show surface, *.protein within 6 of *.ligand

show lines, byres *.protein within 4 of *.ligand

set two_sided_lighting

set transparency, 0.5

set surface_color, white

# Also, to lexicographically sort the names in the control panel:

order *, yes

Notes

Group objects can usually be used as arguments to commands. It can be processed as a group or as a selection, in which case all the atoms from all objects in the group will be used.


See Also

ungroup order select


{{Extension DPL}}



A Random PyMOL-generated Cover. See Covers.