Re: [PyMOL] Installing in Linux

2022-02-14 Thread Robert Campbell
Hello Peter,

Which Linux distribution are you using?  If you are using one of the 
Debian-based versions like Ubuntu, then PyMOL is likely available in the 
distribution's repository.  Then you could use the package management system to 
install it or simply type in a terminal window:

  sudo apt-get install pymol

Depending on which distribution you are using there may be other steps involved 
to allow it to find PyMOL.

Cheers,
Rob

On Mon, 2022-02-14 13:05  -0500,  Peter Kahn  wrote:

> Greetings,
> 
> I've downloaded the Pymol package of executable files and had no
> trouble installing in Windows but don't know how to proceed in Linux?
>  Can anyone point me in the right direction?
> 
> Thanks,
> Peter



-- 
Robert L. Campbell, Ph.D.
Undergraduate Chair (Acting), Biochemistry Program
Academic Advisor, BHSc Program
Assistant Professor, Dept. of Biomedical & Molecular Sciences, Botterell Hall 
Rm 644
Queen's University, Kingston, ON K7L 3N6  Canada
tel: 613-533-6821   http://pldserver1.biochem.queensu.ca/~rlc


___
PyMOL-users mailing list
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
Unsubscribe: 
https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe


Re: [PyMOL] list_hb.py

2021-04-08 Thread Robert Campbell
Hi Evgeny and Chen,

Unfortunately, if Chen wants the list of atoms that form H-bonds, "distance" 
only provides a displayed object and only returns the average distance between 
all atoms.  Also unfortunately, that script list_hb.py (which I wrote) uses the 
find_pairs function which warns that it "only checks atom orientation, not atom 
type" (https://pymolwiki.org/index.php/Find_pairs).  It is difficult therefore 
to provide list_hb.py with two selections that can only result in real H-bonds 
without actually figuring out for yourself which pairs of atoms should H-bond!

Cheers,
Rob

On Thu, 2021-04-08 16:50  +0200,  Evgeny Osipov  wrote:

> Hi Chen,
> you can use distance command or cmd.distance for scripting purposes.
> Just specify mode 2 in order to search for polar contacts:
> https://pymolwiki.org/index.php/Distance
> 
> пн, 22 мар. 2021 г. в 18:53, Chen, Qiang :
> 
> > Hi, Pymol Users,
> >
> > I used this script to find hydrogen-bond in protein, list_hb.py.
> >
> > list_hb all, all, write_distances_file=hb
> >
> > I find there are some pairs are clearly not hydrogen bonds, e.g.
> > A/VAL`257/O/774A/MET`261/O/8342.87
> >
> > Also, the angle is not right for certain pair
> >
> > A/HIS`400/NE2/2977B/GLN`403/OE1/70932.66
> >
> > In the protein, the angle between NE2-H-OE1 is 100.8 deg
> >
> > Any suggestion to find out the correct hydrogen-bonding pairs?
> >
> > Thanks!
> > ___
> > PyMOL-users mailing list
> > Archives:
> > http://www.mail-archive.com/pymol-users@lists.sourceforge.net
> > Unsubscribe:
> > https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe
> >  



-- 
Robert L. Campbell, Ph.D.
Academic Advisor, BHSc Program
Assistant Professor, Dept. of Biomedical & Molecular Sciences, 
Queen's University, Kingston, ON K7L 3N6  Canada
Botterell Hall Rm 644 Tel: 613-533-6821
  http://pldserver1.biochem.queensu.ca/~rlc


___
PyMOL-users mailing list
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
Unsubscribe: 
https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe

Re: [PyMOL] How to iterate commands in pymol

2020-11-01 Thread Robert Campbell
Hi Zuben,

You need to import the colorbyrmsd.py script within your script, then you can 
call it that way.  For example your script could say:

import colorbyrmsd as cbr

for obj in seleobjs:
  cmd.enable(obj)
  cbr.colorbyrmsd(obj,target)

Cheers,
Rob

On Sat, 2020-10-31 20:36  +,  "Brown, Zuben"  
wrote:

> Hi,
> 
> I'd like to iterate using a script in pymol but one of the commands
> I'd like to use does not have an associated cmd.API. For example, how
> do I run:
> 
> for obj in seleobjs:
> cmd.enable(obj)
> colorbyrmsd(obj, target)   <--- This third line doesn't work since
> colorbyrmsd does not have a cmd.colorbyrmsd.
> 
> Is there a way I can run something like:
> cmd.executecommand("colorbyrmsd {0}, target".format(obj))  ?
> 
> Best regards,
> 
> Zuben



-- 
Robert L. Campbell, Ph.D.
Academic Advisor, BHSc Program
Assistant Professor, Dept. of Biomedical & Molecular Sciences, 
Queen's University, Kingston, ON K7L 3N6  Canada
Botterell Hall Rm 644 Tel: 613-533-6821
  http://pldserver1.biochem.queensu.ca/~rlc


___
PyMOL-users mailing list
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
Unsubscribe: 
https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe


Re: [PyMOL] Effect of different align method

2020-06-17 Thread Robert Campbell
Hello Sunyeping,

I would first point out that if you align on chain A of each molecule, then 
chain B of ASFV aligns with chain C of MTUB and vice versa.  In other words you 
don't have the same assignment of chain ids in your trimer.  The alignment of 
just alpha carbons of chain A with "align" gives an RMSD of 1.78 Å for 81 atoms 
and for "super" gives an RMSD of 1.746 Å for 81 atoms. That may be the best 
that you can do, but if you want to align the whole trimer than you need to 
rename chain B to chain C and chain C to chain B for one of your molecules.

You can do that renaming within PyMOL with these commands:

PyMOL>alter MTUB_trimer & c. B, chain="D"
PyMOL>alter MTUB_trimer & c. C, chain="B"
PyMOL>alter MTUB_trimer & c. D, chain="C"

