Re: [PyMOL] Fetching scripts

2011-05-05 Thread gilleain torrance
Hi,

With regard to sandboxing, there is PyPy:

http://pypy.readthedocs.org/en/latest/sandbox.html

although this would be a little complicated, as it's not just a
cPython package or extension or whatever, but an alternative to
cPython...

Oh, and in general, there does exist some precedent for this kind of
downloading user-scripts. In bioclipse (http://www.bioclipse.net/)
there is a gist plugin that gets scripts (or anything) from github's
gist site. See : https://github.com/blog/317-scripting-bioclipse.

I guess there is also myExperiment.org, and workflow editors like
Taverna. I'm not sure that you can download workflows from the program
itself, though.

gilleain

--
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
___
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] Different color on each side of strand

2011-03-08 Thread gilleain torrance
Hi,

Although most of the time the strands in a sheet have clear 'sides',
this won't always be true. Keitaro already mentioned the possibility
of twisted strands, but you can also get two sheets that share the
'same' long strand - well, depending on the SSE assignment algorithm,
I suppose.

Jellyrolls (http://www.cathdb.info/cathnode/2.60.120) are an example
of this, I seem to remember, as they have long strands that cross from
one sheet to another. As the sheets are in a sandwich, the strand will
change side halfway through.

This coloring scheme still sounds like it would be useful, but there
might be some odd visual effects, or an algorithm to take care of
corner cases.

gilleain

On Tue, Mar 8, 2011 at 10:12 AM, Hongbo Zhu
 wrote:
> I like the idea about coloring tim-barrels.
>
> At the moment the secondary structures can be selected in PyMOL using
> selector "ss". I wonder whether it makes sense to label each strand with
> an index so we can select each strand individually, e.g.
>
> select ss s5 # select the 5th strand from the N-term
>
> and then one can flip the colors of the two "sides" of the strand in
> case it is not colored properly according to the user.
>
> hongbo
>
> On 03/08/2011 10:16 AM, Keitaro Yamashita wrote:
>> Dear Hongbo,
>>
 For example, user can put something like light source and "front" is
 defined as the side light hits.
 (though it would be undefined If sheet plane is placed parallel to the 
 ray..)
>>> and even the same strand can have half of it facing the light source and
>>> the other half turned opposite to the source.
>>
>> I think this definition is useful when color e.g. beta-barrel, but
>> definitely includes ambiguity.
>> Then, how about defining front side as the C-beta direction of
>> starting residue of sheet?
>>
>>
>> Cheers,
>>
>> Keitaro
>>
>> 2011年3月8日火曜日 Hongbo Zhu hongbo@biotec.tu-dresden.de:
>>> Hi, Keitaro,
>>>
>>> On 03/08/2011 03:11 AM, Keitaro Yamashita wrote:
 Dear Hongbo,

 For example, user can put something like light source and "front" is
 defined as the side light hits.
 (though it would be undefined If sheet plane is placed parallel to the 
 ray..)
>>> and even the same strand can have half of it facing the light source and
>>> the other half turned opposite to the source.

 But I think any definition is ok if front and back could be alternated
 easily by user operation.
>>> sounds like an interesting operation, though.


 Cheers,

 Keitaro

 2011/3/8 Hongbo Zhu:
> how do you define "front" and "back" sides of sheets in general?
>

 --
 What You Don't Know About Data Connectivity CAN Hurt You
 This paper provides an overview of data connectivity, details
 its effect on application quality, and explores various alternative
 solutions. http://p.sf.net/sfu/progress-d2d
 ___
 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
>>>
>>> --
>>> Hongbo ZHU
>>> Postdoctoral Researcher
>>> Structural Bioinformatics
>>>
>>> Technische Universität Dresden
>>> Biotechnology Center
>>> Tatzberg 47/49
>>> 01307 Dresden, Germany
>>>
>>> Tel: +49 (0) 351 463-40083
>>> Fax: +49 (0) 351 463-40087
>>> E-Mail:  hongbo.zhu at biotec
>>> Webpage: www.biotec.tu-dresden.de
>>>
>>> --
>>> What You Don't Know About Data Connectivity CAN Hurt You
>>> This paper provides an overview of data connectivity, details
>>> its effect on application quality, and explores various alternative
>>> solutions. http://p.sf.net/sfu/progress-d2d
>>> ___
>>> 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
>>>
>>
>> --
>> What You Don't Know About Data Connectivity CAN Hurt You
>> This paper provides an overview of data connectivity, details
>> its effect on application quality, and explores various alternative
>> solutions. http://p.sf.net/sfu/progress-d2d
>> ___
>> 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
>
> --
> Hongbo ZHU
> Postdoctoral Researcher
> Structural Bioinformatics
>
> Technische Universität Dresden
> Biotechnology Center
> Tatzberg 47/49
> 01307 Dresden, Germany
>
> Tel: +49 (0) 351 463-40083
> Fax: +49 (0) 351 463-40087
> E-

Re: [PyMOL] Principal Axes of Rotation

2009-06-03 Thread gilleain torrance
Hi,

I might be wrong, but might it be that you need the axis through the
structure that minimises the distance of all the points to it. Or, to
put it another way, the least-square-plane through the structure, the
normal to that plane, and a thir axis perpendicular to both.

If this is the case, you are in luck, as I already made such a thing:

  http://pymolwiki.org/index.php/Bounding_Box

this script was designed to make a minimal bounding box (not just an
axis-aligned one). I think that it does this, although my geometry is
not good enough to know if I am right.

Anyway, you already mention joining opposite faces of the box - well
just use the axes calculated half-way through the first function.

Hope this helps.

gilleain

On Tue, Jun 2, 2009 at 11:41 PM, Sean Law  wrote:
> Hi,
>
> For the past couple of days I've been trying to find a way to rotate an
> object in order to show a front and side profile for publication.  However,
> rotating with respect to the x, y, or z axes does not produce the correct
> result (even after moving the center-of-mass of the structure to the
> origin).  What I need is a way to determine the principal axes of rotation
> for a given selection so that rotation about any one of these axes does not
> produce a "wobble" effect.  I've even tried drawing a rectangular box around
> the object and then drawing an axes through the centroids of opposing faces
> but I still see wobbling.  I've basically exhausted all of my attempts at
> this problem.
>
> Any help or suggestions would be greatly appreciated.
>
> Sean
>
> 
> Create a cool, new character for your Windows Live™ Messenger. Check it out
> --
> OpenSolaris 2009.06 is a cutting edge operating system for enterprises
> looking to deploy the next generation of Solaris that includes the latest
> innovations from Sun and the OpenSource community. Download a copy and
> enjoy capabilities such as Networking, Storage and Virtualization.
> Go to: http://p.sf.net/sfu/opensolaris-get
> ___
> 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
>

--
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
___
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] get_dihedral bottleneck

2009-04-01 Thread gilleain torrance
On Tue, Mar 31, 2009 at 9:45 PM, Sean Law  wrote:
> the performance is lightning fast.  Can anybody help me improve the overall
> performance or suggest an alternative?  Thanks in advance!

A kind of alternative would be to use a custom dihedral command, that
avoids evaluating selections:

def torsion(a, b, c, d):
l = (b - a).cross(c - b)
r = (d - c).cross(b - c)
a = degrees(l.angle(r))

if (l.cross(r) * (c - b)) < 0.0:
return -a
else:
return a

where a, b, c, and d are vector classes and 'cross' is defined as usual like:

def cross(self, other):
return Vector(self.y * other.z - self.z * other.y,
  self.z * other.x - self.x * other.z,
  self.x * other.y - self.y * other.x)

pymol has a vector class in the chempy package called 'cpv'.

gilleain



Re: [PyMOL] (no subject)

2009-03-24 Thread gilleain torrance
Hi,

I think that it probably is possible to do this from within pymol, and
probably quite convenient for single molecules.

However, there are two other possible approaches, which would be
helpful for multiple molecules.

Firstly, there is a program called 'dang' made by the Richardson group:

http://kinemage.biochem.duke.edu/software/dang.php

and secondly, might I humbly submit that I have a program I call
'Tailor' that is intended for measuring and analysing (to a limited
extent) selected parts of proteins:

http://tailor.sourceforge.net/docs/index.html

gilleain

On Tue, Mar 24, 2009 at 7:06 AM, Rotem Sertchook
 wrote:
> Hi,
> I'm looking for a way to calculate set of torsion angels from selected
> residues (for example Chi1 dihedral of all His residues). Is it possible to
> write PyMOL script for such task ? Any hints to write such script will be
> appreciated!
>
> Thank you
> Rotem
>
>
>
>
>
>
> --
> Rotem Sertchook, Ph.D.
> Bioinformatics Unit, Biological Services
> Weizmann Institute of Science,
> Rehovot 76100, Israel.
> --
>
> --
> Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
> powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
> easily build your RIAs with Flex Builder, the Eclipse(TM)based development
> software that enables intelligent coding and step-through debugging.
> Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
> ___
> PyMOL-users mailing list
> PyMOL-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pymol-users
>
>



Re: [PyMOL] Pymol and NumPy

2009-03-02 Thread gilleain torrance
Hi,

I recognise that code comment :)

Actually, it seems that pymol now includes numpy, I will change my
script and see if it still works.

In the meantime, if you just want axially-aligned bounding boxes, try
this script (not by me):

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

at least, I think that they are axially-aligned...

gilleain

On Mon, Mar 2, 2009 at 2:53 PM,   wrote:
> Hi all,
>
> I would like to use a script found on the PyMol wiki that uses NumPy
> so I need to install it.
> It's written at the top of the script that :
> "#NOTE!! : These packages (numarray, Scientific) must be present in pymol's
> #'$PYMOLDIR/py23/lib/python2.3/site-packages/' directory!!"
>
> I did something that I supposed to be equivalent : installing numpy using
>
>> sudo python setup.py install --prefix $PYMOLDIR/ext
>
> which leads to an installation in
> '$PYMOLDIR/ext/lib/python2.5/site-packages/.'
>
> When I try to launch the script I have this message :
>
>>     from numpy import *
>> ImportError: No module named numpy
>
> Note that every other lib is written in
> '$PYMOLDIR/ext/lib/python2.4/site-packages/.'. Maybe this could ba an
> explanation of my problem but I don't know how to fix it ...
> Furthermore NumPy is correctly installed system-wide on my machine.
>
> Does anybody have an idea to solve my problem ?
>
> Sebastien Conilleau
>
>
> --
>
> Sébastien Conilleau, PhD
> UMR CNRS 7177
> Laboratoire d'Infochimie
> UdS
> 4, rue Blaise Pascal
> 67008 Strasbourg Cedex, France
> Tel : +(33)3-90-24-15-63
>
>
>
> --
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> -Strategies to boost innovation and cut costs with open source participation
> -Receive a $600 discount off the registration fee with the source code: SFAD
> http://p.sf.net/sfu/XcvMzF8H
> ___
> PyMOL-users mailing list
> PyMOL-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pymol-users
>



