Re: [PyMOL] (small) Pymol feature request--filter for edit settings window

2006-04-20 Thread Jerome PANSANEL
Hello Michelle,

You can also edit the SetEditor.py file. The file is in the 
'/usr/lib/python2.3/site-packages/pmg_tk' directory on linux and add the 
feature. It can be done by adding to small portion of add-on code to the 
file. If you do so:

Keep a copy of the original file in a safe place !

Here is a part of the modified file:
###
class SetEditor:

   def __init__(self,app):

  self.app = app
  self.list = []
  for a in  pymol.setting.get_index_list():
 self.list.append(%-30s %s%(pymol.setting._get_name(a),
cmd.get_setting_text(a,'',-1)))

  self.index = {}
  c = 0
  for a in pymol.setting.get_name_list():
 self.index[a] = c
 c = c + 1
 
  self.dialog = Pmw.SelectionDialog(self.app.root,title=Settings,
  buttons = ('Edit', 'Done'),
   defaultbutton='Edit',
  scrolledlist_labelpos=N,
  label_text='Double click to edit',
  scrolledlist_items = self.list,
  command = self.command)
  self.dialog.geometry(500x400)

 # start of the add-on
  interior = self.dialog.interior()
  self.filter = Pmw.EntryField(interior,
  labelpos = 'w',
  label_text= 'Filter:',
  validate = None,
  command = self.filter_list)
  self.filter.pack()
  # end of the add-on

  self.listbox = self.dialog.component('scrolledlist')
  self.listbox.component('listbox').configure(font=app.my_fw_font)
  self.dialog.protocol('WM_DELETE_WINDOW',self.cancel)
  app.my_show(self.dialog)

  # start of the add-on
   def filter_list(self):
  self.list = []
  for a in pymol.setting.get_index_list():
  if self.filter.getvalue() in pymol.setting._get_name(a):
  self.list.append(%-30s %s%(pymol.setting._get_name(a),
   cmd.get_setting_text(a,'',-1)))
  self.dialog.setlist(self.list)
  self.dialog.update()
   # end of the add-on

   def cancel(self,event=None):
  self.command(result='Done')
###

This code works fine on my linux box. If you have some problem, don't hesitate 
to ask me !

Cheers,

Jerome Pansanel

Le Mardi 18 Avril 2006 18:02, Michelle Gill a écrit :
 While we're discussing ways to make our favorite program a little
 better, I had an idea I thought I'd throw out there...

 While making some figures the other day, I found myself scrolling
 endlessly through the edit settings menu (under Setting -- Edit All) a
 number of times, mostly to locate a relatively small number of settings
 related to ray tracing. This got me thinking about a way to improve
 access to the many wonderful features that have been added to PyMOL.

 The solution I came up with is a filter line which could be placed
 directly above the window listing all the settings. Users could then
 type a word, say ray or cartoon, and only the settings containing
 this word would be shown.

 The best example of a program containing this feature is the
 about:config window in Firefox. When you open a browser and type
 about:config instead of an address, a window containing hundreds of
 settings appears. At the top is a filter bar which you can use to pare
 down the number of settings listed below.

 I think this would be a great addition to PyMOL and would help users
 familiarize themselves with the many new settings which have been (and
 will be) implemented. :)

 Perhaps others have even better solutions to this problem. The use of a
 filter is just the first idea which came to my mind. I think it would be
 relatively easy to implement, although my python programming skills are
 somewhat limited.

 Thanks,
 Michelle Gill


 ---
 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?cmd=lnkkid=110944bid=241720dat=121642
 ___
 PyMOL-users mailing list
 PyMOL-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/pymol-users




Re: [PyMOL] (small) Pymol feature request--filter for edit settings window

2006-04-20 Thread Jerome PANSANEL
Hello Michelle,

You can also edit the SetEditor.py file. The file is in the 
'/usr/lib/python2.3/site-packages/pmg_tk' directory on linux and add the 
feature. It can be done by adding to small portion of add-on code to the 
file. If you do so:

Keep a copy of the original file in a safe place !

