Author: bugman Date: Tue Dec 9 11:04:24 2008 New Revision: 8170 URL: http://svn.gna.org/viewcvs/relax?rev=8170&view=rev Log: The RNA sequence of the noe_rna_hbond.dat file is now generated through a new class method. Modified: branches/ave_noe/test_suite/system_tests/noe_restraints.py Modified: branches/ave_noe/test_suite/system_tests/noe_restraints.py URL: http://svn.gna.org/viewcvs/relax/branches/ave_noe/test_suite/system_tests/noe_restraints.py?rev=8170&r1=8169&r2=8170&view=diff ============================================================================== --- branches/ave_noe/test_suite/system_tests/noe_restraints.py (original) +++ branches/ave_noe/test_suite/system_tests/noe_restraints.py Tue Dec 9 11:04:24 2008 @@ -26,6 +26,7 @@ # relax module imports. from data import Relax_data_store; ds = Relax_data_store() +from generic_fns.mol_res_spin import create_molecule, create_residue, create_spin class Noe_restraints(TestCase): @@ -44,8 +45,47 @@ ds.__reset__() + def rna_seq(self): + """Generate the RNA sequence of the noe_rna_hbond.dat restraint file.""" + + # Info. + mol_names = ['A', 'B'] + res_nums = [ + [1, 2, 3, 4], + [4, 3, 2, 1] + ] + spin_names = [ + [['N1', 'N6', 'H62'], + ['H3', 'N3', 'O4'], + ['H1', 'N1', 'H22', 'N2', 'O6'], + ['N3', 'O2', 'H42', 'H4']], + [['H3', 'N3', 'O4'], + ['N1', 'N6', 'H62'], + ['N3', 'O2', 'H42', 'N4'], + ['H1', 'N1', 'H22', 'N2', 'O6']] + ] + + # Loop over the molecules. + for i in range(len(mol_names)): + # Create the molecule. + create_molecule(mol_names[i]) + + # Loop over the residues. + for j in range(len(res_nums[i])): + # Create the residue. + create_residue(res_nums[i][j]) + + # Loop over the atoms. + for k in range(len(spin_names[i][j][k])): + # Create the spin. + create_spin(spin_names[i][j][k])) + + def test_read_xplor_rna(self): """Test the reading of RNA H-bond restraints in Xplor format.""" + # Generate the RNA sequence. + self.rna_seq() + # Read the Xplor input file. self.relax.interpreter._Noe.read_restraints(file=noe_rna_hbond.dat, dir=sys.path[-1] + '/test_suite/shared_data/noe_restraints')