[Chimera-users] VolumeViewer in python

Elaine Meng meng at cgl.ucsf.edu
Wed Jul 20 09:30:00 PDT 2022


Hi Yumeng,
You can a put a Chimera command into python as explained on this page in the Programmer Guide:

<https://www.rbvi.ucsf.edu/chimera/docs/ProgrammersGuide/basicPrimer.html>

I hope this helps,
Elaine
-----
Elaine C. Meng, Ph.D.                       
UCSF Chimera(X) team
Department of Pharmaceutical Chemistry
University of California, San Francisco


> On Jul 20, 2022, at 8:34 AM, Yumeng Yan via Chimera-users <chimera-users at cgl.ucsf.edu> wrote:
> 
> Hi all,
>  
> I tried to fit some models into a large density map using python script for chimera.
> Do you know how to set the VolumeViewer module in python script to show all the surface of the density map like command line”
> volume #1 style surface region all level 0.15 step 1”?
>  
> Here is my python code:
>  
> Import chimera
> import FitMap
> import VolumeViewer
>  
> model_list = chimera.openModels.open("test.pdb")
> em_map = VolumeViewer.open_volume_file("test.mrc")[0]
>  
> “python code ” for “volume #1 style surface region all level 0.15 step 1”
>  
> model = chimera.selection.ItemizedSelection([model_list[0]])
> listfit = FitMap.fitcmd.fitmap(model, em_map, resolution=5.0, metric="correlation")
>  
>  
> Thanks and best wishes,
>  
> Yumeng




More information about the Chimera-users mailing list