Author: bugman Date: Tue Apr 28 14:03:25 2009 New Revision: 9018 URL: http://svn.gna.org/viewcvs/relax?rev=9018&view=rev Log: Merged revisions 9015-9017 via svnmerge from svn+ssh://bugman@xxxxxxxxxxx/svn/relax/1.3 ........ r9015 | bugman | 2009-04-27 15:26:25 +0200 (Mon, 27 Apr 2009) | 5 lines Bug fix. The PyMOL code was failing because of the new design of the structural data object. ........ r9016 | bugman | 2009-04-28 13:47:51 +0200 (Tue, 28 Apr 2009) | 3 lines Added a catch for bug #13442 (https://gna.org/bugs/index.php?13442) to the test suite. ........ r9017 | bugman | 2009-04-28 14:02:02 +0200 (Tue, 28 Apr 2009) | 6 lines Fix for bug #13442 (https://gna.org/bugs/index.php?13442). The problem was that global minimisation objects were being accessed when the do not exist. These are now skipped. ........ Modified: branches/ave_noe/ (props changed) branches/ave_noe/generic_fns/pymol.py branches/ave_noe/specific_fns/model_free/main.py branches/ave_noe/test_suite/system_tests/model_free.py Propchange: branches/ave_noe/ ------------------------------------------------------------------------------ --- svnmerge-integrated (original) +++ svnmerge-integrated Tue Apr 28 14:03:25 2009 @@ -1,1 +1,1 @@ -/1.3:1-9011 +/1.3:1-9017 Modified: branches/ave_noe/generic_fns/pymol.py URL: http://svn.gna.org/viewcvs/relax/branches/ave_noe/generic_fns/pymol.py?rev=9018&r1=9017&r2=9018&view=diff ============================================================================== --- branches/ave_noe/generic_fns/pymol.py (original) +++ branches/ave_noe/generic_fns/pymol.py Tue Apr 28 14:03:25 2009 @@ -71,14 +71,23 @@ self.pipe_write("reinitialize") # Open the PDB files. - for i in xrange(cdp.structure.num): - # The file path. - file = cdp.structure.file[i] - if cdp.structure.path[i]: - file = cdp.structure.path[i] + sep + file - - # Open the file in PyMOL. - self.pipe_write("load " + file) + open_files = [] + for model in cdp.structure.structural_data: + for mol in model.mol: + # The file path. + file = mol.file_name + if mol.file_path: + file = mol.file_path + sep + file + + # Already loaded. + if file in open_files: + continue + + # Open the file in PyMOL. + self.pipe_write("load " + file) + + # Add to the open file list. + open_files.append(file) def pipe_open(self): @@ -155,21 +164,30 @@ cdp = pipes.get_pipe() # Loop over the PDB files. - for i in xrange(cdp.structure.num): - # Identifier. - pdb_file = cdp.structure.file[i] - if cdp.structure.path[i]: - pdb_file = cdp.structure.path[i] + sep + pdb_file - id = file_root(pdb_file) - - # Hide everything. - pymol.pipe_write("cmd.hide('everything'," + `id` + ")") - - # Show the cartoon style. - pymol.pipe_write("cmd.show('cartoon'," + `id` + ")") - - # Colour by secondary structure. - pymol.pipe_write("util.cbss(" + `id` + ", 'red', 'yellow', 'green')") + open_files = [] + for model in cdp.structure.structural_data: + for mol in model.mol: + # Identifier. + pdb_file = mol.file_name + if mol.file_path: + pdb_file = mol.file_path + sep + pdb_file + id = file_root(pdb_file) + + # Already loaded. + if file in open_files: + continue + + # Add to the open file list. + open_files.append(file) + + # Hide everything. + pymol.pipe_write("cmd.hide('everything'," + `id` + ")") + + # Show the cartoon style. + pymol.pipe_write("cmd.show('cartoon'," + `id` + ")") + + # Colour by secondary structure. + pymol.pipe_write("util.cbss(" + `id` + ", 'red', 'yellow', 'green')") def command(command): Modified: branches/ave_noe/specific_fns/model_free/main.py URL: http://svn.gna.org/viewcvs/relax/branches/ave_noe/specific_fns/model_free/main.py?rev=9018&r1=9017&r2=9018&view=diff ============================================================================== --- branches/ave_noe/specific_fns/model_free/main.py (original) +++ branches/ave_noe/specific_fns/model_free/main.py Tue Apr 28 14:03:25 2009 @@ -2971,6 +2971,10 @@ # Loop over the global minimisation stats objects. for object_name in min_names: + # Skip non-existent objects. + if not hasattr(cdp, object_name): + continue + # Name for the simulation object. sim_object_name = object_name + '_sim' Modified: branches/ave_noe/test_suite/system_tests/model_free.py URL: http://svn.gna.org/viewcvs/relax/branches/ave_noe/test_suite/system_tests/model_free.py?rev=9018&r1=9017&r2=9018&view=diff ============================================================================== --- branches/ave_noe/test_suite/system_tests/model_free.py (original) +++ branches/ave_noe/test_suite/system_tests/model_free.py Tue Apr 28 14:03:25 2009 @@ -109,6 +109,18 @@ return string + def monte_carlo(self): + """Run Monte Carlo simulations for the optimised model-free model.""" + + # Monte Carlo simulations. + self.relax.interpreter._Monte_carlo.setup(number=3) + self.relax.interpreter._Monte_carlo.create_data() + self.relax.interpreter._Monte_carlo.initial_values() + self.relax.interpreter._Minimise('newton') + self.relax.interpreter._Eliminate() + self.relax.interpreter._Monte_carlo.error_analysis() + + def object_comparison(self, obj1=None, obj2=None, skip=None): """Check if the contents of 2 objects are the same.""" @@ -559,6 +571,9 @@ # Minimise. self.relax.interpreter._Minimisation.minimise('newton', 'gmw', 'mt') + + # Monte Carlo simulations. + self.monte_carlo() # Alias the relevent spin container. spin = cdp.mol[0].res[1].spin[0]