X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2FMCview%2FAtom.java;h=904e3070c626cf00a1689be96aad34da9cdfbb0d;hb=af65be61ff37a024b694150efed2c6c9b81382ef;hp=9cbcebb004f3b992cd829f2a5594528e7aca2adf;hpb=be32c14cd8e48fe0a207cd7030cb9cd46f894678;p=jalview.git diff --git a/src/MCview/Atom.java b/src/MCview/Atom.java index 9cbcebb..904e307 100755 --- a/src/MCview/Atom.java +++ b/src/MCview/Atom.java @@ -20,6 +20,8 @@ */ package MCview; +import jalview.schemes.ResidueProperties; + import java.awt.Color; public class Atom @@ -73,6 +75,8 @@ public class Atom name = str.substring(12, 15).trim(); resName = str.substring(17, 20); + // JAL-1828 treat MSE Selenomethionine as MET (etc) + resName = ResidueProperties.getCanonicalAminoAcid(resName); chain = str.substring(21, 22); @@ -105,13 +109,28 @@ public class Atom } } + @Override + public boolean equals(Object that) + { + if (this == that || that == null) + { + return true; + } + if (that instanceof Atom) + { + Atom other = (Atom) that; + return other.resName.equals(this.resName) + && other.resNumber == this.resNumber + && other.resNumIns.equals(this.resNumIns) + && other.chain.equals(this.chain); + } + return false; + } + public Atom(float x, float y, float z) { this.x = x; this.y = y; this.z = z; } - // public void setColor(Color col) { - // this.color = col; - // } }