예제 #1
0
파일: test_api.py 프로젝트: tlinnet/relax
    def test_duplicate_data_fail1(self):
        """Test the failure of the model-free duplicate_data() method when the structures are not consistent."""

        # Read a model-free results file.
        results.read(file='final_results_trunc_1.3_v1',
                     dir=status.install_path + sep + 'test_suite' + sep +
                     'shared_data' + sep + 'model_free' + sep + 'OMP')

        # Load a structure.
        structure.main.read_pdb(file='Ap4Aase_res1-12.pdb',
                                dir=status.install_path + sep + 'test_suite' +
                                sep + 'shared_data' + sep + 'structures',
                                read_model=1)

        # Create a new model-free data pipe.
        ds.add(pipe_name='new', pipe_type='mf')

        # Load the structure for the second pipe.
        structure.main.read_pdb(file='Ap4Aase_res1-12.pdb',
                                dir=status.install_path + sep + 'test_suite' +
                                sep + 'shared_data' + sep + 'structures',
                                read_model=1)

        # Modify the structure.
        dp = pipes.get_pipe('new')
        dp.structure.structural_data[0].mol[0].file_name = 'test'

        # Duplicate the data and catch the error.
        self.assertRaises(RelaxError,
                          self.inst.duplicate_data,
                          'orig',
                          'new',
                          model_info=0)
예제 #2
0
    def test_duplicate_data2(self):
        """Test the model-free duplicate_data() method."""

        # Read a model-free results file.
        results.read(file='final_results_trunc_1.3_v2', dir=status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'model_free'+sep+'OMP')

        # Duplicate the data.
        self.inst.duplicate_data('orig', 'new', model_info=0)
예제 #3
0
파일: test_api.py 프로젝트: tlinnet/relax
    def test_duplicate_data2(self):
        """Test the model-free duplicate_data() method."""

        # Read a model-free results file.
        results.read(file='final_results_trunc_1.3_v2',
                     dir=status.install_path + sep + 'test_suite' + sep +
                     'shared_data' + sep + 'model_free' + sep + 'OMP')

        # Duplicate the data.
        self.inst.duplicate_data('orig', 'new', model_info=0)
예제 #4
0
    def test_duplicate_data_single_mf_model(self):
        """Test the model-free duplicate_data() method."""

        # Read a model-free results file.
        results.read(file='final_results_trunc_1.3_v2', dir=status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'model_free'+sep+'OMP')

        # Load a structure.
        structure.main.read_pdb(file='Ap4Aase_res1-12.pdb', dir=status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'structures', read_model=1)

        # Duplicate the data, model by model.
        self.inst.duplicate_data('orig', 'new', model_info=0)
        self.inst.duplicate_data('orig', 'new', model_info=1)
        self.inst.duplicate_data('orig', 'new', model_info=2)
        self.inst.duplicate_data('orig', 'new', model_info=3)
예제 #5
0
    def test_duplicate_data3(self):
        """Test the model-free duplicate_data() method."""

        # Read a model-free results file.
        results.read(file='final_results_trunc_1.3_v2', dir=status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'model_free'+sep+'OMP')

        # Load a structure.
        structure.main.read_pdb(file='Ap4Aase_res1-12.pdb', dir=status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'structures', read_model=1)

        # Duplicate the data.
        self.inst.duplicate_data('orig', 'new', model_info=0)

        # Check the original data.
        self.assert_(hasattr(pipes.get_pipe('orig'), 'structure'))

        # Check the duplication.
        self.assert_(hasattr(pipes.get_pipe('new'), 'structure'))
예제 #6
0
파일: test_api.py 프로젝트: tlinnet/relax
    def test_duplicate_data_single_mf_model(self):
        """Test the model-free duplicate_data() method."""

        # Read a model-free results file.
        results.read(file='final_results_trunc_1.3_v2',
                     dir=status.install_path + sep + 'test_suite' + sep +
                     'shared_data' + sep + 'model_free' + sep + 'OMP')

        # Load a structure.
        structure.main.read_pdb(file='Ap4Aase_res1-12.pdb',
                                dir=status.install_path + sep + 'test_suite' +
                                sep + 'shared_data' + sep + 'structures',
                                read_model=1)

        # Duplicate the data, model by model.
        self.inst.duplicate_data('orig', 'new', model_info=0)
        self.inst.duplicate_data('orig', 'new', model_info=1)
        self.inst.duplicate_data('orig', 'new', model_info=2)
        self.inst.duplicate_data('orig', 'new', model_info=3)
예제 #7
0
    def test_duplicate_data_fail1(self):
        """Test the failure of the model-free duplicate_data() method when the structures are not consistent."""

        # Read a model-free results file.
        results.read(file='final_results_trunc_1.3_v1', dir=status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'model_free'+sep+'OMP')

        # Load a structure.
        structure.main.read_pdb(file='Ap4Aase_res1-12.pdb', dir=status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'structures', read_model=1)

        # Create a new model-free data pipe.
        ds.add(pipe_name='new', pipe_type='mf')

        # Load the structure for the second pipe.
        structure.main.read_pdb(file='Ap4Aase_res1-12.pdb', dir=status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'structures', read_model=1)

        # Modify the structure.
        dp = pipes.get_pipe('new')
        dp.structure.structural_data[0].mol[0].file_name = 'test'

        # Duplicate the data and catch the error.
        self.assertRaises(RelaxError, self.inst.duplicate_data, 'orig', 'new', model_info=0)
예제 #8
0
파일: test_api.py 프로젝트: tlinnet/relax
    def test_duplicate_data3(self):
        """Test the model-free duplicate_data() method."""

        # Read a model-free results file.
        results.read(file='final_results_trunc_1.3_v2',
                     dir=status.install_path + sep + 'test_suite' + sep +
                     'shared_data' + sep + 'model_free' + sep + 'OMP')

        # Load a structure.
        structure.main.read_pdb(file='Ap4Aase_res1-12.pdb',
                                dir=status.install_path + sep + 'test_suite' +
                                sep + 'shared_data' + sep + 'structures',
                                read_model=1)

        # Duplicate the data.
        self.inst.duplicate_data('orig', 'new', model_info=0)

        # Check the original data.
        self.assert_(hasattr(pipes.get_pipe('orig'), 'structure'))

        # Check the duplication.
        self.assert_(hasattr(pipes.get_pipe('new'), 'structure'))