}),
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"]
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) {
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"]
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 );