(I'm just using "D" as an intermediate name here)

If you do that, then aligning all alpha carbons gives an RMSD of 2.189 Å for 
"align" and 1.845 Å for "super".

Cheers,
Rob

On Wed, 2020-06-17 21:04  +0800,  sunyeping via PyMOL-users 
 wrote:

> Hello Julien Cappèle,
>Thank you for your response. I didn't mean to keep the input file
> in secrete. I have changed the access right to them, so you can
> download them freely. Best, Yeping Sun
> --
> From:Julien CAPPELE 
> Sent At:2020 Jun. 17 (Wed.) 17:05
> To:孙业平 
> Subject:Re: [PyMOL] Effect of different align method
> 
> Hello Sunyeping,
> 
> I would suggest you to try TM-align, and a very good way to use it
> for multi-protein alignment is to use their server mTM-align.
> TM-align is a very robust alignment tool that will in most of the
> case, give you a better structural based alignment with low to zero
> input from the sequence.
> https://can01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fyanglab.nankai.edu.cn%2FmTM-align%2F&data=02%7C01%7Crobert.campbell%40queensu.ca%7C4e290e0f1c4044d3b1fc08d812bf8cca%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C637279961201881850&sdata=EOgyXD4A%2FemFaZHj6eRrx1h3nc%2BoCOHr94cFzpmIE3o%3D&reserved=0
>  
> 
> Also, if you are not working on secret stuff, you can give me access
> so I can rework the output files from mTM-align server to give you a
> RMSD-colored alignment in PyMOL.
> 
> On PyMOL only, I didn't try to implement TM-align because I use
> Windows, but the developers said that a linux implementation could be
> possible if you are a bit familiar with compiling softwares.
> 
> -
> Julien Cappèle
> Doctorant - 2ème année - ED C2MP
> Université de Lorraine
> CRM² - UMR CNRS 7036
> julien.capp...@univ-lorraine.fr
> Tel: (+33)6 99 18 59 03
> -
> 
> Le mer. 17 juin 2020 à 05:06, sunyeping via PyMOL-users
>  a écrit : Dear pymol users,
> 
> I am trying to align two very similar trimeric molecules. I tried
> different alignment commands including "align", "cealign" and
> "super", but none of them gives satisfying effect. Athough the
> backbone conformations and orientations of two two molecules look
> very similar, there are obvious displacements between them after
> alignment with these three commands. The rmsd of the two molecules
> for these three methods are 2.250, 4.682, 2.206 and 2.206,
> respectively. I wonder whether there is any better alignment command
> or there are any parameters that can be passed to these three
> alignment commands to improve the effects. Could you help me check
> this? The pdb files of these two molecules, the image for the two
> molecules after using "super" command, and the alignment effect in
> the publication I mentioned can be found at the following link.
> 
> https://can01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdrive.google.com%2Ffile%2Fd%2F1ff3XgTexgdul-SezUz75dVoCx2cL5YPL%2Fview%3Fusp%3Dsharing&data=02%7C01%7Crobert.campbell%40queensu.ca%7C4e290e0f1c4044d3b1fc08d812bf8cca%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C637279961201881850&sdata=72dx0AyAPoHLvV4iXbEhmoGY18cXymzJRRWUqC7gdjE%3D&reserved=0
> 
> With many thanks.
> 
> ___
>  PyMOL-users mailing list
>  Archives:
> https://can01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.mail-archive.com%2Fpymol-users%40lists.sourceforge.net&data=02%7C01%7Crobert.campbell%40queensu.ca%7C4e290e0f1c4044d3b1fc08d812bf8cca%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C637279961201881850&sdata=PS%2BRq2rFtONyOjTtIS59OZnLnYEAG2spdQJXLzlpGzA%3D&reserved=0
> Unsubscribe:
> https://can01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourceforge.net%2Fprojects%2Fpymol%2Flists%2Fpymol-users%2Funsubscribe&data=02%7C01%7Crobert.campbell%40queensu.ca%7C4e290e0f1c4044d3b1fc08d812bf8cca%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C637279961201881850&sdata=FMqipuYNGRnLNirUNl5hMdQtsm%2F%2F9GRkhNxzMKjP0LE%3D&reserved=0
> 



-- 
Robert L. Campbell, Ph.D.
Academic Advisor, BHSc Program
Assistant Professor, Dept. of Biomedical & Molecular Sciences, 
Queen's University, Kingston, ON K7L 3N6 

Re: [PyMOL] hydrogen bond list for a series of files

2020-06-17 Thread Robert Campbell
Hi,

I would make one minor change to your script -- the command "run list_hb.py" 
needs to be run only once at the beginning of the script so:

# multiple_hb.py
from pymol import cmd
from glob import glob
cmd.do("run list_hb.py")

for file in glob("model.000.*.pdb"):
print(file)
#file_list = [f'{m:02d}'  for m in  list(range(0,30,1))]
cmd.load(file)
obj=cmd.get_object_list('all')
print(obj)
#chains=[('A','F'),('B', 'F'),('C','F'),('D','F'),('E','F')]
cmd.do("list_hb chain F, chain A:E,
write_distances_file=hb_"+str(obj[0])+".txt") cmd.delete("all”)

Cheers,
Rob

On Tue, 2020-06-16 20:23  +,  "Chen, Qiang"  wrote:

> This script will have a memory issue. My pymol will stuck if I have
> more than 3 files be processed. file_list = [f'{m:02d}'  for m in
> list(range(1,30,1))] [cmd.do("load
> model.000."+str(k)+"_minimized.pdb") for k in file_list]
> object_list=cmd.get_object_list('(model.000.*_minimized)')
> chains=[('A','F'),('B', 'F'),('C','F'),('D','F'),('E','F')] run
> C:\Users\user\AppData\Local\Programs\Python\Python38\lib\site-packages\pymol\pymol_path\Pymol-script-repo\list_hb.py
> [cmd.do("list_hb chain F, chain A:E,
> write_distances_file=hb_"+str(file)+".txt") for file in object_list ]
> 
> I modified from the sample script here
> 
> https://can01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.pymolwiki.org%2Findex.php%2FProcess_All_Files_In_Directory&data=02%7C01%7Crobert.campbell%40queensu.ca%7C5a300643d81e4d7ea3f608d812359b34%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C637279368764004254&sdata=p5tXmvSD1QCS%2BdIXyJv58rEBk9GCIRtl8BFSnamwoNs%3D&reserved=0
> 
> Save the following lines in a file named as, eg. multiple_hb.py and
> make sure list_hb.py in the working directory of searching directory.
> 
> Then run multiple_hb.py in the pymol command line.
> 
> from pymol import cmd
> from glob import glob
> 
> for file in glob("model.000.*.pdb"):
> print(file)
> #file_list = [f'{m:02d}'  for m in  list(range(0,30,1))]
> cmd.load(file)
> obj=cmd.get_object_list('all')
> print(obj)
> #chains=[('A','F'),('B', 'F'),('C','F'),('D','F'),('E','F')]
> cmd.do("run list_hb.py")
> cmd.do("list_hb chain F, chain A:E,
> write_distances_file=hb_"+str(obj[0])+".txt") cmd.delete("all”)
> 
> 
> On Jun 16, 2020, at 11:15 AM,
> pymol-users-requ...@lists.sourceforge.net
> wrote:
> 
> Send PyMOL-users mailing list submissions to
> pymol-users@lists.sourceforge.net
> 
> To subscribe or unsubscribe via the World Wide Web, visit
> https://can01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.sourceforge.net%2Flists%2Flistinfo%2Fpymol-users&data=02%7C01%7Crobert.campbell%40queensu.ca%7C5a300643d81e4d7ea3f608d812359b34%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C637279368764004254&sdata=9UIjcsPwiUC9PmwQ4mcTi1%2F4%2BIGx9jQKarXsh7dfpGk%3D&reserved=0
> or, via email, send a message with subject or body 'help' to
> pymol-users-requ...@lists.sourceforge.net
> 
> You can reach the person managing the list at
> pymol-users-ow...@lists.sourceforge.net
> 
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of PyMOL-users digest..."
> 
> 
> Today's Topics:
> 
>   1. Re: hydrogen bond list for a series of files
>  (Mooers, Blaine H.M.  (HSC))
>   2. Re: hydrogen bond list for a series of files (Chen, Qiang)
> 
> 
> --
> 
> Message: 1
> Date: Tue, 16 Jun 2020 14:51:38 +
> From: "Mooers, Blaine H.M.  (HSC)" 
> To: "Chen, Qiang" , "pymol-users@lists.sourceforge.net"
> 
> Subject: Re: [PyMOL] hydrogen bond list for a series of files
> Message-ID:
> <87dcc6c40b22804192b6892e6429ec5fdbefd...@countach.hsc.net.ou.edu>
> Content-Type: text/plain; charset="Windows-1252"
> 
> Hi Charlie,
> 
> This will give the desired list.
> 
> file_list = [f'{m:02d}'  for m in  list(range(1,30,1))]
> print(file_list)
> 
> Best regards,
> 
> Blaine
> 
> Blaine Mooers, Ph.D.
> Associate Professor
> Department of Biochemistry and Molecular Biology
> College of Medicine
> University of Oklahoma Health Sciences Center
> S.L. Young Biomedical Research Center (BRC) Rm. 466
> 975 NE 10th Street, BRC 466
> Oklahoma City, OK 73104-5419
> 
> 
> From: Chen, Qiang [q...@pitt.edu]
> Sent: Tuesday, June 16, 2020 9:26 AM
> To: Mooers, Blaine H.M.  (HSC); pymol-users@lists.sourceforge.net
> Subject: [EXTERNAL] Re: hydrogen bond list for a series of files
> 
> Hi, Blaine,
> 
> Then the question becomes how to generate a list with 30 or 300
> numbers.
> 
> Will this work?
> file_list=list(range(00, 30))
> 
> Thanks!
> 
> Charles
> 
> 
> 
> From: Mooers, Blaine H.M. (HSC) 
> Sent: Tuesday, June 16, 2020 9:57 AM
> To: Chen, Qiang ; pymol-users@lists.sourceforge.net
>  Subject: RE: hydrogen bond list
> for a series of files
> 
> Hi Charles,
> 
> You are right and I am wrong about the 

Re: [PyMOL] Extract all phi and psi angles

2020-05-11 Thread Robert Campbell
Hi Neena,

If you give a different selection, then phi_psi will give you a list of phi/psi 
angles for all residues in the selection.

For example if your protein object is called "obj_1", then typing

phi_psi obj_1

will provide a list of phi_psi values to the terminal:

PyMOL>phi_psi obj_1
 LYS-3:(  -63.3,  -75.6 )
 GLY-4:(  -62.6,  -32.9 )
 GLU-5:(  -31.7,  -58.7 )
 GLU-6:(  -57.3,  -23.4 )
 LEU-7:(  -74.7,  -18.6 )
 PHE-8:( -106.0,6.4 )
 THR-9:(  -59.8,  -16.1 )
 GLY-10:   ( -140.4, -166.5 )

or you can assign the list to a dictionary variable with:

p = cmd.phi_psi('obj_1')

where p will be a dictionary with keys representing the residue numbers and 
pointing to a list of the phi/psi values for that residue.

Cheers,
Rob

-- 
Robert L. Campbell, Ph.D.
Assistant Professor, Dept. of Biomedical & Molecular Sciences, 
Queen's University, Kingston, ON K7L 3N6  Canada
  http://pldserver1.biochem.queensu.ca/~rlc


On Sat, 2020-05-09 11:08  -0400,  Neena Susan Eappen  
wrote:

> Hi Jarrett,
> 
> Thank you for your reply. However, that command gives phi and psi
> angles for only one atom (when only one atom is selected). Is there
> one command we can use to extract all phi and psi angles?
> 
> Thanks,
> Neena
> 
> 
> 
> On Mon, 27 Apr 2020 at 22:01, Jarrett Johnson <
> jarrett.john...@schrodinger.com> wrote:  
> 
> > Hi Neena,
> >
> > Is this command sufficient?
> >
> > https://can01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpymol.org%2Fdokuwiki%2Fdoku.php%3Fid%3Dcommand%3Aphi_psi&data=02%7C01%7Crobert.campbell%40queensu.ca%7C220f11d984f74518dfe208d7f42b243e%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C637246338451090438&sdata=Y8U07iXlCYJ%2BE0GN2Oh04QSE7n68NPH5d2fc%2BaUhdSk%3D&reserved=0
> >
> > Best,
> > Jarrett J
> >
> > On Mon, Apr 27, 2020 at 9:45 PM Neena Susan Eappen <  
> > neenasusan...@gmail.com> wrote:  
> >  
> >> Hello PyMOL users,
> >>
> >> How to extract all peptide dihedral angles (phi and psi) in PyMOL?
> >>
> >> Many thanks,
> >> Neena
> >> ___
> >> PyMOL-users mailing list
> >> Archives:
> >> https://can01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.mail-archive.com%2Fpymol-users%40lists.sourceforge.net&data=02%7C01%7Crobert.campbell%40queensu.ca%7C220f11d984f74518dfe208d7f42b243e%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C637246338451090438&sdata=%2F%2F%2BSyfR20FyqY2GFMhZVbBe0CHtQuoSLCIUMsBHgoLs%3D&reserved=0
> >> Unsubscribe:
> >> https://can01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourceforge.net%2Fprojects%2Fpymol%2Flists%2Fpymol-users%2Funsubscribe&data=02%7C01%7Crobert.campbell%40queensu.ca%7C220f11d984f74518dfe208d7f42b243e%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C637246338451090438&sdata=gcqmQ9A%2BOEJMPVf3ubqWWGEh6DzZv95XVXXJULabe2w%3D&reserved=0
> >>  
> >
> >
> >
> > --
> >
> > *Jarrett Johnson* | Senior Developer
> > [image: Schrodinger Logo]
> > 
> >  






___
PyMOL-users mailing list
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
Unsubscribe: 
https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe


Re: [PyMOL] Drawing lines between residues

2019-10-17 Thread Robert Campbell
Hi Jorge,

I have written a script that will draw lines between arbitrary pairs of atoms 
using CGO cylinders.  The script is called "draw_links.py" and can be found on 
my script page:

http://pldserver1.biochem.queensu.ca/~rlc/work/pymol/

Besides listing the pairs of atoms to connect you can control the colour and 
radius of the CGO cylinders with a command like:

draw_links mol1 & chain A & name CA & resi 1+6+7+8, mol1 & chain A & name CA & 
resi 10+16+17+18 

and that would connect the alpha carbons of residue 1 with 10, 6 with 16, 7 
with 17 and 8 with 18.


Cheers,
Rob

On Thu, 2019-10-17 16:31  +0200,  Jorge Fernández de Cossío Díaz 
 wrote:

> Hi all.
> 
> I have a list of pairs of residues. I want to draw lines between the
> residues in each pair. The lines can have different colors. So in the
> end I would like to achieve a figure like this one:
> 
> 
> [image: 2019-10-15.png]
> 
> What commands can I use to get this done in PyMOL?
> 
> Thanks



-- 
Robert L. Campbell, Ph.D.
Adjunct Assistant Professor, Dept. of Biomedical & Molecular Sciences, 
Botterell Hall Rm 644
Queen's University, Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821
  http://pldserver1.biochem.queensu.ca/~rlc

___
PyMOL-users mailing list
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
Unsubscribe: 
https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe

Re: [PyMOL] Pymol recolour B factors

2019-03-22 Thread Robert Campbell
Hi Mark,

In that data2bfactor.py script (which I wrote) you need to provide the 
molecular object name, not a file name.  In other words in your example you 
should load the 1d3z.pdb file as an object (defaults to 1d3z as object name).  
Then after using the run command to load the script into your pymol session 
then you can type:

data2b_res 1d3z, shift_to_b.txt

The other script you mention works the same way.  The pdb file needs to be 
loaded into PyMOL as a molecular object first.

Cheers,
Rob

On Fri, 2019-03-22 11:36  +,  Dr Mark Bostock  wrote:

> Hello,
> 
> I'm trying to recolour the B factors in a pymol file with chemical
> shift differences (from NMR data). There's a nice script here for
> this http://pldserver1.biochem.queensu.ca/~rlc/work/pymol/
> (data2bfactor.py) and also a simpler one here 
> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Ffigshare.com%2Farticles%2FPymol_script_loadBfacts_py%2F1176991&data=02%7C01%7Crobert.campbell%40queensu.ca%7C664f1bfa0c934c52f40108d6aebdf161%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C636888528158871468&sdata=jDmJ4NSc%2F%2BXy5IG%2BRCCsQOmqh1Xj9l4j6gTMEmJB6Zc%3D&reserved=0.
> 
> In both cases after loading the script with the run command, when I
> execute the script I get the following error
> 
> data2b_res 1d3z.pdb, shift_to_b.txt
> Selector-Error: Invalid selection name "1d3z.pdb".
> ( 1d3z.pdb )<--
> 
> The pdb file and list of new b-factor values are in the same
> directory and can be filled in with tab-completion. I've also tried
> using the full file path but get a similar error. I've tried with a
> couple of different pdb files as well so it's not just a problem with
> that particular pdb file.
> 
> I'd be grateful if anyone has any experience with this or suggestions
> as to what is going wrong.
> 
> Thanks in advance,
> 
> Mark
> 
> 
> 
> ___
> PyMOL-users mailing list
> Archives:
> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.mail-archive.com%2Fpymol-users%40lists.sourceforge.net&data=02%7C01%7Crobert.campbell%40queensu.ca%7C664f1bfa0c934c52f40108d6aebdf161%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C636888528158871468&sdata=rhUIX1kYhGF0ax1YHrbOBvO5agrVsRdkuUKYJA9A26w%3D&reserved=0
> Unsubscribe:
> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourceforge.net%2Fprojects%2Fpymol%2Flists%2Fpymol-users%2Funsubscribe&data=02%7C01%7Crobert.campbell%40queensu.ca%7C664f1bfa0c934c52f40108d6aebdf161%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C1%7C636888528158881482&sdata=rsNyC33RqUJbXDKsWpMVagHLOXVUH4bM8vo3cdmTtlE%3D&reserved=0



-- 
Robert L. Campbell, Ph.D.
Adjunct Assistant Professor
Dept. of Biomedical & Molecular Sciences, Botterell Hall Rm 644
Queen's University, Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821
  http://pldserver1.biochem.queensu.ca/~rlc


___
PyMOL-users mailing list
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net
Unsubscribe: 
https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe


Re: [PyMOL] ExecutivesSymexp-Error: No Symmetry loaded!

2017-06-21 Thread Robert Campbell
Hi Leila,

You need the "CRYST1" line from the template pdb file.  That is where PyMOL 
gets the symmetry information from.

Cheers,
Rob

On Wed, 2017-06-21 09:29  +0200,  leila karami  wrote:

> Dear PYMOL users,
> 
> I have done a homology modelling using swiss model. Template pdb file
> contain 3 chains (A, B, C). I used only chain A for homology
> modelling as template.
> 
> There is a symmetry operator in template pdb file (temp.pdb). I want
> to use symexp to obtain dimeric structure for modeled pdb file
> (model.pdb).
> 
> I manually added following records (from temp.pdb) at the first of the
> modeled pdb file:
> ===
> REMARK 290
> REMARK 290 CRYSTALLOGRAPHIC SYMMETRY
> REMARK 290 SYMMETRY OPERATORS FOR SPACE GROUP: C 1 2 1
> REMARK 290
> REMARK 290  SYMOP   SYMMETRY
> REMARK 290 NNNMMM   OPERATOR
> REMARK 290   1555   X,Y,Z
> REMARK 290   2555   -X,Y,-Z
> REMARK 290   3555   X+1/2,Y+1/2,Z
> REMARK 290   4555   -X+1/2,Y+1/2,-Z
> REMARK 290
> REMARK 290 WHERE NNN -> OPERATOR NUMBER
> REMARK 290   MMM -> TRANSLATION VECTOR
> REMARK 290
> REMARK 290 CRYSTALLOGRAPHIC SYMMETRY TRANSFORMATIONS
> REMARK 290 THE FOLLOWING TRANSFORMATIONS OPERATE ON THE ATOM/HETATM
> REMARK 290 RECORDS IN THIS ENTRY TO PRODUCE CRYSTALLOGRAPHICALLY
> REMARK 290 RELATED MOLECULES.
> REMARK 290   SMTRY1   1  1.00  0.00  0.000.0
> REMARK 290   SMTRY2   1  0.00  1.00  0.000.0
> REMARK 290   SMTRY3   1  0.00  0.00  1.000.0
> REMARK 290   SMTRY1   2 -1.00  0.00  0.000.0
> REMARK 290   SMTRY2   2  0.00  1.00  0.000.0
> REMARK 290   SMTRY3   2  0.00  0.00 -1.000.0
> REMARK 290   SMTRY1   3  1.00  0.00  0.00   88.99000
> REMARK 290   SMTRY2   3  0.00  1.00  0.00   28.29500
> REMARK 290   SMTRY3   3  0.00  0.00  1.000.0
> REMARK 290   SMTRY1   4 -1.00  0.00  0.00   88.99000
> REMARK 290   SMTRY2   4  0.00  1.00  0.00   28.29500
> REMARK 290   SMTRY3   4  0.00  0.00 -1.000.0
> REMARK 290
> CRYST1  177.980   56.590   83.220  90.00 116.58  90.00 C 1 2 1  12
> ORIGX1  1.00  0.00  0.000.0
> ORIGX2  0.00  1.00  0.000.0
> ORIGX3  0.00  0.00  1.000.0
> SCALE1  0.005619  0.00  0.0028110.0
> SCALE2  0.00  0.017671  0.000.0
> SCALE3  0.00  0.00  0.0134360.0
> 
> ===
> 
> After using symexp sym,model,(model),1 in command line, I encountered
> with:
> 
> ExecutivesSymexp-Error: No Symmetry loaded!
> 
> temp.pdb and model.pdb files are in following links:
> 
> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.dropbox.com%2Fs%2Ft8m1nrkx2s69wi9%2Fmodel.pdb%3Fdl%3D0&data=02%7C01%7Crobert.campbell%40queensu.ca%7C6261ebf5a5494e8b230808d4b877938b%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636336271090533556&sdata=g6I122L2C0o%2FAObHdjC9xXwoiPUx8J9MfupIpPp07ZM%3D&reserved=0
> 
> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.dropbox.com%2Fs%2Fmt7toc0wtenr779%2Ftemp.pdb%3Fdl%3D0&data=02%7C01%7Crobert.campbell%40queensu.ca%7C6261ebf5a5494e8b230808d4b877938b%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636336271090533556&sdata=6U5D%2BZOPnIAx3X61eeK77XLW23mroFnaM8sxiX7n1Ow%3D&reserved=0
> 
> Any help will be highly appreciated.
> 
> Best,
> Leila




-- 
Robert L. Campbell, Ph.D.
Adjunct Assistant Professor
Dept. of Biomedical & Molecular Sciences, Botterell Hall Rm 644
Queen's University, Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821
  http://pldserver1.biochem.queensu.ca/~rlc

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
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] ExecutivesSymexp-Error: No Symmetry loaded!

2017-06-21 Thread Robert Campbell
Hi Leila,

I responded too quickly without reading carefully!  Adding those lines should 
have worked (but only the CRYST1 line is needed).  Your model.pdb file that you 
linked to on Dropbox does not have the CRYST1 line.  Adding that line works for 
me.

Cheers,
Rob

On Wed, 2017-06-21 09:29  +0200,  leila karami  wrote:

> Dear PYMOL users,
> 
> I have done a homology modelling using swiss model. Template pdb file
> contain 3 chains (A, B, C). I used only chain A for homology
> modelling as template.
> 
> There is a symmetry operator in template pdb file (temp.pdb). I want
> to use symexp to obtain dimeric structure for modeled pdb file
> (model.pdb).
> 
> I manually added following records (from temp.pdb) at the first of the
> modeled pdb file:
> ===
> REMARK 290
> REMARK 290 CRYSTALLOGRAPHIC SYMMETRY
> REMARK 290 SYMMETRY OPERATORS FOR SPACE GROUP: C 1 2 1
> REMARK 290
> REMARK 290  SYMOP   SYMMETRY
> REMARK 290 NNNMMM   OPERATOR
> REMARK 290   1555   X,Y,Z
> REMARK 290   2555   -X,Y,-Z
> REMARK 290   3555   X+1/2,Y+1/2,Z
> REMARK 290   4555   -X+1/2,Y+1/2,-Z
> REMARK 290
> REMARK 290 WHERE NNN -> OPERATOR NUMBER
> REMARK 290   MMM -> TRANSLATION VECTOR
> REMARK 290
> REMARK 290 CRYSTALLOGRAPHIC SYMMETRY TRANSFORMATIONS
> REMARK 290 THE FOLLOWING TRANSFORMATIONS OPERATE ON THE ATOM/HETATM
> REMARK 290 RECORDS IN THIS ENTRY TO PRODUCE CRYSTALLOGRAPHICALLY
> REMARK 290 RELATED MOLECULES.
> REMARK 290   SMTRY1   1  1.00  0.00  0.000.0
> REMARK 290   SMTRY2   1  0.00  1.00  0.000.0
> REMARK 290   SMTRY3   1  0.00  0.00  1.000.0
> REMARK 290   SMTRY1   2 -1.00  0.00  0.000.0
> REMARK 290   SMTRY2   2  0.00  1.00  0.000.0
> REMARK 290   SMTRY3   2  0.00  0.00 -1.000.0
> REMARK 290   SMTRY1   3  1.00  0.00  0.00   88.99000
> REMARK 290   SMTRY2   3  0.00  1.00  0.00   28.29500
> REMARK 290   SMTRY3   3  0.00  0.00  1.000.0
> REMARK 290   SMTRY1   4 -1.00  0.00  0.00   88.99000
> REMARK 290   SMTRY2   4  0.00  1.00  0.00   28.29500
> REMARK 290   SMTRY3   4  0.00  0.00 -1.000.0
> REMARK 290
> CRYST1  177.980   56.590   83.220  90.00 116.58  90.00 C 1 2 1  12
> ORIGX1  1.00  0.00  0.000.0
> ORIGX2  0.00  1.00  0.000.0
> ORIGX3  0.00  0.00  1.000.0
> SCALE1  0.005619  0.00  0.0028110.0
> SCALE2  0.00  0.017671  0.000.0
> SCALE3  0.00  0.00  0.0134360.0
> 
> ===
> 
> After using symexp sym,model,(model),1 in command line, I encountered
> with:
> 
> ExecutivesSymexp-Error: No Symmetry loaded!
> 
> temp.pdb and model.pdb files are in following links:
> 
> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.dropbox.com%2Fs%2Ft8m1nrkx2s69wi9%2Fmodel.pdb%3Fdl%3D0&data=02%7C01%7Crobert.campbell%40queensu.ca%7C6261ebf5a5494e8b230808d4b877938b%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636336271090533556&sdata=g6I122L2C0o%2FAObHdjC9xXwoiPUx8J9MfupIpPp07ZM%3D&reserved=0
> 
> https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.dropbox.com%2Fs%2Fmt7toc0wtenr779%2Ftemp.pdb%3Fdl%3D0&data=02%7C01%7Crobert.campbell%40queensu.ca%7C6261ebf5a5494e8b230808d4b877938b%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636336271090533556&sdata=6U5D%2BZOPnIAx3X61eeK77XLW23mroFnaM8sxiX7n1Ow%3D&reserved=0
> 
> Any help will be highly appreciated.
> 
> Best,
> Leila




-- 
Robert L. Campbell, Ph.D.
Adjunct Assistant Professor
Dept. of Biomedical & Molecular Sciences, Botterell Hall Rm 644
Queen's University, Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821
  http://pldserver1.biochem.queensu.ca/~rlc

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
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] Scripting coloring method via own calculations

2017-02-14 Thread Robert Campbell
Hello Peleg,

I think there are other possibilities, but my data2bfactor.py script will do 
that for you.  You create a file with whitespace-separated columns (spaces 
and/or tabs) in which each line contains:

chain resi resn name data 

(i.e. chain, residue number, residue name, atom name and value to be applied to 
the B-factor column).

The number can also be applied to the occupancy column instead if you want to 
keep the B-factor intact.

Then you can use the spectrum command or my color_b.py script to colour each 
atom according to the data value.  My color_b.py script has a few more options 
than the spectrum command, including the ability to define a custom colour 
gradient scheme.

You can find my scripts here:

http://pldserver1.biochem.queensu.ca/~rlc/work/pymol/

Cheers,
Rob

On Tue, 2017-02-14 17:12  +0100,  Peleg Bar-Sapir  wrote:

> Hello,
> 
> I wish to write a script that will take the molecule loaded in PyMol,
> and color the molecule according to values I will calculate using the
> molecules' parameters (in the end there will be one floating number
> per atom). Then, I would like to display that using surface mode.
> 
> Could anyone direct me to a way of doing that? I saw scripts coloring
> by atom type, but I'm not sure how to apply it for a molecule already
> loaded in PyMol.
> 
> Best,
> 
> Peleg




-- 
Robert L. Campbell, Ph.D.
Adjunct Assistant Professor
Dept. of Biomedical & Molecular Sciences, Botterell Hall Rm 644
Queen's University, Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821
  http://pldserver1.biochem.queensu.ca/~rlc

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
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] Fw: symmetry and pdb remark

2017-02-02 Thread Robert Campbell
Hello Smith,

I had a look at the two structures.  In some crystallographic space groups 
there are alternate choices for the origin that are all equivalent. It appears 
that this is what you are seeing here.

If you look carefully at the mates generated separately for 2zam and 2zan, they 
are equivalent in their position and orientation relative to the original 
coordinates for each structure.  There is simply a translational shift along 
two axes that relates the coordinates of 2zam and its mates to 2zan and its 
mates.

There is a slight difference in the unit cell dimensions as well, which could 
make very small differences in the packing contacts.

Cheers,
Rob

On Thu, 2017-02-02 12:37  +0800,  Smith Liu  wrote:

> Dear All,
> 
> 
> Here I make my question much clear.
> 
> 
> For both PDB 2zan and 2zam, they are for the same protein, they
> conformation were similar except that 2zam was apo and 2zam was ATP
> binding. 2zaz was got by soaking the 2zam crystal with ATP. Both were
> P65 space group
> 
> 
> However by getting the mate coordinates of 2zam and 2zan by Coot or
> Chimera, you will find their 6 mates arrange differently ( viewed by
> Chimera or by Pymol). For 2zan, the 6 mates were separated with each
> other, but for 2zam the 6 mates were connected. Can you explain to me
> why  their 6 mates arrange differently?
> 
> 
> What is more, by pymol I align 2zan onto 2zam, and I get the PDB for
> 2zan fitted to 2zam (no any text information from the pdb file left
> after pymol saving, except the coordinates). Then I add all the text
> information from 2zan (except the coordinates) to the PDB for 2zan
> fitted to 2zam, and then I get the mate coordinates by Chimera or
> Coort and then view the mates got by Chimera or Coot for the text
> information added PDB for 2zan fitted to 2zam, I find the 6 mates
> arrange like 2zam, rather like 2zan (viewed by Chimera). Thus, will
> you please explain which remark information decide the mate
> arrangement, as in the  remark added PDB for 2zan fitted to 2zam? Why
> after pymol alignment, the same remark information leads to different
> mates arrangement?
> 
> 
> I am looking forward to getting a reply from you.
> 
> 
> Smith
> 
> 
> 
> 
> 
> 
> 
>  Forwarding messages 
> From: "Smith Liu" 
> Date: 2017-02-02 12:06:16
> To: pymol-users@lists.sourceforge.net
> Subject: symmetry and pdb remark
> 
> Dear All,
> 
> 
> 
> I have a symmetry problem, which I hope I can get your help.
> 
> 
> 
> For both PDB 2zan and 2zam, they are for the same protein, they
> conformation were similar except that 2zam was apo and 2zam was ATP
> binding. 2zaz was got by soaking the 2zam crystal with ATP. Both were
> P65 space group
> 
> 
> However by getting the mates of 2zam and 2zan, you will find their 6
> mates arrange differently ( viewed by Chimera). Can you explain to me
> why  their 6 mates arrange differently?
> 
> 
> What is more, by pymol I align 2zan onto 2zam, and I get the PDB for
> 2zan fitted to 2zam (no any remark information left after pymol
> saving). Then I add all the remark information from 2zan to the PDB
> for 2zan fitted to 2zam, and then I view the mates for the remark
> added PDB for 2zan fitted to 2zam, I find the 6 mates arrange like
> 2zam, rather like 2zan (viewed by Chimera).
> 
> 
> Thus, will you please explain which remark information decide the
> mate arrangement, as in the  remark added PDB for 2zan fitted to
> 2zam? Why after pymol alignment, the same remark information leads to
> different mates arrangement?
> 
> 
> I am looking forward to getting a reply from you.
> 
> 
> Smith



-- 
Robert L. Campbell, Ph.D.
Adjunct Assistant Professor
Dept. of Biomedical & Molecular Sciences, Botterell Hall Rm 644
Queen's University, Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821
  http://pldserver1.biochem.queensu.ca/~rlc

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
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] Function signature

2016-04-17 Thread Robert Campbell
Hi Martin,

If you simply want to be able to have the function operate on any
selection, simply do this:


def zoom_custom(position):
  cmd.zoom(position)

cmd.extend("zoom_custom", zoom_custom)

This allows you to type:

zoom_custom resi 117

or any other more complicated selection syntax without any parentheses.
Perhaps I am missing something in your specific requirements?

Cheers,
Rob

 On Sun, 2016-04-17 20:18  +0200,  Martin
Hediger  wrote:

> Dear all
> 
> In PyMOL, the syntax for eg. zooming in on residue 110 of a protein
> would be
> 
> zoom resi 117
> 
> I have a pymol script where I define a function that also zooms in on
> a residue (it's simple, only to illustrate the point):
> 
> def zoom_custom(position):
>  cmd.zoom("resi" + " " + str(position))
> cmd.extend("zoom_custom", zoom_custom)
> 
> However, when I want to call it from the PyMOL promt, i have to use
> 
> zoom_custom(117)
> 
> i.e. using parenthesis. How do i need to design the function such
> that I can enter it as above?
> 
> Thanks and best regards
> Martin
> 
> --
> Find and fix application performance issues faster with Applications
> Manager Applications Manager provides deep performance insights into
> multiple tiers of your business applications. It resolves application
> problems quickly and reduces your MTTR. Get your free trial!
> https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
> ___
> 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




-- 
Robert L. Campbell, Ph.D.
Adjunct Assistant Professor
Dept. of Biomedical & Molecular Sciences, Botterell Hall Rm 644
Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821
  http://pldserver1.biochem.queensu.ca/~rlc

--
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
___
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] secondary structure disappears

2015-07-23 Thread Robert Campbell
Hi Adam,

I think you also want to make sure that each strand as a distinct chain
ID if you want the cartoon representation to work correctly.

Unfortunately that means you have to use "alter" but to change the
chain IDs on the objects created by the split_states command before
merging them all into one object.

It worked for me when I tried that with 3ow9.

Cheers,
Rob

On Thu, 2015-07-23 09:23 EDT, "H. Adam Steinberg"
 wrote:

> Hi All,
> 
> If you fetch 3ow9 in PyMOL,
> split_states to get all six of the strands,
> select all, then copy to object,
> You only get the two strands, not all six, I need all six to be
> duplicated into one object so I can make a long amyloid fibril.
> 
> If I open the pdb file for 3ow9 in text edit and remove all the text
> for the individual models (and the waters), then open that file in
> PyMOL I get all six strands, but all the cartoon secondary structure
> is missing except for the two original strands. I tired running the
> alter command in PyMOL, it changes the secondary structure in the
> other objects I have open but not in this pdb.
> 
> I see the Sheet entry in the pdb file but I don’t know how to
> duplicate and change the sheet entry so it applies to the other four
> strands in the file.
> 
> Could someone point me to a place on the web that explains how to
> change the sheet entry (I’d like to learn how to do it)? or tell me
> how to fix this pdb file?
> 
> Thanks!
> 
> 
> 
> H. Adam Steinberg
> 7904 Bowman Rd
> Lodi, WI 53555
> 608/592-2366
> 




-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor
Dept. of Biomedical & Molecular Sciences, Botterell Hall Rm 644
Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821
  http://pldserver1.biochem.queensu.ca/~rlc

--
___
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] efficiency assigning b-factors

2015-06-16 Thread Robert Campbell
Hi Jordan et al.,

Yes one can use the alter command with a whole selection at once and
it is much faster. I hadn't realized that until Thomas Holder helped fix
my script that appears to do what you were wanting to do:

 http://pldserver1.biochem.queensu.ca/~rlc/work/pymol/data2bfactor.py

The B-factor data is read in and assigned to a dictionary by the
"atom_data_extract" function elsewhere in the script (indexed either by
chain and residue number, or by chain and ID) and then it is applied
like this:

b_dict = atom_data_extract(data_file)
quiet = int(quiet) == 1

def b_lookup(chain, resi, name, ID, b):
def _lookup(chain, resi, name, ID):
if resi in b_dict[chain] and isinstance(b_dict[chain][resi], dict):
return b_dict[chain][resi][name][0]
else:
# find data by ID
return b_dict[chain][int(ID)][0]
try:
if not chain in b_dict:
chain = ''
b = _lookup(chain, resi, name, ID)
if not quiet: print '///%s/%s/%s new: %f' % (chain, resi, name, b)
except KeyError:
if not quiet: print '///%s/%s/%s keeping: %f' % (chain, resi, name, 
b)
return b
stored.b = b_lookup

