X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fext%2Frbvi%2Fchimera%2FJalviewChimeraBinding.java;h=d1b85836e7a28608ea15a281c0b850bf218a86a3;hb=2107a91322a1988a8a6b724c74f9d244795341e3;hp=98cc1ff688c85de03f7e9b8f8375a207fb440b2a;hpb=cc4e7c2176bfc8c9c50ef2d8dde62f7bd80517db;p=jalview.git diff --git a/src/jalview/ext/rbvi/chimera/JalviewChimeraBinding.java b/src/jalview/ext/rbvi/chimera/JalviewChimeraBinding.java index 98cc1ff..d1b8583 100644 --- a/src/jalview/ext/rbvi/chimera/JalviewChimeraBinding.java +++ b/src/jalview/ext/rbvi/chimera/JalviewChimeraBinding.java @@ -38,6 +38,7 @@ import ext.edu.ucsf.rbvi.strucviz2.StructureManager; import ext.edu.ucsf.rbvi.strucviz2.StructureManager.ModelType; import jalview.api.AlignmentViewPanel; import jalview.api.structures.JalviewStructureDisplayI; +import jalview.bin.Cache; import jalview.datamodel.AlignmentI; import jalview.datamodel.PDBEntry; import jalview.datamodel.SearchResultMatchI; @@ -48,6 +49,7 @@ import jalview.gui.StructureViewer.ViewerType; import jalview.httpserver.AbstractRequestHandler; import jalview.io.DataSourceType; import jalview.structure.AtomSpec; +import jalview.structure.AtomSpecModel; import jalview.structure.StructureCommand; import jalview.structure.StructureCommandI; import jalview.structure.StructureSelectionManager; @@ -59,15 +61,6 @@ public abstract class JalviewChimeraBinding extends AAStructureBindingModel public static final String CHIMERA_FEATURE_GROUP = "Chimera"; - // Chimera clause to exclude alternate locations in atom selection - private static final String NO_ALTLOCS = "&~@.B-Z&~@.2-9"; - - private static final boolean debug = false; - - private static final String PHOSPHORUS = "P"; - - private static final String ALPHACARBON = "CA"; - /* * Object through which we talk to Chimera */ @@ -367,10 +360,8 @@ public abstract class JalviewChimeraBinding extends AAStructureBindingModel if (getResponse) { reply = lastReply; - if (debug) - { - log("Response from command ('" + cmd + "') was:\n" + lastReply); - } + Cache.log.debug( + "Response from command ('" + cmd + "') was:\n" + lastReply); } return reply; @@ -593,7 +584,11 @@ public abstract class JalviewChimeraBinding extends AAStructureBindingModel /** * Constructs and send commands to Chimera to set attributes on residues for - * features visible in Jalview + * features visible in Jalview. + *

+ * The syntax is: setattr r <attName> <attValue> <atomSpec> + *

+ * For example: setattr r jv_chain "Ferredoxin-1, Chloroplastic" #0:94.A * * @param avp * @return @@ -601,14 +596,11 @@ public abstract class JalviewChimeraBinding extends AAStructureBindingModel public int sendFeaturesToViewer(AlignmentViewPanel avp) { // TODO refactor as required to pull up to an interface - String[] files = getStructureFiles(); - if (files == null) - { - return 0; - } + Map> featureValues = buildFeaturesMap( + avp); List commands = getCommandGenerator() - .setAttributesForFeatures(getSsm(), files, getSequence(), avp); + .setAttributes(featureValues); if (commands.size() > 10) { sendCommandsByFile(commands); @@ -844,6 +836,7 @@ public abstract class JalviewChimeraBinding extends AAStructureBindingModel return CHIMERA_SESSION_EXTENSION; } + @Override public String getHelpURL() { return "https://www.cgl.ucsf.edu/chimera/docs/UsersGuide";