Hi Jason, thanks for the comprehensive answer. One question though, is the line
iterate first my_res, stored.r = resn correct this way? Are there no braces or quotation marks needed? Its not perfectly clear to me if 'first' and 'my_res' are selections (indicated by braces) or objects (name without braces in the main window). I understand 'resn' is something like 'GLU', if I want to know how many GLU rotamers are in the library. Thanks again Martin Am 12.09.10 22:00, schrieb Jason Vertrees: > Hi Martin, > > PyMOL first searches the Dunbrack rotamer library for hits based upon > the amino acid type and it's original phi/psi angles. If it cannot > find a hit, it will then look for backbone independent positions. To > get the number of available rotamers given a residue, you need to > unpickle the library, create the lookup key into the library and then > count the results. It might look something like this: > > # unpickle the library > import pickle > rot_lib = > pickle.load(open("$PYMOL_HOME/data/chempy/sidechains/sc_bb_dep.pkl",'r')) > > # get residue name, you need to select the residue > # into "my_res" > from pymol import stored > stored.r = '' > iterate first my_res, stored.r = resn > > # get residue info; prepare dictionary key > (phi,psi) = cmd.phi_psi("br. first my_res") > > # warren also does 20 and 60 in place of 10--three possible lookups > key = ( stored.r, int(10*round(phi/10)), int(10*round(psi/10))) > > if key in rot_lib.keys(): > print "This rotamer has %s possible positions" % len(rot_lib[key]) > > Lookups in the independent library are easier--just provide a residue name. > > Cheers, > > -- Jason > > > On Sun, Sep 12, 2010 at 11:04 AM, Martin Hediger<ma....@bluewin.ch> wrote: >> Dear all, let me rephrase my question in a less confusing way. >> For a given mutant, I need a PDB file for every available rotamer. I >> guess thats the simplest way of putting it. How can I achieve that? >> >> Thanks for hints. >> Martin >> >> >> >> >> >> Am 12.09.10 00:08, schrieb Martin Hediger: >>> Hi all >>> I want to do some scripted mutations on a range of residues. Say I want >>> to mutate residue 189 to every rotamer of [Asp, His, Glu, Thr, Lys] >>> available in the PyMOL internal rotamer library. I'm seeing that PyMOL >>> issues cmd.get_wizard().do_state(i) to select rotamer 'i' for a >>> mutation. Now, if I want to iterate over all available rotamers, I need >>> the limit rotamer number. How can I obtain the maximum number of >>> rotamers available for every amino acid? >>> >>> Thanks for hints on this >>> >>> Martin >>> >>> ------------------------------------------------------------------------------ >>> Start uncovering the many advantages of virtual appliances >>> and start using them to simplify application deployment and >>> accelerate your shift to cloud computing >>> http://p.sf.net/sfu/novell-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 >>> >> >> ------------------------------------------------------------------------------ >> Start uncovering the many advantages of virtual appliances >> and start using them to simplify application deployment and >> accelerate your shift to cloud computing >> http://p.sf.net/sfu/novell-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 >> > > ------------------------------------------------------------------------------ Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing http://p.sf.net/sfu/novell-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