Team:UNICAMP-EMSE Brazil/test

From 2011.igem.org

(Difference between revisions)
(Blanked the page)
 
(3 intermediate revisions not shown)
Line 1: Line 1:
-
<html>
 
-
<div id="Jmol_mainWrapper">
 
-
  <div id="jmol_box"
 
-
  style="margin:auto;width:550px;height:550px;border:solid 1px lightgray;padding: 0.5em;"
 
-
  >
 
-
 
-
 
 
-
<script>
 
-
$(function() {
 
-
<script src="http://propka.ki.ku.dk/~jhjensen/Jmol.js" type="text/javascript"></script>
 
-
<script type="text/javascript">
 
-
 
-
 
-
jmolSetDocument(false);
 
-
 
-
jmolInitialize("http://www.pdb.org/pdb/Viewers/jmol-12.0.41/",true);
 
-
 
-
jmolSetCallback("loadStructCallback","myStructCallback");
 
-
jmolSetCallback("messageCallback",  "myMessageCallback");
 
-
jmolSetCallback("pickCallback",      "myPickCallback");
 
-
 
-
 
-
var jmol = jmolApplet(["100%","100%"], "script http://www1.rcsb.org/pdb/Viewers/jmol-12.0.41/customcolor.spt; load 'http://www1.rcsb.org/pdb/files/1XX1.pdb';set defaultStructureDSSP true; set measurementUnits ANGSTROMS;  select all;  spacefill off; wireframe off; backbone off; cartoon on; color cartoon structure; color structure;  select ligand;wireframe 0.16;spacefill 0.5; color cpk ; select all; model 0;set antialiasDisplay true; ;save STATE state_1; ");
 
-
 
-
$('#jmol_box').html(jmol);
 
-
 
-
make_jmol_resizable();
 
-
});
 
-
 
-
 
-
 
-
 
-
</script>
 
-
 
-
  </div>
 
-
   
 
-
Tip: right-mouse click on Jmol to get access to additional Jmol functionality.
 
-
<span id="jmol_box_resize_tip"></span>
 
-
</div>
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
</div>
 
-
 
-
</div>
 
-
 
-
<div class="b_body3">
 
-
 
-
 
-
 
-
<div class="box_contentWrapper">
 
-
 
-
 
-
 
-
<div id="Jmol_mainWrapper">
 
-
 
-
<form name="Jmol_form" onsubmit="executeJmolScript(); return false;">
 
-
<input id="jmolScriptInput" type="text" name="inputjmol"  size="60" class="textfield">
 
-
 
-
<input value="Jmol Script" type="button" class="searchbutton" onclick="executeJmolScript(); return false;">
 
-
</form>
 
-
 
-
 
-
<table>
 
-
 
-
 
-
<tr>
 
-
<form name="Jmol_buttons">
 
-
 
-
 
-
 
-
 
-
 
-
<tr>
 
-
<td align="left" style="white-space: nowrap;">
 
-
 
-
<b>Display</b>
 
-
</td>
 
-
<td align="left" style="white-space: nowrap;" >
 
-
 
-
Style
 
-
 
-
<select name="groupA" id="groupA">
 
-
 
-
<option selected="selected">Cartoon</option>
 
-
<option >Backbone</option>
 
-
<option >CPK</option>
 
-
<option >Ball and Stick</option>
 
-
<option >Ligands</option>
 
-
<option >Ligands and Pocket</option>
 
-
</select>
 
-
 
-
 
-
Color
 
-
 
-
<select name="group2" id="group2">
 
-
<option selected="selected">Secondary Structure</option>
 
-
<option >By Chain</option>
 
-
<option >Rainbow</option>
 
-
<option >By Element</option>
 
-
<option >By Amino Acid</option>
 
-
<option >Hydrophobicity</option>
 
-
</select>
 
-
 
-
Surface
 
-
 
-
<select  name="group3" id="group3">
 
-
<option selected="selected">None</option>
 
-
<option >Solvent Accessible</option>
 
-
<option >Solvent Excluded</option>
 
-
<option >Cavities</option>
 
-
</select>
 
-
 
-
</td>
 
-
 
-
 
-
</tr>
 
-
 
-
 
-
 
-
 
-
 
-
 
-
<tr>
 
-
<td align="left"><b>Toggle</b>
 
-
</td>
 