Re: [PyMOL] Secondary structure elements

2008-11-28 Thread gilleain torrance
Hello,

Possibly.

I have python code that attempts to parse dssp files. Add that to a
script to call dssp (not so hard) and then call the parsing code, then
annotate the structure with the result...

Maybe all this already exists somewhere?

gilleain

On Fri, Nov 28, 2008 at 1:39 PM, DimitryASuplatov  wrote:
> Hello,
> Is there a way to incorporate dssp into pymol for secondary structure
> annotation?
> Thank you.
> SDA
>
>
> -
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> ___
> PyMOL-users mailing list
> PyMOL-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pymol-users
>



Re: [PyMOL] remove cartesian coordinate from w/in transparent metal ions

2008-10-29 Thread gilleain torrance
Hmmm.

I'm probably over-complicating matters, but:

def before_load():
cmd.delete("all")

def after_load():
cmd.as("cartoon")
cmd.hide("nonbonded")

def wrapped_load(filename):
before_load()
cmd.load(filename)
after_load()

cmd.extend("wrapped_load", wrapped_load)

gilleain

On Wed, Oct 29, 2008 at 7:26 PM, Nathaniel Echols
 wrote:
> On Wed, Oct 29, 2008 at 11:39 AM, Thomas S. Leyh, Ph. D. 
> wrote:
>>
>> Every once in a while, I try to show a metal ion as a tranparent
>> sphere and inevetiably get stuck trying to make the tiny cartesian
>> coordinate system that appears at the center of the sphere disappear so it
>> doesn't "show through".  Suggestions?
>
> I think you want "hide nonbonded".
> I have a related question: is there a way (or could there be) to control the
> default appearance of molecules upon loading?  Personally, when I use PyMOL
> I almost always want to look at cartoons, without nonbonded atoms.
>  Something as simple as a few new settings that I could throw in ~/.pymolrc
> would be fine.
> -
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> ___
> PyMOL-users mailing list
> PyMOL-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pymol-users
>
>



Re: [PyMOL] select ATP hetatm?

2008-09-23 Thread gilleain torrance
"select hetatm and resname atp" or "select hetatm and r. atp"

see also: "help selections"

gilleain

On Tue, Sep 23, 2008 at 7:18 PM, Paul Shannon
 wrote:
> What command will select a HETATM of ATP?  I am looking at 1ATP.pdb,
> in which the ATP molecule appears
> as shown below.
>
> I found 'select hetatm' but found no way to be more specific, in the
> spirit of
>
>'select hetatm and name=ATP'
>
> Thanks!
>
>  - Paul
>
>
> HETATM 2937  O2  PO3 E 338  18.820  34.274  -7.166  1.00
> 45.64   O
> HETATM 2938  O3  PO3 E 338  17.963  34.737  -4.940
> 1.00100.00   O
> HETATM 2939  PG  ATP 1  16.223   8.151  -1.015  1.00
> 18.11   P
> HETATM 2940  O1G ATP 1  17.550   8.536  -0.515  1.00
> 17.95   O
> HETATM 2941  O2G ATP 1  15.748   6.835  -0.427  1.00
> 15.57   O
> HETATM 2942  O3G ATP 1  16.255   8.014  -2.438  1.00
> 6.59   O
> HETATM 2943  PB  ATP 1  14.471  10.520  -1.490  1.00
> 22.96   P
> HETATM 2944  O1B ATP 1  13.929   9.920  -2.700  1.00
> 13.08   O
> HETATM 2945  O2B ATP 1  15.318  11.737  -1.637  1.00
> 19.59   O
> HETATM 2946  O3B ATP 1  15.196   9.363  -0.681  1.00
> 13.80   O
> HETATM 2947  PA  ATP 1  11.968   9.868  -0.260  1.00
> 19.49   P
> HETATM 2948  O1A ATP 1  11.100   9.880  -1.430  1.00
> 13.47   O
> HETATM 2949  O2A ATP 1  12.426   8.514   0.144  1.00
> 25.00   O
> HETATM 2950  O3A ATP 1  13.242  10.795  -0.567  1.00
> 21.72   O
> HETATM 2951  O5' ATP 1  11.333  10.591   1.011  1.00
> 14.92   O
> HETATM 2952  C5' ATP 1  12.092  10.373   2.227  1.00
> 58.54   C
> HETATM 2953  C4' ATP 1  11.238   9.922   3.406  1.00
> 15.72   C
> HETATM 2954  O4' ATP 1  10.003  10.681   3.386  1.00
> 30.04   O
> HETATM 2955  C3' ATP 1  10.722   8.498   3.395  1.00
> 9.26   C
> HETATM 2956  O3' ATP 1  11.705   7.533   3.717  1.00
> 33.78   O
> HETATM 2957  C2' ATP 1   9.560   8.606   4.401  1.00
> 1.00   C
> HETATM 2958  O2' ATP 1   9.942   8.562   5.764  1.00
> 48.53   O
> HETATM 2959  C1' ATP 1   8.988   9.957   4.085  1.00
> 12.71   C
> HETATM 2960  N9  ATP 1   7.778   9.924   3.236  1.00
> 19.15   N
> HETATM 2961  C8  ATP 1   7.884   9.906   1.879  1.00
> 45.84   C
> HETATM 2962  N7  ATP 1   6.731   9.904   1.248  1.00
> 35.77   N
> HETATM 2963  C5  ATP 1   5.796   9.977   2.253  1.00
> 24.00   C
> HETATM 2964  C6  ATP 1   4.373  10.039   2.244  1.00
> 26.67   C
> HETATM 2965  N6  ATP 1   3.616  10.001   1.128  1.00
> 31.35   N
> HETATM 2966  N1  ATP 1   3.756  10.034   3.445  1.00
> 19.73   N
> HETATM 2967  C2  ATP 1   4.499  10.076   4.582  1.00
> 28.79   C
> HETATM 2968  N3  ATP 1   5.825  10.053   4.705  1.00
> 18.18   N
> HETATM 2969  C4  ATP 1   6.425   9.873   3.496  1.00
> 37.89   C
> HETATM 2970  O   HOH   400   8.234   9.392  -4.975  1.00
> 37.01   O
> HETATM 2971  O   HOH   402  -1.957   4.450  -6.367  1.00
> 18.24   O
> HETATM 2972  O   HOH   403  12.337   4.400  -6.581  1.00
> 18.55   O
>
> -
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> ___
> PyMOL-users mailing list
> PyMOL-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pymol-users
>



Re: [PyMOL] displaying crystallographic symmetry in PyMol

2008-09-10 Thread gilleain torrance
Ah, the problem is the "def" in front of the function call. It should be either:

   set_symmetry 1a2p, 60, 60, 80, 90, 90, 120, P6122

(in the pymol command window or in a .pml script) or

  cmd.set_symmetry("1a2p", 60, 60, 80, 90, 90, 120, spacegroup="P6122")

in a python script.

gilleain

On Wed, Sep 10, 2008 at 12:40 AM, Charles David Stout  wrote:
> I want to create a packing diagram from many molecules in the unit cell
> when the structure is one monomer -
> I tried-
>
>  def set_symmetry(protein_name, 62.843   62.843   82.339  90.00  90.00
> 120.00, spacegroup="P6122")
>
> and get a syntax error.
> How is this done?
> Thanks,
> Dave
> 9-9-08
>
> -
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> ___
> PyMOL-users mailing list
> PyMOL-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pymol-users
>



Re: [PyMOL] pdb-l: chain alignment tool

2008-07-07 Thread gilleain torrance
Hi,

There are many. One way is to use PyMol (or, indeed many other
viewers). So I did it like this:

fetch 1a25
show cartoon
create chaina, chain a
create chainb, chain b
delete 1a25
align chaina, chainb
color red, chain a
color blue, chain b

I guess that this could be generalised into a script to align the
chains of any dimer.

gilleain

On Mon, Jul 7, 2008 at 3:51 PM, David Hoksza  wrote:
> Hi, don't anybody of you know if there exists a tool, that can
> visually align two protein chains? I.e. 1a25a and 1a25b seem very
> similar to me and I would like to visually confirm or disprove this
> fact.
>
> Thank you,
>  David
>
>
> TO UNSUBSCRIBE OR CHANGE YOUR SUBSCRIPTION OPTIONS, please see
> https://lists.sdsc.edu/mailman/listinfo.cgi/pdb-l .
>



Re: [PyMOL] Pymol scripts are very slow doing dihedral calculations

2008-06-11 Thread gilleain torrance
Hi,