cmd.alter(mol, '%s=stored.b(chain, resi, name, ID, %s)' % (prop, prop))
cmd.rebuild()

Hope that helps.

Cheers,
Rob

On Tue, 2015-06-16 11:10 EDT, Tsjerk Wassenaar 
wrote:

> Hi Jordan,
> 
> The answer is something like (assuming reading from a file):
> 
> newb=[float(i) for i in open("stuff.dat").read().split()]
> alter n. ca, b=newb.pop()
> spectrum b
> 
> Hope it helps,
> 
> Tsjerk
> 
> On Tue, Jun 16, 2015 at 10:25 AM, Jordan Willis
>  wrote:
> 
> > Hi Tsjerk,
> >
> > It seems everyone is pointing to this (
> > http://www.pymolwiki.org/index.php/Color#Reassigning_B-Factors_and_Coloring)
> > which I somehow missed. However, they seem to be altering one
> > residue at a time like I’m doing.
> >
> >
> > Jordan
> >
> > On Jun 15, 2015, at 11:59 PM, Tsjerk Wassenaar 
> > wrote:
> >
> > Hi Jordan,
> >
> > Yes, although I don't have the answer at hand, it has been given on
> > the user list several times. You can find it in the archives.
> >
> > Cheers,
> >
> > Tsjerk
> > On Jun 16, 2015 08:16, "Jordan Willis" 
> > wrote:
> >
> >> Hi,
> >>
> >> I have a dictionary that has a bunch of values I want to assign to
> >> b-factors in order to color by. In my script:
> >>
> >> for residue in data:
> >>cmd.alter(“resi
> >> {}”.format(residue[‘resnum’]),”b={}”.format(residue[‘value’]))
> >>
> >> This executes the alter command for each residue. For some reason,
> >> its taking forever in my script. Is there something inherently
> >> inefficient about alter? And is there anyway to fix it? Perhaps,
> >> assign a bunch of b-factors at once.
> >>
> >> Jordan
> >>
> >>
> >> --
> >>
> >> ___
> >> 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
> >>
> >
> >
> 
> 




-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor
Dept. of Biomedical & Molecular Sciences, Botterell Hall Rm 644
Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821
  http://pldserver1.biochem.queensu.ca/~rlc

--
___
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] Backbone RMSD

2014-09-10 Thread Robert Campbell
Hello Amita,

On Wed, 2014-09-10 09:41  EDT,  Amita Rani Sahoo 
wrote:

> Dear Pymol users,
> 
> I want to calculate backbone RMSD of proteins having two different
> conformations (For example 2RH1 and 1F88). With the align command it
> calculates the executive RMSD, but i need backbone RMSD. Please advise
> something.

You simply need to include a selection on the command line.  At the PyMOL
prompt, you could type

  align 2hr1 & backbone, 1f88 & backbone

Cheers,
Rob


-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor
Dept. of Biomedical & Molecular Sciences
Botterell Hall Rm 644
Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821
http://pldserver1.biochem.queensu.ca/~rlc

--
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
___
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] Fwd: color by RMSF or RMSD

2014-07-23 Thread Robert Campbell
Hello Hidhi,

On Wed, 2014-07-23 16:39  EDT,  Nidhi Jatana 
wrote:

> Dear Sir/Madam
> I have generated five models for a protein and I wanted to check how the
> models align to each other and color them by RMSD/RMSF. I wanted to know
> what should be the ideal way to do it. Shall I use RMSF or RMSD for the
> same?

You should use the RMSF calculation as that takes into account all of the
structures. RMSD is a calculation that applies only to pairs of structures.

> I tried doing this using rmsf_states.py and color_b.py scripts:

As the author, I am somewhat familiar with these scripts. :)

>- First I merged the five pdb files with load command, generating a
>multi-state model
>- Next, I used rmsf_states.py script to generate b-factors (using
>command: rmsf_states tasser, byres=1, reference_state=1)
>- Next I used the color_b.py script to color the structures (using
>command: color_b(selection='all', item='b', mode='hist',
> gradient='bgr') )
> 
> Is this the correct way to do it?

It sounds correct to me.  Did it not produce the result you expected?  By
setting byres=1, you are automatically only calculating the RMSF for the
C-alpha atoms of each residue, but that value is then used to modify the
B-values of all of the atoms in each residue. 

> And there is one more query. When I am loading the multi-state model, I
> could only see one structure, not all five? Can I visualize all 5?

Yes, as Andreas said to turn on the display of all states:

set all_states, 1

and to revert to just showing a single state:

set all_states, 0

Cheers,
Rob
-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor
Dept. of Biomedical & Molecular Sciences
Botterell Hall Rm 644
Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821
http://pldserver1.biochem.queensu.ca/~rlc

--
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
___
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] command question RE printing out distances to text file

2014-06-09 Thread Robert Campbell
Hi Suzanne,

You can also get the distance printed in the external GUI or terminal window
by using the "cmd.distance" version of the command.  So either you can
assign the distance to a variable and print it or you can print the result
directly.

Assuming you have two selections, sele1 and sele2 specifying the atoms of
interest you can do:

  d = cmd.distance(sele1,sele2)
  print sele1,sele2,d


Cheers,
Rob

On Mon, 2014-06-09
13:13 EDT, Thomas Holder  wrote:

> Hi Suzanne,
> 
> you can use the get_distance command. It doesn't generate a distance
> object but prints the distance to the external window.
> 
> http://pymolwiki.org/index.php/Get_Distance
> 
> Cheers,
>   Thomas
> 
> On 06 Jun 2014, at 23:03, Lapolla, Suzanne M (HSC)
>  wrote:
> 
> > Fellow Pymol Users:
> > I may have asked this question before...but if so have forgotten. I am
> > measuring distances between 2 atoms in 2 different objects using the
> > distance command, and it is working perfectly, but I wonder if there is
> > a command I can use/add so that those distances can be printed in the
> > external gui as well as being shown in the viewer. I will be doing lots
> > of these at the same time and the screen will get crowded. Thank you in
> > advance.
> 




-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor
Dept. of Biomedical & Molecular Sciences
Botterell Hall Rm 644
Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821
http://pldserver1.biochem.queensu.ca/~rlc

--
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://www.hpccsystems.com
___
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] command question RE printing out distances to text file

2014-06-09 Thread Robert Campbell
Hi Suzanne,

You can also get the distance printed in the external GUI or terminal window
by using the "cmd.distance" version of the command.  So either you can
assign the distance to a variable and print it or you can print the result
directly.

Assuming you have two selections, sele1 and sele2 specifying the atoms of
interest you could do something like this:

  d = cmd.distance(sele1,sele2)
  print sele1,sele2,d


Cheers,
Rob

On Mon, 2014-06-09
13:13 EDT, Thomas Holder  wrote:

> Hi Suzanne,
> 
> you can use the get_distance command. It doesn't generate a distance
> object but prints the distance to the external window.
> 
> http://pymolwiki.org/index.php/Get_Distance
> 
> Cheers,
>   Thomas
> 
> On 06 Jun 2014, at 23:03, Lapolla, Suzanne M (HSC)
>  wrote:
> 
> > Fellow Pymol Users:
> > I may have asked this question before...but if so have forgotten. I am
> > measuring distances between 2 atoms in 2 different objects using the
> > distance command, and it is working perfectly, but I wonder if there is
> > a command I can use/add so that those distances can be printed in the
> > external gui as well as being shown in the viewer. I will be doing lots
> > of these at the same time and the screen will get crowded. Thank you in
> > advance.
> 




-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor
Dept. of Biomedical & Molecular Sciences
Botterell Hall Rm 644
Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821
http://pldserver1.biochem.queensu.ca/~rlc

--
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://www.hpccsystems.com
___
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] ccp4 question

2014-02-04 Thread Robert Campbell
Dear Stefan,

On Tue, 2014-02-04 14:44  EST,  Stefan Ivanov
 wrote:

> Dear Pymolers,
> 
> I tried to run ncont on a pdb structure and got a .ncont file as output,
> but the only thing the file contains is an error message (see below). I
> tried copying default.def into the working directory, but couldn't get
> the darn thing to work. If someone can help I'd appreciate it.

You might have better luck asking on the ccp4bb, but I'll try to answer...

> --
> 
> >> CCP4 library signal ccp4_general:Cannot open default.def (Error)
>raised in ccp4fyp <<
>  
>  ###
>  ###
>  ###
>  ### CCP4 6.4: NCONTversion 6.4 : ##
>  ###
>  User: unknown  Run date:  3/ 2/2014 Run time: 16:00:09 
> 
> 
>  Please reference: Collaborative Computational Project, Number 4. 1994.
>  "The CCP4 Suite: Programs for Protein Crystallography". Acta Cryst. D50,
> 760-763. as well as any specific reference in the program write-up.
> 
> 
>  
> --
> 
>  * ERROR #40 READ:
> 
>  Logical file name not found.

You haven't told us how you tried to run it, but the error tells you
that it is not finding your .pdb file.  Did you run it on the command
line?  If so, did you type something like:

ncont xyzin file.pdb

The standard command line format for CCP4 programs is such that coordinate
files are indicated by the "xyzin" (and "xyzout") logical names. 

It can also be run from the ccp4i interface. Did you try that?

Cheers,
Rob

-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor
Dept. of Biomedical & Molecular Sciences
Botterell Hall Rm 644
Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821
http://pldserver1.biochem.queensu.ca/~rlc

--
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
___
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] combining multiple objects into one multistate object

2014-01-16 Thread Robert Campbell
Hi Jed,

On Thu, 2014-01-16 10:28  EST,  Jed Goldstone  wrote:

> I know this seems silly, but I can't figure out how to combine multiple 
> separate objects into one multistate object. I have a set of Modeler 
> models loaded from a single pdb file, automagically separated into 
> separate objects that have been aligned, and I want to combine them into 
> one object in order to run Robert Cambell's rmsf_states script (and, 
> also since it's just easier to compare and manipulate).

You probably have a reason for loading the models into separate objects,
but my first suggestion would be to just load all of the models into a
single object in the first place.  You can align them using the
"intra_fit" command.  I normally load my modeller models into one object
with my load_models.py script or my load_best.py script if I want them
sorted by modeller's objective function value (both scripts are also on my
web site). I like being able to see the models individually or all at once
(with set all_states, 1).

Cheers,
Rob

> 
> I've searched the manual, the sourceforge list, and the wiki. Somehow 
> the command 'create' with 'target_state=-1' and 'discrete=1' seems like 
> it should do this, but all the objects end up in the first state (and 
> the cartoon representation is a subset of what it should be (other 
> representations are fine).
> I'm using incentive v1.6.0.0 on Windows 7.
> 
> Jed
> 




-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor
Dept. of Biomedical & Molecular Sciences
Botterell Hall Rm 644
Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821
http://pldserver1.biochem.queensu.ca/~rlc

--
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
___
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 automate RMSD calculation for large no of structures

2014-01-07 Thread Robert Campbell
On Tue, 2014-01-07 12:05  EST,  Jed Goldstone  wrote:

> Check out Robert Campbell's Pymol script repository.
> I think align_all_to_all.py should do what you want, including exporting 
> RMSD values.
> 
> http://pldserver1.biochem.queensu.ca/~rlc/work/pymol/

Actually, I think Om only wants to align the individual mutants to the
wild-type not all 500 mutants against each other which is what the above
script does.  Also, I think for 500 structure you probably don't want to
load all 500 in at one time, so it would be better to have a script that
only loads each mutant one at a time, calculates its RMSD to the wild-type
and then deletes it.

I have modified my align_all.py script to create a new one called
align_allfiles.py and added that to the above website.  It is also attached
here.  To specify the use of all atoms simply add that to the mobile and
target selections.  You can also specify PyMOL's cutoff and cycles
arguments to the align function (defaults to cycles=5, cutoff=2)

align_allfiles target_model, files=mutants*.pdb, mobile_selection=all,
   target_selection=all

It will print out a list of RMSD values for each mutant in order read in as
well as sorted by RMSD.


Cheers,
Rob

> Jed
> 
> 
> On 1/7/2014 11:58 AM, Om Shiv wrote:
> > Hello All
> >
> > I am a new user to Pymol and Python.
> >
> > I have a PDB Structure with single chain (A) and I have modeled 500
> > single point mutants of this wild structure.
> >
> > Now for each such 500 modeled structures, I would like to calculate RMSD
> > (ALL ATOMS) with the wild type PDB structure.
> >
> > Can anybody help me with the script to automate calculation of 500 RMSD
> > calculations using PYMOL ?
> >
> > Secondly, what threshold value of RMSD can be considered above which we
> > can say that the mutant structure is considerably different than the
> > wild type ?
> >
> > Thanks in advance.
> >




-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor
Dept. of Biomedical & Molecular Sciences
Botterell Hall Rm 644
Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821
http://pldserver1.biochem.queensu.ca/~rlc
#! /usr/bin/env python
# original Written by Jules Jacobsen (jacob...@ebi.ac.uk). Feel free to do whatever you like with this code.
# extensively modified by Robert L. Campbell (r...@queensu.ca)

from pymol import cmd
import glob, re

def align_allfiles(target=None,files=None,mobile_selection='name ca',target_selection='name ca',cutoff=2, cycles=5,cgo_object=0):
  """
  Aligns all models in a list of files to one target

  usage:
align_allfiles [target][files=][target_selection=name ca][mobile_selection=name ca]
[cutoff=2][cycles=5][cgo_object=0]
where target specifies the model id you want to align all others against,
and target_selection, mobile_selection, cutoff and cycles are options
passed to the align command.  You can specify the files to load and align
using a wildcard.

By default the selection is all C-alpha atoms and the cutoff is 2 and the
number of cycles is 5.
Setting cgo_object to 1, will cause the generation of an alignment object for
each object.  They will be named like _on_, where  and
 will be replaced by the real object and target names.

Example:
  align_allfiles target=name1, files=model.B*.pdb, mobile_selection=c. b & n. n+ca+c+o,target_selection=c. a & n. n+ca+c+o

  """
  cutoff = int(cutoff)
  cycles = int(cycles)
  cgo_object = int(cgo_object)

  file_list = glob.glob(files)
  file_list.sort()
  extension = re.compile( '(^.*[\/]|\.(pdb|ent|brk))' )
  object_list = []

  rmsd = {}
  rmsd_list = []
  for i in range(len(file_list)):
obj_name1 = extension.sub('',file_list[i])
object_list.append(extension.sub('',file_list[i]))
cmd.load(file_list[i],obj_name1)
if cgo_object:
  objectname = 'align_%s_on_%s' % (object_list[i],target)
  rms = cmd.align('%s & %s'%(object_list[i],mobile_selection),'%s & %s'%(target,target_selection),cutoff=cutoff,cycles=cycles,object=objectname)
else:
  rms = cmd.align('%s & %s'%(object_list[i],mobile_selection),'%s & %s'%(target,target_selection),cutoff=cutoff,cycles=cycles)

rmsd[object_list[i]] = (rms[0],rms[1])
rmsd_list.append((object_list[i],rms[0],rms[1]))
cmd.delete(obj_name1)

  rmsd_list.sort(lambda x,y: cmp(x[1],y[1]))
# loop over dictionary and print out matrix of final rms values
  print "Aligning against:",target
  for object_name in object_list:
print "%s: %6.3f using %d atoms" % (object_name,rmsd[object_name][0],rmsd[object_name][1])

  print "\nSorted from best match to worst:"
  for r in rmsd_list:
print "%s: %6.3f using %d atoms" % r

cmd.extend('align_allfiles',align_allfiles)
--
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects th

Re: [PyMOL] Problem Compiling v 1.6.0.0 in 64 bit Debian Testing

2013-06-25 Thread Robert Campbell
Hi Stephen,

On Tue, 2013-06-25 09:16  EDT,  "Stephen P. Molnar"
 wrote:

> I have just installed the 64 bit Debian Testing distribution in an
> Oracle VM on my laptop as a test bed.
> 
> I successfully compiled v 1.6.0.0 in my 6 bit Debian Wheezy production
> OS.
> 
> I didn't get any error messages from my laptop installation during the
> compilation process.  However when run pymol only the viewer window
> opens!
> 
> Here are the messages:
> 
> > Traceback (most recent call last):
> >   File "/home/computation/Apps/pymol/lib/python/pymol/__init__.py",
> > line 448, in launch_gui __import__(self.invocation.options.gui)
> >   File "/home/computation/Apps/pymol/lib/python/pmg_tk/__init__.py",
> > line 22, in  from PMGApp import *
> >   File "/home/computation/Apps/pymol/lib/python/pmg_tk/PMGApp.py",
> > line 31, in  import Pmw
> > ImportError: No module named Pmw
> >  Detected 4 CPU cores.  Enabled multithreaded rendering.
> > OpenGL Warning: No pincher, please call crStateSetCurrentPointers()
> > in your SPU
> 
> Unfortunately, I don't have the faintest idea as to what is missing.
> Any assistance will be appreciated.  Thanks in advance. 

I would appear that you are just missing the python-pmw package on this
machine, whereas it must have been present on your Wheezy version.

Cheers,
Rob
-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor
Dept. of Biomedical & Molecular Sciences
Botterell Hall Rm 644
Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821
http://pldserver1.biochem.queensu.ca/~rlc

--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
___
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 1.6 pre-release announcement

2013-06-14 Thread Robert Campbell
Hello Thomas and David,

Was there any resolution of this?  I've just compiled the latest version
from SVN and I have the same problem opening files created under version
1.5.0.  This is on Debian testing (32-bit).

Cheers,
Rob

 On Fri, 2013-04-26 19:15  EDT,  David Hall 
wrote:

> Hi Thomas,
> 
> I'm running into issues with color compatibility between 1.6 and
> earlier versions when opening pses
> (a) when I open any 1.5 pse in 1.6, I see a bunch of errors like:
> Setting-Error: type read mismatch (color) 6
> Setting-Error: type read mismatch (color) 663
> Setting-Error: type read mismatch (color) 664
> (b) background color disparity:
> saved in 1.5 with black background; opens in 1.6 with a white background
> saved in 1.6 with a blackground; opens in 1.5 (and earlier) with a red
> background
> 
> These are run on openSUSE 12.3 with SVN rev 4028 . On a side note,
> others who would like to beta test can use devel:languages:python repo
> in openSUSE:
> https://build.opensuse.org/package/show?package=pymol&project=devel%3Alanguages%3Apython
> 
> -David
> 

-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor
Dept. of Biomedical & Molecular Sciences
Botterell Hall Rm 644
Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821
http://pldserver1.biochem.queensu.ca/~rlc

--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
___
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 82, Issue 1

2013-05-10 Thread Robert Campbell
Hello Bachar,

On Fri, 2013-05-10 14:29  EDT,  Bachar Cheaib 
wrote:

>  Dear pymol users,
> 
> I have wondered whether someone know how to know if a such structure in
> pdb file is multi-mer or mono-mer biologically speaking? Somehow in the
> related publication of structure this information is present in
> occurrence and  in pdb also is not nonintuitive to catch without the
> BIOMT transformations. A monomer could be deposited with multiple copies
> (or chains) of the same protein, but strikingly a biological (in vivo)
> homo-tetrameter (ex.1xiu ) it seems to be represented as a dimeric (two
> chains) and missing the two others in the pdb file
> 
> This record "REMARK 350 AUTHOR DETERMINED BIOLOGICAL UNIT: TETRAMERIC"
> does not tell us if a structure is really multi or monomeric in the pdb
> file.

This does tell you that the protein is thought to exist as a tetramer.
What is determined by crystallography and therefore what is present in a
PDB file is the structure that exists in the asymmetric unit, in other words
the unique part of the structure.  That could be a portion of the
structure if it has internal symmetry, but it could also be two or more
copies of the biological unit.  If the asymmetric unit is not a tetramer
(as in your case), then you do need to use the BIOMT information to generate
the tetramer. That is why that information is there.  Just in the answers
to a previous question that you included in your message, you could load the
structure with the "type=pdb1" option:

  fetch 1xiu, type=pdb1, async=0
  set all_states

which will fetch the biological assembly for that structure.  The extra
monomers that were generated by the crystallographic symmetry will be
visible when you set all_states.  Or you could split the states out into
separate objects.

> I would like just like to know how to conclude multimeric states
> informations from the pdb file without doing transformations ? just this
> information



Cheers,
Rob
-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor
Dept. of Biomedical & Molecular Sciences
Botterell Hall Rm 644
Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821
http://pldserver1.biochem.queensu.ca/~rlc

--
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and 
their applications. This 200-page book is written by three acclaimed 
leaders in the field. The early access version is available now. 
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
___
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 82, Issue 1

2013-05-10 Thread Robert Campbell
Hello Bachar,

On Fri, 2013-05-10 14:29  EDT,  Bachar Cheaib 
wrote:

>  Dear pymol users,
> 
> I have wondered whether someone know how to know if a such structure in
> pdb file is multi-mer or mono-mer biologically speaking? Somehow in the
> related publication of structure this information is present in
> occurrence and  in pdb also is not nonintuitive to catch without the
> BIOMT transformations. A monomer could be deposited with multiple copies
> (or chains) of the same protein, but strikingly a biological (in vivo)
> homo-tetrameter (ex.1xiu ) it seems to be represented as a dimeric (two
> chains) and missing the two others in the pdb file
> 
> This record "REMARK 350 AUTHOR DETERMINED BIOLOGICAL UNIT: TETRAMERIC"
> does not tell us if a structure is really multi or monomeric in the pdb
> file.

This does tell you that the protein is thought to exist as a tetramer.
What is determined by crystallography and therefore what is present in a
PDB file is the structure that exists in the asymmetric unit, in other words
the unique part of the structure.  That could be a portion of the
structure if it has internal symmetry, but it could also be two or more
copies of the biological unit.  If the asymmetric unit is not a tetramer
(as in your case), then you do need to use the BIOMT information to generate
the tetramer. That is why that information is there.  Just in the answers
to a previous question that you included in your message, you could load the
structure with the "type=pdb1" option:

  fetch 1xiu, type=pdb1, async=0
  set all_states

which will fetch the biological assembly for that structure.  The extra
monomers that were generated by the crystallographic symmetry will be
visible when you set all_states.  Or you could split the states out into
separate objects.

> I would like just like to know how to conclude multimeric states
> informations from the pdb file without doing transformations ? just this
> information



Cheers,
Rob
-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor
Dept. of Biomedical & Molecular Sciences
Botterell Hall Rm 644
Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821
http://pldserver1.biochem.queensu.ca/~rlc

--
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and 
their applications. This 200-page book is written by three acclaimed 
leaders in the field. The early access version is available now. 
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
___
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] SS in a trajectory

