Main Page

From PyMOLWiki
Revision as of 05:27, 19 February 2019 by Speleo3 (talk | contribs) (2to3)
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
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
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...

Quick dist

quick_dist will quickly find and write out the pairwise distances between two selections in PyMOL. On my machine this will write about 80,000 distance measures/second.


#
# quick_dist.py
#
def quick_dist(s1, s2, inFile=None):
  import math
  m1 = cmd.get_model(s1)
  m2 = cmd.get_model(s2)

  if inFile!=None:
    f = open(inFile, 'w')
    f.write("ATOM1\tATOM2\tDIST\n")

  s=""

  for c1 in range(len(m1.atom)):
    for c2 in range(len(m2.atom)):
      s+="%s/%d\t%s/%d\t%3.2f\n" % (m1.atom[c1].name, m1.atom[c1].index,\
        m2.atom[c2].name, m2.atom[c2].index,\
        math.sqrt(sum(map(lambda f: (f[0]-f[1])**2, zip(a1.coord,a2.coord)))))

  if inFile!=None:
    f.write(s)
    f.close()
  else:
    print s


cmd.extend("quick_dist", quick_dist)
A Random PyMOL-generated Cover. See Covers.