Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Providing cyclic peptides for Chai-1 #149

Open
ZhuNing9527 opened this issue Nov 13, 2024 · 5 comments
Open

Providing cyclic peptides for Chai-1 #149

ZhuNing9527 opened this issue Nov 13, 2024 · 5 comments
Labels
question Further information is requested

Comments

@ZhuNing9527
Copy link

How to predict the structure of cyclic peptides (amide bonds forming a ring)

@aozalevsky
Copy link

You can submit it as a ligand using SMILES.

P.S. Not a ChaiDiscovery employee; was just passing by.

@ZhuNing9527
Copy link
Author

ZhuNing9527 commented Nov 13, 2024

You can submit it as a ligand using SMILES.您可以使用 SMILES 将其作为配体提交。

P.S. Not a ChaiDiscovery employee; was just passing by.PS 不是 ChaiDiscovery 员工;只是路过。

Thank you. But my macrocyclic peptide has a secondary structure like α-helix. If smiles is used as input, the output may not be able to interpret this information.

@arogozhnikov arogozhnikov changed the title peptides Prividing cyclic peptides for Chai-1 Nov 14, 2024
@arogozhnikov arogozhnikov added the question Further information is requested label Nov 14, 2024
@arogozhnikov
Copy link
Contributor

@ZhuNing9527
Idea for you to try: add a max distance restraint between first and last residue of peptide

@jackdent jackdent changed the title Prividing cyclic peptides for Chai-1 Providing cyclic peptides for Chai-1 Nov 20, 2024
@ZhuNing9527
Copy link
Author

ZhuNing9527 commented Dec 3, 2024

@ZhuNing9527 Idea for you to try: add a max distance restraint between first and last residue of peptide

Thank you for your suggestion. I am trying it. In addition to this, I wonder if I can modify the relative position encoding method to achieve

@arogozhnikov
Copy link
Contributor

arogozhnikov commented Dec 9, 2024

@ZhuNing9527

I wonder if I can modify the relative position encoding method to achieve

Yup, you need to modify this place:

def _generate(
self,
token_index: Int[Tensor, "b n"],
token_residue_index: Int[Tensor, "b n"],
token_asym_id: Int[Tensor, "b n"],
) -> Tensor:
rel_sep, rel_residue, rel_chain = map(
lambda x: rearrange(x, "b n -> b n 1") - rearrange(x, "b n -> b 1 n"),
(token_index, token_residue_index, token_asym_id),
)
mask = (rel_residue == 0) & (rel_chain == 0)
rel_sep = torch.clamp(rel_sep + self.r_max, 0, 2 * self.r_max + 1)
# zero inter-residue and inter-chain
rel_sep = rel_sep.masked_fill(~mask, 2 * self.r_max + 2)
return self.make_feature(rel_sep.unsqueeze(-1))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants