[PyMOL] rendering missing segments

2014-09-27 Thread Seth Harris
Hi Thomas et al,

There was a recent question on the board about missing residues and the
possibility of reading SEQRES headers and PyMOL being able to show the
missing bits in the sequence view, perhaps with the amino acid letters
grayed out to distinguish the gap. I know the reply was "PyMOL doesn't
currently" do this, but it seemed to then end "full stop" rather than,
"...but it's a fantastic idea". I'd like to second the idea as a great
addition! When building structures or viewing and hitting gaps one always
has to shuffle off to find the sequence or jump back to see how big the gap
is and what type of residues are supposed to be in there. This would put it
right there integrated at one's fingertips.

This also reminds me of something I suggested to you, Thomas, that might
fit in here of having a "cartoon dash" rendering (at least for loops if not
helices and strands?) such that one could borrow a loop from a homologue or
build in a placeholder to provide visual continuity in a model while still
clearly indicating the disordered regions, but now in a 3D ray-traced
dashed line that follows the cartoon trajectory rather than the usual
penciled in job.

I know in building a new structure I don't often have any SEQRES header in
place, but if it offered advantages like this it would be easy enough to
install such.

Thanks,
Seth
--
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk___
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

[PyMOL] APBS plug in (2.1) with PyMOL v1.7

2014-01-22 Thread Seth Harris
Hi all,

I was trying to use the APBS plug in with PyMOL version 1.7 and I'm getting
this error with pymol generated files not being found in the tmp directory:

Could not find
/var/folders/ZV/ZV5Pv67hjYmI8-m0PQU0ElL-r0o/-Tmp-/pymol-generated.dx so
searching for
/var/folders/ZV/ZV5Pv67hjYmI8-m0PQU0ElL-r0o/-Tmp-/pymol-generated-PE0.dx
ObjectMapLoadDXFile-Error: Unable to open file!
ObjectMapLoadDXFile: Does
'/var/folders/ZV/ZV5Pv67hjYmI8-m0PQU0ElL-r0o/-Tmp-/pymol-generated-PE0.dx'
exist?

It is true that neither of these files exist there, though
pymol-generated.pqr, .in and .pdb are there.

I was attempting this with a PDB file that worked in earlier versions, so I
don't think the problem is with the input. Is it working for others?

Cheers,
Seth


Also, BTW, in the visualization GUI for several versions I've had
misbehaving buttons where some of the update field lines end up actually
controlling the isosurfaces and not doing what they are advertised to do.
--
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk___
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] Faster way to find polymer chains?

2011-01-23 Thread Seth Harris
Thanks Thomas and Tsjerk for pointing me back to the path...from my
quicksand and brambles where I knew I was off! Brilliant. Seems to be an
unfortunate habit I have in scripting where it's like "Why use a simple,
elegant one-liner when a mess of impenetrable hack-arounds would do?" I had
forgotten about those get_ commands.

Much appreciated!
-Seth



On Sun, Jan 23, 2011 at 5:58 AM, Thomas Holder <
spel...@users.sourceforge.net> wrote:

> Hi Seth,
>
> I think this one-liner will do the job for you:
>
> print cmd.get_chains('polymer')
>
> Cheers,
>  Thomas
>
> Seth Harris wrote, On 01/23/11 10:04:
>
>  Hi All,
>>
>> I am script-plowing through PDB files and extracting unique chain
>> identifiers only for "polymers" using PyMOL's polymer selection. Right now
>> my code is a kind of brute force thing like this:
>> 
>>
>>  cmd.create ("justpolys","polymer")
>>
>>  polymer_chains=[]
>>
>>  for a in cmd.index("justpolys"):
>>q_sel = "%s`%d"%a
>>#print q_sel+":",
>>cmd.iterate(q_sel, "stored.qry_info = (chain,resn,resi,name)")
>>#cmd.iterate_state(1,q_sel, "stored.qry_xyz = (x,y,z)")
>>#print
>> stored.qry_info[0],stored.qry_info[1],stored.qry_info[2],stored.qry_info[3]
>># Track any unique chains by adding to polymer_chains list if not
>> already there
>># first reformat to get rid of flanking ' marks
>>thischain=`stored.qry_info[0]`
>>thischain=thischain.replace("'","")
>>if thischain not in polymer_chains:
>>  polymer_chains.append(thischain)
>> 
>>
>> This works, but is quite slow as it iterates over every atom in every pdb
>> just to get out the chain so it is quite redundant.
>> Is there any way to iterate in a 'chain by chain' fashion? This q_sel
>> stuff is recycled from something Warren suggested for a different purpose
>> years ago, and I only have a loose idea of how that is interacting with the
>> cmd.index part. Maybe there's a way to get just the chain from the get-go
>> instead of all the individual atoms? Any reminders on that one or better
>> method suggestions?
>>
>> Thanks,
>> Seth
>>
>
--
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d___
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

[PyMOL] Faster way to find polymer chains?

2011-01-23 Thread Seth Harris
Hi All,

I am script-plowing through PDB files and extracting unique chain
identifiers only for "polymers" using PyMOL's polymer selection. Right now
my code is a kind of brute force thing like this:


  cmd.create ("justpolys","polymer")

  polymer_chains=[]

  for a in cmd.index("justpolys"):
q_sel = "%s`%d"%a
#print q_sel+":",
cmd.iterate(q_sel, "stored.qry_info = (chain,resn,resi,name)")
#cmd.iterate_state(1,q_sel, "stored.qry_xyz = (x,y,z)")
#print
stored.qry_info[0],stored.qry_info[1],stored.qry_info[2],stored.qry_info[3]
# Track any unique chains by adding to polymer_chains list if not
already there
# first reformat to get rid of flanking ' marks
thischain=`stored.qry_info[0]`
thischain=thischain.replace("'","")
if thischain not in polymer_chains:
  polymer_chains.append(thischain)


This works, but is quite slow as it iterates over every atom in every pdb
just to get out the chain so it is quite redundant.

Is there any way to iterate in a 'chain by chain' fashion? This q_sel stuff
is recycled from something Warren suggested for a different purpose years
ago, and I only have a loose idea of how that is interacting with the
cmd.index part. Maybe there's a way to get just the chain from the get-go
instead of all the individual atoms? Any reminders on that one or better
method suggestions?

Thanks,
Seth
--
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d___
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] small molecule geometry gets whacked in creating multi-state object

2010-11-12 Thread Seth Harris
Thanks Robert and Jason

Indeed, I have different small molecules as Robert surmised and subsequent
ones affect the connectivity of the earlier ones (and representations for
some reasons, colors and spheres, etc. become unpredictable) when using the
create command. I had noted that "discrete" flag for the load command, but
not having separate files from these aligned in the right spot is there
really nothing similar to do on the fly without saving out the newly aligned
(using the surrounding protein) and extracted ligand into its own pdb file
and loading that back in again with the discrete flag on? That will work,
but seemed a bit clunky!

Thanks again for the tips to that functional route!

Cheers,
Seth



