Fix PQR formatting
authorPaul Bauer <paul.bauer.q@gmail.com>
Tue, 21 May 2019 08:14:36 +0000 (10:14 +0200)
committerEric Irrgang <ericirrgang@gmail.com>
Fri, 24 May 2019 15:05:06 +0000 (17:05 +0200)
Was still broken after the last fix a few months ago.

Fixes #2955

Change-Id: I55b1296918c723654db505d1797114e1358e5aeb

docs/release-notes/2019/2019.3.rst
src/gromacs/fileio/pdbio.cpp

index ad12d19dcdcb81db9a0b019519d9b9a16652a055..a9dee04b3ab206e7d15e152efe1a85c18882c5dd 100644 (file)
@@ -32,6 +32,14 @@ Fix segmentation fault when using membrane embedding
 Fixes for ``gmx`` tools
 ^^^^^^^^^^^^^^^^^^^^^^^
 
+Fix PQR formatting
+""""""""""""""""""""
+
+The formatting was incorrect for some tools that use PQR files.
+
+:issue:`2955`
+
+
 Fixes that affect portability
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
index 26dfd28c149fbbd6e03b99943f26cd922ea82e31..e097fbfe36401b7806f31e4cd55080db997ff369 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016,2017,2018,2019, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -288,7 +288,7 @@ gmx_fprintf_pqr_atomline(FILE *            fp,
     res_seq_number  = res_seq_number % 10000;
 
     int n = fprintf(fp,
-                    "%s %d %s %s %c %d %8.3f %8.3f %8.3f %6.2f %6.2f\n",
+                    "%-6s%5d %-4.4s%4.4s%c%4d %8.3f %8.3f %8.3f %6.2f %6.2f\n",
                     pdbtp[record],
                     atom_seq_number,
                     atom_name,