Wouldn't it be better to use a program written especially for this
purpose, like dang/dangle from the richardson group, or dssp (, or
others I don't know of)?

Of course, you may have a specific reason for using pymol, so this is
just a suggestion!

gilleain torrance

On Wed, Jun 11, 2008 at 2:20 PM, David McGiven
 wrote:
>
> Dear PyMol Users,
>
> We're using Pymol to automatically extract all the backbone dihedrals
> from a protein.
>
> I've noticed that it's very slow doing those calculations. Normally in
> Fortran it will take some seconds, while in pymol it takes five minutes
> or even more.
>
> The command we issue is :
>
> $> /opt/soft/pymol/pymol -qc dihedral.py
>
> That dihedral.py script only reads some pdb's and and uses the function
> get_dihedral()
>
> Does anybody know why is it running so slow ? And if so, is it possible
> to speed it up in any way ?
>
> Thanks
>
> Best Regards,
> David McGiven.
>
> -
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php
> ___
> PyMOL-users mailing list
> PyMOL-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pymol-users
>



[PyMOL] phosphates in peptide backbone?

2008-05-07 Thread gilleain torrance
Hi all,

This isn't exactly a question, but I noticed in a structure I was
looking at (2psg) that the cartoon representation wasn't uniformly
grey. On closer inspection I noticed this:

   http://dcs.gla.ac.uk/~maclean/2psg_66_69_phos.png

It seems that phosphorylated sidechains (ser68, in this case) get put
into the cartoon as 'part' of the peptide backbone, sort of.

Just thought I would mention it, in case this is considered a bug...

gilleain torrance



Re: [PyMOL] Scripts on Mac

2008-02-28 Thread gilleain torrance
Hmm. Running scripts has always worked for me on a mac.

Could it be a tab/space problem, or just a character missing at the
end from a copy/paste?

gilleain torrance

On Thu, Feb 28, 2008 at 2:50 PM, Sadler, Evan  wrote:
> I can run scripts by pasting them, but they fail when I try to read them
>  from a file, as in:
>
>  PyMOL> run ~/scriptfolder/rasmolify.py
>
>  This generates lots of errors:
>
>  Traceback (most recent call last):
>   File "/Applications/MacPyMOL.app/pymol/modules/pymol/parser.py", line 333,
>  in parse
>
>  parsing.run_file(exp_path(layer.args[0]),self.pymol_names,self.pymol_names)
>   File "/Applications/MacPyMOL.app/pymol/modules/pymol/parsing.py", line
>  456, in run_file
> execfile(file,global_ns,local_ns)
>   File "/Users/evansadler/pymolscripts/rasmolify.py", line 3
>
>  ^
>   SyntaxError: invalid syntax
>
>  Some result for MacPyMOL and X11 hybrid
>
>  What am I doing wrong?
>
>  Evan
>  --
>  J. Evan Sadler, M.D., Ph.D.
>  Howard Hughes Medical Institute
>  Washington University
>  660 S. Euclid Ave., Box 8022
>  St. Louis, MO   63110
>  Tel: 314-362-9067
>  FAX: 314-454-3012
>  email: esad...@wustl.edu
>
>
>
>  -
>  This SF.net email is sponsored by: Microsoft
>  Defy all challenges. Microsoft(R) Visual Studio 2008.
>  http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
>  ___
>  PyMOL-users mailing list
>  PyMOL-users@lists.sourceforge.net
>  https://lists.sourceforge.net/lists/listinfo/pymol-users
>



Re: [PyMOL] succinct secondary structure 'readout'

2007-10-09 Thread gilleain torrance
Hi everyone,
Sorry for posting my replies to the list; I hope this is all generally
useful.

Firstly, the bug: the obvious cause is if the line "if ss == currentType:"
is never true. In that case, it is making a list of one-residue sses, with,
as Tsjerk correctly pointed out, the default end of -1.

Secondly, the root cause /may/ be that the name "ss" is used for both the
loop variable and the function name. I can't see why else it fails. It works
fine for me on MacPymol 1.0r2, but something is different.

Thirdly, the way I run these kinds of commands is to save them as text files
in a directory (~/development/pymol as it happens) and them in the .pymolrc
file, I have lines like "run ~/development/pymol/motif.py" to add commands.
However, copy/paste seems to work for me also.

gilleain


Re: [PyMOL] succinct secondary structure 'readout'

2007-10-09 Thread gilleain torrance
Hi Frieda,

That's odd. It seems to work okay for mulitchain proteins (I'll add
some extra bits to handle chains).

The "--" in the output is weird. It suggests that either the start
numbers end in a dash or the end number start with a dash. It's
difficult to diagnose the bug, if bug there is, without the input
data.

What structure are you using this on? Does it happen with other structures?

gilleain

> Hi Gilleain,
>
> I tried pasting in the code at the first link, followed by
> ss my_object
> where my_object is the name of an object in the file,
> and the output looks like this:
> 1-1
> 1--1 S
> 1-2
> 2--1 S
> 2-3
> 3--1 S
> 3-4
> ...etc.
>
> Am I using ss incorrectly?
>
> For the second link above, I do not know what command(s) to issue after I
> paste in the code.
>
> Thanks for your help,
> Frieda
>
>
>
> ///
>
>
>
>
> Frieda Reichsman
>
> Molecules in Motion
>
> Interactive Molecular Structures
>
> http://www.moleculesinmotion.com
>
>
>
>
> ///
>
>
> -
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> ___
> PyMOL-users mailing list
> PyMOL-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pymol-users
>
>



Re: [PyMOL] succinct secondary structure 'readout'

2007-10-09 Thread gilleain torrance
Hi Tsjerk, Frieda,
I made a different solution (I can't get Tsjerk's to work, oddly - it looks
like it should step through sses correctly, but I can't see why the "
sslist.pop(i)" gives what it should).

Anyway, my 'versions' :) are on the wiki as:

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

which is what was asked for. Also, there is a more tricky implementation,
that takes a function and applys it to each sse. I don't know if these
programs are compatible with very early versions of python, bytheway.

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

They were fun to code, anyway.

gilleain torrance

On 10/9/07, Tsjerk Wassenaar  wrote:
>
> Hi Frieda,
>
> In addition to my previous mail, the following works for me:
>
> sslist=[]
> iterate n. ca, sslist.append( [resn,resi,ss] )
>
> /i=1, j=len(sslist)-1
> /while i   if sslist[i][2] == sslist[i+1][2]:\
> sslist.pop[i]\
> j = j - 1\
>   else:\
> i=i+2
>
> Hope it helps,
>
> Tsjerk
>
> On 10/9/07, Tsjerk Wassenaar < tsje...@gmail.com> wrote:
> >
> > Hi Frieda,
> >
> > There's no such command. You'll have to parse the output you get through
> > a script which filters it in the way you want. This isn't difficult though
> > (good python exercise :p).
> >
> > Best,
> >
> > Tsjerk
> >
> > On 10/9/07, Frieda Reichsman < frie...@nsm.umass.edu> wrote:
> >
> > > Hi,
> > >
> > >
> > > I would like to get secondary structure information from a PyMOL file.
> > > I searched the list and found this:
> > >
> > >
> > >
> > >
> > > > I need a list of the secondary structure assigned to each residue by
> > > dss in
> > > > pymol. Is there a simple way to write this information to a file, or
> > > dump it
> > > > to the screen?
> > >
> > > To dump it to the screen, try:
> > >
> > > iterate  & n. ca, print resn,resi,ss
> > >
> > >
> > >
> > > and it works, but the output is a long list of every residue. Is there
> > > a command to get the output more succinctly, such as
> > >
> > > 1-5 L
> > > 6-10 H
> > > 11-15 S
> > >
> > > Thanks,
> > > Frieda
> > >
> > >   ///
> > >
> > >
> > > Frieda Reichsman
> > >
> > > Molecules in Motion
> > >
> > > Interactive Molecular Structures
> > >
> > > http://www.moleculesinmotion 
> > > <http://www.moleculesinmotion.com>.com<http://www.moleculesinmotion.com>
> > >
> > >
> > > ///
> > >
> > >
> > >
> > > 
> > > -
> > > This SF.net email is sponsored by: Splunk Inc.
> > > Still grepping through log files to find problems?  Stop.
> > > Now Search log events and configuration files using AJAX and a
> > > browser.
> > > Download your FREE copy of Splunk now >> http://get.splunk.com/
> > > ___
> > > PyMOL-users mailing list
> > > pymol-us...@lists.sourceforge 
> > > .net
> > > https://lists.sourceforge.net<https://lists.sourceforge.net/lists/listinfo/pymol-users>
> > > /lists/listinfo/pymol-users<https://lists.sourceforge.net/lists/listinfo/pymol-users>
> > >
> > >
> >
> >
> > --
> > Tsjerk A. Wassenaar, Ph.D.
> > Junior UD (post-doc)
> > Biomolecular NMR, Bijvoet Center
> > Utrecht University
> > Padualaan 8
> > 3584 CH Utrecht
> > The Netherlands
> > P: +31-30-2539931
> > F: +31-30-2537623
>
>
>
>
> --
> Tsjerk A. Wassenaar, Ph.D.
> Junior UD (post-doc)
> Biomolecular NMR, Bijvoet Center
> Utrecht University
> Padualaan 8
> 3584 CH Utrecht
> The Netherlands
> P: +31-30-2539931
> F: +31-30-2537623
>
> -
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> ___
> PyMOL-users mailing list
> pymol-us...@lists.sourceforge 
> .net
> https://lists.sourceforge.net<https://lists.sourceforge.net/lists/listinfo/pymol-users>
> /lists/listinfo/pymol-users<https://lists.sourceforge.net/lists/listinfo/pymol-users>
>
>


Re: [PyMOL] Anybody remember Molmol?

2007-09-25 Thread gilleain torrance
Hi,

On the subject of "circular variance circle plots for dihedral
angles". If we are talking about the same thing, I have implemented
some of this in python if anyone wants it.

That is, I had to calculate the circular means and std dev for lists
of torsion angles, and used the method described in Allen and Johnson
Acta Cryst. (1991). B47, 62-67.

If someone wants the code, do ask.

gilleain

On 9/25/07, Jurgen F. Doreleijers  wrote:
> Thanks Justin,
>
> The fink install took a long time but worked like a charm.
> I haven't tried Logan's method.
>
> In due time, we might post some python scripts to do similar stuff in
> PyMol. I have to migrate away from molmol at some point;-)
>
> Cheers,
> Jurgen
> BMRB, Madison, WI
>
> On 9/25/07, Justin Schmitz  wrote:
> > Jurgen F. Doreleijers schrieb:
> > > Sorry if it's a bit off topic but I need some Molmol features Pymol
> > > simply hasn't come around to implement yet. Anybody know how to
> > > compile Molmol on the Mac OS X?
> > >
> > There is a packages in the fink database. So you could easily install
> > and compile it via fink.
> > > To satisfy your curiosity, the features list I am interested in:
> > > -  regions of matching residues in the way Michael Nilges proposed.
> > > - doing circular variance circle plots for dihedral angles.
> > > - rmsd tables for NMR ensembles, etc.
> > >
> > > It's no big deal I can still do these things displayed  thru X11
> > > remotely running. Just interested.
> > >
> > > Cheers,
> > >
> >
> >
> > -
> > This SF.net email is sponsored by: Microsoft
> > Defy all challenges. Microsoft(R) Visual Studio 2005.
> > http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
> > ___
> > PyMOL-users mailing list
> > PyMOL-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/pymol-users
> >
>
>
> --
> Jurgen F. Doreleijers
>
> -
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
> ___
> PyMOL-users mailing list
> PyMOL-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pymol-users
>



Re: [PyMOL] python for loop with pymol command usage

2007-07-04 Thread gilleain torrance

Hmmm.

With a little messing around, it seems that this works at the pymol prompt:

