I'm using PyRosetta-r21 on Ubuntu togather with IPython 2.0.0 notebooks. This works extremly well, with one small problem:
Some output is redirected to the console in which "ipython notebook" command was started instead of the notebook cell.
So the question is: is it possible to capture the output of scorefxn.show(pose)?
I have tried to use the example in "test/T007_TracerIO.py"
import rosetta as r
from toolbox import pose_from_rcsb
#Basic tracer example
T = r.basic.PyTracer()
r.basic.Tracer.set_ios_hook(T, r.basic.Tracer.get_all_channels_string(), True)
pose = pose_from_rcsb("1YY8")
print "Captured IO"
Works very well. But:
scorefxn = r.get_fa_scorefxn()
print '\nCaptured IO'
Does not capture the output. (A side question, can T.buf() be cleared?)
Doing: "scorefxn.show(pose, T)" raises an error, becaus of incompatible parameters
stream = r.utility.OString()
raises "RuntimeError: This class cannot be instantiated from Python" and
stream = r.utility.OStringStream
Is also incompatible.
Thank you for your help and best regards,