Skip to content

Commit

Permalink
Fix PDB writing of TER record
Browse files Browse the repository at this point in the history
  • Loading branch information
leeping committed Jan 3, 2025
1 parent 345d921 commit 3572dc8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions geometric/molecule.py
Original file line number Diff line number Diff line change
Expand Up @@ -4669,6 +4669,8 @@ def write_pdb(self, **kwargs):
if i < (self.na-1) and chainName != chainNames[i+1]:
out.append("TER %5d %3s %s%4s" % (atomIndex, resName, chainName, resId))
atomIndex += 1
elif i < (self.na-1) and hasattr(self, 'terminal') and self.terminal[i]:
out.append("TER")
out.append("TER %5d %3s %s%4s" % (atomIndex, resName, chainName, resId))
if len(self) > 1:
out.append("ENDMDL")
Expand Down

0 comments on commit 3572dc8

Please sign in to comment.