Trees | Indices | Help |
|
---|
|
1 ############################################################################### 2 # # 3 # Copyright (C) 2006 Chris MacRaild # 4 # Copyright (C) 2007-2012 Edward d'Auvergne # 5 # # 6 # This file is part of the program relax. # 7 # # 8 # relax is free software; you can redistribute it and/or modify # 9 # it under the terms of the GNU General Public License as published by # 10 # the Free Software Foundation; either version 2 of the License, or # 11 # (at your option) any later version. # 12 # # 13 # relax is distributed in the hope that it will be useful, # 14 # but WITHOUT ANY WARRANTY; without even the implied warranty of # 15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 16 # GNU General Public License for more details. # 17 # # 18 # You should have received a copy of the GNU General Public License # 19 # along with relax; if not, write to the Free Software # 20 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # 21 # # 22 ############################################################################### 23 24 # Python module imports. 25 from os import sep 26 import sys 27 28 # relax module imports. 29 from base_classes import SystemTestCase 30 from data import Relax_data_store; ds = Relax_data_store() 31 from generic_fns.mol_res_spin import residue_loop 32 from physical_constants import N15_CSA, NH_BOND_LENGTH 33 from status import Status; status = Status() 34 3537 """Class for testing various aspects specific to reduced spectral density mapping.""" 389040 """Set up for all the functional tests.""" 41 42 # Create the data pipe. 43 self.interpreter.pipe.create('jw', 'jw')44 4547 """The spectral density calculation test.""" 48 49 # Execute the script. 50 self.script_exec(status.install_path + sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'jw_mapping_calc_test.py') 51 52 # Correct jw values. 53 j0 = [4.0703318681008998e-09, 3.7739393907014834e-09] 54 jwx = [1.8456254300773903e-10, 1.6347516082378241e-10] 55 jwh = [1.5598167512718012e-12, 2.9480536599037041e-12] 56 57 # Loop over residues. 58 index = 0 59 for res in residue_loop(): 60 # Residues -2 and -1 have data. 61 if res.num == -2 or res.num == -1: 62 self.assert_(res.spin[0].select) 63 self.assertAlmostEqual(res.spin[0].j0, j0[index]) 64 self.assertAlmostEqual(res.spin[0].jwh, jwh[index]) 65 self.assertAlmostEqual(res.spin[0].jwx, jwx[index]) 66 index = index + 1 67 68 # Other residues have insufficient data. 69 else: 70 self.assert_(not res.spin[0].select)71 7274 """The user function value.set().""" 75 76 # Execute the script. 77 self.script_exec(status.install_path + sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'jw_mapping_set_value.py') 78 79 # Loop over residues. 80 for res in residue_loop(): 81 self.assertAlmostEqual(res.spin[0].r, NH_BOND_LENGTH) 82 self.assertAlmostEqual(res.spin[0].csa, N15_CSA)83 84
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Wed Apr 10 14:16:34 2013 | http://epydoc.sourceforge.net |