-
<td align="left" style="white-space: nowrap;" >
 
-
<input type="checkbox" id="check41" name="toggleselection" />Selection
 
-
 
-
<input type="checkbox" id="check42" name="togglehbonds" />H-Bonds
 
-
 
-
<input type="checkbox" id="check46" name="toggledisulfide" />SS&nbsp;Bonds
 
-
 
-
<input type="checkbox" id="check43" name="togglespin" />Rotation
 
-
 
-
<input type="checkbox" id="check44" name="antialias" checked="checked"/>Antialias&nbsp;Display&nbsp;(nicer)
 
-
 
-
<input type="checkbox" id="check45" name="backgroundWhite" checked="checked"/>Black&nbsp;Background
 
-
</td>
 
-
 
-
</tr>
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
 
-
<tr><td></td>
 
-
<td align="left" style="white-space: nowrap;">
 
-
 
-
 
-
<input value="Reset Display" type="button" class="searchbutton" onclick="resetDisplay(); return false;">
 
-
 
-
<input value="Export Image" type="button" class="searchbutton" onclick="executeJmolScript('write IMAGE 1XX1.jpg ;'); return false;">
 
-
 
-
 
-
 
-
 
-
 
-
 
-
<input value="Slab" type="button" class="searchbutton" onclick="slab(); return false;">
 
-
 
-
 
-
 
-
 
-
</td></tr>
 
-
 
-
</table>
 
-
</form>
 
-
 
-
</div>
 
-
 
-
 
-
 
-
<script>
 
-
 
-
function resetDisplay(){
 
-
executeJmolScript('restore STATE state_1');
 
-
$("#asygroup").val('None');
 
-
$('#symmetry').val('None');
 
-
$('#groupA').val('Cartoon');
 
-
$('#group3').val('None');
 
-
$('#group2').val('Secondary Structure');
 
-
 
-
 
-
$('[input[name=toggleselection]').attr('checked',false);
 
-
$('[input[name=togglehbonds]').attr('checked',false);
 
-
$('[input[name=togglespin]').attr('checked',false);
 
-
$('[input[name=antialias]').attr('checked',true );
 
-
$('[input[name=backgroundWhite]').attr('checked',true );
 
-
$('[input[name=toggledisulfide]').attr('checked',false );
 
-
 
-
}
 
-
 
-
 
