Hello People,
I am trying to find a way to cut out part of a protein and save to a new .pdb file.
So i have a protein and i want to cut out a section (from amino acid 315 to 330 for example), and save that cut out (and maintain the original 3D structure) into a new .pdb file.
I tried searching if there is a built-in PyRosetta function/method that does this, or if there is a script that does this, but i could not find.
Anyone can help me or guide me?
Thank you
AC Research
Category:
Post Situation:
A) text editor
B) the Pose object supplies a dump_pdb interface that takes a vector1(Size) - so you can tell it which residues to print to some output stream
C) pose/util.hh has a ton of functions for this, including create_subpose and pdbslice. pdbslice(new_pose, old_pose, vector1(Size) residues) is probably the one you want.
This should get you started. Additionally, there are movers that do each of these things - accessible in the rosetta.protocols.grafting namespace.
http://www.pyrosetta.org/faq#TOC-5.-Can-I-split-a-Pose-delete-residues-or-insert-residues-
https://www.rosettacommons.org/docs/latest/scripting_documentation/RosettaScripts/Movers/movers_pages/grafting/DeleteRegionMover
https://www.rosettacommons.org/docs/latest/scripting_documentation/RosettaScripts/Movers/movers_pages/grafting/KeepRegionMover
Hope this helps,
-Jared