This is a read-only mirror of pymolwiki.org

Difference between revisions of "DrawGridBox"

From PyMOL Wiki
Jump to navigation Jump to search
m (10 revisions)
 
(6 intermediate revisions by one other user not shown)
Line 28: Line 28:
  
 
== Examples ==
 
== Examples ==
 
Combining DSSR block representation with regular PyMOL cartoons:
 
  
 
<source lang="python">
 
<source lang="python">
Line 35: Line 33:
 
fetch 1cbh
 
fetch 1cbh
 
show surface
 
show surface
drawgridbox 1cbh, nx=5, ny=5, lw=1, nz=5, g=0, b=0
+
drawgridbox 1cbh, nx=5, ny=5, nz=5,  lw=1, g=0, b=0
 
</source>
 
</source>
  
[[File:Drawgridbox.png|200px|thumb|left]]
+
[[File:Drawgridbox.png|200px]]
 +
 
  
 
<source lang="python">
 
<source lang="python">
drawgridbox 1cbh, nx=5, ny=5,nz=5, padding=5, lw=1, r=0, g=0
+
drawgridbox 1cbh, nx=5, ny=5, nz=5, padding=5, lw=1, r=0, g=0
 
</source>
 
</source>
  
[[File:Drawgridbox padding.png|200px|thumb|left]]
+
[[File:Drawgridbox padding.png|200px]]
  
  

Latest revision as of 05:42, 31 May 2016

Type Python Script
Download drawgridbox.py
Author(s) Cunliang Geng
License BSD-2-Clause
This code has been put under version control in the project Pymol-script-repo

This script adds the drawgridbox command, which draw grid boxes around a selection.

Usage

 drawgridbox [ selection,  [nx, [ny, [nz, [padding, [lw, [r, [g, [b]]]]]]]]]


Prameters

  • selection = str: atom selection {default: all}
  • nx = int: number of grids on axis X {default: 10}
  • ny = int: number of grids on axis Y {default: 10}
  • nz = int: number of grids on axis Z {default: 10}
  • padding = float: default 0.0
  • lw = float: line width {default: 2.0}
  • r = float: red color component, valid range is [0.0, 1.0] {default 1.0}
  • g = float: green color component, valid range is [0.0, 1.0] {default 1.0}
  • b = float: blue color component, valid range is [0.0, 1.0] {default 1.0}


Examples

load drawgridbox.py
fetch 1cbh
show surface
drawgridbox 1cbh, nx=5, ny=5, nz=5,  lw=1, g=0, b=0

Drawgridbox.png


drawgridbox 1cbh, nx=5, ny=5, nz=5, padding=5, lw=1, r=0, g=0

Drawgridbox padding.png