I have a structure. I do homology modeling of another target. The template has a peptide of length 9. The new target that I am modeling has a peptide of length 10. When I perform the modeling, the target misses that 1 residue of the peptide. Is there a way to add that residue to the end of peptide?
I tried various things:
1. Adjusting the alignement (this always messes up something) before using rosetta_cm.
2. Rosetta Remodel. I gave the blue print file with one residue indicated as insert, but doesn't seem to go through due to:
protocols.forge.remodel.RemodelDesignMover: (0) Creating NeighborhoodByDistanceCalculator using und_pos: [ ]
protocols.forge.remodel.RemodelDesignMover: (0) Warning: union_of_intervals_containing_undefined_positions() returned empty set. NeighborhoodByDistanceCalculator could return undefined results.
Is there any other way model the target correctly?
First, a meta issue, as I'm not sure it's been stressed for you yet. Good alignments (and good template selections) is *the* most critical thing for comparative modeling success. This should be the thing that you spend the most time on, making sure that your alignment is good, and that things are lining up appropriately. The default alignments which come out of standard protocols are typically decent, but it's definitely worth investing the time to check over them manually to make sure that there aren't things that could be better. I know people who spend several *weeks* checking and manually tweaking their alignments, and that's not effort wasted. The more knowledge you can put into your alignments, the better results you get.
That said, on to your questions.
RosettaCM is able to handle differing lengths of template and target. In fact, it's built around that fact. You can "add" or "delete" residues, and you can even add in one area and subtract in the other. All of this is controlled through the alignment. If the template has more residues in one area than the target, then when you thread your target onto your template those residues will be removed. If you have more residues in your target than your template, the Hybridize section of the RosettaCM protocol will fill in those sections from the fragment files. (And all this happens on a per-template basis, so RosettaCM might also delete residues from one template but not others, or fill in structure missing in one template by structure present in another template.)
What gets deleted and what gets added is controlled through the alignment files you feed to the threading program. If you align to gaps ('-' character), those residues will either be deleted (if residues in the target sequence are aligned against gaps are in the target sequence) or will be added later (if a residue in the target sequence is aligned to a gap character in the template sequence).
Key to this is that in your aligment files you need to have accurate sequences for both your target and template structures. For your target structure, you need to have the *full* sequence of the target, including all residues you want to have in your final model (and only those residues). The target sequence in your alignment should be identical to the target sequence in your fasta file. You'll run into problems if it isn't. (e.g. in your case all alignments and fastas for all stages should include the tenth residue you're adding.)
Likewise, the sequence of the template in your alignment should match the exact sequence that Rosetta will see when it reads in the template structure. That is, it shouldn't be the sequence of the biological protein, it should be the sequence of just those residues which have readable coordinates in the PDB. (This also means that it shouldn't include any residues which will be discarded by Rosetta for being incomplete.) I'd recommend passing your template structures through Rosetta/tools/protein_tools/scripts/clean_pdb.py first. Not only will that clean out any Rosetta-unreadable residues, but it will also output a fasta file with the strucuturally present residues. If you use that fasta in your alignment (against the target fasta), you'll get much fewer issues.
I'd also recommend taking a look at the results of the threading, i.e. opening them up in PyMol and taking a look at the structural fragments. This should put the target residue identities onto the template structure. Pay attention to which residues are placed where, and check to make sure that they make sense. If not, adjust your alignment until they do.
If you set up the alignments correctly (by including the "extra" residue appropriately at all stages), then RosettaCM should be able to model in the residue for you.
Regarding RosettaRemodel, I don't have enough experience with it to say offhand why your runs are failing with that error. RosettaRemodel should be able to handle inserting a residue, so I assume there's a slight configuration issue, but without more information I can't necessarily say what it is.
Thank you so much. That makes a lot more sense.