[Chimera-users] Writing each rotamers to individual PDB file

Eric Pettersen pett at cgl.ucsf.edu
Wed Feb 17 14:40:14 PST 2021


Hi Ilan,
	I see that the Dunbrack 2010 rotamer library is now being released under a more permissive license than previously, so this kind of quasi-bulk dumping of library info is probably okay.  Nonetheless, since you are using the library so extensively it would be nice of you to register as a library user here if you could: http://dunbrack.fccc.edu/bbdep2010/ .  And of course if any publication results from it, cite the paper shown in the Rotamers dialog.
	Okay, that said, you are going to have to use a Python script to do what you want.  Assuming you have somehow selected the residue involved, to get all rotamers of LYS for it, the heart of the script would be:

	from chimera import runCommand as run
	from Rotamers import getRotamers
	from chimera import selection

	rot_type = "LYS"

	res = selection.currentResidues()[0]
	rots = getRotamers(res, resType=rot_type)
	for i in range(len(rots)):
		run("swapaa %s sel criteria %d" % (rot_type, i+1))
		run("write 0 /path/to/save/folder/struct%s%d.%d.pdb" % (rot_type, res.id.position, i+1))

Let me know If you need more help than that.

--Eric

	Eric Pettersen
	UCSF Computer Graphics Lab
	

> On Feb 16, 2021, at 7:24 PM, Chemmama, Ilan <Ilan.Chemmama at ucsf.edu> wrote:
> 
> Dear Developers, 
> 
> I am trying to write a PDB for each rotamer in Chimera. 
> I run the command: 
> `swapaa RES :RESNUM lib Dunbrack criteria manual`
> 
> I get the enumeration for each rotamers from SCRWL library. 
> I was wondering if there was a way to write each of those rotamers into separate PDB file using a script. 
> Some residues have large number of possible rotamers and manually selecting the rotamer and saving the PDB file is not tractable. 
> 
> Thank you very much ! 
> Ilan
> _______________________________________________
> Chimera-users mailing list: Chimera-users at cgl.ucsf.edu
> Manage subscription: https://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users




More information about the Chimera-users mailing list