From 85937698cb3a6d1fb8be1cfa7a1677e632da7be9 Mon Sep 17 00:00:00 2001 From: gmungoc Date: Thu, 4 Jun 2015 11:51:28 +0100 Subject: [PATCH] JAL-1757 match only first altloc CA in PDB structure for superposition --- src/jalview/ext/jmol/JalviewJmolBinding.java | 3 ++- src/jalview/ext/rbvi/chimera/JalviewChimeraBinding.java | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/jalview/ext/jmol/JalviewJmolBinding.java b/src/jalview/ext/jmol/JalviewJmolBinding.java index 45fc378..50e156f 100644 --- a/src/jalview/ext/jmol/JalviewJmolBinding.java +++ b/src/jalview/ext/jmol/JalviewJmolBinding.java @@ -507,7 +507,8 @@ public abstract class JalviewJmolBinding extends AAStructureBindingModel command.append(1 + pdbfnum); command.append(".1} {"); command.append(1 + refStructure); - command.append(".1} SUBSET {*.CA | *.P} ATOMS "); + // conformation=1 excludes alternate locations for CA (JAL-1757) + command.append(".1} SUBSET {(*.CA | *.P) and conformation=1} ATOMS "); // form the matched pair strings String sep = ""; diff --git a/src/jalview/ext/rbvi/chimera/JalviewChimeraBinding.java b/src/jalview/ext/rbvi/chimera/JalviewChimeraBinding.java index b649a64..98f2e1a 100644 --- a/src/jalview/ext/rbvi/chimera/JalviewChimeraBinding.java +++ b/src/jalview/ext/rbvi/chimera/JalviewChimeraBinding.java @@ -53,6 +53,8 @@ import jalview.util.MessageManager; public abstract class JalviewChimeraBinding extends AAStructureBindingModel { + // 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; @@ -625,9 +627,12 @@ public abstract class JalviewChimeraBinding extends AAStructureBindingModel // TODO: handle sub-models command.append(selcom[pdbfnum]); command.append("@" + atomSpec[pdbfnum]); + // JAL-1757 exclude alternative CA locations + command.append(NO_ALTLOCS); command.append(" #" + refStructure /* +".1" */); command.append(selcom[refStructure]); command.append("@" + atomSpec[refStructure]); + command.append(NO_ALTLOCS); } if (selectioncom.length() > 0) { -- 1.7.10.2