Trees | Indices | Help |
|
---|
|
1 ############################################################################### 2 # # 3 # Copyright (C) 2011 Edward d'Auvergne # 4 # # 5 # This file is part of the program relax. # 6 # # 7 # relax is free software; you can redistribute it and/or modify # 8 # it under the terms of the GNU General Public License as published by # 9 # the Free Software Foundation; either version 2 of the License, or # 10 # (at your option) any later version. # 11 # # 12 # relax is distributed in the hope that it will be useful, # 13 # but WITHOUT ANY WARRANTY; without even the implied warranty of # 14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 15 # GNU General Public License for more details. # 16 # # 17 # You should have received a copy of the GNU General Public License # 18 # along with relax; if not, write to the Free Software # 19 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # 20 # # 21 ############################################################################### 22 23 # Module docstring. 24 """RDC-based system tests.""" 25 26 27 # Python module imports. 28 from os import sep 29 30 # relax module imports. 31 from base_classes import SystemTestCase 32 from generic_fns.mol_res_spin import count_spins, spin_loop 33 from status import Status; status = Status() 34 3537 """Class for testing RDC operations.""" 386340 """Test for the loading of some RDC data with the spin ID format.""" 41 42 # Create a data pipe. 43 self.interpreter.pipe.create('test', 'N-state') 44 45 # Data directory. 46 dir = status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'align_data'+sep 47 48 # Load the spins. 49 self.interpreter.sequence.read(file='tb.txt', dir=dir, spin_id_col=1) 50 51 # Load the RDCs. 52 self.interpreter.rdc.read(align_id='tb', file='tb.txt', dir=dir, spin_id_col=1, data_col=2, error_col=3) 53 54 # The RDCs. 55 rdcs = [ -26.2501958629, 9.93081766942, 7.26317614156, -1.24840526981, 5.31803314334, 14.0362909456, 1.33652530397, -1.6021670281] 56 57 # Checks. 58 self.assertEqual(count_spins(), 8) 59 i = 0 60 for spin in spin_loop(): 61 self.assertAlmostEqual(rdcs[i], spin.rdc['tb']) 62 i += 1
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Wed Apr 10 13:32:41 2013 | http://epydoc.sourceforge.net |