Re: [PyMOL] Can't undo anymore

2012-10-23 Thread Joel Tyndall
Hi Again,

Thanks Jason for the update. Turns out PyMOL is not broken, but undo is simply 
turned off. See below for details.


In version v1.5 we added a better undo. However, to stop it from eating up all 
your RAM we disabled it for very large systems like proteins. Since it's PyMOL 
you can always change this via the settings. Before you load and edit a large 
molecule, please type,



set suspend_undo_atom_count, 0



This setting when set to X will allow undo on objects with fewer than X atoms. 
If set to 0 it's unlimited and thus works on all objects. So,



set suspend_undo_atom_count, 2500



will allow undo on objects with 2500 or fewer atoms.



Undo prior to v1.5 could only undo 15 levels of atom conformations across one 
protein. Now, undo can handle the following changes:

  * conformational changes

  * multiple object support

  * addition/removal of atoms

  * addition/removal of bonds

  * addition/removal of fragments

  * addition/removal of objects

  * changes in valence

  * changes in atom types

  * editing discrete objects

  * full support in the Builder

Cheers

Joel



From: Joel Tyndall [mailto:joel.tynd...@otago.ac.nz]
Sent: Tuesday, 23 October 2012 11:54 a.m.
To: pymol-users@lists.sourceforge.net
Subject: [PyMOL] Can't undo anymore

Hi All,

In previous versions you could move a torsion angle (Ctrl-W click) and if you 
selected the wrong end of the bond, you could undo this. Now it seems that the 
undo is deactivated. Is it possible to have this reinstated? It was very handy.

Currently on 1.5.0.4 on Windows

Cheers

Joel

_
Joel Tyndall, PhD

Senior Lecturer in Medicinal Chemistry
National School of Pharmacy
University of Otago
PO Box 56 Dunedin 9054
New Zealand
Skype: jtyndall

Ph: +64 3 479 7293

--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct___
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] wire-mesh spheres?

2012-10-23 Thread Matthew Baumgartner

Hi,
Is it now possible to have wire mesh cgo object spheres in pymol?
I found this thread from a while ago (2004) but googleing, I didn't
find anything more recent.


The one sort of work around that I though of was to create pseudo-atoms
and somehow modify their radius and then show them as mesh.
But I would like to use CGO objects if possible.

Does anyone have any suggestions?

Thanks,
Matt Baumgartner




Sphere transparency example included below...

ALPHA must preceed COLOR to be effective.

PyMOL does not yet do a global sort of tranparent triangles, so there will
be artifacts in OpenGL.  Raytracing should look fine however.

# from within a .py OR .pym file...

from pymol.cgo import *
from pymol import cmd

obj = [

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

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

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

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

cmd.load_cgo(obj,'cgo01')

Cheers,war...@delanoscientific.com
Warren

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

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


> -Original Message-
> From:pymol-users-ad...@lists.sourceforge.net  
> [mailto:pymol-users-ad...@lists.sourceforge.net] On Behalf Of

> Michael George Lerner
> Sent: Wednesday, November 17, 2004 9:43 AM
> To:pymol-users@lists.sourceforge.net
> Subject: [PyMOL] wire-mesh spheres?
>
>
> Hi,
>
> I want to draw a bunch of spheres of various sizes and
> colors.  I'm currently using cgos for this.  No problem.
> Now, I also want to draw wire-mesh spheres.  Does anyone have
> a script for making these?  While I'm at it, is there a way
> to make cgos transparent?
>
> Thanks,
>
> -Michael
>
> --
> This isn't a democracy;|_  |Michael Lerner
>   it's a cheer-ocracy.  | ASCII ribbon campaign ( ) |   Michigan
> -Torrence,  Bring It On|  - against HTML email  X  |  Biophysics
> |   / \ | mler...@umich
>
>
> ---
> This SF.Net email is sponsored by: InterSystems CACHE FREE
> OODBMS DOWNLOAD - A multidimensional database that combines
> robust object and relational technologies, making it a
> perfect match for Java, C++,COM, XML, ODBC and JDBC.
>www.intersystems.com/match8  
> ___

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


--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct___
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] Custom menus and shortcuts?

2012-10-23 Thread Jason Vertrees
Hi Boris,

David Hall's suggestions are perfect.

Let me offer one more. If you can put up with programming a little
Python, check out pymol/modules/pymol/menu.py and
pymol/modules/pymol/preset.py. In menu.py you could add a "No W" menu
option (or similar) to the A > Preset >

Cheers,

-- Jason

