plinder.core.structure.inputs#
Structure input files for search and evaluation workflows.
- plinder.core.structure.inputs.find_structure_files(path: Path) list[Path][source]#
List PDB/mmCIF files in a folder, or select a single coordinate file.
- class plinder.core.structure.inputs.StructureInput(coordinates: str | Path, ligand_sdfs: Sequence[str | Path] | None = None, reference_id: str | None = None)[source]#
Bases:
objectA complete structure, or a receptor with separate ligand poses.
coordinatesis a PDB or mmCIF file, optionally gzip-compressed.ligand_sdfs=Noneidentifies a complete structure. A supplied sequence identifies separate ligand poses, one molecule per SDF, in the receptor’s coordinate frame. An empty sequence represents zero predicted ligand poses.Examples
StructureInput("complex.cif")StructureInput("receptor.pdb", ligand_sdfs=["pose.sdf"])- coordinates: str | Path#
- ligand_sdfs: Sequence[str | Path] | None = None#
- reference_id: str | None = None#
- classmethod from_path(coordinates: str | Path) StructureInput#
Pair coordinates with
model.sdformodel.ligands/*.sdf.With no matching SDF or ligand folder, use the complete-structure form. Matching uses the coordinate basename, including for compressed files.
- plinder.core.structure.inputs.read_structure_table(source: str | Path | DataFrame, *, require_reference: bool = False) dict[str, StructureInput][source]#
Read CSV/TSV/Parquet inputs, grouped by
input_id.Required columns are
input_idandstructure_path.ligand_pathholds one SDF or a folder of SDFs; repeat the input row for multiple ligands. Evaluation also requiresreference_id. Relative file paths are resolved from the table’s directory (the working directory for a DataFrame).
- plinder.core.structure.inputs.read_ligand_sdf(path: str | Path) Mol[source]#
Read one supplied pose, preserving its coordinates and bond information.
- plinder.core.structure.inputs.read_input_structure(path: str | Path) tuple[struc.AtomArray, pdbx.CIFBlock | None][source]#
Read the first coordinate model and its mmCIF metadata where available.
- plinder.core.structure.inputs.write_search_structure(structure: StructureInput, destination: Path, *, include_ligands: bool) Path[source]#
Write a search mmCIF with the supplied SDF chemistry and pose coordinates.
PDB receptors contribute amino-acid residues, including modified amino acids. Other PDB components are omitted; ligand poses can be supplied as SDFs.