Re: [PyMOL] Regarding Object Find

2009-10-26 Thread Folmer Fredslund
Dear Suneel Kumar,



2009/10/26 Suneel Kumar Bommisetty :
> Dear All,
>
>
>
> I am looking for script for “object find” In pymol. I have a sd file
> contains 20 molecules. I have loaded into pymol. If I want visualize next
> molecule, I need to press Play or forward or disply – sequence function. Is
> there any script to/load/select/highlight specific molecule from one object?
>
>
>
> Please reply back
>


I don't think you need a script to do this.
Look into this link
http://pymolwiki.org/index.php/States
and I think you will understand.

Best regards,
Folmer Fredslund

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
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] Replace Coordinates in State

2009-10-26 Thread Warren DeLano
Sean,

 

Unfortunately, there isn't any way at present to directly expose PyMOL's
internal C coordinate array to Python in an accessible form.  Yes,
iterate_state and alter_state are highly inefficient - it would make
more sense to provide a means of exporting and re-importing coordinate
sets via either native Python lists or, even better, NumPy arrays.  In
what form do you have the current coordinate data?

 

Cheers,

Warren

 



From: Sean Law [mailto:magic...@hotmail.com] 
Sent: Friday, October 23, 2009 4:54 PM
To: pymol-users@lists.sourceforge.net
Subject: [PyMOL] Replace Coordinates in State

 

Hi All,

I was wondering if there was a faster way to replace all coordinates.
I've used commands such as iterate_state and alter_state before but they
are far too slow since they have to iterate over each atom.  Instead, I
want to replace one set of coordinates that correspond to a specific
state with a different set.  Here's what I have to work with:

I have a list that contains x, y, z coordinates.  Of course, this list
can be manipulated and/or separated if necessary.  I'm assuming that the
coordinates for a specific state are stored somewhere in memory and I
would basically like to replace one set of coordinates with the other.
I would think that something like "pointers or references" would work a
lot faster than having to copy the coordinates over (which is typically
slow and is likely what alter_state is doing?). In addition, I am
dealing with 100+ states using alter_state for each state would be far
too slow.

Any suggestions would be greatly appreciated.

Thanks in advance!

Sean



Save up to 84% on Windows 7 until Jan 3-eligible CDN College or
University students only. Hurry-buy it now for $39.99!
 

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference___
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] Replace Coordinates in State

2009-10-26 Thread Sean Law

Warren,

I was trying to write a script that would read in CHARMM trajectory files (DCD) 
specifically for users who do not have access to the most current version of 
PyMOL.  I have written a Python script that will interpret a DCD file and load 
it into the corresponding object but this process is definitely not as fast as 
the C implementation already available in version 1.2.  I can see where it 
would be difficult to access the coordinates in the C array via Python.  This 
is not a pressing need of mine by any means as it was something that I am 
revisiting (if you recall, I had tried this in the past) as I definitely made 
some mistakes earlier that made the script very slow and inefficient.  Now, I 
have an "optimized" version of the Python script with the limitation being the 
replacement of the coordinates.  

Sean

Subject: RE: [PyMOL] Replace Coordinates in State
Date: Mon, 26 Oct 2009 10:54:39 -0700
From: war...@delsci.com
To: magic...@hotmail.com; pymol-users@lists.sourceforge.net

























Sean,

 

Unfortunately, there isn’t any way
at present to directly expose PyMOL’s internal C coordinate array to
Python in an accessible form.  Yes, iterate_state and alter_state are highly
inefficient – it would make more sense to provide a means of exporting and
re-importing coordinate sets via either native Python lists or, even better,
NumPy arrays.  In what form do you have the current coordinate data?

 

Cheers,

Warren

 











From: Sean Law
[mailto:magic...@hotmail.com] 

Sent: Friday, October 23, 2009
4:54 PM

To:
pymol-users@lists.sourceforge.net

Subject: [PyMOL] Replace
Coordinates in State



 

Hi All,



I was wondering if there was a faster way to replace all coordinates. 
I've used commands such as iterate_state and alter_state before but they are
far too slow since they have to iterate over each atom.  Instead, I want
to replace one set of coordinates that correspond to a specific state with a
different set.  Here's what I have to work with:



