This is a read-only mirror of pymolwiki.org

Dssr block

From PyMOL Wiki
Revision as of 04:50, 11 December 2017 by Cchem (talk | contribs) (1 revision)
Jump to navigation Jump to search
Type Python Script
Download dssr_block.py
Author(s) Thomas Holder
License BSD-2-Clause
This code has been put under version control in the project Pymol-script-repo

This script adds the dssr_block command, which is a simple wrapper for the DSSR program and can create "block" shaped cartoons for nucleic acid bases and base pairs.

Requires the x3dna-dssr executable, obtainable from http://x3dna.org

See also the blog post by DSSR author Xiang-Jun Lu: http://x3dna.org/highlights/dssr-base-blocks-in-pymol-interactively

Recommended Setup

Place the x3dna-dssr executable into $PATH. Examples:

  • Linux/Mac: /usr/bin/x3dna-dssr
  • Windows: C:\Program Files\PyMOL\PyMOL\x3dna-dssr.exe

The script can be run, imported as a Python module, or installed with the Plugin Manager.

Usage

dssr_block [ selection [, state [, block_file [, block_depth
       [, block_color [, name [, exe ]]]]]]]

Arguments

  • selection = str: atom selection {default: all}
  • state = int: object state (0 for all states) {default: -1, current state}
  • block_file = face|edge|wc|equal|minor|gray: Corresponds to the --block-file option (see DSSR manual). Values can be combined, e.g. "wc-minor". {default: face}
  • block_depth = float: thickness of rectangular blocks {default: 0.5}
  • block_color = str: Corresponds to the --block-color option (new in DSSR v1.5.2) {default: }
  • name = str: name of new CGO object {default: dssr_block##}
  • exe = str: path to "x3dna-dssr" executable {default: x3dna-dssr}

Examples

Combining DSSR block representation with regular PyMOL cartoons:

fetch 1ehz, async=0
as cartoon
set cartoon_ladder_radius, 0.1
set cartoon_ladder_color, gray
set cartoon_nucleic_acid_mode, 1
dssr_block

Joined base-pair blocks (block_file=wc):

fetch 1ehz, async=0
dssr_block block_file=wc

Multi-state Example:

fetch 2n2d, async=0
dssr_block 2n2d, 0
set all_states

Custom coloring:

fetch 1msy, async=0
dssr_block block_color=N red | minor 0.9 | major yellow

See Also