Re: [PyMOL] How to plot residu with a number 9999

2009-06-09 Thread David A. Horita
Stephane, 

What I've done in these situations is broken the many-residue blocks
(typically water) into different chainID's and segid's.  Then select
with by both residue number and segid (or chainID or both).  That said,
I don't think segid's are a part of the official pdb specification
anymore (although pymol doesn't have a problem with them). 

As for getting around the 5-digit limit in overall atoms, I think
different packages have different tricks, including * (not
particularly useful) and hexadecimal (vmd/namd).  

Overall, this points out a glaring problem with fixed-width fields, but
that's another discussion...

Regards,
David

- 
David A. Horita, Ph.D.
Department of Biochemistry
Wake Forest University School of Medicine
Winston-Salem, NC 27157-1016 
Tel: 336 713-4194
Fax: 336 716-7671 
email:  dhor...@wfubmc.edu
web:  http://www1.wfubmc.edu/biochem/faculty/Horita.htm

-Original Message-
From: Warren DeLano [mailto:war...@delsci.com] 
Sent: Monday, June 08, 2009 8:01 PM
To: Stephane Abel; pymol-users@lists.sourceforge.net
Subject: Re: [PyMOL] How to plot residu with a number  

Stephane,

As per http://www.wwpdb.org/documentation/format32/sect9.html , the PDB
residue identifier field is only four characters wide.  

So how could you possibly have a PDB file with residue identifiers
larger than ?  

Cheers,
Warren

 -Original Message-
 From: Stephane Abel [mailto:stephane.a...@cea.fr]
 Sent: Monday, June 08, 2009 7:30 AM
 To: pymol-users@lists.sourceforge.net
 Subject: [PyMOL] How to plot residu with a number  
 
 Hi pymol users
 
 
 It seems that the command select, residue xxx to plot residue xxx
where
 xxx is greater than  does not work in pymol version 0.99rc6
 
 
 Indeed for a pdb file with ~ 13800 residue, if i use the command:
 
 
 select water1846, residue 1846 - the water molecule with the residue 
 number 1846 is plotting
 
 
 But when i use the same command (say select water11100, residue 11100)
 
 
 for plotting the residue 11100 the previous command does not work
 
 
 How to tackle this problem. Thanks in advance for your help
 
 
 Stephane
 
 


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




--
Crystal Reports - New Free Runtime and 30 Day Trial Check out the new
simplified licensing option that enables unlimited royalty-free
distribution of the report engine for externally facing server and web
deployment.
http://p.sf.net/sfu/businessobjects
___
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

--
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
___
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] How to plot residu with a number 9999

2009-06-09 Thread Warren DeLano
Stephane,

Okay, I see -- you're just spilling the top digit into the chain id.  So for 
residue 10123, you can issue a selection like:

zoom chain 1 and resi 0123

Looking over the code, I note that PyMOL has a hardcoded resi field of just 
four characters plus a null.  Given how C compilers pack structs, I suspect we 
could extend that to 7 characters plus a null without adversely impacting 
PyMOL's memory use characteristics...

Cheers,
Warren

 -Original Message-
 From: ABEL Stephane 175950 [mailto:stephane.a...@cea.fr]
 Sent: Tuesday, June 09, 2009 12:34 AM
 To: Warren DeLano
 Subject: RE : [PyMOL] How to plot residu with a number  
 
 Warren,
 
 Thank you for your response
 
 Indeed, you are right and this is a well known limitation of the pdb
 format. But as you can see with the file i join in this message obtained
 from a molecular dynamics software, you can also use the field 22 - 26 to
 extend the resSeq to 9 and this with pymol and rasmol.
 
 
 
 --
 Stéphane Abel, PhD
 CEA Saclay DSV/IBITEC-S/SB2SM
 91191 Saclay, FRANCE
 website: http://www.st-abel.com
 --
 
 
 
  Message d'origine
 De: Warren DeLano [mailto:war...@delsci.com]
 Date: mar. 09/06/2009 02:01
 À: ABEL Stephane 175950; pymol-users@lists.sourceforge.net
 Objet : RE: [PyMOL] How to plot residu with a number  
 
 Stephane,
 
 As per http://www.wwpdb.org/documentation/format32/sect9.html , the PDB
 residue identifier field is only four characters wide.
 
 So how could you possibly have a PDB file with residue identifiers
 larger than ?
 
 Cheers,
 Warren
 
  -Original Message-
  From: Stephane Abel [mailto:stephane.a...@cea.fr]
  Sent: Monday, June 08, 2009 7:30 AM
  To: pymol-users@lists.sourceforge.net
  Subject: [PyMOL] How to plot residu with a number  
 
  Hi pymol users
 
 
  It seems that the command select, residue xxx to plot residue xxx
 where
  xxx is greater than  does not work in pymol version 0.99rc6
 
 
  Indeed for a pdb file with ~ 13800 residue, if i use the command:
 
 
  select water1846, residue 1846 - the water molecule with the residue
  number 1846 is plotting
 
 
  But when i use the same command (say select water11100, residue 11100)
 
 
  for plotting the residue 11100 the previous command does not work
 
 
  How to tackle this problem. Thanks in advance for your help
 
 
  Stephane
 
 
 



--
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
___
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] PyMOL-users Digest, Vol 37, Issue 7

2009-06-09 Thread Jason Vertrees
PyMOLers,

This example was just too cool not to be made into a script.  See

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

-- Jason

 Message: 3
 Date: Mon, 8 Jun 2009 19:01:01 -0700
 From: Warren DeLano war...@delsci.com
 Subject: Re: [PyMOL] Hi all...
 To: Yasser Almeida Hernandez pedro...@fenhi.uh.cu,
   pymol-users@lists.sourceforge.net
 Message-ID:
   896b75251ba19745a529b1b867893fa50eb...@planet.delsci.local
 Content-Type: text/plain; charset=US-ASCII
 
 As for the your general question:  can you import pymol; from pymol
 import cmd; pymol.finish_launching(); etc?
 
 Answer 1: Yes, if you manually compile PyMOL open-source code into an
 existing Python interpreter. 
 
 Or 
 
 Answer 2: Yes, if you run your Python script using PyMOL's built-in
 Python interpreter (launch PyMOL as follows):
 
 ./pymol your-script.py  # with full 3D GUI
   
 ./pymol -qc your-script.py  # command-line only (in a terminal)
 
 Or 
 
 Answer 3: Yes, if you call your Python script from a PyMOL script via
 the run or spawn commands inside PyMOL.
 
 However,
 
 Answer 4: No, if you want precompiled PyMOL build to work with an
 external precompiled Python build.  This approach has proved impractical
 due unavoidable application binary interface (ABI) version mismatches
 between PyMOL, Python, and the host environment.
  
 As for your specific question, this is something you could do with a
 plain old script without even introducing the complexity of Python:
 
 
 load $TUT/1hpv.pdb, query
 
 remove not polymer
 
 create tmp, query
 
 set dot_solvent
 
 get_area tmp, load_b=1
 
 # threshold on what one considers an exposed atom (in A**2):
 
 remove tmp and b2.5
 
 tmp_dict = {}
 
 iterate tmp, tmp_dict[(chain,resv)]=1
 
 select exposed 
 
 exposed = tmp_dict.keys()
 
 exposed.sort()
 
 print Solvent exposed residues (chain,residue):
 
 for res in exposed: print res
 
 select exposed, query in tmp
 
 dele tmp
 
 
 # visual confirmation
 
 color white
 
 color red, byres exposed
 
 set sphere_solvent
 
 as spheres
 
 orient
 
 
 Cheers,
 Warren


-- 

Jason Vertrees, PhD

Dartmouth College : j...@cs.dartmouth.edu
Boston University : jas...@bu.edu

PyMOLWiki : http://www.pymolwiki.org/

--
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
___
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] Subject: Re: Hi all...

2009-06-09 Thread Jason Vertrees
PyMOLers,

This example was just too cool not to be made into a script.  See

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

-- Jason

 Message: 3
 Date: Mon, 8 Jun 2009 19:01:01 -0700
 From: Warren DeLano war...@delsci.com
 Subject: Re: [PyMOL] Hi all...
 To: Yasser Almeida Hernandez pedro...@fenhi.uh.cu,
   pymol-users@lists.sourceforge.net
 Message-ID:
   896b75251ba19745a529b1b867893fa50eb...@planet.delsci.local
 Content-Type: text/plain; charset=US-ASCII
 
 As for the your general question:  can you import pymol; from pymol
 import cmd; pymol.finish_launching(); etc?
 
 Answer 1: Yes, if you manually compile PyMOL open-source code into an
 existing Python interpreter. 
 
 Or 
 
 Answer 2: Yes, if you run your Python script using PyMOL's built-in
 Python interpreter (launch PyMOL as follows):
 
 ./pymol your-script.py  # with full 3D GUI
   
 ./pymol -qc your-script.py  # command-line only (in a terminal)
 
 Or 
 
 Answer 3: Yes, if you call your Python script from a PyMOL script via
 the run or spawn commands inside PyMOL.
 
 However,
 
 Answer 4: No, if you want precompiled PyMOL build to work with an
 external precompiled Python build.  This approach has proved impractical
 due unavoidable application binary interface (ABI) version mismatches
 between PyMOL, Python, and the host environment.
  
 As for your specific question, this is something you could do with a
 plain old script without even introducing the complexity of Python:
 
 
 load $TUT/1hpv.pdb, query
 
 remove not polymer
 
 create tmp, query
 
 set dot_solvent
 
 get_area tmp, load_b=1
 
 # threshold on what one considers an exposed atom (in A**2):
 
 remove tmp and b2.5
 
 tmp_dict = {}
 
 iterate tmp, tmp_dict[(chain,resv)]=1
 
 select exposed 
 
 exposed = tmp_dict.keys()
 
 exposed.sort()
 
 print Solvent exposed residues (chain,residue):
 
 for res in exposed: print res
 
 select exposed, query in tmp
 
 dele tmp
 
 
 # visual confirmation
 
 color white
 
 color red, byres exposed
 
 set sphere_solvent
 
 as spheres
 
 orient
 
 
 Cheers,
 Warren