2013-04-24 Thread Robert Campbell
Hi,

On Wed, 2013-04-24 10:31  EDT,  Jianghai Zhu  wrote:

> Hi,
> 
> I have a trajectory file, in which two short helices would merge into one
> long helix.  However, when I play the trajectory in Pymol as cartoon, the
> long helix would still be shown as two helices with a loop in between.
> Is there a way to force Pymol to show a long helix for a specific range
> of frames in a trajectory? Thanks a lot.

When you load the trajectory, use the discrete flag to have PyMOL computer
the secondary structure for each state .

load trajectory.pdb, discrete=1

I'm assuming you are loading a multi-model .PDB file as the trajectory.  If
you are using the load_traj command to load an AMBER trajectory, there is
no similar option.

Cheers,
Rob
-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor
Dept. of Biomedical & Molecular Sciences
Botterell Hall Rm 644
Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821
http://pldserver1.biochem.queensu.ca/~rlc

--
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service 
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr
___
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] Splitting a PDB file into its constituent chains, and making multiple (smaller) PDB files

2013-04-04 Thread Robert Campbell
Hello Anasuya,

On Thu, 2013-04-04 15:49  EDT,  Anasuya Dighe 
wrote:

> Hello,
> 
> I wanted to know if its possible in PyMOL to split a PDB file with
> multiple chains,into its component chains and make smaller PDB files
> corresponding to each chain.
> 
> For eg: I have a pdb file, 1a55.pdb, having chains P,Q and R. How do I
> make split it to separate components like 1a55_P.pdb, 1a55_Q.pdb,
> 1a55_R.pdb
> 
> Also, in case I have a large number of multiple chain PDB files, how
> could I go about splitting each of them?

In addition to the other (manual) answers, there is a script on the PyMOL
wiki that does exactly this.  See:

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

Cheers,
Rob

-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor
Dept. of Biomedical & Molecular Sciences
Botterell Hall Rm 644
Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821
http://pldserver1.biochem.queensu.ca/~rlc

--
Minimize network downtime and maximize team effectiveness.
Reduce network management and security costs.Learn how to hire 
the most talented Cisco Certified professionals. Visit the 
Employer Resources Portal
http://www.cisco.com/web/learning/employer_resources/index.html
___
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] About draw_links.py by Dr. Robert Campbell

2013-02-21 Thread Robert Campbell
Hi Anasuya,

On Thu, 21 Feb 2013 17:10:40 +0530
Anasuya Dighe  wrote:

> 
> Hi,
> 
> I have been trying to use the script draw_links.py at 
> http://pldserver1.biochem.queensu.ca/~rlc/work/pymol/ to view links
> between each pair of c-alpha atoms present in an atom selection.
> Once I load a PDB (1q16.pdb) and make an atom selection, lets say :
> PyMOL>select pk1, name CA in resi 5+10+15+12+16 and chain C , on the
> PyMOL>command-line in pymol, I
> do : PyMOL>run draw_links.py
> 
> I wanted to visualise links between all pairs of calpha atoms present in
> the atom selection, pk1.
> However I am unable to do that using draw_links.py
> I am doing: PyMOL> draw_links pk1
> 
> How can I do this using draw_links.py?
> Where am I going wrong?

Perhaps the instructions are not clear enough, but the script is not
designed to automatically draw links between all pairs of C-alphas in a
selection. It expects two different selections and it will draw links
between the first residue of each selection and then the second and so on.
It doesn't therefore make sense to give it the same selection for both
because, in your example, it draws a zero-length link between residue 5 and
residue 5, and another between residue 10 and residue 10 and so on.

You will have to run the script multiple times to get the links you want:

draw_links name CA & resi 5 and chain C, name CA  resi 10 and chain C
draw_links name CA & resi 5 and chain C, name CA  resi 15 and chain C
draw_links name CA & resi 5 and chain C, name CA  resi 12 and chain C

Sorry that it doesn't quite do what you were expecting!  I designed it for
the situation where I have two structures that exhibit a conformational
change and I wanted to show how the C-alphas were moving so then it made
sense to have the two selections be the same atoms, but in different
molecules.

Cheers,
Rob
-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor 
Dept. of Biomedical & Molecular Sciences, Botterell Hall Rm 644
Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821
http://pldserver1.biochem.queensu.ca/~rlc

--
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_d2d_feb
___
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] drawing a bond between the same Calpha atom in different states

2012-12-13 Thread Robert Campbell
Hi,

(replying to my own message)

On Thu, 2012-12-13 15:52  EST,  Robert Campbell
 wrote:

> Hi Jon,
> 
> On Thu, 2012-12-13 16:09  EST,  Jonathan Grimes 
> wrote:
> 
> >   Hi All,
> > 
> >I have 2 different states of the same molecule..different
> > conformations generated from MD, so the same number of Calpha atoms,
> > with a direct 1:1 mapping between Calphas with the same residue
> > numbering.
> > 
> >I would like to draw a "bond" between equivalent C-alpha atoms, and I
> > will then ramp colour along the bond, say blue-white-red.
> > 
> >Could I get advice how to draw a bond between 2 Calpha atoms (same
> > resi) from different states
> 
> I have a script for drawing a cylinder (you can specify the radius and the
> beginning and ending colors) between two atoms.  The script is at:
> 
> http://pldserver1.biochem.queensu.ca/~rlc/work/pymol/draw_cylinder_cgo.py
> 
> First "run" the script via the "File" menu or via the command line:
> 
> run draw_cylinder_cgo.py
> 
> You will then have two new functions defined "draw_cylinder" and
> "draw_cylinder_cgo".  The former allows you to pick two atoms to draw the
> cylinder between:
> 
> draw_cylinder name, atom1, atom2, radius, start_color, end_color
> 
> where each atom is a standard PyMOL selection (defaults to pk1 and
> pk2) and color is a 3-element RGB tuple defining the color
> of the cylinder (where each value of R, G and B is between 0 and 1
> inclusive).  The colors default to (1,1,0).
> 
> 
> Alternatively, draw_cylinder_cgo takes as arguments the start and end
> coordinates of the vector in place of atom1 and atom2.

I could add more instructions here.  You can specify the colours by
name and if you have picked the atoms with the mouse you can easily do
something like:

  draw_cylinder dist1, start_color=red, end_color=yellow

and it will default to using atom selections "pk1" and "pk2" and a radius
of 0.1 A.

Cheers,
Rob
-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor
Dept. of Biomedical & Molecular Sciences
Botterell Hall Rm 644
Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821
http://pldserver1.biochem.queensu.ca/~rlc

--
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
___
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] drawing a bond between the same Calpha atom in different states

2012-12-13 Thread Robert Campbell
Hi Jon,

On Thu, 2012-12-13 16:09  EST,  Jonathan Grimes 
wrote:

>   Hi All,
> 
>I have 2 different states of the same molecule..different
> conformations generated from MD, so the same number of Calpha atoms, with
> a direct 1:1 mapping between Calphas with the same residue numbering.
> 
>I would like to draw a "bond" between equivalent C-alpha atoms, and I
> will then ramp colour along the bond, say blue-white-red.
> 
>Could I get advice how to draw a bond between 2 Calpha atoms (same
> resi) from different states

I have a script for drawing a cylinder (you can specify the radius and the
beginning and ending colors) between two atoms.  The script is at:

http://pldserver1.biochem.queensu.ca/~rlc/work/pymol/draw_cylinder_cgo.py

First "run" the script via the "File" menu or via the command line:

run draw_cylinder_cgo.py

You will then have two new functions defined "draw_cylinder" and
"draw_cylinder_cgo".  The former allows you to pick two atoms to draw the
cylinder between:

draw_cylinder name, atom1, atom2, radius, start_color, end_color

where each atom is a standard PyMOL selection (defaults to pk1 and pk2)
and color is a 3-element RGB tuple defining the color
of the cylinder (where each value of R, G and B is between 0 and 1
inclusive).  The colors default to (1,1,0).


Alternatively, draw_cylinder_cgo takes as arguments the start and end
coordinates of the vector in place of atom1 and atom2.

Hope that helps.

Cheers,
Rob

-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor
Dept. of Biomedical & Molecular Sciences
Botterell Hall Rm 644
Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821
http://pldserver1.biochem.queensu.ca/~rlc

--
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
___
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] sequence file extraction

2012-07-24 Thread Robert Campbell
Hi Thomas,

On Tue, 2012-07-24 12:57  EDT,  Thomas Holder
 wrote:

> Hi Stefano,
> 
> this is a known bug and it has not been fixed yet. A workaround is to 
> only save one object at a time to fasta format.
> 
> See bug report:
> http://sourceforge.net/tracker/?func=detail&aid=3466472&group_id=4546&atid=104546

Another bug (I guess I should report it via the bug tracker) is that if a
structure has multiple conformations (at least at the CA atom), then the
residue appears twice in the sequence.

Cheers,
Rob


-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor 
Dept. of Biomedical & Molecular Sciences, Botterell Hall Rm 644
Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821
http://pldserver1.biochem.queensu.ca/~rlc

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
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] about super_all.py Plugin installation.

2011-12-26 Thread Robert Campbell
Dear Pavan,

On Tue, 27 Dec 2011 00:15:38 +0530, PAVAN PAYGHAN  wrote:

> Dear PyMol Users,
> 
> I am using PyMol +v0.97 version on Windows XP .I have downloded
> super_all.py
> and tried to install the plugin by using install Plugin option menu.
> Then I got the message that the plugin was installed but after
> re-initialization I dont find the Plugin for the same in Plugin list,also
> was unable to run
> super command .So will you please help me to solve this problem.Is there
> any incompatibility issues for OS XP?
> Please help me in solving this problem.Or suggest the proper way of doing
> the same as I am new user .

This is not a plugin that needs installing, but simply a script that you run.

To use it, you just store the super_all.py file somewhere on your computer
(I have a directory/folder dedicated to PyMOL scripts) and you load the
script's function by using the "Run" function from the "File" menu.  This has
to be done once each time PyMOL starts.  I load my commonly used scripts
automatically via my .pymolrc file. Once the script loaded, then you can call
the "super_all" function from the command line within PyMOL. You can see the
options by typing

  super_all ?

and you can get more information by typing

  help super_all

I hope this helps.

Cheers,
Rob
-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor 
Dept. of Biomedical & Molecular Sciences, Botterell Hall Rm 644
Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821
http://pldserver1.biochem.queensu.ca/~rlc

--
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
___
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] Forced Linux/Python upgrade, killed PyMol, please help!

2011-12-21 Thread Robert Campbell
Hi John,

On Wed, 2011-12-21 11:12  EST,  John Ladasky 
wrote:

> Hello everyone.  It has been a while since I posted here.  Apologies to 
> the admins, I tried to subscribe again, and I forgot that I was already 
> subscribed.
> 
> For some non-PyMol work, I was obligated to upgrade my operating system 
> to Ubuntu Linux 11.10.  In fact, the specific reason that I had to 
> upgrade was to get Python 2.7 as the default Python on my computer.
> 
> The Ubuntu Linux 11.10 repository listed PyMol 1.4.1, so I downloaded it 
> and installed it.  When I attempted to launch PyMol, nothing happened.  
> So I visited the PyMol web page and found this:
> 
> "PyMOL v1.4+ do not run on SLED 10.2 due to a bug in Python 2.7 and
> Tcl/Tk."
> 
> http://www.pymol.org/support/platforms
> 
> Ouch.

I use Debian testing, upon which Ubuntu is based.  I use PyMOL with python
2.7 without any problem.  The only problem I do have is that I have to
compile it with gcc-4.5, rather than the default gcc-4.6 compiler (at least
this was true the last time I checked a few weeks ago).

I compile PyMOL myself after downloading from the SVN sources using the
simple routine of:

CC=gcc-4.5 python setup.py build
python setup.py install --prefix=/software/Linux
python setup2.py install

The "--prefix" option just allows me to put the software on an NFS mounted
disk, rather than on my own machine, so it is available to all the lab
computers.

Cheers,
Rob
-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor 
Dept. of Biomedical & Molecular Sciences, Botterell Hall Rm 644
Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821
http://pldserver1.biochem.queensu.ca/~rlc

--
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
___
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: Cartoon representation for .pdb file with multible entries

2011-10-26 Thread Robert Campbell
Hi Alexander,

On Wed, 2011-10-26 12:53  EDT,  Alexander Schulz
 wrote:

> Hi Thomas,
> 
> thank you very much for the answer, I'm beginning to understand the
> actual problem now. 
> 
> dss state=1 
> helps, but it changes the problem: I would like to see the secondary
> structure that corresponds to the single snapshot. When I use dss
> state=1, I just see the secondary structure of the first snapshot in all
> snapshots. 
> 
> Is there a way to calculate the secondary structure for each individual
> snapshot stored in this single .pdb file?

Yes, simply load the pdb file with the "discrete=1" flag:

load md_file.pdb, discrete=1
dss md_file

Setting the "discrete" flag causes PyMOL to store more information
(B-factors, secondary structure) with each atom of each state -- so it can
also be noticeably slower to load and uses more memory.

Cheers,
Rob

-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor 
Dept. of Biomedical & Molecular Sciences, Botterell Hall Rm 644
Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821
http://pldserver1.biochem.queensu.ca/~rlc

--
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn 
about Cisco certifications, training, and career opportunities. 
http://p.sf.net/sfu/cisco-dev2dev
___
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] change transparency for only a selection

2011-05-18 Thread Robert Campbell
Hi Nick,

On Wed, 2011-05-18 11:39  EDT,  Nicolas Bock  wrote:

> Hello list,
> 
> I would like to change the stick_transparency for a selection but it
> doesn't seem to work. I am using the xyz file from the wiki:
> 
> http://www.pymolwiki.org/index.php/Visualizing_a_computed_structure_-_a_commented_example
> 
> and the attached script. What am I doing wrong?
> 
> Thanks already, nick

Your commands are:

load example.xyz
hide all
show sticks
select sel_01, ID 38 ID 39 ID 42 ID 43 ID 44 ID 45
select rest, all and not sel_01
disable rest

set stick_transparency, 0.8, rest
set stick_transparency, 0.0, sel_01

I think you'll find that the transparency settings only work with whole
objects and not with selections that are subsets of objects.

Cheers,
Rob
-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor 
Botterell Hall Rm 644
Department of Biochemistry, Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821Fax: 613-533-2497
http://pldserver1.biochem.queensu.ca/~rlc

--
What Every C/C++ and Fortran developer Should Know!
Read this article and learn how Intel has extended the reach of its 
next-generation tools to help Windows* and Linux* C/C++ and Fortran 
developers boost performance applications - including clusters. 
http://p.sf.net/sfu/intel-dev2devmay
___
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] slab mode fine-tuning

2011-03-29 Thread Robert Campbell
Hi,

On Tue, 29 Mar 2011 6:12 AM Nadine Utz [mailto:nad...@mmb.pcb.ub.es]
wrote:

> > Dear pymol users,
> > 
> > I am looking for a way to "zoom in" a molecule, like the slab mode when
> > you are rolling the scroll wheel. The reason why rolling the scroll
> > wheel does not work in my case is that the resulting change is too
> > coarse grained, i.e. either I cannot see all the atoms I want to or
> > there are some atoms in front of the part I am interested in. I tried
> > as
> > well "clip slab, x", but then not just atoms in front of the
> > interesting
> > part are not shown but as well behind it.
> > 
> > So, what I need is a cross-sectional view of my system, in which only
> > everything in front of the cut is not shown (but everything behind).
> > 
> > Thank's a lot for any help,
> > 
On Tue, 29 Mar 2011 07:56:09 -0400 "Schubert, Carsten [PRDUS]"
 wrote:

> Nadine,
> 
> Probably the command line is your best friend here. Look into the 'clip
> near,x' and 'clip far,x' command, which allows to move the front and
> back clipping planes in x increments. Positive values move towards you,
> negative values of x away from you.
> If that does not provide enough fine grained control you may want to
> think about making a composite picture to 'fake' clipping planes per
> object.

You can also control the front and rear clipping planes independently by
holding down the "Shift" key along with the right mouse button (assuming you
are in the standard 3-button viewing mode).  Moving the mouse vertically
changes the front clipping plane and moving it horizontally changes the rear
clipping plane.

Cheers,
Rob



-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor 
Botterell Hall Rm 644
Department of Biochemistry, Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821Fax: 613-533-2497
http://pldserver1.biochem.queensu.ca/~rlc

--
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software 
be a part of the solution? Download the Intel(R) Manageability Checker 
today! http://p.sf.net/sfu/intel-dev2devmar
___
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] Selecting ASP and GLU

2011-03-01 Thread Robert Campbell
Hi Martin,

On Tue, 01 Mar 2011 13:44:36 +0100 Martin Hediger  wrote:

> Dear all
> What is the selection syntax to select all GLU and ASP residues within 
> an object?
> 
> I'm trying it the way its written on the wiki:
> 
> remove resn hoh# remove water
> h_add  # add hydrogens
> 
> as surface
> color grey90
> 
> color slate, resn lys   # lysines in light blue
> color paleyellow, resn cys  # cysteines in light yellow
> *color tv_red, (resn asp or(resn glu))  # aspartic and glutamic acid in light 
> red*

The easier way to write that is:

 color tv_red, resn asp+glu

You can string several sorts of selections together that way, for example:

select actsite, resi 105+262+286

select aliphatic, resn ala+val+leu+ile

Cheers,
Rob

-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor 
Botterell Hall Rm 644
Department of Biochemistry, Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821Fax: 613-533-2497
http://pldserver1.biochem.queensu.ca/~rlc

--
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
___
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] set sphere_scale question

2011-01-26 Thread Robert Campbell
On Wed, 26 Jan 2011 10:13:25 -0500 Bradley Hintze
 wrote:

> Hi all,
> 
> I have a question regarding the changing of sphere size in a PyMOL API. When
> I use the command as presented on the PyMOLwiki, namely:
> 
> cmd.set ("sphere_scale", size=1, selection='', state=0, updates=1, log=0,
> quiet=1)
> 
> I get an error saying
> 
> set() got an unexpected keyword argument 'size'
> 
> I get the error wether 'size' is a string or an integer. What am I missing?

"size" is the wrong option,  You want "value".  Typing "help set" at the
PyMOL command prompt shows the following:

   cmd.set(string name, string value, string selection, int state,
   int updates, int quiet)

So you need to change your command to:

cmd.set ("sphere_scale", value=1, selection='', state=0, updates=1, log=0,
quiet=1)

Cheers,
Rob

-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor 
Botterell Hall Rm 644
Department of Biochemistry, Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821Fax: 613-533-2497
http://pldserver1.biochem.queensu.ca/~rlc

--
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
___
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] Loading multiple ligands into a single view

2011-01-21 Thread Robert Campbell
On Fri, 21 Jan 2011 10:10:02 -0500 Robert Campbell
 wrote:

> Hello Tom,
> 
> On Fri, 21 Jan 2011 15:28:26 +1100 Tom Dupree  wrote:
> 
> > Hello all,
> > 
> > I have a *.sdf (it can be a *.mol2 if that makes it easier) that contains
> > multiple ligands. I'd like to open this one file and see them all at once.
> > It currently loads each ligand into its own state. Is there a way to
> > over-ride this behaviour?
> 
> You don't need to over-ride the loading behaviour.  You can simply set the
> "all_states" variable to 1 (or "on"):
> 
> set all_states, 1
> 
> (or use the "Settings -> Edit all" menu item).

