Skip to content

infer_ori_from_hotspots has incorrect behavior when hotspots near origin #272

@jesse-weller-dyno

Description

@jesse-weller-dyno

Describe the bug

When using infer_ori_strategy="hotspots", the ORI token (binder center-of-mass target) is sometimes placed in a strange position (e.g., inside the target protein) instead of on its surface. This occurs because in input_parsing.py function build here, _build_inputs is called before calling _set_origin, which runs infer_ori_from_hotspots. At the time infer_ori_from_hotspots executes, the diffused binder atoms are already present in the atom_array with coordinates [0, 0, 0] (placed there by create_diffused_residues). If any hotspot atom is within 12 Å of the coordinate origin in the input PDB frame, those zero-coordinate diffused atoms fall inside the 12 Å cell list query, massively bias nearby_atoms_com toward the origin, and corrupt the outward direction vector.

To Reproduce

Use any target structure whose hotspot residues have sidechain atoms within 12 Å of [0, 0, 0] in the PDB coordinate frame. This is common for structures deposited near the crystallographic origin.

Minimal dummy structure triggering the bug: place hotspot residue CA within 12 Å of origin, with enough binder diffused residues initialized at [0, 0, 0] to dominate nearby_atoms_com

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions