Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

asap-docking Update POSITDockingResults object to write multi-pose results to docking_results.json #988

Open
apayne97 opened this issue Apr 17, 2024 · 0 comments · May be fixed by #1009
Open
Labels
bug Something isn't working docking Related to docking parts of the package

Comments

@apayne97
Copy link
Contributor

apayne97 commented Apr 17, 2024

In docking.openeye.POSITDocker._dock() we have logic that looks like:

for result in pose_res.GetSinglePoseResults():
          posed_mol = result.GetPose()

          posed_ligand = Ligand.from_oemol(posed_mol, **set.ligand.dict())

          docking_result = POSITDockingResults(
              input_pair=input_pair,
              posed_ligand=posed_ligand,
              probability=prob,
              provenance=self.provenance(),
          )

          docking_results.append(docking_result)
          if output_dir is not None:
              docking_result.write_docking_files(output_dir)

The result of this is that the different poses overwrite each other in output_dir when they are written in this line. This is clearly a bug that needs to be fixed.

Confusingly (from a user perspective), since all the docking_results are returned as a list to this line of code, they get successfully written to a multi-pose sdf file in workflows.docking_workflows.cross_docking:

    if inputs.write_final_sdf:
        logger.info("Writing final docked poses to SDF file")
        write_ligands_to_multi_sdf(
            output_dir / "docking_results.sdf", [r.posed_ligand for r in results]
        )

this is ok unless this part fails, as in #989

@apayne97 apayne97 added bug Something isn't working docking Related to docking parts of the package labels Apr 17, 2024
@apayne97 apayne97 linked a pull request Apr 24, 2024 that will close this issue
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working docking Related to docking parts of the package
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant