| [6253ed] | 1 | # | 
|---|
|  | 2 | #    MoleCuilder - creates and alters molecular systems | 
|---|
|  | 3 | #    Copyright (C) 2008-2012 University of Bonn | 
|---|
|  | 4 | # | 
|---|
|  | 5 | #    This program is free software: you can redistribute it and/or modify | 
|---|
|  | 6 | #    it under the terms of the GNU General Public License as published by | 
|---|
|  | 7 | #    the Free Software Foundation, either version 3 of the License, or | 
|---|
|  | 8 | #    (at your option) any later version. | 
|---|
|  | 9 | # | 
|---|
|  | 10 | #    This program is distributed in the hope that it will be useful, | 
|---|
|  | 11 | #    but WITHOUT ANY WARRANTY; without even the implied warranty of | 
|---|
|  | 12 | #    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | 
|---|
|  | 13 | #    GNU General Public License for more details. | 
|---|
|  | 14 | # | 
|---|
|  | 15 | #    You should have received a copy of the GNU General Public License | 
|---|
|  | 16 | #    along with this program.  If not, see <http://www.gnu.org/licenses/>. | 
|---|
|  | 17 | # | 
|---|
|  | 18 | # | 
|---|
|  | 19 | #    MoleCuilder - creates and alters molecular systems | 
|---|
|  | 20 | #    Copyright (C) 2008-2012 University of Bonn | 
|---|
|  | 21 | # | 
|---|
|  | 22 | #    This program is free software: you can redistribute it and/or modify | 
|---|
|  | 23 | #    it under the terms of the GNU General Public License as published by | 
|---|
|  | 24 | #    the Free Software Foundation, either version 3 of the License, or | 
|---|
|  | 25 | #    (at your option) any later version. | 
|---|
|  | 26 | # | 
|---|
|  | 27 | #    This program is distributed in the hope that it will be useful, | 
|---|
|  | 28 | #    but WITHOUT ANY WARRANTY; without even the implied warranty of | 
|---|
|  | 29 | #    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | 
|---|
|  | 30 | #    GNU General Public License for more details. | 
|---|
|  | 31 | # | 
|---|
|  | 32 | #    You should have received a copy of the GNU General Public License | 
|---|
|  | 33 | #    along with this program.  If not, see <http://www.gnu.org/licenses/>. | 
|---|
|  | 34 | # | 
|---|
| [2700983] | 35 | ### element database | 
|---|
|  | 36 |  | 
|---|
|  | 37 | AT_SETUP([Standard Options - element database]) | 
|---|
| [e611dc] | 38 | AT_KEYWORDS([options element-db]) | 
|---|
| [e69c87] | 39 |  | 
|---|
| [220cf64] | 40 | file=test.conf | 
|---|
| [2700983] | 41 | AT_DATA([elements.db], [[#  Covalent  radius  of  each  element in  Angstroem from  CSD (binding  is: [Rcov(A)+Rcov(B)-t,Rcov(A)+Rcov(B)+t] with  t = 0.4A | 
|---|
|  | 42 | #Element  Name  Symbol  Period  Group Block Atomic  Number  AtomicWeight  Covalent  Radius  vdW Radius | 
|---|
| [220cf64] | 43 | Hydrogen  H 1 1 s 1 1. 0.23  1.09 | 
|---|
|  | 44 | Helium  He  1 18  p 2 4. 1.5 1.4 | 
|---|
| [2700983] | 45 | ]]) | 
|---|
| [220cf64] | 46 | AT_CHECK([cp -f ${abs_top_srcdir}/tests/regression/Options/ElementsDb/pre/test.conf $file], 0, [ignore], [ignore]) | 
|---|
|  | 47 | AT_CHECK([chmod u+w $file], 0, [ignore], [ignore]) | 
|---|
| [2700983] | 48 | AT_CHECK([../../molecuilder -i test.conf -e ./], 0, [stdout], [stderr]) | 
|---|
|  | 49 | AT_CHECK([grep -E "Using.*as elements database." stdout], 0, [ignore], [ignore]) | 
|---|
|  | 50 | AT_CHECK([fgrep "Element list loaded successfully." stdout], 0, [ignore], [ignore]) | 
|---|
|  | 51 | AT_CHECK([fgrep "Something went wrong while parsing the other databases!" stderr], 0, [ignore], [ignore]) | 
|---|
| [220cf64] | 52 | AT_CHECK([grep "Ion_Type1.*1.000" test.conf], 0, [ignore], [ignore]) | 
|---|
|  | 53 | AT_CHECK([grep "Ion_Type1.*1.008" test.conf], 1, [ignore], [ignore]) | 
|---|
| [e69c87] | 54 |  | 
|---|
|  | 55 | AT_CLEANUP | 
|---|
|  | 56 |  | 
|---|
|  | 57 |  | 
|---|
|  | 58 | AT_SETUP([Standard Options - element database with Undo]) | 
|---|
| [e611dc] | 59 | AT_KEYWORDS([options element-db undo]) | 
|---|
| [e69c87] | 60 |  | 
|---|
| [220cf64] | 61 | file=test.conf | 
|---|
| [e69c87] | 62 | AT_DATA([elements.db], [[#  Covalent  radius  of  each  element in  Angstroem from  CSD (binding  is: [Rcov(A)+Rcov(B)-t,Rcov(A)+Rcov(B)+t] with  t = 0.4A | 
|---|
|  | 63 | #Element  Name  Symbol  Period  Group Block Atomic  Number  AtomicWeight  Covalent  Radius  vdW Radius | 
|---|
|  | 64 | Hydrogen  H 1 1 s 1 1.008 0.23  1.09 | 
|---|
|  | 65 | Helium  He  1 18  p 2 4.003 1.5 1.4 | 
|---|
|  | 66 | ]]) | 
|---|
| [220cf64] | 67 | AT_CHECK([cp -f ${abs_top_srcdir}/tests/regression/Options/ElementsDb/pre/test.conf $file], 0, [ignore], [ignore]) | 
|---|
|  | 68 | AT_CHECK([chmod u+w $file], 0, [ignore], [ignore]) | 
|---|
| [e69c87] | 69 | AT_CHECK([../../molecuilder -i test.conf -e ./ --undo], 0, [stdout], [stderr]) | 
|---|
|  | 70 | AT_CHECK([grep -E "Using.*as elements database." stdout], 0, [ignore], [ignore]) | 
|---|
|  | 71 | AT_CHECK([fgrep "Element list loaded successfully." stdout], 0, [ignore], [ignore]) | 
|---|
|  | 72 | AT_CHECK([fgrep "Something went wrong while parsing the other databases!" stderr], 0, [ignore], [ignore]) | 
|---|
| [220cf64] | 73 | AT_CHECK([grep "Ion_Type1.*1.000" test.conf], 1, [ignore], [ignore]) | 
|---|
|  | 74 | AT_CHECK([grep "Ion_Type1.*1.008" test.conf], 0, [ignore], [ignore]) | 
|---|
| [e69c87] | 75 |  | 
|---|
|  | 76 | AT_CLEANUP | 
|---|
|  | 77 |  | 
|---|
|  | 78 |  | 
|---|
|  | 79 | AT_SETUP([Standard Options - element database with Redo]) | 
|---|
| [e611dc] | 80 | AT_KEYWORDS([options element-db redo]) | 
|---|
| [e69c87] | 81 |  | 
|---|
| [220cf64] | 82 | file=test.conf | 
|---|
| [e69c87] | 83 | AT_DATA([elements.db], [[#  Covalent  radius  of  each  element in  Angstroem from  CSD (binding  is: [Rcov(A)+Rcov(B)-t,Rcov(A)+Rcov(B)+t] with  t = 0.4A | 
|---|
|  | 84 | #Element  Name  Symbol  Period  Group Block Atomic  Number  AtomicWeight  Covalent  Radius  vdW Radius | 
|---|
| [220cf64] | 85 | Hydrogen  H 1 1 s 1 1.000 0.23  1.09 | 
|---|
| [e69c87] | 86 | Helium  He  1 18  p 2 4.003 1.5 1.4 | 
|---|
|  | 87 | ]]) | 
|---|
| [220cf64] | 88 | AT_CHECK([cp -f ${abs_top_srcdir}/tests/regression/Options/ElementsDb/pre/test.conf $file], 0, [ignore], [ignore]) | 
|---|
|  | 89 | AT_CHECK([chmod u+w $file], 0, [ignore], [ignore]) | 
|---|
| [e69c87] | 90 | AT_CHECK([../../molecuilder -i test.conf -e ./ --undo --redo], 0, [stdout], [stderr]) | 
|---|
|  | 91 | AT_CHECK([grep -E "Using.*as elements database." stdout], 0, [ignore], [ignore]) | 
|---|
|  | 92 | AT_CHECK([fgrep "Element list loaded successfully." stdout], 0, [ignore], [ignore]) | 
|---|
|  | 93 | AT_CHECK([fgrep "Something went wrong while parsing the other databases!" stderr], 0, [ignore], [ignore]) | 
|---|
| [220cf64] | 94 | AT_CHECK([grep "Ion_Type1.*1.000" test.conf], 0, [ignore], [ignore]) | 
|---|
|  | 95 | AT_CHECK([grep "Ion_Type1.*1.008" test.conf], 1, [ignore], [ignore]) | 
|---|
| [e69c87] | 96 |  | 
|---|
| [2700983] | 97 | AT_CLEANUP | 
|---|