Skip to content

ESMFold2: a ligand given as several CCD codes is returned as one residue #419

Open

Description

@daylight-00

A ligand given as several CCD codes comes back from fold() as one residue named after its first component, holding the atoms of all of them:

LigandInput(id="B", ccd=["NAG", "BMA"])
# complex.sequence: [..., "NAG"]           # both components' atoms under one name
# expected:         [..., "NAG", "BMA"]

The tokenizer already keeps each component's residue_index; build_molecular_complex_from_features in esm/models/esmfold2/output.py collapsed every non-polymer chain into one residue. A side effect is that to_mmcif() keys entities on residue names, so ["NAG", "NAG"] and ["NAG", "BMA"] are written as the same entity.

PR #416 groups non-polymer tokens by residue_index, the way atom-tokenized polymer residues such as MSE already are. SMILES ligands, single-CCD ligands and polymers come back as before. Happy to change it if you would handle this differently.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions