### 4. (un)select molecules by id AT_SETUP([Selection - Molecule by id]) AT_KEYWORDS([selection,molecule]) # some variables before srcpath="Selection/Molecules/MoleculeById" srcfile=box.xyz m4_include(CheckCommand.sh) # the tests check_command_output $srcpath $srcfile "water_id4.xyz" "-I --select-molecule-by-id 4 -s water_id4.xyz" mv water_id4.xyz water_id4_a.xyz check_command_output $srcpath $srcfile "empty.xyz" "-I --select-molecule-by-id 4 --undo -s empty.xyz" check_command_output $srcpath $srcfile "water_id4.xyz" "-I --select-molecule-by-id 4 --undo --redo -s water_id4.xyz" mv water_id4.xyz water_id4_b.xyz AT_CHECK([diff -I '.*Created by molecuilder.*' water_id4_a.xyz water_id4_b.xyz], 0, [ignore], [ignore]) AT_CLEANUP AT_SETUP([Unselection - Molecule by id]) AT_KEYWORDS([selection,molecule]) # some variables before srcpath="Selection/Molecules/MoleculeById" srcfile=box.xyz m4_include(CheckCommand.sh) # the tests check_command_output $srcpath $srcfile "id4_missing.xyz" "-I --select-all-molecules --unselect-molecule-by-id 4 -s id4_missing.xyz" mv id4_missing.xyz id4_missing_a.xyz check_command_output $srcpath $srcfile "box.xyz" "-I --select-all-molecules --unselect-molecule-by-id 4 --undo -s box.xyz" check_command_output $srcpath $srcfile "id4_missing.xyz" "-I --select-all-molecules --unselect-molecule-by-id 4 --undo --redo -s id4_missing.xyz" mv id4_missing.xyz id4_missing_b.xyz AT_CHECK([diff -I '.*Created by molecuilder.*' id4_missing_a.xyz id4_missing_b.xyz], 0, [ignore], [ignore]) AT_CLEANUP