"""
Hi Seth,

On Tue, 09 Nov 2010 22:54:59 -0500 Jason Vertrees
 wrote:

> Hi Seth,
>
> I haven't seen that (in this scenario).  Can you send me a few PDB
examples?
>
> Cheers,
>
> -- Jason
>
> On Mon, Nov 8, 2010 at 10:13 PM, Seth Harris  wrote:
> > Hi all,
> > I feel I should know this one. I have a program looping through
structures
> > and bringing each small molecule into a single multi-state object so I
can
> > tab through the states.
> > I do:
> > create all_lig, this_ligand, 1, 1
> > then go on to the next one:
> > create all_lig, next_ligand, 1, 2
> > and so on
> > however, the bonds get all messed up, presumably with atom names
> > confused? I tried issuing a "rebuild all_lig" in between adding but that
> > didn't seem to help. What am I missing?

It sounds like you are loading a set of *different* structures into the
multi-state object.  I don't think you can do this properly with the
"create" command.  I think the only way to do this and retain the correct
bonding information is to use the load command directly with the
"discrete=1"
option.

So, you need to do:

load this_ligand, all_lig, discrete=1
load next_ligand, all_lig, discrete=1

Cheers,
Rob

--
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor
Botterell Hall Rm 644
Department of Biochemistry, Queen's University,
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821Fax: 613-533-2497
--
Centralized Desktop Delivery: Dell and VMware Reference Architecture
Simplifying enterprise desktop deployment and management using
Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
client virtualization framework. Read more!
http://p.sf.net/sfu/dell-eql-dev2dev___
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

[PyMOL] small molecule geometry gets whacked in creating multi-state object. rebuild?

2010-11-08 Thread Seth Harris
Hi all,

I feel I should know this one. I have a program looping through structures
and bringing each small molecule into a single multi-state object so I can
tab through the states.

I do:
create all_lig, this_ligand, 1, 1
then go on to the next one:
create all_lig, next_ligand, 1, 2
and so on

however, the bonds get all messed up, presumably with atom names confused? I
tried issuing a "rebuild all_lig" in between adding but that didn't seem to
help. What am I missing?

Thanks,
Seth
--
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a 
Billion" shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev___
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] Rendering in parts

2009-10-24 Thread Seth Harris
Hi Tsjerk,
Ok, yes, I see your point now. I was unaware of the memory aspects not being
helped by the rendering in parts, so I did not catch the deliberate
redirection you had done! However, Tom's method would be able to avoid the
too large memory issue since if the viewport only 'saw' one little piece at
a time and worked on that independently of the rest of the scene
(essentially unaware if there is one more tile or a hundred more...) But
there are the multiple perspective limitations, etc.
Thanks for clarifying the 'under the hood' part for me and sorry to have
then added my own assumptions to the mix!! (as I worried about in my last
paragraph!)
-Seth

On Sat, Oct 24, 2009 at 2:41 AM, Tsjerk Wassenaar  wrote:

> Hi Seth,
>
> Rendering in parts does not avoid taking the whole scene in memory.
> That is a more important obstacle than the size of the image. That is
> why Warren suggested using the hash_max setting, which will alleviate
> the memory dependence of the ray tracing, avoiding crashing. The
> raytracing in parts that POV ray offers is not about saving memory; a
> scene that is too complex to load will still break. It's about CPU
> efficiency: you can distribute the calculation over multiple CPUs.
> This was particularly important for POV Ray versions <= 3.6 (3.7 will
> be able to use multiple CPUs). Also, there's nothing mathematically
> tricky about what POV Ray does for partial ray tracing: it only traces
> the rays that belong to pixels you want to have rendered. E.g. it will
> write a 9000x6000 pixel image (according to the header), but only have
> part of the image filled in.
>
> Maybe you can see that I wasn't so much missing the point, or maybe
> was deliberately trying to miss it, since it builds on misconception
> of what is under the hood. If you want to connect withe the
> capabilities that POV ray offers in that regard, which may have some
> merits, you may want to suggest Warren to implement partial
> renderings, adding startrow, endrow, startcolumn and endcolumn to the
> ray command. That might be handy when using pymol for raytracing
> scriptwise on a cluster. But you'll be disappointed if you expect it
> will keep your scene from crashing Pymol (but then there's the
> hash_setting...).
>
> I hope this clarifies things a bit.
>
> Cheers,
>
> Tsjerk
>
> On Sat, Oct 24, 2009 at 8:21 AM, Seth Harris  wrote:
> > Tsjerk,
> > I think you are missing the point of Tom's post, which was a suggestion
> to
> > aid someone who's computer could NOT deliver the image in "as high a
> > rsolution as you want', so Tom was proposing a way to break the image
> down
> > into bite-size chunks that the computer COULD then handle. So the
> suggestion
> > was to take one scene desired at 9000x6000 which would make the computer
> > crash and instead mathematically figure the necessary transpositions to
> > render it in tiles such as upper left quadrant, upper right, etc. each at
> > 4500x3000 or whatever the computer could handle (and then you could put
> them
> > all back together in photoshop, e.g.). So for someone with deep coding
> > skills they could likely teach pymol to ray just the segments they wanted
> > and deal with the overall perspective of the whole scene, but for a hack
> > like myself I'd likely start the work around of trying to figure out the
> > camera position and where I'd have to put it to get just a quarter of the
> > scene at a time in the viewport (or an eighth, or whatever). As Warren
> said,
> > you'd likely have to set orthoscopic to get rid of the perspective for
> > starters (at least in the hack approach, but there would be more direct
> > better ways for the skilled).
> >
> > As a side point, Povray (if I remember correctly)  in fact allows you to
> > break a large rendering job up into tiles pretty much just like Tom
> > suggests, so not so crazy of an idea! I think in that case you can
> specify
> > starting and ending x,y pixel coordinates from your large scene. But not
> in
> > Pymol as far as I know.
> >
> > Sorry if I've now gone stepping in and misinterpreting someone's points
> > myself, but it seemed like there was a lot of cross-purpose talk either
> from
> > assumptions or extra politeness!
> >
> > -Seth
> >>
> >> > The requested size is 20" by 30". I calculated that it would
> >> > correspond
> >> > to a 6000 x 9000 pixel image.
> >> > How can I create such a large ray traced image without crashing the
> >> > computer?
> >>
> >>
> >> Message: 2
> >> D

Re: [PyMOL] PyMOL-users Digest, Vol 41, Issue 8

2009-10-23 Thread Seth Harris
Tsjerk,
I think you are missing the point of Tom's post, which was a suggestion to
aid someone who's computer could NOT deliver the image in "as high a
rsolution as you want', so Tom was proposing a way to break the image down
into bite-size chunks that the computer COULD then handle. So the suggestion
was to take one scene desired at 9000x6000 which would make the computer
crash and instead mathematically figure the necessary transpositions to
render it in tiles such as upper left quadrant, upper right, etc. each at
4500x3000 or whatever the computer could handle (and then you could put them
all back together in photoshop, e.g.). So for someone with deep coding
skills they could likely teach pymol to ray just the segments they wanted
and deal with the overall perspective of the whole scene, but for a hack
like myself I'd likely start the work around of trying to figure out the
camera position and where I'd have to put it to get just a quarter of the
scene at a time in the viewport (or an eighth, or whatever). As Warren said,
you'd likely have to set orthoscopic to get rid of the perspective for
starters (at least in the hack approach, but there would be more direct
better ways for the skilled).

As a side point, Povray (if I remember correctly)  in fact allows you to
break a large rendering job up into tiles pretty much just like Tom
suggests, so not so crazy of an idea! I think in that case you can specify
starting and ending x,y pixel coordinates from your large scene. But not in
Pymol as far as I know.

Sorry if I've now gone stepping in and misinterpreting someone's points
myself, but it seemed like there was a lot of cross-purpose talk either from
assumptions or extra politeness!

-Seth

> > The requested size is 20" by 30". I calculated that it would
> > correspond
> > to a 6000 x 9000 pixel image.
> > How can I create such a large ray traced image without crashing the
> > computer?
>
>
> Message: 2
> Date: Fri, 23 Oct 2009 11:27:47 +0200
> From: Tsjerk Wassenaar 
> Subject: Re: [PyMOL] Saving high resolution images
> To: Thomas Stout 
> Cc: pymol-users@lists.sourceforge.net
> Message-ID:
><8ff898150910230227k12719cedv8656233c7e67d...@mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Hi Thomas,
>
> You can also zoom out to get everything in view. You can also change
> the field of view. And then you can ray just the way you want, based
> on what you have in sight, in as high a resolution you want.
>
> Cheers,
>
> Tsjerk
>
> On Thu, Oct 22, 2009 at 9:35 PM, Thomas Stout  wrote:
> >
> > But isn't it true that only the objects that are visible in the viewport
> are what are written to the rendered image file? ?I was proposing rendering
> a poster-sized image in "tiles" and stitching them back together post facto
> to create a very large, high resolution image.
> >
> > something like:
> > ---
> > | ? ? ? ? ?| ? ? ? ? ?|
> > | ? ? ? ? ?| ? ? ? ? ?|
> > | render 1 | render 2 |
> > | ? ? ? ? ?| ? ? ? ? ?|
> > | ? ? ? ? ?| ? ? ? ? ?|
> > |--
> > | ? ? ? ? ?| ? ? ? ? ?|
> > | ? ? ? ? ?| ? ? ? ? ?|
> > | render 3 | render 4 |
> > | ? ? ? ? ?| ? ? ? ? ?|
> > | ? ? ? ? ?| ? ? ? ? ?|
> > ---
> >
> > I feel like I'm missing something important here!
> > -Tom
> >
> > -Original Message-
> > From: Tsjerk Wassenaar [mailto:tsje...@gmail.com]
> > Sent: Thursday, October 22, 2009 11:45 AM
> > To: Thomas Stout
> > Cc: pymol-users@lists.sourceforge.net
> > Subject: Re: [PyMOL] Saving high resolution images
> >
> > Hi Thomas,
> >
> > The viewport is not important for rendering. You can render at whatever
> resolution/dimensions you want with whatever viewport. You can even make a
> panorama using a wide angle lens if you want to have something for on your
> wall ;)
> >
> > Cheers,
> >
> > Tsjerk
> >
> > On Wed, Oct 21, 2009 at 11:43 PM, Thomas Stout 
> wrote:
> >>
> >>
> >> Here's a crazy idea: ?if someone out there were clever at both python
> >> and manipulating orientation matrices, I would bet that a "scene"
> >> could be quartered or cut into eighths and "translated" such that each
> >> portion filled the viewport for rendering; then the individual images
> >> could be spliced back together in one's favorite image handling
> >> program a la panoramas in photography ?Is this way too complex to
> >> be bothered with? ?I suspect parallax may be a problem...
> >>
> >> -Tom
> >>
> >>
> >>
> >> -Original Message-
> >> From: Eva Vanamee [mailto:eva.vana...@mssm.edu]
> >> Sent: Monday, October 19, 2009 1:51 PM
> >> To: pymol-users@lists.sourceforge.net
> >> Subject: [PyMOL] Saving high resolution images
> >>
> >> Hi,
> >>
> >> I'd like to save an image in high resolution for a poster.
> >> The requested size is 20" by 30". I calculated that it would
> >> correspond to a 6000 x 9000 pixel image.
> >> How can I create such a large ray traced image without crashing the
> >> computer?
> >> Many thanks in advance for the help.

Re: [PyMOL] y axis rock and mplay frame rate

2008-12-01 Thread Seth Harris
"Perfect!" he said, fetching the dramamine.

For me:
set sweep_angle, 50
set sweep_speed, 5
set movie_fps, 1

Now to hook up the voice activated "add water!!!" or "change rotamer!!!"
shriek commands to catch it in the split second before the next appears...

The few interested parties may also want to bind movie start and stop to
function keys as you once explained in the past:
cmd.set_key("F11", lambda:cmd.mplay())
cmd.set_key("F12", lambda:cmd.mstop())

Thanks, Warren.

Seth


On Mon, Dec 1, 2008 at 3:39 PM, DeLano Scientific wrote:

>  Seth,
>
> set sweep_speed, 3.5
>
> set movie_fps, 3
>
> Cheers,
> Warren
>
> --
> DeLano Scientific LLC
> Subscriber Support Services
> mailto:supp...@delsci.com 
>  --
> *From:* Seth Harris [mailto:set...@gmail.com]
> *Sent:* Monday, December 01, 2008 2:18 PM
> *To:* pymol-users@lists.sourceforge.net
> *Subject:* [PyMOL] y axis rock and mplay frame rate
>
> Is there a way to modulate the speed and amplitude of the y-axis rocking
> that is enabled through the "rock" command and button? I am capable of
> scripting my own rocking movie, of course, but in the current usage the
> frames are already dedicated to visiting electron density map peaks and I
> don't want to overwrite those. Hence the perfect fit for the independent
> rock mechanism. Slow and gentle is good for presentations, but I'd like
> something more vigorous for rapid peak examination.
>
> While I'm at it, if I play back the frames as if a movie they whip by quite
> rapidly. Is there a way to control in essence the frame rate of the playback
> within pymol? Put in some kind of pause/sleep thing? (note having each
> single frame persist for multiple frames defeats the purpose here).
>
> And yes, I have a script as well that goes to each peak, does a little back
> and forth dance and goes to the next, but then the cursor keys can't be used
> to quickly jump ahead or back several peaks since they too have to step
> through all the frames of the dance.
>
> Hope that's clear!
> Thanks,
> Seth
>


[PyMOL] y axis rock and mplay frame rate

2008-12-01 Thread Seth Harris
Is there a way to modulate the speed and amplitude of the y-axis rocking
that is enabled through the "rock" command and button? I am capable of
scripting my own rocking movie, of course, but in the current usage the
frames are already dedicated to visiting electron density map peaks and I
don't want to overwrite those. Hence the perfect fit for the independent
rock mechanism. Slow and gentle is good for presentations, but I'd like
something more vigorous for rapid peak examination.

While I'm at it, if I play back the frames as if a movie they whip by quite
rapidly. Is there a way to control in essence the frame rate of the playback
within pymol? Put in some kind of pause/sleep thing? (note having each
single frame persist for multiple frames defeats the purpose here).

And yes, I have a script as well that goes to each peak, does a little back
and forth dance and goes to the next, but then the cursor keys can't be used
to quickly jump ahead or back several peaks since they too have to step
through all the frames of the dance.

Hope that's clear!
Thanks,
Seth


[PyMOL] place atom at coordinates/screen center?

2007-10-04 Thread Seth Harris
I feel like I should already know this one, but is there a command line way
to add an atom at specified coordinates? or at screen center? I thought
there was a new-ish pseudoatom functionality but I can't seem to find or
recall details. Can one specificy atom type as well?

I was looking to annotate a structure with some graphic landmarks. I've used
CGO spheres, etc. in the past but they aren't easily recolored and such
interactively after the fact so I'd prefer using dummy atoms of some sort.

Thanks,
Seth


[PyMOL] setting for 2 button mouse view mode

2006-05-31 Thread Seth Harris

Hi all,

we have a user with a 2 button mouse who would like pymol to start up that
way (i.e. without having to go to the mouse menu and select 2 button viewing
mode every time he starts). I had a look around for a setting we could put
into his pymolrc file, but the only things with promising names didn't have
the desired effect. For instance, "button_mode_name" allows you to change
the text shown on the screen for the mouse mode, but doesn't actually change
the mouse behavior to match the text. Also, changing "mouse_selection_mode"
didn't seem to do the trick. Any ideas on settings we may have overlooked or
improperly implemented?

Thanks,
Seth


[PyMOL] RE: povray image mapping and default pigments

2006-04-18 Thread Seth Harris
To answer my own question...instead of entirely taking out the pigment{blah
blah blah} statements from the texture_lists in the povray input as used to
work, I found that in this case replacing them with "pigment {}" statements
was still a permissible syntax and also allowed a #default pigment
declaration in the header file to override the molecular scene descriptions.

If you have no idea what I'm talking about, it's probably for the best.

Funny how often just describing your problem to someone else allows you to
lay it out logically enough to lead you to a solution...thanks for
listening!

-Seth

-- Forwarded message ------
From: Seth Harris 
Date: Apr 18, 2006 2:18 PM
Subject: povray image mapping and default pigments
To: pymol-users@lists.sourceforge.net


 This is for the povray gurus out there...

Occasionally I muck around with the time-consuming practice of trying to map
pictures onto molecular surfaces with povray.

I had this working to some extent, but something has changed (I think with
the povray file format produced by pymol & make_pov where now there are
fancy texture_list texture and pigment statements, rather than simple
"pigment" ones.)

In the past, I set it up so that the povray file has a header (cameras,
lights, etc.) separate from the molecular scene description. Then I would
usually edit the header to apply some #default texture or pigment to use the
povray parlance. So the approach I used to use was to strip out all the
pigment {} statements from the molecular scene descriptor povray input with
a perl script, and then use the #default pigment {image_map{ "
mypicturehere.gif" }} syntax in the header to map the image on to the
surface...the practical uses of having a picture of someone, say,
snowboarding down a mountain mapped onto the surface of some kinase are just
endless. But that aside, the problem now is that these newer texture_list
statements aren't so amenable to this global pigment removal thing, and I
haven't quite figured out how best to get around this. (Couldn't remove them
entirely and putting in the image_map pigment thing didn't seem to work,
although maybe I just didn't get the right combination of open and closed
brackets {?}}})

Anyone have any experiences along these lines? As near as I can tell, there
was some switch in smooth triangle definitions with Povray 3.5 which was
capitalized on by some pymol 0.98 edition. Perhaps I have to go back to an
old archived version of pymol? Or, more sensibly, perhaps I should recognize
that pictures of easter bunnies or whatever don't belong on some
wood-textured rendition of a half-submerged albumin, glowing softly in the
warm light(s) of a double sunset over an infinite lake lapping at the shores
of a checkered beach. But for some reason journal editors seem to enjoy
this.

Thanks,
 Seth


[PyMOL] povray image mapping and default pigments

2006-04-18 Thread Seth Harris
This is for the povray gurus out there...

Occasionally I muck around with the time-consuming practice of trying to map
pictures onto molecular surfaces with povray.

I had this working to some extent, but something has changed (I think with
the povray file format produced by pymol & make_pov where now there are
fancy texture_list texture and pigment statements, rather than simple
"pigment" ones.)

In the past, I set it up so that the povray file has a header (cameras,
lights, etc.) separate from the molecular scene description. Then I would
usually edit the header to apply some #default texture or pigment to use the
povray parlance. So the approach I used to use was to strip out all the
pigment {} statements from the molecular scene descriptor povray input with
a perl script, and then use the #default pigment {image_map{ "
mypicturehere.gif" }} syntax in the header to map the image on to the
surface...the practical uses of having a picture of someone, say,
snowboarding down a mountain mapped onto the surface of some kinase are just
endless. But that aside, the problem now is that these newer texture_list
statements aren't so amenable to this global pigment removal thing, and I
haven't quite figured out how best to get around this. (Couldn't remove them
entirely and putting in the image_map pigment thing didn't seem to work,
although maybe I just didn't get the right combination of open and closed
brackets {?}}})

Anyone have any experiences along these lines? As near as I can tell, there
was some switch in smooth triangle definitions with Povray 3.5 which was
capitalized on by some pymol 0.98 edition. Perhaps I have to go back to an
old archived version of pymol? Or, more sensibly, perhaps I should recognize
that pictures of easter bunnies or whatever don't belong on some
wood-textured rendition of a half-submerged albumin, glowing softly in the
warm light(s) of a double sunset over an infinite lake lapping at the shores
of a checkered beach. But for some reason journal editors seem to enjoy
this.

Thanks,
Seth


[PyMOL] RE: filter for edit settings window

2006-04-18 Thread Seth Harris
Hi Michelle,

In case no one's mentioned it yet, Zac Panepucci has contributed a
grepset.py script which, after being run, allows you to type "grepset x"
to see all settings (and their values) associated with whatever x is.
It's not directly integrated into the pymol distribution but pretty tidily
achieves what you describe. More info and the script itself is on the wiki:

http://www.pymolwiki.org/index.php/Grepset


Cheers,
Seth (on behalf of Zac and his useful scripts)


[PyMOL] RE:Ray-tracing inner surface backside

2006-04-06 Thread Seth Harris
Paul (& Bob),

Have you tried

set two_sided_lighting, 1

Cheers,
seth


[PyMOL] RE: labels not displaying

2006-04-06 Thread Seth Harris
Marilyn,
We saw this between unix and PC and one user figured out that
label_font_id's were different. Thus older versions didn't recognize as many
fonts as newer ones. I'm thinking this matches your description if the
binaries on the two machines are in fact different versions.

Try:

set label_font_id, 1
and the missing labels should show up.

There are other fonts... 2, 3, 4, 5, etc.?
I don't know how high they go, but I think by #5 labels will vanish in some
older versions but still display in newer ones.

-Seth


[PyMOL] documentation vs features

2006-04-04 Thread Seth Harris
Just to pipe up for the other side, while I would by no means defend the
lack of documentation as a good thing, given limited resources I actually
prefer new features at the expense of documentation. I realize there is a
large range of computer expertise in the pymol user community, and obviously
there are many who prefer more documentation, but even with an occasional
frustration of not finding something I need, I personally am pretty happy
with the users list archive, the wiki, and the "help" command within pymol.
And at "worst" (i.e. least immediate), I've found that this list gives
pretty helpful and rapid responses.
So without knowing anything of the timetable for development, I'd suggest
the lack of a full up-to-date manual is excusable (or at least not grounds
for removal of support) at least in the drive to version 1.0 or some similar
landmark release.

To reiterate, I'm not trying to force this view on anyone, just provide some
representation for the alternate (possibly minority) enjoyment of exciting
and useful new features that take a bit more effort to learn to use given
the lack of documentation...and therefore encourage us to help each other
out in the meantime.

Also motivated to speak up since my last message appeared a catalyst for the
documentation requests...and that being said, I too would like to request
more documentation! (...at some point when it fits in).

Cheers,
Seth
(


[PyMOL] RE: Angstrom-squared values for solvent/protein contact surface per residue

2006-04-03 Thread Seth Harris
Just to throw my 2 cents in following Warren's invitation, I think
Mark Gerstein's programs work well for this (calcsurf.exe or
something...they're on his web site)
ccp4's areaimol does something similar, though I can't recall whether
its output was atom by atom.
In either case, you may have to add up the component atom parts if you
want residue by residue.

Despite Warren's comment, I think last time I was doing this Pymol's
results compared well with the above methods, but that was for large
areas of a protein interface
and perhaps if you want very fine residue level resolution you'd heed
his caveat. I though, which is reiterated in the notes accompanying a
former post of his...

-Seth

if I may quote Warren:

For a solvent accessible PSA approximation:

 set dot_density, 3
 remove hydro
 remove solvent
 show dots
 set dot_solvent, on
 get_area elem N+O
 get_area elem C+S
 get_area all

 For molecular PSA approximation

 set dot_density, 3
 remove hydro
 remove solvent
 set dot_solvent, off
 get_area elem N+O
 get_area elem C+S
 get_area all

 Showing dots isn"t mandatory, but it"s a good idea to confirm that you"re
 getting the value for the atom dot surface you think you"re using.

 Please realize that the resulting numbers are only approximate, reflecting
 the sum of partial surface areas for all the dots you see.  To increase
 accuracy, set dot_density to 4, but be prepared to wait...
  Cheers,
  Warren





---
Melanie,

At present, PyMOL isn't the right tool for this, but perhaps someone
on the mailing list will know what is...

Cheers,
Warren

--
Warren L. DeLano, Ph.D.
Principal Scientist

. DeLano Scientific LLC
. 400 Oyster Point Blvd., Suite 213
. South San Francisco, CA 94080 USA
. Biz:(650)-872-0942  Tech:(650)-872-0834
. Fax:(650)-872-0273  Cell:(650)-346-1154
. mailto:war...@delsci.com


> -Original Message-
> From: pymol-users-ad...@lists.sourceforge.net
> [mailto:pymol-users-ad...@lists.sourceforge.net] On Behalf Of
> Melanie Rogers
> Sent: Monday, April 03, 2006 10:36 AM
> To: pymol-users@lists.sourceforge.net
> Subject: [PyMOL] Angstrom-squared values for solvent/protein
> contact surface per residue
>
> Dear Pymol Users,
>
> Is it possible to extract numerical values, (i.e. Angstrom-squared per
> residue)
> for the solvent/protein contact surface for individual
> residues in a crystal structure using Pymol?
>
> Thank you,
>
> Melanie Rogers
> University of Leeds
>
>


[PyMOL] RE: making a movie from saved scenes

2006-04-03 Thread Seth Harris
Hi Sun,

Warren (and others?) has posted some text before about this. A simple
template for it is as follows with the key being that mview interpolate
command at the end. This works, but I haven't been through it recently to
remind myself of the nuances of the animate=0 options and the view=0 options
at their respective occurences, but if you play around with it I think
you'll find it a treat.  Don't forget that the mset 1 x180 should be
replaced by however many total frames you want in the movie, and repeat the
little blocks for however many scenes you have. If you don't mind equal
sized steps between scenes you can automate the whole thing in a little
python loop for X number of scenes. Also replace 001, 002, etc. with
whatever your scenes are stored as. Use the mview store, YY to pinpoint at
which frame you want that scene to be set.

mset 1 x180
scene 001, animate=0
mview store, 1
scene 002, animate=0
mview store, 60
mview interpolate
mdo 1: scene 001, view=0
mdo 2: scene 002, view=0

There are other non-scene based movie mechanisms that allow fancier fades
and things, but this way is certainly much easier to work with.

-Seth


[PyMOL] label positions, centered, left, or right

2006-02-23 Thread Seth Harris
Hi all,

Minor thing, but thought I'd ask...

Labels now appear to be centered on whatever atom they are labeling.
Previously, the left-hand side of the label was on the atom (left-anchored).
Is there a way to choose whether the label is left-anchored, centered, or
right-anchored?

I find that it's hard to offset the label sufficiently with commands like:

label myprot and name ca, "%s%s" % (resn,resi)

which used to get the label to float nicely just to the right of the atom.
Now that the label is centered the spaces don't help push the labels over as
much as they used to, and the obvious route of adding twice as many spaces
somehow isn't getting me there. I thought there might be an anchor, align,
or justification flag on the labels.

I did also notice that in editing mode you can drag the labels to whatever
position you wanted in recent betas.  Very nice!

Cheers,
Seth


[PyMOL] Re: PyMOL-users digest, Vol 1 #1103 - 3 msgs

2006-01-11 Thread Seth Harris
Some options were posted along these lines but you have to know what to look
for since they are under titles like EM-izing your structure.

You can try:
set surface_quality, -3
(I think that's as low as you can go, more negative doesn't get any
blobbier).

And a bit less simple but I think you'll prefer the option quoted below from
Warren's email reply to that EM-izing question, since you are after "super
smooth" not just "smooth" (I found setting the gaussian_resolution to 13 or
so to be in the "super" realm and don't forget to add a fourth argument to
the map_new bit if you want that as mentioned below):

Quote:::
 alter all, b=10

 map_new can take a selection as its fourth argument, so you could
 generate an independent map for each subunit, show the surface, and
 color it independently.  It's also possible to color a surface by atomic
 proximity, but the approach is a bit convoluted:

 load some.pdb, prot
 util.cbc prot
 alter prot,b=10
 set gaussian_resolution, 9.0
 map_new dcalc, gaussian, 3.0
 map_double dcalc
 isosurface dsurf, dcalc, 1.0, prot


End Quote

Hope that's what you're after.
-Seth


> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of PyMOL-users digest..."
>3. Super-smooth surfaces (Stephen Graham)
> _
> Message: 3
> Date: Wed, 11 Jan 2006 22:22:15 +
> From: Stephen Graham 
> To: pymol-users@lists.sourceforge.net
> Subject: [PyMOL] Super-smooth surfaces
>
> Hi there,
>
> I am making a figure in which I would like an extremely smooth
> molecular surface (I just want the protein as a blob with little to no
> definition of surface features).
>
> I tried setting the probe radius to a larger value:
> set solvent_radius, 8
> but this gives rise to ugly artefacts on the surface ('triangles' of
> surface seem to be missing).  There seems to be a whole raft of
> different settings for fine-tuning surfaces (surface_carve_*,
> surface_trim_*, etc) but I am afraid I do not know what they do and
> have been unable to find documentation on them.
>
> How can I make a surface happy (fully connected) after having set the
> probe radius way up?
>
> Thanks,
>
> Stephen
>
> --
> Stephen Graham
> Crystallography Group
> School of Molecular and Microbial Biosciences
> University of Sydney
>
>
> End of PyMOL-users Digest
>


[PyMOL] Re: New spectral color pallette

2005-12-31 Thread Seth Harris
This is more half an answer than the real deal, but when I had the same
issue I opted for the quick work around of setting the range from -100 to
100 for the blue-white-red palette which effectively made 0-100 correspond
to white to red only since there were no negative B factors/conservation
scores.
e.g.
spectrum b, blue_white_red, minimum=-100, maximum=100

I am curious for better answers, as you are, but haven't delved into the
code to look for it myself, either. But perhaps this or some fine tuning of
the range or other pre-defined palettes will get done what you desire.

Cheers,
Seth



> Message: 1
> From: alexander.paut...@bc.boehringer-ingelheim.com
> To: pymol-users@lists.sourceforge.net
> Date: Fri, 30 Dec 2005 10:24:10 +0100
> Subject: [PyMOL] new spectral color palette
>
> This message is in MIME format. Since your mail reader does not understand
> this format, some or all of this message may not be legible.
>
> --_=_NextPart_001_01C60D22.CA0F1A47
> Content-Type: text/plain
> Content-Transfer-Encoding: 7bit
>
> Hi
>
> I would like to color my protein according to B-factor with a self-defined
> spectral palette (In this case I have put sequence conservation into the
> Bfactor this column). I found that
> spectrum b, blue_white_red, minimum=0, maximum=100
> would do part of the job with a predefined pallette
>
> - I could not find out how to define my own new color palette like
> "white_red".
> - Is there a way to "visualize" the color palettes before applying it to
> an
> object?
>
> Thanks for any help.
>
> alex
>
>
>
> >  Dr. Alexander Pautsch
> >  Protein Crystallography /Structural Research
> >  Boehringer Ingelheim Pharma GmbH & Co. KG Deutschland
> >  Birkendorferstrasse 65
> >  88400 BIBERACH, Germany
> >  tel. +49 - (0)7351 - 54 4683
> >  fax. +49 - (0)7351 - 83 4683
> >  email alexander.paut...@bc.boehringer-ingelheim.com
> >
> >
> >
>
>
>


Re: [PyMOL] label alternate conformations

2005-12-07 Thread Seth Harris
Hi Bob,
Good to hear from you.

I didn't know about "alt" as a selection, so in the end that gave the
answer... Your example, which I find quite clever, didn't exactly match my
goal, though, so just to clarify:  Rather than distinguishing residues with
alternate conformations from those "normal" ones without, I wanted to have
the labels distinguish alternate conformer A from B and so on within a given
residue. Since there was this backtick A or B at the end of the atom name in
the right-click drop down menu I expected it would be somehow accessible via
command line in the label command. But "name" didn't do it. But of course,
using your "alt" selection I could do:
label alt a, "A"
label alt b, "B"
or indeed color all B conformations pink with:
color pink, alt b

And after realizing this, I just tried:

label myprotein, alt

which by its simplicity is obviously something I might have tried earlier.
Elegantly, as most residues don't have any "alt" conformation, it has the
nice side effect that labels only show up for those with alternate
conformations as well!

Thanks for the tip!
Seth

(By the way, neither the pymol help nor the wiki include "alt" as "symbols
defined in the name space" which currently includes things like "name, resn,
resi, b, q, segi, type, formal_charge, partial_charge, numeric_type,
text_type).  I guess that means I should learn to wiki it up.

On 12/7/05, Robert Immormino  wrote:
>
> This series of commands seems to do the job although a little sloppy.
>
> label alt a+"", "A%s-%s" % (resn, resi)
> label alt b+"", "B%s-%s" % (resn, resi)
> hide labels, alt ""
>
> Cheers,
>
> -bob
>
> On 12/7/05, Seth Harris  wrote:
> >
> > Hi,
> >
> > I'm writing a small script to visit alternate conformations, stepping
> > through each as a frame in a movie with the cursor keys. I'd like to label
> > them to distinguish the alternates so I can see which I'd like to keep or
> > not, but:
> >
> > label alternates, name
> >
> > only displays the atom name without the pertinent `A or `B that the
> > right mouse click menu includes.
> >
> > Is there a way to show this information with the label command or other
> > means?
> >
> > Thanks,
> > Seth
> >
> > p.s. Those extra "3D" and other superfluous characters show up for me as
> > well receiving the pymol list as a digest on gmail based web. I don't know
> > if it's a result of the "digestion" process, but it seems like "=" signs and
> > other non-alpha characters are associated with these burps of indigestion,
> > invariably followed by 2D or 3D or such. I've kind of learned to ignore
> > them, but obviously they can cause some confusion and are at least minorly
> > amusing when they reappear like some "who's on first" miscommunication as
> > warren's advice mention there should be no "3D" just the number "10" like
> > this, and then it proceeded to again display the 3D!! Perhaps the Digest is
> > the culprit and could be treated? It also displays HTML as full text with
> > tags and all that garbage, by the way.
> >
> > >>>quote:
> > """I'm not sure where that "3D10" is coming from -- it should simply be
> > the
> > number 10:
> >
> > alter all, b=3D10
> > """
> > (!)
> > map_new can take a selection as its fourth argument, so you could
> >
>
>


[PyMOL] label alternate conformations

2005-12-07 Thread Seth Harris
Hi,

I'm writing a small script to visit alternate conformations, stepping
through each as a frame in a movie with the cursor keys. I'd like to label
them to distinguish the alternates so I can see which I'd like to keep or
not, but:

label alternates, name

only displays the atom name without the pertinent `A or `B that the right
mouse click menu includes.

Is there a way to show this information with the label command or other
means?

Thanks,
Seth

p.s. Those extra "3D" and other superfluous characters show up for me as
well receiving the pymol list as a digest on gmail based web. I don't know
if it's a result of the "digestion" process, but it seems like "=" signs and
other non-alpha characters are associated with these burps of indigestion,
invariably followed by 2D or 3D or such. I've kind of learned to ignore
them, but obviously they can cause some confusion and are at least minorly
amusing when they reappear like some "who's on first" miscommunication as
warren's advice mention there should be no "3D" just the number "10" like
this, and then it proceeded to again display the 3D!! Perhaps the Digest is
the culprit and could be treated? It also displays HTML as full text with
tags and all that garbage, by the way.

>>>quote:
"""I'm not sure where that "3D10" is coming from -- it should simply be the
number 10:

