Skip to content

Commit 66d8ecb

Browse files
committed
Fix chain ID duplication bug in repeats alignment
1 parent 58f108c commit 66d8ecb

File tree

1 file changed

+3
-4
lines changed
  • biojava-structure/src/main/java/org/biojava/nbio/structure/symmetry/utils

1 file changed

+3
-4
lines changed

biojava-structure/src/main/java/org/biojava/nbio/structure/symmetry/utils/SymmetryTools.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@ public static Structure getQuaternaryStructure(CeSymmResult symmetry) {
508508
throw new IllegalArgumentException("The symmetry result "
509509
+ "is not refined, repeats cannot be defined");
510510

511-
Atom[] atoms = symmetry.getAtoms();
511+
Atom[] atoms = StructureTools.cloneAtomArray(symmetry.getAtoms());
512512

513513
Structure symm = new StructureImpl();
514514
symm.setStructureIdentifier(symmetry.getStructureId());
@@ -593,8 +593,7 @@ public static MultipleAlignment toRepeatsAlignment(CeSymmResult result)
593593

594594
MultipleAlignment msa = result.getMultipleAlignment();
595595
MultipleAlignmentEnsemble newEnsemble = msa.getEnsemble().clone();
596-
newEnsemble.setStructureIdentifiers(result.getRepeatsID());
597-
596+
598597
// Modify atom arrays to include the repeat atoms only
599598
List<Atom[]> atomArrays = new ArrayList<Atom[]>();
600599
Structure divided = SymmetryTools.getQuaternaryStructure(result);
@@ -992,7 +991,7 @@ public static Atom[] getRepresentativeAtoms(Structure structure) {
992991

993992
else {
994993

995-
// Get Atoms of all models and rename chains (in case BIO)
994+
// Get Atoms of all models
996995
List<Atom> atomList = new ArrayList<Atom>();
997996
for (int m = 0; m < structure.nrModels(); m++) {
998997
for (Chain c : structure.getModel(m))

0 commit comments

Comments
 (0)