for x in range(10): cmd.label("(name ca and resi %d)" % x, '"%s%s\" %
(resi, resn)')

The only difference is in the quoting. Double quotes inside single quotes.

gilleain

On 7/4/07, Clark, Louis  wrote:





Dear user-group,

  I'm trying to learn how to use python commands inside pymol .pml scripts.
I seem to be missing some understanding about how the interface works.
Could somebody tell me how to fix this command below?



PyMOL>for x in range(10): cmd.label("(name ca and resi %d)" % x, "%s%s"

PyMOL>% (resi, resn))

Traceback (most recent call last):

  File "/usr/local/pymol/modules/pymol/parser.py", line
232, in parse

exec(com2[nest]+"\n",pymol_names,pymol_names)

  File "", line 1, in ?

NameError: name 'resi' is not defined



thanks much!!



-Louis



Louis Clark, Ph.D.

louis.cl...@codexis.com


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
PyMOL-users mailing list
PyMOL-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pymol-users






Re: [PyMOL] alter_state for y coordinates (2)?

2007-06-19 Thread gilleain torrance

Hi,

Firstly, I can see why there is a syntax error for the alter_state command:

   cmd.alter_state ("1",("1AW3 and name fe"),((x,y,z)=(x-a,y-b,z-c))")

has the quotes in the wrong place. I guess it should be:

   cmd.alter_state("1","(1AW3 and name fe)","((x,y,z)=(x-a,y-b,z-c))")

I can make every atom move by saying:

   cmd.alter_state("1", "my_structure", "x, y, z = x + 1, y + 1, z + 1")

So, the "x,y,z=x-a,y-b,z-c" would probably work, too. I hadn't
realised that variables in the current scope were accessible from the
alter_state scope, too.

gilleain

On 6/19/07, Gilles Truan  wrote:

Sorry for my first post,  I just relaized it was kind of hard to read
with all the funny tags I am reposting for clarity!!!
I am trying to run a script to translate all pdb structures so that an
atom of the protein gets the coordinate (0,0,0)
I have written a small script for that:

for i in pdb_names:
  stored.xyz = []
  cmd.iterate_state(1,("%s and name fe" %(i)),"stored.xyz.append([x,y,z])")
  a=stored.xyz[0][0]
  b=stored.xyz[0][1]
  c=stored.xyz[0][2]
  cmd.alter_state ("1",("%s" %(i)),"x=x-a")
  cmd.alter_state ("1",("%s" %(i)),"y=y-b")
  cmd.alter_state ("1",("%s" %(i)),"z=z-c")

First, I have not been able to translate all the coordinates at once
in the script with something like
cmd.alter_state ("1",("%s" %(i)),"((x,y,z)=(x-a,y-b,z-c))")
I get this error message

  cmd.alter_state ("1",("1AW3 and name fe"),((x,y,z)=(x-a,y-b,z-c))")
^
  SyntaxError: invalid syntax

This was overcome by affecting each value separately. But then, when I
check the coordinates of the fe atom that should be (0,0,0) all of
them have zero values for x and z, but ot for y!!
All the y values are unaffected!!!

Is there something I am missing in the number format? When I check
coordinates via the cmd.iterate_state, I can see that most of them are
numbers with around 15 to 16 significative figures... where the pdb
file has only three figures!! Is there something that is added by the
iterate_state command, and might this could affect the calculation of
the translation?

Thanks in advance for your answers  ;)





-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
PyMOL-users mailing list
PyMOL-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pymol-users





Re: [PyMOL] generating pdb coordinates

2007-03-15 Thread gilleain torrance

Hi,

You can save the structure as a pdb file:

  save name.pdb, selection-name

that might do what you want. Type help save for more details.

gilleain torrance

On 3/15/07, Juliana R Cortines  wrote:



Hi all-

I was wondering if it is possible to generate coordinates in a .pdb file
from the docking I made using pymol.

thank you,
Juliana
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
PyMOL-users mailing list
PyMOL-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pymol-users






Re: [PyMOL] Running scripts on MacPyMol

2007-02-28 Thread gilleain torrance

Hi Rafael,

There is a lot of info on the wiki:

  http://www.pymolwiki.org

also, there is a help system in pymol (type "help"). The run command
is what you want for running scripts.

gilleain torrance

On 2/27/07, Rafael Fernández Leiro  wrote:

Hello, firstly excuse my english. I'll try to get understood.

I have just arrived to  MacPyMol and I'm playing around with the
program. I can't run any script. Is there anywhere a tutorial about
how to setup MacPyMol to run scripts and how to use them? Thanks a lot.

(I'm running MacPymolX11Hybrid of course)

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
PyMOL-users mailing list
PyMOL-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pymol-users





Re: [PyMOL] Distance Label Format

2007-02-23 Thread gilleain torrance

Hi,

Hmm. Not very easily. The measurement wizard just calls a distance
method, which makes the dashed line and the label internally. Other
wise it would be simple to say:

 cmd.label_dash("%0.1f" % d)

assuming that there was such a command... :) Oh, and that command
would need a dash object as a parameter.

So, no, not that I can see.

gilleain torrance

On 2/23/07, Anthony Armstrong  wrote:

Hi Folks,

When using the distance wizard is there a way to change the number of
decimal places output to the label from 2 to 1?

Thanks,
Tony

Anthony A. Armstrong
Department of Biophysics and Biophysical Chemistry
Johns Hopkins University School of Medicine
725 North Wolfe Street
Baltimore, MD 21205
410-955-8715
410-955-0637 FAX
armst...@groucho.med.jhmi.edu

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
PyMOL-users mailing list
PyMOL-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pymol-users





[PyMOL] image metadata plugin

2007-02-12 Thread gilleain torrance

Hello everybody,

I just had an idea for a plugin, but I know I won't have time to make
it, so...I thought I would mention it in the hope someone else
can. :)

Basically, I often make snapshot images (pngs) of scenes. The problem
with doing this is that I have learned to be careful to make the
filename tell me what it is. For example : nacatgrip_1fmn_201_203.png.
Otherwise, I look at the picture 6 months later and wonder what it
was.

This would be a lot easier if there was a snapshot plugin that could
store an image and metadata about the image - the path to the
structure file, structure names, comments, etc.

In fact, a truly clever thing would be to store the session along with
the image, and you could browse sessions by looking at thumbnail
images...

Anyway, just a thought.

gilleain torrance



Re: [PyMOL] hydrogen_add problem

2006-12-06 Thread gilleain torrance

Hi,

I also would vote for using reduce, since it is very good.

If you have to do it in pure java (ie: not calling reduce from java
somehow) then cdk would also be a good choice. A quick scan through
the api gives:

  org.openscience.cdk.tools.HydrogenAdder

which "Provides methods for adding missing hydrogen atoms." - seems perfect :)

gilleain torrance

On 12/6/06, Stuart Endo-Streeter  wrote:

You should take a look at the program Reduce from the Richardson lab at Duke,
it adds protons and is written in C++.  It will take a pdb and without
requiring modification or formating add protons to it.  Versions exist for
Linux, Windows, MacOS X, Irix, and Sun-SPARC, and the source code is
available as well.  It can be used as a plug-in program, just call out to it
with whatever options are required, then get back the protenated pdb.

Information and references (including algorithms published in JMB) at

http://kinemage.biochem.duke.edu/software/reduce.php


Note: not a member of the Richardson lab, but a (program using) collaborator.


S. Endo-Streeter


On Wednesday 06 December 2006 08:55, d.gottst...@gmx.de wrote:
> Hello everybody,
>
> I'm currently working on a java project in which, after loading a pdb-file,
> I need to add Hydrogens to the molecules. Since Pymol has an implemented
> method for this problem, I'd be interested in the algorithm used, so I can
> reimplement it in java. Does anybody know if there is a publication, where
> I can find it? Another approach I am following is the usage of the CDK
> package, but I'm not really sure how to apply it to my problem and how good
> the method works. I'd be thankful for any help I can get ;).
>
> greetings, Danrik

--








__
Stuart T. Endo-Streeter
Structural Biology and Biophysics
Dept. Biochemistry
LSRC C266
Duke University
919-681-1668
stuart.endostree...@duke.edu

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
PyMOL-users mailing list
PyMOL-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pymol-users





Re: [PyMOL] (no subject)

2006-11-07 Thread gilleain torrance

Hi,

I don't know how simple you want it, but python lets you print just like:

   print cmd.distance(a, b)

assuming that a and b are strings that are atom selections. See

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

for a more complex example! :)

gilleain


On 11/7/06, Giacomo Bastianelli  wrote:


Dear Users,

I would like with a simple script to export
some data regarding distances.
Do any of you know how to write an output with
all distances that I set up?

Thanks in advance

Giacomo



Giacomo Bastianelli

EIMID Ph.D Fellow (www.eimid.org)

Marie Curie EST

gbast...@pasteur.fr

Unité de Bioinformatique Structurale

Institut Pasteur

25-28 Rue de Dr.Roux

75015 Paris, France

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job
easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

___
PyMOL-users mailing list
PyMOL-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pymol-users







Re: [PyMOL] .pl file handling in pymol

2006-09-16 Thread gilleain torrance

ummm.

PY-mol not handling perl is not really a bug...

:)

gilleain


On 9/16/06, vijay  wrote:


 dear pymol users,
   I got a bug in pymol with .pl file produced by
pdbsum clefts (see this link,
http://www.ebi.ac.uk/thornton-srv/databases/cgi-bin/pdbsum/GetPage.pl?pdbcode=1fcc&template=clefts.html&pdbcode=1fcc&r=speedfill
 open
the rasmol format clefts file, it will open in .pl formate), which produces
3D coordinates with perl script to make different colors in the surface
clefts based on the cleft volume and depth. when i download it as .pl file
and it can be open by pymol or rasmol, the problem is the clefts which are
shown in different colors by perl script is not working. what i am getting
is all the clefts are colored in same, so i cant able to distinguish the
clefts depth by color difference, here the problem is the perl coding for
making colors is not recognized by the pymol or rasmol programs.

can anyone help out on this bug.

Regards,
 vijay

--
Find out what India is talking about on - Yahoo! Answers 
India
Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get
it 
NOW


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job
easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

___
PyMOL-users mailing list
PyMOL-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pymol-users





Re: [PyMOL] Wizard modification

2006-09-10 Thread gilleain torrance

Hi,

Yes, the wizards are just pymol classes in individual modules in the
wizard/ subdirectory of the main pymol. So, on the mac :

/Applications/MacPyMOL.app/pymol/modules/pymol/wizard/measurement.py

but, I guess in a similar place in other installations.

I've tried my hand briefly at wizard programming, and I seem to
remember some key things are that the interface is auto-generated from
a list of lists (the get_panel method) and that the "_" prefix to
selections makes them invisible; that is, they don't appear in the
sidebar like other selections.

