Hi Tom, Thanks for that! Native support for several large chains would be very useful. Leonid
Message: 3 Date: Thu, 16 Jun 2011 13:24:55 -0600 (MDT) From: "Thomas C. Terwilliger"
To: "PHENIX user mailing list" Subject: Re: [phenixbb] rosetta fragment files -- adjusting residue numbers to combine them Message-ID:<[email protected]> Content-Type: text/plain;charset=iso-8859-1 Hi Leonid and others wanting to use phenix.mr_rosetta with large chains,
After looking at the Rosetta code and conferring with Frank DiMaio from the Baker laboratory...
You can paste several fragment files together to represent your entire chain, but you need to edit all but the first one to set the position in the sequence file that each set of fragments goes with.
Here is a little script that will take a fragments file that you have created that started with residue 651 and edit it in a way that you can just add to the end of your fragments file for residues 1-650. Run it with:
phenix.python adjust_robetta_resid.py \ fragments_in fragments_adjusted 651
-------------------------------- # adjust_robetta_resid.py # use: phenix.python adjust_robetta_resid.py fragments_in fragments_adjusted 651 # to adjust the first residue of fragments_in to be 651
import sys args=sys.argv[1:] if len(args) != 3: print "USE: phenix.python adjust_robetta_resid.py fragments_in fragments_adjusted
" sys.exit() file_in=args[0] file_out=args[1] start_resno=int(args[2]) print "Copying %s to %s offsetting start residue number to %d" %( file_in,file_out,start_resno)
f=open(file_out,'w') new_resno=0 for line in open(file_in).readlines(): if line.find('position:')> -1 and line.find('neighbors:')>-1: spl=line.split() current_resno=int(spl[1]) new_resno=current_resno+start_resno print "Residue %d changed to %d" %(current_resno,new_resno) spl[1]=" %d " %(new_resno) new_line=" ".join(spl) else: new_line=line print>>f, new_line.rstrip()
f.close() --------------------------------
I will add this to phenix as "phenix.adjust_robetta_resid" as well.
However...there still is a problem if you have multiple chains...as mr_rosetta has only one set of fragments files the same fragments files are being applied to all your chains. I will add a way to specify which fragments files go with which chains.
All the best, Tom T