From 97d4927e16870aa0294e9516d7cf1b84e7fd91c2 Mon Sep 17 00:00:00 2001 From: Justin MacCallum Date: Tue, 9 Mar 2010 18:00:48 -0800 Subject: [PATCH] Allow for four-letter residue ids in PDB files. --- include/pdbio.h | 4 ++-- src/gmxlib/pdbio.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/pdbio.h b/include/pdbio.h index c054311..e218c6a 100644 --- a/include/pdbio.h +++ b/include/pdbio.h @@ -52,8 +52,8 @@ extern "C" { typedef struct gmx_conect_t *gmx_conect; /* THE pdb format (for ATOM/HETATOM lines) */ -static const char *pdbformat ="%-6s%5u %-4.4s%3.3s %c%4d%c %8.3f%8.3f%8.3f"; -static const char *pdbformat4="%-6s%5u %-4.4s %3.3s %c%4d%c %8.3f%8.3f%8.3f"; +static const char *pdbformat ="%-6s%5u %-4.4s%-4.4s%c%4d%c %8.3f%8.3f%8.3f"; +static const char *pdbformat4="%-6s%5u %-4.4s %-4.4s%c%4d%c %8.3f%8.3f%8.3f"; /* Enumerated type for pdb records. The other entries are ignored * when reading a pdb file diff --git a/src/gmxlib/pdbio.c b/src/gmxlib/pdbio.c index dae4b2e..43ec08a 100644 --- a/src/gmxlib/pdbio.c +++ b/src/gmxlib/pdbio.c @@ -289,7 +289,7 @@ void write_pdbfile_indexed(FILE *out,const char *title, } if (bWideFormat) strcpy(pdbform, - "%-6s%5u %-4.4s %3.3s %c%4d%c %10.5f%10.5f%10.5f%8.4f%8.4f %2s\n"); + "%-6s%5u %-4.4s %-4.4s%c%4d%c %10.5f%10.5f%10.5f%8.4f%8.4f %2s\n"); else { /* Check whether atomname is an element name */ if ((strlen(nm)<4) && (strcasecmp(nm,atoms->atom[i].elem) != 0)) -- 1.6.6.1