Difference between revisions of "User:Remig/plico/turn"
(lc all functions) |
m |
||
(3 intermediate revisions by the same user not shown) | |||
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: | ||
<pre>Title=PLICO Turn | <pre>Title=PLICO Turn | ||
− | Script=script <path to your scripts folder>/turn.spt; | + | Script=script <path to your scripts folder>/turn.spt;plico_turn |
</pre> | </pre> | ||
saved as plicoTurn.macro in your .jmol/macros folder as described in [[Macro]]. | saved as plicoTurn.macro in your .jmol/macros folder as described in [[Macro]]. | ||
Line 12: | Line 12: | ||
<pre># turn - Jmol script by Ron Mignery | <pre># turn - Jmol script by Ron Mignery | ||
# | # | ||
− | # v1. | + | # v1.6 beta 4/12/2016 -require latest common includes |
# | # | ||
# 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 |
+ | # TPEE NPTY motifs | ||
+ | function toggle_pro_cis_trans(r, iChain, toCis) { | ||
+ | var aCA = get_atom_rcn( r, iChain, "CA") | ||
+ | var aN = get_atom_rcn( r, iChain, "N") | ||
+ | var aCp = get_atom_rcn( r-1, iChain, "C") | ||
+ | var aCAp = get_atom_rcn( r-1, iChain, "CA") | ||
+ | if (aCAp >= 0) { | ||
+ | select {(resno < r) and chain=iChain and thisModel} | ||
+ | var cis =(toCis ? toCis : (abs(angle(aCA, aN, aCp, aCAp)) < 30)) | ||
+ | set_dihedral_atoms(aCA, aN, aCp, aCAp, (cis ? 180 : 0)) | ||
+ | } | ||
+ | } | ||
+ | |||
+ | function make_turn(r, iChain, nphi, npsi, cphi, cpsi) { | ||
+ | for (i = 0; i < 2; i++) { | ||
+ | var aCp = get_atom_rcn( r-1, iChain, "C") | ||
+ | var aN = get_atom_rcn( r, iChain, "N") | ||
+ | var aCA = get_atom_rcn( r, iChain, "CA") | ||
+ | var aC = get_atom_rcn( r, iChain, "C") | ||
+ | var aO = get_atom_rcn( r, iChain, "O") | ||
+ | var aNn = get_atom_rcn( r+1, iChain, "N") | ||
+ | if (aNn) { | ||
+ | select {(resno <= r) and not aC and not aO and chain=iChain | ||
+ | and thisModel} | ||
+ | set_dihedral_atoms(aNn, aC, aCA, aN, (i ? cpsi : npsi)) | ||
+ | } | ||
+ | if (aCp and (aCA.group != "PRO")) { | ||
+ | select {(resno < r) and chain=iChain and thisModel} | ||
+ | set_dihedral_atoms(aC, aCA, aN, aCp, (i ? cphi : nphi)) | ||
+ | } | ||
+ | color {resno=r} @gAltScheme | ||
+ | color {(resno=r) and oxygen} pink | ||
+ | |||
+ | r++ | ||
+ | } | ||
+ | |||
+ | after_fold() | ||
+ | } | ||
# 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() { | ||
− | + | var iChain = {atomIndex=_atomPicked}.chain | |
− | + | var r = {atomIndex=_atomPicked}.resno | |
− | + | if ({atomIndex=_atomPicked}.group = "PRO") { | |
− | + | toggle_pro_cis_trans(r, iChain, false) | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
} | } | ||
− | + | else { | |
− | + | make_turn(r, iChain, -60, -30, -90, 0) # I | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
} | } | ||
} | } | ||
Line 73: | Line 69: | ||
# 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() { | ||
+ | var iChain = {atomIndex=_atomPicked}.chain | ||
+ | var r = {atomIndex=_atomPicked}.resno | ||
+ | if ({atomIndex=_atomPicked}.group != "PRO") { | ||
+ | make_turn(r, iChain, -60, 120, 80, 0) # II | ||
+ | } | ||
+ | } | ||
− | + | # Bound to ALT-SHIFT-LEFT-CLICK by plico_turn | |
− | + | function turn_cargo_1i_mb() { | |
− | + | var iChain = {atomIndex=_atomPicked}.chain | |
− | + | var r = {atomIndex=_atomPicked}.resno | |
− | + | if ({atomIndex=_atomPicked}.group = "PRO") { | |
− | + | toggle_pro_cis_trans(r, iChain, true) | |
− | + | make_turn(r, iChain, -57, 120, -90, 0) # VIa1 | |
− | + | } | |
− | + | else { | |
− | + | make_turn(r, iChain, 60, 30, 90, 0) # I' | |
− | + | } | |
− | + | } | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | # Bound to SHIFT-CTRL-CLICK by plico_turn | |
− | + | function turn_cargo_2i_mb() { | |
− | + | var iChain = {atomIndex=_atomPicked}.chain | |
− | + | var r = {atomIndex=_atomPicked}.resno | |
− | + | if ({atomIndex=_atomPicked}.group = "PRO") { | |
− | + | toggle_pro_cis_trans(r, iChain, true) | |
+ | make_turn(r, iChain, -57, 120, -60, 0) # VIa2 | ||
+ | } | ||
+ | else { | ||
+ | make_turn(r, iChain, 60, -120, -80, 0) # II' | ||
} | } | ||
+ | } | ||
− | + | # Bound to ALT-CTRL-SHIFT-LEFT-CLICK by plico_turn | |
− | + | function turn_cargo_8_mb() { | |
− | + | var iChain = {atomIndex=_atomPicked}.chain | |
− | + | var r = {atomIndex=_atomPicked}.resno | |
− | + | if ({atomIndex=_atomPicked}.group = "PRO") { | |
− | + | toggle_pro_cis_trans(r, iChain, true) | |
− | + | make_turn(r, iChain, -57, 135, -75, 160) # VIb | |
− | + | } | |
− | + | else { | |
− | + | make_turn(r, iChain, -60, -120, 120, 0) # VIII | |
+ | } | ||
+ | } | ||
− | + | function after_fold() { | |
− | + | to_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 132: | ||
# Load common functions if not already | # Load common functions if not already | ||
− | if ( | + | if (kCommon < 7) { |
− | script $SCRIPT_PATH$ | + | script $SCRIPT_PATH$plicoCommon.spt |
− | if ( | + | if (kCommon < 7) { |
− | prompt ("A newer version of | + | prompt ("A newer version of plicoCommon.SPT is required") |
+ | quit | ||
+ | } | ||
+ | } | ||
+ | |||
+ | if (kNTCommon < 6) { | ||
+ | script $SCRIPT_PATH$plicoNTcommon.spt | ||
+ | if (kNTcommon < 6) { | ||
+ | prompt ("A newer version of plicoNTcommon.SPT is required") | ||
quit | quit | ||
} | } | ||
Line 140: | Line 149: | ||
gPlico = "TURN" | gPlico = "TURN" | ||
− | plico_prelim( | + | plico_prelim(true, true) |
− | + | ||
− | + | gEcho = ("___________TURN___________" + | |
− | + | "|ALT-CLICK=Type I (or PRO C/T)|CTRL-SHIFT-CLICK=Type II" + | |
− | + | "|ALT-SHIFT-CLICK=Type I' (VIa1)|ALT-CTRL-CLICK=Type II' (VIa2)" + | |
− | + | "|ALT-CTRL-SHIFT-CLICK=Type VIII (VIb)|SHIFT-DOUBLE-CLICK=exit") | |
− | "|SHIFT-CLICK=Type | ||
echo @gEcho | echo @gEcho | ||
− | |||
− | |||
bind "ALT-LEFT-CLICK" "_pickAtom"; | bind "ALT-LEFT-CLICK" "_pickAtom"; | ||
bind "ALT-LEFT-CLICK" "+:turn_cargo_1_mb"; | bind "ALT-LEFT-CLICK" "+:turn_cargo_1_mb"; | ||
− | bind "SHIFT-LEFT-CLICK" "_pickAtom"; | + | bind "CTRL-SHIFT-LEFT-CLICK" "_pickAtom"; |
− | bind "SHIFT-LEFT-CLICK" "+:turn_cargo_2_mb"; | + | bind "CTRL-SHIFT-LEFT-CLICK" "+:turn_cargo_2_mb"; |
− | bind "DOUBLE" "plico_exit"; | + | bind "ALT-SHIFT-LEFT-CLICK" "_pickAtom"; |
+ | bind "ALT-SHIFT-LEFT-CLICK" "+:turn_cargo_1i_mb"; | ||
+ | bind "ALT-CTRL-LEFT-CLICK" "_pickAtom"; | ||
+ | bind "ALT-CTRL-LEFT-CLICK" "+:turn_cargo_2i_mb"; | ||
+ | bind "ALT-CTRL-SHIFT-LEFT-CLICK" "_pickAtom"; | ||
+ | bind "ALT-CTRL-SHIFT-LEFT-CLICK" "+:turn_cargo_8_mb"; | ||
+ | |||
+ | bind "SHIFT-DOUBLE" "plico_exit(true)"; | ||
+ | bind "LEFT-CLICK" "+:plico_menu_toggle"; | ||
} | } | ||
# End of TURN.SPT</pre> | # End of TURN.SPT</pre> |
Latest revision as of 17:24, 12 April 2016
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.6 beta 4/12/2016 -require latest common includes # # Apply a type I or type II turn to a polypeptide # or do cis <- trans on proline # TPEE NPTY motifs function toggle_pro_cis_trans(r, iChain, toCis) { var aCA = get_atom_rcn( r, iChain, "CA") var aN = get_atom_rcn( r, iChain, "N") var aCp = get_atom_rcn( r-1, iChain, "C") var aCAp = get_atom_rcn( r-1, iChain, "CA") if (aCAp >= 0) { select {(resno < r) and chain=iChain and thisModel} var cis =(toCis ? toCis : (abs(angle(aCA, aN, aCp, aCAp)) < 30)) set_dihedral_atoms(aCA, aN, aCp, aCAp, (cis ? 180 : 0)) } } function make_turn(r, iChain, nphi, npsi, cphi, cpsi) { for (i = 0; i < 2; i++) { var aCp = get_atom_rcn( r-1, iChain, "C") var aN = get_atom_rcn( r, iChain, "N") var aCA = get_atom_rcn( r, iChain, "CA") var aC = get_atom_rcn( r, iChain, "C") var aO = get_atom_rcn( r, iChain, "O") var aNn = get_atom_rcn( r+1, iChain, "N") if (aNn) { select {(resno <= r) and not aC and not aO and chain=iChain and thisModel} set_dihedral_atoms(aNn, aC, aCA, aN, (i ? cpsi : npsi)) } if (aCp and (aCA.group != "PRO")) { select {(resno < r) and chain=iChain and thisModel} set_dihedral_atoms(aC, aCA, aN, aCp, (i ? cphi : nphi)) } color {resno=r} @gAltScheme color {(resno=r) and oxygen} pink r++ } after_fold() } # Bound to ALT-LEFT-CLICK by plico_turn function turn_cargo_1_mb() { var iChain = {atomIndex=_atomPicked}.chain var r = {atomIndex=_atomPicked}.resno if ({atomIndex=_atomPicked}.group = "PRO") { toggle_pro_cis_trans(r, iChain, false) } else { make_turn(r, iChain, -60, -30, -90, 0) # I } } # Bound to SHIFT-LEFT-CLICK by plico_turn function turn_cargo_2_mb() { var iChain = {atomIndex=_atomPicked}.chain var r = {atomIndex=_atomPicked}.resno if ({atomIndex=_atomPicked}.group != "PRO") { make_turn(r, iChain, -60, 120, 80, 0) # II } } # Bound to ALT-SHIFT-LEFT-CLICK by plico_turn function turn_cargo_1i_mb() { var iChain = {atomIndex=_atomPicked}.chain var r = {atomIndex=_atomPicked}.resno if ({atomIndex=_atomPicked}.group = "PRO") { toggle_pro_cis_trans(r, iChain, true) make_turn(r, iChain, -57, 120, -90, 0) # VIa1 } else { make_turn(r, iChain, 60, 30, 90, 0) # I' } } # Bound to SHIFT-CTRL-CLICK by plico_turn function turn_cargo_2i_mb() { var iChain = {atomIndex=_atomPicked}.chain var r = {atomIndex=_atomPicked}.resno if ({atomIndex=_atomPicked}.group = "PRO") { toggle_pro_cis_trans(r, iChain, true) make_turn(r, iChain, -57, 120, -60, 0) # VIa2 } else { make_turn(r, iChain, 60, -120, -80, 0) # II' } } # Bound to ALT-CTRL-SHIFT-LEFT-CLICK by plico_turn function turn_cargo_8_mb() { var iChain = {atomIndex=_atomPicked}.chain var r = {atomIndex=_atomPicked}.resno if ({atomIndex=_atomPicked}.group = "PRO") { toggle_pro_cis_trans(r, iChain, true) make_turn(r, iChain, -57, 135, -75, 160) # VIb } else { make_turn(r, iChain, -60, -120, 120, 0) # VIII } } function after_fold() { to_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 < 7) { script $SCRIPT_PATH$plicoCommon.spt if (kCommon < 7) { prompt ("A newer version of plicoCommon.SPT is required") quit } } if (kNTCommon < 6) { script $SCRIPT_PATH$plicoNTcommon.spt if (kNTcommon < 6) { prompt ("A newer version of plicoNTcommon.SPT is required") quit } } gPlico = "TURN" plico_prelim(true, true) gEcho = ("___________TURN___________" + "|ALT-CLICK=Type I (or PRO C/T)|CTRL-SHIFT-CLICK=Type II" + "|ALT-SHIFT-CLICK=Type I' (VIa1)|ALT-CTRL-CLICK=Type II' (VIa2)" + "|ALT-CTRL-SHIFT-CLICK=Type VIII (VIb)|SHIFT-DOUBLE-CLICK=exit") echo @gEcho bind "ALT-LEFT-CLICK" "_pickAtom"; bind "ALT-LEFT-CLICK" "+:turn_cargo_1_mb"; bind "CTRL-SHIFT-LEFT-CLICK" "_pickAtom"; bind "CTRL-SHIFT-LEFT-CLICK" "+:turn_cargo_2_mb"; bind "ALT-SHIFT-LEFT-CLICK" "_pickAtom"; bind "ALT-SHIFT-LEFT-CLICK" "+:turn_cargo_1i_mb"; bind "ALT-CTRL-LEFT-CLICK" "_pickAtom"; bind "ALT-CTRL-LEFT-CLICK" "+:turn_cargo_2i_mb"; bind "ALT-CTRL-SHIFT-LEFT-CLICK" "_pickAtom"; bind "ALT-CTRL-SHIFT-LEFT-CLICK" "+:turn_cargo_8_mb"; bind "SHIFT-DOUBLE" "plico_exit(true)"; bind "LEFT-CLICK" "+:plico_menu_toggle"; } # End of TURN.SPT