Re: [COOT] Map rotation and translation

2022-01-26 Thread Paul Emsley

On 27/01/2022 01:13, Paul Emsley wrote:



I would like to draw your attention to the following paper and the 
EMDA project by my colleagues, it is a cryo-EM map and model 
manipulation toolbox, maybe that has what you need:


https://www.biorxiv.org/content/10.1101/2021.07.26.453750v2


This has been published now:

https://www.sciencedirect.com/science/article/pii/S1047847721001313



To unsubscribe from the COOT list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/WA-JISC.exe?SUBED1=COOT=1

This message was issued to members of www.jiscmail.ac.uk/COOT, a mailing list 
hosted by www.jiscmail.ac.uk, terms & conditions are available at 
https://www.jiscmail.ac.uk/policyandsecurity/


Re: [COOT] Map rotation and translation

2022-01-26 Thread Paul Emsley

On 26/01/2022 22:18, Helge Paternoga wrote:

Dear all,

Continuing from this topic over at the ChimeraX user list: 
http://plato.cgl.ucsf.edu/pipermail/chimerax-users/2022-January/003177.html


I would like to ask if it is possible currently (or to introduce) the 
ability in Coot to rotate and translate a cryo-EM map according to the 
output of the ChimeraX "fitmap" command.


This would be very useful in comparing the map quality of volumes e. 
g. from the same classification. Resampling the volumes in ChimeraX 
changes the map and is therefore not a good option when one wants to 
compare subtle differences in the densities.


I believe the information provided by "fitmap" adheres to the ChimeraX 
Positions Format described here: 
https://rbvi.ucsf.edu/chimerax/docs/user/formats/positions.html


The output from "fitmap" to the log appears a bit different though, so 
I am not sure which one would be useable in the end:


Example:

tool show 'Fit in Map'Fit map run_class001.mrc in map run_class001.mrc 
using 159932 points

correlation = 0.9589, correlation about mean = 0.5393, overlap = 82.65
steps = 48, shift = 2.47, angle = 0.571 degrees

