Difference between revisions of "User:Remig/plico/turn"

From Jmol
Jump to navigation Jump to search
(Plico turn module)
 
(Add proline cis/trans)
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.
+
'''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''' 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 10: Line 10:
 
<pre>#  turn - Jmol script by Ron Mignery
 
<pre>#  turn - Jmol script by Ron Mignery
 
#*****Replace <SCRIPT_PATH> with path to your scripts folder before use***
 
#*****Replace <SCRIPT_PATH> with path to your scripts folder before use***
#  v1.0 beta    2/14/2014 for Jmol 14
+
#  v1.1 beta    2/14/2014 for Jmol 14 - add proline cis/trans
 
#
 
#
 
#  Apply a type I or type II turn to a polypeptide
 
#  Apply a type I or type II turn to a polypeptide
Line 46: Line 46:
 
             var p = prompt("Unable to handle all collisions!")
 
             var p = prompt("Unable to handle all collisions!")
 
             restore state gState
 
             restore state gState
 +
            connect
 +
        }
 +
    }
 +
 +
    # 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 = getNwardBBidx (_atomPicked, gChain)
 +
 +
        # Rotate 180 on omega       
 +
        selectNwardIdx(cMidx, 0)
 +
        rotateSelected {atomIndex=_atomPicked} {atomIndex=cMidx} 180.0
 +
 +
        handleCollisions2( 0)
 +
        if (countcollisions(({})) > 0) {
 +
            var p = prompt("Unable to handle all collisions!")
 +
            restore state gState
 +
            connect
 
         }
 
         }
 
     }
 
     }
Line 57: Line 77:
 
     if ({atomIndex=_atomPicked}.atomName = "O") {
 
     if ({atomIndex=_atomPicked}.atomName = "O") {
 
         gChain = {atomIndex=_atomPicked}.chain
 
         gChain = {atomIndex=_atomPicked}.chain
         var cMidx = getScBBidx (_atomPicked, gChain)
+
        var caMidx = getNwardBBidx (_atomPicked, gChain)
 +
         var cMidx = getCwardBBidx (caMidx, gChain)
 
          
 
          
 
         save state gState
 
         save state gState
Line 82: Line 103:
 
             var p = prompt("Unable to handle all collisions!")
 
             var p = prompt("Unable to handle all collisions!")
 
             restore state gState
 
             restore state gState
 +
            connect
 +
        }
 +
    }
 +
 +
    # 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 = getNwardBBidx (_atomPicked, gChain)
 +
 +
        # Rotate 180 on omega       
 +
        selectNwardIdx(cMidx, 0)
 +
        rotateSelected {atomIndex=_atomPicked} {atomIndex=cMidx} 180.0
 +
 +
        handleCollisions2( 0)
 +
        if (countcollisions(({})) > 0) {
 +
            var p = prompt("Unable to handle all collisions!")
 +
            restore state gState
 +
            connect
 
         }
 
         }
 
     }
 
     }
Line 101: Line 142:
 
     plicoPrelim()
 
     plicoPrelim()
 
      
 
      
     select GLY and Oxygen
+
     select (GLY and Oxygen) or (PRO and Nitrogen)
 
     halo on
 
     halo on
 
     select all
 
     select all
     gEcho = ("_______TURN_______|  *** Click on O ***|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

Revision as of 16:15, 26 February 2014

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 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;plicoTurn

saved as plicoTurn.macro in your .jmol/macros folder as described in Macro.

Copy and paste the following to a text editor and save to your scripts folder as turn.spt, replacing the text "<SCRIPT_PATH>" with the path to your scripts:

#   turn - Jmol script by Ron Mignery
#*****Replace <SCRIPT_PATH> with path to your scripts folder before use***
#   v1.1 beta    2/14/2014 for Jmol 14 - add proline cis/trans
#
#   Apply a type I or type II turn to a polypeptide
#

# Bound to ALT-LEFT-CLICK by plicoTurn
function turnCargo1MB() {
print "turnCargo1MB()"#TBD

    # If O atom picked
    if ({atomIndex=_atomPicked}.atomName = "O") {
        gChain = {atomIndex=_atomPicked}.chain
        var cMidx = getScBBidx (_atomPicked, gChain)
        
        var caMidx = getNwardBBidx (cMidx, gChain)
        var nMidx = getNwardBBidx (caMidx, gChain)
        var ncMidx = getNwardBBidx (nMidx, gChain)
        var nPidx = getCwardBBidx (cMidx, gChain)
        var caPidx = getCwardBBidx (nPidx, gChain)
        var cPidx = getCwardBBidx (caPidx, gChain)
        var cnPidx = getCwardBBidx (cPidx, gChain)
        
        save state gState
        selectNwardIdx(caPidx, 0)
        setDihedralIdx(cnPidx, cPidx, caPidx, nPidx, 0) # cWard Psi
        selectNwardIdx(nPidx, 0)
        setDihedralIdx(cPidx, caPidx, nPidx, cMidx, -90) # cWard Phi
        selectNwardIdx(caMidx, 0)
        setDihedralIdx(nPidx, cMidx, caMidx, nMidx, -60) # nWard Psi
        selectNwardIdx(nMidx, 0)
        setDihedralIdx(cMidx, caMidx, nMidx, ncMidx, -40) # nWard Phi
        
        handleCollisions2( 0)
        if (countcollisions(({})) > 0) {
            var p = prompt("Unable to handle all collisions!")
            restore state gState
            connect
        }
    }

    # 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 = getNwardBBidx (_atomPicked, gChain)

        # Rotate 180 on omega        
        selectNwardIdx(cMidx, 0)
        rotateSelected {atomIndex=_atomPicked} {atomIndex=cMidx} 180.0

        handleCollisions2( 0)
        if (countcollisions(({})) > 0) {
            var p = prompt("Unable to handle all collisions!")
            restore state gState
            connect
        }
    }
}

