Changeset 7c958e for tests/regression/Selection/Molecules/MoleculeByFormula
- Timestamp:
- Sep 21, 2011, 8:40:59 PM (13 years ago)
- Branches:
- Action_Thermostats, Add_AtomRandomPerturbation, Add_FitFragmentPartialChargesAction, Add_RotateAroundBondAction, Add_SelectAtomByNameAction, Added_ParseSaveFragmentResults, AddingActions_SaveParseParticleParameters, Adding_Graph_to_ChangeBondActions, Adding_MD_integration_tests, Adding_ParticleName_to_Atom, Adding_StructOpt_integration_tests, AtomFragments, Automaking_mpqc_open, AutomationFragmentation_failures, Candidate_v1.5.4, Candidate_v1.6.0, Candidate_v1.6.1, ChangeBugEmailaddress, ChangingTestPorts, ChemicalSpaceEvaluator, CombiningParticlePotentialParsing, Combining_Subpackages, Debian_Package_split, Debian_package_split_molecuildergui_only, Disabling_MemDebug, Docu_Python_wait, EmpiricalPotential_contain_HomologyGraph, EmpiricalPotential_contain_HomologyGraph_documentation, Enable_parallel_make_install, Enhance_userguide, Enhanced_StructuralOptimization, Enhanced_StructuralOptimization_continued, Example_ManyWaysToTranslateAtom, Exclude_Hydrogens_annealWithBondGraph, FitPartialCharges_GlobalError, Fix_BoundInBox_CenterInBox_MoleculeActions, Fix_ChargeSampling_PBC, Fix_ChronosMutex, Fix_FitPartialCharges, Fix_FitPotential_needs_atomicnumbers, Fix_ForceAnnealing, Fix_IndependentFragmentGrids, Fix_ParseParticles, Fix_ParseParticles_split_forward_backward_Actions, Fix_PopActions, Fix_QtFragmentList_sorted_selection, Fix_Restrictedkeyset_FragmentMolecule, Fix_StatusMsg, Fix_StepWorldTime_single_argument, Fix_Verbose_Codepatterns, Fix_fitting_potentials, Fixes, ForceAnnealing_goodresults, ForceAnnealing_oldresults, ForceAnnealing_tocheck, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_continued, ForceAnnealing_with_BondGraph_continued_betteresults, ForceAnnealing_with_BondGraph_contraction-expansion, FragmentAction_writes_AtomFragments, FragmentMolecule_checks_bonddegrees, GeometryObjects, Gui_Fixes, Gui_displays_atomic_force_velocity, ImplicitCharges, IndependentFragmentGrids, IndependentFragmentGrids_IndividualZeroInstances, IndependentFragmentGrids_IntegrationTest, IndependentFragmentGrids_Sole_NN_Calculation, JobMarket_RobustOnKillsSegFaults, JobMarket_StableWorkerPool, JobMarket_unresolvable_hostname_fix, MoreRobust_FragmentAutomation, ODR_violation_mpqc_open, PartialCharges_OrthogonalSummation, PdbParser_setsAtomName, PythonUI_with_named_parameters, QtGui_reactivate_TimeChanged_changes, Recreated_GuiChecks, Rewrite_FitPartialCharges, RotateToPrincipalAxisSystem_UndoRedo, SaturateAtoms_findBestMatching, SaturateAtoms_singleDegree, StoppableMakroAction, Subpackage_CodePatterns, Subpackage_JobMarket, Subpackage_LinearAlgebra, Subpackage_levmar, Subpackage_mpqc_open, Subpackage_vmg, Switchable_LogView, ThirdParty_MPQC_rebuilt_buildsystem, TrajectoryDependenant_MaxOrder, TremoloParser_IncreasedPrecision, TremoloParser_MultipleTimesteps, TremoloParser_setsAtomName, Ubuntu_1604_changes, stable
- Children:
- d70fff
- Parents:
- 93eb00
- git-author:
- Frederik Heber <heber@…> (04/27/11 17:02:43)
- git-committer:
- Frederik Heber <heber@…> (09/21/11 20:40:59)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tests/regression/Selection/Molecules/MoleculeByFormula/testsuite-selection-molecules-by-formula.at
r93eb00 r7c958e 2 2 3 3 4 AT_SETUP([Selection - Molecule sby formula])4 AT_SETUP([Selection - Molecule by formula]) 5 5 AT_KEYWORDS([selection,molecule]) 6 # some variables before 7 srcpath="Selection/Molecules/MoleculeByFormula"6 7 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeByFormula" 8 8 srcfile=mix.xyz 9 m4_include(CheckCommand.sh) 10 # the tests 11 check_command_output $srcpath $srcfile "water.xyz" "-I --select-molecules-by-formula H2O -s water.xyz" 12 mv water.xyz water_a.xyz 13 check_command_output $srcpath $srcfile "empty.xyz" "-I --select-molecules-by-formula H2O --undo -s empty.xyz" 14 check_command_output $srcpath $srcfile "water.xyz" "-I --select-molecules-by-formula H2O --undo --redo -s water.xyz" 15 mv water.xyz water_b.xyz 16 AT_CHECK([diff -I '.*Created by molecuilder.*' water_a.xyz water_b.xyz], 0, [ignore], [ignore]) 9 testfile=test.xyz 10 targetfile=water.xyz 11 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 12 AT_CHECK([../../molecuilder -i $testfile -I --select-molecules-by-formula H2O -s $targetfile], 0, [stdout], [stderr]) 13 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 17 14 18 check_command_output $srcpath $srcfile "ethanol.xyz" "-I --select-molecules-by-formula C2H5(OH) -s ethanol.xyz" 19 mv ethanol.xyz ethanol_a.xyz 20 check_command_output $srcpath $srcfile "empty.xyz" "-I --select-molecules-by-formula C2H5(OH) --undo -s empty.xyz" 21 check_command_output $srcpath $srcfile "ethanol.xyz" "-I --select-molecules-by-formula C2H5(OH) --undo --redo -s ethanol.xyz" 22 mv ethanol.xyz ethanol_b.xyz 23 AT_CHECK([diff -I '.*Created by molecuilder.*' ethanol_a.xyz ethanol_b.xyz], 0, [ignore], [ignore]) 15 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeByFormula" 16 srcfile=mix.xyz 17 testfile=test.xyz 18 targetfile=ethanol.xyz 19 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 20 AT_CHECK([../../molecuilder -i $testfile -I --select-molecules-by-formula "C2H5(OH)" -s $targetfile], 0, [stdout], [stderr]) 21 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 24 22 25 check_command_output $srcpath $srcfile "benzene.xyz" "-I --select-molecules-by-formula C6H6 -s benzene.xyz" 26 mv benzene.xyz benzene_a.xyz 27 check_command_output $srcpath $srcfile "empty.xyz" "-I --select-molecules-by-formula C6H6 --undo -s empty.xyz" 28 check_command_output $srcpath $srcfile "benzene.xyz" "-I --select-molecules-by-formula C6H6 --undo --redo -s benzene.xyz" 29 mv benzene.xyz benzene_b.xyz 30 AT_CHECK([diff -I '.*Created by molecuilder.*' benzene_a.xyz benzene_b.xyz], 0, [ignore], [ignore]) 23 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeByFormula" 24 srcfile=mix.xyz 25 testfile=test.xyz 26 targetfile=benzene.xyz 27 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 28 AT_CHECK([../../molecuilder -i $testfile -I --select-molecules-by-formula C6H6 -s $targetfile], 0, [stdout], [stderr]) 29 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 30 31 31 AT_CLEANUP 32 32 33 AT_SETUP([Unselection - Molecules by formula]) 33 34 AT_SETUP([Selection - Molecule by formula with Undo]) 34 35 AT_KEYWORDS([selection,molecule]) 35 # some variables before 36 srcpath="Selection/Molecules/MoleculeByFormula"36 37 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeByFormula" 37 38 srcfile=mix.xyz 38 m4_include(CheckCommand.sh) 39 # the tests 40 check_command_output $srcpath $srcfile "water_missing.xyz" "-I --select-all-molecules --unselect-molecules-by-formula H2O -s water_missing.xyz" 41 mv water_missing.xyz water_missing_a.xyz 42 check_command_output $srcpath $srcfile "mix.xyz" "-I --select-all-molecules --unselect-molecules-by-formula H2O --undo -s mix.xyz" 43 check_command_output $srcpath $srcfile "water_missing.xyz" "-I --select-all-molecules --unselect-molecules-by-formula H2O --undo --redo -s water_missing.xyz" 44 mv water_missing.xyz water_missing_b.xyz 45 AT_CHECK([diff -I '.*Created by molecuilder.*' water_missing_a.xyz water_missing_b.xyz], 0, [ignore], [ignore]) 39 testfile=test.xyz 40 targetfile=empty.xyz 41 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 42 AT_CHECK([../../molecuilder -i $testfile -I --select-molecules-by-formula H2O --undo -s $targetfile], 0, [stdout], [stderr]) 43 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 46 44 47 check_command_output $srcpath $srcfile "ethanol_missing.xyz" "-I --select-all-molecules --unselect-molecules-by-formula C2H5(OH) -s ethanol_missing.xyz" 48 mv ethanol_missing.xyz ethanol_missing_a.xyz 49 check_command_output $srcpath $srcfile "mix.xyz" "-I --select-all-molecules --unselect-molecules-by-formula C2H5(OH) --undo -s mix.xyz" 50 check_command_output $srcpath $srcfile "ethanol_missing.xyz" "-I --select-all-molecules --unselect-molecules-by-formula C2H5(OH) --undo --redo -s ethanol_missing.xyz" 51 mv ethanol_missing.xyz ethanol_missing_b.xyz 52 AT_CHECK([diff -I '.*Created by molecuilder.*' ethanol_missing_a.xyz ethanol_missing_b.xyz], 0, [ignore], [ignore]) 45 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeByFormula" 46 srcfile=mix.xyz 47 testfile=test.xyz 48 targetfile=empty.xyz 49 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 50 AT_CHECK([../../molecuilder -i $testfile -I --select-molecules-by-formula "C2H5(OH)" --undo -s $targetfile], 0, [stdout], [stderr]) 51 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 53 52 54 check_command_output $srcpath $srcfile "benzene_missing.xyz" "-I --select-all-molecules --unselect-molecules-by-formula C6H6 -s benzene_missing.xyz" 55 mv benzene_missing.xyz benzene_missing_a.xyz 56 check_command_output $srcpath $srcfile "mix.xyz" "-I --select-all-molecules --unselect-molecules-by-formula C6H6 --undo -s mix.xyz" 57 check_command_output $srcpath $srcfile "benzene_missing.xyz" "-I --select-all-molecules --unselect-molecules-by-formula C6H6 --undo --redo -s benzene_missing.xyz" 58 mv benzene_missing.xyz benzene_missing_b.xyz 59 AT_CHECK([diff -I '.*Created by molecuilder.*' benzene_missing_a.xyz benzene_missing_b.xyz], 0, [ignore], [ignore]) 53 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeByFormula" 54 srcfile=mix.xyz 55 testfile=test.xyz 56 targetfile=empty.xyz 57 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 58 AT_CHECK([../../molecuilder -i $testfile -I --select-molecules-by-formula C6H6 --undo -s $targetfile], 0, [stdout], [stderr]) 59 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 60 60 61 AT_CLEANUP 62 63 64 AT_SETUP([Selection - Molecule by formula with Redo]) 65 AT_KEYWORDS([selection,molecule]) 66 67 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeByFormula" 68 srcfile=mix.xyz 69 testfile=test.xyz 70 targetfile=water.xyz 71 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 72 AT_CHECK([../../molecuilder -i $testfile -I --select-molecules-by-formula H2O --undo --redo -s $targetfile], 0, [stdout], [stderr]) 73 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 74 75 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeByFormula" 76 srcfile=mix.xyz 77 testfile=test.xyz 78 targetfile=ethanol.xyz 79 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 80 AT_CHECK([../../molecuilder -i $testfile -I --select-molecules-by-formula "C2H5(OH)" --undo --redo -s $targetfile], 0, [stdout], [stderr]) 81 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 82 83 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeByFormula" 84 srcfile=mix.xyz 85 testfile=test.xyz 86 targetfile=benzene.xyz 87 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 88 AT_CHECK([../../molecuilder -i $testfile -I --select-molecules-by-formula C6H6 --undo --redo -s $targetfile], 0, [stdout], [stderr]) 89 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 90 91 AT_CLEANUP 92 93 94 AT_SETUP([Unselection - Molecule by formula]) 95 AT_KEYWORDS([selection,molecule]) 96 97 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeByFormula" 98 srcfile=mix.xyz 99 testfile=test.xyz 100 targetfile=water_missing.xyz 101 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 102 AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --unselect-molecules-by-formula H2O -s $targetfile], 0, [stdout], [stderr]) 103 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 104 105 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeByFormula" 106 srcfile=mix.xyz 107 testfile=test.xyz 108 targetfile=ethanol_missing.xyz 109 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 110 AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --unselect-molecules-by-formula "C2H5(OH)" -s $targetfile], 0, [stdout], [stderr]) 111 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 112 113 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeByFormula" 114 srcfile=mix.xyz 115 testfile=test.xyz 116 targetfile=benzene_missing.xyz 117 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 118 AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --unselect-molecules-by-formula C6H6 -s $targetfile], 0, [stdout], [stderr]) 119 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 120 121 AT_CLEANUP 122 123 124 AT_SETUP([Unselection - Molecule by formula with Undo]) 125 AT_KEYWORDS([selection,molecule]) 126 127 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeByFormula" 128 srcfile=mix.xyz 129 testfile=test.xyz 130 targetfile=mix.xyz 131 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 132 AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --unselect-molecules-by-formula H2O --undo -s $targetfile], 0, [stdout], [stderr]) 133 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 134 135 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeByFormula" 136 srcfile=mix.xyz 137 testfile=test.xyz 138 targetfile=mix.xyz 139 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 140 AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --unselect-molecules-by-formula "C2H5(OH)" --undo -s $targetfile], 0, [stdout], [stderr]) 141 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 142 143 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeByFormula" 144 srcfile=mix.xyz 145 testfile=test.xyz 146 targetfile=mix.xyz 147 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 148 AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --unselect-molecules-by-formula C6H6 --undo -s $targetfile], 0, [stdout], [stderr]) 149 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 150 151 AT_CLEANUP 152 153 154 AT_SETUP([Unselection - Molecule by formula with Redo]) 155 AT_KEYWORDS([selection,molecule]) 156 157 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeByFormula" 158 srcfile=mix.xyz 159 testfile=test.xyz 160 targetfile=water_missing.xyz 161 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 162 AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --unselect-molecules-by-formula H2O --undo --redo -s $targetfile], 0, [stdout], [stderr]) 163 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 164 165 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeByFormula" 166 srcfile=mix.xyz 167 testfile=test.xyz 168 targetfile=ethanol_missing.xyz 169 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 170 AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --unselect-molecules-by-formula "C2H5(OH)" --undo --redo -s $targetfile], 0, [stdout], [stderr]) 171 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 172 173 regressionpath="${abs_top_srcdir}/${AUTOTEST_PATH}/Selection/Molecules/MoleculeByFormula" 174 srcfile=mix.xyz 175 testfile=test.xyz 176 targetfile=benzene_missing.xyz 177 AT_CHECK([cp -n ${regressionpath}/pre/$srcfile $testfile], 0) 178 AT_CHECK([../../molecuilder -i $testfile -I --select-all-molecules --unselect-molecules-by-formula C6H6 --undo --redo -s $targetfile], 0, [stdout], [stderr]) 179 AT_CHECK([diff -I '.*Created by molecuilder.*' $targetfile ${regressionpath}/post/$targetfile], 0, [ignore], [ignore]) 180 181 AT_CLEANUP
Note:
See TracChangeset
for help on using the changeset viewer.