Re: [PyMOL] OBJECT argument in ALIGN command - color

2016-01-11 Thread Schubert, Carsten [JRDUS]
Hi Tim,

I ran into the same issue a while back as well. I gets complicated very quickly 
when you dive deeper into the subject. Your are right the colors of the CGO 
lines seem to be hardcoded. A  way to get around this is to extract the 
matching residues with cmd.get_raw_alignment(alignment_object). The result is a 
tuple of tuples of matching atoms as determined by the alignment algorithm. You 
could then take these atoms pairs and draw distance lines between them. These 
distance lines can be customized with color, linewidth, etc.

It has been a while since I worked on this, but I believe that the assignment 
of pairs is a non-trivial issue and sometimes fraught with mismatches. So 
manual checking against a sequence alignment is always a good idea especially 
for rather unrelated proteins.

I do have a script which can accomplish this, it is based on “colorbyrmsd.py”. 
However it is not ready for primetime, but I can share this with you if there 
is interest. Contact me offline to arrange something.

Cheers,

Carsten

From: Timothy Umland [mailto:uml...@gmail.com]
Sent: Sunday, January 10, 2016 9:08 PM
To: pymol-users@lists.sourceforge.net
Subject: [PyMOL] OBJECT argument in ALIGN command - color




Hi:



I am trying to use the Alignment Objects (i.e., lines between the paired 
aligned atoms) created by using the OBJECT argument of the ALIGN command to 
illustrate domain movement between the superimposed ligand-bound and unbound 
forms of an enzyme.



I successfully made the basic aligned image, and now I want to tweak it.



Is it possible to change the color of the Alignment Object lines between paired 
atoms? For me, they display only in yellow. From what I have read online these 
lines are CGO objects with the color hardwired in upon creation, and so it 
can’t be changed in PyMol latter on. However, I haven’t been able to find a way 
to assign a color upon creation. Is there a way to assign a specific color?



Additionally, I have seen this type of image where the lines between the paired 
aligned atoms are two colors, with half of the line in one color (say blue) and 
the other half another color (say red) to better illustrate which protein is 
the origin of each end of the connecting line. I haven’t discovered a way to 
make these bi-colored lines in ALIGN. Any ideas?



I have tried the open source version 1.8.0, plus several earlier versions from 
various origins (all on Macs) with similar results.





Thanks much for any ideas.



Tim



Tim Umland, Ph.D.

Hauptman-Woodward Institute




--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311=/4140___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net

Re: [PyMOL] OBJECT argument in ALIGN command - color

2016-01-11 Thread Timothy Umland
Thomas and Carsten:

Thanks for the help!

Using the "color" command works fine, as Thomas noted. Trying to change the
paired atom line color using the "C" menu on the GUI does not work. Of
course I had been using the GUI.

Also good to know that the two-color gradient is not a feature.

Cheers,

Tim





On Mon, Jan 11, 2016 at 10:26 AM, Thomas Holder <
thomas.hol...@schrodinger.com> wrote:

> Hi Tim and Carsten,
>
> I wonder what exactly you have tried so far to change the color of the
> alignment object. In fact, the "color" command should do the job.
>
> Example:
> fetch 1oky 1t46, async=0
> align 1oky, 1t46, object=aln
> color blue, aln
>
> I don't think that two-color gradients were ever intended, and I don't
> remember which version of PyMOL created them. That might have been a bug.
>
> Cheers,
>   Thomas
>
> On 11 Jan 2016, at 09:19, Schubert, Carsten [JRDUS] 
> wrote:
>
> > Hi Tim,
> >
> > I ran into the same issue a while back as well. I gets complicated very
> quickly when you dive deeper into the subject. Your are right the colors of
> the CGO lines seem to be hardcoded. A  way to get around this is to extract
> the matching residues with cmd.get_raw_alignment(alignment_object). The
> result is a tuple of tuples of matching atoms as determined by the
> alignment algorithm. You could then take these atoms pairs and draw
> distance lines between them. These distance lines can be customized with
> color, linewidth, etc.
> >
> > It has been a while since I worked on this, but I believe that the
> assignment of pairs is a non-trivial issue and sometimes fraught with
> mismatches. So manual checking against a sequence alignment is always a
> good idea especially for rather unrelated proteins.
> >
> > I do have a script which can accomplish this, it is based on
> “colorbyrmsd.py”. However it is not ready for primetime, but I can share
> this with you if there is interest. Contact me offline to arrange something.
> >
> > Cheers,
> >
> > Carsten
> >
> > From: Timothy Umland [mailto:uml...@gmail.com]
> > Sent: Sunday, January 10, 2016 9:08 PM
> > To: pymol-users@lists.sourceforge.net
> > Subject: [PyMOL] OBJECT argument in ALIGN command - color
> >
> >
> >
> > Hi:
> >
> > I am trying to use the Alignment Objects (i.e., lines between the paired
> aligned atoms) created by using the OBJECT argument of the ALIGN command to
> illustrate domain movement between the superimposed ligand-bound and
> unbound forms of an enzyme.
> >
> > I successfully made the basic aligned image, and now I want to tweak it.
> >
> > Is it possible to change the color of the Alignment Object lines between
> paired atoms? For me, they display only in yellow. From what I have read
> online these lines are CGO objects with the color hardwired in upon
> creation, and so it can’t be changed in PyMol latter on. However, I haven’t
> been able to find a way to assign a color upon creation. Is there a way to
> assign a specific color?
> >
> > Additionally, I have seen this type of image where the lines between the
> paired aligned atoms are two colors, with half of the line in one color
> (say blue) and the other half another color (say red) to better illustrate
> which protein is the origin of each end of the connecting line. I haven’t
> discovered a way to make these bi-colored lines in ALIGN. Any ideas?
> >
> > I have tried the open source version 1.8.0, plus several earlier
> versions from various origins (all on Macs) with similar results.
> >
> >
> > Thanks much for any ideas.
> >
> > Tim
> >
> > Tim Umland, Ph.D.
> > Hauptman-Woodward Institute
>
> --
> Thomas Holder
> PyMOL Principal Developer
> Schrödinger, Inc.
>
>
>
--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311=/4140___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net

