[8c574b] | 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)
|
---|
[192f6e] | 16 | AT_CHECK([../../molecuilder -i test.conf -e ${abs_top_srcdir}/src/ -o mpqc pcp xyz -p test.xyz], 0, [ignore], [ignore])
|
---|
[8c574b] | 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 |
|
---|
[b540f3] | 24 | # 3a. add atom
|
---|
[8c574b] | 25 | AT_SETUP([Simple configuration - adding atom])
|
---|
| 26 | AT_KEYWORDS([configuration])
|
---|
[192f6e] | 27 | AT_CHECK([../../molecuilder -i test.conf -e ${abs_top_srcdir}/src/ -o mpqc pcp xyz -a 1 --position "10., 10., 10."], 0, [ignore], [ignore])
|
---|
[8c574b] | 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])
|
---|
[192f6e] | 31 | AT_CHECK([../../molecuilder -i test2.conf -e ${abs_top_srcdir}/src/ -o mpqc pcp xyz -a 1 --position "0., 0., -1."], 0, [ignore], [ignore])
|
---|
[b540f3] | 32 | AT_CHECK([file=test2.conf; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/3/post/$file], 0, [ignore], [ignore])
|
---|
| 33 | AT_CHECK([file=test2.conf.in; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/3/post/$file], 0, [ignore], [ignore])
|
---|
| 34 | AT_CHECK([file=test2.conf.xyz; diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/3/post/$file], 0, [ignore], [ignore])
|
---|
[8c574b] | 35 | AT_CLEANUP
|
---|
| 36 |
|
---|
| 37 | # 4. change the element
|
---|
| 38 | AT_SETUP([Simple configuration - Changing element])
|
---|
| 39 | AT_KEYWORDS([configuration])
|
---|
| 40 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/4/pre/test.conf test.conf], 0)
|
---|
[192f6e] | 41 | AT_CHECK([../../molecuilder -i test.conf -e ${abs_top_srcdir}/src/ -E 0 --element 6], 0, [ignore], [ignore])
|
---|
[8c574b] | 42 | AT_CHECK([file=test.conf; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/4/post/$file], 0, [ignore], [ignore])
|
---|
| 43 | AT_CLEANUP
|
---|
| 44 |
|
---|
| 45 | # 5. remove atom
|
---|
| 46 | AT_SETUP([Simple configuration - Atom removal])
|
---|
| 47 | AT_KEYWORDS([configuration])
|
---|
| 48 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/5/pre/test.conf .], 0)
|
---|
[192f6e] | 49 | AT_CHECK([../../molecuilder -i test.conf -e ${abs_top_srcdir}/src/ -o mpqc pcp xyz -r 0], 0, [ignore], [ignore])
|
---|
[8c574b] | 50 | AT_CHECK([file=test.conf; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/5/post/$file], 0, [ignore], [ignore])
|
---|
| 51 | AT_CHECK([file=test.conf.in; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/5/post/$file], 0, [ignore], [ignore])
|
---|
| 52 | 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])
|
---|
| 53 | AT_CLEANUP
|
---|
| 54 |
|
---|
| 55 | # 6. test some more configuration that all desire parameters and count how many complain
|
---|
| 56 | AT_SETUP([Simple configuration - invalid commands on empty configs])
|
---|
| 57 | AT_KEYWORDS([configuration])
|
---|
[192f6e] | 58 | AT_CHECK([../../molecuilder -i empty.conf -e ${abs_top_srcdir}/src/ -t -s -b -E -c -b -a -U -T -u], 134, [ignore], [stderr])
|
---|
[8c574b] | 59 | AT_CLEANUP
|
---|
| 60 |
|
---|
| 61 | # 7. test some more configuration that all need parameters and count how many complain
|
---|
| 62 | AT_SETUP([Simple configuration - invalid commands on present configs])
|
---|
| 63 | AT_KEYWORDS([configuration])
|
---|
| 64 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/7/pre/test.conf .], 0)
|
---|
[192f6e] | 65 | AT_CHECK([../../molecuilder -i test.conf -e ${abs_top_srcdir}/src/ -t], 134, [ignore], [stderr])
|
---|
| 66 | AT_CHECK([../../molecuilder -i test.conf -e ${abs_top_srcdir}/src/ -s -b -E -c -b -a -U -T -u], 134, [ignore], [stderr])
|
---|
| 67 | AT_CHECK([../../molecuilder -i test.conf -e ${abs_top_srcdir}/src/ -b -E -c -b -a -U -T -u], 134, [ignore], [stderr])
|
---|
| 68 | AT_CHECK([../../molecuilder -i test.conf -e ${abs_top_srcdir}/src/ -E -c -b -a -U -T -u], 134, [ignore], [stderr])
|
---|
| 69 | AT_CHECK([../../molecuilder -i test.conf -e ${abs_top_srcdir}/src/ -c -b -a -U -T -u], 134, [ignore], [stderr])
|
---|
| 70 | AT_CHECK([../../molecuilder -i test.conf -e ${abs_top_srcdir}/src/ -b -a -U -T -u], 134, [ignore], [stderr])
|
---|
| 71 | AT_CHECK([../../molecuilder -i test.conf -e ${abs_top_srcdir}/src/ -a -U -T -u], 134, [ignore], [stderr])
|
---|
| 72 | AT_CHECK([../../molecuilder -i test.conf -e ${abs_top_srcdir}/src/ -U -T -u], 134, [ignore], [stderr])
|
---|
| 73 | AT_CHECK([../../molecuilder -i test.conf -e ${abs_top_srcdir}/src/ -T -u], 134, [ignore], [stderr])
|
---|
| 74 | AT_CHECK([../../molecuilder -i test.conf -e ${abs_top_srcdir}/src/ -u], 134, [ignore], [stderr])
|
---|
[8c574b] | 75 | AT_CLEANUP
|
---|
| 76 |
|
---|
| 77 | # 8. Removing sphere of atoms
|
---|
[42af9e] | 78 | AT_SETUP([Simple configuration - Removing sphere of atoms])
|
---|
[8c574b] | 79 | AT_KEYWORDS([configuration])
|
---|
| 80 | AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/8/pre/test.* .], 0)
|
---|
[192f6e] | 81 | AT_CHECK([../../molecuilder -i test.conf -e ${abs_top_srcdir}/src/ -o xyz -R 7. --position "7.283585982, 3.275186040, 3.535886037"], 0, [stdout], [stderr])
|
---|
[1024cb] | 82 | AT_CHECK([sort -n test.conf.xyz | grep -v "Created by" >test.conf.xyz-sorted], 0, [ignore], [ignore])
|
---|
| 83 | 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])
|
---|
| 84 | AT_CHECK([file=test.conf.xyz-sorted; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/8/post/$file], 0, [ignore], [ignore])
|
---|
[8c574b] | 85 | AT_CLEANUP
|
---|