Skip to content

Commit

Permalink
Support DockGen in mmCIF to PDB and apo-to-holo alignment scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
amorehead committed Aug 13, 2024
1 parent ed3cdf2 commit d3e6231
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
8 changes: 7 additions & 1 deletion posebench/data/components/convert_mmcif_to_pdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,13 @@ def main(cfg: DictConfig):
if cfg.lowercase_id:
# Support the DockGen dataset's hybrid lowercase-uppercase pdb id-CCD ID format
new_id_parts = new_id.split("_")
new_id = "_".join([part.lower() for part in new_id_parts[:2]] + new_id_parts[2:])
new_id = (
"_".join([part.lower() for part in new_id_parts[:2]])
+ "_"
+ "-".join([part.upper() for part in new_id_parts[2:-1]])
+ "_"
+ new_id_parts[-1]
)
else:
new_id = new_id.upper()
mmcif_filepath = os.path.join(
Expand Down
4 changes: 3 additions & 1 deletion posebench/data/components/protein_apo_to_holo_alignment.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,9 @@ def read_mols(
ligs.append(lig)
else:
for file in os.listdir(os.path.join(dataset_dir, name)):
if file.endswith("_ligand.sdf") and "rdkit" not in file:
if (
file.endswith("_ligand.sdf") or file.endswith("_ligand.pdb")
) and "rdkit" not in file:
lig = read_molecule(
os.path.join(dataset_dir, name, file), remove_hs=remove_hs, sanitize=True
)
Expand Down

0 comments on commit d3e6231

Please sign in to comment.