Show bumps: Difference between revisions

From PyMOLWiki
Jump to navigation Jump to search
(Created page with "This is a script to visualize VDW clashes, just like the mutagenesis wizard does. Posted on [http://www.mail-archive.com/pymol-users@lists.sourceforge.net/msg09190.html pymo...")
 
(moved to github)
Line 1: Line 1:
{{Infobox script-repo
|type      = module
|filename  = show_bumps.py
|author    = [[User:Speleo3|Thomas Holder]]
|license  = BSD-2-Clause
}}
This is a script to visualize VDW clashes, just like the [[mutagenesis]] wizard does.
This is a script to visualize VDW clashes, just like the [[mutagenesis]] wizard does.


Posted on [http://www.mail-archive.com/pymol-users@lists.sourceforge.net/msg09190.html pymol-users mailing list].
Posted on [http://www.mail-archive.com/pymol-users@lists.sourceforge.net/msg09190.html pymol-users mailing list].


= The Script =
== Usage ==
 
<source lang="python">
from pymol import cmd
 
def show_bumps(selection='(all)', name='bump_check', quiet=1):
    '''
DESCRIPTION
 
    Visualize VDW clashes
 
ARGUMENTS
 
    selection = string: atom selection {default: all}


    name = string: name of CGO object to create {default: bump_check}
show_bumps [ selection [, name ]]
    '''
    cmd.delete(name)
    cmd.create(name, selection, zoom=0)
    cmd.sculpt_activate(name)
    cmd.show_as('cgo', name)
    cmd.set('sculpt_vdw_vis_mode', 1, name)
    cmd.set('sculpt_field_mask', 0x020) # cSculptVDW
    strain = cmd.sculpt_iterate(name, cycles=1)
    if not int(quiet):
        print 'VDW Strain:', strain
    return strain


cmd.extend('show_bumps', show_bumps)
[[Category:Script_Library]]
</source>
[[Category:Pymol-script-repo]]

Revision as of 04:00, 21 May 2012

Type Python Module
Download show_bumps.py
Author(s) Thomas Holder
License BSD-2-Clause
This code has been put under version control in the project Pymol-script-repo

This is a script to visualize VDW clashes, just like the mutagenesis wizard does.

Posted on pymol-users mailing list.

Usage

show_bumps [ selection [, name ]]