Repository navigation
Conversation
This branch was successfully deployed
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.
Closes #22.
Ghostly typed bridge atoms with RDKit on end-state molecules that still had their ghost atoms attached. When the extra bonds to ghosts exceeded the valence of a bridge atom, bond-order inference failed silently and every heavy atom came back sp3 and non-aromatic, so aromatic triple junctions were treated as non-planar and their ghost angles were softened. Fixing this showed that hybridisation is a poor proxy for the geometric questions Ghostly actually asks, so these decisions now come from the force field terms that are simulated.
Changes
_linearise_ring_break(off by default), which now converts the ghost-free end state. If bond orders can't be inferred, ring-break ghosts that could be stereocentres (four or more neighbours where they're physical) aren't linearised, and a warning is logged.shortfall^2 / sum(1/k), with a 2 kcal/mol cutoff. Bridges with four or more physical neighbours are never planar. If an angle term is missing, ring bridges keep their angles and other bridges are treated as non-planar. Across the OpenFE benchmark set the triple-junction values split cleanly: 326 bridges at ≤ 1.2 kcal/mol and 8 at ≥ 3.3 kcal/mol.in_ringonly finds rings of up to 12 atoms. The rotatable-bond check keeps bonds to ghosts, since these restrain rotation at that end state.--stiffen-ring-bridgesis removed.--stiffen-sp2-bridgesis removed.modify()and passed through. Impropers are removed once per end state, before the bridge handlers, rather than once per bridge.Breaking changes
--stiffen-ring-bridges/stiffen_ring_bridgesand--stiffen-sp2-bridges/stiffen_sp2_bridgesoptions are removed. Both defaulted toFalse.Validation
Scan of the OpenFE benchmark set (604 RBFE edges), default options,
develvs this branch: 212 edges change and 392 are identical, with no errors on either branch. An edge can have more than one cause.Ghost out-of-plane angle over 2 ns at the end state (free leg). Crossings count moves from beyond +20° to beyond −20°.
"Old" is without stiffening for acyclic bridges, or with the impropers removed for the ring bridge. "New" is this branch. All runs were stable.
Tests:
_flattening_energy,_is_rotor,_in_ring(including a 14-membered ring that Sire'sin_ringmisses),_physical_connectivity(including a ring closed only by ghosts),_to_rdkit_end_state, and the chirality fallback in_linearise_ring_break.test_toluene_to_pyridinechecks that the ring-bridge improper is kept.test_ejm49_to_ejm31checks that the sp2 bridge is now stiffened.test_acetone_to_propenolno longer needs the removed option.A full re-preparation and equilibration s branch is in progress.
Also closes #24. At a terminal junction, Ghostly keeps one anchor dihedral per ghost, ghost–bridge–P1–P2. When the bridge's physical neighbour is sp hybridised at that end state, e.g. a ghost group attached to a nitrile nitrogen, the angle bridge–P1–P2 is linear, so the kept dihedrals pass through three collinear atoms, where they are undefined and their forces diverge at the end state itself. This was found in edges from the OpenFE failure-cases repository (asap eva71_2apro_first_test, EV712AproBLRN, SHP2XPMN and pxr), where the kept anchor dihedrals had force constants of up to about 2.9 kcal/mol. Dihedrals and impropers involving ghost atoms that pass through an angle that is linear at the end state (an equilibrium value of at least 170°, matching SOMD2's
torsion_windowdetection) are now removed, as force fields do for torsions through linear groups. The ghosts remain held by their angle terms, so they can only rotate about the linear axis. Anchor selection also now prefers a candidate that isn't reached through a linear angle, when there is one. Across the 604 OpenFE benchmark edges, this removes dihedrals in 23 edges, while the change to anchor selection affects none.