alter all, b=3D10
"""
(!)
map_new can take a selection as its fourth argument, so you could


[PyMOL] small molecule bond valences, revisited

2005-08-22 Thread Seth Harris
Hi all (again!),

Warren, I know I half brought this up at the user's meeting but I
can't remember if there was a clear answer...so maybe it means not
yet, but didn't recall that either.

Question: is there a way to preserve small molecule bond valence information?

Background: I know pymol has some recognition of bond valences for
standard amino acids, as set valence=1 or starting the "builder"
button shows proper valences for backbone carbonyls and aromatic side
chains, etc. Also, I can edit a small molecule to get the correct
valence (Ctrl-right click to select bond and Ctrl-W to cycle valence
to reiterate one of Warren's older posts). If I then add Hydrogens
these look correct and I can save the pdb file of the ligand. 
Reloading the pdb with hydrogens is fine, but if I remove the
hydrogens and re-add them, they are regenerated as if all bonds are
single bonds indicating it has not preserved the valence info.

Is this part of what you aim to incorporate as increased information
loading and storage in sd files? Is this an accurate description of
current behavior (i.e need to edit bonds each time we want to make a
figure of a ligand that way?) or is there some save flag that can
store it once edited?  If simple, perhaps that would be nice for 1.0!

THanks,
Seth



[PyMOL] cursor arrows for rotamers vs movies

2005-08-22 Thread Seth Harris
Hi Warren et al.,

Thanks very much, Warren, for the rotamer libraries and mutagenesis wizard.

I am very attached to cycling through rotamers using the cursor arrow
keys. However if I have a movie set up, it takes precedence of the
cursor key bindings, and right arrow steps through movie frames
leaving behind my rotamer building project!  If I delete the movie,
the cursor keys cycle the rotamers once again.

Any work around or key binding I could do to change this?  It's a bit
tricky since I usually use the movie frames to jump between places
where I want to build rotamers, so it would be a bit cumbersome to
delete the movie and reload it each step.

Cheers,
Seth



[PyMOL] re: Movie (one more)

2005-03-09 Thread Seth Harris

Hi,
I get these as a digest so sorry if someone's already 
spoken to this.


Laurence Pearl wrote some code to interpolate between 
scenes as you describe.  Kristian Rother wrote a very nice 
set of framework commands (and more) to make movies.  I 
wrote an extension of Laurence's commands so that they 
would fit better with Kristian's commands, which I was 
(and am) using.  So...I had mailed this to the list some 
time back and it should be in the archives if you search 
for the "movie" or "MasterMovie".


But really, it should go on the wiki, of course, and I'll 
try to get some time to post the most recent one there 
soon.  I think some version of this also exists embedded 
in Kristian's rTools.


I also keep wondering if Warren is changing how the camera 
is moved in the vein of being able to do this more 
internally to PyMOL?


Cheers,
Seth



[PyMOL] low res surfaces, CRYST headers, rotamers

2004-12-21 Thread Seth Harris
Hi PyMOLarians (sorry, I've been reading Bush quotes and 
his tragic knack for inventive names for nationalities..)


Hope it's not terrible form to bundle questions:

Is there a way to have PyMOL save header information?  It 
would help, for instance, if the CRYST card were preserved 
after editing a pdb, building new residues, etc.


In terms of building, can someone remind me how to change 
rotamers on side chains?  I think I've seen you doing 
this, Warren, and also remember your warning that the 
rotamer libraries were not yet mature, accurate, or 
complete, but I'd still like to try it even as an 
exploratory measure.


Finally, a request/wish list thing for me would be the 
ability to make lower resolution molecular surfaces.  I've 
seen neat images usually based on EM maps, but recently 
realized that some people were making them from atomic PDB 
files.  They're very smoothed out blobs that serve well 
for  schematic style representations that still directly 
relate to the structure (as opposed to hand-drawn blobs or 
plain ovoids).  Also good for generating images of larger 
multimers like virus particles, etc I understand since 
these low res surfaces, being more featureless (less 
featuremore?), are computationally simpler to manipulate, 
yeah?  I think the Chimera program does this with some 
multiscale model module, but I haven't used that package. 
They also look great rendered with transparency.


Just thought I'd ask since I've seen several times before 
the happy surprise of Warren's replies that he has already 
included such features or they are imminently to be 
released.  I have briefly tried some work arounds by 
making maps or masks at low resolution and then smoothing 
them in Gerard Kleywegt's MAMA, but they seem to always 
have a stepped-edge pixelated look as opposed to the 
desired liquid smoothness.  And I don't think this was 
just a map grid fineness/coarseness issue, but if anyone 
has suggestions on this...?


Thanks,
Seth



[PyMOL] linux and multi-button mouse

2004-11-22 Thread Seth Harris

Yo,
I just wrote a really long email to the list.  So long 
that my web mail secretly logged me out during the time 
that I was writing it.  The upshot of this is that 1) I am 
angry and 2) you are all spared the rambling version and 
hopefully get the more succinct version summarized here:


I have RedHat Linux Enterprise 3 or somesuch.  I got a 
wireless multi-button mouse and RedHat's auto configure 
thing (kudzu) managed to get it working after a fashion. 
Middle click (i.e. clicking the scroll wheel), however, 
was very sluggish and I couldn't get it reliably work more 
than a dismal 1 in 10 tries.  Is this a problem for you? 
Then read on...(although maybe it's only me as I haven't 
heard a peep about it)...


I figured why not map one of the currently non-functioning 
side buttons so that it behaves like the middle button. 
Changed XF86Config file to treat the mouse as a 7-button 
mouse (see below).  The ZAxisMapping stuff is for the 
scroll wheel.


Identifier "Mouse1"
Driver "mouse"
Option "Protocol" "ExplorerPS/2"
Option "Device" "/dev/psaux"
Option "Emulate3Buttons" "no"
### To enable scrolling on a ps/2 or usb scroll
Option "ZAxisMapping" "6 7"

This resulted in all buttons being active, if not doing 
quite what I wanted yet (can run "xev" to check for mouse 
events).  That is, middle click was still on the scroll 
wheel, and the scroll wheel itself was showing unusual 
behavior in various applications.


Then found out about xmodmap which allows you to remap 
things.  The on-the-fly version goes something like:

xmodmap -e "pointer 1 6 3 7 2 4 5"
Since that worked for me I put the
pointer 1 6 3 7 2 4 5
line in my ~/.Xmodmap file.

Naturally the normal ordering of the pointer is 1 2 3 4 5 
6 7, corresponding I think to left, middle, right, side1, 
side2 buttons and scroll wheel up or down.  So by swapping 
position 2 to send function 6, I deactivate the middle 
scroll wheel button to do something else (whatever 6 is), 
and then position 5 (one of the side buttons) now sends 
function 2 (a middle click).  There was some other issue 
with the scroll wheel which necessitated shuffling around 
the 4 and 5 part, as well, but much to my amazement I now 
have a side button that is nice and responsive as a middle 
click, the scroll wheel still works both in pymol and 
other apps like web browsers, and serendipitously, the 
other side button is a double middle click so I can center 
with a single click...although this glory will be brief as 
it sounds like Warren is about to introduce that in the 
new changes (looking forward to it!)


I thought this might have some bearing on Charlie's 
question about mapping zoom functionality to scroll wheel 
instead of clipping planes, but this method will probably 
affect the mouse behaviour in all applications so maybe 
that's not a viable solution for him.  There is also 
imwheel which apparently allows you to map mouse clicks to 
other events/keystrokes in an application-dependent manner 
but I haven't tried it.


Wow, this is pretty long anyway.  Trust me, the other was 
longer.  Heck, maybe it even got sent even though I see no 
sign of it in which case you get double dosage...ouch!


By the way, this was with microsoft wireless desktop pro 
mouse (similar or same as explorer mouse?).  ImPS/2 is 
another XF86Config protocol you could try if this isn't 
working...


Last things were just mouse interface feedback for Warren, 
and to make those short...


1) Warren...I really like the mouse interface, basically 
one of the best I've ever used, the upcoming improvements 
seem just that...improvements.
2) Animation is slick, Dr. DeLano! Particularly helps in 
sharing structures as people currently get disoriented 
when I recenter if they aren't "driving".  Don't feel 
strongly if it's on or off by default, though, since I 
tend to set things up how I like them using start up 
scripts (e.g. auto_zoom off like Tom was mentioning)


-seth



[PyMOL] RE: wire mesh spheres?

2004-11-20 Thread Seth Harris
Continuing on the transparency aspects of the original 
question...
When I ray trace Warren's recent example of transparent 
CGO's, it seems that of the objects behind a given 
transparent one, only those that are fully opaque show 
through the front one.  That is, the spheres in the back 
get blocked from showing through if they themselves have 
any transparency setting.  This gives a somewhat 
inconsistent appearance as the front sphere, in this case, 
will look selectively transparent or opaque in different 
regions.  In case the words aren't clear, I took the 
example and put the blue sphere in front so that the other 
three spheres, white, red, and green are all partially 
hidden behind it, then do "ray".  For me, only the white 
sphere (which is opaque) shows through the blue one.   I 
think I had noticed this before, with non-CGO's too, so I 
was curious if it's a known problem or has a fix?


I was going to test povray, but this reminded me that 
sphere transparencies currently aren't passed on via 
make_pov to the povray input script, but I know 
transparencies are honored by make_pov for other types of 
objects.  Perhaps a simple fix to have sphere transparency 
respected as well?  Once I manually edit the povray file 
to include the "transmit" keyword in the pigment line the 
spheres do render as expected, with all three showing 
through the front one regardless of each one's 
transparency.


-Seth

Warren's sample cgo code:

from pymol.cgo import *
from pymol import cmd

obj = [

ALPHA, 1,
COLOR, 1.0, 1.0, 1.0,
SPHERE, 0.0, 0.0, 0.0, 0.5,

ALPHA, 0.66,
COLOR, 1.0, 0.0, 0.0,
SPHERE, 1.0, 0.0, 0.0, 0.5,

ALPHA, 0.33,
COLOR, 0.0, 1.0, 0.0,
SPHERE, 0.0, 1.0, 0.0, 0.5,

ALPHA, 0.11,
COLOR, 0.0, 0.0, 1.0,
SPHERE, 0.0, 0.0, 1.0, 0.5,
]

cmd.load_cgo(obj,'cgo01')



[PyMOL] stereo projection with PyMOL

2004-11-01 Thread Seth Harris
I was curious if anyone has successfully done stereo over 
a projector with PyMOL.  That is to say not the cross-eyed 
stuff but the shutter-glasses type stereo. I was recently 
trying to do this for a company presentation from an SGI. 
On the same machine Insight can do stereo (although they 
tell me it took some fiddling), and while PyMOL goes into 
stereo mode on the monitor, the projected image only shows 
one of the eye views.  Both programs have stereo within a 
window so I didn't think it was a fundamental difference 
in the overall mode, but perhaps a difference in their 
chosen frequencies.  If this turns out to be the case, is 
it possible to change the frequency PyMOL uses for 
shuttered stereo such that I could sync it with the 
projector's presumably more limited range?


Thanks,
seth



[PyMOL] hbond criteria in distance mode=2?

2004-10-28 Thread Seth Harris

Hello PyMOLers,

I am displaying hydrogen bonds using:

distance hbond, protein, ligand, mode=2

which makes some nice dashed lines for hydrogen bonds but 
doesn't always display all the hbonds one might expect. 
For instance, in some cases there are is an N on the 
ligand molecule and a backbone amide 3.2 A away but it 
doesn't get drawn (and others, both longer and shorter, 
do).  By contrast, if I turn on roving_detail, this 
connection does get drawn.  I had thought that the 
distance command with mode=2 might be purely based on 
distance, but is it also estimating whether geometry is 
suitable or is it perhaps having trouble due to ignorance 
of the bond order of the ligand (i.e. N versus NH since 
hydrogens are not explicitly present)??  I know I can draw 
hbonds manually, but I'm hoping for an automated process 
good for the long-term.


Thanks,
Seth



[PyMOL] smoothed path through protein?

2004-03-18 Thread Seth Harris

Hi all,

I was wondering if one has access to the coordinates of the old 
smoothed ribbon path through the protein or some good ideas on how to 
calculate such a path.  I wanted to have the ribbon_rider script I 
wrote earlier follow such a path to avoid the jarring switching of 
directions it currently does at each alpha carbon waypoint.  I hoped 
that breaking up the path into small enough bits (i.e. doing the 
mvSinviewtravel thing one frame at a time and recalculating the 
direction at each step) would achieve this.  Perhaps it's mostly a 
question for Warren, then, if he can tell me how the old ribbon path 
was calculated.
A second refinement of this approach would be to have the path travel 
down the center of alpha helices rather than curling around to each 
Calpha but I wasn't sure if a running average approach would 
guarantee this behavior as I could imagine the trajectory hugging 
along one edge of a helix.


upgraded script version available shortly as I now have it working 
from the command line rather than just from scripts.


Thanks for any ideas,
seth
--
Seth Harris, Ph.D.
Agard Laboratory Suite S416
Box 2240
UCSF/HHMI
600 16th Street
San Francisco, CA 94143-2240
(Shipping Zip 94158)
415.502.2930



[PyMOL] addendum ribbon rider script typo

2004-02-05 Thread Seth Harris

Hi again,

In regard to the attached MasterMovie.py file I posted yesterday...
Sorry for a superfluous paste that repeated 5 or 6 lines of code and 
made the MasterMovie.py script non-functional.


You should delete lines 440 through 445 (inclusive) I think it is, 
where some comments about the peak_tour function got in between the 
"prev=arc" and "j+=1" lines (so take out the lines in between those 
two.)  I saw it late last night when my script stopped working and 
thanks to several of you who caught it, too!


Gareth Stockwell also notes that so far the ribbon_ride does not work 
well (i.e. at all!) from the command line which I have to look into. 
It's the problem of data types and what is getting passed to the 
set_view command again, which I don't yet fully understand since the 
same syntax plus or minus a few parentheses does work in a script, 
but I'll post when I figure it out.


Morri Feldman also adds the following good idea and how to execute 
it, and I quote:

-
What do you think about using the pymol's internal "view" command to store
the views rather than explicitly passing the numbers to mvViewTravel?

The way it could work is as follows.
Suppose you have saved view1.pml and view2.pml with the storeview command.
In the pymol script you could type the following:

@view1.pml
view one, store
@view2.pml
view two, store
mvViewTravel 1-100, one, two

"one" and "two" are arbitrary strings that serve as lookup keys for the
views.

The changes to mvViewTravel that would be required are
minimal.  mvViewTravel can access the saved views like this.

def mvViewTravel(frames="1",old_view="",new_view=""):

cmd.view(new_view)
new_view = cmd.get_view(2)

cmd.view(old_view)
old_view = cmd.get_view(2)


I think this approach makes more sense than pasting the actual view
numbers into the mvViewTravel call although it adds a layer of complexity.
--

That would also make the ViewTravel items quite accessible from the 
command line.


I'll try to post the script somewhere for download later today for 
those who have/had trouble with the binhex.


Thanks for the interest and apologies for the mistakes!!  All my 
attempts at code should come with a blanket warning concerning the 
perils with which they are fraught.


Ciao,
Seth


--
Seth Harris, Ph.D.
Agard Laboratory Suite S416
Box 2240
UCSF/HHMI
600 16th Street
San Francisco, CA 94143-2240
(Shipping Zip 94158)
415.502.2930



[PyMOL] RE: Zoom in a movie...Ribbon Rider!

2004-02-04 Thread Seth Harris
 this respect will be continued 
down the line.


p.p.s  I don't believe I have broken anything in the final 
last-minute editing clean up pass (still rough, though!), but let me 
know if it doesn't work, or if Eudora has inconveniently bin-hexed 
the file or something.


p.p.p.s  Gee, I just love to hear myself type, but again, I have 
sample scripts for those who are just getting started and can share 
them if needed but this tome seemed enough for now!





--
Seth Harris, Ph.D.
Agard Laboratory Suite S416
Box 2240
UCSF/HHMI
600 16th Street
San Francisco, CA 94143-2240
(Shipping Zip 94158)
415.502.2930

MasterMovie.py
Description: Mac BinHex archive


[PyMOL] how to get minimum distances in script?

2003-07-11 Thread Seth Harris

Hello all,

I am trying to write a script that will go through each residue in a 
dimer interface and determine for each one how close it is to the 
partner monomer.


I can interactively plot all the distances within a certain cutoff 
using the handy:
distance chosen, residue_selected_on_first_chain, 
partner_monomer_selection, cutoff


For atom selections Warren earlier explained how to parse into its 
components (using list=[]; iterate 
(selection),list.append((resi,resn))).  However, the selection 
created by the distance command (i.e. "chosen") does not behave the 
same way it seems and I haven't been able to iterate over it to get 
at the info.


I see from "help distance" that in the API cmd.distance returns the 
average, so it suggested that perhaps minimum and maximum or even 
each individual value might also be accessible, giving me hope that 
the more elegant solution was close at hand and limited more by my 
ignorance than the chosen approach.


Otherwise I suppose there's the more brute-force avenue of going 
through each residue, selecting atoms from the partner monomer within 
a certain distance if any, and then explicitly measuring the distance 
to each atom one by one, but I thought I'd check with the community 
before launching such an ugly attack on the problem, having walked 
that road before!


Also, not to push my luck, but if you'd like to write your 
suggestions in both English and Python, my less-than-rudimentary 
knowledge of Python will thank you(!)


Cheers and thanks,
Seth
--
~
Seth F. Harris, PhD
Agard Laboratory
University of California, San Francisco
Mission Bay Genentech Hall
600 16th St. Suite S416
San Francisco, CA 94143-2240
415.502.2930



[PyMOL] color by grasp phi map potential?

2003-06-07 Thread Seth Harris
Well, this question is probably directed straight to Warren unless 
someone's found it in the code or I've missed an obvious button.


Main question:

I wrote out a GRASP potential map and read it in to PyMOL with no 
complaints.  How do I then go about applying it to a surface (i.e. 
coloring the surface with it)?  Activating the color ramp gadget you 
mentioned?



Subsidiary questions/comments:

I really like the roving feature...very nice!  I was getting a lot of 
intra-residue dashed lines showing up.I was wondering if there 
was a minimum distance threshold for calculation of polar interaction 
or a different mechanism for filtering out polar interactions within 
a residue itself.
Aah, I think I just figured it, at least why it's happening...I often 
create new objects which are duplicates of a given chain and once 
these are created, whether displayed or not, the polar interaction 
dashes show up presumably being calculated between the original 
molecule and the duplicate object underlying it.  Perhaps those 
interactions could somehow be hidden when one or the other object is 
hidden, leaving the "primary" polar interactions only?  Meanwhile, 
something to look out for when roving detail is on if your Arg's and 
others look a little cobwebbed with dashes.   Also in flipping roving 
on and off sometimes I can't get the polar interaction dashes to come 
back even though all other representations (sticks, nb_spheres) seem 
to.


Another comment on roving, when roving detail mode is turned off it 
didn't restore the chain colorings and features I had displayed 
before I went a-rovin'.  I guess one might want it to remain in the 
roving display and perhaps it's not trivial to have a "restore 
pre-roving features without moving the display back to a stored scene 
which does come very close to the desired functionality.  Excellent!


Anyway, it's awesome.  I hope to try building with it sometime soon, 
data depending...

Thanks,
Seth
--
~
Seth F. Harris, PhD
Agard Laboratory
University of California, San Francisco
Mission Bay Genentech Hall
600 16th St. Suite S416
San Francisco, CA 94143-2240
415.502.2930



[PyMOL] aforementioned NCS snapshot script

2003-04-16 Thread Seth Harris
I was wondering how the attachment would fare on the email list. 
Apparently, "not well" so I just include it in line below, but watch 
out for proper spacing/line returns in the process.


### Purpose:  Get snapshots of each of several NCS-related molecules 
in identical position


### Usage: Line up your view on molecule 1 (i.e. chain A) and type "run NCS.py"

### Notes: Turn on any maps, cartoons, colorings, whatever it is that 
you want to examine

### Make sure you have NCS operators defined in a CNS-format file and that
### this file is appropriately called in this script (current default 
is ncs_matrices.list)

### Be careful that these operators are the ones to transform chain A
### onto chain X, rather than the inverse which CNS lists in the bottom half of
### its NCS matrices files
### Then type "run NCS.py", and Bob's your mother's brother, or at 
least a second cousin


### Output: The script writes .png snapshots for each NCS molecule, 
called molX.png where
### X is some number.  Also, it will output each "set_view" command 
that it came up
### with so that if you want to go back and interactively look at 
mol4, for example, you
### can just type @mol4 in pymol (while the molecule is already 
loaded, etc.) and it

### will take you there by appropriately setting the view.

### If you have ImageMagick installed, you can uncomment the penultimate line
### about os.system call to montage.  The montage command takes the preceding
### mol*.png files produced of the views and makes a single png file with all
### of the panels represented.  The man page for montage has the options fully
### explained, but briefly the way I use it has -geometry with 
options for x and y
### pixels for each panel plus how wide of a buffer or border you 
want between panels
### (e.g. +5+5) and the -tiel 4x2 describes how you want the panels 
laid out, in this
### case 4 columns and 2 rows.  These options are followed by the 
input file names
### (mol*.png) and the output (montage.png).  You can, of course, 
also run it manually
### for only those cases that you want since it takes a little longer 
than the main
### part of the script.  Also, if you want to ray trace each frame 
you need to uncomment

### the cmd.ray() line in the outview function.

### Caveats:  Um, basically, in python, I have no idea what I am doing.
### This is the first, and so far only, Python script I have ever written.
### I'm sure there are much, much better ways to do a lot of this, but I have
### just plowed ahead and spelled things out in a basic klunky style.
### Feel free to send me improvements or suggestions, like better, 
more flexible ways
### to get the NCS operators out of the file so it won't be so 
stringently tied to
### the CNS file format.  It would probably be best to have pymol 
extract the NCS
### relationshiops itself, for example.  Also, I have only used this 
on one case
### (8 NCS copies, though, which is what motivated this script) but I 
think it will work

### generally.

### Overview Method:
### Get starting view for mol1
### Get NCS matrices from file for chain A->B, A->C, A->D, ... A->X
### Multiply rotation matrix of starting view (first 9) by NCS 
rotation matrix for each mol

### Get origin position from starting view (elements 12,13,14 of starting view
###   recalling that array begins at elemnt 0)
### Multiply by origin x,y,z by ncs rotation matrix as with view
### Additionally, add the x,y,z translations to the result to get the 
new origin position
###   Note:  Translations for inverse matrices sometimes, but not 
always, match those
###  for the original matrices.  I don't fully understand 
this, but that's
### probably just me.  In any case, be 
careful about getting the right matrices.
### The new view is written out as a "set_view" command, saved in a 
file, also applied

###  and a png snapshot taken before going on to the next molecule.

### PyMOL's get/set_view matrix:
### Note that what I learned of pymol's set_view is that camera 
position (elements 9-11 of
### the set view matrix) is relative to the origin.  Since we're 
moving the origin to the
### appropriate new location, we can just leave the relative camera 
position as it was.
### Same seems to go for the clipping planes (elements 15,16).  The 
final element is the

### orthoscopic flag, and this too is simply copied over from the first view.

### This script has been hacked out (and I do mean hacked) by Seth Harris.
### shar...@msg.ucsf.edu for any suggestions/feedback/gratitude
###  Thanks to Warren DeLano for PyMOL!

from pymol import cmd
from Numeric import *
from LinearAlgebra import *
import re



### define function to put out set_view command for a given molecule
def outview (mol, n):

of=open('mol'+repr(mol),'w')
 

[PyMOL] orthoscopic vs. not in ray tracing

2003-04-16 Thread Seth Harris

Quick question, I hope:
It seems that "ray" always renders the image in the orthoscopic view 
regardless of whether I set orthoscopic, 0 or set orthoscopic, 1 
although these settings do influence the non-ray traced standard 
view.  Is this true or am I missing something?  I'm trying to ray 
trace an image with some big looming molecular features in the 
foreground, but they always snap back to the orthoscopic view.


Thanks for any tips,
Seth
--
~
Seth F. Harris, PhD
Agard Laboratory
University of California, San Francisco
415-502-2930



[PyMOL] script for snapshots of your NCS-related copies

2003-04-16 Thread Seth Harris

Hi,

I wrote a rudimentary Python script to be run from PyMOL that makes 
png snapshots of identical views of your NCS-related molecules.  I 
find it helpful for comparing map features and different 
conformations between NCS copies, particularly since I have 8 NCS 
copies in my current project's asu.  The script reads in the NCS 
operators from an external CNS-style file, but perhaps some 
Python/PyMOL guru could get PyMOL to extract those operators itself 
and then it would be better self-contained.  Anyway, I added about a 
page of commentary (more than the script itself) so that I myself 
would understand it next time I looked at that text should answer any 
further questions.  Perhaps some high-NCS people will find it useful 
so I attach it to this mail.


Cheers,
Seth
--
~
Seth F. Harris, PhD
Agard Laboratory
University of California, San Francisco
415-502-2930

NCS.py
Description: Mac BinHex archive