tutorial update, d-amino correction
[django_unres.git] / django_simple / todo / templates / details.html
index a64237e..06ae3db 100644 (file)
@@ -781,6 +781,15 @@ function display_model(numstr){
       }),
       stage.loadFile(
       "/myfiles/download-file/{{task.jobdirname}}/MODEL"+numstr+".pdb",{defaultRepresentation: false}) .then( function( o ){
+ {% if task.damino %}
+        o.addRepresentation( "licorice",{ name: "unres", color:
+               "residueindex",colorScale:["blue","cyan", "green",
+               "yellow","orange", "red"], sele:".CA"
+                       })
+        o.addRepresentation( "licorice",{ name: "unressc", visible: false, color:
+       "residueindex",colorScale:["blue","cyan", "green", "yellow","orange", "red"]
+        , sele:"*" })    
+ {% else %}
         o.addRepresentation( "cartoon",{ name: "unres", color:
                "residueindex",colorScale:["blue","cyan", "green",
                "yellow","orange", "red"]
@@ -788,6 +797,7 @@ function display_model(numstr){
         o.addRepresentation( "line",{ name: "unressc", visible: false, color:
        "residueindex",colorScale:["blue","cyan", "green", "yellow","orange", "red"]
         , sele:"not hydrogen and sidechainAttached" })    
+ {% endif %}
         return o
       })
   ]).then(function (ol1) {
@@ -829,6 +839,15 @@ function display_model(numstr){
   var stage = new NGL.Stage("viewport_M"+numstr);
   stage.setParameters( { backgroundColor: "white",fogFar: 60, fogNear: 45 } );
   stage.loadFile( "/myfiles/download-file/{{task.jobdirname}}/MODEL"+numstr+".pdb",{defaultRepresentation: false}) .then( function( o ){
+ {% if task.damino %}
+        o.addRepresentation( "licorice",{ name: "unres", color:
+               "residueindex",colorScale:["blue","cyan", "green",
+               "yellow","orange", "red"],sele:".CA"
+                       });
+        o.addRepresentation( "licorice",{ name: "unressc", visible: false, color:
+       "residueindex",colorScale:["blue","cyan", "green", "yellow","orange", "red"]
+        , sele:"*" });
+ {% else %}
         o.addRepresentation( "cartoon",{ name: "unres", color:
                "residueindex",colorScale:["blue","cyan", "green",
                "yellow","orange", "red"]
@@ -836,6 +855,7 @@ function display_model(numstr){
         o.addRepresentation( "line",{ name: "unressc", visible: false, color:
        "residueindex",colorScale:["blue","cyan", "green", "yellow","orange", "red"]
         , sele:"not hydrogen and sidechainAttached" });
+ {% endif %}
         o.autoView();
   })             
      var toggleSidechains =document.getElementById("toggleSidechainsM"+numstr );