HannesStark / EquiBind

EquiBind: geometric deep learning for fast predictions of the 3D structure in which a small molecule binds to a protein
MIT License
479 stars 109 forks source link

Duplicate of Issue #13 + The `model_type` parameter in .yml config files #17

Closed avnikonenko closed 2 years ago

avnikonenko commented 2 years ago

Dear authors, I just start working with your instrument, I installed cpu-version (conda env create -f environment_cpuonly.yml) and successfully run it. I used 5tgz psb structure as a target. And docked 1743 known inhibitors. Versions:

rdkit                     2021.09.5 `
openbabel                 3.1.1

I run it by this command:

 python docking/EquiBind/inference.py --config=docking/equibind_run/inference.yml

inference.yml:

run_dirs:
  - flexible_self_docking # the resulting coordinates will be saved here as tensors in a .pt file (but also as .sdf files if you specify an "output_directory" below)
inference_path: 'docking/equibind_run' # this should be your input file path as described in the main readme

test_names: timesplit_test
output_directory: 'docking/equibind_run/output' # the predicted ligands will be saved as .sdf file here
run_corrections: True
use_rdkit_coords: False # generates the coordinates of the ligand with rdkit instead of using the provided conformer. If you already have a 3D structure that you want to use as initial conformer, then lea$
save_trajectories: False

num_confs: 1 # usually this should be 1
seed: 120
device: cpu

Initial conformers were obtained by rdkit ( params = AllChem.ETKDGv3(); AllChem.EmbedMolecule(mol, params)). All missing hydrogens were added to the ligands (by rdkit) and to the protein structure (by chimera). As input I used sdf files of ligands and pdb file of protein (put each ligand and the protein to separate directories). Example of the input files: CHEMBL1088245_protein.pdb.txt CHEMBL1088245_ligand.sdf.txt

The problem is that resulted binding poses are incorrect, like ligand's atoms crosses protein's atoms.
lig_equibind_corrected.sdf.txt Maybe I didn't set some special parameters? Could you help me please? Thank you!

avnikonenko commented 2 years ago

Found solution #13

avnikonenko commented 2 years ago

I tried to use EquiBindS model. inference.yml:

run_dirs:
  - flexible_self_docking # the resulting coordinates will be saved here as tensors in a .pt file (but also as .sdf files if you specify an "output_directory" below)
inference_path: 'docking/equibind_run' # this should be your input file path as described in the main readme

test_names: timesplit_test
output_directory: 'docking/equibind_run/output' # the predicted ligands will be saved as .sdf file here
run_corrections: True
use_rdkit_coords: False # generates the coordinates of the ligand with rdkit instead of using the provided conformer. If you already have a 3D structure that you want to use as initial conformer, then lea$
save_trajectories: False

num_confs: 1 # usually this should be 1
seed: 120
device: cpu
model_type: EquiBindS

And it return me this error:

File EquiBind/train.py", line 119, in load_model
    model = globals()[args.model_type](device=device,
KeyError: 'EquiBindS'

I cannot use this model yet?

HannesStark commented 2 years ago

Hi!

The model_type parameter only specifies which python class to use as the trained model. (Only EquiBind is available there)

Running EquiBindS cannot be done by simply replacing this string with EquiBindS. Instead, you would need to run EquiBind itself and then use the SMINA software package on the predictions of EquiBind.

avnikonenko commented 2 years ago

Thank you for your answer! So using only your package I cannot do it. How should I run SMINA? Should it be normal docking procedure or --local_only, or --minimize mode?

HannesStark commented 2 years ago

Is the code in issue https://github.com/HannesStark/EquiBind/issues/15 sufficient?

avnikonenko commented 2 years ago

yes, Thank you!