AT_BANNER([MoleCuilder - Fragmentation and Re-fragmentation test]) # 1. check config AT_SETUP([Fragmentation - Checking present config]) AT_KEYWORDS([fragmentation]) AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Fragmentation/1/pre/test.conf .], 0) AT_CHECK([fgrep "Ion_Type1_4" test.conf], 0, [Ion_Type1_4 8.532785963 4.787886018 2.645886050 0 # molecule nr 6 ], [ignore]) AT_CHECK([fgrep "Ion_Type2_4" test.conf], 1, [ignore], [ignore]) AT_CLEANUP # 2. fragment the molecule and check the number of configs AT_SETUP([Fragmentation - Fragmentation]) AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Fragmentation/2/pre/test.conf .], 0) AT_CHECK([../../molecuilder -i test.conf -e ${abs_top_srcdir}/src/ -v 1 --select-molecule-by-id 0 -f ./BondFragment --distance 1.55 --order 2], 0, [ignore], [ignore]) AT_CHECK([ls -l BondFragment*.conf | wc -l], 0, [5 ], [ignore]) AT_CLEANUP # 3. check whether parsing of BondFragment files and re-rwriting config files is working (exit code is 2 as we don't need to continue wrt to ...OrderAtSite) # NOTE: Result code of 2 is not returned if "-v 1" is missing, then sequence of atoms is changed all the time and Adjacency files never match. AT_SETUP([Fragmentation - BROKEN: Fragmentation is at MaxOrder]) AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Fragmentation/3/pre/test.conf .], 0) AT_CHECK([../../molecuilder -i test.conf -e ${abs_top_srcdir}/src/ -v 1 --select-molecule-by-id 0 -f ./BondFragment --distance 1.55 --order 2], 0, [ignore], [ignore]) AT_CHECK([../../molecuilder -i test.conf -e ${abs_top_srcdir}/src/ -v 1 --select-molecule-by-id 0 -f ./BondFragment --distance 1.55 --order 2], [ignore], [ignore], [ignore]) AT_CLEANUP