From 43b40c25679ed9beee4c488f36a0c2d50d9016c6 Mon Sep 17 00:00:00 2001 From: jprocter Date: Fri, 18 Jun 2010 08:15:04 +0000 Subject: [PATCH] new jmol/pdb relates api calls --- src/jalview/bin/JalviewLite.java | 45 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/src/jalview/bin/JalviewLite.java b/src/jalview/bin/JalviewLite.java index a904d7c..153d4df 100755 --- a/src/jalview/bin/JalviewLite.java +++ b/src/jalview/bin/JalviewLite.java @@ -1291,4 +1291,49 @@ public class JalviewLite extends Applet } return false; } + /** + * bind a pdb file to a sequence in the given alignFrame. + * @param alFrame - null or specific alignFrame. This specifies the dataset that will be searched for a seuqence called sequenceId + * @param sequenceId - sequenceId within the dataset. + * @param pdbEntryString - the short name for the PDB file + * @param pdbFile - pdb file - either a URL or a valid PDB file. + * @return true if binding was as success + * TODO: consider making an exception structure for indicating when PDB parsing or seqeunceId location fails. + */ + public boolean addPdbFile(AlignFrame alFrame, String sequenceId, String pdbEntryString, String pdbFile) + { + System.err.println("addPdbFile not yet implemented."); + return true; + } + /** + * bind the viewer instance to the pdbFile associated with sequences in the given alFrame. + * @param alFrame + * @param pdbFile - pdbFile URI as given via applet's parameters or by addPdb + * @param viewer + * @return true if instance was bound corectly. + * TODO: consider making an exception structure for indicating when binding fails + */ + public boolean addJmolInstance(AlignFrame alFrame, String pdbFile, org.jmol.api.JmolViewer viewer) + { + System.err.println("addJmolInstance not yet implemented."); + /** + */ + if (viewer!=null) + { +/* viewer.getFrameCount + } + String alreadyMapped = StructureSelectionManager + .getStructureSelectionManager().alreadyMappedToFile( + pdbentry.getId()); +MCview.PDBfile reader = null; +if (alreadyMapped != null) +{ +reader = StructureSelectionManager.getStructureSelectionManager() + .setMapping(seq, chains, pdbentry.getFile(), protocol); + + } */ + } + return false; + } + } -- 1.7.10.2