Index: tests/regression/Molecules/Remove/post/id0_2_missing.pdb
===================================================================
--- tests/regression/Molecules/Remove/post/id0_2_missing.pdb	(revision 867473fc81f5f56ef4a2749de5a2256f208084b8)
+++ tests/regression/Molecules/Remove/post/id0_2_missing.pdb	(revision 867473fc81f5f56ef4a2749de5a2256f208084b8)
@@ -0,0 +1,38 @@
+REMARK created by molecuilder on Fri Dec 12 18:59:48 2014, time step 0
+ATOM      1 O01 0non 01          1.590   2.000   6.000  0.00  0.00           O 0
+ATOM      2 H01 0non 01          2.205   2.000   6.774  0.00  0.00           H 0
+ATOM      3 H02 0non 01          2.205   2.000   5.226  0.00  0.00           H 0
+ATOM      4 O01 0non 02          1.590   6.000   6.000  0.00  0.00           O 0
+ATOM      5 H01 0non 02          2.205   6.000   6.774  0.00  0.00           H 0
+ATOM      6 H02 0non 02          2.205   6.000   5.226  0.00  0.00           H 0
+ATOM      7 O01 0non 03          5.590   2.000   2.000  0.00  0.00           O 0
+ATOM      8 H01 0non 03          6.205   2.000   2.774  0.00  0.00           H 0
+ATOM      9 H02 0non 03          6.205   2.000   1.226  0.00  0.00           H 0
+ATOM     10 O01 0non 04          5.590   2.000   6.000  0.00  0.00           O 0
+ATOM     11 H01 0non 04          6.205   2.000   6.774  0.00  0.00           H 0
+ATOM     12 H02 0non 04          6.205   2.000   5.226  0.00  0.00           H 0
+ATOM     13 O01 0non 05          5.590   6.000   2.000  0.00  0.00           O 0
+ATOM     14 H01 0non 05          6.205   6.000   2.774  0.00  0.00           H 0
+ATOM     15 H02 0non 05          6.205   6.000   1.226  0.00  0.00           H 0
+ATOM     16 O01 0non 06          5.590   6.000   6.000  0.00  0.00           O 0
+ATOM     17 H01 0non 06          6.205   6.000   6.774  0.00  0.00           H 0
+ATOM     18 H02 0non 06          6.205   6.000   5.226  0.00  0.00           H 0
+CONECT    1    2    3                                                           
+CONECT    2    1                                                                
+CONECT    3    1                                                                
+CONECT    4    5    6                                                           
+CONECT    5    4                                                                
+CONECT    6    4                                                                
+CONECT    7    8    9                                                           
+CONECT    8    7                                                                
+CONECT    9    7                                                                
+CONECT   10   11   12                                                           
+CONECT   11   10                                                                
+CONECT   12   10                                                                
+CONECT   13   14   15                                                           
+CONECT   14   13                                                                
+CONECT   15   13                                                                
+CONECT   16   17   18                                                           
+CONECT   17   16                                                                
+CONECT   18   16                                                                
+END
Index: tests/regression/Molecules/Remove/post/water_box.pdb
===================================================================
--- tests/regression/Molecules/Remove/post/water_box.pdb	(revision 867473fc81f5f56ef4a2749de5a2256f208084b8)
+++ tests/regression/Molecules/Remove/post/water_box.pdb	(revision 867473fc81f5f56ef4a2749de5a2256f208084b8)
@@ -0,0 +1,44 @@
+REMARK created by molecuilder on Fri Dec 12 19:01:22 2014, time step 0
+ATOM      1 O01 0non 01          1.590   2.000   2.000  0.00  0.00           O 0
+ATOM      2 H01 0non 01          2.205   2.000   2.774  0.00  0.00           H 0
+ATOM      3 H02 0non 01          2.205   2.000   1.226  0.00  0.00           H 0
+ATOM      4 O01 0non 02          1.590   2.000   6.000  0.00  0.00           O 0
+ATOM      5 H01 0non 02          2.205   2.000   6.774  0.00  0.00           H 0
+ATOM      6 H02 0non 02          2.205   2.000   5.226  0.00  0.00           H 0
+ATOM      7 O01 0non 03          1.590   6.000   2.000  0.00  0.00           O 0
+ATOM      8 H01 0non 03          2.205   6.000   2.774  0.00  0.00           H 0
+ATOM      9 H02 0non 03          2.205   6.000   1.226  0.00  0.00           H 0
+ATOM     10 O01 0non 04          1.590   6.000   6.000  0.00  0.00           O 0
+ATOM     11 H01 0non 04          2.205   6.000   6.774  0.00  0.00           H 0
+ATOM     12 H02 0non 04          2.205   6.000   5.226  0.00  0.00           H 0
+ATOM     13 O01 0non 05          5.590   2.000   2.000  0.00  0.00           O 0
+ATOM     14 H01 0non 05          6.205   2.000   2.774  0.00  0.00           H 0
+ATOM     15 H02 0non 05          6.205   2.000   1.226  0.00  0.00           H 0
+ATOM     16 O01 0non 06          5.590   2.000   6.000  0.00  0.00           O 0
+ATOM     17 H01 0non 06          6.205   2.000   6.774  0.00  0.00           H 0
+ATOM     18 H02 0non 06          6.205   2.000   5.226  0.00  0.00           H 0
+ATOM     19 O01 0non 07          5.590   6.000   2.000  0.00  0.00           O 0
+ATOM     20 H01 0non 07          6.205   6.000   2.774  0.00  0.00           H 0
+ATOM     21 H02 0non 07          6.205   6.000   1.226  0.00  0.00           H 0
+ATOM     22 O01 0non 08          5.590   6.000   6.000  0.00  0.00           O 0
+ATOM     23 H01 0non 08          6.205   6.000   6.774  0.00  0.00           H 0
+ATOM     24 H02 0non 08          6.205   6.000   5.226  0.00  0.00           H 0
+CONECT    4    5    6                                                           
+CONECT    5    4                                                                
+CONECT    6    4                                                                
+CONECT   10   11   12                                                           
+CONECT   11   10                                                                
+CONECT   12   10                                                                
+CONECT   13   14   15                                                           
+CONECT   14   13                                                                
+CONECT   15   13                                                                
+CONECT   16   17   18                                                           
+CONECT   17   16                                                                
+CONECT   18   16                                                                
+CONECT   19   20   21                                                           
+CONECT   20   19                                                                
+CONECT   21   19                                                                
+CONECT   22   23   24                                                           
+CONECT   23   22                                                                
+CONECT   24   22                                                                
+END
Index: tests/regression/Molecules/Remove/pre/water_box.pdb
===================================================================
--- tests/regression/Molecules/Remove/pre/water_box.pdb	(revision 867473fc81f5f56ef4a2749de5a2256f208084b8)
+++ tests/regression/Molecules/Remove/pre/water_box.pdb	(revision 867473fc81f5f56ef4a2749de5a2256f208084b8)
@@ -0,0 +1,50 @@
+REMARK created by molecuilder on Mon Dec  8 20:36:58 2014, time step 0
+ATOM      1 O01 0non 01          1.590   2.000   2.000  0.00  0.00           O 0
+ATOM      2 H01 0non 01          2.205   2.000   2.774  0.00  0.00           H 0
+ATOM      3 H02 0non 01          2.205   2.000   1.226  0.00  0.00           H 0
+ATOM      4 O01 0non 02          1.590   2.000   6.000  0.00  0.00           O 0
+ATOM      5 H01 0non 02          2.205   2.000   6.774  0.00  0.00           H 0
+ATOM      6 H02 0non 02          2.205   2.000   5.226  0.00  0.00           H 0
+ATOM      7 O01 0non 03          1.590   6.000   2.000  0.00  0.00           O 0
+ATOM      8 H01 0non 03          2.205   6.000   2.774  0.00  0.00           H 0
+ATOM      9 H02 0non 03          2.205   6.000   1.226  0.00  0.00           H 0
+ATOM     10 O01 0non 04          1.590   6.000   6.000  0.00  0.00           O 0
+ATOM     11 H01 0non 04          2.205   6.000   6.774  0.00  0.00           H 0
+ATOM     12 H02 0non 04          2.205   6.000   5.226  0.00  0.00           H 0
+ATOM     13 O01 0non 05          5.590   2.000   2.000  0.00  0.00           O 0
+ATOM     14 H01 0non 05          6.205   2.000   2.774  0.00  0.00           H 0
+ATOM     15 H02 0non 05          6.205   2.000   1.226  0.00  0.00           H 0
+ATOM     16 O01 0non 06          5.590   2.000   6.000  0.00  0.00           O 0
+ATOM     17 H01 0non 06          6.205   2.000   6.774  0.00  0.00           H 0
+ATOM     18 H02 0non 06          6.205   2.000   5.226  0.00  0.00           H 0
+ATOM     19 O01 0non 07          5.590   6.000   2.000  0.00  0.00           O 0
+ATOM     20 H01 0non 07          6.205   6.000   2.774  0.00  0.00           H 0
+ATOM     21 H02 0non 07          6.205   6.000   1.226  0.00  0.00           H 0
+ATOM     22 O01 0non 08          5.590   6.000   6.000  0.00  0.00           O 0
+ATOM     23 H01 0non 08          6.205   6.000   6.774  0.00  0.00           H 0
+ATOM     24 H02 0non 08          6.205   6.000   5.226  0.00  0.00           H 0
+CONECT    1    3    2                                                           
+CONECT    2    1                                                                
+CONECT    3    1                                                                
+CONECT    4    6    5                                                           
+CONECT    5    4                                                                
+CONECT    6    4                                                                
+CONECT    7    9    8                                                           
+CONECT    8    7                                                                
+CONECT    9    7                                                                
+CONECT   10   12   11                                                           
+CONECT   11   10                                                                
+CONECT   12   10                                                                
+CONECT   13   15   14                                                           
+CONECT   14   13                                                                
+CONECT   15   13                                                                
+CONECT   16   18   17                                                           
+CONECT   17   16                                                                
+CONECT   18   16                                                                
+CONECT   19   21   20                                                           
+CONECT   20   19                                                                
+CONECT   21   19                                                                
+CONECT   22   24   23                                                           
+CONECT   23   22                                                                
+CONECT   24   22                                                                
+END
Index: tests/regression/Molecules/Remove/testsuite-molecules-remove.at
===================================================================
--- tests/regression/Molecules/Remove/testsuite-molecules-remove.at	(revision 867473fc81f5f56ef4a2749de5a2256f208084b8)
+++ tests/regression/Molecules/Remove/testsuite-molecules-remove.at	(revision 867473fc81f5f56ef4a2749de5a2256f208084b8)
@@ -0,0 +1,53 @@
+#
+#    MoleCuilder - creates and alters molecular systems
+#    Copyright (C) 2014 Frederik Heber
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+### remove molecule
+
+AT_SETUP([Molecules - Molecule removal])
+AT_KEYWORDS([molecules remove-molecule])
+
+file=water_box.pdb
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Molecules/Remove/pre/water_box.pdb $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 2 --remove-molecule], 0, [ignore], [ignore])
+AT_CHECK([diff -I '.*reated by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Molecules/Remove/post/id0_2_missing.pdb], 0, [ignore], [ignore])
+
+AT_CLEANUP
+
+
+AT_SETUP([Molecules - Molecule removal with Undo])
+AT_KEYWORDS([molecules remove-molecule undo])
+
+file=water_box.pdb
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Molecules/Remove/pre/water_box.pdb $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 2 --remove-molecule --undo], 0, [ignore], [ignore])
+AT_CHECK([diff -I '.*reated by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Molecules/Remove/post/water_box.pdb], 0, [ignore], [ignore])
+
+AT_CLEANUP
+
+
+AT_SETUP([Molecules - Molecule removal with Redo])
+AT_KEYWORDS([molecules remove-molecule redo])
+
+file=water_box.pdb
+AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Molecules/Remove/pre/water_box.pdb $file], 0)
+AT_CHECK([chmod u+w $file], 0)
+AT_CHECK([../../molecuilder -i $file -I --select-molecule-by-id 0 2 --remove-molecule --undo --redo], 0, [ignore], [ignore])
+AT_CHECK([diff -I '.*reated by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Molecules/Remove/post/id0_2_missing.pdb], 0, [ignore], [ignore])
+
+AT_CLEANUP
Index: tests/regression/Molecules/testsuite-molecules.at
===================================================================
--- tests/regression/Molecules/testsuite-molecules.at	(revision 1a48d2c8c2b6ea08ac53c8fc5998d19145e4eeb8)
+++ tests/regression/Molecules/testsuite-molecules.at	(revision 867473fc81f5f56ef4a2749de5a2256f208084b8)
@@ -54,4 +54,7 @@
 m4_include([Molecules/Translation-Periodic/testsuite-molecules-translation-periodic.at])
 
+# remove whole molecules
+m4_include([Molecules/Remove/testsuite-molecules-remove.at])
+
 # Rotate to Principal Axis System
 m4_include([Molecules/RotateToPrincipalAxisSystem/testsuite-molecules-rotate-to-principal-axis-system.at])
