Re: [PyMOL] Mutagenesis script

2011-09-06 Thread Thomas Holder
Hi Rozaimi,

the only problem seems to be your last line, you save two objects (test, 
1shr) to the same PDB file.

Try this:
cmd.save(kill.pdb, test)

Cheers,
   Thomas

On 09/06/2011 03:25 PM, Rozaimi Razali wrote:
 Dear All,

 Sorry for the late reply and thank you for helping me out.

 Originally the wild residue (for 1shr) at position 36:B is a Proline. I
 want to mutate it to Histidine.

 I have tried the suggestion in this thread but the output file
 (kill.pdb) still gives PRO at position 36:B

 #Initialize
 fetch 1shr, async=0
 create test, 1shr
 cmd.wizard(mutagenesis)
 cmd.do(refresh_wizard)

 # Mutate
 cmd.get_wizard().set_mode(HIS)
 cmd.get_wizard().do_select(/test//B/36)

 cmd.frame(1)
 cmd.get_wizard().apply()
 cmd.set_wizard(done)

 # Save
 cmd.save(kill.pdb)

 I am not sure what is the problem here. I have also tried running the
 script on other machines and still the same problem is happening. FYI i
 am using Pymol version 1.3.  Could this be the problem?

 I have tried using the log function + mutagenesis wizard in Pymol GUI
 but something strange is happening. The position 36:B did changed to His
 but

 e.g.

 input file - 1shr.pdb - atom number for 36:B:CA is 1334
 output file - kill.pdb - atom number 36:B:CA 1380

 log.pml - ...byresi((1shr`1380))...

 Why does it tag the atom number from the output file? Shouldn't it tag
 the atom number from the input file (1shr)?

-- 
Thomas Holder
MPI for Developmental Biology

--
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free Love Thy Logs t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
___
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] Mutagenesis script

2011-09-06 Thread Thomas Holder
On 09/06/2011 03:43 PM, Thomas Holder wrote:
 Try this:
 cmd.save(kill.pdb, test)

sorry, forgot quotes, must be:

cmd.save(kill.pdb, test)

-- 
Thomas Holder
MPI for Developmental Biology

--
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free Love Thy Logs t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
___
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] Mutagenesis script

2011-09-04 Thread Troels Emtekær Linnet
So.
cmd.(something) ALWAYS has to be in string format.
So there is the cmd.frame wrong.

Then you dont quit the mutagenesis wizard
And you have a space in the cmd.save

*It total, try:*
#Initialize
fetch 1shr, async=0
create test, 1shr
cmd.wizard(mutagenesis)
cmd.do(refresh_wizard)

# Mutate
cmd.get_wizard().set_mode(HIS)
cmd.get_wizard().do_select(/test//B/36)

cmd.frame(1)
cmd.get_wizard().apply()
cmd.set_wizard(done)

# Save
cmd.save(kill.pdb)

or look at:
http://www.pymolwiki.org/index.php/Rotkit
import rotkit
*mutate test, chain=B, resi=36, target=HIS, mutframe=1*


2011/9/2 Rozaimi Razali rozaimiraz...@gmail.com

 Can someone please explain to me why my script is not working properly?

 #Initialize
 fetch 1shr, async=0
 create test, 1shr
 cmd.wizard(mutagenesis)
 cmd.do(refresh_wizard)

 # Mutate
 cmd.get_wizard().set_mode(HIS)
 cmd.get_wizard().do_select(/test//B/36)

 cmd.frame(1)
 cmd.get_wizard().apply()

 # Save
 cmd.save (kill.pdb)

 Thanks!


 --
 Special Offer -- Download ArcSight Logger for FREE!
 Finally, a world-class log management solution at an even better
 price-free! And you'll get a free Love Thy Logs t-shirt when you
 download Logger. Secure your free ArcSight Logger TODAY!
 http://p.sf.net/sfu/arcsisghtdev2dev
 ___
 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

--
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free Love Thy Logs t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev___
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] Mutagenesis script

2011-09-04 Thread Thomas Holder
Hi Troels,

 cmd.(something) ALWAYS has to be in string format.
 So there is the cmd.frame wrong.

I'm sorry but this is not true, of course you can pass an integer to 
cmd.frame

 Then you dont quit the mutagenesis wizard

which is not a problem as well.

 And you have a space in the cmd.save

I agree to avoid spaces between function name and parenthesis, but still 
this is valid python syntax and works fine.

The full script posted by Rozaimi works fine for me by the way.

 cmd.set_wizard(done)

this doesn't quit the wizard, cmd.set_wizard() without arguments does.

Cheers,
   Thomas

-- 
Thomas Holder
MPI for Developmental Biology
Spemannstr. 35
D-72076 Tübingen

--
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free Love Thy Logs t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
___
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] Mutagenesis script

2011-09-03 Thread Andreas Förster
Dear Rozaimi,

I'm sure people would bother to read your script and reply to your 
question if you told us what your trying to achieve and what not 
working properly looks like.  Otherwise your wasting your time.


Andreas



On 02/09/2011 4:58, Rozaimi Razali wrote:
 Can someone please explain to me why my script is not working properly?

 #Initialize
 fetch 1shr, async=0
 create test, 1shr
 cmd.wizard(mutagenesis)
 cmd.do(refresh_wizard)

 # Mutate
 cmd.get_wizard().set_mode(HIS)
 cmd.get_wizard().do_select(/test//B/36)

 cmd.frame(1)
 cmd.get_wizard().apply()

 # Save
 cmd.save (kill.pdb)

 Thanks!


 --
 Special Offer -- Download ArcSight Logger for FREE!
 Finally, a world-class log management solution at an even better
 price-free! And you'll get a free Love Thy Logs t-shirt when you
 download Logger. Secure your free ArcSight Logger TODAY!
 http://p.sf.net/sfu/arcsisghtdev2dev



 ___
 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

-- 
 Andreas Förster, Research Associate
 Paul Freemont  Xiaodong Zhang Labs
Department of Biochemistry, Imperial College London
 http://www.msf.bio.ic.ac.uk

--
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free Love Thy Logs t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net


[PyMOL] Mutagenesis script

2011-09-02 Thread Rozaimi Razali
Can someone please explain to me why my script is not working properly?

#Initialize
fetch 1shr, async=0
create test, 1shr
cmd.wizard(mutagenesis)
cmd.do(refresh_wizard)

# Mutate
cmd.get_wizard().set_mode(HIS)
cmd.get_wizard().do_select(/test//B/36)

cmd.frame(1)
cmd.get_wizard().apply()

# Save
cmd.save (kill.pdb)

Thanks!
--
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free Love Thy Logs t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net

[PyMOL] Mutagenesis Script with different rotamer Library!

2008-04-22 Thread Josep Maria Campanera Alsina
Hi all,
I'd like to use the Mutagenesis wizard in a Pymol/Python script! I'd
like to automate the following steps!

(1) Load a peptide pdb file with three residues. (easy)
(2) Mutate one residue, well actually I do not want to change a single
residue but change the rotamer of a residue. Unlike the mutagenesis
wizard I'd like to use my own rotamer Library (It is based on
Dunbrack's library but with slightly variations). So, I'd like to
specify residue,phi,psi,chi1,chi2,chi3,chi4 for each rotamer I want to
mutate to.
(3) Save it in a pdb format (easy)

I've found a magnificent start-up for my script from Andreas Henschel
(see below). But I do not know how to load a specific rotamer
(res,phi,psi,chi1,chi2,chi3 and chi4). Any ideas?

All ideas are welcome,

Josep Maria,

PS: Well, a solution was done by the Rotamer Toggle
(http://www.pymolwiki.org/index.php/Rotamer_Toggle), but this script
is not working properly and out of date!

-
Josep Maria Campanera Alsina
Juan de la Cierva Researcher
Departament de Fisicoquímica
Facultat de Farmàcia
Avgda Joan XXIII, s/n
08028 Barcelona · Catalonia · Spain
Tel: +34 93 4035988
Fax: +34 93 4035987
campan...@ub.edu


--
Hi Martin,

you can get hints about how to script wizard functions if you log your
activities while running the wizard.
A python script (mutate.py) that makes use of the mutagenesis wizard
could look like this:

## run through pymol, eg.:
## pymol -qc mutate.py 1god A/94/ ASN

from pymol import cmd
import sys

pdb, selection, mutant = sys.argv[-3:]
cmd.wizard(mutagenesis)
cmd.fetch(pdb)
cmd.refresh_wizard()
cmd.get_wizard().do_select(selection)
cmd.get_wizard().set_mode(mutant)
cmd.get_wizard().apply()
cmd.set_wizard()
cmd.save(%s_m.pdb % pdb, pdb)

This is pretty no-frills, as no rotamer stuff is taken into account.
I wrote it in Python, because it allows to parameterize from command
line, you can add loops easily etc.
Beware, the error message you get is because pymol unsuccessfully tries
to open the command line arguments as files.

Hope that helps.

Best regards,
Andreas

Martin Höfling wrote:
 Hi there,

 does anybody of you has an idea, if the mutagenesis stuff is available for use
 inside scripts too?

 I wanna load a pdb, mutate a resid and save the resulting pdb via commandline.

 The only thing I found was modifying atoms, when I searched via help and
 also checked the wiki, i hope that I didn't miss sth.

 Cheers
 Martin



Re: [PyMOL] mutagenesis script

2007-06-04 Thread Andreas Henschel

Hi Martin,

you can get hints about how to script wizard functions if you log your 
activities while running the wizard.
A python script (mutate.py) that makes use of the mutagenesis wizard 
could look like this:


## run through pymol, eg.:
## pymol -qc mutate.py 1god A/94/ ASN

from pymol import cmd
import sys

pdb, selection, mutant = sys.argv[-3:]
cmd.wizard(mutagenesis)
cmd.fetch(pdb)
cmd.refresh_wizard()
cmd.get_wizard().do_select(selection)
cmd.get_wizard().set_mode(mutant)
cmd.get_wizard().apply()
cmd.set_wizard()
cmd.save(%s_m.pdb % pdb, pdb)

This is pretty no-frills, as no rotamer stuff is taken into account.
I wrote it in Python, because it allows to parameterize from command 
line, you can add loops easily etc.
Beware, the error message you get is because pymol unsuccessfully tries 
to open the command line arguments as files.


Hope that helps.

Best regards,
Andreas

Martin Höfling wrote:

Hi there,

does anybody of you has an idea, if the mutagenesis stuff is available for use 
inside scripts too?


I wanna load a pdb, mutate a resid and save the resulting pdb via commandline.

The only thing I found was modifying atoms,  when I searched via help and 
also checked the wiki, i hope that I didn't miss sth.


Cheers
Martin

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


--
Andreas Henschel
Bioinformatics Group
TU Dresden
Tatzberg 47-51
01307 Dresden, Germany

Phone: +49 351 463 40063
EMail: a...@biotec.tu-dresden.de





[PyMOL] mutagenesis script

2007-06-01 Thread Martin Höfling
Hi there,

does anybody of you has an idea, if the mutagenesis stuff is available for use 
inside scripts too?

I wanna load a pdb, mutate a resid and save the resulting pdb via commandline.

The only thing I found was modifying atoms,  when I searched via help and 
also checked the wiki, i hope that I didn't miss sth.

Cheers
Martin