Skip to content

Commit

Permalink
remove calls to setSelection
Browse files Browse the repository at this point in the history
  • Loading branch information
biasmv committed Jul 14, 2015
1 parent c7c9b36 commit ed07279
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,23 +30,20 @@ function points() {
var go = viewer.points('structure', structure, {
color: color.byResidueProp('num'),
showRelated : '1' });
go.setSelection(structure.select({ rnumRange : [15,20] }));
}

function lines() {
viewer.clear();
var go = viewer.lines('structure', structure, {
color: color.byResidueProp('num'),
showRelated : '1' });
go.setSelection(structure.select({ rnumRange : [15,20] }));
}

function cartoon() {
viewer.clear();
var go = viewer.cartoon('structure', structure, {
color : color.ssSuccession(), showRelated : '1',
});
go.setSelection(structure.select({ rnumRange : [15,20] }));

var rotation = viewpoint.principalAxes(go);
viewer.setRotation(rotation)
Expand All @@ -55,20 +52,17 @@ function cartoon() {
function lineTrace() {
viewer.clear();
var go = viewer.lineTrace('structure', structure, { showRelated : '1' });
go.setSelection(structure.select({ rnumRange : [15,20] }));
}

function spheres() {
viewer.clear();
var go = viewer.spheres('structure', structure, { showRelated : '1' });
go.setSelection(structure.select({ rnumRange : [15,20] }));
}

function sline() {
viewer.clear();
var go = viewer.sline('structure', structure,
{ color : color.uniform('red'), showRelated : '1'});
go.setSelection(structure.select({ rnumRange : [15,20] }));
}

function tube() {
Expand All @@ -77,19 +71,16 @@ function tube() {
viewer.lines('structure.ca', structure.select({aname :'CA'}),
{ color: color.uniform('blue'), lineWidth : 1,
showRelated : '1' });
go.setSelection(structure.select({ rnumRange : [15,20] }));
}

function trace() {
viewer.clear();
var go = viewer.trace('structure', structure, { showRelated : '1' });
go.setSelection(structure.select({ rnumRange : [15,20] }));

}
function ballsAndSticks() {
viewer.clear();
var go = viewer.ballsAndSticks('structure', structure, { showRelated : '1' });
go.setSelection(structure.select({ rnumRange : [15,20] }));
}

function preset() {
Expand Down Expand Up @@ -254,7 +245,7 @@ $('#load-from-pdb').change(function() {
});
});
viewer = pv.Viewer(document.getElementById('viewer'), {
width : 'auto', height: 'auto', antialias : true,
width : 'auto', height: 'auto', antialias : true, fog : true,
outline : true, quality : 'medium', style : 'hemilight',
background : '#fff', animateTime: 500, doubleClick : null
});
Expand Down

0 comments on commit ed07279

Please sign in to comment.