Position of run_class001.mrc (#1) relative to run_class001.mrc (#2) 
coordinates:

Matrix rotation and translation
0.5193 -0.00918946 0.00341831 2.19650599
0.00918323 0.5615 0.00183397 -4.59169731
-0.00343502 -0.00180249 0.9248 1.52902230
Axis -0.18233729 0.34363524 0.92123175
Axis point 479.76292846 225.20927991 0.
Rotation angle (degrees) 0.57135182
Shift along axis -0.56979010




Alas, I have not done what I think you want (which is to say, to use the 
extented CCP4/MRC map header information to represent an arbitrary 
rotation/translation).


In my tests, transforming the map changes the values by 0.1% or less and 
that is often acceptable it seems. You could validate your results by 
making the transformation the other way around. You could use refmac to 
calculate the fourier coefficients and write an mtz file. On reading 
that into Coot you can control the Shannon super-sampling rate and that 
will reduce the interpolation errors.


To apply the transformation above to a map in Coot, one would use the 
function transform_map() function:


# transform_map(imol, mat, trans, about_pt, radius, space_group, cell)
#
# where space_group is a "P1" and cell is a list of 6 parameters, where 
the cell angles are in degrees (you can use the input cell)


You can access the cell parameters using the cell() function. The mat is 
a 3x3 matrix list and the trans in this case is


[2.1965059, -4.5916973, 1.5290223]

I would like to draw your attention to the following paper and the EMDA 
project by my colleagues, it is a cryo-EM map and model manipulation 
toolbox, maybe that has what you need:


https://www.biorxiv.org/content/10.1101/2021.07.26.453750v2

Paul



To unsubscribe from the COOT list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/WA-JISC.exe?SUBED1=COOT=1

This message was issued to members of www.jiscmail.ac.uk/COOT, a mailing list 
hosted by www.jiscmail.ac.uk, terms & conditions are available at 
https://www.jiscmail.ac.uk/policyandsecurity/


[COOT] Map rotation and translation

2022-01-26 Thread Helge Paternoga

Dear all,

Continuing from this topic over at the ChimeraX user list: 
http://plato.cgl.ucsf.edu/pipermail/chimerax-users/2022-January/003177.html


I would like to ask if it is possible currently (or to introduce) the 
ability in Coot to rotate and translate a cryo-EM map according to the 
output of the ChimeraX "fitmap" command.


This would be very useful in comparing the map quality of volumes e. g. 
from the same classification. Resampling the volumes in ChimeraX changes 
the map and is therefore not a good option when one wants to compare 
subtle differences in the densities.


I believe the information provided by "fitmap" adheres to the ChimeraX 
Positions Format described here: 
https://rbvi.ucsf.edu/chimerax/docs/user/formats/positions.html


The output from "fitmap" to the log appears a bit different though, so I 
am not sure which one would be useable in the end:


Example:

tool show 'Fit in Map'Fit map run_class001.mrc in map run_class001.mrc 
using 159932 points

correlation = 0.9589, correlation about mean = 0.5393, overlap = 82.65
steps = 48, shift = 2.47, angle = 0.571 degrees

Position of run_class001.mrc (#1) relative to run_class001.mrc (#2) 
coordinates:

Matrix rotation and translation
0.5193 -0.00918946 0.00341831 2.19650599
0.00918323 0.5615 0.00183397 -4.59169731
-0.00343502 -0.00180249 0.9248 1.52902230
Axis -0.18233729 0.34363524 0.92123175
Axis point 479.76292846 225.20927991 0.
Rotation angle (degrees) 0.57135182
Shift along axis -0.56979010


Many thanks for reading,

Helge



To unsubscribe from the COOT list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/WA-JISC.exe?SUBED1=COOT=1

This message was issued to members of www.jiscmail.ac.uk/COOT, a mailing list 
hosted by www.jiscmail.ac.uk, terms & conditions are available at 
https://www.jiscmail.ac.uk/policyandsecurity/


Re: [COOT] refinement weight key binding

2022-01-26 Thread Philip Kiser
Thank you Paul for the clarification and for the key binding script!
Best,
Philip

On Wed, Jan 26, 2022 at 10:20 AM Paul Emsley 
wrote:

>
> On 26/01/2022 13:20, Philip Kiser wrote:
>
> Hi Paul,
> Thank you for the guidance. Usually, the auto weight feature works fine
> for our projects, so it would be nice to be able to set the weight with the
> push of a button as opposed to always having to click in the
> Refine/Regularize control box. Having the command set up as a key
> binding would make it easier to switch the refinement weights based on the
> quality of the density map. If there is an easier way to do things that
> I've missed please let me know!
> Regards,
> Philip
>
> On Tue, Jan 25, 2022 at 7:24 PM Paul Emsley 
> wrote:
>
>> On 25/01/2022 22:46, Philip Kiser wrote:
>> > Dear Coot Users,
>> > Has anyone developed a key binding that will automatically set the
>> weight matrix refinement weight to the value that is obtained using the
>> "Estimate" option? If so I would really appreciate you sharing it.
>>
>>
>> This is easy to do - but why would you want to do it!?
>>
>>
>> set_matrix(estimate_map_weight(imol_refinement_map()))
>>
>>
>>
> Hi Philip,
>
> "Always having to set the weight" - confusing comment. One need only do
> this once per project/directory and the setting is saved in the state file.
>
> If you change the refinement map using the "Map" button then the Estimate
> button is now there right between the combobox and the OK button.
>
> To answer your question though, see attached - stick it in your
> ~/.coot-preferences directory.
>
> Paul.
>
>
>
>



To unsubscribe from the COOT list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/WA-JISC.exe?SUBED1=COOT=1

This message was issued to members of www.jiscmail.ac.uk/COOT, a mailing list 
hosted by www.jiscmail.ac.uk, terms & conditions are available at 
https://www.jiscmail.ac.uk/policyandsecurity/


Re: [COOT] refinement weight key binding

2022-01-26 Thread Paul Emsley


On 26/01/2022 13:20, Philip Kiser wrote:

Hi Paul,
Thank you for the guidance. Usually, the auto weight feature works 
fine for our projects, so it would be nice to be able to set the 
weight with the push of a button as opposed to always having to 
click in the Refine/Regularize control box. Having the command set up 
as a key binding would make it easier to switch the refinement weights 
based on the quality of the density map. If there is an easier way to 
do things that I've missed please let me know!

Regards,
Philip

On Tue, Jan 25, 2022 at 7:24 PM Paul Emsley 
 wrote:


On 25/01/2022 22:46, Philip Kiser wrote:
> Dear Coot Users,
> Has anyone developed a key binding that will automatically set
the weight matrix refinement weight to the value that is obtained
using the "Estimate" option? If so I would really appreciate you
sharing it.


This is easy to do - but why would you want to do it!?


set_matrix(estimate_map_weight(imol_refinement_map()))




Hi Philip,

"Always having to set the weight" - confusing comment. One need only do 
this once per project/directory and the setting is saved in the state file.


If you change the refinement map using the "Map" button then the 
Estimate button is now there right between the combobox and the OK button.


To answer your question though, see attached - stick it in your 
~/.coot-preferences directory.


Paul.





To unsubscribe from the COOT list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/WA-JISC.exe?SUBED1=COOT=1

This message was issued to members of www.jiscmail.ac.uk/COOT, a mailing list 
hosted by www.jiscmail.ac.uk, terms & conditions are available at 
https://www.jiscmail.ac.uk/policyandsecurity/

def set_the_map_weight_func():
set_matrix(estimate_map_weight(imol_refinement_map()))

add_key_binding("Auto-Set the Map Weight", "!", lambda: set_the_map_weight_func())


Re: [COOT] scripting with hot keys

2022-01-26 Thread Paul Emsley

On 26/01/2022 15:20, Lijun Liu wrote:

Hi:  Within coot interface, hitting "space" for next residue is handy.  I would like to 
know if there is a way I can take this advantage to do something like go-to-next-Nth-residue by a 
customized Button or Hot-Key, since I am doing coot residue-by-residue tracing a lot; for a good 
map and well-fit model this may help speed up and can avoid hitting "space" crazily.


This reminds me of a script written some time ago now by, I think, 
Charlie Bond. Sadly I can't find it. I think he called it 
lazy-student.py (or something like that) where the view slid along the 
structure automatically and had a button for "Pause" or "Go Back" or 
some such. Maybe someone has a copy of it.


At other times I would try to rewrite it but I am slightly busy at the 
moment.


Paul.



To unsubscribe from the COOT list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/WA-JISC.exe?SUBED1=COOT=1

This message was issued to members of www.jiscmail.ac.uk/COOT, a mailing list 
hosted by www.jiscmail.ac.uk, terms & conditions are available at 
https://www.jiscmail.ac.uk/policyandsecurity/


[COOT] scripting with hot keys

2022-01-26 Thread Lijun Liu
Hi:  Within coot interface, hitting "space" for next residue is handy.  I would 
like to know if there is a way I can take this advantage to do something like 
go-to-next-Nth-residue by a customized Button or Hot-Key, since I am doing coot 
residue-by-residue tracing a lot; for a good map and well-fit model this may 
help speed up and can avoid hitting "space" crazily.   Thanks.  Lijun



To unsubscribe from the COOT list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/WA-JISC.exe?SUBED1=COOT=1

This message was issued to members of www.jiscmail.ac.uk/COOT, a mailing list 
hosted by www.jiscmail.ac.uk, terms & conditions are available at 
https://www.jiscmail.ac.uk/policyandsecurity/


Re: [COOT] refinement weight key binding

2022-01-26 Thread Philip Kiser
Hi Paul,
Thank you for the guidance. Usually, the auto weight feature works fine for
our projects, so it would be nice to be able to set the weight with the
push of a button as opposed to always having to click in the
Refine/Regularize control box. Having the command set up as a key
binding would make it easier to switch the refinement weights based on the
quality of the density map. If there is an easier way to do things that
I've missed please let me know!
Regards,
Philip

On Tue, Jan 25, 2022 at 7:24 PM Paul Emsley 
wrote:

> On 25/01/2022 22:46, Philip Kiser wrote:
> > Dear Coot Users,
> > Has anyone developed a key binding that will automatically set the
> weight matrix refinement weight to the value that is obtained using the
> "Estimate" option? If so I would really appreciate you sharing it.
>
>
> This is easy to do - but why would you want to do it!?
>
>
> set_matrix(estimate_map_weight(imol_refinement_map()))
>
>
> Paul.
>
> 
>
> To unsubscribe from the COOT list, click the following link:
> https://www.jiscmail.ac.uk/cgi-bin/WA-JISC.exe?SUBED1=COOT=1
>
> This message was issued to members of www.jiscmail.ac.uk/COOT, a mailing
> list hosted by www.jiscmail.ac.uk, terms & conditions are available at
> https://www.jiscmail.ac.uk/policyandsecurity/
>



To unsubscribe from the COOT list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/WA-JISC.exe?SUBED1=COOT=1

This message was issued to members of www.jiscmail.ac.uk/COOT, a mailing list 
hosted by www.jiscmail.ac.uk, terms & conditions are available at 
https://www.jiscmail.ac.uk/policyandsecurity/