Repository navigation
Conversation
Member
I'm not 100% sure this makes sense? like the story is a bit weird: maybe better to just have the radius be the radius - is the issue that vdw is too large? covalent might be better if so? |
corinwagen
approved these changes
Sep 4, 2026
corinwagen
left a comment
Member
There was a problem hiding this comment.
This seems reasonable and generally in-line w/ openconf vibes. Modulo comment lgtm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds excluded-volume filtering to constrained conformer generation.
The excluded volume is provided as a set of 3D positions, along with either atomic numbers or explicit radii. If atomic numbers are provided, their vdw radii are looked up automatically. If radii are provided, those values are used directly. Providing both is rejected because it would be ambiguous.
For every ligand–excluded-volume atom pair, the minimum allowed distance is:
minimum distance = radius_scale × (ligand radius + excluded-volume radius)
The default radius scale is 0.7. (just figured having a param for strictness here would be nice)
The overlap for each atom pair is calculated as:
max(1 − actual distance² / minimum distance², 0)
This is zero when the atoms are far enough apart and positive when they overlap. These values are summed over all ligand–excluded-volume atom pairs to give the total clash score. For filtering, the size of the score does not affect ranking: any score greater than zero means the conformer clashes and is removed.
Before conformer generation starts, the constrained atoms are checked against the excluded volume. Since these atoms remain fixed, generation fails early with a clear error if any of them overlap. Unconstrained atoms may overlap in the starting geometry because they are still free to move.
This introduces excluded-volume filtering at several points in conformer generation.
During torsion multi-try, OpenConf generates up to four trials and calculates an excluded-volume score for each one. A score of zero means the trial is clear, while any score greater than zero means it clashes and is removed. The size of the excluded-volume score is not used for ranking.
If several trials have a score of zero, OpenConf uses the existing internal-clash score to choose between them (this is the same as the case without excluded-volume score). If every trial clashes, none of them are accepted.
Candidates are checked again after minimization, including candidates from the constrained, batch, and low-mode generation paths. This catches conformers that move into the excluded volume during minimization.
Before final selection, all remaining conformers in the pool are checked and any clashing conformers are removed. The existing diverse or energy-based selection then runs on only the clash-free conformers. After final refinement, the selected conformers receive one last excluded-volume check.
If no clash-free conformers remain, OpenConf raises an error instead of returning a clashing conformer. When no excluded volume is supplied, these new checks are disabled and the previous behavior is unchanged.
When no excluded volume, functionality didn't change from before at all.
Have had some good results testing this on JACS set.