1 | AT_BANNER([MoleCuilder - molecular config creation from xyz file and atom adding])
|
---|
2 | # 1. create some simplest molecular geometry
|
---|
3 | AT_SETUP([Simple configuration - xyz file generation])
|
---|
4 | AT_KEYWORDS([configuration])
|
---|
5 | AT_DATA([test.xyz], [[1
|
---|
6 | # test configuration, created by molecuilder test suite
|
---|
7 | H 10. 10. 10.
|
---|
8 | ]])
|
---|
9 | AT_CHECK([file=test.xyz; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/1/post/$file], 0, [ignore], [ignore])
|
---|
10 | AT_CLEANUP
|
---|
11 |
|
---|
12 | # 2. parsing an xyz
|
---|
13 | AT_SETUP([Simple configuration - parsing xyz file])
|
---|
14 | AT_KEYWORDS([configuration])
|
---|
15 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/2/pre/test.xyz .], 0)
|
---|
16 | AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -p test.xyz], 0, [ignore], [ignore])
|
---|
17 | AT_CHECK([fgrep "Ion_Type1_1" test.conf], 0, [Ion_Type1_1 10.000000000 10.000000000 10.000000000 0 # molecule nr 0
|
---|
18 | ], [ignore])
|
---|
19 | AT_CHECK([file=test.conf; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/2/post/$file], 0, [ignore], [ignore])
|
---|
20 | AT_CHECK([file=test.conf.in; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/2/post/$file], 0, [ignore], [ignore])
|
---|
21 | AT_CHECK([file=test.conf.xyz; diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/2/post/$file], 0, [ignore], [ignore])
|
---|
22 | AT_CLEANUP
|
---|
23 |
|
---|
24 | # 3. add atom
|
---|
25 | AT_SETUP([Simple configuration - adding atom])
|
---|
26 | AT_KEYWORDS([configuration])
|
---|
27 | AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -a 1 --position 10. 10. 10.], 0, [ignore], [ignore])
|
---|
28 | AT_CHECK([file=test.conf; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/3/post/$file], 0, [ignore], [ignore])
|
---|
29 | AT_CHECK([file=test.conf.in; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/3/post/$file], 0, [ignore], [ignore])
|
---|
30 | AT_CHECK([file=test.conf.xyz; diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/3/post/$file], 0, [ignore], [ignore])
|
---|
31 | AT_CLEANUP
|
---|
32 |
|
---|
33 | # 4. change the element
|
---|
34 | AT_SETUP([Simple configuration - Changing element])
|
---|
35 | AT_KEYWORDS([configuration])
|
---|
36 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/4/pre/test.conf test.conf], 0)
|
---|
37 | AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -E 0 --element 6], 0, [ignore], [ignore])
|
---|
38 | AT_CHECK([file=test.conf; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/4/post/$file], 0, [ignore], [ignore])
|
---|
39 | AT_CLEANUP
|
---|
40 |
|
---|
41 | # 5. remove atom
|
---|
42 | AT_SETUP([Simple configuration - Atom removal])
|
---|
43 | AT_KEYWORDS([configuration])
|
---|
44 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/5/pre/test.conf .], 0)
|
---|
45 | AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -r 0], 0, [ignore], [ignore])
|
---|
46 | AT_CHECK([file=test.conf; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/5/post/$file], 0, [ignore], [ignore])
|
---|
47 | AT_CHECK([file=test.conf.in; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/5/post/$file], 0, [ignore], [ignore])
|
---|
48 | AT_CHECK([file=test.conf.xyz; diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/5/post/$file], 0, [ignore], [ignore])
|
---|
49 | AT_CLEANUP
|
---|
50 |
|
---|
51 | # 6. test some more configuration that all desire parameters and count how many complain
|
---|
52 | AT_SETUP([Simple configuration - invalid commands on empty configs])
|
---|
53 | AT_KEYWORDS([configuration])
|
---|
54 | AT_CHECK([../../molecuilder empty.conf -e ${abs_top_srcdir}/src/ -t -s -b -E -c -b -a -U -T -u], 134, [ignore], [stderr])
|
---|
55 | AT_CLEANUP
|
---|
56 |
|
---|
57 | # 7. test some more configuration that all need parameters and count how many complain
|
---|
58 | AT_SETUP([Simple configuration - invalid commands on present configs])
|
---|
59 | AT_KEYWORDS([configuration])
|
---|
60 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/7/pre/test.conf .], 0)
|
---|
61 | AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -t], 134, [ignore], [stderr])
|
---|
62 | AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -s -b -E -c -b -a -U -T -u], 134, [ignore], [stderr])
|
---|
63 | AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -b -E -c -b -a -U -T -u], 134, [ignore], [stderr])
|
---|
64 | AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -E -c -b -a -U -T -u], 134, [ignore], [stderr])
|
---|
65 | AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -c -b -a -U -T -u], 134, [ignore], [stderr])
|
---|
66 | AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -b -a -U -T -u], 134, [ignore], [stderr])
|
---|
67 | AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -a -U -T -u], 134, [ignore], [stderr])
|
---|
68 | AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -U -T -u], 134, [ignore], [stderr])
|
---|
69 | AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -T -u], 134, [ignore], [stderr])
|
---|
70 | AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -u], 134, [ignore], [stderr])
|
---|
71 | AT_CLEANUP
|
---|
72 |
|
---|
73 | # 8. Removing sphere of atoms
|
---|
74 | AT_SETUP([Simple configuration - Removing sphere of atoms])
|
---|
75 | AT_KEYWORDS([configuration])
|
---|
76 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/8/pre/test.* .], 0)
|
---|
77 | AT_CHECK([../../molecuilder test.conf -e ${abs_top_srcdir}/src/ -R 7. --position 7.283585982 3.275186040 3.535886037], 0, [stdout], [stderr])
|
---|
78 | AT_CHECK([sort -n test.conf.xyz | grep -v "Created by" >test.conf.xyz-sorted], 0, [ignore], [ignore])
|
---|
79 | AT_CHECK([sort -n ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/8/post/test.conf.xyz | grep -v "Created by" >${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/8/post/test.conf.xyz-sorted], 0, [ignore], [ignore])
|
---|
80 | AT_CHECK([file=test.conf.xyz-sorted; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/8/post/$file], 0, [ignore], [ignore])
|
---|
81 | AT_CLEANUP
|
---|