gilleain

On 9/8/06, Mark A Saper  wrote:

Is there a way to modify the code of the Measurement wizard or to
load a new copy of it?  I'd like a Nonpolar neighbor option that will
look for nonpolar atoms with  > 3.0 and <4.1 Å from picked atom.
I've written an alternative command to do this but it would be useful
for students if it were in the wizard.

Thanks,
Mark
_
Mark A. Saper, Ph.D.
Associate Professor of Biological Chemistry
Biophysics Research Division, University of Michigan
930 N University Ave
Ann Arbor MI 48109-1055   U.S.A.

sa...@umich.edu(734) 764-3353fax (734) 764-3323
http://www.biochem.med.umich.edu/biochem/research/profiles/saper.html



-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
PyMOL-users mailing list
PyMOL-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pymol-users





Re: [PyMOL] secondary structure to different states

2006-07-20 Thread gilleain torrance

Hi Björn,

Odd. I can't reproduce this. I load 1a2p and 1a12 into states one and
two, hide, show cartoon, and bingo - I have two cartoons (in two
different states).

What happens if you load the first pdbfile twice? Or use another file
instead of p2? Or a newer version (I'm using MacPyMol 1.0.0b03)?

gilleain

On 7/20/06, Björn Kauppi  wrote:

Hi all,





If I read in a two pdb-files in different states, only the first one read in 
got assigned secondary structures.

Example:



load p1.pdb ,state=1

load p2.pdb ,state=2

hide all

show cartoon



only p1 has arrows and helixes the p2 has fat tubes.



I also tried define it explicitly with dss:



dss p1, state=1

dss p2, state=2



with only effect that p2 now has thinner tubes, please help!





Björn




***
This e-mail may contain confidential information proprietary to Karo Bio AB
and is meant for the intended addressee(s) only. Any unauthorized review,
use, disclosure or distribution is prohibited. If you have received this
message in error, please advise the sender and delete the e-mail and any
attachments from your files. Thank you!
***

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
PyMOL-users mailing list
PyMOL-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pymol-users





Re: [PyMOL] MacPyMol plug-ins

2006-05-21 Thread gilleain torrance

Hi,




this is a good idea, and a fairly easy one to implement. do you mean
present all of the pdb files (or the like) from a chosen directory in a
list, and load each molecule via a double-click?



Yes. Exactly. Probably with the directory as a button/textelement at the top
of the list? Whatever.

if you have experience coding in Xcode, plug-in development is fairly

straightforward.



Not really. I've never invested the time in learning how to use xcode. I
hope there's also a way to do it from a vi/command line style...

In a nutshell, you use the pymol api to send pymol commands. The only

funky part i've seen so far involves bridging Python and Objective C



Used py-objC bridge before, and it was okay.

thanks

gilleain


Re: [PyMOL] MacPyMol plug-ins

2006-05-19 Thread gilleain torrance

2) filelist:

Yes. Yes it does. Although typing "load " works too...

What I should have said was that I often find myself (and others in our
group have in the past) looking at a whole bunch of structures, one after
the other. When you are looking at 100s of structures in a row it gets
tiring to keep typing opening each structure with the menu or a load
command. (I once did this with rasmol for about 4 hours, continuously -
after a while you lose the ability to see a structure in 3D; it's quite
odd).

So.. it would be nice to have a gui element that displays a list of files
you are looking at (perhaps showing which ones you've looked at already?).
It occurred to me as I thought about /why/ I wnated such a thing that it
would be candy to combine this with the "command list" stephen mentioned to
get a kind of temporary script which would be run on each file in the list
when you opened it. A kind of frozen view (or a curried one?).

Maybe I should just make it. Then I wouldn't have to explain the idea.

4) sec struc elem:

No, not really. I kind of meant something like Roman's wireplots, e.g.  :

http://www.ebi.ac.uk/thornton-srv/databases/pdbsum/2bop/wirplot_01_01.gif

Or even maybe the nice shiny new topology plots they have :

http://www.ebi.ac.uk/thornton-srv/databases/pdbsum/2bop/domA01.gif

Or maybe even some kind of tops cartoon... if those lazy tops people can get
their acts together! :)

gilleain

On 5/19/06, Peter Adrian Meyer  wrote:



> 2) Filelist : show a directory as a list, to avoid repeated "load"
> commands.

Typing:
lst=os.listdir('.'); print lst
into the pymol prompt seems to do the trick (and you could loop over it if
you were so inclined).
Of course, it's not particuarly pretty/gui-friendly; but it works.

> 4) Secondary structure display.

Doesn't show cartoons do this already?

Pete


Pete Meyer
Fu Lab
BMCB grad student
Cornell University




Re: [PyMOL] MacPyMol plug-ins

2006-05-19 Thread gilleain torrance

Hi,

Some suggestions:

1) Header file display.
2) Filelist : show a directory as a list, to avoid repeated "load" commands.
3) Ramachandran plots : I keep meaning to try dynoplot on the hybrid
pymol, but never do.
4) Secondary structure display.

Oh the list is endless! But number one suggestion (suggestion 0, in fact) is :

0) Tutorial on writing aqua plugins.

Then we can make the others ourselves...

gilleain

On 5/18/06, stephen rouse  wrote:

Hi everyone:

A new plug-in architecture has been added to MacPyMol (available in
versions 1.00 beta 03 and later). This allows plug-ins to be developed
for MacPyMol using the native Mac development tools (Xcode) and
frameworks (Cocoa).
I have a couple of these plug-ins working, and so far they have proven
fairly useful. The first is a commands palette where you can save your
own pymol commands and execute them with a double-click.
The second gives you a table view of a molecule's PDB string, along
with the ability to make and save named pymol selections by interacting
with the contents of the table.

I'm in the process of creating a web page that explains these in more
detail, and figuring out an installer mechanism (the manual
installation method is decidedly non-mac-like) so anyone interested can
give them a try.

In the meantime, if any MacPyMol users have suggestions/requests for
plug-ins, i'd love to hear them.

-stephen



---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
PyMOL-users mailing list
PyMOL-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pymol-users





Re: [PyMOL] Permanent change of settings

2006-05-12 Thread gilleain torrance

".pymolrc" or "pymolrc". see :

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

gilleain


On 5/11/06, Praedor Atrebates  wrote:


I would like to make some settings I use permanent and default in pymol
because every time I start pymol or reinitialize and load a new pdb/pse I
have to make a series of changes again in the settings.  Is there a file
that
pymol uses to set its default settings?  What is its name?

I want sequence to always be displayed and I want sphere scaling to always
be
0.70 instead of 1.0.

praedor
--
The Reichstag fire is to Hitler as 9/11 is to Bush





[PyMOL] Re: building peptides

2006-03-15 Thread gilleain torrance
Hi,

The wiki has a page on this:

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

except it doesn't mention the zwitterion details. There's a link to
Robert Campbell's scripts to do this sort of thing, so maybe the
answer is there.

As for for loops, this is best in a full python script (run with
"run"). In fact, your pseudocode is almost valid python. More like:

residues = ("A", "C", "D", "E", "F", "G", "H"  etc)

for residue in residues:
 for i in range(3):
cmd._alt(residue.lower())
 cmd.set_geometry ??

cmd.save(aa.pdb, "all")

Unfortunately, I'm not sure the set_geometry command is right.

gilleain torrance

On 3/14/06, Alan  wrote:
> Hello List,
>
> I would like to have any help.
>
> I want to build several 3-peptides, like AAA, FFF, KKK etc. I also
> would like to make them zwitterionics, add chain and save as a PDB
> file.
>
> I know how to do that using the graphic interface, but I what I am
> looking for is a way to do it via pymol script.
>
> Is is possible? May anyone give a idea of how create the 3-peptides
> and put right N- and C- terminals?
>
> BTW, a loop with "for" is possible in pymol scripting?
>
> Summarising, I am trying a script like this:
>
> ---
> residue = ( ALA, ARG, etc)
>
> for res in residue:
>   'create peptide res-res-res'
>   'set NH3 in res 1 and COO- in res 3'
>
> save aa.pdb, all
> ---
>
> Thanks a lot for any help.
>
> Cheers,
> Alan
> --
> Alan Wilter S. da Silva, D.Sc. - Research Associate
> Department of Biochemistry, University of Cambridge.
> 80 Tennis Court Road, Cambridge CB2 1GA, UK.
>
>
> ---
> This SF.Net email is sponsored by xPML, a groundbreaking scripting language
> that extends applications into web and mobile media. Attend the live webcast
> and join the prime developer group breaking into this new coding territory!
> http://sel.as-us.falkag.net/sel?cmdlnk&kid0944&bid$1720&dat1642
> ___
> PyMOL-users mailing list
> PyMOL-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pymol-users
>



Re: [PyMOL] manipulate standard error ?

2006-03-09 Thread gilleain torrance
Hello,

yes. maybe. if you are talking about printing to standard error, then :

   import sys
   sys.stderr.write("hello, stderr!")

will do it.

if, on the other hand, you mean something more complicated to do with
manipulating the shell ("redirection"...?) than I don't know, sorry.

gilleain torrance

On 3/9/06, Sebastien Moretti  wrote:
>
> Hello,
> I would like to know if there is a way to manipulate standard error
> redirection into pymol scripting language ?
>
> Thanks
>
> --
> Sébastien Moretti
> http://www.igs.cnrs-mrs.fr/
> CNRS - IGS UPR 2589
> 163 Avenue de Luminy, case 934
> 13288 Marseille cedex 9 (France)
>
>
> ---
> This SF.Net email is sponsored by xPML, a groundbreaking scripting
> language
> that extends applications into web and mobile media. Attend the live
> webcast
> and join the prime developer group breaking into this new coding
> territory!
> http://sel.as-us.falkag.net/sel?cmdlnk&kid0944&bid$1720&dat1642
> ___
> PyMOL-users mailing list
> PyMOL-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pymol-users
>


Re: [PyMOL] Arrows Too Short?

2006-03-06 Thread gilleain torrance
Hello,

This is only my opinion right...

But it seems to me that converting hbonds into secondary structure
elements (helices, strands, paperclips...) can be tricky at the
boundaries when bonds are just too short or just the other side of the
correct angle.

To illustrate this with 1m6q (which is a model, by the way, and has
some odd features, like not-quite-bonded sheets) I pick one of the
short sheets you circle (at least I think I do) : 379-383::423-427.


Re: [PyMOL] (no subject)

2006-03-06 Thread gilleain torrance
Hi,

I found out how to do ... something ... like this the other day.


[PyMOL] Re: using 1 button mouse with MacPyMol

2006-02-07 Thread gilleain torrance
I too have had this problem. Even if you switch to 2-button selecting,
I can't seem to zoom, no matter what finger-twisting combinations I
try!

I do have a usb mouse, but I wonder if this is now vital, or merely
still convenient?

gilleain torrance

On 2/7/06, andr...@biochem.utah.edu  wrote:
> Andrew,
>
> Just get a mouse and plug it into the USB port.  (If it has one button,
> it's not a mouse, it's a pain.)
>
>
> Andreas
>
>
> > Great job with MacPyMol 0.99.
> >
> > I've been using version 0.98 on my ibook for a while and I was able to
> > manipulate views fairly well with the 1 button laptop mouse.  In
> > version 0.99 I can't seem to zoom in and out with just a one button
> > mouse.  Is it possible, or is there some sort of hack that can be
> > applied such as reassigned mouse commands?
> >
> > Andrew Wollacott, PhD
> > Baker Research Lab
> > University of Washington
> >
> >
> > ---
> > This SF.net email is sponsored by: Splunk Inc. Do you grep through log
> > files
> > for problems?  Stop!  Download the new AJAX search engine that makes
> > searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> > http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642
> > ___
> > PyMOL-users mailing list
> > PyMOL-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/pymol-users
> >
>
>
> --
>-->   Andreas Förster   <--
>  8 rue Doudart de Lagrée, 38000 Grenoble
> ++33.(0)438.866201 and ++33.(0)456.452000
>b5foan at skype and yahoo messenger
>  docandreas.blogspot.com
>
>
>
> ---
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
> for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> http://sel.as-us.falkag.net/sel?cmdlnk&kid3432&bid#0486&dat1642
> ___
> PyMOL-users mailing list
> PyMOL-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pymol-users
>



Re: [PyMOL] Bfactor

2006-01-17 Thread gilleain torrance
"...get at..."? "...display..."?

To access the B-factors, you can use "iterate" - as in "iterate resi 1,
print round(b, 2)". That will print out the b-factor for each atom in the
first residue.

gilleain torrance

On 1/16/06, Bingding Huang  wrote:
>
> How can I the Bfactor for each residue in pymol script?
>
> Bingding
>
>
>


Re: [PyMOL] Python scripting for Pymol

2006-01-06 Thread gilleain torrance
Hi,

I tried a similar, but simpler, example :

def mol2png(name):
cmd.png(name)
cmd.delete(name)

called as 'mol2png("1a2pA")', given that I have an object called "1a2pA"
loaded.

It works just fine on my laptop (mac).

Odd.

gilleain torrance

On 1/6/06, Jerome PANSANEL  wrote:
>
> Hi,
>
> I writing a small script in python, in order to export png picture from a
> MDL
> sdfile.
> Here is a sample of the function :
>
> def mol2png(ctfile,name):
> pymol.cmd.read_molstr(ctfile,name)
> pymol.cmd.set("valence",1)
> pymol.cmd.color("black","elem c")
> pymol.cmd.color("red","elem o")
> pymol.cmd.color("blue","elem n")
> pymol.cmd.color("yellow","elem s")
> pymol.cmd.bg_color("white")
> pymol.cmd.zoom(name)
> pymol.cmd.png(name)
> time.sleep( 1 )
> pymol.cmd.delete(name)
>
>
> It works fine only if I have the function time.sleep(1). If not, I have
> only
> empty pictures. Is there another solution to delete the molecule only when
> the png file has been written ?
>
> Thanks,
>
> Jerome Pansanel
>
>
>
> ---
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log
> files
> for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
> ___
> PyMOL-users mailing list
> PyMOL-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pymol-users
>


Re: [PyMOL] MacPyMOL command entry

2005-12-22 Thread gilleain torrance
Hi,

I've noticed this too, it can be quite frustrating. Oddly, the histories for
the two windows (main, and command) seem to be different.

I have never managed to work out what the problem is, but I sometimes wonder
if it is to do with whether a function returns a result or not? (Wild guess!
:)

gilleain

On 12/22/05, Mark A Saper  wrote:
>
> Hi,
>
> Happy Holidays everyone.  This is actually a bug report for Warren.
> If you have time, could you work on the implementation of the command
> recall option (up and down arrow) in the command text input field in
> the OS X-specific part of the window.  It often forgets what the
> previous commands are.
>
> Many thanks,
> Mark
> _
> Mark A. Saper, Ph.D.
> Associate Professor of Biological Chemistry
> Associate Research Scientist in Biophysics
>
> Biophysics Research Division, University of Michigan
> Chemistry Building Room 3040
> 930 North University Ave
> Ann Arbor MI 48109-1055 U.S.A.
>
> sa...@umich.edu(734) 764-3353fax (734) 764-3323
> http://www.biochem.med.umich.edu/biochem/research/profiles/saper.html
>
>
>
>
> ---
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log
> files
> for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
> ___
> PyMOL-users mailing list
> PyMOL-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pymol-users
>


Re: [PyMOL] MacPyMOL 0.99beta29

2005-11-08 Thread Gilleain Torrance

Hi,

The link to the beta99:

http://delsci.com/beta/macpymol-0_99beta29.tar.gz

says "Page not found".

I wouldn't normally worry, but since using recent betas, my screen  
goes odd when waking from sleep. Which isn't much to worry about  
either (assuming it is caused by pymol, which I don't know for sure  
anyway).


gilleain

On 8 Nov 2005, at 03:39, Warren DeLano wrote:


MacPyMOL Users,

For those experiencing performance and/or flicker issues under 10.4.3,
please update to 0.99Beta29 -- this should be the fastest, most stable
MacPyMOL to date (~2-4X faster than betas 26-28).

http://delsci.com/beta

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



---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.  
Download

it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
PyMOL-users mailing list
PyMOL-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pymol-users




Re: [PyMOL] Question about custom CGO objects

2005-11-08 Thread Gilleain Torrance

Hi,

As I understand it, you can either make cgo's that are 'static' in  
shape (like a 3D stamp) or use pymol.callback objects, which can use  
arbitrary opengl commands (such as matrix rotations).


I actually made a cone, in response to someone's query, only I had to  
use callbacks to get triangle fans, and it appears that macpymol  
doesn't have opengl compiled in by default or something.


Here is my Cone class (mostly nicked from a tutorial on the web):

import math
from pymol.opengl.gl import *
from pymol.callback import Callback
from pymol import cmd

class Cone(Callback):

def get_extent(self):
return [[-10.0, -10.0, -10.0], [10.0, 10.0, 10.0]]

def __call__(self):
glPushMatrix()
glRotatef(xRot, 1.0, 0.0, 0.0)
glRotatef(yRot, 0.0, 1.0, 0.0)

# Begin a triangle fan
glBegin(GL_TRIANGLE_FAN)

# Pinnacle of cone is shared vertex for fan, moved up z-axis
# to produce a cone instead of a circle
glVertex3f(0.0, 0.0, 75.0)

# Loop around in a circle and specify even points along the  
circle

# as the vertices of the triangle fan
angle = 0.0
while angle < 2.0 * math.pi:

# Calculate x and y position of the next vertex
x = 50.0 * math.sin(angle)
y = 50.0 * math.cos(angle)

# Alternate color between red and green
if((iPivot %2) == 0):
glColor3f(0.0, 1.0, 0.0)
else:
glColor3f(1.0, 0.0, 0.0)

# Increment pivot to change color next time
iPivot += 1

# Specify the next vertex for the triangle fan
glVertex2f(x, y)
angle += (math.pi / 8.0)

# Done drawing fan for cone
glEnd()

# Begin a new triangle fan to cover the bottom
glBegin(GL_TRIANGLE_FAN)

# Center of fan is at the origin
glVertex2f(0.0, 0.0)
angle = 0.0
while angle < 2.0 * math.pi:
# Calculate x and y position of the next vertex
x = 50.0 * math.sin(angle)
y = 50.0 * math.cos(angle)

# Alternate color between red and green
if((iPivot %2) == 0):
glColor3f(0.0, 1.0, 0.0)
else:
glColor3f(1.0, 0.0, 0.0)

# Increment pivot to change color next time
iPivot += 1

# Specify the next vertex for the triangle fan
glVertex2f(x, y)
angle += (math.pi / 8.0)

# Done drawing the fan that covers the bottom
glEnd()

# Restore transformations
glPopMatrix()


rx, ry, rz = 1, 2, 3
cmd.load_callback(Cone(), 'cone')


Gilleain Torrance

On 8 Nov 2005, at 06:44, Andrew Wollacott wrote:


Hey all,
I recently made a cone class that will display cones using pymol
cgo's.  I built the cones using triangles as suggested by Warren  Now
I need to get the cones oriented properly, so I was wondering if it's
possible to apply a GL or rotation matrix when making the cgo.  I
guess if I can't do this then I can rotate the vertices of each
individual triangle, but I only want to do this as a last resort.

Any help would be appreciated.

Thanks,

Andrew Wollacott, PhD
Baker Research Group
The University of Washington


---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.  
Download

it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
PyMOL-users mailing list
PyMOL-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pymol-users





[PyMOL] Re: new MacPyMOL on Tiger : _opengl

2005-10-25 Thread Gilleain Torrance

Hi,

Using the callbacks on the newest macpymol on tiger doesn't work:

run /Applications/MacPyMOL.app/pymol/examples/devel/gl01.py

Traceback (most recent call last):
  File "/Users/delwarl/MacPyMOL/build/MacPyMOL.app/pymol/modules/ 
pymol/parser.py", line 273, in parse
  File "/Users/delwarl/MacPyMOL/build/MacPyMOL.app/pymol/modules/ 
pymol/parsing.py", line 407, in run_file
  File "/Applications/MacPyMOL.app/pymol/examples/devel/gl01.py",  
line 1, in ?

from pymol.opengl.gl import *
  File "/Applications/MacPyMOL.app/pymol/modules/pymol/opengl/gl/ 
__init__.py", line 21, in ?

import _opengl
ImportError: No module named _opengl

Not sure why, as there is a:

/System/Library/Frameworks/Python.Framework/Versions/Current/lib/ 
python2.3/site-packages/pymol/opengl/gl/_opengl.so


in existance.

gilleain torrance


On 14 Oct 2005, at 16:50, Warren DeLano wrote:


For cutting-edge Mac users, there is a new MacPyMOL for Tiger that
integrates into a single window and links to the system Python instead
of bringing its own copy (in part this is necessary preparation for
Intel...).

