From ffb872770f6393ae834e385ca746d6166b0a8b14 Mon Sep 17 00:00:00 2001
From: James Graham <J.A.Graham@soton.ac.uk>
Date: Mon, 9 May 2016 11:50:38 +0100
Subject: [PATCH] Fixed sanitize.py Added brief info on output to documentation
 Added Python 3.5 to tests

---
 .travis.yml          | 1 +
 doc/source/index.rst | 2 ++
 sanitize.py          | 4 +---
 3 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index a726df7..de518da 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -3,6 +3,7 @@ python:
   - "3.2"
   - "3.3"
   - "3.4"
+  - "3.5"
 cache:
     directories:
         - $HOME/.cache/pip
diff --git a/doc/source/index.rst b/doc/source/index.rst
index 58f0cb6..bbac12b 100644
--- a/doc/source/index.rst
+++ b/doc/source/index.rst
@@ -48,6 +48,8 @@ The program is called by:
 
 Example mapping and bond definition files are present in the ``test/data`` directory.  Their format is explained below.
 
+After running PyCGTOOL two files, ``out.gro`` and ``out.itp`` will be created.  The gro file contains the mapped coarse-grain coordinates with every molecule for which a mapping was provided.  The itp file contains the parameters for each molecule type.  **NB**: charges are not currently set by PyCGTOOL as MARTINI only allows charges on certain bead types.
+
 Mapping / Bond Definition Files
 -------------------------------
 The mapping and bond definition input files use a format similar to the GROMACS itp/top format.
diff --git a/sanitize.py b/sanitize.py
index c0e33c8..05846d0 100755
--- a/sanitize.py
+++ b/sanitize.py
@@ -29,6 +29,7 @@ def main(args):
                     for c_line in constr_lines:
                         print(c_line, file=outfile)
                     print(file=outfile)
+                    has_constr = True
 
                 print(line, file=outfile)
                 continue
@@ -48,12 +49,9 @@ def main(args):
                 constr_lines.append(line[:line.rindex(line.split()[4]) - 1])
                 continue
 
-            if args.fc is not None and section == "constraints":
-
             print(line, file=outfile)
 
 
-
 if __name__ == "__main__":
     parser = argparse.ArgumentParser(description="Sanitize PDB2GMX output topology.")
     parser.add_argument('-i', type=str, required=True, help="Input topology file")
-- 
GitLab