Re: [PyMOL] OBJECT argument in ALIGN command - color

2016-01-11 Thread Thomas Holder
Hi Tim and Carsten,

I wonder what exactly you have tried so far to change the color of the 
alignment object. In fact, the "color" command should do the job.

Example:
fetch 1oky 1t46, async=0
align 1oky, 1t46, object=aln
color blue, aln

I don't think that two-color gradients were ever intended, and I don't remember 
which version of PyMOL created them. That might have been a bug.

Cheers,
  Thomas

On 11 Jan 2016, at 09:19, Schubert, Carsten [JRDUS]  
wrote:

> Hi Tim,
>  
> I ran into the same issue a while back as well. I gets complicated very 
> quickly when you dive deeper into the subject. Your are right the colors of 
> the CGO lines seem to be hardcoded. A  way to get around this is to extract 
> the matching residues with cmd.get_raw_alignment(alignment_object). The 
> result is a tuple of tuples of matching atoms as determined by the alignment 
> algorithm. You could then take these atoms pairs and draw distance lines 
> between them. These distance lines can be customized with color, linewidth, 
> etc.
>  
> It has been a while since I worked on this, but I believe that the assignment 
> of pairs is a non-trivial issue and sometimes fraught with mismatches. So 
> manual checking against a sequence alignment is always a good idea especially 
> for rather unrelated proteins.
>  
> I do have a script which can accomplish this, it is based on 
> “colorbyrmsd.py”. However it is not ready for primetime, but I can share this 
> with you if there is interest. Contact me offline to arrange something.
>  
> Cheers,
>  
> Carsten
>  
> From: Timothy Umland [mailto:uml...@gmail.com] 
> Sent: Sunday, January 10, 2016 9:08 PM
> To: pymol-users@lists.sourceforge.net
> Subject: [PyMOL] OBJECT argument in ALIGN command - color
>  
> 
>  
> Hi:
>  
> I am trying to use the Alignment Objects (i.e., lines between the paired 
> aligned atoms) created by using the OBJECT argument of the ALIGN command to 
> illustrate domain movement between the superimposed ligand-bound and unbound 
> forms of an enzyme.
>  
> I successfully made the basic aligned image, and now I want to tweak it.
>  
> Is it possible to change the color of the Alignment Object lines between 
> paired atoms? For me, they display only in yellow. From what I have read 
> online these lines are CGO objects with the color hardwired in upon creation, 
> and so it can’t be changed in PyMol latter on. However, I haven’t been able 
> to find a way to assign a color upon creation. Is there a way to assign a 
> specific color?
>  
> Additionally, I have seen this type of image where the lines between the 
> paired aligned atoms are two colors, with half of the line in one color (say 
> blue) and the other half another color (say red) to better illustrate which 
> protein is the origin of each end of the connecting line. I haven’t 
> discovered a way to make these bi-colored lines in ALIGN. Any ideas?
>  
> I have tried the open source version 1.8.0, plus several earlier versions 
> from various origins (all on Macs) with similar results.
>  
>  
> Thanks much for any ideas.
>  
> Tim
>  
> Tim Umland, Ph.D.
> Hauptman-Woodward Institute

-- 
Thomas Holder
PyMOL Principal Developer
Schrödinger, Inc.


--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311=/4140
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net