I am new to Pyrosetta and programing and I am learning how to use Pyrosetta. So when I was practicing scoring with Workshop #3 bullet point 5, I came across a error, and I have no idea what's wrong with.
Here is what I did.
r1 = pose.residue(24)
r2 = pose.residue(20)
a1 = r1.atom("N")
a2 = r1.atom("O")
etable_atom_pair_energies(a1, a2, scorefxn)
And it came out this error:
TypeError: etable_atom_pair_energies() missing 2 required positional arguments: ' atom_index_2' and 'sfxn'
For line 2 and 3, the book uses ras.residue(), but for some reason it did not work for me but the pose did.
So from what it looks like I have typed things wrong, and I don't know what is going on. Can anyone help me with this problem? Thank you all a lot.
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Update:
I think I figured out how to use this function. Instead of following the book, I did the following trying to find the attractive energy between the N of residue 24 and O of the residue 20:
etable_atom_pair_energies(r1, a1, r2, a2, fa_atr)
But I came accross another error.
AttributeError: 'pyrosetta.rosetta.core.scoring.ScoreTypr' object has no attribute 'energy_method_options'
Can anyone help me with this?
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Update 2:
I guess I didn't understand what can be put as sfxn in the function below. Can someone give any examples on what can be input as sfxn?
etable_atom_pair_energies(r1, a1, r2, a2, sfxn)
Returns:
tuple: values of the lj_atr, lj_rep, fa_solv, and fa_elec potentials.
see: https://graylab.jhu.edu/PyRosetta.documentation/pyrosetta.toolbox.atom_pair_energy.html?highlight=etable_atom_pair_energies#pyrosetta.toolbox.atom_pair_energy.etable_atom_pair_energies
Thank you so much for reply, that really helped. I guess I was really confused on which argument I should put in. Thank you again.