### 3. (un)select molecules by formula AT_SETUP([Unselection - Molecule by formula]) AT_KEYWORDS([unselection molecule unselect-molecules-by-formula]) regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByFormula" srcfile=mix.xyz testfile=test.xyz targetfile=water_missing.xyz AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --unselect-molecules-by-formula H2O -s $targetfile], 0, [stdout], [stderr]) AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByFormula" srcfile=mix.xyz testfile=test.xyz targetfile=ethanol_missing.xyz AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --unselect-molecules-by-formula "C2H5(OH)" -s $targetfile], 0, [stdout], [stderr]) AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByFormula" srcfile=mix.xyz testfile=test.xyz targetfile=benzene_missing.xyz AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --unselect-molecules-by-formula C6H6 -s $targetfile], 0, [stdout], [stderr]) AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) AT_CLEANUP AT_SETUP([Unselection - Molecule by formula with Undo]) AT_KEYWORDS([unselection molecule unselect-molecules-by-formula undo]) comparisonfile=mix.xyz regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByFormula" srcfile=mix.xyz testfile=test.xyz targetfile=mix1.xyz AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --unselect-molecules-by-formula H2O --undo -s $targetfile], 0, [stdout], [stderr]) AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$comparisonfile], 0, [ignore], [ignore]) regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByFormula" srcfile=mix.xyz testfile=test.xyz targetfile=mix2.xyz AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --unselect-molecules-by-formula "C2H5(OH)" --undo -s $targetfile], 0, [stdout], [stderr]) AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$comparisonfile], 0, [ignore], [ignore]) regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByFormula" srcfile=mix.xyz testfile=test.xyz targetfile=mix3.xyz AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --unselect-molecules-by-formula C6H6 --undo -s $targetfile], 0, [stdout], [stderr]) AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$comparisonfile], 0, [ignore], [ignore]) AT_CLEANUP AT_SETUP([Unselection - Molecule by formula with Redo]) AT_KEYWORDS([unselection molecule unselect-molecules-by-formula redo]) regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByFormula" srcfile=mix.xyz testfile=test.xyz targetfile=water_missing.xyz AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --unselect-molecules-by-formula H2O --undo --redo -s $targetfile], 0, [stdout], [stderr]) AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByFormula" srcfile=mix.xyz testfile=test.xyz targetfile=ethanol_missing.xyz AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --unselect-molecules-by-formula "C2H5(OH)" --undo --redo -s $targetfile], 0, [stdout], [stderr]) AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) regressionpath="${abs_top_srcdir}/tests/regression/Selection/Molecules/MoleculeByFormula" srcfile=mix.xyz testfile=test.xyz targetfile=benzene_missing.xyz AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --unselect-molecules-by-formula C6H6 --undo --redo -s $targetfile], 0, [stdout], [stderr]) AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) AT_CLEANUP