Here is a part of the modified file:
###
class SetEditor:

   def __init__(self,app):

  self.app = app
  self.list = []
  for a in  pymol.setting.get_index_list():
 self.list.append(%-30s %s%(pymol.setting._get_name(a),
cmd.get_setting_text(a,'',-1)))

  self.index = {}
  c = 0
  for a in pymol.setting.get_name_list():
 self.index[a] = c
 c = c + 1
 
  self.dialog = Pmw.SelectionDialog(self.app.root,title=Settings,
  buttons = ('Edit', 'Done'),
   defaultbutton='Edit',
  scrolledlist_labelpos=N,
  label_text='Double click to edit',
  scrolledlist_items = self.list,
  command = self.command)
  self.dialog.geometry(500x400)

 # start of the add-on
  interior = self.dialog.interior()
  self.filter = Pmw.EntryField(interior,
  labelpos = 'w',
  label_text= 'Filter:',
  validate = None,
  command = self.filter_list)
  self.filter.pack()
  # end of the add-on

  self.listbox = self.dialog.component('scrolledlist')
  self.listbox.component('listbox').configure(font=app.my_fw_font)
  self.dialog.protocol('WM_DELETE_WINDOW',self.cancel)
  app.my_show(self.dialog)

  # start of the add-on
   def filter_list(self):
  self.list = []
  for a in pymol.setting.get_index_list():
  if self.filter.getvalue() in pymol.setting._get_name(a):
  self.list.append(%-30s %s%(pymol.setting._get_name(a),
   cmd.get_setting_text(a,'',-1)))
  self.dialog.setlist(self.list)
  self.dialog.update()
   # end of the add-on

   def cancel(self,event=None):
  self.command(result='Done')
###

This code works fine on my linux box. If you have some problem, don't hesitate 
to ask me !

Cheers,

Jerome Pansanel

Le Mardi 18 Avril 2006 18:02, Michelle Gill a écrit :
 While we're discussing ways to make our favorite program a little
 better, I had an idea I thought I'd throw out there...

 While making some figures the other day, I found myself scrolling
 endlessly through the edit settings menu (under Setting -- Edit All) a
 number of times, mostly to locate a relatively small number of settings
 related to ray tracing. This got me thinking about a way to improve
 access to the many wonderful features that have been added to PyMOL.

 The solution I came up with is a filter line which could be placed
 directly above the window listing all the settings. Users could then
 type a word, say ray or cartoon, and only the settings containing
 this word would be shown.

 The best example of a program containing this feature is the
 about:config window in Firefox. When you open a browser and type
 about:config instead of an address, a window containing hundreds of
 settings appears. At the top is a filter bar which you can use to pare
 down the number of settings listed below.

 I think this would be a great addition to PyMOL and would help users
 familiarize themselves with the many new settings which have been (and
 will be) implemented. :)

 Perhaps others have even better solutions to this problem. The use of a
 filter is just the first idea which came to my mind. I think it would be
 relatively easy to implement, although my python programming skills are
 somewhat limited.

 Thanks,
 Michelle Gill


 ---
 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?cmd=lnkkid=110944bid=241720dat=121642
 ___
 PyMOL-users mailing list
 PyMOL-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/pymol-users




Re: [PyMOL] mutations

2006-04-20 Thread Andrew Colasanti
I follow the method outlined by Nick with one additional step, after
selecting the new residue you can run through a sidechain rotamer
library using the forward arrows at the bottom of the window.  You
also have a choice to use backbone dependant or backbone independant
rotamers.

Andrew

On 4/18/06, Noinaj noi...@uky.edu wrote:

 Orla,

 This is simply, for the most part.  Here is what I do.

 Load your *.pdb file.  Then under WIZARD in the menu bar, select
 MUTAGENESIS.  Then pretty much, follow directions.  In the PyMOL VIEWER
 window, it will ask you to ' pick a residue.'  Once you pick a residue,
 select the type of residue you want to mutate to by left clicking on [No
 Mutation] button and holding down (under Mutagenesis).  This brings up a
 list of residues that you can then select from.  Once you select the residue
 you want, hit APPLY, then DONE.  If everything was done correctly, you
 should see your mutated residue.

 There are probably other ways to do this, but I hope this helps.  If you
 would like screenshots of the steps, just let me know.



 Cheers,
 Nick




 - Original Message -
 From: Orla O'Sullivan
 To: pymol-users@lists.sourceforge.net
 Sent: Tuesday, April 18, 2006 11:31 AM
 Subject: [PyMOL] mutations




 Hi all

 I'm a newbie to Pymol and so far have been very impressed. However I have
 tried to mutate some residues in my structure and have hit a brick wall.

 Has anyone done this with pymol and let me know how to do it?



 Regards



 Orla



 Dr.Orla O'Sullivan

 Research Officer

 Biotechnology





 Moorepark Food Research Centre
 Teagasc

 Moorepark
 Fermoy, Co. Cork
 Ireland




 Tel:   +353 - (0)25 - 42344





