trajectory NGLview corrections
authorCezary Czaplewski <czarek@chem.univ.gda.pl>
Wed, 11 Apr 2018 18:00:09 +0000 (20:00 +0200)
committerCezary Czaplewski <czarek@chem.univ.gda.pl>
Wed, 11 Apr 2018 18:00:09 +0000 (20:00 +0200)
django_simple/todo/templates/details.html
django_simple/todo/templates/details1.html

index d32f9fe..ba9425c 100644 (file)
@@ -466,7 +466,7 @@ Created {{ task.created_date  }}
                        </li>
                         <li class="list-group-item task-item">
                <div class="col-md-6">
-<input id="clipRange" type="range" value=0 min=0 max= {% widthratio task.md_total_steps task.md_ntwx 1 %} step=1 ></input><span id="clipRange_val">0</span> frame
+<input id="clipRange" type="range" value=1 min=1 max= {% widthratio task.md_total_steps task.md_ntwx 1 %} step=1 ></input><span id="clipRange_val">1</span> frame
 </div>
 <div class="col-md-6">
 <button id="toggleRunMDs">run/pause MD</button>  
@@ -1213,6 +1213,7 @@ window.addEventListener("resize",
         o.addRepresentation( "licorice",{ color:
        "residueindex",colorScale:["blue","cyan", "green", "yellow","orange", "red"]
         });        
+        o.setPosition([0, 0, 100]);
         o.autoView();
         o.addTrajectory();
       });
@@ -1238,7 +1239,7 @@ window.addEventListener("resize",
                                        isRunning = true;
 
                     trajComp.signals.frameChanged.add(function(){
-                      var fnum=trajComp.trajectory.currentFrame;                   
+                      var fnum=trajComp.trajectory.currentFrame+1;                   
                       clipRange.value = fnum;
                       clipRange_val.innerHTML = numberWithCommas(parseInt(clipRange.value*1));
                     });
@@ -1253,7 +1254,7 @@ window.addEventListener("resize",
       var clipRange_val = document.getElementById( "clipRange_val" );
       clipRange.oninput = function( e ){
                 var trajComp = stage.getComponentsByName("unres_md").list[0].trajList[0];
-                trajComp.setFrame(e.target.value)
+                trajComp.setFrame(e.target.value-1)
                 clipRange_val.innerHTML = numberWithCommas(parseInt(e.target.value*1));
       };      
 
index 9bb24f7..4abd64d 100644 (file)
@@ -455,7 +455,7 @@ Created {{ task.created_date  }}
                        </li>
                         <li class="list-group-item task-item">
                <div class="col-md-6">
-<input id="clipRange" type="range" value=0 min=0 max= {% widthratio task.md_total_steps task.md_ntwx 1 %} step=1 ></input><span id="clipRange_val">0</span> frame
+<input id="clipRange" type="range" value=1 min=1 max= {% widthratio task.md_total_steps task.md_ntwx 1 %} step=1 ></input><span id="clipRange_val">1</span> frame
 </div>
 <div class="col-md-6">
 <button id="toggleRunMDs">run/pause MD</button>  
@@ -1208,6 +1208,7 @@ window.addEventListener("resize",
         o.addRepresentation( "licorice",{ color:
        "residueindex",colorScale:["blue","cyan", "green", "yellow","orange", "red"]
         });        
+        o.setPosition([0, 0, 100]);
         o.autoView();
         o.addTrajectory();
       });
@@ -1233,7 +1234,7 @@ window.addEventListener("resize",
                                        isRunning = true;
 
                     trajComp.signals.frameChanged.add(function(){
-                      var fnum=trajComp.trajectory.currentFrame;                   
+                      var fnum=trajComp.trajectory.currentFrame+1;                   
                       clipRange.value = fnum;
                       clipRange_val.innerHTML = numberWithCommas(parseInt(clipRange.value*1));
                     });
@@ -1248,7 +1249,7 @@ window.addEventListener("resize",
       var clipRange_val = document.getElementById( "clipRange_val" );
       clipRange.oninput = function( e ){
                 var trajComp = stage.getComponentsByName("unres_md").list[0].trajList[0];
-                trajComp.setFrame(e.target.value)
+                trajComp.setFrame(e.target.value-1)
                 clipRange_val.innerHTML = numberWithCommas(parseInt(e.target.value*1));
       };