### (un)select molecules by order AT_SETUP([Selection - Molecule by order, forward]) AT_KEYWORDS([selection,molecule]) # some variables before srcpath="Selection/Molecules/MoleculeByOrder" srcfile=twowater.xyz m4_include(CheckCommand.sh) # the tests check_command_output $srcpath $srcfile "water_id0.xyz" "-I --select-molecule-by-order 1 -s water_id0.xyz" check_command_output $srcpath $srcfile "water_id1.xyz" "-I --select-molecule-by-order 2 -s water_id1.xyz" mv water_id0.xyz water_id0_a.xyz mv water_id1.xyz water_id1_a.xyz check_command_output $srcpath $srcfile "empty.xyz" "-I --select-molecule-by-order 1 --undo -s empty.xyz" check_command_output $srcpath $srcfile "empty.xyz" "-I --select-molecule-by-order 2 --undo -s empty.xyz" check_command_output $srcpath $srcfile "water_id0.xyz" "-I --select-molecule-by-order 1 --undo --redo -s water_id0.xyz" check_command_output $srcpath $srcfile "water_id1.xyz" "-I --select-molecule-by-order 2 --undo --redo -s water_id1.xyz" mv water_id0.xyz water_id0_b.xyz mv water_id1.xyz water_id1_b.xyz AT_CHECK([diff -I '.*Created by molecuilder.*' water_id0_a.xyz water_id0_b.xyz], 0, [ignore], [ignore]) AT_CHECK([diff -I '.*Created by molecuilder.*' water_id1_a.xyz water_id1_b.xyz], 0, [ignore], [ignore]) AT_CLEANUP AT_SETUP([Selection - Molecule by order, backward]) AT_KEYWORDS([selection,molecule]) # some variables before srcpath="Selection/Molecules/MoleculeByOrder" srcfile=twowater.xyz m4_include(CheckCommand.sh) # the tests check_command_output $srcpath $srcfile "water_id0.xyz" "-I --select-molecule-by-order -2 -s water_id0.xyz" check_command_output $srcpath $srcfile "water_id1.xyz" "-I --select-molecule-by-order -1 -s water_id1.xyz" mv water_id0.xyz water_id0_a.xyz mv water_id1.xyz water_id1_a.xyz check_command_output $srcpath $srcfile "empty.xyz" "-I --select-molecule-by-order -2 --undo -s empty.xyz" check_command_output $srcpath $srcfile "empty.xyz" "-I --select-molecule-by-order -1 --undo -s empty.xyz" check_command_output $srcpath $srcfile "water_id0.xyz" "-I --select-molecule-by-order -2 --undo --redo -s water_id0.xyz" check_command_output $srcpath $srcfile "water_id1.xyz" "-I --select-molecule-by-order -1 --undo --redo -s water_id1.xyz" mv water_id0.xyz water_id0_b.xyz mv water_id1.xyz water_id1_b.xyz AT_CHECK([diff -I '.*Created by molecuilder.*' water_id0_a.xyz water_id0_b.xyz], 0, [ignore], [ignore]) AT_CHECK([diff -I '.*Created by molecuilder.*' water_id1_a.xyz water_id1_b.xyz], 0, [ignore], [ignore]) AT_CLEANUP AT_SETUP([Unselection - Molecule by order, forward]) AT_KEYWORDS([selection,molecule]) # some variables before srcpath="Selection/Molecules/MoleculeByOrder" srcfile=twowater.xyz m4_include(CheckCommand.sh) # the tests check_command_output $srcpath $srcfile "water_id1.xyz" "-I --select-all-molecules --unselect-molecule-by-order 1 -s water_id1.xyz" check_command_output $srcpath $srcfile "water_id0.xyz" "-I --select-all-molecules --unselect-molecule-by-order 2 -s water_id0.xyz" mv water_id1.xyz water_id1_a.xyz mv water_id0.xyz water_id0_a.xyz check_command_output $srcpath $srcfile "twowater.xyz" "-I --select-all-molecules --unselect-molecule-by-order 1 --undo -s twowater.xyz" check_command_output $srcpath $srcfile "twowater.xyz" "-I --select-all-molecules --unselect-molecule-by-order 2 --undo -s twowater.xyz" check_command_output $srcpath $srcfile "water_id1.xyz" "-I --select-all-molecules --unselect-molecule-by-order 1 --undo --redo -s water_id1.xyz" check_command_output $srcpath $srcfile "water_id0.xyz" "-I --select-all-molecules --unselect-molecule-by-order 2 --undo --redo -s water_id0.xyz" mv water_id0.xyz water_id0_b.xyz mv water_id1.xyz water_id1_b.xyz AT_CHECK([diff -I '.*Created by molecuilder.*' water_id0_a.xyz water_id0_b.xyz], 0, [ignore], [ignore]) AT_CHECK([diff -I '.*Created by molecuilder.*' water_id1_a.xyz water_id1_b.xyz], 0, [ignore], [ignore]) AT_CLEANUP AT_SETUP([Unselection - Molecule by order, backward]) AT_KEYWORDS([selection,molecule]) # some variables before srcpath="Selection/Molecules/MoleculeByOrder" srcfile=twowater.xyz m4_include(CheckCommand.sh) # the tests check_command_output $srcpath $srcfile "water_id1.xyz" "-I --select-all-molecules --unselect-molecule-by-order -2 -s water_id1.xyz" check_command_output $srcpath $srcfile "water_id0.xyz" "-I --select-all-molecules --unselect-molecule-by-order -1 -s water_id0.xyz" mv water_id1.xyz water_id1_a.xyz mv water_id0.xyz water_id0_a.xyz check_command_output $srcpath $srcfile "twowater.xyz" "-I --select-all-molecules --unselect-molecule-by-order -2 --undo -s twowater.xyz" check_command_output $srcpath $srcfile "twowater.xyz" "-I --select-all-molecules --unselect-molecule-by-order -1 --undo -s twowater.xyz" check_command_output $srcpath $srcfile "water_id1.xyz" "-I --select-all-molecules --unselect-molecule-by-order -2 --undo --redo -s water_id1.xyz" check_command_output $srcpath $srcfile "water_id0.xyz" "-I --select-all-molecules --unselect-molecule-by-order -1 --undo --redo -s water_id0.xyz" mv water_id0.xyz water_id0_b.xyz mv water_id1.xyz water_id1_b.xyz AT_CHECK([diff -I '.*Created by molecuilder.*' water_id0_a.xyz water_id0_b.xyz], 0, [ignore], [ignore]) AT_CHECK([diff -I '.*Created by molecuilder.*' water_id1_a.xyz water_id1_b.xyz], 0, [ignore], [ignore]) AT_CLEANUP