On Tue, Oct 23, 2012 at 6:02 AM, Boris Kheyfets  wrote:
> Hello PyMOL users,
>
> Menus
> =
>
> Is there a way I can add custom menu in PyMOL?
>
> Ideally I'd like to be able to call both
>
> * pml scripts, as well as
> * full python pymol scrpts
>
> Shortcuts
> =
>
> Similarly -- is there a way I can bind exectution of given
>
> * pml script, or
> * full python pymol script
>
> to a given key?
>
> The problem
> ===
>
> The basic problem
> -
>
> The basic problem is to automate tasks one repeats frequenlty. For example I
> had to type::
>
>   select notW, not (resn W)
>   hide all
>   show spheres, notW
>
> frequently.
>
>
> The problem which leads to the need of menu
> ---
>
> So I make a pml or full-python pymol script and load it.
>
> But then I have to remember the name of the script. Which is terrible --
> because I have custom scripts in each and every program that I use.
>
>
> The problem which leads to the need of custom shortcuts
> ---
>
> Having custom menu us great as a reminder of what scripts have You written.
> But it's terrible to click through the menus. One is much better with
> shorcuts (hotkeys).
>
>
>
>
> --
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_sfd2d_oct
> ___
> 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



-- 
Jason Vertrees, PhD
PyMOL Product Manager
Schrödinger, Inc.

(e) jason.vertr...@schrodinger.com
(o) +1 (603) 374-7120

--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
___
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] Custom menus and shortcuts?

2012-10-23 Thread Boris Kheyfets
Found a solution.

Basically it is to add

pmg_tk/startup/newmenu.py

file with the following content:

from Tkinter import *
from pymol import cmd

def __init__(self):
self.menuBar.addmenu('NewMenu', 'Sample Menu')

self.menuBar.addmenuitem('NewMenu', 'command',
 'White background',
 label='White Background',
command = lambda : cmd.set("bg_rgb","[1,1,1]"))

self.menuBar.addmenuitem('NewMenu', 'command',
 'Black background',
 label='Black Background',
 command = lambda : cmd.set("bg_rgb","[0,0,0]"))

This adds the menu.

I got what I wanted with:


   - .pymolrc:

# custom scripts:
import imp
imp.load_source('bk_pymols', os.path.expanduser('~/.pymolrc.py'))



   - .pymolrc.py

from pymol import cmd

def bk_notW ():
"Makes notW selection."
cmd.select("notW", "not (resn W)")

def bk_hides_W ():
"Hides W molecules."
cmd.hide("all")
cmd.show("spheres", "not (resn W)")

cmd.set_key('ALT-N', bk_notW)
cmd.set_key('ALT-W', bk_hides_W)


   - and finally -- pmg_tk/startup/BK.py:

from Tkinter import *
from pymol import cmd

# custom scripts:
import imp, os
imp.load_source('bk_pymols', os.path.expanduser('~/.pymolrc.py'))
from bk_pymols import bk_notW, bk_hides_W


def __init__(self):
self.menuBar.addmenu('BK', 'My menus!')

self.menuBar.addmenuitem('BK', 'command',
 'Makes notW [Alt-n]',
 label='Makes notW [Alt-n]',
command = bk_notW)

self.menuBar.addmenuitem('BK', 'command',
 'Hides W mols [Alt-w]',
 label='Hides W mols [Alt-w]',
 command = bk_hides_W)

Works like a charm: I have custom menus and I can bind any of its entries
to a key.

But I want bk_hides_W to be a toggler. So I need a way to set a state of my
defun.
If I do

def bk_toggles_W ():
"Hides W molecules."
if cmd.get("bk_toggles_W"):
cmd.hide("all")
cmd.show("spheres", "not (resn W)")
cmd.set("bk_toggles_W", 0)
else:
cmd.show("spheres", "resn W")
cmd.set("bk_toggles_W", 1)

pymol is upset -- I think it is because it doesn't know bk_toggles_Wsetting:

Error: 1
QuietException Exception in Tk callback
  Function:  (type: )
  Args: ()
Traceback (innermost last):
  File "/usr/lib/python2.7/dist-packages/Pmw/Pmw_1_3/lib/PmwBase.py", line
1747, in __call__
return apply(self.func, args)
  File "/home/boris/.pymolrc.py", line 67, in bk_toggles_W
if cmd.get("bk_toggles_W"):
  File "/home/boris/.local/lib/python2.7/site-packages/pymol/setting.py",
line 1300, in get
raise QuietException
QuietException: 

How can I add the setting to pymol?

--
Boris.

On Tue, Oct 23, 2012 at 5:17 PM, Jason Vertrees <
jason.vertr...@schrodinger.com> wrote:

