Skip to content
Prev Previous commit
Next Next commit
Small optimization
  • Loading branch information
josemduarte committed Jan 22, 2020
commit f54b62595cb799481a7e2aef3212388c74929335
Original file line number Diff line number Diff line change
Expand Up @@ -298,15 +298,15 @@ public boolean mergeIdenticalByEntityId(SubunitCluster other) {
continue;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok I think that answers my question before, makes sense! Thanks Jose

}

// note the seqresindex is 1-based
Group otherG = otherChain.getSeqResGroups().get(seqresIndex - 1);

if (!otherChain.getAtomGroups().contains(otherG)) {
// skip residues that are unobserved in other sequence ("gaps" in the entity alignment)
int otherIndex = otherChain.getAtomGroups().indexOf(otherG);
if (otherIndex == -1) {
// skip residues that are unobserved in other sequence ("gaps" in the entity SEQRES alignment)
continue;
}

int otherIndex = otherChain.getAtomGroups().indexOf(otherG);

// Only consider residues that are part of the SubunitCluster
if (this.subunitEQR.get(this.representative).contains(thisIndex)
&& other.subunitEQR.get(other.representative).contains(otherIndex)) {
Expand All @@ -316,7 +316,7 @@ public boolean mergeIdenticalByEntityId(SubunitCluster other) {
}

if (thisAligned.size() == 0 && otherAligned.size() == 0) {
logger.warn("No equivalent aligned atoms found between SubunitClusters {}-{} via entity seqres alignment. Is FileParsingParameters.setAlignSeqRes() set?", thisName, otherName);
logger.warn("No equivalent aligned atoms found between SubunitClusters {}-{} via entity SEQRES alignment. Is FileParsingParameters.setAlignSeqRes() set?", thisName, otherName);
}

updateEquivResidues(other, thisAligned, otherAligned);
Expand Down