| [075357] | 1 | #
 | 
|---|
 | 2 | #    MoleCuilder - creates and alters molecular systems
 | 
|---|
 | 3 | #    Copyright (C) 2017 Frederik Heber
 | 
|---|
 | 4 | #
 | 
|---|
 | 5 | #    This program is free software: you can redistribute it and/or modify
 | 
|---|
 | 6 | #    it under the terms of the GNU General Public License as published by
 | 
|---|
 | 7 | #    the Free Software Foundation, either version 3 of the License, or
 | 
|---|
 | 8 | #    (at your option) any later version.
 | 
|---|
 | 9 | #
 | 
|---|
 | 10 | #    This program is distributed in the hope that it will be useful,
 | 
|---|
 | 11 | #    but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
|---|
 | 12 | #    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
|---|
 | 13 | #    GNU General Public License for more details.
 | 
|---|
 | 14 | #
 | 
|---|
 | 15 | #    You should have received a copy of the GNU General Public License
 | 
|---|
 | 16 | #    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
|---|
 | 17 | #
 | 
|---|
 | 18 | # Force Annealing with Ising model
 | 
|---|
 | 19 | 
 | 
|---|
 | 20 | AT_SETUP([Python externalization - Force Annealing without bondgraph on 2-body Ising model])
 | 
|---|
 | 21 | AT_KEYWORDS([python force-annealing ising])
 | 
|---|
 | 22 | 
 | 
|---|
 | 23 | # we use forces from a simple Ising model with 2 "carbon" atoms in a row along the x axis
 | 
|---|
 | 24 | 
 | 
|---|
 | 25 | file=two_carbon_test.data
 | 
|---|
| [90ece9] | 26 | AT_CHECK([../../run ${abs_top_srcdir}/tests/Python/ForceAnnealing/pre/ising_model_chain.py ./$file ./ 3 2 "0"], 0, [stdout], [ignore])
 | 
|---|
| [075357] | 27 | AT_CHECK([grep "Largest remaining force components.*e-05" stdout], 0, [ignore], [ignore])
 | 
|---|
 | 28 | AT_CHECK([diff $file ${abs_top_srcdir}/tests/Python/ForceAnnealing/post/two_carbon_test_no-bondgraph.data], 0, [ignore], [ignore])
 | 
|---|
 | 29 | 
 | 
|---|
 | 30 | AT_CLEANUP
 | 
|---|
 | 31 | 
 | 
|---|
 | 32 | AT_SETUP([Python externalization - Force Annealing without bondgraph on 5-body Ising model])
 | 
|---|
 | 33 | AT_KEYWORDS([python force-annealing ising])
 | 
|---|
 | 34 | 
 | 
|---|
 | 35 | # we use forces from a simple Ising model with 5 "carbon" atoms in a row along the x axis
 | 
|---|
 | 36 | 
 | 
|---|
 | 37 | file=five_carbon_test.data
 | 
|---|
| [90ece9] | 38 | AT_CHECK([../../run ${abs_top_srcdir}/tests/Python/ForceAnnealing/pre/ising_model_chain.py ./$file ./ 15 5 "0"], 0, [stdout], [ignore])
 | 
|---|
| [8450da] | 39 | AT_CHECK([grep "Largest remaining force components.*e-05" stdout], 0, [ignore], [ignore])
 | 
|---|
| [075357] | 40 | AT_CHECK([diff $file ${abs_top_srcdir}/tests/Python/ForceAnnealing/post/five_carbon_test_no-bondgraph.data], 0, [ignore], [ignore])
 | 
|---|
 | 41 | 
 | 
|---|
 | 42 | AT_CLEANUP
 | 
|---|
 | 43 | 
 | 
|---|
 | 44 | AT_SETUP([Python externalization - Force Annealing with bondgraph on 2-body Ising model])
 | 
|---|
 | 45 | AT_KEYWORDS([python force-annealing ising bondgraph])
 | 
|---|
| [6a5921] | 46 | AT_SKIP_IF([/bin/true])
 | 
|---|
 | 47 | #AT_SKIP_IF([../../run ${abs_top_srcdir}/tests/Python/numpy_check.py])
 | 
|---|
| [075357] | 48 | 
 | 
|---|
 | 49 | # we use forces from a simple Ising model with 2 "carbon" atoms in a row along the x axis
 | 
|---|
 | 50 | 
 | 
|---|
 | 51 | file=two_carbon_test.data
 | 
|---|
| [441d40] | 52 | AT_CHECK([../../run ${abs_top_srcdir}/tests/Python/ForceAnnealing/pre/ising_model_chain.py ./$file ./ 3 2 "1"], 0, [stdout], [ignore])
 | 
|---|
| [075357] | 53 | AT_CHECK([grep "Largest remaining force components.*e-05" stdout], 0, [ignore], [ignore])
 | 
|---|
 | 54 | AT_CHECK([diff $file ${abs_top_srcdir}/tests/Python/ForceAnnealing/post/two_carbon_test_bondgraph.data], 0, [ignore], [ignore])
 | 
|---|
 | 55 | 
 | 
|---|
 | 56 | AT_CLEANUP
 | 
|---|
 | 57 | 
 | 
|---|
 | 58 | AT_SETUP([Python externalization - Force Annealing with bondgraph on 5-body Ising model])
 | 
|---|
 | 59 | AT_KEYWORDS([python force-annealing ising bondgraph])
 | 
|---|
| [6a5921] | 60 | AT_SKIP_IF([/bin/true])
 | 
|---|
 | 61 | #AT_SKIP_IF([../../run ${abs_top_srcdir}/tests/Python/numpy_check.py])
 | 
|---|
| [075357] | 62 | 
 | 
|---|
 | 63 | # we use forces from a simple Ising model with 5 "carbon" atoms in a row along the x axis
 | 
|---|
 | 64 | 
 | 
|---|
 | 65 | file=five_carbon_test.data
 | 
|---|
| [441d40] | 66 | AT_CHECK([../../run ${abs_top_srcdir}/tests/Python/ForceAnnealing/pre/ising_model_chain.py ./$file ./ 15 5 "1"], 0, [stdout], [ignore])
 | 
|---|
 | 67 | AT_CHECK([grep "Largest remaining force components.*e-05" stdout], 0, [ignore], [ignore])
 | 
|---|
| [075357] | 68 | AT_CHECK([diff $file ${abs_top_srcdir}/tests/Python/ForceAnnealing/post/five_carbon_test_bondgraph.data], 0, [ignore], [ignore])
 | 
|---|
 | 69 | 
 | 
|---|
 | 70 | AT_CLEANUP
 | 
|---|