Menu

flexible sidechains code flaw

2021-12-29
2023-03-08
  • Visvaldas Kairys

    Merry Christmas!

    I've noticed some possible flaw of flex sidechain code (probably originating in the original Vina code, which I admittedly haven't tested for this). If I do flexible docking using Smina, then afterwards rebuild the receptor with modified flex'ed sidechains, and do a simple rescoring (I used vinardo), the rescored scores deviate quite significantly and seemingly randomly (by up to ±2 kcal/mol) from the original flexible docking scores. I wonder if this could be one of the reasons for the noisiness of the flexible docking scoring that you've mentioned if your Gnina presentation and paper. As for now, it seems I have to do lots of minima when doing flexible docking, and rescore them.

    Best regards,

    Vis

     
  • David Koes

    David Koes - 2022-01-03

    In order for the rescoring to have the same scores you need to continue to specify the same residues as flexible. This is because the intramolecular interactions of the flexible sidechains are included in the original score. If you have an example where this is not the case, please provide it.

     
  • Visvaldas Kairys

    I understand and agree with your evaluation of the what's happening. However, I find the mismatch between the flexible and rigid receptor scores (and therefore pose rankings) troubling. I guess from now on I will be freezing the flex sidechains from the minima and re-running the "reconstituted" rigid dockings...

     
  • David Koes

    David Koes - 2022-01-07

    But there isn't a mismatch if you set the same residues to be flexible. It would be troubling if a system with more interacting atoms in it didn't have a different score.

     
  • Visvaldas Kairys

    Well, in the rigid docking the flex residues are obviously different from flexible docking (zero flex residues vs one), so I the mismatch between scores is understandable. I guess the whole thread could be deleted :) But I will do the "refrozen" sidechain docking anyway because that particular sidechain rotamer im interested in for some ligands in the series somehow is not accessible because it (or rather ligand poses that are modulated by that sidechain rotamer) is higher in energy. That's why the mismatch between "flex" and "reconstituted rigid" sidechain score came up for me. When I do "reconstituted rigid sidechain" docking those lost ligand poses of course show up easily. Thank you for you time and valuable input!

     
  • Visvaldas Kairys

    Something's still bothering me. Intra-ligand energies are calculated using different rules than P-L (protein-ligand) interactions (e.g. the term weights seems to be gone, etc.), and I am afraid intra-L energy quality is worse than P-L just because P-L terms are so carefully weighted and so much research has been input into it. I am not sure if I make myself clear or if I am correct. (And flex sidechain interaction with small molecule is intra-ligand from the viewpoint of the program if I understand it correctly).

     
  • Vadim Shiryaev

    Vadim Shiryaev - 2022-10-29

    I've tried flexible docking with vina and smina and it seems, that smina does not take into account flexible residues when applying scoring function to the system, as the computed affinity tends to zero when more and more aminoacid residues are considered as flexible. Therefore in order to use flexible docking you should either use Vina, or debug tho source of smina to compile the working version.

     
  • David Koes

    David Koes - 2022-10-29

    Can you provide examples with data files? You should expect the predicted energy to go down (more negative) with increased flexibility it should be possible to sample lower energy conformations.

    dkoes@jedi:~/git/gnina/test/gnina$ smina  -r data/10gs_rec.pdb -l data/10gs_lig.sdf           --flexdist 3 --flexdist_ligand data/10gs_lig.sdf  --autobox_ligand data/10gs_lig.sdf  
       _______  _______ _________ _        _______ 
      (  ____ \(       )\__   __/( (    /|(  ___  )
      | (    \/| () () |   ) (   |  \  ( || (   ) |
      | (_____ | || || |   | |   |   \ | || (___) |
      (_____  )| |(_)| |   | |   | (\ \) ||  ___  |
            ) || |   | |   | |   | | \   || (   ) |
      /\____) || )   ( |___) (___| )  \  || )   ( |
      \_______)|/     \|\_______/|/    )_)|/     \|
    
    
    smina is based off AutoDock Vina. Please cite appropriately.
    
    Weights      Terms
    -0.035579    gauss(o=0,_w=0.5,_c=8)
    -0.005156    gauss(o=3,_w=2,_c=8)
    0.840245     repulsion(o=0,_c=8)
    -0.035069    hydrophobic(g=0.5,_b=1.5,_c=8)
    -0.587439    non_dir_h_bond(g=-0.7,_b=0,_c=8)
    1.923        num_tors_div
    
    Flexible residues: A:52 A:64 A:65 B:98
    Using random seed: 445781320
    
    0%   10   20   30   40   50   60   70   80   90   100%
    |----|----|----|----|----|----|----|----|----|----|
    ***************************************************
    
    mode |   affinity | dist from best mode
         | (kcal/mol) | rmsd l.b.| rmsd u.b.
    -----+------------+----------+----------
    1       -9.6       0.000      0.000    
    2       -9.6       2.011      2.931    
    3       -9.6       1.860      2.835    
    4       -9.5       1.405      1.684    
    5       -9.2       3.268      5.420    
    6       -9.1       2.945      5.381    
    7       -9.1       2.589      3.171    
    8       -9.0       2.362      4.500    
    9       -9.0       1.827      3.139    
    Refine time 53.903
    Loop time 54.409
    dkoes@jedi:~/git/gnina/test/gnina$ smina  -r data/10gs_rec.pdb -l data/10gs_lig.sdf           --flexdist 1 --flexdist_ligand data/10gs_lig.sdf  --autobox_ligand data/10gs_lig.sdf  
       _______  _______ _________ _        _______ 
      (  ____ \(       )\__   __/( (    /|(  ___  )
      | (    \/| () () |   ) (   |  \  ( || (   ) |
      | (_____ | || || |   | |   |   \ | || (___) |
      (_____  )| |(_)| |   | |   | (\ \) ||  ___  |
            ) || |   | |   | |   | | \   || (   ) |
      /\____) || )   ( |___) (___| )  \  || )   ( |
      \_______)|/     \|\_______/|/    )_)|/     \|
    
    
    smina is based off AutoDock Vina. Please cite appropriately.
    
    Weights      Terms
    -0.035579    gauss(o=0,_w=0.5,_c=8)
    -0.005156    gauss(o=3,_w=2,_c=8)
    0.840245     repulsion(o=0,_c=8)
    -0.035069    hydrophobic(g=0.5,_b=1.5,_c=8)
    -0.587439    non_dir_h_bond(g=-0.7,_b=0,_c=8)
    1.923        num_tors_div
    
    Using random seed: 158167836
    
    0%   10   20   30   40   50   60   70   80   90   100%
    |----|----|----|----|----|----|----|----|----|----|
    ***************************************************
    
    mode |   affinity | dist from best mode
         | (kcal/mol) | rmsd l.b.| rmsd u.b.
    -----+------------+----------+----------
    1       -7.8       0.000      0.000    
    2       -7.8       2.074      3.078    
    3       -7.8       2.306      3.399    
    4       -7.7       1.638      2.072    
    5       -7.7       4.283      7.736    
    6       -7.6       3.664      5.214    
    7       -7.6       2.623      5.054    
    8       -7.6       3.932      6.261    
    9       -7.4       2.237      3.034    
    Refine time 17.640
    Loop time 18.166
    
     
  • Vadim Shiryaev

    Vadim Shiryaev - 2022-10-31

    The problem is that the energy goes up and becomes more positive. I've tried gnina in the same conditions and the energy became more negative as it should.

    Rigid docking
    _ _ _ _ _______
    ( ____ ( )_ __/( ( /|(
    )
    | ( \/| () () | ) ( | \ ( || ( ) |
    | (_ | || || | | | | \ | || () |
    (_____ )| |(
    )| | | | | (\ ) || |
    ) || | | | | | | | \ || ( ) |
    /_
    ) || ) ( |) (| ) \ || ) ( |
    ___)|/ |_____/|/ )_)|/ |

    smina is based off AutoDock Vina. Please cite appropriately.

    Weights Terms
    -0.035579 gauss(o=0,_w=0.5,_c=8)
    -0.005156 gauss(o=3,_w=2,_c=8)
    0.840245 repulsion(o=0,_c=8)
    -0.035069 hydrophobic(g=0.5,_b=1.5,_c=8)
    -0.587439 non_dir_h_bond(g=-0.7,_b=0,_c=8)
    1.923 num_tors_div

    Using random seed: -305716360

    mode | affinity | dist from best mode
    | (kcal/mol) | rmsd l.b.| rmsd u.b.
    -----+------------+----------+----------
    1 -8.4 0.000 0.000
    2 -8.3 2.831 4.121
    3 -8.3 2.391 4.321
    4 -8.3 1.257 2.837
    5 -8.3 1.312 2.017
    6 -8.2 2.948 5.756
    7 -8.2 2.376 5.480
    8 -8.2 2.389 5.434
    9 -8.2 2.166 3.611
    10 -8.2 2.351 5.309

    Flexible docking with smina
    _ _ _ _ _______
    ( ____ ( )_ __/( ( /|(
    )
    | ( \/| () () | ) ( | \ ( || ( ) |
    | (_ | || || | | | | \ | || () |
    (_____ )| |(
    )| | | | | (\ ) || |
    ) || | | | | | | | \ || ( ) |
    /_
    ) || ) ( |) (| ) \ || ) ( |
    ___)|/ |_____/|/ )_)|/ |

    smina is based off AutoDock Vina. Please cite appropriately.

    Weights Terms
    -0.035579 gauss(o=0,_w=0.5,_c=8)
    -0.005156 gauss(o=3,_w=2,_c=8)
    0.840245 repulsion(o=0,_c=8)
    -0.035069 hydrophobic(g=0.5,_b=1.5,_c=8)
    -0.587439 non_dir_h_bond(g=-0.7,_b=0,_c=8)
    1.923 num_tors_div

    Flexible residues: A:31 A:37 B:31 B:37 C:31 C:37 D:31 D:37
    Using random seed: 2139714014

    mode | affinity | dist from best mode
    | (kcal/mol) | rmsd l.b.| rmsd u.b.
    -----+------------+----------+----------
    1 -5.0 0.000 0.000
    2 -4.9 1.631 3.598
    3 -4.8 1.641 3.619
    4 -4.8 1.963 3.232
    5 -4.8 1.599 2.784
    6 -4.7 1.607 2.921
    7 -4.7 2.752 5.006
    8 -3.8 2.611 4.072
    9 -3.3 1.956 2.916

    Flexible docking with gnina
    ()
    __ _
    _ _
    / | '_ \| | '_ \ / _ |
    | (
    | | | | | | | | | (| |
    _
    , || |||| ||_,_|
    __/ |
    |
    /

    gnina v1.0 HEAD:6381355 Built Mar 6 2021.
    gnina is based on smina and AutoDock Vina.
    Please cite appropriately.

    Commandline: ./gnina -r /mnt/d/smina/protein.pdbqt --config /mnt/d/smina/conf.txt -l /mnt/d/smina/ligand.pdbqt -o /mnt/d/smina/lig_out_gnina.pdbqt --log /mnt/d/smina/log_gnina.txt --out_flex /mnt/d/smina/flex_out_gnina.pdbqt --cnn_scoring none
    Flexible residues: A:31 A:37 B:31 B:37 C:31 C:37 D:31 D:37
    Using random seed: 575989108

    mode | affinity | CNN | CNN
    | (kcal/mol) | pose score | affinity
    -----+------------+------------+----------
    1 -8.98 -1.0000 0.000
    2 -8.95 -1.0000 0.000
    3 -8.91 -1.0000 0.000
    4 -8.86 -1.0000 0.000
    5 -8.81 -1.0000 0.000
    6 -8.76 -1.0000 0.000
    7 -8.73 -1.0000 0.000
    8 -8.72 -1.0000 0.000
    9 -8.67 -1.0000 0.000
    10 -8.66 -1.0000 0.000

     
  • Vadim Shiryaev

    Vadim Shiryaev - 2022-10-31

    The protein was 6NV1

     
  • David Koes

    David Koes - 2022-10-31

    You're going to have to provide an actual reproducible test case for me to look into this further, as I get reasonable results with 6nv1. Have you looked at the output files to see what is going on?

    grep ^ATOM 6nv1.pdb > rec.pdb
    grep "E01 A" 6nv1.pdb  > lig.pdb
    smina -r rec.pdb -l lig.pdb   --autobox_ligand=lig.pdb --autobox_add 8 --seed 0 -o rdocked.sdf
       _______  _______ _________ _        _______ 
      (  ____ \(       )\__   __/( (    /|(  ___  )
      | (    \/| () () |   ) (   |  \  ( || (   ) |
      | (_____ | || || |   | |   |   \ | || (___) |
      (_____  )| |(_)| |   | |   | (\ \) ||  ___  |
            ) || |   | |   | |   | | \   || (   ) |
      /\____) || )   ( |___) (___| )  \  || )   ( |
      \_______)|/     \|\_______/|/    )_)|/     \|
    
    
    smina is based off AutoDock Vina. Please cite appropriately.
    
    Weights      Terms
    -0.035579    gauss(o=0,_w=0.5,_c=8)
    -0.005156    gauss(o=3,_w=2,_c=8)
    0.840245     repulsion(o=0,_c=8)
    -0.035069    hydrophobic(g=0.5,_b=1.5,_c=8)
    -0.587439    non_dir_h_bond(g=-0.7,_b=0,_c=8)
    1.923        num_tors_div
    
    Using random seed: 0
    
    0%   10   20   30   40   50   60   70   80   90   100%
    |----|----|----|----|----|----|----|----|----|----|
    ***************************************************
    
    mode |   affinity | dist from best mode
         | (kcal/mol) | rmsd l.b.| rmsd u.b.
    -----+------------+----------+----------
    1       -8.7       0.000      0.000    
    2       -8.6       0.972      2.618    
    3       -8.6       1.160      2.256    
    4       -8.5       2.341      4.681    
    5       -8.4       1.153      1.789    
    6       -8.4       2.309      4.704    
    7       -8.3       2.305      4.796    
    8       -8.3       3.149      5.233    
    9       -8.2       3.160      5.122    
    Refine time 0.719
    Loop time 1.133
    
    smina -r rec.pdb -l lig.pdb --flexres="A:31,A:37,B:31,B:37,C:31,C:37,D:31,D:37"  --autobox_ligand=lig.pdb --autobox_add 8 --seed 0 -o flexdocked.sdf --out_flex flexres.pdb
       _______  _______ _________ _        _______ 
      (  ____ \(       )\__   __/( (    /|(  ___  )
      | (    \/| () () |   ) (   |  \  ( || (   ) |
      | (_____ | || || |   | |   |   \ | || (___) |
      (_____  )| |(_)| |   | |   | (\ \) ||  ___  |
            ) || |   | |   | |   | | \   || (   ) |
      /\____) || )   ( |___) (___| )  \  || )   ( |
      \_______)|/     \|\_______/|/    )_)|/     \|
    
    
    smina is based off AutoDock Vina. Please cite appropriately.
    
    Weights      Terms
    -0.035579    gauss(o=0,_w=0.5,_c=8)
    -0.005156    gauss(o=3,_w=2,_c=8)
    0.840245     repulsion(o=0,_c=8)
    -0.035069    hydrophobic(g=0.5,_b=1.5,_c=8)
    -0.587439    non_dir_h_bond(g=-0.7,_b=0,_c=8)
    1.923        num_tors_div
    
    Flexible residues: A:31 A:37 B:31 B:37 C:31 C:37 D:31 D:37
    Using random seed: 0
    
    0%   10   20   30   40   50   60   70   80   90   100%
    |----|----|----|----|----|----|----|----|----|----|
    ***************************************************
    
    mode |   affinity | dist from best mode
         | (kcal/mol) | rmsd l.b.| rmsd u.b.
    -----+------------+----------+----------
    1       -8.2       0.000      0.000    
    2       -8.0       1.558      2.796    
    3       -8.0       0.988      1.555    
    4       -7.4       1.852      3.233    
    5       -7.2       1.354      2.041    
    6       -6.9       1.582      2.564    
    7       -6.8       1.925      3.194    
    8       -6.7       1.588      2.574    
    9       -6.6       1.728      2.516    
    Refine time 41.476
    Loop time 41.979
    
     
  • Vadim Shiryaev

    Vadim Shiryaev - 2022-10-31

    I have redocked the starting models from pdb files and recieved the good results, consisting with the theory and flexible docking was better then rigid. I dont know where to look for, probably usage of pdbqt, made by AutoDockTools, brings some bugs into the computational scheme, implemented in smina.

     

    Last edit: Vadim Shiryaev 2022-11-01
  • Jed Goldstone

    Jed Goldstone - 2023-03-08

    I think this issue is original to Vina. I noticed that Vina scores differed when identical side chain positions were either flexible or fixed. I had an email exchange with either Oleg Trott about this, but I was never satisfied by the explanation. Whether or not a chain is defined as flexible should not logically affect the binding energy - it's artificial that any side chain is fixed in any case. I think it's an artifact of dividing by the degrees of system freedom, encoded in the original software (I don't recall if it's also the case in AutoDock). I've avoided comparing flexres scores with fixed protein scores for that reason.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.