Fw: [PyMOL] translation

2006-04-20 Thread Noinaj


orla,

not actually had to do this, but I think you can try the translate command.

--
translate
DESCRIPTION

   translate can be used to translate the atomic coordinates of a
   molecular object.  Behavior differs depending on whether or not the
   object parameter is specified.

   If object is None, then translate translates atomic coordinates
   according to the vector provided for the selection and in the state
   provided.  All representation geometries will need to be
   regenerated to reflect the new atomic coordinates.

   If object is set to an object name, then selection and state are
   ignored and instead of translating the atomic coordinates, the
   object's overall representation display matrix is modified.  This
   option is for use in animations only.

   The camera option controls whether the camera or the model's
   axes are used to interpret the translation vector.

USAGE

   translate vector [,selection [,state [,camera [,object 

PYMOL API

   cmd.translate(list vector, string selection = all, int state = 0,
 int camera = 1, string object = None)

EXAMPLES

   translate [1,0,0], name ca

NOTES

   if state = 0, then only visible state(s) are affected.
   if state = -1, then all states are affected.
- This seems like a pain, 
probably a better option somewhere, not sure?  Hope this hopes.  Cheers,Nick

  - Original Message - 
  From: Orla O'Sullivan 
  To: pymol-users@lists.sourceforge.net 
  Sent: Thursday, April 20, 2006 6:56 AM
  Subject: [PyMOL] (no subject)


   

  Hi  all

  This probably a very stupid question but its driving me mad. I have produced 
two Raster 3D scences using molscript and have loaded them into pymol. 

  What I want to do is to be able to move them on screen independent of each 
other. Is this possible?

   

  Regards

  Orla

   

  Dr.Orla O'Sullivan

  Research Officer

  Biotechnology

   

   

  Moorepark Food Research Centre
  Teagasc

  Moorepark
  Fermoy, Co. Cork
  Ireland

   

  Tel:   +353 - (0)25 - 42344

   


Re: [PyMOL] ..and rotate

2006-04-20 Thread Noinaj
orla,

If in fact you actually have to move molecules independently using the 'dirty' 
method that I have suggested, you will probably need the rotate command too, 
for more flexibility in setting things up.  


rotate
DESCRIPTION

   rotate can be used to rotate the atomic coordinates of a
   molecular object.  Behavior differs depending on whether or not the
   object parameter is specified.

   If object is None, then rotate rotates the atomic coordinates
   according to the axes and angle for the selection and state
   provided.  All representation geometries will need to be
   regenerated to reflect the new atomic coordinates.

   If object is set to an object name, then selection and state are
   ignored and instead of translating the atomic coordinates, the
   object's representation display matrix is modified.  This option
   is for use in animations only.

USAGE

   rotate axis, angle [,selection [,state [,camera [,object [,origin]

PYMOL API

   cmd.rotate(list-or-string axis, string selection = all, int state = 0,
  int camera = 1, string object = None)

EXAMPLES

   rotate x, 45, pept

NOTES

   if state = 0, then only visible state(s) are affected.
   if state = -1, then all states are affected.
-Cheers,Nickreference:http://pymol.sourceforge.net/newman/ref/S1000comref.html

  - Original Message - 
  From: Orla O'Sullivan 
  To: pymol-users@lists.sourceforge.net 
  Sent: Thursday, April 20, 2006 6:56 AM
  Subject: [PyMOL] (no subject)


   

  Hi  all

  This probably a very stupid question but its driving me mad. I have produced 
two Raster 3D scences using molscript and have loaded them into pymol. 

  What I want to do is to be able to move them on screen independent of each 
other. Is this possible?

   

  Regards

  Orla

   

  Dr.Orla O'Sullivan

  Research Officer

  Biotechnology

   

   

  Moorepark Food Research Centre
  Teagasc

  Moorepark
  Fermoy, Co. Cork
  Ireland

   

  Tel:   +353 - (0)25 - 42344

   


RE: [PyMOL] importing pymol modules in a python script

2006-04-20 Thread Warren DeLano
Alan,

The only sure way to get this to work is to build into a local Python 
interpreter from PyMOL source code using distutils.  Otherwise, you're likely 
better off with pymol -qc

Cheers,
Warren

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

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

 -Original Message-
 From: pymol-users-ad...@lists.sourceforge.net 
 [mailto:pymol-users-ad...@lists.sourceforge.net] On Behalf Of Alan
 Sent: Thursday, April 20, 2006 5:37 AM
 To: Pymol
 Subject: [PyMOL] importing pymol modules in a python script
 
 Hello List!
 
 I want a python script likewise:
 
 #!/usr/bin/python -O
 import sys, tempfile
 from pymol import editor
 from pymol import cmd
 
 
 
 However, even defining 'export PYTHONPATH=/usr/local/pymol/modules'
 
 I got this error:
 from pymol import editor
   File /usr/local/pymol/modules/pymol/__init__.py, line 353, in ?
 import _cmd
 ImportError: No module named _cmd
 
 Is there a way to run the python script with pymol stuff 
 imported or only via 'pymol -c'?
 
 Many thanks in advance.
 Alan
 --
 Alan Wilter S. da Silva, D.Sc. - Research Associate 
 Department of Biochemistry, University of Cambridge.
 80 Tennis Court Road, Cambridge CB2 1GA, UK.
 
 
 ---
 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=kkid0709bid3057dat1642
 ___
 PyMOL-users mailing list
 PyMOL-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/pymol-users
 
 
 
 



Re: [PyMOL] pymol transitions recorded as movie?

2006-04-20 Thread Joel Tyndall

Hi Eva,

If you save your scenes (conformations) as a psw file (under save as) 
you can then use a hyperlink in powerpoint and this will launch pymol in 
presentation mode and you can just use page down to scroll through the 
scenes. Pymol is still active so you can rotate the molecules in the 
presentation.


Hope this helps

J

Eva Vanamee wrote:


I regularly use the F function keys in PyMol to store
conformations and call them back in a presentation.
I really like the transition effects. Is it possible to record those
transitions as a movie and use them in a Powerpoint presentation?
Thanks in advance,
- Eva




---
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=lnkkid=120709bid=263057dat=121642
___
PyMOL-users mailing list
PyMOL-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pymol-users



--
Joel Tyndall, PhD

Lecturer
National School of Pharmacy
University of Otago
PO Box 913 Dunedin
New Zealand 


Pukenga
Te Kura Taiwhanga Putaiao
Te Whare Wananga o Otago
Pouaka Poutapeta 913 Otepoti
Aotearoa

Ph / Waea   +64 3 4797293 
Fax / Waeawhakaahua +64 3 4797034






Re: [PyMOL] a scaling question

2006-04-20 Thread Robert Campbell
Hi Fei,

* Fei Xu f...@rutchem.rutgers.edu [2006-04-19 11:55] wrote:
 Hi!:
 I met a scaling problem.
 I created many pdb files along one trajectory of DNA movement. I loaded
 each pdb file in pymol to create a picture, that is, one frame of the
 trajectory. Pymol shows each molecule in an optimal size automatically
 according the general shape of the molecular. The shape of the molecule
 along trajectory kept changing so that the size of the molecule also kept
 changing. When I connected all the time frames together, I saw the funny
 effect that the molecule was jumping back and forth.
 How can I put the molecule in the different time frames in exactly the
 same size?

What you are experiencing is the auto_zoom feature of pymol.  I have
this turned off in my .pymolrc file.  You can type:

  set auto_zoom, 0

to disable this feature.

Cheers,
Rob
-- 
Robert L. Campbell, Ph.D. r...@post.queensu.ca
Senior Research Associatephone: 613-533-6821
Dept. of Biochemistry, Queen's University, fax: 613-533-2497
Kingston, ON K7L 3N6  Canada   http://adelie.biochem.queensu.ca/~rlc
PGP Fingerprint: 9B49 3D3F A489 05DC B35C  8E33 F238 A8F5 F635 C0E2