I could have added that you can set this variable specifically for one (or
more) objects.  Say you have a set of structures that you want to see all at
once (we'll call it "multi"), but you have another object with multiple
states, but you only want to see those one at a time and step through them
(we'll call it "single"), then you can set the above variable to 1 for just
the one object:

set all_states, 1, multi
set all_states, 0, single

Cheers,
Rob
-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor 
Botterell Hall Rm 644
Department of Biochemistry, Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821Fax: 613-533-2497
http://pldserver1.biochem.queensu.ca/~rlc

--
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
___
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] Loading multiple ligands into a single view

2011-01-21 Thread Robert Campbell
Hello Tom,

On Fri, 21 Jan 2011 15:28:26 +1100 Tom Dupree  wrote:

> Hello all,
> 
> I have a *.sdf (it can be a *.mol2 if that makes it easier) that contains
> multiple ligands. I'd like to open this one file and see them all at once.
> It currently loads each ligand into its own state. Is there a way to
> over-ride this behaviour?

You don't need to over-ride the loading behaviour.  You can simply set the
"all_states" variable to 1 (or "on"):

set all_states, 1

(or use the "Settings -> Edit all" menu item).

Cheers,
Rob

-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor 
Botterell Hall Rm 644
Department of Biochemistry, Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821Fax: 613-533-2497
http://pldserver1.biochem.queensu.ca/~rlc

--
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net


Re: [PyMOL] Rendering issues with education version 1.3

2011-01-18 Thread Robert Campbell
Hi Paul,

On Mon, 17 Jan 2011 19:00:09 -0800 Paul Rigor  wrote:

> Hi gang,
> Just wondering if anyone has experienced some weird rendering issues, ie,
> aberrant bonds between atoms. I've attached a sample pdbqt file which
> contains 4 molecules which are outputs of autodock vina. Can someone try
> loading and visualizing it?
> 
> I'm currently using the educational version 1.3. I've tried on linux and mac
> os x.  The nvideo cards include both ATI and NVidia.

It isn't really a rendering issue, but a bonding issue (or an atom-ordering
issue -- the structures in this multi-model file do not have the same atoms
in the same order). You need to load the structures in this multi-model file
with the discrete flag turned on. This will force PyMOL to construct a
bonding-table for each model separately.

load top4fix.pdbqt, discrete=1

Cheers,
Rob
-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor 
Botterell Hall Rm 644
Department of Biochemistry, Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821Fax: 613-533-2497
http://pldserver1.biochem.queensu.ca/~rlc

--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
___
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] "Model" pdb section support

2011-01-10 Thread Robert Campbell
Hello Sergey,

On Mon, 10 Jan 2011 16:38:52 +0100 Sergey Ivanov 
wrote:

> Have pdb file with pseudobeads:
> MODEL 2
> HETATM1   O24.000  46.000  39.000
> HETATM2   O24.000  47.000  39.000

etc.

I displayed this file using Nathan's suggestion to set all_states to 1.  That
appeared to work just fine.  But then I noticed that your second model is
simply a box.  If that is what you always have in the second model, you could
replace that with a "CRYST1" line used to represent the unit cell of a
crystal structure.  Hence, your file could look like this:

CRYST1   50.0050.000   50.000  90.00  90.00  90.00 P 1
HETATM1   O24.000  46.000  39.000
HETATM2   O24.000  47.000  39.000
HETATM3   O24.000  47.000  38.000
HETATM4   O25.000  47.000  38.000
HETATM5   O25.000  47.000  39.000
HETATM6   O25.000  46.000  39.000
HETATM7   O25.000  45.000  39.000
HETATM8   O25.000  45.000  40.000
HETATM9   O26.000  45.000  40.000
HETATM   10   O26.000  45.000  39.000
HETATM   11   O26.000  45.000  38.000
HETATM   12   O25.000  45.000  38.000
HETATM   13   N11.000  43.000   8.000
HETATM   14   C12.000  43.000   8.000
HETATM   15   C13.000  43.000   8.000
HETATM   16   C13.000  44.000   8.000
HETATM   17   N 0.000   5.000  29.000
HETATM   18   C49.000   5.000  29.000
HETATM   19   C48.000   5.000  29.000
HETATM   20   C47.000   5.000  29.000
HETATM   21   N23.000  30.000  17.000
HETATM   22   C22.000  30.000  17.000
HETATM   23   C21.000  30.000  17.000
HETATM   24   C20.000  30.000  17.000
END

Then you can turn on the display of the box by showing the "cell"
representation for the object (under the "S" menu or by typing "show cell").

Cheers,
Rob
-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor 
Botterell Hall Rm 644
Department of Biochemistry, Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821Fax: 613-533-2497
http://pldserver1.biochem.queensu.ca/~rlc

--
Gaining the trust of online customers is vital for the success of any company
that requires sensitive data to be transmitted over the Web.   Learn how to 
best implement a security strategy that keeps consumers' information secure 
and instills the confidence they need to proceed with transactions.
http://p.sf.net/sfu/oracle-sfdevnl 
___
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] Pseudoatom for Benzene Centre

2010-12-10 Thread Robert Campbell
Hello Imtiaz,

On Fri, 10 Dec 2010 08:41:14 + imtiaz  wrote:

> I want to create a Pseudoatom in the center of a benzene ring for a ligand.
> 
> I can easily create a Pseudoatom in the center of aromatic ring of
> amino acids in a protein by following the instructions give at
> 
> http://www.pymolwiki.org/index.php/Pseudoatom
> 
> i.e
> load $TUT/1hpv.pdb
> pseudoatom pi_cent,b/53/cg+cz
> 
> 
> However I am not sure how I can do similar thing for the lignad. The
> lignad I have is an indole derivative and I want to create a
> pseudoatom in the center of the 6 member ring of the indole.

If you simple select to of the atoms on opposite sides of the ring (i.e. so
they are called "pk1" and "pk2", then you can do something like this:

pseudoatom indole_centre, pk1|pk2

Cheers,
Rob

-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor 
Botterell Hall Rm 644
Department of Biochemistry, Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821Fax: 613-533-2497
http://pldserver1.biochem.queensu.ca/~rlc

--
___
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] small molecule geometry gets whacked in creating multi-state object

2010-11-17 Thread Robert Campbell
Hi Seth and Jason,

I just tried out Jason's commands and while that works for this case I can't
verify that it fails in Seth's case.  While checking the command line options
for create, I did notice that, like the load command, the create command also
has a discrete flag.  It is not described in the help (i.e. when typing "help
create"), but it is listed in the PYMOL API syntax and it is clearly listed
when you type: "create ?".

So I would suggest that you should try your usual script but add a
"discrete=1" flag to it.

Cheers,
Rob


 On Tue, 16 Nov 2010 21:46:17 -0500 Jason Vertrees
 wrote:

> Hi Seth,
> 
> When using the "create" command, you need to specify target and source
> states.  Here's an example.  Let's assume 1oky and 1t46 are the same
> protein (they're really close, so good for this example).  They both
> have ligands, 1t46 has STI and 1oky has STU.  I can (1) load each
> structure. using fetch:
> 
> # fetch the proteins from the PDB, or local file system
> fetch 1t46 1oky, async=0
> 
> # align the two proteins (you may not need this step for your application)
> align 1t46, 1oky
> 
> and then (2) extract their small molecules, into a new multi-state
> object, called 'ligands" using the 'create' command:
> 
> # create the object called 'ligands' and put 'resn STI' from state 1
> into state 1
> create ligands, 1t46 and resn STI, 1, 1
> 
> # create the object called 'ligands,' which in PyMOL re-creating an
> object that already exists
> # will add another state, and put 'resn STU' from state 1 into state 2
> create ligands, 1oky and resn STU, 1, 2
> 
> Hide the first two objects and then use the arrow keys to switch from
> state 1 to state 2.
> 
> Cheers,
> 
> -- Jason
> 
> 
> 
> On Tue, Nov 16, 2010 at 12:51 PM, Seth Harris  wrote:
> > Hi Jason,
> > The end result I am trying to get is a single multi-state object that has
> > a different small molecule stored in each state, so that you can use the
> > cursor keys and flip through the various ligands (i.e. states) all aligned
> > at a given binding site. So what Robert described generates such an
> > object, but does so at the point of loading the ligand from an external
> > file. I was just trying to see if there was a way to get there from
> > objects already loaded in pymol. For instance, I'd have a protein:small
> > molecule structure loaded and aligned, and I want to bring just the
> > aligned small molecule into one of the states of the multi-state object.
> > When I use the create command all kinds of extra bonds were being drawn
> > within a given ligand, along with atom colors changing unpredictably. I
> > assumed that different small molecules have matching atom names across
> > the various states and likely that was causing the trouble. But when
> > "load"ed with the discrete flag it avoids this. Essentially, I was
> > imagining something like the 'create' command along with the discrete
> > flag. I was searching for some pdb's to share and further explore this
> > with. I think it would happen with most any small molecule structure from
> > the PDB. Anyway, the workaround seemed to be that once I had loaded the
> > protein:small molecule, aligned it, I could save out the aligned small
> > molecule only in a temp file, and load it back in to the multi state
> > object with the discrete=1 and carry on through all the objects I wanted
> > and at the end delete the temp file. The part I thought was a bit clunky
> > was having to save the file back out to the file system in order to bring
> > it back in with the load command just to be able to get access to the
> > 'discrete' flag. That's where I thought I might be missing something if I
> > explained the case further. Thanks,
> > Seth

-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor 
Botterell Hall Rm 644
Department of Biochemistry, Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821Fax: 613-533-2497
http://pldserver1.biochem.queensu.ca/~rlc

--
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
___
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] small molecule geometry gets whacked in creating multi-state object. rebuild?

2010-11-10 Thread Robert Campbell
Hi Seth,

On Tue, 09 Nov 2010 22:54:59 -0500 Jason Vertrees
 wrote:

> Hi Seth,
> 
> I haven't seen that (in this scenario).  Can you send me a few PDB examples?
> 
> Cheers,
> 
> -- Jason
> 
> On Mon, Nov 8, 2010 at 10:13 PM, Seth Harris  wrote:
> > Hi all,
> > I feel I should know this one. I have a program looping through structures
> > and bringing each small molecule into a single multi-state object so I can
> > tab through the states.
> > I do:
> > create all_lig, this_ligand, 1, 1
> > then go on to the next one:
> > create all_lig, next_ligand, 1, 2
> > and so on
> > however, the bonds get all messed up, presumably with atom names
> > confused? I tried issuing a "rebuild all_lig" in between adding but that
> > didn't seem to help. What am I missing?

It sounds like you are loading a set of *different* structures into the
multi-state object.  I don't think you can do this properly with the
"create" command.  I think the only way to do this and retain the correct
bonding information is to use the load command directly with the "discrete=1"
option.

So, you need to do:

load this_ligand, all_lig, discrete=1
load next_ligand, all_lig, discrete=1

Cheers,
Rob

-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor 
Botterell Hall Rm 644
Department of Biochemistry, Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821Fax: 613-533-2497
http://pldserver1.biochem.queensu.ca/~rlc

--
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a 
Billion" shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
___
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] Access viewport size

2010-09-23 Thread Robert Campbell
Hi,

On Wed, 22 Sep 2010 23:29:14 -0400 Jason Vertrees
 wrote:

> Hi Mark,
> 
> We used to be able to call this to get the viewport size.  But,
> somewhere along the line Warren removed this.  I'll see if I can add
> it back in, or find out why he removed it.

As mentioned in this email:

http://www.mail-archive.com/pymol-users@lists.sourceforge.net/msg05888.html

this works for me:

width,height = cmd.get_session()['main'][0:2]

I note that a more recent e-mail:
http://www.mail-archive.com/pymol-users@lists.sourceforge.net/msg07563.html

suggests that it doesn't work.  In the latter case, printing
cmd.get_session().keys() showed the absence of the 'main' key.  I couldn't
say why it was absent then and present now (I build PyMOL for Linux from the
SVN sources).

Cheers,
Rob


-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor 
Botterell Hall Rm 644
Department of Biochemistry, Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821Fax: 613-533-2497
http://pldserver1.biochem.queensu.ca/~rlc

--
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
___
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] coloring labels

2010-08-31 Thread Robert Campbell
Hi Craig,

On Tue, 31 Aug 2010 09:29:44 -0500 Craig Smith  wrote:

> Hello,
> 
> Thanks for the prompt responses I received so far.  That really helped.
> But, set_color black changes the color globally.  Can I do this locally?
> For example, I'm highlighting two polypeptide chains one blue and one
> yellow.  The yellow labels are hard to see and I want to change them to
> black but the keep the blue chain labels blue.

Yes you can to this locally (at least by object). Simply add the object name
to the command. Say you have two objects called "object1" and "object2" and
you want to label all of the C-alpha carbons with the residue name and
number, you could do:

label name ca, "%s %s" % (resn,resi)

set label_color, black, object1
set label_color, blue, object2

Cheers,
Rob
-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor 
Botterell Hall Rm 644
Department of Biochemistry, Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821Fax: 613-533-2497
http://pldserver1.biochem.queensu.ca/~rlc

--
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
___
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] list of hydrogen bonds

2010-08-12 Thread Robert Campbell
Hi Martin,

On Wed, 11 Aug 2010 12:02:32 +0200 Martin Hediger  wrote:

> I was thinking about this as well, I saw an older post on this topic
> http://www.mail-archive.com/pymol-users@lists.sourceforge.net/msg06211.html
> but it seems that the script mentioned there starts to see 'hydrogen 
> bonds' between non-polar hydrogens and atoms up to 15 angstrom away.
> Can someone confirm on this?

I am the author of that script and I can confirm that there is a problem. :(
The script in that message has the cutoff distance and angle hardwired in at
3.7A and 55 degrees, respectively, and in theory it also selects only H-bonds
between "N" and "O" atoms, but there was a mistake in the code that used the
atom "ID" property rather than the "index" property.  Surprisingly (to me)
that makes a difference.

I have two newer scripts that from my testing work properly.  One will list
any H-bonds between two selections (list_hbonds.py) and the other is designed
to only list (and draw) all main-chain H-bonds (list_mc_hbonds.py). Both
scripts allow you to override the default cutoff values. You can get them from
my website:

http://pldserver1.biochem.queensu.ca/~rlc/work/pymol/

I have removed the old script from there as well.

Sorry about that!

Cheers,
Rob
-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor 
Botterell Hall Rm 644
Department of Biochemistry, Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821Fax: 613-533-2497
http://pldserver1.biochem.queensu.ca/~rlc

--
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 
___
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 Connectivity Data

2010-08-05 Thread Robert Campbell
Dear Martin,

On Thu, 05 Aug 2010 10:44:45 +0200 Martin Hediger  wrote:

> I am confused about the requirement of providing connectivity data in a 
> pdb file to properly render a protein with PyMol.
> Right now, I am displaying a pdb file not containing any connectivity 
> data but still the protein seems perfectly valid.
> 
> My question is: how does PyMol know how to properly display structures 
> when no connectivity is provided (i understand this usually is at the 
> end of the file in the 'CONECT...' section. Can it determine 
> connectivity from the atom-labels, like the residue and the 
> atom-descriptor (e.g ATOM   5   CB  VAL A 1 ...)?
> Related to this: I'm not a specialist in protein dynamics, but i 
> understand, every reasonable force field (AMBER, CHARMM, ...) will 
> require me to provide connectivity, correct? The point is, i see the 
> protein displayed correctly in PyMol, but there is no connectivity in 
> the PDB file. Does this mean the force field computation will also work?

PyMOL simply draws bonds where atoms are "close enough" (defined by the sum of
their vdw radii) or where there are explicit CONECT records.  CONECT records
are only needed where bond lengths are longer than expected.

Molecular dynamics programs require explicit topology (bond lengths, angles,
dihedral angles, chirality), because they are doing much more than simply
making pretty pictures.  So no, a force field computation will not work
simply because PyMOL can draw the bonds you expect to see.

Cheers,
Rob
-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor 
Botterell Hall Rm 644
Department of Biochemistry, Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821Fax: 613-533-2497
http://pldserver1.biochem.queensu.ca/~rlc

--
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
___
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] need more info

2010-07-13 Thread Robert Campbell
Hi Vivek,

On Tue, 13 Jul 2010 13:18:07 -0400 Vivek Ranjan  wrote:

> Thank you once again. I have been trying to change the color of the cell.
> 
>   cell = []
>   cell.append(CYLINDER)
>   cell = cell + vert_000 + vert_100 + [radius] + [0,0,0] + [1,0,0]
>   cell.append(CYLINDER)
>   cell = cell + vert_000 + vert_010 + [radius] + [0,0,0] + [0,1,0]
>   cell.append(CYLINDER)
> 
> if I put cell.append(CYLINDER, [COLOR, 0, 0, 1]), pymol complains
> "TypeError: append() takes exactly one argument". If I add a line
> "cell.extend([COLOR, 0.0, 0.0, 1.0])" after the above
> cell.append(CYLINDER), nothing displays. There is also very little
> description of cgo on
> "http://pymol.sourceforge.net/newman/user/S0500cgo.html";
> 
> How to change the color of the cell ? What is append(), and extend() ?
> Is there a document that describes complete functionalities of CGO ?
> Basically, I would like learn how CGO, python, and openGL are
> connected within pymol.

The reference that you point to above notes that the CYLINDER primitive takes
the arguments:

CYLINDER, x1, y1, z1, x2, y2, z2, radius,
  red1, green1, blue1, red2, green2, blue2,

If you want to change the color of the cell, then you should change the
two triplets of values within the square brackets after the radius.  The line
in my script

  cell = cell + vert_000 + vert_100 + [radius] + [0,0,0] + [1,0,0]

draws a cylinder coloured from black to red, while

  cell = cell + vert_001 + vert_011 + [radius] + [0,0,1] + [0,1,1]

draws a cylinder coloured from blue to cyan.

As Jason answered, .append() and .extend() are python functions that apply to
lists.  .append adds one element to a list, while .extend adds each of the
elements from its argument, which is itself an iterable object. 


And I can't speak for others here, but since I read the e-mail list, there is
no need to CC: any e-mails for the list to my own address.

Cheers,
Rob
-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor 
Botterell Hall Rm 644
Department of Biochemistry, Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821Fax: 613-533-2497
http://pldserver1.biochem.queensu.ca/~rlc

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
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] need more info

2010-07-13 Thread Robert Campbell
Hello Vivek,

On Tue, 13 Jul 2010 11:21:03 -0400 Vivek Ranjan  wrote:

> Hello,
> 
> First, thanks a lot for your help. Pymol with cctbx works now for me.
> I changed the script "pymol" and replaced "/usr/binpython" to "python"
> and thats it. Few more questions:
> 
> (i) draw_cell.py uses lavv.pdb as an example. Where can I find this
> pdb file ? Basically, I am making my own pdb file for a crystal
> system, the file lavv.pdb can help me figure out how to put crystal
> information in my own pdb file.

That would be "1avv" not "lavv".  All PDB structure codes begin with a number.
You could use "fetch 1avv" to get it, but I guess you know that.

> (ii) I used "draw_cell_param" command to put crystal information at
> command prompt. Then I wanted to change radius, etc. How to undo what
> has already be drawn so that I can re-sketch ? Or killing the pymol,
> starting it again, and loading everything again is the only option ?
> Similarly, is there a way to turn off labels ?

The only way to "undo" what you have done is to delete the objects created by
draw_cell_param (or similarly with draw_cell) and rerun the draw_cell_param
function.  You'll find the delete function under the "A" menu next to the
object name or simply type "delete cell*" to delete all objects whose name
begins with "cell". 

As far as the labels go, you'll note that two objects are created by the
draw_cell function.  One object is the cell border and the second is the
labels. Simply click on the name of the labels and they will turn off. This
is true of any object.

> (iii) For the same reason as stated above, I would like to know how to
> get the file for 2x19 ? When I issue the command "fetch 2x19" it draws
> a structure. Where is the pdb file for it and how to get it to my
> computer ?

The fetch command should leave the 2x19.pdb file in the directory from which
you started PyMOL.

Cheers,
Rob
-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor 
Botterell Hall Rm 644
Department of Biochemistry, Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821Fax: 613-533-2497
http://pldserver1.biochem.queensu.ca/~rlc

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
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] python

2010-07-12 Thread Robert Campbell
On Mon, 12 Jul 2010 10:37:07 -0400 Vivek Ranjan  wrote:

> Hello,
> 
> How can I find out what version of python my current installation of
> pymol is using ?

One way is simply to type "python" in a terminal window and you should see
something like:

Python 2.6.5+ (release26-maint, Jul  1 2010, 00:47:18) 
[GCC 4.4.4] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 

Or type "python -V" to see just the version. So I'm running version 2.6.5.

Cheers,
Rob
-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor 
Botterell Hall Rm 644
Department of Biochemistry, Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821Fax: 613-533-2497
http://pldserver1.biochem.queensu.ca/~rlc

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
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] No module Error in running pymol

2010-07-12 Thread Robert Campbell
Hi Rituraj,

On Mon, 12 Jul 2010 17:43:02 +0530 rituraj purohit 
wrote:

> Dear friends
> 
> I am having Ubuntu 10.04 and want to use pymol.
> There is no error in installation but it is giving following error
> during running pymol
> 
> "r...@ritu-laptop:~$ pymol
> Traceback (most recent call last):
>   File "", line 1, in 
> ImportError: No module named pymol
> /usr/local/bin/python2.6: No module named pymol"

You seem to be running a python from the /usr/local/bin directory which is
probably not what you want.  The ubuntu 10.04 python is also python version
2.6, so you have no need to install another version in /usr/local/bin. Did you
install PyMOL from the Ubuntu software repository (as opposed to getting from
the PyMOL web site?  It should work fine with the python in /usr/bin.

Cheers,
Rob
-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor 
Botterell Hall Rm 644
Department of Biochemistry, Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821Fax: 613-533-2497
http://pldserver1.biochem.queensu.ca/~rlc

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
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] cctbx

2010-07-09 Thread Robert Campbell
On Fri, 09 Jul 2010 16:11:47 -0400 Vivek Ranjan  wrote:

> Hello,
> 
> I downloaded a pymol script from
> http://pldserver1.biochem.queensu.ca/~rlc/work/pymol/ called
> draw_cell.py. I have "Python 2.6.5", numpy version: 1.3.0, I
> downloaded cctbx for unix (self extracting files) and installed cctbx
> in my $HOME/bin/. I have also included the line (.
> "/home/vranjan/bin/cctbx_build/setpaths.sh") in my .bashrc then ran
> the command from another window cctbx.version and found cctbx version
> to be 2010_03_29_2334
> 
> When I type "run draw_celll.py" in pymol window I get the following error:
> ***
> PyMOL>ls draw_cell.py
>   draw_cell.py
> PyMOL>run draw_cell.py
> Traceback (most recent call last):
>   File "/usr/local/lib/python2.6/dist-packages/pymol/parser.py", line
> 334, in parse
> parsing.run_file(path,self.pymol_names,self.pymol_names)
>   File "/usr/local/lib/python2.6/dist-packages/pymol/parsing.py", line
> 455, in run_file
> execfile(file,global_ns,local_ns)
>   File "draw_cell.py", line 3, in 
> from cctbx import uctbx, sgtbx
> ImportError: No module named cctbx
>  PyMOL: normal program termination.
> **

You have to make sure that pymol is using the same python as cctbx.  I have
instructions on my website:
http://pldserver1.biochem.queensu.ca/~rlc/work/pymol/cctbx

If you need more help than that, let me know.

Cheers,
Rob
-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor 
Botterell Hall Rm 644
Department of Biochemistry, Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821Fax: 613-533-2497
http://pldserver1.biochem.queensu.ca/~rlc

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
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 run a python script

2010-07-09 Thread Robert Campbell
On Fri, 09 Jul 2010 13:46:57 -0400 Vivek Ranjan  wrote:

> Hello,
> 
> I am trying to run a simple python script from Pymol and cannot run it:



> I saved the above in a file named "axes.py" and put it in the same
> directory from where I type "pymol" (on ubuntu linux). Then I type
> "run axes.py" in pymol command bar. I get the following error message:
> 
> *
> Traceback (most recent call last):
>   File "/usr/local/lib/python2.6/dist-packages/pymol/parser.py", line
> 334, in parse
> parsing.run_file(path,self.pymol_names,self.pymol_names)
>   File "/usr/local/lib/python2.6/dist-packages/pymol/parsing.py", line
> 455, in run_file
> execfile(file,global_ns,local_ns)
> IOError: [Errno 2] No such file or directory: 'axes.py'
> ***
> 
> Any help ?

Try typing the command "pwd" within PyMOL to see if it reports that you are
in the directory that you think you are.  Also try typing "ls axes.py" to see
if it can see it. Are you sure you haven't made a typo in the name of the
file? Otherwise I don't see why what you have done shouldn't work.

Cheers,
Rob
-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor 
Botterell Hall Rm 644
Department of Biochemistry, Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821Fax: 613-533-2497
http://pldserver1.biochem.queensu.ca/~rlc

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
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] Ray Trace Triangles

2010-07-09 Thread Robert Campbell
Hi Sean,

On Fri, 09 Jul 2010 11:05:09 -0400 Sean Law  wrote:

> I have been tackling this problem (on and off) for quite some time now but
> without any luck.  I have been trying to create CGO triangles using the
> following simple sample script:
> 
> 
> ###
> 
> from pymol.cgo import *
> from math import *
> from pymol import cmd
> 
> def triangle ():
> name="test";
> obj=[ BEGIN, TRIANGLES ]
> obj.extend([COLOR,1.0,0.0,0.0,VERTEX,0.0,0.0,0.0])
> obj.extend([COLOR,1.0,0.0,0.0,VERTEX,2.0,0.0,0.0])
> obj.extend([COLOR,1.0,0.0,0.0,VERTEX,0.0,2.0,0.0])
> obj.extend([END])
> cmd.delete("test")
> cmd.load_cgo(obj,"test")
> 
> return
> cmd.extend("triangle",triangle)
> 
> ###
> 
> 
> This creates a nice red triangle for me in the viewing window.  However,
> when I move it around and then ray trace the image, I end up getting either
> a triangle with the original bright red color, a black triangle, or a dark
> red triangle.  What I'm looking for is to be able to get the same bright
> red triangle no matter how I manipulate the object.  I've tried playing
> around with the "NORMAL" value but, if I recall correctly, ray tracing
> produced a blank image.
> 
> Any help or suggestion would be greatly appreciated.  Thanks!

I can't find any way to have a CGO object that is not "lit" in the normal
sense especially when ray traced.  When you leave out the NORMAL vector, then
your triangle is fully lit no matter it's orientation, until you ray trace it.

If you do include a normal vector then its brightness will vary with
orientation both in normal viewing and when ray traced.  You can at least
avoid the problem of having one side completely black when ray traced by
turning on two-sided lighting (in the "Display" menu).

I guess this doesn't really answer your question, though!

Cheers,
Rob
-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor 
Botterell Hall Rm 644
Department of Biochemistry, Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821Fax: 613-533-2497
http://pldserver1.biochem.queensu.ca/~rlc

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
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] crankshaft flip

2010-06-28 Thread Robert Campbell
Dear Jakob,

On Mon, 28 Jun 2010 15:32:59 +0200 Jakob Nielsen 
wrote:

> I would like to modify a protein pdb file with a "crankshaft" flip, which
> is the anti-correlated double change: psi(i-1) += delta and phi(i) -= delta.
> Such a change should leave the protein coordinates unchanged effecting only
> atoms in residues i-1 and i. However implementation in pymol (see below)
> changes the coordinates of _all_ residues from i-1 to the C-terminal. Can
> you help me? Can I somehow do the two changes simultanious?...
> 
> set_dihedral 21/n, 21/ca, 21/c, 22/n,  148.435 #was 168.4
> set_dihedral 21/c, 22/n, 22/ca, 22/c, -83.704  #was -103.7

I don't see how this change can leave the other coordinates unchanged.  Even
if the psi(i-1) and phi(i) bonds are exactly parallel (meaning that the
angles CA-C-N and C-N-CA are exactly the same, which they are not
necessarily), rotation of the psi(i-1) bond will move the N(i) and
CA(i) atoms, so therefore while a rotation in the opposite direction of the
phi(i) bond will tend to keep the rest of the change travelling in the
direction it was before those two counter-rotations, the backbone itself will
be shifted.  One textbook I consulted lists the angles at the C(i-1) and N(i)
atoms as 116 and 122, respectively, so the psi(i-1) and phi(i) bonds are not
even theoretically going to be parallel.  In practice, with "real"
structures, they certainly are not usually going to be parallel.

Cheers,
Rob

-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor 
Botterell Hall Rm 644
Department of Biochemistry, Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821Fax: 613-533-2497
http://pldserver1.biochem.queensu.ca/~rlc

--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
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] msms_pymol.py

2010-05-18 Thread Robert Campbell
Hi Sujuan,

On Tue, 18 May 2010 15:58:59 +0800 sujuan wang  wrote:

> thank you for you reply and modification of the script. now Ican calculate
> the surface area. but when I calculate the surface of part protein, it seem
> that the surface area including the surface adjacent with other residues,
> means the sum of two fragments is much larger than whole protein surface, is
> there any method to calculate the surface only exposure to solvent?

I'm not sure I understand your problem.  Are you trying to calculate an
interface surface, such as between two proteins or between two chains of one
protein?  Normally the msms program will only calculate the surface that is
exposed to solvent.  The script reports two values for area, the solvent
excluded surface (otherwise known as the molecular surface -- similar to what
is displayed by PyMOL when you show the surface) and the solvent accessible
surface.  The latter is the surface traced out by the centre of a water-sized
probe as it rolls over the van der Waals surface of the protein.  It is
therefore larger than the solvent excluded surface.

Perhaps you could send me at least the output from the calc_msms_area command
to show me what you mean.

Cheers,
Rob
-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor 
Botterell Hall Rm 644
Department of Biochemistry, Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821Fax: 613-533-2497
http://pldserver1.biochem.queensu.ca/~rlc

--

___
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] Helices as cylinder and ribbon - both in a single representation

2010-05-14 Thread Robert Campbell
Hello Abhi,

On Fri, 14 May 2010 12:19:34 +0200 Abhinav Verma 
wrote:

>  I wish to show one chain in cylindrical helices, while the other one in
> ribbon representation. How can I achieve this with pymol.

If the two chains are in one object, then you need to split them into two
objects.  So if I'm working with the PDB file 1dvi, something like:

create cha, 1dvi & chain a
create chb, 1dvi & chain b

Then I can type:

set cartoon_cylindrical_helices, 1, chb

To make the chain B object have cylindrical helices, while chain A will
remain with the ribbon-style.

Cheers,
Rob
-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor 
Botterell Hall Rm 644
Department of Biochemistry, Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821Fax: 613-533-2497
http://pldserver1.biochem.queensu.ca/~rlc

--

___
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 draw the line in images

2010-05-12 Thread Robert Campbell
Hi Peter,

On Wed, 12 May 2010 10:42:36 -0400 Jason Vertrees
 wrote:

> Peter,
> 
> If you knew the positions of the end points of the lines you could
> make CGO lines, or you could just use a distance measure between two
> pseudoatoms and modify some label/dash settings:

As Jason says, if you have some end-points you can make CGO lines (or
cylinders).  I have a script to do that called draw_links.py on my
website.  If you have two atoms to define the end-points you can just pick
them (so that they are called pk1 and pk2) and then run the command

draw_links

It has options to control the colour and diameter of the cylinder, and you
can name the atoms rather than picking them.  E.g.

draw_links prot1 & c. a & i. 105 & n. n, prot2 & c. b & i. 311 &
n. od1, radius=.2, color=blue

The color can also be specified as a tuple of numbers between 0 and 1 for the
r,g,b components and a second colour can be added if you want the colour of
the cylinder to fade from one end to the other.

draw_cylinder color=(.5,.2,.5), color2=pink, object_name=faded_links

(where pk1 and pk2 are the endpoints and faded_links will be the name of
the object created).

You can also use this to draw a bunch of CGO cylinders between pairs of
atoms.  E.g. you want to show the domain motion after aligning parts of two
structures:

draw_links 1kfu & c. l & i. 105+262+286+288, 1kxr & c. a &  i. 
115+272+296+298,color1=red,color2=blue

If more than one atom is specified in each selection, then it will draw a
cylinder between each of the 4 pairs of C-alpha atoms specified in the two
selections.  In this case the colour of the cylinder fades from red to blue,
but if you do not specify color2 then it will be a single colour.

Cheers,
Rob
-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor 
Botterell Hall Rm 644
Department of Biochemistry, Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821Fax: 613-533-2497
http://pldserver1.biochem.queensu.ca/~rlc

--

___
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] msms_pymol.py

2010-05-12 Thread Robert Campbell
Hi Hongbo,

On Wed, 12 May 2010 15:59:36 +0200 Hongbo Zhu
 wrote:

> You can solve it by adding the following line in the msms_pymol.py you 
> downloaded from Robert's page to line 133, right before msms_cmd is defined.
> 
>  if msms_path.startswith('C:/'): msms_path = '\"%s\"' % (msms_path,)
> 
> Basically, your problem was caused by the whitespace in the path to the 
> MSMS executable file in Windows systems. By adding quotes to the full 
> path solves the problem.

Thanks for that fix. In fact this problem could exist on other systems if
someone happens to use spaces in their directory names, so I've added escaped
quotes to the msms_path in all cases (not just if it starts with 'C:/'.  Also
if one used the debug=1 flag, it will print out the MSMS command used to help
identify problems. The new version is on my website.  

Cheers,
Rob

-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor 
Botterell Hall Rm 644
Department of Biochemistry, Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821Fax: 613-533-2497
http://pldserver1.biochem.queensu.ca/~rlc

--

___
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] msms_pymol.py

2010-05-11 Thread Robert Campbell
Hi Sujuan,

On Tue, 11 May 2010 14:38:52 +0800 sujuan wang  wrote:

> Hi All,
> When i run the script download from
> http://pldserver1.biochem.queensu.ca/~rlc/work/pymol/, I issue the commond:
> calc_msms_area 2mlt-melittin, there are always something wrong as follows:

In addition to my previous answer about the missing atmtypenumbers file, I
should add that there was an error of logic in my script.  It should have
told you that it was missing the atmtypenumbers file.  I've fixed that and
updated the version on my web site.

Cheers,
Rob
-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor 
Botterell Hall Rm 644
Department of Biochemistry, Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821Fax: 613-533-2497
http://pldserver1.biochem.queensu.ca/~rlc

--

___
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] msms_pymol.py

2010-05-11 Thread Robert Campbell
Hi Sujuan,

Given that this is my script, I'll answer. :)
On Tue, 11 May 2010 14:38:52 +0800 sujuan wang  wrote:

> Hi All,
> When i run the script download from
> http://pldserver1.biochem.queensu.ca/~rlc/work/pymol/, I issue the commond:
> calc_msms_area 2mlt-melittin, there are always something wrong as follows:
> 
> CmdLoad: "D:/singapore-NTU/HU/modelling/2MLT-melittin.pdb" loaded as
> "2MLT-melittin".
> PyMOL>run C:/Program Files/DeLano Scientific/PyMOL/msms_pymol.py
> PyMOL>calc_msms_area 2MLT-melittin
> Traceback (most recent call last):
>   File "C:\Program Files\DeLano Scientific\PyMOL/modules\pymol\parser.py",
> line 250, in parse
> self.result=apply(layer.kw[0],layer.args,layer.kw_args)
>   File "C:/Program Files/DeLano Scientific/PyMOL/msms_pymol.py", line 281,
> in calc_msms_area
> volume,area_dict,tmp_msms_vert_file,tmp_msms_face_file =
> calc_msms(object_name,probe,density,keep,debug)
>   File "C:/Program Files/DeLano Scientific/PyMOL/msms_pymol.py", line 131,
> in calc_msms
> convert_pdb_to_xyzrn(tmp_pdb_file,tmp_xyzrn_file,atmnumbers_file)
>   File "C:/Program Files/DeLano Scientific/PyMOL/msms_pymol.py", line 21, in
> convert_pdb_to_xyzrn
> lines = open(numfile).readlines()
> IOError: [Errno 2] No such file or directory: ''
> 
> who can give me an example of this command? or something needed to change
> the option of script?

It appears that the program is unable to find the file containing the atom
type numbers.  This should be a file called "atmtypenumbers" that comes with
the msms program -- they are all in the one .zip file. My script attempts to
find this file wherever your msms.exe program is installed. 

If you need further assistance, let me know.

Cheers,
Rob
-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor 
Botterell Hall Rm 644
Department of Biochemistry, Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821Fax: 613-533-2497
http://pldserver1.biochem.queensu.ca/~rlc

--

___
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 Plugin Architecture

2010-04-22 Thread Robert Campbell
Hi Maia,

Just to add to what Jason said:

On Thu, 22 Apr 2010 17:16:41 -0400, Jason Vertrees
 wrote:

> > 2. Which plugin allows me to move one structure relative to another. (I
> > want to do manual docking of one structure into another).
> 
> You don't need a plugin to move objects.  Just use SHIFT-middle-mouse
> button drag, while in editing mode.  If you're starting from one
> object (eg. protein and ligand come from one file) then split them up:

In case it isn't obvious to you, you can switch between "viewing" mode and
"editing" mode simply by left clicking in the bottom-right region of the main
PyMOL window where the mouse button functions are described.

Cheers,
Rob

-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor 
Botterell Hall Rm 644
Department of Biochemistry, Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821Fax: 613-533-2497
http://pldserver1.biochem.queensu.ca/~rlc

--
___
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] please help-how to generate dimer file from monomer file in pymol

2010-04-06 Thread Robert Campbell
Hello Jenna,

On Tue, 06 Apr 2010 00:36:38 -0400 JiangJiang Liu  wrote:

>  When I open the  pdb file 1B8E (a homodimer protein) through
> pymol I can only see a monomer shown in the screen. Now I know the
> biological dimer is produced through crystallographic symmetry operations
> in pymol. To generate the dimer, I think I need to convert these remark
> comands (list below) to be a readable commands by the pymol program. Does
> anyone know how to do this conversion? Or what's the commands for crystal
> symmetry operation? Thank you very much! Sincerely Jenna Liu
> 
> PS: 
> REMARK 350 BIOMOLECULE:
> 1 REMARK 350 AUTHOR DETERMINED BIOLOGICAL UNIT:
> DIMERIC REMARK 350 APPLY THE FOLLOWING TO CHAINS:
> A REMARK 350   BIOMT1   1  1.00  0.00  0.00
> 0.0 REMARK 350   BIOMT2   1  0.00  1.00  0.00
> 0.0 REMARK 350   BIOMT3   1  0.00  0.00  1.00
> 0.0 REMARK 350   BIOMT1   2 -1.00  0.00  0.00
> 0.0 REMARK 350   BIOMT2   2  0.00  1.00  0.00
> 0.0 REMARK 350   BIOMT3   2  0.00  0.00 -1.00
> 33.43000 

Since the file has the crystallographic information in it, you simply have to
tell PyMOL to build the symmetry-related neighbours.  You do this with the
symexp command:

symexp , , , 

So if you have an object called 1b8e, you might do:

symexp s_, 1b8e, 1b8e, 3

This will create new objects whose name begins with s_ and is followed by a
label that identifies the symmetry operation.  You can then turn them on and
off until you find the one that is the mate of the original object.  Given
the BIOMT matrix above, this will be the object that is related by a 2-fold
rotation around the crystallographic b-axis (which in this case is parallel
to the Y-axis) followed by a translation of 1/2 of the c-axis.  This is the
object called "s_03-1" in this case.

Or as Jason has just written, fetch the biological unit directly and then
split out the states.

Cheers,
Rob
-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor 
Botterell Hall Rm 644
Department of Biochemistry, Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821Fax: 613-533-2497
http://pldserver1.biochem.queensu.ca/~rlc

--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
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] coordinates

2010-03-22 Thread Robert Campbell
Hi Jed,

On Mon, 22 Mar 2010 10:23:34 -0400 Jed Goldstone  wrote:

> Of course, you could just use the .pdb file as a text file:
> 
> grep CA .pdb | cut -f 2,4,7,8,9
> 
> will get you the amino acid number, the amino acid identity, and x,y,z 
> coordinates for the CA.

Often this will work, but unfortunately it is not fool proof.  If there is
no chain ID, if the residue numbers are greater than 999 or if there are
alternate position characters present on the atom names, then your field
counts in your "cut" command will be off. The PDB file is very strict about
which character columns contain which information and there is no requirement
for spaces between those data columns.

Cheers,
Rob
-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor 
Botterell Hall Rm 644
Department of Biochemistry, Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821Fax: 613-533-2497
http://pldserver1.biochem.queensu.ca/~rlc

--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
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] frustrating rms command

2010-03-16 Thread Robert Campbell
Hi,

On Tue, 16 Mar 2010 09:23:50 -0400 David Hall  wrote:

> See http://www.pymolwiki.org/index.php/Intra_Rms#USER_EXAMPLES.2FCOMMENTS
> comments that start with "Fit, Rms, Rms_Cur are finicky and only
> work..." as that likely explains your problem and a possible solution.
> 
> But I agree that pymol's behavior with this command can be extremely
> annoying.

I should have added to my previous e-mail that I wrote a script to take care
of this problem.  It will calculate the RMS for a pair of selections by
converting one to match the other (residue names, numbers, atom names etc. --
obviously only matching the backbone atoms).  It creates a new object in
order to do this.  The script is called fitting.py and can be found at my
pymol scripts site:

  http://pldserver1.biochem.queensu.ca/~rlc/work/pymol

and a description of the problems of fitting and an example of the use of
the fitting.py script can be found here:

   
http://pldserver1.biochem.queensu.ca/~rlc/work/teaching/BCHM823/pymol/alignment/

Cheers,
Rob
-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor 
Botterell Hall Rm 644
Department of Biochemistry, Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821Fax: 613-533-2497
http://pldserver1.biochem.queensu.ca/~rlc

--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
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] frustrating rms command

2010-03-16 Thread Robert Campbell
Hello Alan,

On Tue, 16 Mar 2010 11:33:41 + Alan  wrote:

> Hello there,
> 
> I am very frustrated with a very simple command, let me show:
> 
> PyMOL>rms (out and not hydrogen), (018.none_neutral.pdb_NEW and not
> hydrogen)
> ExecutiveRMS-Error: No atoms selected.
> PyMOL>sele r, (018.none_neutral.pdb_NEW and not hydrogen)
>  Selector: selection "r" defined with 20 atoms.
> PyMOL>select o, (out and not hydrogen)
>  Selector: selection "o" defined with 20 atoms.
> PyMOL>rms o, r
> ExecutiveRMS-Error: No atoms selected.
> 
> As you can see, I can select properly but no way of using 'rms' command.
> 
> Or "help rms" is missing something?

Yes, the help for rms is missing something. What is missing is the
description in the help for rms (as well as for rms_cur and fit) that the two
selections that rms is comparing must contain the same atom descriptions
(chain ID, residue name, residue number, atom name and segment ID). Are your
molecules "out" and "018.none_neutral.pdb_NEW" identical?

Cheers,
Rob
-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor 
Botterell Hall Rm 644
Department of Biochemistry, Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821Fax: 613-533-2497
http://pldserver1.biochem.queensu.ca/~rlc

--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
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] B-factor replacing problem

2010-03-09 Thread Robert Campbell
Hi Thomas,

On Tue, 09 Mar 2010 10:29:17 +0100 Thomas Holder
 wrote:

> Hi Simon and Robert,
> 
> > It sounds like the file as it is read by the script is completely on one
> > line. I wonder if this is the old UNIX vs MSDOS line ending problem.
> 
> yes, sounds like a linefeed problem. But actually python has universal
> newline support. I made some changes to the script (quite a lot
> changes, sorry ;-)) and now can read any of mac/unix/dos text files
> using MacPyMol.

