Ligand Docking Simulator ======================== The Ligand Docking Simulator is used through :py:class:`LigandDockerProject `, created with ``molcube.create_ligand_docker_project()``. Create Ligand Docker project ---------------------------- Let’s walk through how to create a Ligand Docker project. You will need a completed PDB Reader project containing at least one standalone ligand. First, create the project and select which docking modules to enable: :: project = molcube.create_ligand_docker_project() project.create_project( title="my_docking", pdbreader_project_id="your-pdb-reader-project-id", modules=[LigandDockerModule.VINA, LigandDockerModule.SMINA], ) Submit a docking job -------------------- Once the project is created and binding-site detection completes, you can upload ligands and submit the docking job. Prepare a tar.gz archive of your ligand SDF files, then call :py:meth:`submit_docking() `: :: project.submit_docking( boxes=[{ "name": "site1", "size": [30, 30, 30], "center": [15.73, -26.79, 12.41], }], pose=10, ligand_tar_filepath="/path/to/ligands.tar.gz", ) The ``boxes`` parameter defines docking regions within the receptor. Each box entry must have a unique ``name``, a ``size`` (3 floats), and a ``center`` (3 floats). Blind docking ------------- The backend computes and stores a blind docking box during project creation for every module. Read it with :py:meth:`get_blind_box() ` and submit a whole-surface search with ``blind=True`` instead of custom boxes: :: blind_box = project.get_blind_box() # {"name", "center", "size"} or None project.submit_docking( boxes=None, pose=10, ligand_tar_filepath="/path/to/ligands.tar.gz", blind=True, ) ``submit_docking()`` still does not send a ``blindBox`` field: with ``blind=True`` the platform blind box is fetched and submitted as the docking box, which is what the GUI's "Blind docking" option does for every engine. ``boxes`` must be empty in that mode, and ``get_blind_box()`` returns ``None`` when the reference has no protein selection to compute the box from. Optional ``cofactor`` entries preserve non-standard residues at the binding site (e.g. ATP, heme). Pass a list of dicts with ``chain_index`` and ``residue_name`` keys: :: project.submit_docking( boxes=[...], pose=10, ligand_tar_filepath="/path/to/ligands.tar.gz", cofactor=[{"chain_index": "A", "residue_name": "ATP"}], ) Retrieve the reference PDB -------------------------- Use :py:meth:`download_reference_pdb() ` to return the reference receptor as a PDB string: :: reference_pdb = project.download_reference_pdb() print(reference_pdb[:80]) Retrieve docking results ------------------------ After docking completes, call :py:meth:`get_docker_result() ` to fetch per-module status and pose list: :: result = project.get_docker_result() for pose in result["poseList"]: print(pose["module"], pose["rank"], pose["score"], pose["path"]) You can download the full project archive with :py:meth:`download_project() `: :: project.download_project("my-docking-result.tar.gz")