[Chimera-users] Fo-Fc electron density maps

Oliver Clarke olibclarke at gmail.com
Mon Jun 30 14:18:22 PDT 2014


Actually adding a second arg works well, thanks!

So now I have:

alias normalize_to_rms vop scale $1 rms 1 modelID $2; close $1; volume $2 capfaces false style mesh meshlighting false squaremesh false color blue; sop cap off
alias split_diff_map vop scale $1 rms 1 modelID $2; close $1; volume $2 capfaces false style mesh meshlighting false squaremesh false level -3 color red level 3 color green; sop cap off

Where the first one just normalizes to rms and colors blue, and the second one also normalizes but creates two appropriately colored contours, and I can call these as e.g. split_diff_map #0 #1, where #0 is the input map number and #1 is the desired output map number.

Cheers,
Oliver.

On Jun 30, 2014, at 5:06 PM, Tom Goddard <goddard at sonic.net> wrote:

> Making a macro create map #1000 does not work well, since the second time you use it it will try to make another model #1000.  You could add a second argument to your macro that specifies the output  model  number.  Or you make your macro that sets all the volume settings (mesh, capfaces, …) take a model number.  None of the choices is very good.
> 
> 	Tom
> 
> On Jun 30, 2014, at 2:01 PM, Oliver Clarke <olibclarke at gmail.com> wrote:
> 
>> Ah right - that’s okay then, I can just assign it to modelID 1000 then, on the assumption that I’ll never have 1000 models open at the same time.
>> 
>> Thanks!
>> 
>> Oliver.
>> On Jun 30, 2014, at 4:59 PM, Tom Goddard <goddard at sonic.net> wrote:
>> 
>>> There is no special variable to indicate the last created map for use in Chimera commands.  In a vop command you can include an option “modelId #5” to assign the id number of the new model.  So your macro could take the model id you want for the new map.  If you use the vop (volume operation) command to create a new map and don’t specify the modelId option then the new map has the lowest unused model number.  There are no output values assigned to variables in the Chimera command language, so it is quite limited.
>>> 
>>> 	Tom
>>> 
>>> 
>>> On Jun 30, 2014, at 11:32 AM, Oliver Clarke wrote:
>>> 
>>>> Thanks Tom and Elaine, that’s very helpful!
>>>> 
>>>> While we’re on the topic of macros/aliases, is there any way to refer to the model ID of an output map of a command as a variable in an alias?
>>>> 
>>>> For example, in the normalize_to_rms macro below, I would prefer to apply all the volume settings to just the map I am normalizing, rather than all open maps, but I can’t predict the model ID of the output map because it depends on how many maps I have open. 
>>>> 
>>>> This would be handy for stringing together multiple map/model manipulations in a single macro - e.g. to normalize a map to rms, generate two contours and color them appropriately, without disturbing any other open maps.
>>>> 
>>>> Cheers,
>>>> Oliver.
>>>> 
>>>> On Jun 30, 2014, at 2:00 PM, Tom Goddard wrote:
>>>> 
>>>>> Hi Oliver,
>>>>> 
>>>>> To simplify your Chimera macros a bit you can put multiple options in one volume command.  Instead of
>>>>> 
>>>>> 	volume # capfaces false; volume # style mesh; volume # meshlighting false; volume # squaremesh false
>>>>> 
>>>>> you can change settings for all open maps with
>>>>> 
>>>>> 	volume # capfaces false style mesh meshlighting false squaremesh false
>>>>> 
>>>>> Tom
>>>>> 
>>>>> 
>>>>> On Jun 28, 2014, at 3:14 PM, Oliver Clarke  wrote:
>>>>> 
>>>>>> Dear Egor,
>>>>>> 
>>>>>> In addition to Elaine’s suggestion of unchecking “Cap high values at box faces", I use the following aliases to make difference maps more familiar in style to a crystallographer:
>>>>>> 
>>>>>> First, to just normalize the map to RMS (as per coot etc) and adjust to get a mesh, turn capping, mesh lighting off etc:
>>>>>> 
>>>>>> alias normalize_to_rms vop scale $1 rms 1; close $1; volume # capfaces false; sop cap off; volume # style mesh; volume # meshlighting false; volume # square mesh false
>>>>>> 
>>>>>> Second, to split the map into two maps (one positive, one negative), which can then be colored green and red respectively:
>>>>>> 
>>>>>> alias split_diff_map vop threshold $1 minimum 0; vop threshold $1 maximum 0; close $1; sop cap off; volume # style mesh; volume # meshlighting false; volume # squaremesh false;
>>>>>> 
>>>>>> I add these two lines in a “chimera_aliases.com” file, which you can  tell Chimera to read at startup under Favorites—>Preferences—>Command Line.
>>>>>> 
>>>>>> You can then run these commands from the chimera command line, e.g. normalize_to_rms #1 or split_diff_map #1 if your map number is 1. Then just adjust the contours and colors in the volume viewer and you are good to go.
>>>>>> 
>>>>>> I don’t know how to automatically color the resultant maps, because there does not seem an obvious way to predict their model numbers, but I am sure there is a way to do that too, perhaps via some python trickery.
>>>>>> 
>>>>>> This is all kind of a work around of course - there may be a way to color a map by density value (such that all positive regions are green, and all negate regions are red), but I couldn’t figure out how to do it.
>>>>>> 
>>>>>> Best,
>>>>>> Oliver.
>>>>>> _______________________________________________
>>>>>> Chimera-users mailing list
>>>>>> Chimera-users at cgl.ucsf.edu
>>>>>> http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users
>>>>>> 
>>>>> 
>>>> 
>>>> 
>>> 
>> 
>> 
> 




More information about the Chimera-users mailing list