I wasn't convinced that the linefeed was the problem, but it was the only
thing I could think of and was prompted from a recent teaching experience in
which a group of students using Windows were having some problems with
scripts that they wrote in Wordpad or Notepad. 

Thanks for sending along your version of this script. I've learned something
from it!  I didn't know about the dictionary .setdefault function -- that
looks very useful, although a little harder (at least for me) to comprehend
for the dictionary of dictionaries in this script.  It certainly makes the
code look cleaner.

Cheers,
Rob

-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor 
Botterell Hall Rm 644
Department of Biochemistry, Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821Fax: 613-533-2497
http://pldserver1.biochem.queensu.ca/~rlc

--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
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] B-factor replacing problem

2010-03-08 Thread Robert Campbell
Hi Simon,

On Mon, 08 Mar 2010 18:09:31 +0100 Simon Lindhoud 
wrote:

> Dear all,
> 
> Unfortunately I'm not really familiar with programming in Python (yet) but
> I've encountered a problem with MacPyMol in running the script that can be
> found here: 
> http://cavanagh-lab.bch.ncsu.edu/bobay/intranet/pymol/data2bfactor.py

That is a slightly older version of my script, although I don't believe that
is the problem.

> I've tried a couple of things to get the script running, and in the end I
> managed to narrow the problem down to the fact that the file that contains
> the data for the new b-factors is not imported correctly. I have made a text
> file, containing four columns that I've copied from excel; the Chain, the
> residue number, the residue name, and the b-factor. These columns are
> separated by tabs. In the script this code is used to determine the number
> of columns in my file:
> 
> words = line.split()
> 
> # check number of columns of data
>   if len(words) == 4:
> etc
> 
> Apparently, this is where it goes wrong because if I print the words
> variable. I get the total number 'words' in my input file instead of the
> number of columns...
> Does anybody know the solution to this problem?

It sounds like the file as it is read by the script is completely on one
line. I wonder if this is the old UNIX vs MSDOS line ending problem.  Did the
data file happen to come from a Windows computer?

Cheers,
Rob

-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor 
Botterell Hall Rm 644
Department of Biochemistry, Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821Fax: 613-533-2497
http://pldserver1.biochem.queensu.ca/~rlc

--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
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] Whitespacing?

2010-01-26 Thread Robert Campbell
Hi,

On Tue, 26 Jan 2010 10:48:58 -0600 Michael Zimmermann 
wrote:

> If you have a lot of files to do this to, I would suggest learning at
> least a little bit of perl.  It might not be as nice an option as a
> python tab manager (depending on your point of view), though.

Or even better, try sed (the following is in a bash-type shell)!

for file in *.py; sed 's/   /  /g' < $file >${file}.notab

In order to type the "tab" key in the command line, type the key combination
"CTRL-V" followed by the Tab key.

I use vim as my editor and I have it set to always use spaces and not tabs
using the "expandtab" setting, so when I hit the "Tab" key, it just inserts
two spaces for me.

Cheers,
Rob
-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor 
Botterell Hall Rm 644
Department of Biochemistry, Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821Fax: 613-533-2497
http://pldserver1.biochem.queensu.ca/~rlc

--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
___
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] difficulties with pymol’s fuse command .

2009-12-08 Thread Robert Campbell
Hi,

I posted an answer on the blog, but I'll copy it here.  Someone can correct
me if I'm wrong!

On Tue, 08 Dec 2009 10:02:59 -0600 Michael Zimmermann 
wrote:

> I have no experience with fuse, but my guess would be Mariana might
> want to just use 'bond' and translate one termini as needed.  If she
> doesn't want to "manually" translate, there is always energy
> minimization to correct bond lengths.
> Take Care.

> On Tue, Dec 8, 2009 at 12:59 AM, Nir London 
> wrote:
> > Hi PyMOL list,
> >
> > Can anyone help Mariana with her question ?
> > http://rosettadesigngroup.com/blog/10/pymol-scripts/#comment-9695

Given that Marianna describes the sequence display as if the 2 original
sequences have been interjected into one another, then I think the problem is
that the two original objects have the same chain IDs and their residue
numbers overlap. Perhaps if they had different chain IDs or if the second
molecule is renumbered to have residue numbers that start after the first
molecule it would work correctly.  PyMOL can get confused when there are
multiple residues with the same chain ID and residue number.

Cheers,
Rob
-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor 
Botterell Hall Rm 644
Department of Biochemistry, Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821Fax: 613-533-2497
http://pldserver1.biochem.queensu.ca/~rlc

--
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
___
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] Show hydrogen bonds in current object only

2009-11-29 Thread Robert Campbell
Hi Jason,

On Sun, 29 Nov 2009 12:29:08 -0500, Jason Vertrees 
wrote:

> You can automate the task.  Load your 100 proteins.  Use a wildcard
> from the command line or a script like loadDir
> (http://pymolwiki.org/index.php/LoadDir).  Align them.  Then, run:
> 
> python
> for n in cmd.get_names("objects"):
>   selName = "s" + n
>   cmd.select(selName, n)
>   cmd.distance("dist"+n, selName, selName + " and (organic and " + n + ")", 
> 3.2, mode=2)
> python end

I'm just curious, but why do you go to the trouble to create a selection that
is just the whole object? Especially if Chimed has 100s of objects, he
doesn't need to add a named selection for each. Why not do the following?

python
for n in cmd.get_names("objects"):
  cmd.distance("dist"+n,n,n + " and organic",3.2, mode=2)
python end

The latter worked for me.  If you wanted to eliminate waters from
the selection for the protein, you could change it to:

python
for n in cmd.get_names("objects"):
  cmd.distance("dist"+n,n + " and not solvent",n + " and organic",3.2,mode=2) 
python end

Or to make it more readable:

python
for n in cmd.get_names("objects"):
  protein_sele = n + " and not solvent"
  organic_sele = n + " and organic"
  cmd.distance("dist"+n, protein_sele, organic_sele, 3.2, mode=2)
python end

Cheers,
Rob
-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor 
Botterell Hall Rm 644
Department of Biochemistry, Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821Fax: 613-533-2497
http://pldserver1.biochem.queensu.ca/~rlc

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
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] Spectrum

2009-11-09 Thread Robert Campbell
Hi Sean,

On Mon, 09 Nov 2009 10:58:53 -0500 Sean Law  wrote:

> 
> Robert,
> 
> I would have to agree with you.  I've used many of your scripts and have
> also learned a lot from them and think that the color B script is pretty
> robust and helpful.

Thanks.
 
> I could be wrong but I remember the original poster commenting about using
> the "min & max" settings from the spectrum command and I wonder if that is
> used to control the min/max of B-factor values to color (so that any values
> outside of the range of min and max will be colored the extreme min/max
> color values).  Of course, I'm sure it's just as easy to add a couple of
> lines of extra code into your script to account for that (if it isn't
> already there).

The color_b.py script has options called "minimum" and "maximum" just
like the spectrum command.  These are used to select the range of
B-values to colour. So (using PDB code 1dvi as an example) if your actual
B-values are between 2 and 55.98 and you set the minimum to 10 and
maximum to 50, then use 8 bins (just to get nice numbers here!), by typing:

color_b minimum=10, maximum=50, nbins=8

You'll see the following output from the color_b.py script:

Minimum and Maximum B-values:  2.0 55.975422
Color select:  n. ca and (b <   15 or b =   15)
Color select:  n. ca and b >   15
Color select:  n. ca and b >   20
Color select:  n. ca and b >   25
Color select:  n. ca and b >   30
Color select:  n. ca and b >   35
Color select:  n. ca and b >   40
Color select:  n. ca and b >   45

So yes, anything within the lowest range and below will be in colour 1 and
anything within the highest range and above will be in colour 8.

Cheers,
Rob
-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor 
Botterell Hall Rm 644
Department of Biochemistry, Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821Fax: 613-533-2497
http://pldserver1.biochem.queensu.ca/~rlc

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
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] spectrum

2009-11-09 Thread Robert Campbell
Hi Mark and Sean,

On Sat, 07 Nov 2009 10:05:59 -0500 Sean Law  wrote:

> Sorry for the earlier confusion.  I think I found a hackish way of getting
> a gray spectrum:



I know I'm biased, since I wrote the color_b.py script, but I fail to see what
is difficult about typing:

color_b  "selectionname", gradient=user, user_rgb=[.2,.2,.2,.5,.5,.5,.8,.8,.8]

In order to colour "selectionname" in a gray spectrum that goes from 20%
gray, has a midpoint of 50% gray and ends at 80% gray (where 20% gray is the
same as the colour called gray20, i.e. close to black and 80% gray is almost
white). 


Cheers,
Rob
-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor 
Botterell Hall Rm 644
Department of Biochemistry, Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821Fax: 613-533-2497
http://pldserver1.biochem.queensu.ca/~rlc

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
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] Alignment Objects

2009-09-11 Thread Robert Campbell
Hi David
On Thu, 10 Sep 2009 14:47:43 -0700 (PDT) David Hall 
wrote:

> Is there any documentation on getting information out of alignment objects
> into scripts?  I tried looking around the wiki, but I didn't see anything.
> 
> I'm just wondering things like if I have a residue in one object, finding
> the residue in another object that has been aligned.  

If you create an alignment object when you do the alignment:

  align proteinA, proteinB, object=A_on_B

then you can save a clustal formatted alignment file by typing:

  save A_aligned_with_B.aln, A_on_B

(same applies if you use the "super" command instead of "align").

Cheers,
Rob
-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor 
Botterell Hall Rm 644
Department of Biochemistry, Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821Fax: 613-533-2497
http://pldserver1.biochem.queensu.ca/~rlc

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
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] Measure surface area

2009-08-10 Thread Robert Campbell
Hi Mirek,

On Mon, 10 Aug 2009 11:21:39 -0700 Warren DeLano  wrote:

> PyMOL isn't the optimal tool for measuring surface area -- perhaps
> others on the list can suggest good alternatives.  

I like MSMS for this.  I have a script that will calculate the area (both
solvent exposed and solvent accessible) for a particular selection.

See my msms_pymol.py script at:

http://pldserver1.biochem.queensu.ca/~rlc/work/pymol

After loading the script with the "run" command, you can type "help
calc_msms_area" to get more information on the options.

Cheers,
Rob
-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor 
Botterell Hall Rm 644
Department of Biochemistry, Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821Fax: 613-533-2497
http://pldserver1.biochem.queensu.ca/~rlc

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
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 build from source

2009-07-07 Thread Robert Campbell
Dear Joseph,

On Tue, 07 Jul 2009 11:00:10 +0200, Andre Joseph 
wrote:

> Dear Delano Scientific support
> 
> I've been fetching source code from the sourceforge repositories yesterday.
> I've no error or warning during "./configure", "make" or "make install"
> steps.
> However, when I launch pymol, I've the following error:
> 
> Traceback (most recent call last):
> >   File "/home/joseph/software/pymol/modules/launch_pymol.py", line 32, in
> > 
> > import pymol
> >   File "/home/joseph/software/pymol/modules/pymol/__init__.py", line 472,
> > in 
> > import _cmd
> > ImportError: /home/joseph/software/pymol/modules/pymol/_cmd.so: undefined
> > symbol: molfile_vaspparchgplugin_init
> 
> 
> I've found in the archive that it might come from a problem in "setup.py"
> file but I couldn't figure out what was missing (http://tinyurl.com/ndpafb).
> I've been building PyMOL from source for a year or so and never faced up any
> problem. Could it come from the sources or is a problem of dependancies?

I think the recommended way of building PyMOL is with these commands (see
the "INSTALL" file):

python setup.py build
python setup.py install
python setup2.py install

Since I install it in a non-standard location (an NFS file server accessible
from many workstations of both i686 and x86_64 versions of Linux), I add a
prefix to the install command:

  python setup.py install --prefix=/software/Linux

or

  python setup.py install --prefix=/software/Linux_x86_64


Then I keep a saved and modified copy of the pymol script created by the
"python setup2.py install" command and copy that back over the newly created
"pymol" script instead (because I have a few customizations in it).

Cheers,
Rob
-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor 
Botterell Hall Rm 644
Department of Biochemistry, Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821Fax: 613-533-2497
http://pldserver1.biochem.queensu.ca/~rlc

--
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have 
the opportunity to enter the BlackBerry Developer Challenge. See full prize 
details at: http://p.sf.net/sfu/blackberry
___
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] surface for oligosaccharide chains

2009-07-03 Thread Robert Campbell
On Fri, 03 Jul 2009 16:18:10 +0200, Raluca Mihaela ANDREI 
wrote:

> Hi!
> Can somebody tell me why I can't create surfaces for the 
> oligosaccharide chains?

By default, the surface and mesh commands ignore all atoms in HETATM records
in a PDB file.  You can change that with:

  set surface_mode, 1
  set mesh_mode, 1

That means, though, that *all* hetatm atoms will have a surface drawn.  If you
want to draw a surface for your oligosaccharide chains alone, then you can
copy them to a separate object and set the surface_mode flag just for that
object:

  set surface_mode, 0
  create saccharide, object &
(fill in your residue selection for )

  set surface_mode, 1, saccharide


Hope that helps,
Rob

-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor 
Botterell Hall Rm 644
Department of Biochemistry, Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821Fax: 613-533-2497
http://pldserver1.biochem.queensu.ca/~rlc

--
___
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] POVRAY Usage

2009-05-15 Thread Robert Campbell
Hi Tom

On Fri, 15 May 2009 14:57:36 -0700, Thomas Stout  wrote:

