[Chimera-users] Re: [chimera-dev] regd error when opening a .mrc file

Hi Sandeep, This error indicates that the mrc file data values are all zero. The error occured when making the histogram that is shown in the Volume Viewer dialog, when it was trying to scale it to fit the width of the dialog. Of course, our code should not generate an error in this case. I will fix it for the next release. If you will be opening mrc files that may be all zero you can change chimera/share/VolumeViewer/histogram.py line 26 hscale = float(cheight) / max_height to if max_height == 0: hscale = 1 else: hscale = float(cheight) / max_height Then you will not get any error and the histogram will display correctly. Thanks for pointing out this problem. I am not familiar with pdb2mrc so I do not know why it is generating a volume consisting of all zeros. Tom
Date: Wed, 30 Jun 2004 21:33:12 -0600 From: Sandeep N Seshadri <sandeep@nmsu.edu> To: chimera-dev@cgl.ucsf.edu Subject: [chimera-dev] regd error when opening a .mrc file
i am getting the following error when i try to open a .mrc file . i generated a .pdb file and use a pdb2mrc to generate a .mrc file . i tried opening the .pdb file it works fine but when i try to open the .mrc file it gives the error.
if anyone has any idea on why this error occurs please let me know
thanks sandeep
Error while processing test-helix.mrc: ZeroDivisionError: float division (see reply log for Python traceback info) Traceback (most recent call last): File "/home/sandeep/chimera/share/__main__.py", line 56, in ? value = chimeraInit.init(sys.argv) File "/home/sandeep/chimera/share/chimeraInit.py", line 275, in init prefixableType=1) File "/home/sandeep/chimera/share/chimera/__init__.py", line 886, in open models = func(filename, *args, **kw) File "/home/sandeep/chimera/share/VolumeViewer/ChimeraExtension.py", line 30, in open_cb d.add_data_sets([g]) File "/home/sandeep/chimera/share/VolumeViewer/__init__.py", line 175, in add_data_sets self.redisplay_cb() File "/home/sandeep/chimera/share/VolumeViewer/__init__.py", line 459, in redisplay_cb self.show_using_dialog_settings(self.focus_region) File "/home/sandeep/chimera/share/VolumeViewer/__init__.py", line 380, in show_using_dialog_settings tp.update_histograms(data_region) File "/home/sandeep/chimera/share/VolumeViewer/__init__.py", line 1142, in update_histograms cw.update_histogram(data_region, read_matrix, self.dialog.message) File "/home/sandeep/chimera/share/VolumeViewer/__init__.py", line 1465, in update_histogram h.show_data(Numeric.log(s.counts + 1)) File "/home/sandeep/chimera/share/VolumeViewer/histogram.py", line 26, in show_data hscale = float(cheight) / max_height ZeroDivisionError: float division

Thanks for the information i will make changes into the code. i have another question on sessions . i have a perl program which calls makes a call to chimera. i would like to open all the files in the same session in other words i want to know if i can open a pdbfile in chimera with a session name start-session.py and open the other subsequent pdb files in the same start_session.py session . i know i can do it after opening the pdb file from the gui. Also when i open a pdb file or for that matter any file i chimera does it store session information abt that file anywhere ? please let me know Sandeep Seshadri

Hi Sandeep, I'm not sure I understand your question. When you save a session in Chimera it saves all of your currently opened models (that it is capable of saving). You can open a session file, then open some additional PDB files, then save a session to have all the models saved. Chimera does not keep track of where the models came from (from a session file or PDB file), it simply saves all the currently open models. Tom
participants (2)
-
Sandeep N Seshadri
-
Thomas Goddard