X-Git-Url: http://source.jalview.org/gitweb/?p=jalviewjs.git;a=blobdiff_plain;f=site%2Fj2s%2Fjalview%2Fstructures%2Fmodels%2FAAStructureBindingModel.js;fp=site%2Fj2s%2Fjalview%2Fstructures%2Fmodels%2FAAStructureBindingModel.js;h=e454a088fc8d5051ca5b057e0dcec05a9ff68183;hp=63a34d4ffa05df4458bd6c9fda66e9245fa67033;hb=b9b7a352eee79b7764c3b09c9d19663075061d8c;hpb=7301a2415adab88038b291fc54caeeb3a5a47a44 diff --git a/site/j2s/jalview/structures/models/AAStructureBindingModel.js b/site/j2s/jalview/structures/models/AAStructureBindingModel.js index 63a34d4..e454a08 100644 --- a/site/j2s/jalview/structures/models/AAStructureBindingModel.js +++ b/site/j2s/jalview/structures/models/AAStructureBindingModel.js @@ -1,306 +1,306 @@ -Clazz.declarePackage ("jalview.structures.models"); -Clazz.load (["jalview.api.StructureSelectionManagerProvider", "jalview.structure.StructureListener", "jalview.structures.models.SequenceStructureBindingModel"], "jalview.structures.models.AAStructureBindingModel", ["jalview.util.Comparison", "$.MessageManager", "java.lang.Error", "$.StringBuilder", "java.util.ArrayList", "$.Arrays"], function () { -c$ = Clazz.decorateAsClass (function () { -this.ssm = null; -this.pdbEntry = null; -this.sequence = null; -this.chains = null; -this.protocol = null; -this.colourBySequence = true; -this.nucleotide = false; -if (!Clazz.isClassDefined ("jalview.structures.models.AAStructureBindingModel.SuperposeData")) { -jalview.structures.models.AAStructureBindingModel.$AAStructureBindingModel$SuperposeData$ (); -} -Clazz.instantialize (this, arguments); -}, jalview.structures.models, "AAStructureBindingModel", jalview.structures.models.SequenceStructureBindingModel, [jalview.structure.StructureListener, jalview.api.StructureSelectionManagerProvider]); -Clazz.makeConstructor (c$, -function (ssm, seqs) { -Clazz.superConstructor (this, jalview.structures.models.AAStructureBindingModel, []); -this.ssm = ssm; -this.sequence = seqs; -}, "jalview.structure.StructureSelectionManager,~A"); -Clazz.makeConstructor (c$, -function (ssm, pdbentry, sequenceIs, chains, protocol) { -Clazz.superConstructor (this, jalview.structures.models.AAStructureBindingModel, []); -this.ssm = ssm; -this.sequence = sequenceIs; -this.nucleotide = jalview.util.Comparison.isNucleotide2 (sequenceIs); -this.chains = chains; -this.pdbEntry = pdbentry; -this.protocol = protocol; -if (chains == null) { -this.chains = new Array (pdbentry.length); -}}, "jalview.structure.StructureSelectionManager,~A,~A,~A,~S"); -Clazz.defineMethod (c$, "getSsm", -function () { -return this.ssm; -}); -Clazz.defineMethod (c$, "getPdbEntry", -function (i) { -return (this.pdbEntry != null && this.pdbEntry.length > i) ? this.pdbEntry[i] : null; -}, "~N"); -Clazz.defineMethod (c$, "hasPdbId", -function (pdbId) { -if (this.pdbEntry != null) { -for (var pdb, $pdb = 0, $$pdb = this.pdbEntry; $pdb < $$pdb.length && ((pdb = $$pdb[$pdb]) || true); $pdb++) { -if (pdb.getId ().equals (pdbId)) { -return true; -}} -}return false; -}, "~S"); -Clazz.defineMethod (c$, "getPdbCount", -function () { -return this.pdbEntry == null ? 0 : this.pdbEntry.length; -}); -Clazz.defineMethod (c$, "getSequence", -function () { -return this.sequence; -}); -Clazz.defineMethod (c$, "getChains", -function () { -return this.chains; -}); -Clazz.defineMethod (c$, "getProtocol", -function () { -return this.protocol; -}); -Clazz.defineMethod (c$, "setPdbentry", -function (pdbentry) { -this.pdbEntry = pdbentry; -}, "~A"); -Clazz.defineMethod (c$, "setSequence", -function (sequence) { -this.sequence = sequence; -}, "~A"); -Clazz.defineMethod (c$, "setChains", -function (chains) { -this.chains = chains; -}, "~A"); -Clazz.defineMethod (c$, "getViewerTitle", -function (viewerName, verbose) { -if (this.getSequence () == null || this.getSequence ().length < 1 || this.getPdbCount () < 1 || this.getSequence ()[0].length < 1) { -return ("Jalview " + viewerName + " Window"); -}var title = new StringBuilder (64); -var pdbEntry = this.getPdbEntry (0); -title.append (viewerName + " view for " + this.getSequence ()[0][0].getName () + ":" + pdbEntry.getId ()); -if (verbose) { -if (pdbEntry.getProperty () != null) { -if (pdbEntry.getProperty ().get ("method") != null) { -title.append (" Method: "); -title.append (pdbEntry.getProperty ().get ("method")); -}if (pdbEntry.getProperty ().get ("chains") != null) { -title.append (" Chain:"); -title.append (pdbEntry.getProperty ().get ("chains")); -}}}return title.toString (); -}, "~S,~B"); -Clazz.defineMethod (c$, "releaseUIResources", -function () { -}); -Clazz.defineMethod (c$, "isColourBySequence", -function () { -return this.colourBySequence; -}); -Clazz.defineMethod (c$, "setColourBySequence", -function (colourBySequence) { -this.colourBySequence = colourBySequence; -}, "~B"); -Clazz.defineMethod (c$, "addSequenceAndChain", -function (pe, seq, tchain) { -if (pe < 0 || pe >= this.getPdbCount ()) { -throw new Error (jalview.util.MessageManager.formatMessage ("error.implementation_error_no_pdbentry_from_index", Clazz.newArray (-1, [Integer.$valueOf (pe).toString ()]))); -}var nullChain = "TheNullChain"; -var s = new java.util.ArrayList (); -var c = new java.util.ArrayList (); -if (this.getChains () == null) { -this.setChains ( new Array (this.getPdbCount ())); -}if (this.getSequence ()[pe] != null) { -for (var i = 0; i < this.getSequence ()[pe].length; i++) { -s.add (this.getSequence ()[pe][i]); -if (this.getChains ()[pe] != null) { -if (i < this.getChains ()[pe].length) { -c.add (this.getChains ()[pe][i]); -} else { -c.add ("TheNullChain"); -}} else { -if (tchain != null && tchain.length > 0) { -c.add ("TheNullChain"); -}}} -}for (var i = 0; i < seq.length; i++) { -if (!s.contains (seq[i])) { -s.add (seq[i]); -if (tchain != null && i < tchain.length) { -c.add (tchain[i] == null ? "TheNullChain" : tchain[i]); -}}} -var tmp = s.toArray ( new Array (s.size ())); -this.getSequence ()[pe] = tmp; -if (c.size () > 0) { -var tch = c.toArray ( new Array (c.size ())); -for (var i = 0; i < tch.length; i++) { -if (tch[i] === "TheNullChain") { -tch[i] = null; -}} -this.getChains ()[pe] = tch; -} else { -this.getChains ()[pe] = null; -}}, "~N,~A,~A"); -Clazz.defineMethod (c$, "addSequenceAndChain", -function (pdbe, seq, chns) { -var v = new java.util.ArrayList (); -var rtn = new java.util.ArrayList (); -for (var i = 0; i < this.getPdbCount (); i++) { -v.add (this.getPdbEntry (i)); -} -for (var i = 0; i < pdbe.length; i++) { -var r = v.indexOf (pdbe[i]); -if (r == -1 || r >= this.getPdbCount ()) { -rtn.add ( Clazz.newIntArray (-1, [v.size (), i])); -v.add (pdbe[i]); -} else { -this.addSequenceAndChain (r, seq[i], chns[i]); -}} -pdbe = v.toArray ( new Array (v.size ())); -this.setPdbentry (pdbe); -if (rtn.size () > 0) { -var sqs = new Array (this.getPdbCount ()); -var sch = new Array (this.getPdbCount ()); -System.arraycopy (this.getSequence (), 0, sqs, 0, this.getSequence ().length); -System.arraycopy (this.getChains (), 0, sch, 0, this.getChains ().length); -this.setSequence (sqs); -this.setChains (sch); -pdbe = new Array (rtn.size ()); -for (var r = 0; r < pdbe.length; r++) { -var stri = (rtn.get (r)); -pdbe[r] = this.getPdbEntry (stri[0]); -this.addSequenceAndChain (stri[0], seq[stri[1]], chns[stri[1]]); -} -} else { -pdbe = null; -}return pdbe; -}, "~A,~A,~A"); -Clazz.defineMethod (c$, "addSequence", -function (pe, seq) { -this.addSequenceAndChain (pe, seq, null); -}, "~N,~A"); -Clazz.defineMethod (c$, "addSequenceForStructFile", -function (pdbFile, seq) { -for (var pe = 0; pe < this.getPdbCount (); pe++) { -if (this.getPdbEntry (pe).getFile ().equals (pdbFile)) { -this.addSequence (pe, seq); -}} -}, "~S,~A"); -Clazz.defineMethod (c$, "isNucleotide", -function () { -return this.nucleotide; -}); -Clazz.defineMethod (c$, "printMappings", -function () { -if (this.pdbEntry == null) { -return ""; -}var sb = new StringBuilder (128); -for (var pdbe = 0; pdbe < this.getPdbCount (); pdbe++) { -var pdbfile = this.getPdbEntry (pdbe).getFile (); -var seqs = java.util.Arrays.asList (this.getSequence ()[pdbe]); -sb.append (this.getSsm ().printMappings (pdbfile, seqs)); -} -return sb.toString (); -}); -Clazz.defineMethod (c$, "getMappedPosition", -function (seq, alignedPos, mapping) { -if (alignedPos >= seq.getLength ()) { -return -1; -}if (jalview.util.Comparison.isGap (seq.getCharAt (alignedPos))) { -return -1; -}var seqPos = seq.findPosition (alignedPos); -var pos = mapping.getPDBResNum (seqPos); -return pos; -}, "jalview.datamodel.SequenceI,~N,jalview.structure.StructureMapping"); -Clazz.defineMethod (c$, "findSuperposableResidues", -function (alignment, matched, structures) { -var refStructure = -1; -var files = this.getPdbFile (); -for (var pdbfnum = 0; pdbfnum < files.length; pdbfnum++) { -var mappings = this.getSsm ().getMapping (files[pdbfnum]); -var lastPos = -1; -var seqCountForPdbFile = this.getSequence ()[pdbfnum].length; -for (var s = 0; s < seqCountForPdbFile; s++) { -for (var mapping, $mapping = 0, $$mapping = mappings; $mapping < $$mapping.length && ((mapping = $$mapping[$mapping]) || true); $mapping++) { -var theSequence = this.getSequence ()[pdbfnum][s]; -if (mapping.getSequence () === theSequence && alignment.findIndex (theSequence) > -1) { -if (refStructure < 0) { -refStructure = pdbfnum; -}for (var r = 0; r < matched.length; r++) { -if (!matched[r]) { -continue; -}var pos = this.getMappedPosition (theSequence, r, mapping); -if (pos < 1 || pos == lastPos) { -matched[r] = false; -continue; -}lastPos = pos; -structures[pdbfnum].pdbResNo[r] = pos; -} -var chain = mapping.getChain (); -if (chain != null && chain.trim ().length > 0) { -structures[pdbfnum].chain = chain; -}structures[pdbfnum].pdbId = mapping.getPdbId (); -structures[pdbfnum].isRna = theSequence.getRNA () != null; -s = seqCountForPdbFile; -break; -}} -} -} -return refStructure; -}, "jalview.datamodel.AlignmentI,~A,~A"); -Clazz.defineMethod (c$, "waitForFileLoad", -function (files) { -var starttime = System.currentTimeMillis (); -var endTime = 10000 + 1000 * files.length + starttime; -var notLoaded = null; -var waiting = true; -while (waiting && System.currentTimeMillis () < endTime) { -waiting = false; -for (var file, $file = 0, $$file = files; $file < $$file.length && ((file = $$file[$file]) || true); $file++) { -notLoaded = file; -try { -var sm = this.getSsm ().getMapping (file); -if (sm == null || sm.length == 0) { -waiting = true; -}} catch (x) { -waiting = true; -} -} -} -if (waiting) { -System.err.println ("Timed out waiting for structure viewer to load file " + notLoaded); -return false; -}return true; -}, "~A"); -Clazz.overrideMethod (c$, "isListeningFor", -function (seq) { -if (this.sequence != null) { -for (var seqs, $seqs = 0, $$seqs = this.sequence; $seqs < $$seqs.length && ((seqs = $$seqs[$seqs]) || true); $seqs++) { -if (seqs != null) { -for (var s, $s = 0, $$s = seqs; $s < $$s.length && ((s = $$s[$s]) || true); $s++) { -if (s === seq) { -return true; -}} -}} -}return false; -}, "jalview.datamodel.SequenceI"); -c$.$AAStructureBindingModel$SuperposeData$ = function () { -Clazz.pu$h(self.c$); -c$ = Clazz.decorateAsClass (function () { -Clazz.prepareCallback (this, arguments); -this.filename = null; -this.pdbId = null; -this.chain = ""; -this.isRna = false; -this.pdbResNo = null; -Clazz.instantialize (this, arguments); -}, jalview.structures.models.AAStructureBindingModel, "SuperposeData"); -Clazz.makeConstructor (c$, -function (a) { -this.pdbResNo = Clazz.newIntArray (a, 0); -}, "~N"); -c$ = Clazz.p0p (); -}; -}); +Clazz.declarePackage ("jalview.structures.models"); +Clazz.load (["jalview.api.StructureSelectionManagerProvider", "jalview.structure.StructureListener", "jalview.structures.models.SequenceStructureBindingModel"], "jalview.structures.models.AAStructureBindingModel", ["jalview.util.Comparison", "$.MessageManager", "java.lang.Error", "$.StringBuilder", "java.util.ArrayList", "$.Arrays"], function () { +c$ = Clazz.decorateAsClass (function () { +this.ssm = null; +this.pdbEntry = null; +this.sequence = null; +this.chains = null; +this.protocol = null; +this.colourBySequence = true; +this.nucleotide = false; +if (!Clazz.isClassDefined ("jalview.structures.models.AAStructureBindingModel.SuperposeData")) { +jalview.structures.models.AAStructureBindingModel.$AAStructureBindingModel$SuperposeData$ (); +} +Clazz.instantialize (this, arguments); +}, jalview.structures.models, "AAStructureBindingModel", jalview.structures.models.SequenceStructureBindingModel, [jalview.structure.StructureListener, jalview.api.StructureSelectionManagerProvider]); +Clazz.makeConstructor (c$, +function (ssm, seqs) { +Clazz.superConstructor (this, jalview.structures.models.AAStructureBindingModel, []); +this.ssm = ssm; +this.sequence = seqs; +}, "jalview.structure.StructureSelectionManager,~A"); +Clazz.makeConstructor (c$, +function (ssm, pdbentry, sequenceIs, chains, protocol) { +Clazz.superConstructor (this, jalview.structures.models.AAStructureBindingModel, []); +this.ssm = ssm; +this.sequence = sequenceIs; +this.nucleotide = jalview.util.Comparison.isNucleotide2 (sequenceIs); +this.chains = chains; +this.pdbEntry = pdbentry; +this.protocol = protocol; +if (chains == null) { +this.chains = new Array (pdbentry.length); +}}, "jalview.structure.StructureSelectionManager,~A,~A,~A,~S"); +Clazz.defineMethod (c$, "getSsm", +function () { +return this.ssm; +}); +Clazz.defineMethod (c$, "getPdbEntry", +function (i) { +return (this.pdbEntry != null && this.pdbEntry.length > i) ? this.pdbEntry[i] : null; +}, "~N"); +Clazz.defineMethod (c$, "hasPdbId", +function (pdbId) { +if (this.pdbEntry != null) { +for (var pdb, $pdb = 0, $$pdb = this.pdbEntry; $pdb < $$pdb.length && ((pdb = $$pdb[$pdb]) || true); $pdb++) { +if (pdb.getId ().equals (pdbId)) { +return true; +}} +}return false; +}, "~S"); +Clazz.defineMethod (c$, "getPdbCount", +function () { +return this.pdbEntry == null ? 0 : this.pdbEntry.length; +}); +Clazz.defineMethod (c$, "getSequence", +function () { +return this.sequence; +}); +Clazz.defineMethod (c$, "getChains", +function () { +return this.chains; +}); +Clazz.defineMethod (c$, "getProtocol", +function () { +return this.protocol; +}); +Clazz.defineMethod (c$, "setPdbentry", +function (pdbentry) { +this.pdbEntry = pdbentry; +}, "~A"); +Clazz.defineMethod (c$, "setSequence", +function (sequence) { +this.sequence = sequence; +}, "~A"); +Clazz.defineMethod (c$, "setChains", +function (chains) { +this.chains = chains; +}, "~A"); +Clazz.defineMethod (c$, "getViewerTitle", +function (viewerName, verbose) { +if (this.getSequence () == null || this.getSequence ().length < 1 || this.getPdbCount () < 1 || this.getSequence ()[0].length < 1) { +return ("Jalview " + viewerName + " Window"); +}var title = new StringBuilder (64); +var pdbEntry = this.getPdbEntry (0); +title.append (viewerName + " view for " + this.getSequence ()[0][0].getName () + ":" + pdbEntry.getId ()); +if (verbose) { +if (pdbEntry.getProperty () != null) { +if (pdbEntry.getProperty ().get ("method") != null) { +title.append (" Method: "); +title.append (pdbEntry.getProperty ().get ("method")); +}if (pdbEntry.getProperty ().get ("chains") != null) { +title.append (" Chain:"); +title.append (pdbEntry.getProperty ().get ("chains")); +}}}return title.toString (); +}, "~S,~B"); +Clazz.defineMethod (c$, "releaseUIResources", +function () { +}); +Clazz.defineMethod (c$, "isColourBySequence", +function () { +return this.colourBySequence; +}); +Clazz.defineMethod (c$, "setColourBySequence", +function (colourBySequence) { +this.colourBySequence = colourBySequence; +}, "~B"); +Clazz.defineMethod (c$, "addSequenceAndChain", +function (pe, seq, tchain) { +if (pe < 0 || pe >= this.getPdbCount ()) { +throw new Error (jalview.util.MessageManager.formatMessage ("error.implementation_error_no_pdbentry_from_index", Clazz.newArray (-1, [Integer.$valueOf (pe).toString ()]))); +}var nullChain = "TheNullChain"; +var s = new java.util.ArrayList (); +var c = new java.util.ArrayList (); +if (this.getChains () == null) { +this.setChains ( new Array (this.getPdbCount ())); +}if (this.getSequence ()[pe] != null) { +for (var i = 0; i < this.getSequence ()[pe].length; i++) { +s.add (this.getSequence ()[pe][i]); +if (this.getChains ()[pe] != null) { +if (i < this.getChains ()[pe].length) { +c.add (this.getChains ()[pe][i]); +} else { +c.add ("TheNullChain"); +}} else { +if (tchain != null && tchain.length > 0) { +c.add ("TheNullChain"); +}}} +}for (var i = 0; i < seq.length; i++) { +if (!s.contains (seq[i])) { +s.add (seq[i]); +if (tchain != null && i < tchain.length) { +c.add (tchain[i] == null ? "TheNullChain" : tchain[i]); +}}} +var tmp = s.toArray ( new Array (s.size ())); +this.getSequence ()[pe] = tmp; +if (c.size () > 0) { +var tch = c.toArray ( new Array (c.size ())); +for (var i = 0; i < tch.length; i++) { +if (tch[i] === "TheNullChain") { +tch[i] = null; +}} +this.getChains ()[pe] = tch; +} else { +this.getChains ()[pe] = null; +}}, "~N,~A,~A"); +Clazz.defineMethod (c$, "addSequenceAndChain", +function (pdbe, seq, chns) { +var v = new java.util.ArrayList (); +var rtn = new java.util.ArrayList (); +for (var i = 0; i < this.getPdbCount (); i++) { +v.add (this.getPdbEntry (i)); +} +for (var i = 0; i < pdbe.length; i++) { +var r = v.indexOf (pdbe[i]); +if (r == -1 || r >= this.getPdbCount ()) { +rtn.add ( Clazz.newIntArray (-1, [v.size (), i])); +v.add (pdbe[i]); +} else { +this.addSequenceAndChain (r, seq[i], chns[i]); +}} +pdbe = v.toArray ( new Array (v.size ())); +this.setPdbentry (pdbe); +if (rtn.size () > 0) { +var sqs = new Array (this.getPdbCount ()); +var sch = new Array (this.getPdbCount ()); +System.arraycopy (this.getSequence (), 0, sqs, 0, this.getSequence ().length); +System.arraycopy (this.getChains (), 0, sch, 0, this.getChains ().length); +this.setSequence (sqs); +this.setChains (sch); +pdbe = new Array (rtn.size ()); +for (var r = 0; r < pdbe.length; r++) { +var stri = (rtn.get (r)); +pdbe[r] = this.getPdbEntry (stri[0]); +this.addSequenceAndChain (stri[0], seq[stri[1]], chns[stri[1]]); +} +} else { +pdbe = null; +}return pdbe; +}, "~A,~A,~A"); +Clazz.defineMethod (c$, "addSequence", +function (pe, seq) { +this.addSequenceAndChain (pe, seq, null); +}, "~N,~A"); +Clazz.defineMethod (c$, "addSequenceForStructFile", +function (pdbFile, seq) { +for (var pe = 0; pe < this.getPdbCount (); pe++) { +if (this.getPdbEntry (pe).getFile ().equals (pdbFile)) { +this.addSequence (pe, seq); +}} +}, "~S,~A"); +Clazz.defineMethod (c$, "isNucleotide", +function () { +return this.nucleotide; +}); +Clazz.defineMethod (c$, "printMappings", +function () { +if (this.pdbEntry == null) { +return ""; +}var sb = new StringBuilder (128); +for (var pdbe = 0; pdbe < this.getPdbCount (); pdbe++) { +var pdbfile = this.getPdbEntry (pdbe).getFile (); +var seqs = java.util.Arrays.asList (this.getSequence ()[pdbe]); +sb.append (this.getSsm ().printMappings (pdbfile, seqs)); +} +return sb.toString (); +}); +Clazz.defineMethod (c$, "getMappedPosition", +function (seq, alignedPos, mapping) { +if (alignedPos >= seq.getLength ()) { +return -1; +}if (jalview.util.Comparison.isGap (seq.getCharAt (alignedPos))) { +return -1; +}var seqPos = seq.findPosition (alignedPos); +var pos = mapping.getPDBResNum (seqPos); +return pos; +}, "jalview.datamodel.SequenceI,~N,jalview.structure.StructureMapping"); +Clazz.defineMethod (c$, "findSuperposableResidues", +function (alignment, matched, structures) { +var refStructure = -1; +var files = this.getPdbFile (); +for (var pdbfnum = 0; pdbfnum < files.length; pdbfnum++) { +var mappings = this.getSsm ().getMapping (files[pdbfnum]); +var lastPos = -1; +var seqCountForPdbFile = this.getSequence ()[pdbfnum].length; +for (var s = 0; s < seqCountForPdbFile; s++) { +for (var mapping, $mapping = 0, $$mapping = mappings; $mapping < $$mapping.length && ((mapping = $$mapping[$mapping]) || true); $mapping++) { +var theSequence = this.getSequence ()[pdbfnum][s]; +if (mapping.getSequence () === theSequence && alignment.findIndex (theSequence) > -1) { +if (refStructure < 0) { +refStructure = pdbfnum; +}for (var r = 0; r < matched.length; r++) { +if (!matched[r]) { +continue; +}var pos = this.getMappedPosition (theSequence, r, mapping); +if (pos < 1 || pos == lastPos) { +matched[r] = false; +continue; +}lastPos = pos; +structures[pdbfnum].pdbResNo[r] = pos; +} +var chain = mapping.getChain (); +if (chain != null && chain.trim ().length > 0) { +structures[pdbfnum].chain = chain; +}structures[pdbfnum].pdbId = mapping.getPdbId (); +structures[pdbfnum].isRna = theSequence.getRNA () != null; +s = seqCountForPdbFile; +break; +}} +} +} +return refStructure; +}, "jalview.datamodel.AlignmentI,~A,~A"); +Clazz.defineMethod (c$, "waitForFileLoad", +function (files) { +var starttime = System.currentTimeMillis (); +var endTime = 10000 + 1000 * files.length + starttime; +var notLoaded = null; +var waiting = true; +while (waiting && System.currentTimeMillis () < endTime) { +waiting = false; +for (var file, $file = 0, $$file = files; $file < $$file.length && ((file = $$file[$file]) || true); $file++) { +notLoaded = file; +try { +var sm = this.getSsm ().getMapping (file); +if (sm == null || sm.length == 0) { +waiting = true; +}} catch (x) { +waiting = true; +} +} +} +if (waiting) { +System.err.println ("Timed out waiting for structure viewer to load file " + notLoaded); +return false; +}return true; +}, "~A"); +Clazz.overrideMethod (c$, "isListeningFor", +function (seq) { +if (this.sequence != null) { +for (var seqs, $seqs = 0, $$seqs = this.sequence; $seqs < $$seqs.length && ((seqs = $$seqs[$seqs]) || true); $seqs++) { +if (seqs != null) { +for (var s, $s = 0, $$s = seqs; $s < $$s.length && ((s = $$s[$s]) || true); $s++) { +if (s === seq) { +return true; +}} +}} +}return false; +}, "jalview.datamodel.SequenceI"); +c$.$AAStructureBindingModel$SuperposeData$ = function () { +Clazz.pu$h(self.c$); +c$ = Clazz.decorateAsClass (function () { +Clazz.prepareCallback (this, arguments); +this.filename = null; +this.pdbId = null; +this.chain = ""; +this.isRna = false; +this.pdbResNo = null; +Clazz.instantialize (this, arguments); +}, jalview.structures.models.AAStructureBindingModel, "SuperposeData"); +Clazz.makeConstructor (c$, +function (a) { +this.pdbResNo = Clazz.newIntArray (a, 0); +}, "~N"); +c$ = Clazz.p0p (); +}; +});