donaldlab / OSPREY3

Open Source Protein REdesign for You v3
GNU General Public License v2.0
47 stars 15 forks source link

Unexpected Results with kstar.py #189

Open amin-sagar opened 1 year ago

amin-sagar commented 1 year ago

Dear Osprey developers and users, I am trying my first calculations with Osprey and I am having some problems. I thought of doing a simple experiment. I took a structure of a protein-peptide complex where the tyrosine at position 10 in the peptide makes 2 hydrogen bonds with the protein and mutated it to Alanine. Then I used the kstar.py script that is the part of osprey 3.2.304 release and wanted to see if I can recover Tyrosine at this position. The only change I made to the script is in the following section

for res in ['A10']:
    protein.flexibility[res].setLibraryRotamers(osprey.WILD_TYPE, 'VAL','TYR','TRP','GLY').addWildTypeRotamers().setContinuous()

and

# configure K*
kstar = osprey.KStar(
    proteinConfSpace,
    ligandConfSpace,
    complexConfSpace,
    epsilon=0.1, # lowered to 0.1
    writeSequencesToConsole=True,
    writeSequencesToFile='kstar.results.tsv'

The output is as follows

Seq ID  Sequence    K* Lower Bound  K* Upper Bound  K* Lower (log10)    K* Upper (log10)    Total # Confs.  Complex Pfunc Lower Complex Pfunc Upper Complex Free Energy Lower   Complex Free Energy Upper   Complex Epsilon Complex # Confs.    Protein Pfunc Lower Protein Pfunc Upper Protein Free Energy Lower   Protein Free Energy Upper   Protein Epsilon Protein # Confs.    Ligand Pfund Lower  Ligand Pfund Upper  Ligand Free Energy Lower    Ligand Free Energy Upper    Ligand Epsilon  Ligand # Confs. Time (sec)
0   A10=ala 19873270    20062400    7.29826940334862    7.30238279496535    21  1.053005E+050   1.058498E+050   -68.3111386962339   -68.3080535054792   0.00518873424026019 10  87.96891    87.96891    -2.65507579520591   -2.65507579520591   0   2   5.997605E+040   6.023265E+040   -55.686837097797    -55.6843052529257   0.0042600917046854  9   18
1   A10=VAL 5.030577E-90    5.05604E-90 -89.2983821690412   -89.2961895289745   21  3.809074E-47    3.812045E-47    63.3871786491476    63.3876409605632    0.000779244813620255    9   125.71  125.71  -2.86679102592102   -2.86679102592102   0   3   5.997605E+040   6.023265E+040   -55.686837097797    -55.6843052529257   0.0042600917046854  9   22
2   A10=TYR 3.32008 3.679395    0.521148520882051   0.565776403017213   413 1.583778E+044   1.747705E+044   -60.4152346301624   -60.3568249388948   0.0937955212204782  396 791.9794    791.9794    -3.95833427611541   -3.95833427611541   0   8   5.997605E+040   6.023265E+040   -55.686837097797    -55.6843052529257   0.0042600917046854  9   153
3   A10=TRP 2279.949    2408.665    3.35792504673286    3.38177632960835    55  3.244213E+047   3.412766E+047   -64.9087608488039   -64.8787226108531   0.049389069792382   39  2362.394    2362.394    -4.60647610537634   -4.60647610537634   0   7   5.997605E+040   6.023265E+040   -55.686837097797    -55.6843052529257   0.0042600917046854  9   166
4   A10=GLY 1338317 1344700 6.12655884527996    6.12862537584528    19  2.927157E+048   2.928589E+048   -66.1835711936372   -66.1832810908582   0.000489051100186772    9   36.31242    36.31242    -2.13033093964937   -2.13033093964937   0   1   5.997605E+040   6.023265E+040   -55.686837097797    -55.6843052529257   0.0042600917046854  9   170

I have tried both with all the protein residues fixed and continuous flexibility for four residues of the protein (defined as the ligand). I have two problems. 1) In neither case, I get the best K* score for Tyrosine. 2) The output PDBs for all but the last mutation are empty, irrespective of the score. They all look like this.

EMARK   3
REMARK   3 Generated by OSPREY 3.2.304
REMARK   3
REMARK   3 COMMENT : Top 10 conformations for sequence A10=VAL
REMARK   3
END

I have attached the results and the python script as well(as a text file). I would be really grateful for any suggestions about what modifications can be done to recover the expected residue at this position and solve the problem with only the last tried mutation being saved as pdb. Best, Amin.

kstar_results.ods kstar_txt.txt

amin-sagar commented 1 year ago

Update. I installed the new 4.0.2 version. I tried using the exact script on the original structure which has Tyrosine at position 10. Now, Tyr has a better score than Alanine.

sequence: A10=tyr
    K* score: 18.710770 in [18.710287,18.718765] (log10)
Residues           A9    A10   A11   A12   B143  B146  B212  B213 complex Sequence   tyr  
Ensemble of 0 conformations:

result:
    sequence: A10=ALA
    K* score: 13.386076 in [13.386059,13.387858] (log10)
Residues           A9    A10   A11   A12   B143  B146  B212  B213 complex Sequence   ALA  
Ensemble of 0 conformations:

However, If I first mutate to Alanine, I get the following result.

sequence: A10=ala
    K* score: 13.321488 in [13.321471,13.326351] (log10)
Residues           A9    A10   A11   A12   B143  B146  B212  B213 complex Sequence   ala  
Ensemble of 0 conformations:

result:
    sequence: A10=TYR
    K* score: 6.536769  in [6.536392 , 6.580573] (log10)
Residues           A9    A10   A11   A12   B143  B146  B212  B213 complex Sequence   TYR  
Ensemble of 0 conformations:

This seems to suggest that the scoring function does recognize Tyr to be better. But the sampling doesn't find the right best scoring conformation.
I would be really grateful for any advice regarding this issue. Best, Amin.

gusennan commented 1 year ago

Hi @amin-sagar,

thanks for the question and including your script. Could you please attach your structure?

To your question:

I would be really grateful for any suggestions about what modifications can be done to recover the expected residue at this position and solve the problem with only the last tried mutation being saved as pdb.

Failure to save the low-energy ensemble is an issue we are working on, see https://github.com/donaldlab/OSPREY3/issues/188

aminsagar commented 1 year ago

Hi @gusennan Thanks for your response. Unfortunately, I can't share the structure I am currently working on as it belongs to someone else. However, I will try my best to reproduce the issue on another structure that I can share. If there is something you would like me to check with the structure I am currently working on, I can do that and report the results. Best, Amin.

amin-sagar commented 1 year ago

I tried to reproduce the error with another structure but I couldn't. Osprey was able to find the critical residue. I also confirmed by looking at the structure saved by Osprey that the critical interactions are formed. I had to make sure that this was the last mutation in the list in order to do that. So, I did a more extensive minimization and equilibration of my first structure, where I had seen the error. Now, Osprey is able to find the correct residue. Therefore, I think the problem was some clashes in my structure which were not resolved by minimization. The only problem now is saving the structures of the tried mutations, but I think this issue can be closed.