Skip to content

Commit 384b4ee

Browse files
authored
Fixed alternative residue issue with TM align
Prevent duplicate CA atoms in PDB output by tracking last residue number.
1 parent 2b1425e commit 384b4ee

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

frontend/Utilities.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -538,8 +538,12 @@ export function makeChainMap(structure, sele) {
538538

539539
export function makeSubPDB(structure, sele) {
540540
let pdb = [];
541+
let lastResno = null;
541542
structure.eachAtom((ap) => {
542-
pdb.push(atomToPDBRow(ap));
543+
if (ap.atomname === "CA" && ap.resno !== lastResno) {
544+
lastResno = ap.resno;
545+
pdb.push(atomToPDBRow(ap));
546+
}
543547
}, new Selection(sele));
544548
return pdb.join("\n");
545549
}

0 commit comments

Comments
 (0)