RosettaCommons / RosettaCommons/RFdiffusion
HETATM Records Not Included in `parsed_pdb["pdb_idx"]`
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 3.1k
- Forks
- 644
- PR merge metrics
- No merged PRs in 30d
Description
I encountered an issue where HETATM records (e.g. ligands like IMP, NAD) are not being included in parsed_pdb["pdb_idx"], which causes residue lookups like ('A', 601) to fail during get_idx0().
My .pdb file definitely contains HETATM records, it's like:
...
ATOM 2888 CZ PHE A 514 192.186 187.688 131.489 1.00 29.38 C
ATOM 2889 OXT PHE A 514 189.765 192.642 131.230 1.00 29.38 O1-
TER
HETATM 2890 P IMP A 601 191.927 170.397 138.491 1.00 17.82 P
HETATM 2891 O1P IMP A 601 192.083 170.120 137.031 1.00 17.82 O
HETATM 2892 O2P IMP A 601 190.546 170.479 139.055 1.00 17.82 O1-
...
However, when I inspect parsed_pdb["pdb_idx"], it only contains the entries which are standard protein residues (ATOM lines). No entries beyond residue 514 (the last standard residue) are included.
Use Case
I'm working on a binder design task, where my input includes a contig map like:
contigmap.contigs = [A1-111/A231-423/A435-514/A601-602/0 45-65]
The segment A601-602 refers to two ligands (IMP and NAD) in chain A, which are important for defining the binding interface. However, these residues cannot be resolved in get_idx0() because they are missing from parsed_pdb["pdb_idx"].
It seems that the PDB parsing utility used internally filters only ATOM records and ignores HETATM entries, even when they share the same chain ID.
Could you please confirm whether HETATM lines are intentionally excluded from the parsed PDB file? If this exclusion is intentional, could you point me to the recommended way to include ligands like IMP or NAD in parsed_pdb["pdb_idx"]?
Alternatively, if the issue is due to a misunderstanding on my part — for example, if there is a correct way to handle HETATM entries via the contig map or input specification — I'd really appreciate any clarification or documentation reference.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Trace the PDB parsing utility that builds parsed_pdb["pdb_idx"] and the get_idx0() lookup using the HETATM example and contig map in the issue. Determine whether ligand residues are intentionally excluded or should be represented, then document the supported behavior or identify the parsing change needed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- bioinformatics
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100