Hi guys. I'm trying to get multiple loops working for Fast and Classic relax, and I have run into a strange problem.
Previously, I was using the set_single_loop_fold_tree to setup the loop fold tree. This seemed to work fine. However, for multiple loops I have tried two things. The ft.new_jump command, as well as manually setting up each edge. When I try to do this to specify one loop as a test, and then run classic or fast relax I get a segmentation fault. ft.check_fold_tree() is True, and a manual inspection of the edges of the fold tree from both methods shows exactly the same edges from set_single_loop_fold_tree.
Is there something that set_single_loop_fold_tree is doing other then setting up the edges in the tree?
-J
Post Situation:
I know little about the python part of pyrosetta.
In the underlying c++, the function src/protocols/loops/loops_main.cc::set_single_loop_fold_tree does not appear to modify the input pose in any fashion other than replacing its FoldTree object.
FoldTree does have an == operator in C++; maybe you can use that to check if your FoldTree and the function's are identical?
Conceptually and upon a casual reading of the code, I can think of litte that set_single_loop_fold_tree should be doing that cannot be straightforwardly replicated by manually setting up edges (and I've written a LOT of code to do manual loop edges). The only thing that comes to mind is re-rooting the fold tree...perhaps it changes the root and you do not? The rooting function is called reorder (although the root is still called root.)
Thanks. It's fixed. I was using ft = p.fold_tree() to extract the fold tree and modify it. When I printed the pose, the foldtree was changed, so I thought it was still attached and updated. However, I still had to do p.fold_tree(ft) to update.
-J
I think pretty well everything in PyRosetta makes deep copies - I remember hearing that none of the pointer wrapping worked right. I think as a general rule you should plan on making copies. (You get const access to a Pose's FoldTree as it is, so you'd have to make a copy, modify it, and then use the setter anyway in this example.)
Thanks for the words of advice. It will help immensely.
-J