> Hi Boris,
>
> David Hall's suggestions are perfect.
>
> Let me offer one more. If you can put up with programming a little
> Python, check out pymol/modules/pymol/menu.py and
> pymol/modules/pymol/preset.py. In menu.py you could add a "No W" menu
> option (or similar) to the A > Preset >
>
> Cheers,
>
> -- Jason
>
> On Tue, Oct 23, 2012 at 6:02 AM, Boris Kheyfets 
> wrote:
> > Hello PyMOL users,
> >
> > Menus
> > =
> >
> > Is there a way I can add custom menu in PyMOL?
> >
> > Ideally I'd like to be able to call both
> >
> > * pml scripts, as well as
> > * full python pymol scrpts
> >
> > Shortcuts
> > =
> >
> > Similarly -- is there a way I can bind exectution of given
> >
> > * pml script, or
> > * full python pymol script
> >
> > to a given key?
> >
> > The problem
> > ===
> >
> > The basic problem
> > -
> >
> > The basic problem is to automate tasks one repeats frequenlty. For
> example I
> > had to type::
> >
> >   select notW, not (resn W)
> >   hide all
> >   show spheres, notW
> >
> > frequently.
> >
> >
> > The problem which leads to the need of menu
> > ---
> >
> > So I make a pml or full-python pymol script and load it.
> >
> > But then I have to remember the name of the script. Which is terrible --
> > because I have custom scripts in each and every program that I use.
> >
> >
> > The problem which leads to the need of custom shortcuts
> > ---
> >
> > Having custom menu us great as a reminder of what scripts have You
> written.
> > But it's terrible to click through the menus. One is much better with
> > shorcuts (hotkeys).
> >
> >
> >
> >
> >
> --
> > Everyone hates slow websites. So do we.
> > Make your web apps faster with AppDynamics
> > Download AppDynamics Lite for free today:
> > http://p.sf.net/sfu/appdyn_sfd2d_oct
> > ___
> > PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
> > Info Page: https://lists.sourc

Re: [PyMOL] Custom menus and shortcuts?

2012-10-23 Thread David Hall
http://pymolwiki.org/index.php/Set_Key 

http://pymolwiki.org/index.php/Extend is also useful. 

-David


On Tuesday, October 23, 2012 at 6:02 AM, Boris Kheyfets wrote:

> Hello PyMOL users,
> 
> Menus
> =
> 
> Is there a way I can add custom menu in PyMOL?
> 
> Ideally I'd like to be able to call both
> 
> * pml scripts, as well as
> * full python pymol scrpts
> 
> Shortcuts
> =
> 
> Similarly -- is there a way I can bind exectution of given
> 
> * pml script, or
> * full python pymol script
> 
> to a given key?
> 
> The problem
> ===
> 
> The basic problem
> -
> 
> The basic problem is to automate tasks one repeats frequenlty. For example I 
> had to type::
> 
>   select notW, not (resn W)
>   hide all
>   show spheres, notW
> 
> frequently.
> 
> 
> The problem which leads to the need of menu
> ---
> 
> So I make a pml or full-python pymol script and load it.
> 
> But then I have to remember the name of the script. Which is terrible -- 
> because I have custom scripts in each and every program that I use.
> 
> 
> The problem which leads to the need of custom shortcuts
> ---
> 
> Having custom menu us great as a reminder of what scripts have You written. 
> But it's terrible to click through the menus. One is much better with 
> shorcuts (hotkeys). 
> 
> 
> 
> --
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_sfd2d_oct
> 
> ___
> PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net 
> (mailto: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
> 
> 


--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net

[PyMOL] Custom menus and shortcuts?

2012-10-23 Thread Boris Kheyfets
Hello PyMOL users,

Menus
=

Is there a way I can add custom menu in PyMOL?

Ideally I'd like to be able to call both

* pml scripts, as well as
* full python pymol scrpts

Shortcuts
=

Similarly -- is there a way I can bind exectution of given

* pml script, or
* full python pymol script

to a given key?

The problem
===

The basic problem
-

The basic problem is to automate tasks one repeats frequenlty. For example
I had to type::

  select notW, not (resn W)
  hide all
  show spheres, notW

frequently.


The problem which leads to the need of menu
---

So I make a pml or full-python pymol script and load it.

But then I have to remember the name of the script. Which is terrible --
because I have custom scripts in each and every program that I use.


The problem which leads to the need of custom shortcuts
---

Having custom menu us great as a reminder of what scripts have You written.
But it's terrible to click through the menus. One is much better with
shorcuts (hotkeys).
--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct___
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