********>Bugfix 19
Author: Dave Case
Date: 09/30/2006

Programs: LEaP

Description: The code for reading PDB files requires there to be a space
             after the letters "TER" in order for such cards to be recoginized
             as separator cards.  This patch removes that restriction,
             although it is arguably a part of the PDB specification.  This
             patch also adds a space in writing pdb files, to at least give
             some amount of backwards compatibility.  (Users having problems
             with other programs can also try to recompile leap with 
             "-DELABORATE_PDB_TER".)

Fix:  apply the following patch to src/leap/src/leap/pdb_read.c and to
      /src/leap/src/leap/pdb_write.c

------------------------------------------------------------------------------
  
*** pdb_read.c	3 Apr 2006 23:35:29 -0000	9.0
--- pdb_read.c	30 Sep 2006 15:37:53 -0000
***************
*** 199,205 ****
                          r.record_type = PDB_TURN;
                  else if (STREQN(buffer + 1, "vec", 3))
                          r.record_type = PDB_TVECT;
!                 else if (STREQN(buffer + 1, "er ", 3))
                          r.record_type = PDB_TER;
                  break;
  
--- 199,205 ----
                          r.record_type = PDB_TURN;
                  else if (STREQN(buffer + 1, "vec", 3))
                          r.record_type = PDB_TVECT;
!                 else if (STREQN(buffer + 1, "er", 2))
                          r.record_type = PDB_TER;
                  break;
  

*** pdb_write.c	3 Apr 2006 23:35:29 -0000	9.0
--- pdb_write.c	30 Sep 2006 15:59:06 -0000
***************
*** 326,332 ****
                          r->pdb.ter.residue.seq_num,
                          r->pdb.ter.residue.insert_code);
  #else
!                 fmt = "TER";
                  pdb_sprintf(buffer, fmt );
  #endif
                  break;
--- 326,332 ----
                          r->pdb.ter.residue.seq_num,
                          r->pdb.ter.residue.insert_code);
  #else
!                 fmt = "TER ";
                  pdb_sprintf(buffer, fmt );
  #endif
                  break;

------------------------------------------------------------------------------

Temporary workarounds: Add a space in your input PDB files