Sha256: 56339ab419f0cb70e1cb65157482989f315a965af61bc75ae5e032b1c85e20c9
Contents?: true
Size: 1.18 KB
Versions: 4
Compression:
Stored size: 1.18 KB
Contents
- pdbs = entity.pdbs_and_positions - if pdbs and pdbs.any? #jmol %select.pdb %option(selected="selected") Select a pdb - found = 0 - pdbs.each do |pdb, chains| - chains.each do |pdb_chain, pdb_position| - next if pdb_position.nil? - pdb_position -= 1 %option(attr-chain=pdb_chain attr-position=pdb_position attr-pdb=pdb)= "#{ pdb} (#{[pdb_position, pdb_chain] * "/"})" - found += 1 - if found == 0 No pdbs cover that position - else #jmol_image :javascript jmolSetXHTML('jmol_image') jmolApplet(500, "", "PIZARRA"); $('select.pdb').change(function(){ var option = $(this).find('option:selected'); var pdb = option.attr('attr-pdb'); if (pdb == "Select a pdb") return false var pdb_position = option.attr('attr-position'); var pdb_chain = option.attr('attr-chain'); jmolScript("load =" + pdb + "; wireframe off; restrict water; select protein; backbone off; color pink;cartoons on;color structure; select protein and *.CA and " + pdb_position + ":" + pdb_chain + "; spacefill; color blue;", "PIZARRA"); })
Version data entries
4 entries across 4 versions & 1 rubygems