Main Page

From PyMOLWiki
Revision as of 06:08, 24 December 2022 by Steinkeg (talk | contribs)
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
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...

CalcArea

=Overview=

This code will calculate the area of a given selection. If you have a bunch of disparate selections, or one selection made up of various objects then you can use this to find the area.

The Code

def calcArea(sel, ASA=0, density=3, quiet=1):
	"""
DESCRIPTION

    Calculate the area of an object or selection (as if it were one complete object).

ARGUMENTS

    sel = string: atom selection

    ASA = 0/1: solvent excluded or solvent accessible surface area

    density = int: sampling quality {default: 3}
	"""
	tName = "__temp__for__doArea__"
	cmd.create(tName, sel)
	cmd.flag("ignore", tName, "clear")
	cmd.set("dot_solvent", int(ASA), tName)
	cmd.set("dot_density", int(density), tName)
	theArea = cmd.get_area(tName)
	cmd.delete(tName)
	if not int(quiet):
		print 'Area (solvent %s): %.3f Angstroms^2' % (['excluded',
			'accessible'][int(ASA)], theArea)
	return theArea

cmd.extend('calcArea', calcArea)

See Also

A Random PyMOL-generated Cover. See Covers.