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;
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;
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
*/
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;
/**
* Constructs and send commands to Chimera to set attributes on residues for
- * features visible in Jalview
+ * features visible in Jalview.
+ * <p>
+ * The syntax is: setattr r <attName> <attValue> <atomSpec>
+ * <p>
+ * For example: setattr r jv_chain "Ferredoxin-1, Chloroplastic" #0:94.A
*
* @param avp
* @return
public int sendFeaturesToViewer(AlignmentViewPanel avp)
{
// TODO refactor as required to pull up to an interface
- String[] files = getStructureFiles();
- if (files == null)
- {
- return 0;
- }
+ Map<String, Map<Object, AtomSpecModel>> featureValues = buildFeaturesMap(
+ avp);
List<StructureCommandI> commands = getCommandGenerator()
- .setAttributesForFeatures(getSsm(), files, getSequence(), avp);
+ .setAttributes(featureValues);
if (commands.size() > 10)
{
sendCommandsByFile(commands);
return CHIMERA_SESSION_EXTENSION;
}
+ @Override
public String getHelpURL()
{
return "https://www.cgl.ucsf.edu/chimera/docs/UsersGuide";