From 0c2f7c74be34c4702ea4f9157e0ef04f3e03cdec Mon Sep 17 00:00:00 2001
From: Andrew Jewett <jewett.aij@gmail.com>
Date: Wed, 28 Jun 2017 14:12:03 -0700
Subject: [PATCH] added feature to write_data.cpp to support "extra bonds"
 (angles,dihedrals,impropers,special).

---
 src/write_data.cpp | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/src/write_data.cpp b/src/write_data.cpp
index d8b951dd8c..8f8aa69349 100644
--- a/src/write_data.cpp
+++ b/src/write_data.cpp
@@ -240,6 +240,26 @@ void WriteData::header()
       fprintf(fp,BIGINT_FORMAT " impropers\n",atom->nimpropers);
       fprintf(fp,"%d improper types\n",atom->nimpropertypes);
     }
+    if (atom->extra_bond_per_atom > 0) {
+      fprintf(fp,BIGINT_FORMAT " extra bond per atom\n",
+	      atom->extra_bond_per_atom);
+    }
+    if (atom->extra_angle_per_atom > 0) {
+      fprintf(fp,BIGINT_FORMAT " extra angle per atom\n",
+	      atom->extra_angle_per_atom);
+    }
+    if (atom->extra_dihedral_per_atom > 0) {
+      fprintf(fp,BIGINT_FORMAT " extra dihedral per atom\n",
+	      atom->extra_dihedral_per_atom);
+    }
+    if (atom->extra_improper_per_atom > 0) {
+      fprintf(fp,BIGINT_FORMAT " extra improper per atom\n",
+	      atom->extra_improper_per_atom);
+    }
+    if (force->special_extra > 0) {
+      fprintf(fp,BIGINT_FORMAT " extra special per atom\n",
+	      force->special_extra);
+    }
   }
 
   for (int i = 0; i < modify->nfix; i++)
-- 
GitLab