Difference between revisions of "User:Remig/plico/turn"
m |
(Add menu toggle) |
||
| Line 1: | Line 1: | ||
| − | '''Turn''' allows the user to make type I and II reverse turns and beta-hairpins in polypeptides with a single mouse click on the corner oxygen where you want the turn. ALT-CLICK creates a type I turn and SHIFT-CLICK makes a type II. Either on a proline N rotates the omega bond 180 for a cis/trans transition. | + | '''Turn''' allows the user to make type I and II reverse turns and beta-hairpins in polypeptides with a single mouse click on the corner oxygen where you want the turn. ALT-CLICK creates a type I turn and SHIFT-CLICK makes a type II. Either on a proline N rotates the omega bond 180 for a cis/trans transition. Note that GLY oxygens and PRO nitrogens are haloed to indicate the usual sites of action. |
'''Turn''' is a member of the Plico suite of protein folding tools described [[User:Remig/plico|here]]. It may be installed and accessed as a macro with the file: | '''Turn''' is a member of the Plico suite of protein folding tools described [[User:Remig/plico|here]]. It may be installed and accessed as a macro with the file: | ||
| Line 12: | Line 12: | ||
<pre># turn - Jmol script by Ron Mignery | <pre># turn - Jmol script by Ron Mignery | ||
# | # | ||
| − | # v1. | + | # v1.4 beta 7/24/2015 -add menu toggle |
# | # | ||
# Apply a type I or type II turn to a polypeptide | # Apply a type I or type II turn to a polypeptide | ||
| − | # | + | # or do cis <- trans on proline |
# Bound to ALT-LEFT-CLICK by plico_turn | # Bound to ALT-LEFT-CLICK by plico_turn | ||
function turn_cargo_1_mb() { | function turn_cargo_1_mb() { | ||
| + | set echo TOP LEFT | ||
| + | background ECHO pink | ||
# If O atom picked | # If O atom picked | ||
| Line 24: | Line 26: | ||
gChain = {atomIndex=_atomPicked}.chain | gChain = {atomIndex=_atomPicked}.chain | ||
var cMidx = get_sc_bb_idx (_atomPicked, gChain) | var cMidx = get_sc_bb_idx (_atomPicked, gChain) | ||
| − | + | ||
var caMidx = get_nward_bb_idx (cMidx, gChain) | var caMidx = get_nward_bb_idx (cMidx, gChain) | ||
var nMidx = get_nward_bb_idx (caMidx, gChain) | var nMidx = get_nward_bb_idx (caMidx, gChain) | ||
| Line 32: | Line 34: | ||
var cPidx = get_cward_bb_idx (caPidx, gChain) | var cPidx = get_cward_bb_idx (caPidx, gChain) | ||
var cnPidx = get_cward_bb_idx (cPidx, gChain) | var cnPidx = get_cward_bb_idx (cPidx, gChain) | ||
| − | + | ||
save state gState | save state gState | ||
select_nward_idx(caPidx, 0) | select_nward_idx(caPidx, 0) | ||
| Line 42: | Line 44: | ||
select_nward_idx(nMidx, 0) | select_nward_idx(nMidx, 0) | ||
set_dihedral_idx(cMidx, caMidx, nMidx, ncMidx, -40) # nWard Phi | set_dihedral_idx(cMidx, caMidx, nMidx, ncMidx, -40) # nWard Phi | ||
| − | + | ||
| − | + | after_fold() | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
} | } | ||
| Line 58: | Line 55: | ||
var cMidx = get_nward_bb_idx (_atomPicked, gChain) | var cMidx = get_nward_bb_idx (_atomPicked, gChain) | ||
| − | # Rotate 180 on omega | + | # Rotate 180 on omega |
select_nward_idx(cMidx, 0) | select_nward_idx(cMidx, 0) | ||
rotateSelected {atomIndex=_atomPicked} {atomIndex=cMidx} 180.0 | rotateSelected {atomIndex=_atomPicked} {atomIndex=cMidx} 180.0 | ||
| − | + | after_fold() | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
} | } | ||
| + | set echo TOP LEFT | ||
| + | background ECHO yellow | ||
} | } | ||
# Bound to SHIFT-LEFT-CLICK by plico_turn | # Bound to SHIFT-LEFT-CLICK by plico_turn | ||
function turn_cargo_2_mb() { | function turn_cargo_2_mb() { | ||
| + | |||
| + | set echo TOP LEFT | ||
| + | background ECHO pink | ||
# If O atom picked | # If O atom picked | ||
| Line 79: | Line 76: | ||
var caMidx = get_nward_bb_idx (_atomPicked, gChain) | var caMidx = get_nward_bb_idx (_atomPicked, gChain) | ||
var cMidx = get_cward_bb_idx (caMidx, gChain) | var cMidx = get_cward_bb_idx (caMidx, gChain) | ||
| − | + | ||
save state gState | save state gState | ||
var caMidx = get_nward_bb_idx (cMidx, gChain) | var caMidx = get_nward_bb_idx (cMidx, gChain) | ||
| Line 88: | Line 85: | ||
var cPidx = get_cward_bb_idx (caPidx, gChain) | var cPidx = get_cward_bb_idx (caPidx, gChain) | ||
var cnPidx = get_cward_bb_idx (cPidx, gChain) | var cnPidx = get_cward_bb_idx (cPidx, gChain) | ||
| − | + | ||
# Hi to lo since N-terminal is to move | # Hi to lo since N-terminal is to move | ||
select_nward_idx(caPidx, 0) | select_nward_idx(caPidx, 0) | ||
| Line 99: | Line 96: | ||
set_dihedral_idx(cMidx, caMidx, nMidx, ncMidx, -70) # nWard Phi | set_dihedral_idx(cMidx, caMidx, nMidx, ncMidx, -70) # nWard Phi | ||
| − | + | after_fold() | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
} | } | ||
| Line 114: | Line 106: | ||
var cMidx = get_nward_bb_idx (_atomPicked, gChain) | var cMidx = get_nward_bb_idx (_atomPicked, gChain) | ||
| − | # Rotate 180 on omega | + | # Rotate 180 on omega |
select_nward_idx(cMidx, 0) | select_nward_idx(cMidx, 0) | ||
rotateSelected {atomIndex=_atomPicked} {atomIndex=cMidx} 180.0 | rotateSelected {atomIndex=_atomPicked} {atomIndex=cMidx} 180.0 | ||
| − | handle_collisions( 0) | + | after_fold() |
| − | + | } | |
| − | + | set echo TOP LEFT | |
| + | background ECHO yellow | ||
| + | } | ||
| + | |||
| + | function after_fold() { | ||
| + | handle_collisions( 0) | ||
| + | var c = count_collisions(({})) | ||
| + | if (c > 0) { | ||
| + | refresh | ||
| + | if (prompt( format("%d collisions detected - undo fold?", c), | ||
| + | "Yes|No", true) = "Yes") { | ||
restore state gState | restore state gState | ||
connect | connect | ||
| Line 131: | Line 133: | ||
# Load common functions if not already | # Load common functions if not already | ||
| + | if (kCommon < 6) { | ||
| + | script $SCRIPT_PATH$plicoCommon.spt | ||
| + | if (kCommon < 6) { | ||
| + | prompt ("A newer version of plicoCommon.SPT is required") | ||
| + | quit | ||
| + | } | ||
| + | } | ||
| + | |||
if (kTug < 3) { | if (kTug < 3) { | ||
script $SCRIPT_PATH$tug.spt | script $SCRIPT_PATH$tug.spt | ||
| Line 138: | Line 148: | ||
} | } | ||
} | } | ||
| − | + | ||
gPlico = "TURN" | gPlico = "TURN" | ||
| − | plico_prelim( | + | plico_prelim(true) |
| − | + | ||
select (GLY and Oxygen) or (PRO and Nitrogen) | select (GLY and Oxygen) or (PRO and Nitrogen) | ||
halo on | halo on | ||
| − | select | + | var f = (_frameID/1000000) |
| + | var m = (_frameID%1000000) | ||
| + | select ((file=f) and (model=m)) | ||
gEcho = ("_______TURN_______| *** Click on O ***| (or proline N)|ALT-CLICK=Type I" + | gEcho = ("_______TURN_______| *** Click on O ***| (or proline N)|ALT-CLICK=Type I" + | ||
"|SHIFT-CLICK=Type II|DOUBLE-CLICK=exit") | "|SHIFT-CLICK=Type II|DOUBLE-CLICK=exit") | ||
echo @gEcho | echo @gEcho | ||
gChain = "" | gChain = "" | ||
| + | gMenuMin = false | ||
unbind | unbind | ||
| Line 156: | Line 169: | ||
bind "SHIFT-LEFT-CLICK" "+:turn_cargo_2_mb"; | bind "SHIFT-LEFT-CLICK" "+:turn_cargo_2_mb"; | ||
bind "DOUBLE" "plico_exit"; | bind "DOUBLE" "plico_exit"; | ||
| + | bind "LEFT-CLICK" "+:plico_menu_toggle"; | ||
} | } | ||
# End of TURN.SPT</pre> | # End of TURN.SPT</pre> | ||
Revision as of 18:46, 24 July 2015
Turn allows the user to make type I and II reverse turns and beta-hairpins in polypeptides with a single mouse click on the corner oxygen where you want the turn. ALT-CLICK creates a type I turn and SHIFT-CLICK makes a type II. Either on a proline N rotates the omega bond 180 for a cis/trans transition. Note that GLY oxygens and PRO nitrogens are haloed to indicate the usual sites of action.
Turn is a member of the Plico suite of protein folding tools described here. It may be installed and accessed as a macro with the file:
Title=PLICO Turn Script=script <path to your scripts folder>/turn.spt;plico_turn
saved as plicoTurn.macro in your .jmol/macros folder as described in Macro.
A copy of the Plico script tug.spt must be in the same directory as this script.
Copy and paste the following to a text editor and save to your scripts directory as turn.spt:
# turn - Jmol script by Ron Mignery
#
# v1.4 beta 7/24/2015 -add menu toggle
#
# Apply a type I or type II turn to a polypeptide
# or do cis <- trans on proline
# Bound to ALT-LEFT-CLICK by plico_turn
function turn_cargo_1_mb() {
set echo TOP LEFT
background ECHO pink
# If O atom picked
if ({atomIndex=_atomPicked}.atomName = "O") {
gChain = {atomIndex=_atomPicked}.chain
var cMidx = get_sc_bb_idx (_atomPicked, gChain)
var caMidx = get_nward_bb_idx (cMidx, gChain)
var nMidx = get_nward_bb_idx (caMidx, gChain)
var ncMidx = get_nward_bb_idx (nMidx, gChain)
var nPidx = get_cward_bb_idx (cMidx, gChain)
var caPidx = get_cward_bb_idx (nPidx, gChain)
var cPidx = get_cward_bb_idx (caPidx, gChain)
var cnPidx = get_cward_bb_idx (cPidx, gChain)
save state gState
select_nward_idx(caPidx, 0)
set_dihedral_idx(cnPidx, cPidx, caPidx, nPidx, 0) # cWard Psi
select_nward_idx(nPidx, 0)
set_dihedral_idx(cPidx, caPidx, nPidx, cMidx, -90) # cWard Phi
select_nward_idx(caMidx, 0)
set_dihedral_idx(nPidx, cMidx, caMidx, nMidx, -60) # nWard Psi
select_nward_idx(nMidx, 0)
set_dihedral_idx(cMidx, caMidx, nMidx, ncMidx, -40) # nWard Phi
after_fold()
}
# Else if PRO N atom picked
if (({atomIndex=_atomPicked}.atomName = "N")
and ({atomIndex=_atomPicked}.group = "PRO")) {
gChain = {atomIndex=_atomPicked}.chain
save state gState
var cMidx = get_nward_bb_idx (_atomPicked, gChain)
# Rotate 180 on omega
select_nward_idx(cMidx, 0)
rotateSelected {atomIndex=_atomPicked} {atomIndex=cMidx} 180.0
after_fold()
}
set echo TOP LEFT
background ECHO yellow
}
# Bound to SHIFT-LEFT-CLICK by plico_turn
function turn_cargo_2_mb() {
set echo TOP LEFT
background ECHO pink
# If O atom picked
if ({atomIndex=_atomPicked}.atomName = "O") {
gChain = {atomIndex=_atomPicked}.chain
var caMidx = get_nward_bb_idx (_atomPicked, gChain)
var cMidx = get_cward_bb_idx (caMidx, gChain)
save state gState
var caMidx = get_nward_bb_idx (cMidx, gChain)
var nMidx = get_nward_bb_idx (caMidx, gChain)
var ncMidx = get_nward_bb_idx (nMidx, gChain)
var nPidx = get_cward_bb_idx (cMidx, gChain)
var caPidx = get_cward_bb_idx (nPidx, gChain)
var cPidx = get_cward_bb_idx (caPidx, gChain)
var cnPidx = get_cward_bb_idx (cPidx, gChain)
# Hi to lo since N-terminal is to move
select_nward_idx(caPidx, 0)
set_dihedral_idx(cnPidx, cPidx, caPidx, nPidx, 0) # cWard Psi
select_nward_idx(nPidx, 0)
set_dihedral_idx(cPidx, caPidx, nPidx, cMidx, 90) # cWard Phi
select_nward_idx(caMidx, 0)
set_dihedral_idx(nPidx, cMidx, caMidx, nMidx, 120) # nWard Psi
select_nward_idx(nMidx, 0)
set_dihedral_idx(cMidx, caMidx, nMidx, ncMidx, -70) # nWard Phi
after_fold()
}
# Else if PRO N atom picked
if (({atomIndex=_atomPicked}.atomName = "N")
and ({atomIndex=_atomPicked}.group = "PRO")) {
gChain = {atomIndex=_atomPicked}.chain
save state gState
var cMidx = get_nward_bb_idx (_atomPicked, gChain)
# Rotate 180 on omega
select_nward_idx(cMidx, 0)
rotateSelected {atomIndex=_atomPicked} {atomIndex=cMidx} 180.0
after_fold()
}
set echo TOP LEFT
background ECHO yellow
}
function after_fold() {
handle_collisions( 0)
var c = count_collisions(({}))
if (c > 0) {
refresh
if (prompt( format("%d collisions detected - undo fold?", c),
"Yes|No", true) = "Yes") {
restore state gState
connect
}
}
}
# Top level of Turn
function plico_turn() {
# Load common functions if not already
if (kCommon < 6) {
script $SCRIPT_PATH$plicoCommon.spt
if (kCommon < 6) {
prompt ("A newer version of plicoCommon.SPT is required")
quit
}
}
if (kTug < 3) {
script $SCRIPT_PATH$tug.spt
if (kTug < 3) {
prompt ("A newer version of tug.SPT is required")
quit
}
}
gPlico = "TURN"
plico_prelim(true)
select (GLY and Oxygen) or (PRO and Nitrogen)
halo on
var f = (_frameID/1000000)
var m = (_frameID%1000000)
select ((file=f) and (model=m))
gEcho = ("_______TURN_______| *** Click on O ***| (or proline N)|ALT-CLICK=Type I" +
"|SHIFT-CLICK=Type II|DOUBLE-CLICK=exit")
echo @gEcho
gChain = ""
gMenuMin = false
unbind
bind "ALT-LEFT-CLICK" "_pickAtom";
bind "ALT-LEFT-CLICK" "+:turn_cargo_1_mb";
bind "SHIFT-LEFT-CLICK" "_pickAtom";
bind "SHIFT-LEFT-CLICK" "+:turn_cargo_2_mb";
bind "DOUBLE" "plico_exit";
bind "LEFT-CLICK" "+:plico_menu_toggle";
}
# End of TURN.SPT