I have a list that contains x, y, z coordinates.  Of course, this list can
be manipulated and/or separated if necessary.  I'm assuming that the
coordinates for a specific state are stored somewhere in memory and I would
basically like to replace one set of coordinates with the other.  I would
think that something like "pointers or references" would work a lot
faster than having to copy the coordinates over (which is typically slow and is
likely what alter_state is doing?). In addition, I am dealing with 100+ states
using alter_state for each state would be far too slow.



Any suggestions would be greatly appreciated.



Thanks in advance!



Sean







Save up to 84% on Windows 7 until Jan 3-eligible CDN College
or University students only. Hurry-buy it now for $39.99!



  
_
Save up to 84% on Windows 7 until Jan 3—eligible CDN College & University 
students only. Hurry—buy it now for $39.99!
http://go.microsoft.com/?linkid=9691635--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference___
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-26 Thread Thomas Stout


Eep -- I go away for a few days & look what happens!  :)

Seth: you got my original point exactly -- thank you for the well worded 
explication!

Tsjerk & Warren: thank you for the explanation of the "under-the-hood" workings 
of the render engine  It may very well be more effort than it's worth, but 
if this were to be approached as a future feature for PyMOL, it sounds to me 
like it would also be best implemented with shadows "off" so that one needn't 
account for the off-screen contributions to the on-screen objects.  PyMOL 
doesn't do radiosity (correct?), so there is no need to worry about bouncing 
photons coming off adjacent objects that are not visible

I personally have never become a fan of rendering in POVray (despite its power) 
since it has been prohibitively difficult for me to sort getting the same "look 
and feel" as PyMOL offers so easily especially the depth cuing.

Cheers,
Tom



-Original Message-
From: Tsjerk Wassenaar [mailto:tsje...@gmail.com] 
Sent: Saturday, October 24, 2009 11:46 AM
To: Seth Harris
Cc: pymol-users@lists.sourceforge.net
Subject: Re: [PyMOL] Rendering in parts

Hi Seth,

Well, you're partly right that you wouldn't need to load all of the scene in to 
memory. But, don't forget that shadows can be cast from one end of the scene to 
another. These long range effects would be even more pronounced when 
reflections were present, like they may be with POV Ray. In that case you 
certainly wouldn't be able to make an a priori assessment of the part of the 
scene that could contribute to a certain ray from that part of the viewport.
Then again, if you feel that you can cut the scene in parts, you can achieve 
the same effect by turning off parts of the scene, making them black. Cutting 
on the number of objects would definitely cut on the complexity of the scene 
and hence on the memory demand. Subsequently you could stitch the parts of the 
image together by mere addition (since black pixels count as rgb 0 0 0). But 
I'd go for hash_max...
Well, actually I'd probably go for POV Ray... :p

Cheers,

Tsjerk

> 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 
>> 

[PyMOL] number of h-bonds

2009-10-26 Thread Michael Zimmermann
Dear PyMOL users,

I was using Action -> find -> polar interactions within selection
to get an idea about the hydrogen bonds and other polar interactions
in some molecules.  I would like to compare different conformations of
a certain molecule and one metric could be the number of pair returned
by one of these distance evaluations.  Could someone help me figure
out how to get routines like this to return the number of pairs that
they define? Alternatively, for the object that is returned, is there
a way to loop through the line objects or labels and count them?

Thank you.

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
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] number of h-bonds

2009-10-26 Thread Warren DeLano
Hello Michael,

Unfortunately, there is no programmatic way to get this information out of 
PyMOL -- my apologies!

Cheers,
Warren

-Original Message-
From: Michael Zimmermann [mailto:micha...@iastate.edu]
Sent: Mon 10/26/2009 9:04 PM
To: pymol-users
Subject: [PyMOL] number of h-bonds
 
Dear PyMOL users,

I was using Action -> find -> polar interactions within selection
to get an idea about the hydrogen bonds and other polar interactions
in some molecules.  I would like to compare different conformations of
a certain molecule and one metric could be the number of pair returned
by one of these distance evaluations.  Could someone help me figure
out how to get routines like this to return the number of pairs that
they define? Alternatively, for the object that is returned, is there
a way to loop through the line objects or labels and count them?

Thank you.

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
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






--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference___
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