Skip to content

Commit a886202

Browse files
authored
Merge pull request #9 from OpenBioSim/feature_linearise_ring_break
2 parents a69f067 + 5fb53e1 commit a886202

4 files changed

Lines changed: 594 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ Changelog
55
-------------------------------------------------------------------------------------
66

77
* Please add an item to this CHANGELOG for any new features or bug fixes when creating a PR.
8+
* Add linear spacer modification for ring-breaking ghost bridges.
9+
* Remove cross-bond angles spanning ring-making/breaking bonds in the state where the bond is absent.
810

911
[2025.2.0](https://github.com/openbiosim/loch/compare/2025.1.0...2025.2.0) - Mar 2026
1012
-------------------------------------------------------------------------------------

README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,31 @@ differences.
2323
2) To avoid spurious coupling between the physical and ghost systems, which
2424
can affect the equilibrium geometry of the physical system.
2525

26+
Ghostly implements many extensions beyond the original modification scheme to
27+
handle the diversity of perturbations encountered in practice:
28+
29+
- **Anchor selection scoring:** physical anchor atoms are scored to avoid
30+
transmuting or bridge atoms, preventing geometrically inconsistent constraints.
31+
- **Ring and sp2 bridge handling:** angle stiffening is skipped by default for
32+
ring and sp2 bridges, where local geometry already constrains the ghost and
33+
90° stiffening would introduce significant strain. It can be re-enabled via
34+
`--stiffen-ring-bridges` and `--stiffen-sp2-bridges`.
35+
- **Residual term cleanup:** a post-processing pass removes mixed improper
36+
dihedrals and cross-bridge dihedrals missed by the per-bridge junction
37+
handlers, as well as angles where a ghost atom is the central atom and both
38+
terminal atoms are physical.
39+
- **Mixed dihedral softening:** surviving mixed ghost/physical dihedrals can
40+
be softened via `--soften-anchors` to allow ghost groups to reorient and
41+
avoid steric clashes at small λ.
42+
- **Rotamer stiffening:** `--stiffen-rotamers` replaces rotatable sp3 anchor
43+
dihedrals with a stiff single-well cosine to control ghost orientation
44+
through flexible bonds.
45+
- **Ring-breaking perturbations:** adjacent bridges with independent ghost
46+
groups retain each other as physical neighbours; angles with a ghost central
47+
atom spanning two physical neighbours are replaced by a linear spacer
48+
(180°, soft force constant); and angles and dihedrals spanning the
49+
ring-making/breaking bond are removed in the state where that bond is absent.
50+
2651
Ghostly is incorporated into the [SOMD2](https://github.com/openbiosim/somd2)
2752
free-energy perturbation engine.
2853

src/ghostly/_cli.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,21 @@ def run():
205205
required=False,
206206
)
207207

208+
parser.add_argument(
209+
"--linearise-ring-break",
210+
action=argparse.BooleanOptionalAction,
211+
help="""
212+
Apply a linear spacer modification to ghost atoms that bridge two
213+
physical atoms (ring-breaking topology). Instead of removing the
214+
P1-G-P2 angle, this sets it to 180 degrees with force constant
215+
k-soft and reduces the ghost bond force constants to k-soft.
216+
Recommended for ring-breaking and chain-expansion perturbations.
217+
Disabled by default as it is experimental.
218+
""",
219+
default=False,
220+
required=False,
221+
)
222+
208223
parser.add_argument(
209224
"--output-prefix",
210225
type=str,
@@ -369,6 +384,7 @@ def run():
369384
k_rotamer=k_rotamer.value(),
370385
stiffen_ring_bridges=args.stiffen_ring_bridges,
371386
stiffen_sp2_bridges=args.stiffen_sp2_bridges,
387+
linearise_ring_break=args.linearise_ring_break,
372388
)
373389
except Exception as e:
374390
logger.error(

0 commit comments

Comments
 (0)