On Jul 20, 2009, at 10:37 PM, ylei@ecs.umass.edu wrote:

Hi all

I'm trying to get the rotamers for the given residue along the  
backbone using Dunbrack Backbone Dependent Library. So far, I want to  
use getRotamers function. But when running this command in the python  
shell, I got this error "No module named Dunbrack". I don't know if  
there is a module "Dunbrack" which I should import first.

I guess I need more details about how you tried to "use" the getRotamers function.  Were you using Chimera's IDLE interpreter?  Your own version of Python?  What was the code exactly?

Moreover, besides getRotamers, there are several other functions, e.g.  
getRotamerParams, extractResInfo, useRotamer, RotamerLibraryInfo,  
registerLibrary, useBestRotamers, etc and a class called RotamerParams  
in the same file. I also found there are two associated functions in  
the Dunbrack folder, say, dependentRotamerParams and  
independentRotamerParams, which are used in the above functions.

Can someone help me distinguish these functions? Which one will be  
useful if I need a full set of rotamers for certain purpose (i.e.  
side-chain structure prediction) given the backbone?

Here's a brief rundown on what the functions you listed do:

getRotamers:  Takes a Residue instance and optionally phi/psi angles (if different from the Residue), residue type (e.g. "TYR"), and/or rotamer library name.  Returns a boolean and a list of Molecule instances.  The boolean indicates whether the rotamers are backbone dependent.  The Molecules are each a single residue (a rotamer) and are in descending probability order.  Each has an attribute "rotamerProb" for the probability and "chis" for the chi angles.

getRotamersParams:  Takes either a Residue instance or a residue type and optionally phi and psi angles (if omitted and a Residue instance was given, then that Residue's phi/psi will be used).  Returns a boolean and a list of RotamerParams (in descending probability order).  The boolean indicates if the rotamers are backbone dependent.  RotamersParams is a simple container class that has an attribute 'p' for probability and 'chis' for a list of chi angles.  Most of this is covered in the getRotamerParams doc string.

extractResInfo:  Takes a Residue instance.  Returns the residue type, phi, psi, and "cis" or "trans".

useRotamer:  Takes a Residue instance and a list of one or more rotamers (as returned by getRotamers) and swaps the Residue's side chain with the given rotamers.  If more than one rotamer is in the list, then alt locs will be used to distinguish the different side chains.

RotamerLibraryInfo:  a class that holds information about a rotamer library:  how to import it, what citation to display, etc.

registerLibrary:  Takes a string indicated the "import name" of a library (i.e. what name to use in an import statement) and adds a RotamerLibraryInfo instance for it to the list of known rotamer libraries ("Rotamers.libraries").

useBestRotamers:  the implementation of the "swapaa" command.  If you look at the documentation for that command I think this method's arguments and actions will be mostly self-explanatory.  The only slight exception is that the 'targets' argument is a list of Residue instances.

I hope this helps.

--Eric

                        Eric Pettersen
                        UCSF Computer Graphics Lab
                        http://www.cgl.ucsf.edu