[Chimera-users] Fitmap in batch mode

Tom Goddard goddard at sonic.net
Tue May 21 10:24:56 PDT 2013


Hi Ingvar,

  You're right there is no command option to dump text output about the map fits found during a search when you are not using the graphical user interface.  But from Python you have access to all the results.  I've attached a Python script that fits one map in another and prints out correlation, and the positioning matrix and other info, for example,

16 fits
correlation = 0.99998944748
ave map value =  1.83066447933
points inside =  0.978085351788
times found 1
  Matrix rotation and translation
     0.99999654  -0.00109470   0.00239128  -0.06929400
     0.00109836   0.99999823  -0.00153028   0.16076910
    -0.00238960   0.00153290   0.99999597   0.01414383
  Axis   0.50324711   0.78544818   0.36029640
  Axis point  -8.71411462   0.00000000  49.27362380
  Rotation angle (degrees)   0.17437486
  Shift along axis   0.09649976

correlation = 0.946936951988
ave map value =  1.39059352115
points inside =  0.21107266436
times found 1
  Matrix rotation and translation
    -0.88578783  -0.46402579  -0.00774527 -84.25465980
    -0.45395343   0.86978824  -0.19337708  -3.14068125
     0.09646870  -0.16777507  -0.98109394  67.13834146
  Axis   0.23752992  -0.96687475   0.09344922
  Axis point -43.46328686   0.00000000  32.27793387
  Rotation angle (degrees) 176.91070890
  Shift along axis -10.70233149

[14 more fits]…

I made this script by looking at Chimera Python code

	chimera/share/FitMap/fitcmd.py

which implements the fitmap command.  And also I looked at search.py and fitlist.py in the same directory to figure out the Python functions I needed to call.  It is not easy to figure that out.  There is a page of Chimera Python example scripts

	http://plato.cgl.ucsf.edu/trac/chimera/wiki/Scripts

  Tom

-------------- next part --------------
A non-text attachment was scrubbed...
Name: fitsearch.py
Type: text/x-python-script
Size: 782 bytes
Desc: not available
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/attachments/20130521/ac313313/attachment.bin>
-------------- next part --------------



On May 21, 2013, at 5:21 AM, ingvar  wrote:

> Hello,
> 
> I am trying to run fitmap on a set of volumes on a server without a display.  I would like to collect the results of the top hits to store in a database – correlation coefficients, inclusion scores, and the transforms.  The only way I found to collect the fitting results is to save the session after displaying the listFits dialog.   The listFits dialog cannot be displayed when running Chimera in –nogui mode, otherwise this would have been a solution.
> 
> I tried to use a virtual display, with Xvfb.  I have used Xvfb with some java applications in the past.  When I use Xvfb with Chimera, it appears that Chimera do not want to start up properly, the process just hangs, i.e. no cpu usage.
> 
> Is there a way around this, or am I asking for an enhancement, e.g. a “writeListFile toFile” option.
> 
> I am on RHEL 6.2/6.3 if that matter.
> 
> Noticed that there is a local correlation option in the pipeline for Chimera 1.8, looking forward to try it out.
> 
> Kind Regards,
> Ingvar
> 
> Typical python script:
> from chimera import runCommand as rc
> rc("open emd_5500.map")
> rc("volume #0 level 1.34 transparency 0.5")
> rc("open emd_2017.map")
> rc("volume #1 level 0.58 transparency 0.5")
> rc("fitmap #1 #0 search 200 metric overlap envelope true inside 0.2 listFits false")
> #rc("fitmap #1 #0 search 200 metric overlap envelope true inside 0.2")
> rc("save session5500_2017")
> rc("stop now")
> 
> Setup to run with Xvfb (in bash):
> i=0
> while [ -f /tmp/.X$i-lock ]
> do
>  i=$[$i+1]
> done
> Xvfb :$i &
> pid=$!
> export DISPLAY=:$i
> chimera fit5500_2017.py
> kill $pid
> 
> _______________________________________________
> 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