So I’m trying to make a .pml script where I generate “rotamers” of protein A around protein B using “rotate axis, degree, object” and creating new object of  rotated protein A – this generates a number of rotamers, but they basically form a sphere until you align them, and so,

the last step is that I align all the rotamers I’ve generated either on N- or C- term of protein A (i.e. the Ca atom of first/last residue), depending on my choosing

 

So, at the moment, I manually renumbering whatever protein I’m generating the rotamers for and setting it to some obscure number (like 5000) that is unlikely to be used by most pdb files

 

Manually, I do this by using

alter structure1, resi=str(int(resi) + 4999) ; rebuild

 

-          this takes the object structure1, which starts at  1 as the first amino acid residue and changes it to be 5000, so in case of my alignments, aligning my rotamers with structure1 doesn’t accidentally align any other object in the pdb file…

 

doing this manually is a pain, especially since a number of pdb files don’t start with residue number 1 and I have to keep manually renumbering the proteins…

 

is there a way to easily set the first residue to be 5000 or last residue to be 5000? Regardless of what the object?

 

for example to do the following (i.e. what code might I use to do the following)

create object, sele

if the first residue number in object is not numbered “1”,  get value of first residue number , calculate the difference between 5000 and value of first residue number and add that difference to all residue numbers? i.e. if my peptide starts at residue 23 and I want that to be 5000…

 

Similarly, if the last residue number of the object is not 5000, get value of last residue number, calculate the difference between 5000 and the value of last residue number and add/subtract this difference to all residue numbers? i.e. if my peptide ends on residue 38 and I want that residue to be 5000

 

I’d like this to be a “general” code, so that I can renumber and object, regardless of whether the first residue is numbered 3, 600 or 2100, etc

Anyone familiar with how to do this?

I would greatly appreciate it

Thanks,

m