From a0029c019d1c22b9f5512cbcce209b0f78a0fb20 Mon Sep 17 00:00:00 2001 From: Sebastian Ehlert <28669218+awvwgk@users.noreply.github.com> Date: Tue, 8 Feb 2022 12:30:35 +0100 Subject: [PATCH] Correctly update chain number when changing to another chain --- src/mctc/io/write/pdb.f90 | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mctc/io/write/pdb.f90 b/src/mctc/io/write/pdb.f90 index 2e6a74a9..76a9713f 100644 --- a/src/mctc/io/write/pdb.f90 +++ b/src/mctc/io/write/pdb.f90 @@ -56,6 +56,7 @@ subroutine write_pdb(mol, unit, number) else if (mol%pdb(iat)%chains /= last_chain) then write(unit, '("TER ",i5,6x,a3,1x,a1,i4)') iat + offset, & & mol%pdb(iat-1)%residue, last_chain, mol%pdb(iat)%residue_number + last_chain = mol%pdb(iat)%chains offset = offset+1 endif