<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi Matthias,<div class=""><br class=""></div><div class="">When opening a script with the forEachFile option you can use $file in the script which will be replaced by the file basename. So in your script use</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>fitsearch #2 in #1 resolution 20 search 1000 cutoff 0.9 save Tomo_fitted_$file_%d.pdb</div><div class=""><br class=""></div><div class="">This is described in the forEachFile documentation</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span><a href="https://www.rbvi.ucsf.edu/chimerax/docs/user/commands/open.html#forEachFile" class="">https://www.rbvi.ucsf.edu/chimerax/docs/user/commands/open.html#forEachFile</a></div><div class=""><br class=""></div><div class=""> Tom</div><div class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Aug 18, 2021, at 7:57 AM, Vorländer,Matthias Kopano <<a href="mailto:matthias.vorlaender@imp.ac.at" class="">matthias.vorlaender@imp.ac.at</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="WordSection1" style="page: WordSection1; caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;"><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" class="">Dear Tom,<o:p class=""></o:p></span></div><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" class=""><o:p class=""> </o:p></span></div><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" class="">Thank you again for the code for saving PDBs above a certain correlation score sing the fitmap command! I am now trying do use this on a large number of input volumes, and it’s working well except that I have a problem with naming the saved PDBs. So, my approach is the following:<o:p class=""></o:p></span></div><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" class=""><o:p class=""> </o:p></span></div><ul type="disc" style="margin-bottom: 0cm; margin-top: 0cm;" class=""><li class="MsoListParagraph" style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;"><span lang="EN-US" class="">Open ChimeraX_Daily in no-gui mode<o:p class=""></o:p></span></li><li class="MsoListParagraph" style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;"><span lang="EN-US" class="">Type “</span><span lang="EN-US" style="font-family: "Courier New";" class="">open FitPDBinVolume.cxc foreach *.mrc”</span><span lang="EN-US" class=""><o:p class=""></o:p></span></li></ul><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" class="">The script<span class="Apple-converted-space"> </span></span><span lang="EN-US" style="font-family: Courier;" class="">FitPDBinVolume.cxc<span class="Apple-converted-space"> </span></span><span lang="EN-US" class="">is very simple and looks like this:<o:p class=""></o:p></span></div><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" class=""><o:p class=""> </o:p></span></div><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" style="font-size: 9pt; font-family: "Courier New";" class="">open 7apk<o:p class=""></o:p></span></div><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" style="font-size: 9pt; font-family: "Courier New";" class="">open /Volumes/matthias.vorlaender/Scripts/Chimera/fit_search.py<o:p class=""></o:p></span></div><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" style="font-size: 9pt; font-family: "Courier New";" class="">fitsearch #2 in #1 resolution 20 search 1000 cutoff 0.9 save /Volumes/plaschka/shared/data/em/Krios/20210616_endoTHO_tomo/Visualisation/mapping_back_using_imod/test/Tomo_fitted_%d.pdb<o:p class=""></o:p></span></div><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" style="font-size: 9pt; font-family: "Courier New";" class=""><o:p class=""> </o:p></span></div><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" class="">What I would like to achieve is that the fitted PDBs are saved with a base name that matches that of the opened .mrc. Is there an easy way to do that?<o:p class=""></o:p></span></div><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" class=""><o:p class=""> </o:p></span></div><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" class="">Thanks a lot in advance,<o:p class=""></o:p></span></div><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" class="">Best,<o:p class=""></o:p></span></div><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" class="">Matthias</span><span lang="EN-US" style="font-size: 9pt; font-family: "Courier New";" class=""><o:p class=""></o:p></span></div><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" style="font-family: "Courier New";" class=""> <o:p class=""></o:p></span></div><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span class=""><o:p class=""> </o:p></span></div><div style="border-style: solid none none; border-top-width: 1pt; border-top-color: rgb(181, 196, 223); padding: 3pt 0cm 0cm;" class=""><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><b class=""><span style="font-size: 12pt;" class="">From:<span class="Apple-converted-space"> </span></span></b><span style="font-size: 12pt;" class="">ChimeraX-users <<a href="mailto:chimerax-users-bounces@cgl.ucsf.edu" style="color: blue; text-decoration: underline;" class="">chimerax-users-bounces@cgl.ucsf.edu</a>> on behalf of "Vorländer,Matthias Kopano via ChimeraX-users" <<a href="mailto:chimerax-users@cgl.ucsf.edu" style="color: blue; text-decoration: underline;" class="">chimerax-users@cgl.ucsf.edu</a>><br class=""><b class="">Reply to:<span class="Apple-converted-space"> </span></b>"Vorländer,Matthias Kopano" <<a href="mailto:matthias.vorlaender@imp.ac.at" style="color: blue; text-decoration: underline;" class="">matthias.vorlaender@imp.ac.at</a>><br class=""><b class="">Date:<span class="Apple-converted-space"> </span></b>Tuesday, 27. July 2021 at 07:40<br class=""><b class="">To:<span class="Apple-converted-space"> </span></b>Tom Goddard <<a href="mailto:goddard@sonic.net" style="color: blue; text-decoration: underline;" class="">goddard@sonic.net</a>><br class=""><b class="">Cc:<span class="Apple-converted-space"> </span></b>"<a href="mailto:chimerax-users@cgl.ucsf.edu" style="color: blue; text-decoration: underline;" class="">chimerax-users@cgl.ucsf.edu</a>" <<a href="mailto:chimerax-users@cgl.ucsf.edu" style="color: blue; text-decoration: underline;" class="">chimerax-users@cgl.ucsf.edu</a>><br class=""><b class="">Subject:<span class="Apple-converted-space"> </span></b>Re: [chimerax-users] Automated Fitting of models into maps and saving fits with a correlation score > X<o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-family: Arial, sans-serif;" class="">Hi Tom,<o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-family: Arial, sans-serif;" class=""><o:p class=""> </o:p></span></div></div><div class=""><p class="MsoNormal" style="margin: 0cm 0cm 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-family: Arial, sans-serif;" class="">Thanks so much, that's amazing!<o:p class=""></o:p></span></p></div><div class=""><p class="MsoNormal" style="margin: 0cm 0cm 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-family: Arial, sans-serif;" class="">To be clear, I am not searching tomograms, I am searching artificial tomograms that contain perfect "molmaps" of my protein of interest, so they are free of noise. Trying this in Chimera gave very good fits when asking for for enough initial placement.<o:p class=""></o:p></span></p></div><div class=""><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-family: Arial, sans-serif;" class="">Thanks a lot for your help,<o:p class=""></o:p></span></div></div><div class=""><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-family: Arial, sans-serif;" class="">Best, <o:p class=""></o:p></span></div></div><div class=""><p class="MsoNormal" style="margin: 0cm 0cm 12pt; font-size: 11pt; font-family: Calibri, sans-serif;"><span style="font-family: Arial, sans-serif;" class="">Matthias <o:p class=""></o:p></span></p></div><div class=""><div class=""><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-family: Arial, sans-serif;" class="">Holen Sie sich<span class="Apple-converted-space"> </span><a href="https://aka.ms/AAb9ysg" style="color: blue; text-decoration: underline;" class="">Outlook für Android</a><o:p class=""></o:p></span></div></div><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-family: Arial, sans-serif;" class=""><o:p class=""> </o:p></span></div></div><div class="MsoNormal" align="center" style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif; text-align: center;"><hr size="0" width="100%" align="center" class=""></div><div id="divRplyFwdMsg" class=""><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><b class=""><span style="" class="">From:</span></b><span style="" class=""><span class="Apple-converted-space"> </span>Tom Goddard <<a href="mailto:goddard@sonic.net" style="color: blue; text-decoration: underline;" class="">goddard@sonic.net</a>><br class=""><b class="">Sent:</b><span class="Apple-converted-space"> </span>Tuesday, July 27, 2021 12:15:13 AM<br class=""><b class="">To:</b><span class="Apple-converted-space"> </span>Vorländer,Matthias Kopano <<a href="mailto:matthias.vorlaender@imp.ac.at" style="color: blue; text-decoration: underline;" class="">matthias.vorlaender@imp.ac.at</a>><br class=""><b class="">Cc:</b><span class="Apple-converted-space"> </span><a href="mailto:chimerax-users@cgl.ucsf.edu" style="color: blue; text-decoration: underline;" class="">chimerax-users@cgl.ucsf.edu</a><span class="Apple-converted-space"> </span><<a href="mailto:chimerax-users@cgl.ucsf.edu" style="color: blue; text-decoration: underline;" class="">chimerax-users@cgl.ucsf.edu</a>><br class=""><b class="">Subject:</b><span class="Apple-converted-space"> </span>Re: [chimerax-users] Automated Fitting of models into maps and saving fits with a correlation score > X</span><o:p class=""></o:p></div><div class=""><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> <o:p class=""></o:p></div></div></div><div class=""><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Hi Matthias,<span class="Apple-converted-space"> </span><o:p class=""></o:p></div><div class=""><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> You can run ChimeraX command scripts or Python scripts without a GUI, just start it at the shell with the "--nogui" option, for example<o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">chimerax --nogui mycommands.cxc<o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">I made some example Python code that runs fitmap search and saves PDB files for each unique fit with correlation over 0.9.<o:p class=""></o:p></div><div class=""><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><a href="https://rbvi.github.io/chimerax-recipes/fit_search/fit_search.html" style="color: blue; text-decoration: underline;" class="">https://rbvi.github.io/chimerax-recipes/fit_search/fit_search.html</a><o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">I don't expect this to be a good way to search tomograms. It will be very inefficient. Template matching code designed for that problem is likely to work much better. Such code usually uses Fourier space methods to search all translations at once, so it can be much faster and more thorough. Even with that optimization it takes a long time to do the rotational search.<o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""> Tom<o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">Example search of monomers in 14-mer GroEL.<o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div class=""><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><img border="0" id="x_F2832E31-47FB-4539-A4DD-7042EDD07572" style="" class="" apple-inline="yes" width="300" height="334" src="cid:image001.png@01D79452.29FE74D0"><o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div><div class=""><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><br class=""><br class=""><o:p class=""></o:p></div><blockquote style="margin-top: 5pt; margin-bottom: 5pt;" class=""><div class=""><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class="">On Jul 25, 2021, at 9:05 AM, Vorländer,Matthias Kopano via ChimeraX-users <<a href="mailto:chimerax-users@cgl.ucsf.edu" style="color: blue; text-decoration: underline;" class="">chimerax-users@cgl.ucsf.edu</a>> wrote:<o:p class=""></o:p></div></div><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div><div class=""><div class=""><div class=""><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" class="">Dear all,<span class="xapple-converted-space"> </span></span><o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" class=""> </span><o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" class="">I have a set of 100 “artificial” tomograms, each containing approx 100 copies of a simulated density map of my protein of interest. I would like to fit each tomogram with the PDB of my POI, and save copies for all fits with a correlation score > 90%. Using the fitmap command in Chimera and then manually selecting the fits that meet the criterium works, but takes quiet a long time for a larger amount of data. I wonder if this could be automated, and if somehow would be able me to put together a script (is it possible to execute such tasks in a non-gui way, by submitting it to a cluster so that it could be parallelized?).</span><o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" class=""> </span><o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" class="">Thanks a lot in advance,</span><o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" class="">Best,</span><o:p class=""></o:p></div></div><div class=""><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span lang="EN-US" class="">Matthias</span><o:p class=""></o:p></div></div></div><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><span style="font-size: 9pt; font-family: Helvetica;" class="">_______________________________________________<br class="">ChimeraX-users mailing list<br class=""></span><a href="mailto:ChimeraX-users@cgl.ucsf.edu" style="color: blue; text-decoration: underline;" class=""><span style="font-size: 9pt; font-family: Helvetica;" class="">ChimeraX-users@cgl.ucsf.edu</span></a><span style="font-size: 9pt; font-family: Helvetica;" class=""><br class="">Manage subscription:<br class=""></span><a href="https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users" style="color: blue; text-decoration: underline;" class=""><span style="font-size: 9pt; font-family: Helvetica;" class="">https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users</span></a><o:p class=""></o:p></div></div></blockquote></div><div style="margin: 0cm; font-size: 11pt; font-family: Calibri, sans-serif;" class=""><o:p class=""> </o:p></div></div></div></div></div></div></blockquote></div><br class=""></div></body></html>