Main Page

From PyMOLWiki
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.4 has been released on May 20, 2020.
Python 3 New Python 3 compatibility guide for scripts and plugins
POSF New PyMOL fellows announced for 2018-2019
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...

CreateAtom

A script to create an atom C at a point some distance d from a pair of atoms (A, B), along the line of the bond A-B. The main function takes a modelName (usually, the name of the file loaded, like "1pqr" or "peptide"), a distance, and some parameters to identify the atoms A, B. Use like:
createAtomAlongBond("gly", 3, 23, "H", 23, "N", "O")
.

<source lang="python"> import cmd from chempy import models, cpv

""" Create an atom at a distance 'distance' along the bond between atomA and atomB """ def createAtomAlongBond(modelName, distance, resiA, atomNameA, resiB, atomNameB, atomNameC):

   model = cmd.get_model(modelName)
   p1 = getAtomCoords(model, str(resiA), atomNameA)
   p2 = getAtomCoords(model, str(resiB), atomNameB)
   if p1 is None:
       print "atom not found!", modelName, resiA, atomNameA
   elif p2 is None:
       print "atom not found!", modelName, resiB, atomNameB
   else:
       p3 = calculateNewPoint(p1, p2, distance)
       # the details of the new atom
       atomDetails = {}
        ..→
A Random PyMOL-generated Cover. See Covers.