You are here

Using InterfaceSasaFilter

3 posts / 0 new
Last post
Using InterfaceSasaFilter
#1

Hi,

I'm trying to use the InterfaceSasaFilter class and am running into an error.  Any idea how to get around this issue?  A snippet of the code is attached, along with the error message

-----------------------

> sasaFilt = pyrosetta.rosetta.protocols.protein_interface_design.filters.InterfaceHolesFilter()

> sasaFilt.apply(pose)

protocols.moves.RigidBodyMover: Translate: Jump (before): RT -0.119886 0.0251964 0.992468 -0.887035 0.446241 -0.118479 -0.445865 -0.894558 -0.0311479 -16.5561 15.9674 28.6121  
protocols.moves.RigidBodyMover: Translate: Jump (after):  RT -0.119886 0.0251964 0.992468 -0.887035 0.446241 -0.118479 -0.445865 -0.894558 -0.0311479 -541.404 478.471 743.192  
Error: Could not find calculator sasa - need to register it before use
ERROR:: Exit from: /opt/software/rosetta/rosetta_src_2017.08.59291_bundle/main/source/src/core/pose/metrics/CalculatorFactory.cc line: 95
/opt/software/pyrosetta/lib/python2.7/site-packages/pyrosetta-4.0-py2.7.egg/rosetta.so(+0x2249c98) [0x7f732bbacc98]
/opt/software/pyrosetta/lib/python2.7/site-packages/pyrosetta-4.0-py2.7.egg/rosetta.so(+0x5a3a3a6) [0x7f732f39d3a6]
/opt/software/pyrosetta/lib/python2.7/site-packages/pyrosetta-4.0-py2.7.egg/rosetta.so(+0x1b8897d) [0x7f732b4eb97d]
/opt/software/pyrosetta/lib/python2.7/site-packages/pyrosetta-4.0-py2.7.egg/rosetta.so(+0x4ae0494) [0x7f732e443494]
/opt/software/pyrosetta/lib/python2.7/site-packages/pyrosetta-4.0-py2.7.egg/rosetta.so(+0x4ae1a89) [0x7f732e444a89]
/opt/software/pyrosetta/lib/python2.7/site-packages/pyrosetta-4.0-py2.7.egg/rosetta.so(+0x4ae11ee) [0x7f732e4441ee]
/opt/software/pyrosetta/lib/python2.7/site-packages/pyrosetta-4.0-py2.7.egg/rosetta.so(+0x4ae1017) [0x7f732e444017]
/opt/software/pyrosetta/lib/python2.7/site-packages/pyrosetta-4.0-py2.7.egg/rosetta.so(+0x3c4260c) [0x7f732d5a560c]
/opt/software/pyrosetta/lib/python2.7/site-packages/pyrosetta-4.0-py2.7.egg/rosetta.so(+0x3c40f9d) [0x7f732d5a3f9d]
/opt/software/pyrosetta/lib/python2.7/site-packages/pyrosetta-4.0-py2.7.egg/rosetta.so(+0xc730c78) [0x7f7336093c78]
/opt/software/pyrosetta/lib/python2.7/site-packages/pyrosetta-4.0-py2.7.egg/rosetta.so(+0x5e307a8) [0x7f732f7937a8]
/usr/bin/python(PyEval_EvalFrameEx+0x6da2) [0x4cada2]
/usr/bin/python(PyEval_EvalCodeEx+0x255) [0x4c2765]
/usr/bin/python(PyEval_EvalFrameEx+0x44db) [0x4c84db]
/usr/bin/python(PyEval_EvalCodeEx+0x255) [0x4c2765]
/usr/bin/python(PyEval_EvalFrameEx+0x6099) [0x4ca099]
/usr/bin/python(PyEval_EvalCodeEx+0x255) [0x4c2765]
/usr/bin/python(PyEval_EvalFrameEx+0x6099) [0x4ca099]
/usr/bin/python(PyEval_EvalCodeEx+0x255) [0x4c2765]
/usr/bin/python(PyEval_EvalFrameEx+0x6099) [0x4ca099]
/usr/bin/python(PyEval_EvalCodeEx+0x255) [0x4c2765]
/usr/bin/python(PyEval_EvalFrameEx+0x6099) [0x4ca099]
/usr/bin/python(PyEval_EvalCodeEx+0x255) [0x4c2765]
/usr/bin/python(PyEval_EvalFrameEx+0x6099) [0x4ca099]
/usr/bin/python(PyEval_EvalCodeEx+0x255) [0x4c2765]
/usr/bin/python(PyEval_EvalFrameEx+0x68d1) [0x4ca8d1]
/usr/bin/python(PyEval_EvalCodeEx+0x255) [0x4c2765]
/usr/bin/python() [0x4de8b8]
/usr/bin/python(PyObject_Call+0x43) [0x4b0cb3]
/usr/bin/python(PyEval_EvalFrameEx+0x2ad1) [0x4c6ad1]
/usr/bin/python(PyEval_EvalCodeEx+0x255) [0x4c2765]
/usr/bin/python(PyEval_EvalFrameEx+0x6099) [0x4ca099]
/usr/bin/python(PyEval_EvalCodeEx+0x255) [0x4c2765]
/usr/bin/python(PyEval_EvalCode+0x19) [0x4c2509]
/usr/bin/python() [0x4f1def]
/usr/bin/python(PyRun_FileExFlags+0x82) [0x4ec652]
/usr/bin/python(PyRun_SimpleFileExFlags+0x191) [0x4eae31]
/usr/bin/python(Py_Main+0x68a) [0x49e14a]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0) [0x7f7391f0c830]
/usr/bin/python(_start+0x29) [0x49d9d9]
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
<ipython-input-15-d399225fade1> in <module>()
----> 1 sasaFilt.apply(mab.pose)

RuntimeError: Caught an unknown exception!

Category: 
Post Situation: 
Thu, 2017-10-26 07:53
SenyorDrew

This is one of the ugly spots in Rosetta, especially with respect to PyRosetta usage.

You need to register the sasa calculator before InterfaceHolesFilter can use it. In RosettaScripts (where InterfaceHolesFilter is normally used), this is done for you, but in PyRosetta you'll need to do it manually.

Something like the following should work (though I haven't tested it in PyRosetta):

calculator_factory = core.pose.metrics.CalculatorFactory.Instance()
if not calculator_factory.check_calculator_exists( "sasa" ):
    sasa_calculator = core.pose.metrics.simple_calculators.SasaCalculatorLegacy()
    calculator_factory.register_calculator( "sasa", sasa_calculator )
  

 

Other calculators you might need are "sasa_interface"  ( core.pose.metrics.simple_calculators.InterfaceSasaDefinitionCalculator( 1, 2 ) ), "ligneigh" ( core.pose.metrics.simple_calculators.InterfaceNeighborDefinitionCalculator( 1, 2 ) ) , and "liginterfE"  (core.pose.metrics.simple_calculators.InterfaceDeltaEnergeticsCalculator( "ligneigh" ) ).

 

Thu, 2017-10-26 08:32
rmoretti

Thanks Rocco - that solved the problem.

Thu, 2017-10-26 13:30
SenyorDrew