http://delsci.com/beta

Please let me know how it works for you!

Cheers,
Warren





Re: [PyMOL] very slow script for distance calculation

2005-10-25 Thread Gilleain Torrance

Hi,

I don't see how you can get rid of this loop actually.

The thing that occurs to me is that you are loading structures, but  
not deleting them!


So, at the other end of the "for i in KeepStruc" loop, you should  
have a "cmd.delete(i)".


Other than that, you don't need to be opening the files "out" or  
"full" inside the loop, or re-reading the data from "amb".


Hth.

gilleain torrance

On 25 Oct 2005, at 10:45, andrea spitaleri wrote:


Hi again, reading my post I found the bottleneckshame on me :)

here it is:
...
if (atomlig == "*"):
   ligand = cmd.select("ligand","segi B and "+i)
   atoms_lig = cmd.get_model('ligand')
   for atomsL in atoms_lig.atom:
   t = cmd.select("t","name "+atomsL.name)
   di = cmd.distance("di","t","p")
.
I am running twice the same loop. removing "for atomsL in  
atoms_lig.atom" loop it goes faster. The problem is that now I am  
getting the "di" value as average over all atoms of the ligand. How  
I can get the different values in order to find the minimum  
distance between the ligand and the selected residue ??


Thanks in advance

andrea


---
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
___
PyMOL-users mailing list
PyMOL-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pymol-users






Re: [PyMOL] Need testers for new MacPyMOL on Tiger

2005-10-14 Thread Gilleain Torrance

Hi,

Works great for me!

Very nice to have access to the system python.

gilleain torrance

On 14 Oct 2005, at 16:50, Warren DeLano wrote:


For cutting-edge Mac users, there is a new MacPyMOL for Tiger that
integrates into a single window and links to the system Python instead
of bringing its own copy (in part this is necessary preparation for
Intel...).

http://delsci.com/beta

Please let me know how it works for you!

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



---
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads,  
discussions,

and more. http://solutions.newsforge.com/ibmarch.tmpl
___
PyMOL-users mailing list
PyMOL-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pymol-users






Re: [PyMOL] Missing parts in cartoon mode

2005-10-14 Thread Gilleain Torrance

Which parts are missing? Looks fine to me...

Although the pdb file has some horrible features. Some residues are  
multiply defined (eg 170 in chain H) and there is some kind of poly- 
calcium binding tail in chain L.


gilleain torrance

On 14 Oct 2005, at 10:43,   
 wrote:



Hi everybody
I am getting quite desperate! For some strange reason PyMol do not  
display certain areas (several loops) of my .pdb file (1DAN) when  
in cartoon display mode. When I display the structure in "lines" or  
"sticks" everything is ok. Other pdb-viewers dont have this problem  
with the same .pdb file. I have tried several things:

1. Upgraded to the newest version og PyMol.
2. Redefined secondary structure using the "alter" command.
3. Imported the .pdb file into SwissViewer, saved as the imported  
structure as a .pdb file, and then imported into PyMOl.
None of these things have solved the problem. Help please! (I would  
hate to have to start using another pdb-viewer!!) Cheers Kasper


___
ICQ - You get the message, anywhere!
Get it @ http://www.icq.com






Re: [PyMOL] Small problem or inconsistency in showing cgo objects?

2005-10-10 Thread Gilleain Torrance

Hi,

I was curious, and tried this out.

Seems that "hide" means roughly the same as setting the  
representation to "none".


"Enable/disable" are the equivalents to clicking on the "name-button".

So, if you change the test script to have "cmd.disable('two')" at the  
end instead of 'hide', then it seems to do what you wanted it to do...


gilleain torrance

On 10 Oct 2005, at 22:12, Terry Jones wrote:


Hi. I've run into a slight pymol UI problem with cgo objects and I'm
wondering if I should be doing something differently or if it's a  
pymol

idiosyncrasy.

Here's a script:

from pymol.cgo import *
from pymol import cmd

one = [ SPHERE, 0.0, 0.0, 0.0, 1.0 ]
two = [ SPHERE, 2.0, 0.0, 0.0, 1.0 ]

cmd.load_cgo(one, 'one')
cmd.load_cgo(two, 'two')
cmd.hide('cgo', 'two')

When I load it into pymol (using the run command on the command  
line), the
'one' sphere appears. I expected to be able to click on the gray  
'two' item
on the right side of the pymol GUI and have the two sphere appear.  
But this
doesn't work. Instead, I have to click on 'S' next to the two  
indicator,
drag down to 'cgo' and then the sphere appears. After this initial  
step I
can turn the display of sphere two on and off with the 'two' toggle  
just

like I can do from the outset with the 'one' toggle/button.

Should the 'two' button toggle right away? If not, is there some pymol
command I can issue to enable that?

I hope this is clear enough. Please let me know if there's not enough
detail. I'm doing this with pymol 0.98 on Mac OSX 10.3.9. I get the  
same

behavior in both the Aqua pymol and the X11 hybrid.

Regards,
Terry


---
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads,  
discussions,

and more. http://solutions.newsforge.com/ibmarch.tmpl
___
PyMOL-users mailing list
PyMOL-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pymol-users






Re: [PyMOL] Using the Pymol Run command

2005-10-03 Thread Gilleain Torrance

Hi,

You can run arbitrary python programs using the command line "run"  
command:


run path_to_programs/python_program.py

The File->Run menu seems to prefer .pml files (that is, the dialog  
filters out all but these). And I think that  pml files are meant for  
line by line interpreting.


gilleain torrance

On 3 Oct 2005, at 12:20, Terry Jones wrote:


Hi all

I've written some python code that I want to run from inside pymol  
using
the File/Run command. After some playing around looking at error  
messages
and the pymol source, I saw that pymol is reading my file line by  
line and

passing each line to eval.

So if my file contains lines that are each complete python commands,
File/Run works fine. But if it contains python like

  if a == b:
pass

then File/Run fails with a syntax error (as eval falls over when it is
passed just the first line).

While I can see an obvious (and ugly) way to work around this, I  
wanted to
first ask if there is another way to do what I'm trying to achieve.  
Without
trying to understand too much of the pymol source, I can see it  
does use
execfile under some circumstances. Is there some recommended way to  
run a

file of code? Maybe my code should simply call execfile itself?

Thanks for any help,
Terry Jones


---
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads,  
discussions,

and more. http://solutions.newsforge.com/ibmarch.tmpl
___
PyMOL-users mailing list
PyMOL-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pymol-users






Re: [PyMOL] using a variable name within a selection

2005-09-14 Thread Gilleain Torrance

Hi,

The last line in your script needs to be something like:

cmd.pair_fit("/" + model + "///30-35/CA", "/template///289-294/CA")

or, more compactly:

cmd.pair_fit("/%s///30-35/CA" % model, "/template///289-294/CA")

this will expand the 'model'  variable correctly to whatever it was  
set to at the top of the loop.


gilleain torrance

On 15 Sep 2005, at 01:50, Xavier Deupi wrote:


Hi,

I'm trying to write a script to load a series of model peptides and  
superimpose them to a template structure.


The part that actually loads the models and superimpose them looks  
like this:


for i in range(1,100):
   model = 'model.pdb.' + str(i)
   cmd.load(model)
   cmd.hide("everything", model)
   cmd.show("ribbon", model)
   cmd.pair_fit ("/model///30-35/CA", "/template///289-294/CA")

The models are properly loaded (from model.pdb.1 to model.pdb.100)  
and displayed; i.e. the variable 'model' is being understood by  
pymol. But it seems that it is not recognized by the selection in  
the pair_fit command. I get the following error message:


Selector-Error: Misplaced ).
Selector-Error: Malformed selection.
( ( model ) <--
ExecutiveRMS-Error: Atom counts between selection sets don't match  
(0 != 6).


... which seems a pretty straightforward error message. I've tried  
different 'alternative syntaxes', but I can't get the correct form.


Any help?

Thanks in advance

xavi

--
Xavier Deupi, Ph.D.
Department of Molecular and Cellular Physiology
Beckman Center for Molecular and Genetic Medicine (B161)
279 Campus Drive, Stanford University School of Medicine
Stanford, CA 94305 (USA)

E-mail: xavier.de...@stanford.edu
Phone: +1 (650) 725-6497
Fax : +1 (650) 725-8021



---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.  
Download it for free - -and be entered to win a 42" plasma tv or  
your very
own Sony(tm)PSP.  Click here to play: http://sourceforge.net/ 
geronimo.php

___
PyMOL-users mailing list
PyMOL-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pymol-users






Re: [PyMOL] movies in MacOSX

2005-07-20 Thread Gilleain Torrance
Of course, this assumes you have purchased a QuickTime Pro (tm) key for £20
($25)...

gilleain


On 20/7/05 23:44, "Reinhold Penner"  wrote:

> Xavier,
> 
> since you're on a Mac, it's easy enough to just fire up QuickTime
> Player and select File->Open Image Sequence. This will prompt you to
> select the first png file in a folder and load all other pngs with
> the same base name in that folder. Then simply export these frames as
> a movie with any of the available quicktime codecs at a frame rate
> you like. It's totally simple.
> 
> HTH,   -Reinhold
> 
> On Jul 20, 2005, at 12:14 PM, Xavier Deupi wrote:
> 
>> Hi,
>> 
>> I've produced a series of png files using PyMOL, and I want to
>> compress them to produce a movie. I was considering to use mencoder
>> (following the suggestions in the PyMOL wiki), but I'm having some
>> problems in running it under MacOSX
>> 
>> Briefly, mencoder complains because it can't find the mpng codec. I
>> downloaded a codecs.conf file and copied to ~/.mplayer, but it
>> doesn't help.
>> 
>> Are any of you using mencoder in a mac? If so, I'd like to get some
>> advice.
>> 
>> Thanks in advance,
>> 
>> Xavier
>> 
>> -- 
>> Xavier Deupi, Ph.D.
>> Department of Molecular and Cellular Physiology
>> Beckman Center for Molecular and Genetic Medicine (B161)
>> 279 Campus Drive, Stanford University School of Medicine
>> Stanford, CA 94305 (USA)
>> 
>> E-mail: xavier.de...@stanford.edu
>> Phone: +1 (650) 725-6497
>> Fax : +1 (650) 725-8021
>> 
>> 
>> 
>> ---
>> SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
>> from IBM. Find simple to follow Roadmaps, straightforward articles,
>> informative Webcasts and more! Get everything you need to get up to
>> speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
>> ___
>> PyMOL-users mailing list
>> PyMOL-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/pymol-users
>> 
> 
> 
> 
> ---
> SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
> from IBM. Find simple to follow Roadmaps, straightforward articles,
> informative Webcasts and more! Get everything you need to get up to
> speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
> ___
> PyMOL-users mailing list
> PyMOL-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pymol-users
> 




Re: [PyMOL] Generating a 3D Object in any position

2005-07-11 Thread Gilleain Torrance
Hi,

I got curious about this, did a search through the docs, did a google, and
now (a day later) I have a partial solution. I should get back to work...

I've posted on the wiki:

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

a script which makes ellipsoids. yellow ones, although that is easily
changed. 

I realised too late that the GLU library lets you make Quadric objects, but
it doesn't seem to let you make ellipsoids, only spheres. I may be wrong on
this, so maybe the script could be simplified greatly...

Anyway, the only problems with this approach are that a) it's probably a bit
inefficient (could use the Numeric module) and b) you can't ray-trace
callback objects.