> What version of PyMOL does this work with?  I've been trying your commands
> with versions 1.1 and 1.2b and while PyMOL reports that the primitives have
> been processed, nothing is written to the file "protein.pov" other than the
> header info:
> 
>  camera {orthographic location <0.0 , 0.0 , 134.1048736572>
>  look_at  <0.0 , 0.0 , -1.0> right -74.9812240601*x up 59.9849815369*y}
>  #default { finish{phong   -1.000 ambient0.500 diffuse0.450
> phong_size 13 .75}}
>  light_source{<4000.0001,4000.0001,9865.8951>  rgb<1.0,1.0,1.0>}
>  plane{z , -206.0869 
>   pigment{color rgb<1.,1.,1.>}
>   finish{phong 0 specular 0 diffuse 0 ambient 1.0}}
>  #include "povray.inc"
> 
> and povray.inc contains:
>  cmd.get_povray()[1]
> 
> If I save a povray file with the GUI menu selection: File> Save Image As>
> POV-Ray then I get everything written to disk.  This occurs on both linux
> and Windows.
> 
> Am I missing something that would be more obvious if I had had more coffee
> today?
> 
> Thanks!
> -Tom
> 
> PS - There was a missing quotation mark:
> open("povray.inc","w").write("cmd.get_povray()[1]) -->
> open("povray.inc","w").write("cmd.get_povray()[1]")

I think this is the real key!  There was an extra quote.  Try:

open("povray.inc","w").write(cmd.get_povray()[1])

Cheers,
Rob

-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor 
Botterell Hall Rm 644
Department of Biochemistry, Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821Fax: 613-533-2497
http://pldserver1.biochem.queensu.ca/~rlc

--
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
https://lists.sourceforge.net/lists/listinfo/pymol-users


Re: [PyMOL] problem in showing the electron density map

2009-04-03 Thread Robert Campbell
Hi Peter,

On Fri, 03 Apr 2009 02:38:03 +0530, peter hudson
 wrote:

> Hello all
> 
> I am trying to upload the ED map on pymol. but, it is not visible on the
> screen. Although i checked at pymol wiki and i did as it is given on the
> wiki.
> For example.
> 
> I took ccp4 format map and coverted it into xplor format with
> mapman.(beacuse i tried with ccp4 format map with test_file.map as well as
> test_file.ccp4 maps, but pymol showed this kind of error. I begin like this-

Warren answered the later problem regarding the "site" selection or object.
You should be able to load a ccp4 map either directly as a .ccp4 file, or to
force it to load as a ccp4 format with:

load test_file.ccp4, map, format=ccp4

Does PyMOL complain that it doesn't know the format with an error like:

  PyMOL>load test_ccp4.map
  Error: .map is ambiguous.  Please add format or use another extension:
  Error: For example, "load fofc.map, format=ccp4" or "load 2fofc.xplor".

or was the error that you couldn't display the map on the molecule (as in the
error that Warren commented on about using "site" as a selection when site
has not been defined?

Also be aware that PyMOL needs to have a map that is calculated to cover the
molecule that you are showing since it does not automatically extend the map
using symmetry.

Cheers,
Rob

-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor 
Botterell Hall Rm 644
Department of Biochemistry, Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821Fax: 613-533-2497
http://pldserver1.biochem.queensu.ca/~rlc



Re: [PyMOL] fitting problem

2009-03-02 Thread Robert Campbell
Hi Sébastien,

On Mon, 02 Mar 2009 18:21:15 +0100, sconill...@chimie.u-strasbg.fr wrote:

> Hi all (for the second time today ...),
> 
> I have a problem using the "fit" function. When I try to do this :
> 
> > fit (fittest1 and resn P and !h.), (2VT4 and resn P and !h.)
> 
> I have this message error :
> 
> "ExecutiveRMS-Error: No atoms selected."
> 
> which seems very strange to me because doing something like :
> 
> > select d1, (fittest1 and resn P and !h.)
> or
> > select d2, (2VT4 and resn P and !h.)
> returns
> "Selector: selection "d1" (or "d2") defined with 21 atoms."
> 
> Any idea ?

Do (fittest1 and resn P and !h) and (2VT4 and resn P and !h.) have the same
list of atoms with the same residue number, chain and atom names?  If not,
then you will get that sort of message.

Cheers,
Rob
-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor 
Botterell Hall Rm 644
Department of Biochemistry, Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821Fax: 613-533-2497
http://pldserver1.biochem.queensu.ca/~rlc



Re: [PyMOL] trouble with symexp command

2009-02-04 Thread Robert Campbell
Hi Dave,

On Tue, 03 Feb 2009 16:33:28 -0500, David Garboczi
 wrote:

> I am examining packing in several space groups by issuing the command
> 
> symexp foo, foo.pdb, sele, 10
> 
> If I select the whole reference molecule, I think that I should get 
> all the symmates within 10 A displayed.  But for one of the crystals 
> that I am dealing with,
> CRYST1   29.24   44.19  107.67  90.0  90.0  90.0 P 21 21 218
> 
> only four molecules are generated, the molecules are on top of one 
> another, and also are so far from each other that the packing can't 
> be real.  The cell has 22% solvent. In Coot, however, this same 
> molecule and the "Cell & Symmetry" command gives rise to symmates 
> that look right and don't clash with each other.
> 
> Help in figuring this out?  I am using MacPyMol 1.1r1 on a ppc 10.4.11

Since you say that you are examining packing in several space groups (and so
I'm guessing that maybe you have the same molecule in different space groups),
I'm led to ask if you happened to move the molecule foo by aligning it to
another molecule? This would cause the clash that you're seeing because PyMOL
would be applying the symmetry operators to foo in the wrong position.

Cheers,
Rob

-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor 
Botterell Hall Rm 644
Department of Biochemistry, Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821Fax: 613-533-2497
http://pldserver1.biochem.queensu.ca/~rlc



Re: [PyMOL] Showing conserved residues

2009-01-29 Thread Robert Campbell
Hi Abhinav,

On Thu, 29 Jan 2009 13:10:25 -0800, Abhinav Kumar
 wrote:

> Is there someway to select and show conserved residues when a bunch of 
> superimposed structures are loaded into Pymol?
> And if so, can identical and similar residues be selected separately?

I don't believe that there is a direct way to do it from the
superimposition, but I commonly apply "external data" to the B-factor
column of a PDB file for colouring purposes. For example, you could
calculate the degree of sequence conservation at each residue and colour
on that. I use the following scripts:

http://pldserver1.biochem.queensu.ca/~rlc/work/scripts/variability.py
http://pldserver1.biochem.queensu.ca/~rlc/work/scripts/seq_convert.py
http://pldserver1.biochem.queensu.ca/~rlc/work/pymol/data2bfactor.py

See the pages:

http://pldserver1.biochem.queensu.ca/~rlc/work/scripts/
  and
http://pldserver1.biochem.queensu.ca/~rlc/work/pymol

for more information.

When you align the structures, if you use the "object=" keyword (or do
it using the "align" menu) it will create an alignment object that you
can save as a Clustal format file. This file can then be used to calculate the
sequence variability. 

Cheers
Rob
-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor 
Botterell Hall Rm 644
Department of Biochemistry, Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821Fax: 613-533-2497
http://pldserver1.biochem.queensu.ca/~rlc



Re: [PyMOL] I want to represent a domain of my molecule as a low resolution solid shape

2008-09-11 Thread Robert Campbell
Dear Pietro,

On Thu, 11 Sep 2008 13:18:20 +0100, Pietro Roversi
 wrote:

> Dear everyone,
> I want to represent a domain of my molecule as a low
> resolution solid shape. 
> 
> I have chosen surface representation but the surface is clipped,
> exposing the inner part, which makes the domain appear hollow. The
> rendering of the inner surface appears greyish and different from the
> outer part. 
> 
> Can I make the clipped surface filled so that this greyish inner part is
> not there anymore? It should look solid inside.  
> 
> Alternatively, do you think I should switch to spheres representation?
> But I still would need to blur the spheres to achieve the low-resolution
> look of the domain. 

I am presuming that by "low resolution" you mean that you have increased the
solvent radius from the default of 1.4 to something larger, like 6
Angstroms.  I see that this can result in gaps in the surface.  I wouldn't
call it clipped, though.  If you draw a solvent accessible surface instead of
a molecular surface (by setting the variable surface_solvent to 1 instead of
0) then the gaps will disappear, but the surface will now be 6 Angstroms out
from the van der Waals surface.  It doesn't appear to have gaps now.

Alternatively, you can draw the surface using the MSMS program.  It does not
have the same artifacts as the built-in PyMOL surface generation routine for
large probe radii.

I have a script for running that from within PyMOL:

http://pldserver1.biochem.queensu.ca/~rlc/work/pymol/msms_pymol.py

Unfortunately I have not written any colouring schemes to the script other
than specifying a single solid colour for the whole surface (or two colours
if you specify a selection, e.g. if looking at an interface surface).

Hope this helps,
Rob
-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor 
Botterell Hall Rm 644
Department of Biochemistry, Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821Fax: 613-533-2497
http://pldserver1.biochem.queensu.ca/~rlc



Re: [PyMOL] coloring based on sequence identity

2008-08-25 Thread Robert Campbell
Dear Morri,

On Fri, 22 Aug 2008 13:35:32 -0700, Morri Feldman
 wrote:

> Dear Rob,
> 
> I'm interested in using your variability script with a substitution matrix.
> Would you please send me an example of a substitution matrix file?  Thanks
> for writing such a useful script.

Sure.  Attached are a couple of matrices.  One is a blosum80 matrix and
one is a hydrophobicity matrix.  I think I found them at:

http://www.techfak.uni-bielefeld.de/bcd/Curric/PrwAli/nodeD.html
http://www.techfak.uni-bielefeld.de/bcd/Curric/PrwAli/nodeE.html

You should be able to easily create your own following those examples.

Cheers,
Rob
-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor 
Botterell Hall Rm 644
Department of Biochemistry, Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821Fax: 613-533-2497
http://pldserver1.biochem.queensu.ca/~rlc


blosum80.mat
Description: Binary data


hydrophobicity.mat
Description: Binary data


Re: [PyMOL] How to view electron densities from the PDB

2008-06-27 Thread Robert Campbell
Hi,

On Fri, 27 Jun 2008 13:25:02 -0400, Michael Lerner 
wrote:

> This is probably a fairly basic question, but I'm stumped. I want to
> visualize electron densities along with my PDB file. So, say I'm interested
> in 2DJX. I go to the PDB and download 2DJX.pdb and 2djx-sf.cif. PyMOL
> doesn't seem to read the CIF file (?), so I downloaded and installed the
> PDB's tool sf-convert (http://sw-tools.pdb.org/apps/SF-CONVERT/index.html).
> I tried
> 
> sf-convert -i CIF -o Xplor -sf 2djx-sf.cif
> 
> but got some errors about the input format.
> 
> sf-convert -i mmCIF -o Xplor -sf 2djx-sf.cif
> 
> seemed to work (it produced a .Xplor file with what looks like data to me).
> However, PyMOL gives me errors when I try to load the resulting .xplor file.

The "sf" file that you have is not electron density but structure factors.
You need to calculate electron density from the data in that file and phases,
which you would have to calculate from the structure.  Fortunately someone
else is already doing that for you.  Try the Electron Density Server
(http://eds.bmc.uu.se/eds/).

Simply enter the PDB code and you'll find ... oh dear ... that 2djx is not
entered yet. :(

I see that it is a fairly new structure (released yesterday) and EDS is
updated weekly.  So either wait a week or so, or find a crystallographer to
run the coordinates and structure factors through a single refmac cycle to
calculate a map for you.

Cheers,
Rob
-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor 
Botterell Hall Rm 644
Department of Biochemistry, Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821Fax: 613-533-2497
http://pldserver1.biochem.queensu.ca/~rlc



Re: [PyMOL] Spheres for metal ions

2008-05-20 Thread Robert Campbell
Hi Gary,

On Tue, 20 May 2008 12:12:43 +0200, Gary Hunter
 wrote:

> I am displaying pdb files of metalloenzymes, and like to show the metal ions
> as spheres.
> I select the metal and use show>spheres
> Fine
> Somehow recently I must have done something to reset the vdw radius of
> manganese (MN in the pdb), as Mn atoms now display as small spheres (a
> little larger than solvent as nb_spheres).
> They were fine originally (!) and other metal atoms display at correct sizes
> (much bigger than my Mn).
> What could I have done?
> 
> A global edit of sphere_scale etc. simply changes all.
> I reset the setting>edit_all using the dialog as a check too.
> I can use:
> Alter name MN, vdw=vdw*2
> Rebuild
> 
> Or whatever, but I have to do it for each pdb file I read in now (if it has
> a Mn atom).
> Could I have messed with the vdw value in some way?
> 
> Is there a way to actually check the values being used for vdw radii?

You can get the vdw radii for any items (say you have a selection called
"metals") with:

  iterate metals, print chain, resn,resi,vdw

which will print the chain ID, residue name, residue number and van der Waals
radius for each.  Of course, this only applies to the vdw radius that is
assigned after you read in the PDB file.

Cheers,
Rob
-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor 
Botterell Hall Rm 644
Department of Biochemistry, Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821Fax: 613-533-2497
http://pldserver1.biochem.queensu.ca/~rlc



Re: [PyMOL] getting a list of main-chain hydrogen bonds

2008-05-05 Thread Robert Campbell
Hi Tomoko,

On Mon, 05 May 2008 18:26:17 +0900, Tomoko Niwa 
wrote:

> Thanks for kind advices.
> 
> Whatif and PISA worked excellently, but I want to get the list within Pymol.
> 
> 
> By parsing the pymol modules, I found
> 
> hb = cmd.find_pairs("((byres "+sss1+") and n;n)",
>   "((byres "+sss1+") and n;o)",mode=1,
>   cutoff=3.7,angle=55,
>   state1=state,state2=state)
> 
> in util.py. Is it possible to get a list of main-chain hydrogen bonds with
> this function?

Yes it is.  I thought this was a useful idea, so I've just scribbled together
a script to do just that and it is attached.

You can load it the usual way ("run print_hb_list.py") and then run it
with:

   print_hb 

Warning, if you have waters in your selection it will mess it up, so try:

  print_hb 1nzl &! resn hoh

I haven't fixed that part yet.  You may wish to alter the formatting of the
output, but I copied the example in your first e-mail:

 /GLY`56/N  /ASN`181/O  2.86
 /TYR`26/N  /VAL`182/O  2.92
 /ASN`54/N  /THR`183/O  2.95
 /ASN`52/N  /TRP`185/O  2.92
 
In my case the PDB file had no "chain" identifier.

Cheers,
Rob
-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor 
Botterell Hall Rm 644
Department of Biochemistry, Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821Fax: 613-533-2497
http://pldserver1.biochem.queensu.ca/~rlc
from pymol import cmd

def print_hb(selection):
  hb = cmd.find_pairs("((byres "+selection+") and n;n)","((byres "+selection+") and n;o)",mode=1,cutoff=3.7,angle=55)

  pair1_list = []
  pair2_list = []
  dist_list = []
  for pairs in hb:
cmd.iterate("%s and ID %s" % (pairs[0][0],pairs[0][1]), 'print "%s/%3s`%s/%s " % (chain,resn,resi,name),')
cmd.iterate("%s and ID %s" % (pairs[1][0],pairs[1][1]), 'print "%s/%3s`%s/%s " % (chain,resn,resi,name),')
print "%.2f" % cmd.dist("%s and ID %s" % (pairs[0][0],pairs[0][1]),"%s and ID %s" % (pairs[1][0],pairs[1][1]))

cmd.extend("print_hb",print_hb)


Re: [PyMOL] Fwd: Apply a transformation matrix to a selection

2008-03-04 Thread Robert Campbell
Hi Toni,

On Tue, 04 Mar 2008 13:01:58 +0100, Toni Pizà 
wrote:

> >  create a, resi
>  >
>  >  cmd.transform_selection("a", [[x,x,x,x],[x,x,x,x],[x,x,x,x],[x,x,x,x]],
>  >  homogenous=1)
> 
> 
> Thanks (is better late than never)!
> 
>  But I want to apply a set of selective transformations with a time
>  between them (using the time.sleep() function of python), making the
>  efect to the user that the molecule is animated. Therefore I can't use
>  the create function, because it centers and zoom the new object
>  created, and I doesn't want this.
> 
>  Anybody know how to apply a transform to a selection, without crating
>  a new object? Or create a new object without zooming them?

If you set the variable auto_zoom to 0, then PyMOL will not zoom to a new
object.  I set this in my .pymolrc file, because I prefer to always zoom when
I want.

Cheers,
Rob

-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor 
Botterell Hall Rm 644
Department of Biochemistry, Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821Fax: 613-533-2497
http://pldserver1.biochem.queensu.ca/~rlc



Re: [PyMOL] merging many frames to one

2008-02-12 Thread Robert Campbell
Hi again, Dimitry,

On Tue, 12 Feb 2008 09:10:23 -0500, Robert Campbell
 wrote:

> Hello Dimitry,
> 
> On Tue, 12 Feb 2008 16:43:28 +0300, DimitryASuplatov
>  wrote:
> 
> > Hello,
> > I have a .pdb1 file with biological unit. It consists of two frames
> > representing two chains (one per frame) together forming biologicaly
> > significant molecule. I could apply crystallographic symmetry, instead I
> > want to make use of file that I already have.  What is the command to
> > merge this two frames to a single one?
> 
> Type:
> 
> set all_states, 1
> 
> Or set that in the "Setting -> Edit All..." menu.

Sorry, this method only allows both chains to be viewed, but may not be
ideal for your purposes.  If you really wish an object that shows both
chains as part of one object in one state, then you need to do:

  split_states orig_object

which will create new objects with _0001 and _0002 appended to their names.
You can then merge those objects into a new object with:

  create new_object, orig_object_0001 or orig_object_0002

But before you do that, make sure the new orig_objects have different chain
IDs, or you'll have some problems.  If necessary then, you can do, for
example:

  alter orig_object_0002, chain='B'


Cheers,
Rob
-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor 
Botterell Hall Rm 644
Department of Biochemistry, Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821Fax: 613-533-2497
http://pldserver1.biochem.queensu.ca/~rlc



Re: [PyMOL] merging many frames to one

2008-02-12 Thread Robert Campbell
Hello Dimitry,

On Tue, 12 Feb 2008 16:43:28 +0300, DimitryASuplatov
 wrote:

> Hello,
> I have a .pdb1 file with biological unit. It consists of two frames
> representing two chains (one per frame) together forming biologicaly
> significant molecule. I could apply crystallographic symmetry, instead I
> want to make use of file that I already have.  What is the command to
> merge this two frames to a single one?

Type:

set all_states, 1

Or set that in the "Setting -> Edit All..." menu.

Cheers,
Rob
-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor 
Botterell Hall Rm 644
Department of Biochemistry, Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821Fax: 613-533-2497
http://pldserver1.biochem.queensu.ca/~rlc



Re: [PyMOL] MSMS Cavity Visualization in Pymol

2008-01-31 Thread Robert Campbell
A little oops!

On Wed, 30 Jan 2008 16:33:00 -0500, I wrote:

> Hi Buz,
> 
> On Wed, 30 Jan 2008 14:41:00 -0500, Buz Barstow  wrote:
> 
> > Does anyone know of a script that is capable of displaying the  
> > surfaces identified by msms in pymol?
> 
> I have a script called msms_cgo.py that you can download from:
> 
> http://pldserver1.biochem.queensu.ca/~rlc/work/pymol/
> 
> Download it and run it. You can get some usage information by doing:
> 
>   PyMOL>msms_cgo ?
>   Usage: msms_cgo file_name [, obj_name [, surfcolor ]]

Unfortunately I had forgotten to add it to the web page itself, although
the file was there.  This is now fixed.

Cheers,
Rob
-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor 
Botterell Hall Rm 644
Department of Biochemistry, Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821Fax: 613-533-2497
http://pldserver1.biochem.queensu.ca/~rlc



Re: [PyMOL] MSMS Cavity Visualization in Pymol

2008-01-30 Thread Robert Campbell
Hi Buz,

On Wed, 30 Jan 2008 14:41:00 -0500, Buz Barstow  wrote:

> Does anyone know of a script that is capable of displaying the  
> surfaces identified by msms in pymol?

I have a script called msms_cgo.py that you can download from:

http://pldserver1.biochem.queensu.ca/~rlc/work/pymol/

Download it and run it. You can get some usage information by doing:

  PyMOL>msms_cgo ?
  Usage: msms_cgo file_name [, obj_name [, surfcolor ]]

or

  PyMOL>help msms_cgo
  msms_cgo file_name, [obj_name ] , surfcolor
default surfcolor is white (1.,1.,1.) 
 
So only a file name is required (and you can omit the ".face" or
".vert").  You can just give it a file name (e.g. your surfaces are in
my_mol.vert and my_mol.face:

  msms_cgo my_mol

It will create an object called "my_mol_msms" and colour it white.  If you
want a different colour and object name, then do:

  msms_cgo my_mol, my_surf, surfcolor=(.5,.5,.5)

to make it gray.

Unfortunately it can only do one colour at the moment.  I haven't tried to
modify it to colour the surface according to the atom, although that
shouldn't be too hard to do.

Remember that if the cavities are enclosed, interior surfaces, then they
likely have inward pointing normals and the outside of the cavity will not
be lit unless you select "Two Sided Lighting" from the Display menu.

Cheers,
Rob

-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor 
Botterell Hall Rm 644
Department of Biochemistry, Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821Fax: 613-533-2497
http://pldserver1.biochem.queensu.ca/~rlc



Re: [PyMOL] Changing Bfactors

2008-01-14 Thread Robert Campbell
On Sat, 12 Jan 2008 20:21:37 +0530, rama krishna  wrote:

> Dear User,
> I need to color the Molecule based on generalized order parameter
> after running the script "data2bfactor"
> i used the command data2b_res 'mol','datafile'
> 
> after that it shows that
> IOError: [Errno 2] No such file or directory: "'datafile'"
> 
> i would like to know whether i need to specify path of input file or
> i need to place it in specified folder.
> 
> I prepared the input file like this
> 
> 1  MET  0.2
> .
> 
> so on
> 
> kindly suggest me where its going wrong

Perhaps the instructions on my web page were misleading.  Don't put quotes
around the name of the mol or datafile.  I.e. if you have a real object
named my_protein and a data file called interesting_info.dat, then the
command would be:

  data2b_res my_protein, interesting_info.dat

Cheers,
Rob
-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor 
Botterell Hall Rm 644
Department of Biochemistry, Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821Fax: 613-533-2497
http://pldserver1.biochem.queensu.ca/~rlc



Re: [PyMOL] Calculation of Domain Volume in Pymol

2008-01-07 Thread Robert Campbell
Dear Buz,

On Fri, 04 Jan 2008 15:43:41 -0500, Buz Barstow 
wrote:

> Dear all,
> 
> I'd like to very accurately calculate the volume of a selection in  
> pymol, or with tools that are callable by pymol? Could anyone suggest  
> a program or algorithm?

MSMS will calculate areas and volumes.  I have written a python script that
you can run from within PyMOL to call msms.  You can find it
(msms_pymol.py) at my scripts web page:

  http://pldserver1.biochem.queensu.ca/~rlc/work/pymol
 
It does not use the pdb_to_xyzrn script supplied with msms -- that
conversion is now built in to the python script.

After "running" the script to load it, then you can do:

  calc_msms_area object_name

with options for changing the selection for calculating the area, the probe
radius and density.  

Because I was most interested in the calculation of surface areas,
including buried surface areas, the initial MSMS calculation is only run on
the complete object.  That is what volume will be reported.  

For example, to calculate the surface area of chain A of a protein that is
buried by chain B, first create two objects:

  create protein_A, protein & chain A
  create protein_B, protein & chain B

Then run:

  calc_msms_area protein_A,protein_A within 4. of protein_B,probe=1.4

This will therefore report the volume of all of protein_A, but for the
surface areas, only the part of A that is buried by B.

Cheers,
Rob
-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor 
Botterell Hall Rm 644
Department of Biochemistry, Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821Fax: 613-533-2497
http://pldserver1.biochem.queensu.ca/~rlc



Re: [PyMOL] obtaining coordinates of solvent-surface points

2007-11-23 Thread Robert Campbell
On Thu, 22 Nov 2007 22:43:27 -0800 (PST), JJ  wrote:

> 
> >>
> From: Robert Campbell  -
> 2007-11-22 21:56
> 
> Rather than use PyMOL's surface, I've used the
> triangulated surface output
> by Michel Sanner's msms program. <<
> 
> Thanks much Rob.  Can you please tell me why it might
> be better to use msms to calculate surface points
> rather than the pymol algorithm.  Are there advantages
> to one or the other?

Simply that the msms program already could write out a file of the
vertices.  It was easier than trying to sift through the PyMOL code.

And later John wrote:
> I should have also asked in my original post, is there a way in pymol to
> determine the solvent-accessible surface  for a particular atom? Or more
> to the point, identify the atoms that shape the solvent-accessible
> surface and the percent of the surface attributed to each?

That's what I use my "msms_pymol.py" script for.  It creates a temporary
PDB file from an object, pipes that through a pdb_to_xyzrn awk script (I
modified the original msms version to include chain IDs) and feeds that to
msms to create a file containing areas for each atom.  The msms_pymol.py
script can include a selection, such that the total area for just that
selection is calculated (e.g. for looking at interfaces).  You can also
pre-calculate the area file with msms and feed that file to msms_pymol.py
with the "file_name" option. E.g.

After using:
PyMOL> run msms_pymol.py
to load the script into pymol,

type:
PyMOL> calc_msms_area object_name, file_name=object.area, selection=resi
PyMOL> 10-20

This will report the area for residues 10-20 from the pre-calculated file
"object.area"

Another example:
PyMOL> calc_msms_area enzyme, enzyme within 5 of inhibitor

will take the "enzyme" object, create a PDB file, feed that to msms and
then sum up the area only for the atoms of the "enzyme" object that are
within 5A of the atoms of the "inhibitor" object.

It is important in this case to have the enzyme and inhibitor as two
object, so that the surface at the interface between them is calculated
(true for both msms and PyMOL's own surface calculation).

Get this from:
http://pldserver1.biochem.queensu.ca/~rlc/work/pymol/msms_pymol.py
http://pldserver1.biochem.queensu.ca/~rlc/work/pymol/pdb_to_xyzrn

My surface complementarity/similarity scripts are now up at:

http://pldserver1.biochem.queensu.ca/~rlc/work/scripts/

They are in python because it is easy for me, but they would no doubt run
much faster if written in C.  If anybody wants to do that, I'd be happy to
hear about it!

Cheers,
Rob
-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor 
Botterell Hall Rm 644
Department of Biochemistry, Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821Fax: 613-533-2497
http://pldserver1.biochem.queensu.ca/~rlc



Re: [PyMOL] obtaining coordinates of solvent-surface points

2007-11-22 Thread Robert Campbell
Hello John,

On Thu, 22 Nov 2007 12:36:32 -0800 (PST), JJ 
wrote:

> Hello:
> Im new at pymol and would like to obtain the
> coordinates of the dots that make up the
> solvent-accessible surface.  I can obtain the vertices
> using cmd.get_povray()[1], but that will give me a
> list of coordinates of open cylinders with spheres at
> either end.  Perhaps these sphere and cylinders are so
> small that I could use any of them as the coordinates
> for the surface dot. Or, would it be more exact to use
> the midpoint of the cylinder?  Any suggestions?

Rather than use PyMOL's surface, I've used the triangulated surface output
by Michel Sanner's msms program.  I've written a few python scripts that
allow various manipulations.  Just today, in fact, I wrote a script to
calculate surface areas from within PyMOL.  I also have previously
written some python code that does a calculation similar to the CCP4
program "sc" (surface complementarity).  This allows me to colour the
surface of, for example, an inhibitor according to how complementarity
it is to an enzyme active site.  I hadn't added these to my PyMOL scripts
web page, but I will do so now.  Look for "msms_pymol.py" at

  http://pldserver1.biochem.queensu.ca/~rlc/work/pymol/

Of course, one needs to obtain msms, but that can be simply found at

  http://mgltools.scripps.edu/downloads

The msms_complementarity calculation is done outside pymol and the
resulting vertex and triangle files are read by a separate script to create
a CGO representation of the msms surface.  I'll get those up on the web
site tomorrow, perhaps.

Cheers,
Rob
-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor 
Botterell Hall Rm 644
Department of Biochemistry, Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821Fax: 613-533-2497
http://pldserver1.biochem.queensu.ca/~rlc



Re: [PyMOL] moving objects freely

2007-10-04 Thread Robert Campbell
Hi Tom,

On Thu, 04 Oct 2007 11:20:35 -0700, Tom  wrote:

> From time to time, I have a need to manually move objects relative to
> one another.  For example, manual docking of a ligand requires that it the
> translated and rotated relative to its binding pocket.  It there a simple,
> intuitive way to do this?

Put the mouse in editing mode (either through the "Mouse" menu in the
external GUI or by clicking anywhere in the bottom right region of the
graphics window where the mouse functions are described).  Then while
holding down the "Shift" button the left and middle mouse buttons can be
used to rotate and translate an object.  Just make sure your mouse is over
the object you want to move when you press the mouse button.

Just be careful that you haven't picked an atom within the moving object,
or that atom will not move.

Cheers,
Rob
-- 
Robert L. Campbell, Ph.D.
Senior Research Associate/Adjunct Assistant Professor 
Botterell Hall Rm 644
Department of Biochemistry, Queen's University, 
Kingston, ON K7L 3N6  Canada
Tel: 613-533-6821Fax: 613-533-2497
http://pldserver1.biochem.queensu.ca/~rlc



  1   2   3   >