-
$(document).ready(function(){
 
-
 
-
var solventOff = " set solvent off; select solvent; spacefill off; wireframe off;";
 
-
var backbone = " backbone 0.3; spacefill off ; wireframe off; color structure; select ligand; wireframe 0.16;spacefill 0.5; color cpk;";
 
-
 
-
$('#symmetry').change(function(){
 
-
var text = $(this).val();
 
-
if ( text == 'None') {
 
-
resetDisplay();
 
-
 
-
} else if ( text == '3 unit cells a direction') {
 
-
var script = "save orientation 1;load \"\" 1 {455 655 1};restore orientation 1; set unitcell 1;" + backbone + solventOff;
 
-
executeJmolScript(script);
 
-
$('#groupA').val('Backbone');
 
-
$('#group2').val('Secondary Structure');
 
-
 
-
} else if ( text == '3 unit cells b direction') {
 
-
var script = "save orientation 1;load \"\" 1 {545 565 1};restore orientation 1; set unitcell 1;" + backbone + solventOff;
 
-
executeJmolScript(script);
 
-
$('#groupA').val('Backbone');
 
-
$('#group2').val('Secondary Structure');
 
-
 
-
}  else if ( text == '3 unit cells c direction') {
 
-
var script = "save orientation 1;load \"\" 1 {554 556 1};restore orientation 1; set unitcell 1;" + backbone + solventOff;
 
-
executeJmolScript(script);
 
-
$('#groupA').val('Backbone');
 
-
$('#group2').val('Secondary Structure');
 
-
 
-
}  else if ( text == '3x3 unit cells ab plane') {
 
-
var script = "save orientation 1;load \"\" 1 {445 665 1};restore orientation 1; set unitcell 1;" + backbone + solventOff;
 
-
executeJmolScript(script);
 
-
$('#groupA').val('Backbone');
 
-
$('#group2').val('Secondary Structure');
 
-
 
-
}  else if ( text == '3x3 unit cells bc plane') {
 
-
var script = "save orientation 1;load \"\" 1 {454 656 1};restore orientation 1; set unitcell 1;" + backbone +solventOff;
 
-
executeJmolScript(script);
 
-
$('#groupA').val('Backbone');
 
-
$('#group2').val('Secondary Structure');
 
-
 
-
}  else if ( text == '3x3 unit cells ac plane') {
 
-
var script = "save orientation 1;load \"\" 1 {544 566 1};restore orientation 1; set unitcell 1;" + backbone + solventOff;
 
-
executeJmolScript(script);
 
-
$('#groupA').val('Backbone');
 
-
$('#group2').val('Secondary Structure');
 
-
 
-
}  else if ( text == '3x3x3 unit cells abc cube') {
 
-
var script = "save orientation 1;load \"\" 1 {444 666 1};restore orientation 1; set unitcell 1;" + backbone + solventOff;
 
-
executeJmolScript(script);
 
-
$('#groupA').val('Backbone');
 
-
$('#group2').val('Secondary Structure');
 
-
 
-
} else if ( text == 'Apply Crystal Symmetry (fill unit cell box)') {
 
-
var script = "save orientation 1;load \"\" 1 packed;restore orientation 1; set unitcell 1;" + backbone + solventOff;
 
-
executeJmolScript(script);
 
-
$('#groupA').val('Backbone');
 
-
$('#group2').val('Secondary Structure');
 
-
 
-
} else if ( text == 'Apply Crystal Symmetry (translate chains)'){
 
-
var script = "save orientation 1;load \"\" {2 2 2} packed ;restore orientation 1; set unitcell 1;" + backbone + solventOff;
 
-
executeJmolScript(script);
 
-
$('#groupA').val('Backbone');
 
-
$('#group2').val('Secondary Structure');
 
-
 
-
} else if ( text == "Apply Crystal Symmetry (no translation)"){
 
-
var script = "save orientation 1;load \"\" 1 {555 555 0};restore orientation 1; set unitcell 1;" + backbone + solventOff;
 
-
executeJmolScript(script);
 
-
$('#groupA').val('Backbone');
 
-
$('#group2').val('Secondary Structure');
 
-
} else if (text == "None"){
 
-
resetDisplay();
 
-
} else if ( text == 'Show Unit Cell Outline'){
 
-
var script = "set unitcell 1;" ;
 
-
executeJmolScript(script);
 
-
//$("select[name='asygroup'] option[text=Show Cell]"  ).attr("text", 'Hide Cell');
 
-
 
-
} else if ( text == 'Hide Cell'){
 
-
var script = "set unitcell 0;" ;
 
-
executeJmolScript(script);
 
-
$("select[name='asygroup'] option[text=Hide Cell]"  ).attr("text", 'Show Cell');
 
-
 
-
}
 
-
});
 
-
 
-
 
-
 
-
 
-
$('#groupA').change(function() {
 
-
var text =  $(this).val();
 
-
 
-
  if (text == 'Cartoon') {
 
-
 
-
    executeJmolScript("hide null; select all;  spacefill off; wireframe off; backbone off;" +
 
-
" cartoon on; " +
 
-
" select ligand; wireframe 0.16;spacefill 0.5; color cpk; " +
 
-
" select *.FE; spacefill 0.7; color cpk ; " +
 
-
" select *.CU; spacefill 0.7; color cpk ; " +
 
-
" select *.ZN; spacefill 0.7; color cpk ; " +
 
-
" select all; ");
 
-
    }
 
-
    else if (text == 'Backbone') {
 
-
   
 
-
    executeJmolScript("hide null; select all; spacefill off; wireframe off; backbone 0.4;" +
 
-
" cartoon off; " +
 
-
" select ligand; wireframe 0.16;spacefill 0.5; color cpk; " +
 
-
" select *.FE; spacefill 0.7; color cpk ; " +
 
-
" select *.CU; spacefill 0.7; color cpk ; " +
 
-
" select *.ZN; spacefill 0.7; color cpk ; " +
 
-
" select all; ");
 
-
   
 
-
    } else if (text == 'CPK') {
 
-
   
 
-
    executeJmolScript("hide null; select all; spacefill off; wireframe off; backbone off;" +
 
-
" cartoon off; cpk on;" +
 
-
" select ligand; wireframe 0.16;spacefill 0.5; color cpk; " +
 
-
" select *.FE; spacefill 0.7; color cpk ; " +
 
-
" select *.CU; spacefill 0.7; color cpk ; " +
 
-
" select *.ZN; spacefill 0.7; color cpk ; " +
 
-
" select all; ");
 
-
   
 
-
    }
 
-
    else if (text == 'Ligands') {
 
-
    executeJmolScript("restrict ligand; cartoon off; wireframe on;  display selected;"+
 
-
    " select *.FE; spacefill 0.7; color cpk ; " +
 
-
" select *.CU; spacefill 0.7; color cpk ; " +
 
-
" select *.ZN; spacefill 0.7; color cpk ; " +
 
-
" select all; "
 
-
    );
 
-
    }
 
-
 
-
    else if (text == 'Ligands and Pocket') {
 
-
    executeJmolScript(" select within (6.0,true, ligand); cartoon off; wireframe on; backbone off; display selected; " +
 
-
    " select *.FE; spacefill 0.7; color cpk ; " +
 
-
" select *.CU; spacefill 0.7; color cpk ; " +
 
-
" select *.ZN; spacefill 0.7; color cpk ; " +
 
-
" select all; "
 
-
    );
 
-
    }
 
-
    else if (text == 'Ball and Stick') {
 
-
   
 
-
    executeJmolScript("hide null; restrict not water;  wireframe 0.2; spacefill 25%;" +
 
-
" cartoon off; backbone off; " +
 
-
" select ligand; wireframe 0.16; spacefill 0.5; color cpk; " +
 
-
" select *.FE; spacefill 0.7; color cpk ; " +
 
-
" select *.CU; spacefill 0.7; color cpk ; " +
 
-
" select *.ZN; spacefill 0.7; color cpk ; " +
 
-
" select all; ");
 
-
   
 
-
    }
 
-
 
-
 
 
-
});
 
-
 
-
 
-
 
-
 
-
 
-
$('#group2').change(function() {
 
-
var text =  $(this).val();
 
-
if ( text == 'By Chain') {
 
-
executeJmolScript("hide null; select all;set defaultColors Jmol; color_by_chain(\"cartoon\"); color_by_chain(\"\"); select ligand;wireframe 0.16;spacefill 0.5; color cpk ;; select all; " );
 
-
}
 
-
else if ( text == 'By Temperature') {
 
-
executeJmolScript("hide null; select all;spacefill off; wireframe off; backbone 0.4; cartoon off; set defaultColors Jmol; color relativeTemperature; color cartoon relateiveTemperature select ligand;wireframe 0.16;spacefill 0.5; color cpk ;; select all; " );
 
-
}
 
-
else if ( text == 'Rainbow'){
 
-
executeJmolScript("hide null; select all; set defaultColors Jmol; color group; color cartoon group; select ligand;wireframe 0.16;spacefill 0.5; color cpk ;; select all; " );
 
-
}
 
-
else if ( text == 'Secondary Structure'){
 
-
executeJmolScript("hide null; select all; set defaultColors Jmol; color structure; color cartoon structure;select ligand;wireframe 0.16;spacefill 0.5; color cpk ;; select all; " );
 
-
}
 
-
else if ( text == 'By Element'){
 
-
executeJmolScript("hide null; select all; set defaultColors Jmol; color cpk; color cartoon cpk; select ligand;wireframe 0.16;spacefill 0.5; color cpk ;; select all; " );
 
-
}
 
-
else if ( text == 'By Amino Acid'){
 
-
executeJmolScript("hide null; select all; set defaultColors Jmol; color amino; color cartoon amino; select ligand;wireframe 0.16;spacefill 0.5; color cpk ;; select all; " );
 
-
}
 
-
else if ( text == 'Hydrophobicity'){
 
-
executeJmolScript("hide null; set defaultColors Jmol; select hydrophobic; color red; color cartoon red; select not hydrophobic ; color blue ; color cartoon blue; select ligand;wireframe 0.16;spacefill 0.5; color cpk ;; select all; " );
 
-
}
 
-
});
 
-
 
-
 
-
 
-
$('#group3').change(function() {
 
-
 
-
var text =  $(this).val();
 
-
 
-
if ( text == 'None'){
 
-
executeJmolScript("isosurface off;");
 
-
}
 
-
else if ( text == 'Solvent Accessible'){
 
-
executeJmolScript("isosurface sasurface 1.2");
 
-
}
 
-
else if ( text == 'Solvent Excluded'){
 
-
executeJmolScript("isosurface solvent 1.2");
 
-
}
 
-
else if ( text == 'Cavities'){
 
-
executeJmolScript("isosurface cavity 1.2 10");
 
-
}
 
-
 
-
});
 
-
 
-
 
-
$('[input[name=toggleselection]').click(function(){
 
-
if ( $('[input[name=toggleselection]').is(':checked') ) {
 
-
executeJmolScript("set display selected");
 
-
} else {
 
-
executeJmolScript("set display off");
 
-
}
 
-
});
 
-
 
-
$('[input[name=togglehbonds]').click(function(){
 
-
if ( $('[input[name=togglehbonds]').is(':checked') ) {
 
-
executeJmolScript("calculate HBONDS {*} {*}; hbonds on; color hbonds magenta;");
 
-
} else {
 
-
executeJmolScript("hbonds off");
 
-
}
 
-
});
 
-
 
-
$('[input[name=togglespin]').click(function(){
 
-
if ( $('[input[name=togglespin]').is(':checked') ) {
 
-
executeJmolScript("spin on; ");
 
-
} else {
 
-
executeJmolScript("spin off");
 
-
}
 
-
});
 
-
 
-
$('[input[name=toggleasym]').click(function(){
 
-
if ( $('[input[name=toggleasym]').is(':checked') ) {
 
-
executeJmolScript("set unitcell on; ");
 
-
} else {
 
-
executeJmolScript("set unitcell off;");
 
-
}
 
-
});
 
-
 
-
$('[input[name=antialias]').click(function(){
 
-
if ( $('[input[name=antialias]').is(':checked') ) {
 
-
executeJmolScript("set antialiasDisplay on; ");
 
-
} else {
 
-
executeJmolScript("set antialiasDisplay off;");
 
-
}
 
-
});
 
-
 
-
$('[input[name=backgroundWhite]').click(function(){
 
-
if ( $('[input[name=backgroundWhite]').is(':checked') ) {
 
-
executeJmolScript("background black; ");
 
-
} else {
 
-
executeJmolScript("background white;");
 
-
}
 
-
});
 
-
 
-
 
-
$('[input[name=togglespin]').click(function(){
 
-
if ( $('[input[name=togglespin]').is(':checked') ) {
 
-
executeJmolScript("spin on; ");
 
-
} else {
 
-
executeJmolScript("spin off");
 
-
}
 
-
});
 
-
 
-
$('[input[name=toggledisulfide]').click(function(){
 
-
if ( $('[input[name=toggledisulfide]').is(':checked') ) {
 
-
executeJmolScript("select {_S and connected({_S})} ; color yellow ; ssbonds on; set ssbonds backbone;");
 
-
 
-
} else {
 
-
executeJmolScript("ssbonds off;");
 
-
}
 
-
});
 
-
 
-
 
-
$("input[name='group5']").click(function(){
 
-
if ($("input[name='group5']:checked").val() == 'packed') {
 
-
executeJmolScript("save orientation 1; load \"\" 1 packed;  restore orientation 1; ");
 
-
} else if  ($("input[name='group5']:checked").val() == 'unpacked') {
 
-
executeJmolScript("save orientation 1;load \"\" {1 1 1}; restore orientation 1; ");
 
-
} else if ($("input[name='group5']:checked").val() == 'unnorm'){
 
-
executeJmolScript("save orientation 1;load \"\" 1 {555 555 0};restore orientation 1","unnormalized cell");
 
-
}
 
-
});
 
-
 
-
$("input[name='group6']").click(function(){
 
-
if ($("input[name='group6']:checked").val() == 'model1') {
 
-
executeJmolScript("model 1; set antialiasDisplay on;");
 
-
$('[input[name=antialias]').attr('checked',true)
 
-
} else if  ($("input[name='group6']:checked").val() == 'modelAll') {
 
-
executeJmolScript("model 0; set antialiasDisplay off;");
 
-
$('[input[name=antialias]').attr('checked',false)
 
-
}
 
-
});
 
-
 
-
});
 
-
 
-
</script>
 
-
 
-
 
-
 
-
 
-
</html>
 

Latest revision as of 14:08, 14 September 2011