-- 

Jason Vertrees, PhD

Dartmouth College : j...@cs.dartmouth.edu
Boston University : jas...@bu.edu

PyMOLWiki : http://www.pymolwiki.org/

--
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
___
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] How to plot residu with a number 9999

2009-06-09 Thread Warren DeLano
Whoops, I misread my own code:

In fact, PyMOL already supports 5-character residue identifiers!  Here's how 
you use them, assuming a PDB file where the resi field spills into chain:

load your_file.pdb

alter all, resi=chain+resi

sort

# and off you go

indicate resi 1:

zoom resi 10123

Cheers,
Warren


 -Original Message-
 From: Warren DeLano 
 Sent: Tuesday, June 09, 2009 12:26 PM
 To: ABEL Stephane 175950
 Cc: pymol-users@lists.sourceforge.net
 Subject: Re: [PyMOL] How to plot residu with a number  
 
 Stephane,
 
 Okay, I see -- you're just spilling the top digit into the 
 chain id.  So for residue 10123, you can issue a selection like:
 
 zoom chain 1 and resi 0123
 
 Looking over the code, I note that PyMOL has a hardcoded resi 
 field of just four characters plus a null.  Given how C 
 compilers pack structs, I suspect we could extend that to 7 
 characters plus a null without adversely impacting PyMOL's 
 memory use characteristics...
 
 Cheers,
 Warren
 
  -Original Message-
  From: ABEL Stephane 175950 [mailto:stephane.a...@cea.fr]
  Sent: Tuesday, June 09, 2009 12:34 AM
  To: Warren DeLano
  Subject: RE : [PyMOL] How to plot residu with a number  
  
  Warren,
  
  Thank you for your response
  
  Indeed, you are right and this is a well known limitation 
 of the pdb 
  format. But as you can see with the file i join in this message 
  obtained from a molecular dynamics software, you can also use the 
  field 22 - 26 to extend the resSeq to 9 and this with 
 pymol and rasmol.
  
  
  
  --
  Stéphane Abel, PhD
  CEA Saclay DSV/IBITEC-S/SB2SM
  91191 Saclay, FRANCE
  website: http://www.st-abel.com
  --
  
  
  
   Message d'origine
  De: Warren DeLano [mailto:war...@delsci.com]
  Date: mar. 09/06/2009 02:01
  À: ABEL Stephane 175950; pymol-users@lists.sourceforge.net 
 Objet : RE: 
  [PyMOL] How to plot residu with a number  
  
  Stephane,
  
  As per http://www.wwpdb.org/documentation/format32/sect9.html , the 
  PDB residue identifier field is only four characters wide.
  
  So how could you possibly have a PDB file with residue identifiers 
  larger than ?
  
  Cheers,
  Warren
  
   -Original Message-
   From: Stephane Abel [mailto:stephane.a...@cea.fr]
   Sent: Monday, June 08, 2009 7:30 AM
   To: pymol-users@lists.sourceforge.net
   Subject: [PyMOL] How to plot residu with a number  
  
   Hi pymol users
  
  
   It seems that the command select, residue xxx to plot residue xxx
  where
   xxx is greater than  does not work in pymol version 0.99rc6
  
  
   Indeed for a pdb file with ~ 13800 residue, if i use the command:
  
  
   select water1846, residue 1846 - the water molecule with the 
   residue number 1846 is plotting
  
  
   But when i use the same command (say select water11100, residue 
   11100)
  
  
   for plotting the residue 11100 the previous command does not work
  
  
   How to tackle this problem. Thanks in advance for your help
  
  
   Stephane
  
  
  
 
 
 
 --
 
 Crystal Reports - New Free Runtime and 30 Day Trial Check out 
 the new simplified licensing option that enables unlimited 
 royalty-free distribution of the report engine for externally 
 facing server and web deployment.
 http://p.sf.net/sfu/businessobjects
 ___
 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
 
 
 
 
 

--
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
___
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