AT_BANNER([MoleCuilder - molecular config creation from xyz file and atom adding]) # 1. create some simplest molecular geometry AT_SETUP([Simple configuration - xyz file generation]) AT_KEYWORDS([configuration]) AT_DATA([test.xyz], [[1 # test configuration, created by molecuilder test suite H 10. 10. 10. ]]) AT_CHECK([file=test.xyz; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/1/post/$file], 0, [ignore], [ignore]) AT_CLEANUP # 2. parsing and storing an xyz AT_SETUP([Simple configuration - loading conf file]) AT_KEYWORDS([configuration]) AT_CHECK([../../molecuilder -i test.conf -e ${abs_top_srcdir}/src/ -o pcp -l ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/2/pre/test.conf], 0, [ignore], [ignore]) AT_CHECK([file=test.conf; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/2/post/$file], 0, [ignore], [ignore]) AT_CLEANUP AT_SETUP([Simple configuration - not implemented: loading mpqc file]) AT_KEYWORDS([configuration]) #AT_CHECK([../../molecuilder -i test.in -e ${abs_top_srcdir}/src/ -o mpqc -l ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/2/pre/test.in], 139, [ignore], [ignore]) # not working with NDEBUG it's 139, without its 132 AT_CLEANUP AT_SETUP([Simple configuration - storing mpqc from loaded xyz file]) AT_KEYWORDS([configuration]) AT_CHECK([../../molecuilder -i test.xyz -e ${abs_top_srcdir}/src/ -o mpqc -l ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/2/pre/test.xyz], 0, [ignore], [ignore]) AT_CHECK([file=test.in; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/2/post/$file], 0, [ignore], [ignore]) AT_CLEANUP AT_SETUP([Simple configuration - loading mpqc file]) AT_KEYWORDS([configuration]) #AT_CHECK([../../molecuilder -i test.in -e ${abs_top_srcdir}/src/ -o mpqc -l ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/2/pre/test.in], 139, [ignore], [ignore]) # not working with NDEBUG it's 139, without its 132 AT_CLEANUP AT_SETUP([Simple configuration - loading pdb file]) AT_KEYWORDS([configuration]) AT_CHECK([../../molecuilder -i test.pdb -e ${abs_top_srcdir}/src/ -o pdb -l ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/2/pre/test.pdb], 0, [ignore], [ignore]) AT_CHECK([file=test.pdb; diff -I '.*created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/2/post/$file], 0, [ignore], [ignore]) AT_CLEANUP AT_SETUP([Simple configuration - loading xyz file]) AT_KEYWORDS([configuration]) AT_CHECK([../../molecuilder -i test.xyz -e ${abs_top_srcdir}/src/ -o xyz -l ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/2/pre/test.xyz], 0, [ignore], [ignore]) AT_CHECK([file=test.xyz; diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/2/post/$file], 0, [ignore], [ignore]) AT_CLEANUP AT_SETUP([Simple configuration - saving conf file]) AT_KEYWORDS([configuration]) AT_CHECK([../../molecuilder -i test.conf -e ${abs_top_srcdir}/src/ -o pcp -l ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/2/pre/test.conf --output store.conf], 0, [ignore], [ignore]) AT_CHECK([diff store.conf ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/2/post/test.conf], 0, [ignore], [ignore]) AT_CLEANUP AT_SETUP([Simple configuration - saving mpqc (from parsed xyz) file]) AT_KEYWORDS([configuration]) AT_CHECK([../../molecuilder -i test.xyz -e ${abs_top_srcdir}/src/ -o mpqc -l ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/2/pre/test.xyz --output store.in], 0, [ignore], [ignore]) AT_CHECK([diff store.in ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/2/post/test.in], 0, [ignore], [ignore]) AT_CLEANUP AT_SETUP([Simple configuration - saving pdb file]) AT_KEYWORDS([configuration]) AT_CHECK([../../molecuilder -i test.pdb -e ${abs_top_srcdir}/src/ -o pdb -l ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/2/pre/test.pdb --output store.pdb], 0, [ignore], [ignore]) AT_CHECK([diff -I '.*created by molecuilder.*' store.pdb ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/2/post/test.pdb], 0, [ignore], [ignore]) AT_CLEANUP AT_SETUP([Simple configuration - saving xyz file]) AT_KEYWORDS([configuration]) AT_CHECK([../../molecuilder -i test.xyz -e ${abs_top_srcdir}/src/ -o xyz -l ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/2/pre/test.xyz --output store.xyz], 0, [ignore], [ignore]) AT_CHECK([diff -I '.*Created by molecuilder.*' store.xyz ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/2/post/test.xyz], 0, [ignore], [ignore]) AT_CLEANUP # 3a. add atom AT_SETUP([Simple configuration - adding atom]) AT_KEYWORDS([configuration]) AT_CHECK([../../molecuilder -i test.conf -e ${abs_top_srcdir}/src/ -o mpqc pcp xyz -a 1 --domain-position "10., 10., 10."], 0, [ignore], [ignore]) AT_CHECK([file=test.conf; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/3/post/$file], 0, [ignore], [ignore]) AT_CHECK([file=test.in; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/3/post/$file], 0, [ignore], [ignore]) AT_CHECK([file=test.xyz; diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/3/post/$file], 0, [ignore], [ignore]) AT_CHECK([../../molecuilder -i test2.conf -e ${abs_top_srcdir}/src/ -o mpqc pcp xyz -a 1 --domain-position "0., 0., -1."], 134, [ignore], [ignore]) AT_CLEANUP AT_SETUP([Simple configuration - adding atom with Undo/Redo]) AT_KEYWORDS([configuration]) AT_CHECK([../../molecuilder -i empty.conf -o pcp -a 1 --domain-position "10., 10., 10." --undo], 0, [ignore], [ignore]) AT_CHECK([file=empty.conf; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/3/post/$file], 0, [ignore], [ignore]) AT_CHECK([../../molecuilder -i test.conf -o mpqc pcp xyz -a 1 --domain-position "10., 10., 10." --undo --redo], 0, [ignore], [ignore]) AT_CHECK([file=test.conf; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/3/post/$file], 0, [ignore], [ignore]) AT_CHECK([file=test.in; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/3/post/$file], 0, [ignore], [ignore]) AT_CHECK([file=test.xyz; diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/3/post/$file], 0, [ignore], [ignore]) AT_CLEANUP # 4. change the element AT_SETUP([Simple configuration - Changing element]) AT_KEYWORDS([configuration]) AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/4/pre/test.xyz test.xyz], 0) AT_CHECK([../../molecuilder -i test.xyz -e ${abs_top_srcdir}/src/ --select-atom-by-id 0 -E 6 ], 0, [ignore], [ignore]) AT_CHECK([file=test.xyz; diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/4/post/$file], 0, [ignore], [ignore]) AT_CLEANUP AT_SETUP([Simple configuration - Changing element with Undo/Redo]) AT_KEYWORDS([configuration]) AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/4/pre/test.xyz test.xyz], 0) AT_CHECK([../../molecuilder -i test.xyz -e ${abs_top_srcdir}/src/ --select-atom-by-id 0 -E 6 --undo], 0, [ignore], [ignore]) AT_CHECK([file=test.xyz; diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/4/pre/$file], 0, [ignore], [ignore]) AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/4/pre/test.xyz test.xyz], 0) AT_CHECK([../../molecuilder -i test.xyz -e ${abs_top_srcdir}/src/ --select-atom-by-id 0 -E 6 --undo --redo], 0, [ignore], [ignore]) AT_CHECK([file=test.xyz; diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/4/post/$file], 0, [ignore], [ignore]) AT_CLEANUP # 5. remove atom AT_SETUP([Simple configuration - Atom removal]) AT_KEYWORDS([configuration]) AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/5/pre/test.conf .], 0) AT_CHECK([../../molecuilder -i test.conf -e ${abs_top_srcdir}/src/ -o mpqc pcp xyz --select-atom-by-id 0 -r], 0, [ignore], [ignore]) AT_CHECK([file=test.conf; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/5/post/$file], 0, [ignore], [ignore]) AT_CHECK([file=test.in; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/5/post/$file], 0, [ignore], [ignore]) AT_CHECK([file=test.xyz; diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/5/post/$file], 0, [ignore], [ignore]) AT_CLEANUP AT_SETUP([Simple configuration - Atom removal with Undo/Redo]) AT_KEYWORDS([configuration]) AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/5/pre/test.conf .], 0) AT_CHECK([../../molecuilder -i test.conf --select-atom-by-id 0 -r --undo], 0, [ignore], [ignore]) AT_CHECK([file=test.conf; diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/5/pre/$file], 0, [ignore], [ignore]) AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/5/pre/test.conf .], 0) AT_CHECK([../../molecuilder -i test.conf --select-atom-by-id 0 -r --undo --redo], 0, [ignore], [ignore]) AT_CHECK([file=test.conf; diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/5/post/$file], 0, [ignore], [ignore]) AT_CLEANUP # 6. test some more configuration that all desire parameters and count how many complain AT_SETUP([Simple configuration - invalid commands on empty configs]) AT_KEYWORDS([configuration]) AT_CHECK([../../molecuilder -i empty.conf -e ${abs_top_srcdir}/src/ -t -s -b -E -c -b -a -U -T -u], 134, [ignore], [stderr]) AT_CLEANUP # 7. test some more configuration that all need parameters and count how many complain AT_SETUP([Simple configuration - invalid commands on present configs]) AT_KEYWORDS([configuration]) AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/7/pre/test.conf .], 0) AT_CHECK([../../molecuilder -i test.conf -e ${abs_top_srcdir}/src/ -t], 134, [ignore], [stderr]) AT_CHECK([../../molecuilder -i test.conf -e ${abs_top_srcdir}/src/ -s -b -E -c -b -a -U -T -u], 134, [ignore], [stderr]) AT_CHECK([../../molecuilder -i test.conf -e ${abs_top_srcdir}/src/ -b -E -c -b -a -U -T -u], 134, [ignore], [stderr]) AT_CHECK([../../molecuilder -i test.conf -e ${abs_top_srcdir}/src/ -E -c -b -a -U -T -u], 134, [ignore], [stderr]) AT_CHECK([../../molecuilder -i test.conf -e ${abs_top_srcdir}/src/ -c -b -a -U -T -u], 134, [ignore], [stderr]) AT_CHECK([../../molecuilder -i test.conf -e ${abs_top_srcdir}/src/ -b -a -U -T -u], 134, [ignore], [stderr]) AT_CHECK([../../molecuilder -i test.conf -e ${abs_top_srcdir}/src/ -a -U -T -u], 134, [ignore], [stderr]) AT_CHECK([../../molecuilder -i test.conf -e ${abs_top_srcdir}/src/ -U -T -u], 134, [ignore], [stderr]) AT_CHECK([../../molecuilder -i test.conf -e ${abs_top_srcdir}/src/ -T -u], 134, [ignore], [stderr]) AT_CHECK([../../molecuilder -i test.conf -e ${abs_top_srcdir}/src/ -u], 134, [ignore], [stderr]) AT_CLEANUP # 8. Removing _shape_ of atoms AT_SETUP([Simple configuration - Removing sphere of atoms]) AT_KEYWORDS([configuration]) AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/8/pre/test.xyz test-withoutsphere.xyz], 0) AT_CHECK([../../molecuilder -i test-withoutsphere.xyz --select-atoms-inside-sphere 7. --position "7.283585982, 3.275186040, 3.535886037" --angle-x 0. --angle-y 0. --angle-z 0. -r], 0, [stdout], [stderr]) AT_CHECK([sort -n test-withoutsphere.xyz | grep -v -E "^[[[:digit:]]]+" | grep -v "Created by" >test-withoutsphere.xyz-sorted], 0, [ignore], [ignore]) AT_CHECK([file=test-withoutsphere.xyz-sorted; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/8/post/$file], 0, [ignore], [ignore]) AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/8/pre/test.xyz test-sphere.xyz], 0) AT_CHECK([../../molecuilder -i test-sphere.xyz --select-all-atoms --unselect-atoms-inside-sphere 7. --position "7.283585982, 3.275186040, 3.535886037" --angle-x 0. --angle-y 0. --angle-z 0. -r], 0, [stdout], [stderr]) AT_CHECK([sort -n test-sphere.xyz | grep -v -E "^[[[:digit:]]]+" | grep -v "Created by" >test-sphere.xyz-sorted], 0, [ignore], [ignore]) AT_CHECK([file=test-sphere.xyz-sorted; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/8/post/$file], 0, [ignore], [ignore]) AT_CHECK([cat test-sphere.xyz-sorted test-withoutsphere.xyz-sorted | sort -n >test.xyz-sorted], 0, [ignore], [ignore]) AT_CHECK([file=test.xyz-sorted; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/8/post/$file], 0, [ignore], [ignore]) AT_CLEANUP AT_SETUP([Simple configuration - Removing sphere of atoms with Undo/Redo]) AT_KEYWORDS([configuration]) AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/8/pre/test.xyz .], 0) AT_CHECK([../../molecuilder -i test.xyz --select-atoms-inside-sphere 7. --position "7.283585982, 3.275186040, 3.535886037" --angle-x 0. --angle-y 0. --angle-z 0. -r --undo], 0, [stdout], [stderr]) AT_CHECK([file=test.xyz; diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/8/pre/$file], 0, [ignore], [ignore]) AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/8/pre/test.xyz test-withoutsphere.xyz], 0) AT_CHECK([../../molecuilder -i test-withoutsphere.xyz --select-atoms-inside-sphere 7. --position "7.283585982, 3.275186040, 3.535886037" --angle-x 0. --angle-y 0. --angle-z 0. -r --undo --redo], 0, [stdout], [stderr]) AT_CHECK([sort -n test-withoutsphere.xyz | grep -v -E "^[[[:digit:]]]+" | grep -v "Created by" >test-withoutsphere.xyz-sorted], 0, [ignore], [ignore]) AT_CHECK([file=test-withoutsphere.xyz-sorted; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/8/post/$file], 0, [ignore], [ignore]) AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/8/pre/test.xyz .], 0) AT_CHECK([../../molecuilder -i test.xyz --select-all-atoms --unselect-atoms-inside-sphere 7. --position "7.283585982, 3.275186040, 3.535886037" --angle-x 0. --angle-y 0. --angle-z 0. -r --undo], 0, [stdout], [stderr]) AT_CHECK([file=test.xyz; diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/8/pre/$file], 0, [ignore], [ignore]) AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/8/pre/test.xyz test-sphere.xyz], 0) AT_CHECK([../../molecuilder -i test-sphere.xyz --select-all-atoms --unselect-atoms-inside-sphere 7. --position "7.283585982, 3.275186040, 3.535886037" --angle-x 0. --angle-y 0. --angle-z 0. -r --undo --redo], 0, [stdout], [stderr]) AT_CHECK([sort -n test-sphere.xyz | grep -v -E "^[[[:digit:]]]+" | grep -v "Created by" >test-sphere.xyz-sorted], 0, [ignore], [ignore]) AT_CHECK([file=test-sphere.xyz-sorted; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/8/post/$file], 0, [ignore], [ignore]) AT_CHECK([cat test-sphere.xyz-sorted test-withoutsphere.xyz-sorted | sort -n >test.xyz-sorted], 0, [ignore], [ignore]) AT_CHECK([file=test.xyz-sorted; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/8/post/$file], 0, [ignore], [ignore]) AT_CLEANUP AT_SETUP([Simple configuration - Removing cuboid of atoms]) AT_KEYWORDS([configuration]) AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/8/pre/test.xyz test-withoutcuboid.xyz], 0) AT_CHECK([../../molecuilder -i test-withoutcuboid.xyz --select-atoms-inside-cuboid "2,2,2" --position "9.78,2.64,2.64" --angle-x 0. --angle-y 0. --angle-z 0. -r], 0, [stdout], [stderr]) AT_CHECK([sort -n test-withoutcuboid.xyz | grep -v -E "^[[[:digit:]]]+" | grep -v "Created by" >test-withoutcuboid.xyz-sorted], 0, [ignore], [ignore]) AT_CHECK([file=test-withoutcuboid.xyz-sorted; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/8/post/$file], 0, [ignore], [ignore]) AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/8/pre/test.xyz test-cuboid.xyz], 0) AT_CHECK([../../molecuilder -i test-cuboid.xyz --select-all-atoms --unselect-atoms-inside-cuboid "2,2,2" --position "9.78,2.64,2.64" --angle-x 0. --angle-y 0. --angle-z 0. -r], 0, [stdout], [stderr]) AT_CHECK([sort -n test-cuboid.xyz | grep -v -E "^[[[:digit:]]]+" | grep -v "Created by" >test-cuboid.xyz-sorted], 0, [ignore], [ignore]) AT_CHECK([file=test-cuboid.xyz-sorted; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/8/post/$file], 0, [ignore], [ignore]) AT_CHECK([cat test-cuboid.xyz-sorted test-withoutcuboid.xyz-sorted | sort -n >test.xyz-sorted], 0, [ignore], [ignore]) AT_CHECK([file=test.xyz-sorted; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/8/post/$file], 0, [ignore], [ignore]) AT_CLEANUP AT_SETUP([Simple configuration - Removing cuboid of atoms with Undo/Redo]) AT_KEYWORDS([configuration]) AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/8/pre/test.xyz .], 0) AT_CHECK([../../molecuilder -i test.xyz --select-atoms-inside-cuboid "2,2,2" --position "9.78,2.64,2.64" --angle-x 0. --angle-y 0. --angle-z 0. -r --undo], 0, [stdout], [stderr]) AT_CHECK([file=test.xyz; diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/8/pre/$file], 0, [ignore], [ignore]) AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/8/pre/test.xyz test-withoutcuboid.xyz], 0) AT_CHECK([../../molecuilder -i test-withoutcuboid.xyz --select-atoms-inside-cuboid "2,2,2" --position "9.78,2.64,2.64" --angle-x 0. --angle-y 0. --angle-z 0. -r --undo --redo], 0, [stdout], [stderr]) AT_CHECK([sort -n test-withoutcuboid.xyz | grep -v -E "^[[[:digit:]]]+" | grep -v "Created by" >test-withoutcuboid.xyz-sorted], 0, [ignore], [ignore]) AT_CHECK([file=test-withoutcuboid.xyz-sorted; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/8/post/$file], 0, [ignore], [ignore]) AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/8/pre/test.xyz .], 0) AT_CHECK([../../molecuilder -i test.xyz --select-all-atoms --unselect-atoms-inside-cuboid "2,2,2" --position "9.78,2.64,2.64" --angle-x 0. --angle-y 0. --angle-z 0. -r --undo], 0, [stdout], [stderr]) AT_CHECK([file=test.xyz; diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/8/pre/$file], 0, [ignore], [ignore]) AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/8/pre/test.xyz test-cuboid.xyz], 0) AT_CHECK([../../molecuilder -i test-cuboid.xyz --select-all-atoms --unselect-atoms-inside-cuboid "2,2,2" --position "9.78,2.64,2.64" --angle-x 0. --angle-y 0. --angle-z 0. -r --undo --redo], 0, [stdout], [stderr]) AT_CHECK([sort -n test-cuboid.xyz | grep -v -E "^[[[:digit:]]]+" | grep -v "Created by" >test-cuboid.xyz-sorted], 0, [ignore], [ignore]) AT_CHECK([file=test-cuboid.xyz-sorted; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/8/post/$file], 0, [ignore], [ignore]) AT_CHECK([cat test-cuboid.xyz-sorted test-withoutcuboid.xyz-sorted | sort -n >test.xyz-sorted], 0, [ignore], [ignore]) AT_CHECK([file=test.xyz-sorted; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/8/post/$file], 0, [ignore], [ignore]) AT_CLEANUP # 9. Undo and redo a translation AT_SETUP([Simple configuration - Translation]) AT_KEYWORDS([configuration]) AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/9/pre/test.xyz .], 0) AT_CHECK([../../molecuilder -i test.xyz --select-all-atoms -t "1,0,0"], 0, [stdout], [stderr]) AT_CHECK([diff -I '.*Created by molecuilder.*' test.xyz ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/9/post/test-shifted.xyz], 0, [ignore], [ignore]) AT_CLEANUP AT_SETUP([Simple configuration - Translation with Undo/Redo]) AT_KEYWORDS([configuration]) AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/9/pre/test.xyz .], 0) AT_CHECK([../../molecuilder -i test.xyz --select-all-atoms -t "1,0,0" --undo], 0, [stdout], [stderr]) AT_CHECK([diff -I '.*Created by molecuilder.*' test.xyz ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/9/pre/test.xyz], 0, [ignore], [ignore]) AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/9/pre/test.xyz .], 0) AT_CHECK([../../molecuilder -i test.xyz --select-all-atoms -t "1,0,0" --undo --redo], 0, [stdout], [stderr]) AT_CHECK([diff -I '.*Created by molecuilder.*' test.xyz ${abs_top_srcdir}/${AUTOTEST_PATH}/Simple_configuration/9/post/test-shifted.xyz], 0, [ignore], [ignore]) AT_CLEANUP