[Chimera-users] transform coordinates of multiple volumes

Ludovic Renault ludovic.renault at ualberta.ca
Thu May 3 10:17:23 PDT 2012


Hi,

Following my previous post, I now have the volumes rotated and shifted as
wanted.
I was wondering if I could merge them all together as 1 volume.
I did a quick search and found that it should be possible using the chimera
map format.
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')
Am I missing something?

On Fri, Apr 27, 2012 at 12:49 PM, Tom Goddard <goddard at sonic.net> wrote:

> Hi Ludovic,
>
>  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".
>
>  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:
>
>    runscript eulermove.py #0 45 60 20 15 33.5 -10
>
> 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.
>
>  Tom
>
>
>  On Apr 27, 2012, at 9:26 AM, Ludovic Renault wrote:
>>
>>  Hi Elaine,
>>> I have 120 or so 3d volumes (EM maps). They are all equivalent and are
>>> centered at the same position.
>>> 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.
>>> So
>>> 1- How to (Or can I) save the new coordinates for each volume?
>>> 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?
>>>
>>> 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?
>>>
>>> I hope I'm clear enough.
>>> Thanks,
>>> Ludovic
>>>
>> Hi Ludovic,
>> 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!
>>
>> I think the shift in Transform Coordinates is not in pixels but in units
>> of length.
>> <http://www.cgl.ucsf.edu/**chimera/docs/**ContributedSoftware/transform/*
>> *transform.html<http://www.cgl.ucsf.edu/chimera/docs/ContributedSoftware/transform/transform.html>
>> >
>>
>> How the volume grid units map to units of length can be viewed by using
>> Features...Coordinates in the Volume Viewer menu.
>>
>> 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.
>> <http://www.cgl.ucsf.edu/**chimera/docs/UsersGuide/midas/**move.html<http://www.cgl.ucsf.edu/chimera/docs/UsersGuide/midas/move.html>
>> >
>> <http://www.cgl.ucsf.edu/**chimera/docs/UsersGuide/midas/**turn.html<http://www.cgl.ucsf.edu/chimera/docs/UsersGuide/midas/turn.html>
>> >
>>
>> About saving a transformed map:
>> 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.
>> <http://www.cgl.ucsf.edu/**chimera/docs/UsersGuide/**
>> savemodel.html#afterfitting<http://www.cgl.ucsf.edu/chimera/docs/UsersGuide/savemodel.html#afterfitting>
>> >
>>
>> The resampling of one map onto the grid of another can be done with
>> command "vop resample", for example:
>>
>> vop #1 resample onGrid #0
>>
>> <http://www.cgl.ucsf.edu/**chimera/docs/UsersGuide/midas/**
>> vop.html#resample<http://www.cgl.ucsf.edu/chimera/docs/UsersGuide/midas/vop.html#resample>
>> >
>>
>> 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.
>>
>> 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.
>>
>> 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.
>>
>> Sorry I couldn't give a more complete solution,
>> Elaine
>>
>> -----
>> Elaine C. Meng, Ph.D.
>> UCSF Computer Graphics Lab (Chimera team) and Babbitt Lab
>> Department of Pharmaceutical Chemistry
>> University of California, San Francisco
>>
>>
>>
>>
>>
>> ______________________________**_________________
>> Chimera-users mailing list
>> Chimera-users at cgl.ucsf.edu
>> http://plato.cgl.ucsf.edu/**mailman/listinfo/chimera-users<http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users>
>>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/attachments/20120503/254b3e2f/attachment.html>


More information about the Chimera-users mailing list