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
[email protected]
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: [email protected]



Reply via email to