# Bound to SHIFT-LEFT-CLICK by plicoTurn
function turnCargo2MB() {
print "turnCargo2MB()"#TBD

    # If O atom picked
    if ({atomIndex=_atomPicked}.atomName = "O") {
        gChain = {atomIndex=_atomPicked}.chain
        var caMidx = getNwardBBidx (_atomPicked, gChain)
        var cMidx = getCwardBBidx (caMidx, gChain)
        
        save state gState
        var caMidx = getNwardBBidx (cMidx, gChain)
        var nMidx = getNwardBBidx (caMidx, gChain)
        var ncMidx = getNwardBBidx (nMidx, gChain)
        var nPidx = getCwardBBidx (cMidx, gChain)
        var caPidx = getCwardBBidx (nPidx, gChain)
        var cPidx = getCwardBBidx (caPidx, gChain)
        var cnPidx = getCwardBBidx (cPidx, gChain)
        
        # Hi to lo since N-terminal is to move
        selectNwardIdx(caPidx, 0)
        setDihedralIdx(cnPidx, cPidx, caPidx, nPidx, 0) # cWard Psi
        selectNwardIdx(nPidx, 0)
        setDihedralIdx(cPidx, caPidx, nPidx, cMidx, 90) # cWard Phi
        selectNwardIdx(caMidx, 0)
        setDihedralIdx(nPidx, cMidx, caMidx, nMidx, 120) # nWard Psi
        selectNwardIdx(nMidx, 0)
        setDihedralIdx(cMidx, caMidx, nMidx, ncMidx, -70) # nWard Phi

        handleCollisions2( 0)
        if (countcollisions(({})) > 0) {
            var p = prompt("Unable to handle all collisions!")
            restore state gState
            connect
        }
    }

    # 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 = getNwardBBidx (_atomPicked, gChain)

        # Rotate 180 on omega        
        selectNwardIdx(cMidx, 0)
        rotateSelected {atomIndex=_atomPicked} {atomIndex=cMidx} 180.0

        handleCollisions2( 0)
        if (countcollisions(({})) > 0) {
            var p = prompt("Unable to handle all collisions!")
            restore state gState
            connect
        }
    }
}

# Top level of Turn
function plicoTurn() {

    # Load tug functions if not already
    if (kTug < 3) {
        script "<SCRIPT_PATH>tug.spt"
        if (kTug < 3) {
            prompt ("A newer version of TUG.SPT is required")
            quit
        }
    }
    
    gPlico = "TURN"
    plicoPrelim()
    
    select (GLY and Oxygen) or (PRO and Nitrogen)
    halo on
    select all
    gEcho = ("_______TURN_______|  *** Click on O ***|      (or proline N)|ALT-CLICK=Type I" +
        "|SHIFT-CLICK=Type II|DOUBLE-CLICK=exit")
    echo @gEcho
    gChain = ""
    unbind

    bind "ALT-LEFT-CLICK" "_pickAtom";
    bind "ALT-LEFT-CLICK" "+:turnCargo1MB";
    bind "SHIFT-LEFT-CLICK" "_pickAtom";
    bind "SHIFT-LEFT-CLICK" "+:turnCargo2MB";
    bind "DOUBLE" "plicoExit";
}

# End of TURN.SPT

Contributors

Remig