Skip to content

Enables separate control of molecules separation and random rotations#1517

Merged
amjjbonvin merged 24 commits intomainfrom
randorien
Apr 16, 2026
Merged

Enables separate control of molecules separation and random rotations#1517
amjjbonvin merged 24 commits intomainfrom
randorien

Conversation

@amjjbonvin
Copy link
Copy Markdown
Member

@amjjbonvin amjjbonvin commented Apr 14, 2026

You are about to submit a new Pull Request. Before continuing make sure you read the contributing guidelines.

Checklist

  • Tests added for the new code
  • Documentation added for the code changes
  • Modifications / enhancements are reflected on the haddock3 user-manual
  • CHANGELOG.md is updated to incorporate new changes
  • Does not break licensing
  • Does not add any dependencies, if it does please add a thorough explanation

Summary of the Pull Request

Added separate parameters to rigidbody and flexref that control the separation of molecules (separate) and random rotations around their respective center of masses (randrot). These replace the old randorien parameter.

Default for both are true in rigidbody and false in flexref.

Also added a new example to illustrate it: docking-protein-ligand-centered

Related Issue

Closes #1491

@amjjbonvin amjjbonvin self-assigned this Apr 14, 2026
@amjjbonvin amjjbonvin added enhancement Improving something in the codebase m|flexref flexref module m|rigidbody rigidbody sampling examples community Feature requests / contribution / issues from users labels Apr 14, 2026
@amjjbonvin
Copy link
Copy Markdown
Member Author

Note that in terms of test, only the validity of the parameters in the new example config files are tested.

@amjjbonvin
Copy link
Copy Markdown
Member Author

amjjbonvin commented Apr 14, 2026 via email

Comment thread src/haddock/modules/sampling/rigidbody/defaults.yaml Outdated
@AnnaKravchenko
Copy link
Copy Markdown
Contributor

Not in flexref otherwise rigidbody would have no effect! Only in a scenario where the docking happens during the flexible refinement, i.e. without any rigidbody step

Yes, already relaized that I was looking in the wrong .md

Comment thread examples/docking-protein-ligand-centered/docking-protein-ligand-centered-test.cfg Outdated
Comment thread src/haddock/modules/refinement/flexref/defaults.yaml Outdated
VGPReys
VGPReys previously approved these changes Apr 14, 2026
@AnnaKravchenko
Copy link
Copy Markdown
Contributor

AnnaKravchenko commented Apr 14, 2026

I runned docking-protein-ligand-separated-test.cfg and docking-protein-ligand-centered-test.cfg to see the difference between the results. Then openned 5 rigid-body models for each run in pymol.

Based on what I see (screenshot attached) the separated vs centered models are backward? I.e. separated models look to me like a pure rotatinon around ligand’s COM, while centered ones are actually have been moved at least a little from the original position?

But when I look at the input files, the ligand is not overlapping with the receptor to begin with, meaning they are being brought together by airs. So I probably misunderstood some part of the process.

Screenshot 2026-04-14 at 17 33 54

@amjjbonvin
Copy link
Copy Markdown
Member Author

In both cases ligand is overlapping with the protein, which indicates that separate = true did not translate molecules far enoung for the “separated” case?

Both case are docking the ligands. So they should not be separated at the end

But when I look at the input files, the ligand is not overlapping with the receptor to begin with. So I probably misunderstood some part of the process.

Indeed - something is wrong with that receptor. Will update.
Note that this was implemented based on Han's request and he tested it quite extensively.
Just need to update the example. At the end for this example the results are pretty much the same.
But the option should be useful in different scenarios

@AnnaKravchenko
Copy link
Copy Markdown
Contributor

Can you check is there’s a typo (that is potentially a bug) in src/haddock/modules/sampling/rigidbody/cns/separate.cns , line 40
evaluatee ($zc = $result)?

Same in flexref

@amjjbonvin
Copy link
Copy Markdown
Member Author

Can you check is there’s a typo (that is potentially a bug) in src/haddock/modules/sampling/rigidbody/cns/separate.cns , line 40 evaluatee ($zc = $result)?

Same in flexref

Typo indeed - will correct - but without consequences as CNS only interprets the first four characters of a command (not variable) :-)

@amjjbonvin
Copy link
Copy Markdown
Member Author

Note that this typo is also in the main branch

- if sepate is false, the overall rotation around fixed molecules is not performed
- corrected the last two line to enable writing out initial configuration if not commented out (for debugging)
- remove the protein-ligand-centered example
- added an centered docking example to the standard protein-ligand example
@amjjbonvin
Copy link
Copy Markdown
Member Author

The last changes to random_rotations come from actually visualising the rotated molecules prior to docking, which made me realise there was another issue.

Comment thread examples/docking-protein-ligand/docking-protein-ligand-centered-full.cfg Outdated
@AnnaKravchenko
Copy link
Copy Markdown
Contributor

AnnaKravchenko commented Apr 15, 2026

Combo "separate=true, randrot=false” rotates ligand by 180-ish (along its longest axis?), but I guess it’s a feature, not a bug

Comment thread examples/docking-protein-ligand/docking-protein-ligand-centered-test.cfg Outdated
Comment thread examples/docking-protein-ligand/docking-protein-ligand-centered-test.cfg Outdated
Comment thread examples/docking-protein-ligand/docking-protein-ligand-centered-full.cfg Outdated
amjjbonvin and others added 9 commits April 15, 2026 19:25
…d-full.cfg

Co-authored-by: Arha <kravchenko.anna.d@gmail.com>
…d-test.cfg

Co-authored-by: Arha <kravchenko.anna.d@gmail.com>
Co-authored-by: Arha <kravchenko.anna.d@gmail.com>
…d-full.cfg

Co-authored-by: Arha <kravchenko.anna.d@gmail.com>
…d-test.cfg

Co-authored-by: Arha <kravchenko.anna.d@gmail.com>
…d-test.cfg

Co-authored-by: Arha <kravchenko.anna.d@gmail.com>
Co-authored-by: Arha <kravchenko.anna.d@gmail.com>
Copy link
Copy Markdown
Contributor

@AnnaKravchenko AnnaKravchenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good!

@amjjbonvin amjjbonvin merged commit a2b7f34 into main Apr 16, 2026
10 checks passed
@amjjbonvin amjjbonvin deleted the randorien branch April 16, 2026 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community Feature requests / contribution / issues from users enhancement Improving something in the codebase examples m|flexref flexref module m|rigidbody rigidbody sampling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow separate control of random translation and rotation of molecules in rigidbody

3 participants