Side chain rotamers sampling in protein

What is the best tool to sample rotamers in side chain amino acids in a protein? More exactly, I want to sample the different rotamers only for lysine residues while keeping backbone rigid. I've tried to use the fixed backbone design application ("fixbb") in Rosetta3.4 but this program give only one (optimized?) solution. Here are my input files:

-s file.pdb
-resfile RESFILE
-nstruct 50
-ex1
-ex2
-database /path/to/rosetta_database


and for the RESFILE:

NATAA
start
2 E NATRO
3 E NATRO
4 E NATRO
5 E NATRO
[...]
212 E NATRO
213 E NATRO
214 E NATRO
215 E NATRO


The header before start NATAA indicates that I want to only repack the input sequence and the, e.g. 2 E NATRO, command indicates to freeze the considered residue (here the second residue of chain E). For the output I obtain 50 (nstruct) identical structures, with all the residue in the native conformation given by the file.pdb except for the lysine residues. My question is how to obtain nstruct different models for the lysine side chain rotamers?

Estimate from the PDB the covariance matrix of the vector of atomic distances in the side chains minus the vector of template distances.

Then simulate random corrections to the template distances using the multivariate Gaussian with this covariance matrix.

Convert each vector of distances to a distance matrices. Then convert the randomly corrected distance matrices to Gram matrices, cf. https://scicomp.stackexchange.com/a/1946/1117

Then truncate the gram matrices to rank 3 (using an SVD) to get coordinates of random side chain structures that have approximately the correct distribution.

Finally, rotate thesee structures to match the backbone.

You can use the set_residue_to_rotamer_number() function in Coot to do this.

m = read_pdb("test.pdb")
for irot in range(n_rotamers(m, "A", 30, "")):
set_residue_to_rotamer_number(m, "A", 30, "", "", irot)
fn = "sample-A-30-rot-" + str(irot) + ".pdb"
write_pdb_file(m, fn)

• I didn't know Coot. Actually, I've already written a python class to compute some properties in pdbs. Is it possible to import Coot in a python script and to use the piece of code you proposed? – bougui Oct 7 '12 at 12:49
• Not today :(, but in future. Coot embeds python, not extends it. So (maybe) a work-around is to run your script in coot: coot --no-graphics --python --script script.py – pemsley Oct 7 '12 at 13:51

I've actually used BASILISK to solve my problem. I've written python functions that compute dihedral angles and python module to rotate side chains according to the distribution given by basilisk.