[chimerax-users] FitMap/FitList scripting

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


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








More information about the ChimeraX-users mailing list