Hi everyone, I was looking through the source code of D090_Ala_scan.py, which contains code such as:
p = Pose()
pose_from_pdb(p, "aacap1_0290.pdb")
starting_p = Pose()
#parameters
dock_jump = 1
interface_dist = 8.0 #angstroms
DockingProtocol().setup_foldtree(p)
scorefxn = create_score_function('standard')
scorefxn(p) #needed for proper Interface calculation
interface = Interface(dock_jump)
interface.distance(8.0)
interface.calculate(p)
However, when I try to run the script, it says that Interface is not defined. Does anyone know how to access the Interface class in PyRosetta?
Thanks,
Julius
Post Situation:
Which version of PyRosetta are you using? With the latest version of PyRosetta, the following works fine:
from rosetta import *
from rosetta.protocols.scoring import Interface
rosetta.init()
p = Pose()
pose_from_pdb(p, "input.pdb")
scorefxn = get_fa_scorefxn()
scorefxn(p)
interface = Interface(1)
interface.distance(8.0)
interface.calculate(p)
Thanks rmoretti, this works great. I hadn't known about the proper procedure to include the Interface class:
from rosetta.protocols.scoring import Interface