In a part of of my structure that is 5 residues long, I would like to make all possible mutations i.e. 5 positions all 20 AA, and all permutations of this.
I would like to know if there is a script/function that does this.
If you want to make ALL 3.2 million possible sequences, no, there is not a script pre-written to do that. There may be code to do the single-residue scanning (not combinatorial permutations) for 100 sequences, but I don’t think it’s been released.
What you probably want to do is have rosetta sample the space of the 3.2 million sequences. To do that, just write a resfile with ALLAAwc at the 5 positions (the resfile documentation is pretty good and should cover this) and then run the fixbb app. The packer will not exhaustively sample all 3.2 million sequences, but it will tell you low-energy sequences. Is that what you need?