[Chimera-users] select certain transformants of multiscale models.
Jonathan Hilmer
jkhilmer at gmail.com
Tue Jun 27 12:39:08 PDT 2006
Actually, it is possible to use the command line to select portions of
a multiscale-models generated volume set: it's just not really
efficient.
Open your structure and apply the BIOMT with multiscale models. Then
select all the surfaces of the multiscale structure. Hide the surface
representation and then show a ribbon representation. You might have
to wait awhile for this to finish on a large structure.
This will generate a new model for each subunit that can be selected
manually, via command line, or with the model panel. You can then use
the multiscale models panel to make color adjustments, show surfaces
etc using selections defined in the command line.
However, I can say from experience that learning the Python code is
worth the effort in the long run.
Jonathan
> Hi,
>
> I'm wondering if it is possible to select specific volumes generated
> via the multiscale model tool via the command line? E.g., for a set
> of 60 biomt matrices I'm interested in coloring the chains generated
> with matrices 1-20 in one color, matrices 21-40 in another color, and
> matrices 41-60 in yet another color. Any suggestions on how to
> accomplish this would be appreciated.
>
> thanks!
>
> Cathy Lawson
>
>
>
> *****************************************************************'
> Catherine Lawson
> Laboratory for Structural Biology and Bioinformatics
> Department of Chemistry and Chemical Biology
> 610 Taylor Road
> Piscataway, NJ 08854 USA
> http://roma.rutgers.edu
> http://rutchem.rutgers.edu/~lawson
> *****************************************************************
>
>
>
> ------------------------------
>
> Message: 2
> Date: Mon, 26 Jun 2006 18:18:57 -0700 (PDT)
> From: Thomas Goddard <goddard at cgl.ucsf.edu>
> Subject: Re: [Chimera-users] selecting multiscale model volumes
> To: cathy.lawson at rutgers.edu
> Cc: chimera-users at cgl.ucsf.edu
> Message-ID: <200606270118.k5R1IvGE1909532 at guanine.cgl.ucsf.edu>
>
> Hi Cathy,
>
> Unfortunately no Chimera commands allow selecting or coloring
> multiscale surfaces. The multiscale tool in general is not well
> integrated with the other Chimera capabilities -- like the Actions
> Color menu won't color chain surfaces that you select with the mouse.
> We plan on fixing this in the future but it may take a while (6 months
> or more).
>
> Everything is possible using Python code, although this can be quite
> difficult to figure out. It is not documented and the best approach is
> to ask for examples from us that you can then modify. Below is code
> to color multiscale surfaces with specific matrix subunits and chain IDs.
> If you open that file in Chimera (with File / Open..., or with the "open"
> command) it will do the type of coloring you requested. When you modify
> the code be careful not to change the indentation since this is important
> in Python.
>
> We could easily do a little better and add a Chimera command so that
> you would not have to edit a Python script to specify what residue
> ranges and colors to use.
>
> I am going on vacation tomorrow until July 18 but can make that
> command for you when I return. It just requires some additional
> Python code that Chimera will load at startup.
>
> Tom
>
> ----
> Python file mmcolor.py follows:
>
> # ----------------------------------------------------------------------------
> # Color certain matrix subunits and chains of a multiscale model.
> #
> def color_multiscale(rgba, model_num, matrix_nums, chain_ids = None):
>
> import MultiScale
> d = MultiScale.multiscale_model_dialog(True)
> for cp in d.chain_pieces():
> g = cp.surface_group
> if g.model().id == model_num:
> mnum, chain_id = g.oslName.split('.')
> if chain_ids == None or chain_id in chain_ids:
> if int(mnum) in matrix_nums:
> cp.set_color(rgba)
>
> # ----------------------------------------------------------------------------
> #
> red = (1,0,0,1) # Red, green, blue, opacity
> green = (0,1,0,1)
> blue = (0,0,1,1)
> cyan = (0,1,1,1)
>
> color_multiscale(blue, 1, range(1,21)) # Color matrix subunits 1-20
> color_multiscale(cyan, 1, range(21,41)) # Color matrix subunits 21-40
> color_multiscale(green, 1, range(41,61)) # Color matrix subunits 41-60
>
> # Example coloring subunits 1-20, only chains 'A' and 'B'.
> #color_multiscale(red, 1, range(1,21), ['A', 'B'])
More information about the Chimera-users
mailing list