feat: add cyclic peptide support to relative position encoding - #281
Conversation
|
@ioannisa92 this is terrific, please let us know if you want to polish this up a bit (it's in draft probably for a reason) or do you want us to jump on this? |
jnwei
left a comment
There was a problem hiding this comment.
This is great work @ioannisa92 !
I verified that I can run the provided multimer_cyclic example using the OpenFold3 preview 2 weights.
I have a few nits regarding code style / test example organization. But overall this is really good.
@ioannisa92 good stuff, you should just tag me and Jennifer for now – we can pull more folks if needed
Ha, there could be any number of explanations :D |
|
Ah, sorry – I tagged myself in for review, I need a bit of time to go through this. By the end of the week, so today tomorrow. |
|
Okay, immediate comment is we need to make linting and tests pass (easy) and i want to see thumbs up from @jnwei (so just re-request review from her) |
jnwei
left a comment
There was a problem hiding this comment.
Overall this looks good!
Just one last thing from me - It looks like the linter is catching some errors. Could you use the dev environment and do a ruff check on the codebase? The contributor's guide has some quick instructions for how to install and use ruff
|
@jandom I ran ruff and all checks pass |
|
@ioannisa92 thanks – i've kicked off tests to see if everything passes |
|
@ioannisa92 I think we've got some test failures, if you have a moment to fix those and then I think this is good to go |
|
@jandom i had to redo the test data under |
|
@jandom The tests that still fail |
|
@ioannisa92 brilliant stuff, will re-run now |
|
@ioannisa92 one last thing we can't merge ATM because of conflicts, we also can't resolve the conflicts ourselves (because we can't push to your forked repo). Would you have a moment to look into it? |
|
A bunch of test failures All these will go away once you update this branch @ioannisa92 (ie merge main into it) |
|
@jandom ok merged and tests now pass |
|
This is awesome thank you so much. I think we’re ready to go, will give it
a final look tomorrow
Many thanks, great contribution!!
…On Tue, Jul 7, 2026 at 20:03 Ioannis Anastopoulos ***@***.***> wrote:
*ioannisa92* left a comment (aqlaboratory/openfold-3#281)
<#281 (comment)>
@jandom <https://github.com/jandom> ok merged and tests now pass
—
Reply to this email directly, view it on GitHub
<#281?email_source=notifications&email_token=AADAVG7H4QIRXCYNRDAJHG35DU3NZA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTIOJQGY4TONBQGI32M4TFMFZW63VHNVSW45DJN5XKKZLWMVXHJLDGN5XXIZLSL5RWY2LDNM#issuecomment-4906974027>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADAVGZBB4EXH44MPKD5G335DU3NZAVCNFSNUABGKJSXA33TNF2G64TZHMYTAOBQGQ2DQMBSGI5US43TOVSTWNBXGU2DCNBUGY4DHILWAI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
|
I'm getting errors running training after the merge, will revert and then we can fix and merge again |
Summary
cyclic: bool = Falsefield to theChaininference query model so individual chains can be flagged as cyclic peptidesis_cyclicannotation on atom arrays →cyclic_maskboolean tensor in the feature dictcyclic_offset()inrelpos.pyto compute a topologically-aware pairwise offset matrix for cyclic chains (wraps distances past the midpoint back toward zero)relpos_complex(): for any chain wherecyclic_maskis set, the standard linear offset is replaced with the cyclic offset for intra-chain pairsquery_multimer_cyclic.json) with MDM2 + a cyclic peptide binder (chain B)