Hope this is helpful!

gilleain torrance


On 11/7/05 10:27, "tanri...@stud.uni-frankfurt.de"
 wrote:

> Hi everybody,
> 
> I want to vizualize 3D-ellipsoids around molecules. Is there any built-in
> PyMOL/Python method to do so? If not: how am I going to generate ellipsoids or
> dots at any position (x,y,z) in the space?
> Thanx for your help.
> 
> cheers,
> 
> Yusuf
> 
> 
> ---
> This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
> July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
> core and dual graphics technology at this free one hour event hosted by HP,
> AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
> ___
> PyMOL-users mailing list
> PyMOL-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pymol-users
> 




Re: [PyMOL] script to write down distances ligand-protein: need feedback

2005-07-05 Thread Gilleain Torrance
Hi,

I suppose that these numbers are the atom_ids. It's probably the same
numbers returned by the cmd.index function.

I guess you could test this by typing "select atom260, id 260" and see if
that makes a selection with atom260...

As for the speed question, I have no idea. More of a question for Mr DeLano
:) Calculating pairwise like this is always going to be computationally
expensive, but I don't know ways to speed this up.

gilleain torrance


On 5/7/05 15:17, "Andrea Spitaleri"  wrote:

>>   HBA = cmd.distance('HBA', '(lig and acc)','(active and don)', 3.2)
> yes thanks for the trick. However, I edited my script to:
> DistOutput.write(" %14s  %14s %8s %8s\n"%("donor","acceptor","hba","hbd"))
> DistOutput.write(" %14s  %14s %8.3f %8.3f\n"%(Don,Acc,HBA,HBD))
> but I cannot figure out the meaning of the output:
> complex_1
>   donoracceptor  hba  hbd
> 260 2712.536   -1.000
> complex_2
>   donoracceptor  hba  hbd
> 391 4092.489   -1.000
> complex_3
>   donoracceptor  hba  hbd
> 522 5472.512   -1.000
> complex_4
>   donoracceptor  hba  hbd
> 653 6852.456   -1.000
> what the numbers under donor and acceptor are?
> 
>> 
>>   atoms_Don = cmd.index('don')
>> 
> 
> I tried also this option and it works fine (more or less) excet that
> it takes a lot time to calculate all the distance (quite weird on my
> dual-cpu 3Gz intel)
> this is the loop used:
>for donor in atoms_Don:
> for acceptor in atoms_Acc:
> di = cmd.get_distance("%s`%d"%donor,"%s`%d"%acceptor)
> DistOutput.write("%8s %8s %8.3f\n"%(donor,acceptor,di))
> 
> thanks
> 
> Regards
> 
> andrea
> 
> 
> ---
> SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
> from IBM. Find simple to follow Roadmaps, straightforward articles,
> informative Webcasts and more! Get everything you need to get up to
> speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click
> ___
> PyMOL-users mailing list
> PyMOL-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pymol-users
> 




Re: [PyMOL] script to write down distances ligand-protein: need feedback

2005-07-05 Thread Gilleain Torrance
Hi,

Well, the cmd.distance method seems to take minimum 4 parameters, not three:

cmd.distance( string name, string selection1, string selection2, string
cutoff, string mode )

where 'mode' is not important.

So, in the script you give, the line:

  HBA = cmd.distance('(lig and acc)','(active and don)',3.2)

could become

  HBA = cmd.distance('HBA', '(lig and acc)','(active and don)', 3.2)

or, if you use the atom ids that you get from the (commented out) lines:

  atoms_Don = cmd.index('don')

you could use cmd.get_distance in a loop:

   for donor in atoms_Don:
  for acceptor in atoms_Acc:
 DistOut.write("%s" % cmd.get_distance(donor, acceptor))

or something.

gilleain torrance

On 5/7/05 11:50, "Andrea Spitaleri"  wrote:

> Hi guys,
> I am trying to make a script to automatize a procedure. I have got a
> file where I can pick up the structure of protein-ligand complexes
> cluster
> The script below read the number of the cluster and then visualize
> them align with a protein reference. Everything is fine except I'd
> like write on a file the distances between some residues of each
> structure with the ligand but I cannot figure out how do it. I read
> different post but it seems that I missing something.
> 
> thanks a lot
> 
> Regards,
> 
> andrea
> 
> # CUT HERE #
> from pymol import cmd
> import string, sys, os
> 
> def read_cluster(number):
> cmd.reinitialize()
> cmd.load('/home/pippo/ref.pdb','ref')
> cmd.select('Refactive','resi 17+20+23+25+26+43+44 in ref')
> HoL = {}
> FileToOpen = 'Dist' + number
> DistOutput = open(FileToOpen,'w')
> DistOutput.write("ATOM_PROTEIN ATOM_LIGAND DISTANCE\n")
> out = open('cluster.out','r')
> pro_atoms = cmd.get_model("ref")
> # read cluster file
> for i in out.readlines():
> i=string.strip(i)
> tmp = string.split(i," ")
> index, elems = tmp[1], tmp[3:len(tmp)]
> HoL[index] = elems
> # visualize the structures of cluster number
> for eachElem in HoL[number]:
> newElem = eachElem + '.pdb'
> cmd.load(newElem.strip(),eachElem)
> cmd.select('active','resi 17+20+23+25+26+43+44')
> cmd.select('lig','resn CBO')
> cmd.select('ligDon','(elem n,o and (neighbor hydro) in lig)')
> cmd.select('ligAcc','(elem o or (elem n and not (neighbor
> hydro)) in lig)')
> Don = cmd.select('don','(elem n,o and (neighbor hydro))')
> Acc = cmd.select('acc','(elem o or (elem n and not (neighbor
> hydro)))')
> # atoms_Don = cmd.index('don')
> # atoms_Acc = cmd.index('acc')
> HBA = cmd.distance('(lig and acc)','(active and don)',3.2)
> HBD = cmd.distance('(lig and don)','(active and acc)',3.2)
> cmd.align('ref',eachElem)
> DistOutput.write(" %14s  %14s %8.3f\n"%(Don,Acc,HBA))
>  
> DistOutput.close()
>  
> cmd.extend('read_cluster',read_cluster)
> ## CUT HERE 
> 
> 
> ---
> SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
> from IBM. Find simple to follow Roadmaps, straightforward articles,
> informative Webcasts and more! Get everything you need to get up to
> speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click
> ___
> PyMOL-users mailing list
> PyMOL-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pymol-users
> 




[PyMOL] Re: pdb-l: protein visualization/interaction tools?

2005-06-12 Thread Gilleain Torrance
Hi Marty,

Sorry if this misses your point, but it is possible to translate molecules
independantly in pymol:

http://sourceforge.net/mailarchive/message.php?msg_id=11658301

However, that won¹t help if you want to show overlap. To do this, you would
have to repeatedly call translate and distance over a particular vector:

def translateAndMeasure(selection, other, translationVector, cutoff):
cmd.translate(translationVector, selection)
return checkDistances(selection, other, cutoff)

def checkDistances(moleculeA, moleculeB, cutoff):
ids_A = getIds(moleculeA)
ids_B = getIds(moleculeB)
for idA in ids_A:
for idB in idsB:
d = distance(moleculeA, idA, moleculeB, idB)
if d > cutoff: return "overlap"
return "no overlap"

def distance(a, idA, b, idB):
atomA = "%s and id %s" % (a, idA)
atomB = "%s and id %s" % (b, idB)
return cmd.get_distance(atomA, atomB)

def getIds(selection):
my_dict = { 'my_list' : [] }
cmd.iterate(selection, "my_list.append(ID)", space=my_dict)
return my_dict['my_list']

to use, you would call it like :

print translateAndMeasure("molA", "molB", [1,0,0], 4)

which would print "overlap" if any of the atoms in molA or molB were within
4 Angstrom after translating by 1 along X.

Of course, this could be improved to report exactly /which/ atoms were
overlapping, or to make distance objects (using cmd.distance) to show them.

Also, it is entirely possible that there is a way to do this more easily in
pymol that I missed :)

gilleain torrance

On 12/6/05 20:00, "Marty Taylor"  wrote:

> Hello,
>  
> I am looking for a tool to help me build structural models of protein-protein
> interactions. Does anyone know of any software that can both visualize and
> move around large molecules? Even better, ones that will tell me (or show me!)
> when atomic radii start to overlap?
>  
> Currently I am holding one molecule still and doing a series of translations
> by hand of the other, then visualizing in PyMOL, then translating again, and
> it is very difficult to make any progress.
>  
> thanks in advance!
>  
> Marty Taylor
> Department of Chemical Engineering
> Princeton University
> mstay...@princeton.edu




[PyMOL] using package Scientific from within pymol on OS X-X11 hybrid

2004-10-13 Thread gilleain torrance
I guess this might seem obvious to some people, but I wanted to use Vectors 
and Objects3D from pymol scripts, but I couldn't see how.


however, it turns out that if you copy the entire (python) source tree of 
Scientific - IE:


"ScientificPython/Scientific/"

into

"/Applications/PyMolX11blahHybridetc/py23/lib/python2.3/site-packages"

(er..and restart pymol (this foxed me for a while :) )

you can say :

from Scientific.Geometry import Vector
print Vector((0,0,0))

and get

[0 0 0]

hopefully! Anyway, there might be a better way, but this works. One tiny 
glitch is the change from Numeric to numarray. This can be 'fixed' 
('hacked') by using *cough*perl*cough*:


perl -i -p -e 's/Numeric/numarray/g' *.py */*.py

which should substitiute all instances of 'Numeric' with 'numarray'.

gilleain torrance