source: tests/GuiChecks/Potential/FitCompoundPotential/testsuite-potential-fit-compound-potential.at

Candidate_v1.7.1 stable v1.7.1
Last change on this file was 4538c0, checked in by Frederik Heber <frederik.heber@…>, 3 days ago

Recreated guicheck from regression tests.

  • Property mode set to 100644
File size: 2.7 KB
Line 
1#
2# MoleCuilder - creates and alters molecular systems
3# Copyright (C) 2021 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### fit a compound potentials
19
20AT_SETUP([Potential - Fit compound potential to water])
21AT_KEYWORDS([potential parse-homologies fit-compound-potential])
22AT_SKIP_IF([../../molecuilder --help fit-potential; if test $? -eq 5; then /bin/true; else /bin/false; fi])
23# homology files probably originate from Labspace/PotentialFitting/WaterAngle
24# recreate homology file: PYTHONPATH=... /usr/bin/python .../tests/regression/Potential/FitPotential/pre/measurement_function.py length_common.pdb 2 0 0 5 4 127.0.0.1 2050 6-311G* 1 2. 10 .../share/molecuilder/data/bondtables/bondtable.dat
25
26file=water_homology.dat
27AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Potential/FitCompoundPotential/pre/$file $file], 0)
28AT_CHECK([chmod u+w $file], 0, [ignore], [ignore])
29AT_CHECK([../../molecuilder --dry-run --parse-homologies $file --set-random-number-engine "lagged_fibonacci607" --random-number-engine-parameters "seed=1;" --set-random-number-distribution "uniform_real" --random-number-distribution-parameters "min=0;max=1;" --parse-potentials ${abs_top_srcdir}/tests/regression/Potential/FitCompoundPotential/pre/water.potentials --fit-compound-potential --error-file error.csv --fragment-charges 1 8 1 --take-best-of 3 --save-potentials water.potentials --no-dry-run --store-session session-potential-fit-compound-potential.py --session-type python], 0, [stdout], [ignore])
30AT_CHECK([grep -v "Command.*DryRun" session-potential-fit-compound-potential.py >session-potential-fit-compound-potential_new.py], 0, [ignore], [ignore])
31AT_CHECK([../../molecuilderguitest session-potential-fit-compound-potential_new.py], 0, [stdout], [ignore])
32# check that error file was written
33AT_CHECK([test -e error.csv], 0, [ignore], [ignore])
34# check that L_2 error
35# check parameters to printed precision
36AT_CHECK([grep "harmonic_angle:.*particle_type1=1,.*particle_type2=8,.*particle_type3=1,.*spring_constant=0.7.*,.*equilibrium_distance=-0.3.*" water.potentials], 0, [ignore], [ignore])
37
38AT_CLEANUP
Note: See TracBrowser for help on using the repository browser.