[chimerax-users] FitMap/FitList scripting

Christian Tüting christian.tueting at biochemtech.uni-halle.de
Tue Jul 26 23:54:27 PDT 2022


Hi Tom,

yeah, Yiannis asked something slightly different, but we often uses
chimerax and the fitting. So not only having the avg/inside, but also
the actual translation might help in the future, as we can perform the
fitting unsupervised (e.g. in nogui mode on one of our image analysis
machines, as they are faster than the office machines), and later place
the molecule at the correct position, based on the fitting.

And having a saved list with not only avg/inside (what Ioannis asked
for), but additional information, would be handy and could be easily
post-process in any tool (R, python, even excel if it's a tab seperated
csv).

And thanks for your fast reply/support.

Best
Christian


>>> Tom Goddard <goddard at sonic.net> 07/27/22 4:51 AM >>>
Hi Christian,

  I'll see if I can add a command option to output the rotations and
translations for all fits to the log, maybe tomorrow.

  Yiannis asked about copy and paste from the Fit list a few months ago

	https://www.rbvi.ucsf.edu/pipermail/chimerax-users/2022-May/003783.html
<https://www.rbvi.ucsf.edu/pipermail/chimerax-users/2022-May/003783.html>

I see copy and paste works now at least on the Mac where I just tested.

	Tom


> On Jul 26, 2022, at 6:23 AM, Christian Tüting via ChimeraX-users
<chimerax-users at cgl.ucsf.edu> wrote:
> 
> Dear ChimeraX DevTeam,
> 
> I am currently working on a project which requires fitting a single
model multiple times in a map. This is easy doable with the global
search parameter, and if n is big enough, all correct locations are
found.
> 
> My collegue Ioannis wrote you a couple of weeks ago to implement a
copy function to the fitlist, but this includes only the statistics, but
not the translation information of each model. This is only possible by
clicking the button "Place Copy", which creates a copy of the model and
applies the translation to this model.
> In the log, there is only the best model with the translation matrix,
but if my map does have multiple correct locations, I'm missing this
information.
> 
> I extended the fitmap function in fitcmd.py, so it writes this to a
file to the current location called fitmap.txt. This file contains all
the statistics and the rotation/translation information. This might be
handy for some users.
> 
> Here is the code:
> 
> f = open("fitmap.txt", "w")
>    if len(flist) == 0:
>  f.write("No fit found")
>    else:
>  for i, f0 in enumerate(flist):
>   msg = f0.fit_message()
>   f.write(f"Fit #{i+1}\n" + msg + "\n")
>    f.close()
> 
> Maybe you can include an option "to_text" (which is false by default),
to actually add this functionality. 
> 
> 
> Best
> Christian
> 
> 
> 
> 
> 
> 
> _______________________________________________
> ChimeraX-users mailing list
> ChimeraX-users at cgl.ucsf.edu
> Manage subscription:
> https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users
> 




More information about the ChimeraX-users mailing list