<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi Ludovic,<br>
<br>
Yes you need to specify the file format in the volume save
command. Otherwise it always uses MRC -- it is not smart enough to
look at the file suffix and choose the right format.<br>
<br>
volume all save v.cmap saveFormat cmap<br>
<br>
I'll add a request to make the volume command look at the file
suffix to determine the desired format when none is specified.<br>
<br>
Tom<br>
<br>
<blockquote
cite="mid:CANeVB9vTSS_PwxOFF3nKviob7YWXkne+G3d19=1ejrM5d1kHrg@mail.gmail.com"
type="cite">Hi,
<div><br>
</div>
<div>Following my previous post, I now have the volumes rotated
and shifted as wanted.</div>
<div>I was wondering if I could merge them all together as 1
volume.</div>
<div>I did a quick search and found that it should be possible
using the chimera map format.</div>
<div>So I saved my volumes as cmap format ( eg. volume #95 save
95.cmap) and now I tried to save them all into one file. 'volume
all save volume.cmap' but I get the same 'mrc error' as when I
tried with the original mrc volumes ('valueErro: Cannot write
multiple volumes using format mrc')</div>
<div>Am I missing something?</div>
<div><br>
<div class="gmail_quote">On Fri, Apr 27, 2012 at 12:49 PM, Tom
Goddard <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:goddard@sonic.net" target="_blank">goddard@sonic.net</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">Hi
Ludovic,<br>
<br>
As Elaine says the map file formats don't support rotated
grids so you'd have to resample the map with "vop resample".
You could specify the grid using a copy of the map in the
unrotated position and use the "boundingGrid true" option so
that the bounds of the new resampled map are chosen to cover
the entire rotated and shifted map. For example, "vop
resample #1 onGrid #0 boundingGrid true".<br>
<br>
As for doing the rotation, no Chimera command accepts Euler
angles. But a Python script can do it. I've attached an
example. To rotate volume #0 using Euler angles 45,60,20
(using z-x-z "chi-convention") and then translate by 15,
33.5, -10 Angstroms start Chimera in the directory
containing the attached eulermove.py script, open the volume
and use:<br>
<br>
runscript eulermove.py #0 45 60 20 15 33.5 -10<br>
<br>
The result will be two new volumes, one being a copy of the
original volume rotated and translated, and the other being
a resampled version of the rotated translated map on the
original grid. The original map stays in the same place.<br>
<br>
Tom<br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div class="h5">
On Apr 27, 2012, at 9:26 AM, Ludovic Renault wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Elaine,<br>
I have 120 or so 3d volumes (EM maps). They are all
equivalent and are centered at the same position.<br>
I would like to move each one of these 120 volumes
by a specific value in terms of euler angles and
shift (in pixels I assume). I can use the 'trAnsform
coordinates' tool but then if I save the map, it is
not saved with the new coordinates.<br>
So<br>
1- How to (Or can I) save the new coordinates for
each volume?<br>
2- Can I use command lines to automate the process
for example by giving the command a text file with
the specific coordinates for each volume?<br>
<br>
I did do the rotation with spider software, but the
shifting doesn't work because the volume(s) go
outside of the box. So if all the above is not
doable, is it possible to increase the volumes boxe
size in chimera, then I could use the shift function
in spider?<br>
<br>
I hope I'm clear enough.<br>
Thanks,<br>
Ludovic<br>
</blockquote>
Hi Ludovic,<br>
It is recommended to send Chimera questions to the
chimera-users list (CC'd) -- I'm not the top expert on
volumes, so others may have better answers!<br>
<br>
I think the shift in Transform Coordinates is not in
pixels but in units of length.<br>
<<a moz-do-not-send="true"
href="http://www.cgl.ucsf.edu/chimera/docs/ContributedSoftware/transform/transform.html"
target="_blank">http://www.cgl.ucsf.edu/chimera/docs/ContributedSoftware/transform/transform.html</a>><br>
<br>
How the volume grid units map to units of length can
be viewed by using Features...Coordinates in the
Volume Viewer menu.<br>
<br>
Chimera has commands for translation (move) and
rotation (turn) in X,Y,Z coordinate systems, but I
don't know of a command to apply Euler rotations.<br>
<<a moz-do-not-send="true"
href="http://www.cgl.ucsf.edu/chimera/docs/UsersGuide/midas/move.html"
target="_blank">http://www.cgl.ucsf.edu/chimera/docs/UsersGuide/midas/move.html</a>><br>
<<a moz-do-not-send="true"
href="http://www.cgl.ucsf.edu/chimera/docs/UsersGuide/midas/turn.html"
target="_blank">http://www.cgl.ucsf.edu/chimera/docs/UsersGuide/midas/turn.html</a>><br>
<br>
About saving a transformed map:<br>
The map formats don't include transformation
information, so there is no way to save EXACTLY the
same data, except transformed. However, you can
resample the map onto a new grid, and then save the
new map. The values at the new grid points are
determined by interpolation, so there will be some
(generally minor) data loss.<br>
<<a moz-do-not-send="true"
href="http://www.cgl.ucsf.edu/chimera/docs/UsersGuide/savemodel.html#afterfitting"
target="_blank">http://www.cgl.ucsf.edu/chimera/docs/UsersGuide/savemodel.html#afterfitting</a>><br>
<br>
The resampling of one map onto the grid of another can
be done with command "vop resample", for example:<br>
<br>
vop #1 resample onGrid #0<br>
<br>
<<a moz-do-not-send="true"
href="http://www.cgl.ucsf.edu/chimera/docs/UsersGuide/midas/vop.html#resample"
target="_blank">http://www.cgl.ucsf.edu/chimera/docs/UsersGuide/midas/vop.html#resample</a>><br>
<br>
To save the new resampled volume to a file, you could
use "File... Save Map as" in the Volume Viewer dialog
or the command "volume" with its "save" option.<br>
<br>
However, I see that "vop resample" is most pertinent
for saving a map that has been fitted to another. In
your case you are simply transforming the map, so it
is unclear on what grid you could resample. Maybe
there is some way to make a "dummy" grid in the right
place.<br>
<br>
Although "vop cover" extends a map, it assumes
periodicity of that map, whereas I assume you want
zeroes in the expanded parts. Perhaps expanding a map
with zeroes could be done using "vop add" to add a
dummy zero map to your data set of interest.<br>
<br>
Sorry I couldn't give a more complete solution,<br>
Elaine<br>
<br>
-----<br>
Elaine C. Meng, Ph.D.<br>
UCSF Computer Graphics Lab (Chimera team) and Babbitt
Lab<br>
Department of Pharmaceutical Chemistry<br>
University of California, San Francisco<br>
</div>
</div>
</blockquote>
</blockquote>
</div>
</div>
</blockquote>
<br>
</body>
</html>