URL: <http://gna.org/bugs/?23294> Summary: Automatic merging of PDB molecules results in an IndexError. Project: relax Submitted by: bugman Submitted on: Fri 20 Feb 2015 08:21:01 AM UTC Category: relax's source code Specific analysis category: All analyses Priority: 3 - Low Severity: 2 - Minor Status: None Assigned to: bugman Originator Name: Originator Email: Open/Closed: Open Release: 3.3.6 Discussion Lock: Any Operating System: All systems _______________________________________________________ Details: When reading a PDB file using the structure.read_pdb user function <http://www.nmr-relax.com/manual/structure_read_pdb.html> and multiple molecules are present (i.e. multiple chain IDs) and only one molecule name is given, the following error is seen: Internal relax PDB parser. Opening the file 'in.pdb' for reading. Traceback (most recent call last): File "/data/relax/relax-trunk/multi/processor.py", line 494, in run self.callback.init_master(self) File "/data/relax/relax-trunk/multi/__init__.py", line 318, in default_init_master self.master.run() File "/data/relax/relax-trunk/relax.py", line 199, in run self.interpreter.run(self.script_file) File "/data/relax/relax-trunk/prompt/interpreter.py", line 279, in run return run_script(intro=self.__intro_string, local=locals(), script_file=script_file, show_script=self.__show_script, raise_relax_error=self.__raise_relax_error) File "/data/relax/relax-trunk/prompt/interpreter.py", line 585, in run_script return console.interact(intro, local, script_file, show_script=show_script, raise_relax_error=raise_relax_error) File "/data/relax/relax-trunk/prompt/interpreter.py", line 484, in interact_script exec_script(script_file, local) File "/data/relax/relax-trunk/prompt/interpreter.py", line 363, in exec_script runpy.run_module(module, globals) File "/usr/lib64/python2.7/runpy.py", line 180, in run_module fname, loader, pkg_name) File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code exec code in run_globals File "/data/relax/debugging/bug_x_multi_mol_automerge/test.py", line 3, in <module> structure.read_pdb('in.pdb', read_model=1, set_mol_name='merged mol') File "/data/relax/relax-trunk/prompt/uf_objects.py", line 225, in __call__ self._backend(*new_args, **uf_kargs) File "/data/relax/relax-trunk/pipe_control/structure/main.py", line 1099, in read_pdb cdp.structure.load_pdb(file_path, read_mol=read_mol, set_mol_name=set_mol_name, read_model=read_model, set_model_num=set_model_num, alt_loc=alt_loc, verbosity=verbosity, merge=merge) File "/data/relax/relax-trunk/lib/structure/internal/object.py", line 2085, in load_pdb new_mol_name.append(set_mol_name[mol_index]) IndexError: list index out of range This should not happen! Instead either a RelaxError should be raised to point out the problem, or the molecules should be automatically merged. The attached minimal 'in.pdb' structure and 'test.py' relax script demonstrate this problem. _______________________________________________________ File Attachments: ------------------------------------------------------- Date: Fri 20 Feb 2015 08:21:01 AM UTC Name: in.pdb Size: 652B By: bugman <http://gna.org/bugs/download.php?file_id=23873> ------------------------------------------------------- Date: Fri 20 Feb 2015 08:21:01 AM UTC Name: test.py Size: 172B By: bugman <http://gna.org/bugs/download.php?file_id=23874> _______________________________________________________ Reply to this item at: <http://gna.org/bugs/?23294> _______________________________________________ Message sent via/by Gna! http://gna.org/