You are here

insert pose into pose

6 posts / 0 new
Last post
insert pose into pose
#1

Hello,

I've been trying to do insert a pose (which is a part of a pdb file) into a new pose ('pose'), which was made from sequence (it's just 40 x 'A'). To get the fragment I want from the pdb pose, I used return_region:
region = return_region(sheet1,12,length1+12)
(sheet1 was the pdb file pose, length1 was specified before).
Then, I tried:
append_pose_to_pose(pose, region)
and while I didn't get an error, the pose was appended by a jump, and I wanted it to be by peptide bond;
So, I tried to go with:
mover = AnchoredGraftMover(2, length1+1, region)
mover.apply(pose)
But it resulted with 'segmentation fault (core dumped). CCDEndsGraftMover didn't work either: 'Graft meets ideal geometry false' (the "peptide bond" was ~ 37 instead of 1.5).
Using
    ft = FoldTree()
    ft.add_edge(1,2,-1)
    ft.add_edge(2,(1+(length1/2)),-1)
    ft.add_edge(2,length1+2,1)
    ft.add_edge((1+(length1/2)),length1+2, -1)
    ft.add_edge(length1+2, pose.total_residue(), -1)
    pose.fold_tree(ft)

    ft2 = FoldTree()
    ft2.add_edge(1,region.total_residue(),-1)
    region.fold_tree(ft2)

new = insert_pose_to_pose(pose,region,2,length1+2)
I got: "segmentation fault (core dumped)" - I assume it may be because my foldtree isn't good, though I don't fully understand how to correct it?
Or maybe my poses need some preparation?

Since I want to insert the region in the beginning of the pose made from sequence, I thought of just appening it with residues (and I just wanted to test if this would work),
region.append_residue_by_bond(pose.residue(1))
but it resulted with an error message: can't create a polymer bond to new residue 23 due to incompatible type: ALA : NtermProteinFull

I also tried simply copying phi and psi of residues from region to my pose, but the result didn't look the same, even with omega copied as well.

Am I going about this the wrong way? Thank you so much for any response.

 

Category: 
Post Situation: 
Sun, 2020-02-16 10:35
tttt

I'll be able to help more with the AnchoredGraftMover and CCDEndsGraftMover on Monday, as they can be tricky to get setup right. 

I assume, you have seen this?  http://www.pyrosetta.org/faq#TOC-5.-Can-I-split-a-Pose-delete-residues-or-insert-residues-

For the peptide bond ends for inserting residue-by-residue, you will want to remove the variant types from both your scaffold and the insert: 

core.pose.remove_variant_type_from_pose_residue(insert, core.chemical.LOWER_TERMINUS_VARIANT, beginning_pose_num);

core.pose.remove_variant_type_from_pose_residue(insert, core.chemical.UPPER_TERMINUS_VARIANT, end_pose_num);

Sun, 2020-02-16 11:05
jadolfbr

Also, please uplad the scaffold and insert PDB and the PDB num and chain you want them to be inserted into.   If you want, you can also upload your script and I can try to debug it. You also want to pass an N and C ter overhang length of at least two for CCDEndsGraftMover.  That will attempt to do a superposition of both ends before grafting, and remove those overhang residues on both the insert and scaffold. Otherwise, CCDEndsGraftMover will use the xyz coords of your inputs - and without a proper superposition, or enough residues set to flexible to do the CCD on either end, we won't get a graft closure. 

Sun, 2020-02-16 11:17
jadolfbr

Thank you for such fast reply! This is the script with adding residues:

import pyrosetta

from pyrosetta import *
from pyrosetta.rosetta.core.chemical import *
from pyrosetta.rosetta.protocols.grafting import *
from pyrosetta.rosetta.core.pose import *
init()

sheet = pose_from_pdb("/home/anna/designs/pdbs/beta_sheet/1sa8.clean.pdb")
pymover = PyMOLMover()

sequence = 'A' *30
pose = pose_from_sequence(sequence)
resid = pose.total_residue()

length = 23
region = return_region(sheet,12,length+12)
res = region.total_residue()

remove_variant_type_from_pose_residue(region, LOWER_TERMINUS_VARIANT,1);
remove_variant_type_from_pose_residue(region, UPPER_TERMINUS_VARIANT, res);
remove_variant_type_from_pose_residue(pose, LOWER_TERMINUS_VARIANT,1);
remove_variant_type_from_pose_residue(pose, UPPER_TERMINUS_VARIANT, resid);

for i in range(12,resid):
    region.append_residue_by_bond(pose.residue(i))
pymover.apply(region)

 

and the one with grafting:

import pyrosetta

from pyrosetta import *
from pyrosetta.rosetta.core.chemical import *
from pyrosetta.rosetta.protocols.grafting import *
from pyrosetta.rosetta.core.pose import *
init()

sheet = pose_from_pdb("/home/anna/designs/pdbs/beta_sheet/1sa8.clean.pdb")
pymover = PyMOLMover()

sequence = 'A' *30
pose = pose_from_sequence(sequence)
resid = pose.total_residue()

length = 23
region = return_region(sheet,12,length+12)
res = region.total_residue()

mover = CCDEndsGraftMover(2, length+2, region, 2,2)
mover.apply(pose)
pymover.apply(pose)

 

I tried to include what you mentioned, but it's still not working properly. I really appreciate your help,

Thank you!

 

 

Mon, 2020-02-17 07:26
tttt

Yea, forums only allow txt files, so If you save your PDB (sheet) as a .txt file, I can attempt to debug it.  

I can tell for the CCDEndsGraftMover, when you return the region, you'll need to add two residues on either side for the superposition (overhang), that will then get deleted. 

 

For the residue insertion, I would use this function for general appending: append_polymer_residue_after_seqpos

Mon, 2020-02-17 07:57
jadolfbr

Sorry, it says the file is too big. It's just 1sa8 from rcsb, after using cleanATOM on it.

Mon, 2020-02-17 08:01
tttt