AT_BANNER([MoleCuilder - Molecules]) # 1. Bonds from file AT_SETUP([Molecules - Bonds from file]) AT_KEYWORDS([Molecules]) AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/1/pre/test.* .], 0) AT_CHECK([../../molecuilder -i test.conf -v 4 --select-molecule-by-id 0 -A test.dbond], 0, [stdout], [stderr]) AT_CHECK([fgrep "Looking for atoms 2 and 9." stdout], 0, [ignore], [ignore]) AT_CLEANUP # 2. Storing adjacency info AT_SETUP([Molecules - Storing bond info]) AT_KEYWORDS([Molecules]) AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/2/pre/test.conf .], 0) AT_CHECK([../../molecuilder -i test.conf -v 1 --select-molecule-by-id 0 -j test.dbond], 0, [stdout], [stderr]) AT_CHECK([file=test.dbond; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/2/post/$file], 0, [ignore], [ignore]) AT_CHECK([../../molecuilder -i test.conf -v 1 --select-molecule-by-id 0 -J test.adj], 0, [stdout], [stderr]) AT_CHECK([file=test.adj; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/2/post/$file], 0, [ignore], [ignore]) AT_CLEANUP # 3. Storing temperature AT_SETUP([Molecules - Storing temperature]) AT_KEYWORDS([Molecules]) AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/3/pre/test.conf .], 0) AT_CHECK([../../molecuilder -i test.conf --select-molecule-by-id 0 -S test.ekin], 0, [stdout], [stderr]) AT_CHECK([file=test.ekin; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/3/post/$file], 0, [ignore], [ignore]) AT_CLEANUP # 4. linear interpolation AT_SETUP([Molecules - BROKEN: Linear interpolation]) AT_KEYWORDS([Molecules]) AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/4/pre/test.conf .], 0) AT_CHECK([../../molecuilder -i test.conf --select-molecule-by-id 0 -L teststep --start-step 0 --end-step 1 --id-mapping 1], 0, [stdout], [stderr]) AT_CLEANUP # 5. Verlet force integration AT_SETUP([Molecules - BROKEN: Verlet force integration]) AT_KEYWORDS([Molecules]) AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/5/pre/test.* .], 0) AT_CHECK([../../molecuilder -i test.conf --select-molecule-by-id 0 -P test.forces], 0, [stdout], [stderr]) #AT_CHECK([file=test.conf; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/5/post/$file], 0, [ignore], [ignore]) AT_CLEANUP # 6. Translation AT_SETUP([Molecules - Translation]) AT_KEYWORDS([Molecules]) AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/6/pre/test.* .], 0) AT_CHECK([../../molecuilder -i test.conf --select-molecule-by-id 0 --select-molecules-atoms -t "1., 1., 1." --periodic 0], 0, [stdout], [stderr]) AT_CHECK([file=test.conf; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/6/post/$file], 0, [ignore], [ignore]) AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/6/pre/test2.* .], 0) AT_CHECK([../../molecuilder -i test2.conf --select-molecule-by-id 0 --select-molecules-atoms -t "-1., -1., -1." --periodic 0], 0, [stdout], [stderr]) AT_CHECK([file=test2.conf; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/6/post/$file], 0, [ignore], [ignore]) AT_CLEANUP # 8. Rotate to PAS AT_SETUP([Molecules - Rotate to PAS]) AT_KEYWORDS([Molecules]) AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/8/pre/test-*.xyz .], 0) AT_CHECK([../../molecuilder -i test-rotated-z90.xyz --select-molecule-by-id 0 -m "0,0,1"], 0, [stdout], [stderr]) AT_CHECK([file="test-rotated-z90.xyz"; diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/8/post/$file], 0, [ignore], [ignore]) AT_CHECK([../../molecuilder -i test-rotated-z180.xyz --select-molecule-by-id 0 -m "0,0,1"], 0, [stdout], [stderr]) AT_CHECK([file="test-rotated-z180.xyz"; diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/8/post/$file], 0, [ignore], [ignore]) AT_CHECK([../../molecuilder -i test-rotated-z360.xyz --select-molecule-by-id 0 -m "0,0,1"], 0, [stdout], [stderr]) AT_CHECK([file="test-rotated-z360.xyz"; diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/8/post/$file], 0, [ignore], [ignore]) AT_CHECK([../../molecuilder -i test-rotated-xYz20.xyz --select-molecule-by-id 0 -m "0,0,1"], 0, [stdout], [stderr]) AT_CHECK([file="test-rotated-xYz20.xyz"; diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/8/post/$file], 0, [ignore], [ignore]) AT_CLEANUP # 9. Rotate around origin AT_SETUP([Molecules - Rotate around origin]) AT_KEYWORDS([Molecules]) AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/9/pre/test.xyz .], 0) AT_CHECK([../../molecuilder -i test.xyz --select-all-atoms --rotate-origin 90. --position "0,0,1"], 0, [stdout], [stderr]) AT_CHECK([diff -I '.*Created by molecuilder.*' test.xyz ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/9/post/test-rotated-z90.xyz], 0, [ignore], [ignore]) AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/9/pre/test.xyz .], 0) AT_CHECK([../../molecuilder -i test.xyz --select-all-atoms --rotate-origin 180. --position "0,0,1"], 0, [stdout], [stderr]) AT_CHECK([diff -I '.*Created by molecuilder.*' test.xyz ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/9/post/test-rotated-z180.xyz], 0, [ignore], [ignore]) AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/9/pre/test.xyz .], 0) AT_CHECK([../../molecuilder -i test.xyz --select-all-atoms --rotate-origin 360. --position "0,0,1"], 0, [stdout], [stderr]) AT_CHECK([diff -I '.*Created by molecuilder.*' test.xyz ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/9/post/test-rotated-z360.xyz], 0, [ignore], [ignore]) AT_CHECK([diff -I '.*Created by molecuilder.*' test.xyz ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/9/pre/test.xyz], 0, [ignore], [ignore]) AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/9/pre/test.xyz .], 0) AT_CHECK([../../molecuilder -i test.xyz --select-all-atoms --rotate-origin 20. --position "1,2,1"], 0, [stdout], [stderr]) AT_CHECK([diff -I '.*Created by molecuilder.*' test.xyz ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/9/post/test-rotated-xYz20.xyz], 0, [ignore], [ignore]) AT_CLEANUP # 10. Rotate around self AT_SETUP([Molecules - Rotate around self]) AT_KEYWORDS([Molecules]) AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/10/pre/test.xyz .], 0) AT_CHECK([../../molecuilder -i test.xyz --select-all-molecules --rotate-self 90. --axis "0,0,1"], 0, [stdout], [stderr]) AT_CHECK([diff -I '.*Created by molecuilder.*' test.xyz ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/10/post/test-rotated-z90.xyz], 0, [ignore], [ignore]) AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/10/pre/test.xyz .], 0) AT_CHECK([../../molecuilder -i test.xyz --select-all-molecules --rotate-self 180. --axis "0,0,1"], 0, [stdout], [stderr]) AT_CHECK([diff -I '.*Created by molecuilder.*' test.xyz ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/10/post/test-rotated-z180.xyz], 0, [ignore], [ignore]) AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/10/pre/test.xyz .], 0) AT_CHECK([../../molecuilder -i test.xyz --select-all-molecules --rotate-self 360. --axis "0,0,1"], 0, [stdout], [stderr]) AT_CHECK([diff -I '.*Created by molecuilder.*' test.xyz ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/10/post/test-rotated-z360.xyz], 0, [ignore], [ignore]) AT_CHECK([diff -I '.*Created by molecuilder.*' test.xyz ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/10/pre/test.xyz], 0, [ignore], [ignore]) AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/10/pre/test.xyz .], 0) AT_CHECK([../../molecuilder -i test.xyz --select-all-molecules --rotate-self 20. --axis "1,2,1"], 0, [stdout], [stderr]) AT_CHECK([diff -I '.*Created by molecuilder.*' test.xyz ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/10/post/test-rotated-xYz20.xyz], 0, [ignore], [ignore]) AT_CLEANUP # 11. copy molecule AT_SETUP([Molecules - Copy molecule]) AT_KEYWORDS([Molecules]) AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/11/pre/test.xyz test-copy.xyz], 0) AT_CHECK([../../molecuilder -i test-copy.xyz --copy-molecule 0 --position "0,0,10"], 0, [stdout], [stderr]) AT_CHECK([diff -I '.*Created by molecuilder.*' test-copy.xyz ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/11/post/test-copy.xyz], 0, [ignore], [ignore]) AT_CLEANUP AT_SETUP([Molecules - Copy molecule with Undo/Redo]) AT_KEYWORDS([Molecules]) AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/11/pre/test.xyz test-copy.xyz], 0) AT_CHECK([../../molecuilder -i test-copy.xyz --copy-molecule 0 --position "0,0,10" --undo], 0, [stdout], [stderr]) AT_CHECK([diff -I '.*Created by molecuilder.*' test-copy.xyz ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/11/pre/test.xyz], 0, [ignore], [ignore]) AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/11/pre/test.xyz test-copy.xyz], 0) AT_CHECK([../../molecuilder -i test-copy.xyz --copy-molecule 0 --position "0,0,10" --undo --redo], 0, [stdout], [stderr]) AT_CHECK([diff -I '.*Created by molecuilder.*' test-copy.xyz ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/11/post/test-copy.xyz], 0, [ignore], [ignore]) AT_CLEANUP