Comparison of hillclimber features vs PLUMED 2 Generated: 2025-10-21
hillclimber is a high-level Python wrapper around PLUMED 2 focused on metadynamics with ASE and ML force fields. This document tracks missing PLUMED 2 features to guide future development.
Status: β IMPLEMENTED (v0.1.0a1+) Priority: CRITICAL Effort: Low-Medium
Components:
-
RestraintBias- Harmonic restraints (umbrella sampling) β -
UpperWallBias- Upper wall potentials β -
LowerWallBias- Lower wall potentials β -
MovingRestraintBias- Time-dependent restraints (steered MD)
Why critical:
- Umbrella sampling is one of the most common enhanced sampling methods
- Required for free energy calculations with WHAM
- Enables steered MD and constrained sampling
- Blocks a major use case for molecular simulations
Implemented API:
import hillclimber as hc
# Define a distance CV
distance_cv = hc.DistanceCV(
x1=hc.SMARTSSelector(pattern="[OH]"),
x2=hc.SMARTSSelector(pattern="[O]"),
prefix="d"
)
# Harmonic restraint
restraint = hc.RestraintBias(
cv=distance_cv,
kappa=200.0, # force constant (kJ/mol)
at=2.5 # target value
)
# Upper wall
upper_wall = hc.UpperWallBias(
cv=distance_cv,
at=3.0,
kappa=100.0,
exp=2 # exponent (2=harmonic, higher=steeper)
)
# Lower wall
lower_wall = hc.LowerWallBias(
cv=distance_cv,
at=1.0,
kappa=100.0,
exp=2
)
# Use in MetaDynamicsModel via actions parameter
model = hc.MetaDynamicsModel(
config=config,
bias_cvs=[metad_bias],
actions=[restraint, upper_wall, lower_wall], # Add biases here!
data=data.frames,
model=ips.MACEMPModel()
)PLUMED equivalent:
# Restraint
RESTRAINT ARG=cv KAPPA=200.0 AT=2.5
# Walls
UPPER_WALLS ARG=cv AT=3.0 KAPPA=100.0 EXP=2
LOWER_WALLS ARG=cv AT=1.0 KAPPA=100.0 EXP=2
Status: Not implemented Priority: CRITICAL Effort: Medium
Missing components:
-
RMSD- Root mean square deviation from reference -
DRMSD- Distance RMSD -
ALPHARMSD- Alpha helix RMSD -
ANTIBETARMSD- Antiparallel beta sheet RMSD -
PARABETARMSD- Parallel beta sheet RMSD
Why critical:
- Most widely used CV in biomolecular simulations
- Essential for protein folding studies
- Required for structure-based biasing
- Standard CV for conformational analysis
Proposed API:
# Basic RMSD
rmsd_cv = hc.RMSDCV(
atoms=hc.SMARTSSelector(pattern="[C,N,O]"), # or specific atoms
reference="native.pdb",
alignment_type="optimal", # or "simple"
prefix="rmsd"
)
# Distance RMSD
drmsd_cv = hc.DRMSDCV(
atoms=selector,
reference="native.pdb",
lower_cutoff=0.1, # nm
upper_cutoff=0.8, # nm
prefix="drmsd"
)
# Secondary structure RMSD
alpha_cv = hc.AlphaRMSDCV(
residues="all", # or specific residue indices
prefix="alpha"
)PLUMED equivalent:
rmsd: RMSD REFERENCE=native.pdb TYPE=OPTIMAL
drmsd: DRMSD REFERENCE=native.pdb LOWER_CUTOFF=0.1 UPPER_CUTOFF=0.8
alpha: ALPHARMSD RESIDUES=all
Status: Not implemented Priority: HIGH Effort: Low
Missing components:
-
ANGLE- Angle between three atoms/groups
Why important:
- Basic geometric descriptor (alongside distance and torsion)
- Used in almost every biomolecular study
- Simple to implement (similar to existing Distance/Torsion CVs)
Proposed API:
angle_cv = hc.AngleCV(
x1=selector1, # atom/group 1
x2=selector2, # atom/group 2 (vertex)
x3=selector3, # atom/group 3
prefix="angle",
group_reduction="com", # "com", "cog", "first"
multi_group="first"
)PLUMED equivalent:
angle: ANGLE ATOMS=1,2,3
Status: Not implemented Priority: HIGH Effort: Low-Medium
Missing components:
-
COMBINE- Linear combinations of CVs -
CUSTOM/MATHEVAL- Mathematical functions of CVs
Why important:
- Create complex reaction coordinates from simple CVs
- Common pattern: difference between two distances
- Enables flexible CV definitions without modifying code
Proposed API:
# Linear combination
combined_cv = hc.CombineCV(
cvs=[cv1, cv2],
coefficients=[1.0, -1.0],
powers=[1, 1], # optional
periodic=False,
prefix="combined"
)
# Custom mathematical function
custom_cv = hc.CustomCV(
cvs=[cv1, cv2],
function="x**2 + y**2", # or lambda x,y: x**2 + y**2
periodic=False,
prefix="custom"
)PLUMED equivalent:
# Combine
diff: COMBINE ARG=d1,d2 COEFFICIENTS=1,-1 PERIODIC=NO
# Custom
custom: CUSTOM ARG=d1,d2 FUNC=x^2+y^2 PERIODIC=NO
Status: Not implemented Priority: HIGH Effort: High
Missing components:
-
OPES_METAD- Standard OPES metadynamics -
OPES_METAD_EXPLORE- OPES with enhanced exploration -
OPES_EXPANDED- OPES with expanded ensembles -
ECV_MULTITHERMAL- Temperature expansion -
ECV_UMBRELLAS_LINE- Umbrella line for OPES
Why important:
- Modern alternative to traditional metadynamics
- Better convergence properties
- Automatic variance adaptation
- Lower systematic error
- Becoming preferred method in literature
Proposed API:
# OPES config
opes_config = hc.OPESConfig(
barrier=40.0, # kJ/mol
pace=500,
temp=300.0
)
# OPES model (similar to MetaDynamicsModel)
opes_model = hc.OPESModel(
config=opes_config,
cvs=[cv1, cv2],
data=data.frames,
model=ips.MACEMPModel(),
timestep=0.5
)PLUMED equivalent:
phi: TORSION ATOMS=5,7,9,15
psi: TORSION ATOMS=7,9,15,17
opes: OPES_METAD ARG=phi,psi PACE=500 BARRIER=40
Status: Not implemented Priority: MEDIUM-HIGH Effort: Medium
Missing components:
-
PATH/PATHMSD- Progress along reaction path - S coordinate (position along path)
- Z coordinate (distance from path)
Why important:
- Essential for transition path sampling
- Used in committor analysis
- Study complex reaction mechanisms
- Track progress through conformational changes
Proposed API:
path_cv = hc.PathCV(
reference="path.pdb", # multi-frame PDB with waypoints
lambda_param=15100.0,
path_type="optimal", # or "euclidean"
prefix="path"
)
# Returns both s (progress) and z (deviation) componentsPLUMED equivalent:
path: PATH REFERENCE=path.pdb TYPE=OPTIMAL LAMBDA=15100.
# Outputs path.spath and path.zpath
Status: Partial (internal only) Priority: MEDIUM Effort: Low
Missing components:
- Expose
COM/CENTERas reusable virtual atoms - Allow virtual atoms in subsequent CV definitions
Current state:
- hillclimber creates virtual sites internally in CVs
- Cannot define a virtual atom once and reuse it
Why important:
- Hierarchical CV definitions
- Reduce computational overhead
- Match PLUMED workflow patterns
Proposed API:
# Define virtual atoms explicitly
center1 = hc.VirtualAtom(
atoms=selector1,
type="com", # or "cog"
label="c1"
)
center2 = hc.VirtualAtom(
atoms=selector2,
type="com",
label="c2"
)
# Use in other CVs
distance_cv = hc.DistanceCV(
x1=center1,
x2=center2,
prefix="d_centers"
)PLUMED equivalent:
c1: COM ATOMS=1-100
c2: COM ATOMS=101-200
d: DISTANCE ATOMS=c1,c2
Status: Not implemented Priority: MEDIUM Effort: Medium-High
Missing components:
-
HISTOGRAM- Build histograms of CVs -
REWEIGHT_BIAS- Reweight for unbiased ensemble -
COLLECT_FRAMES- Collect trajectory data -
COMMITTOR- Committor analysis
Why important:
- Essential for post-processing biased simulations
- Analyze free energy surfaces
- Compute unbiased observables
- Quality control for simulations
Proposed API:
# Histogram action
histogram = hc.HistogramAction(
cvs=[cv1, cv2],
grid_min=[0.0, -3.14],
grid_max=[5.0, 3.14],
grid_bins=[100, 100],
kernel="discrete",
stride=1000,
file="histogram.dat"
)
# Reweighting
reweight = hc.ReweightBiasAction(temp=300.0)Status: Partial Priority: MEDIUM Effort: Low-Medium
Missing components:
-
POSITION- Absolute Cartesian positions -
DIHEDRAL_CORRELATION- Correlations between dihedrals -
DIPOLE- Molecular dipole moment - Bond-orientational order parameters (
Q3,Q4,Q6)
Currently implemented:
- β
DISTANCE - β
TORSION - β
COORDINATION - β
GYRATION
Status: Not implemented Priority: LOW-MEDIUM Effort: High
Missing components:
- Multiple walker metadynamics (
WALKERS_MPI) - Bias exchange metadynamics
- Parallel tempering integration
-
@replicas:syntax support
Why important:
- Efficient parallel enhanced sampling
- Improve convergence via information sharing
- Common in HPC environments
Status: Not implemented Priority: LOW-MEDIUM Effort: High
Missing components:
-
PCAVARS- Principal component analysis based CVs - Support for different metrics (Euclidean, Optimal)
Why important:
- Dimensionality reduction in complex systems
- Identify collective motions
- Data-driven CV discovery
Status: Alternative approach Priority: LOW Effort: Medium
Missing components:
-
MOLINFOshortcuts for atom selection -
@phi-2,@psi-3for backbone angles -
@water,@protein,@nonhydrogensshortcuts
Current state:
- hillclimber uses SMARTS/SMILES (chemistry-aware, arguably better)
- No support for MOLINFO shortcuts
Trade-off:
- SMARTS is more flexible and chemistry-aware
- MOLINFO shortcuts are convenient for proteins
- Not critical given existing selector capabilities
| Feature | Usage | Effort | Impact | Priority Score | Status |
|---|---|---|---|---|---|
| RESTRAINT | βββββ | Low | π₯ Critical | 10/10 | β Done |
| WALLS | βββββ | Low | π₯ Critical | 10/10 | β Done |
| RMSD | βββββ | Medium | π₯ Critical | 9/10 | π΄ Todo |
| ANGLE | ββββ | Low | High | 8/10 | π΄ Todo |
| COMBINE | ββββ | Low | High | 8/10 | π΄ Todo |
| OPES | ββββ | High | High | 7/10 | π΄ Todo |
| PATH | βββ | Medium | Medium | 6/10 | π΄ Todo |
| CUSTOM | βββ | Medium | Medium | 6/10 | π΄ Todo |
| Virtual Atoms | βββ | Low | Medium | 6/10 | π΄ Todo |
| Analysis Tools | βββ | High | Medium | 5/10 | π΄ Todo |
| PCAVARS | ββ | High | Medium | 4/10 | π΄ Todo |
| Multi-walker | ββ | High | Low | 3/10 | π΄ Todo |
Goal: Enable umbrella sampling and basic restraints Status: π‘ IN PROGRESS (2/5 complete)
- Implement
RESTRAINT,UPPER_WALLS,LOWER_WALLSβ - Add tests for all new features β (9 tests in test_biases.py)
- Add
ANGLECV - Add
COMBINECV - Update documentation with examples
Impact: Enables ~40% more use cases, including umbrella sampling
Completed in v0.1.0a1+:
RestraintBias- Harmonic restraints for umbrella samplingUpperWallBias- Upper wall potentialsLowerWallBias- Lower wall potentialsBiasProtocol- Protocol interface for all bias types- Comprehensive test coverage (test_biases.py)
Goal: Support protein folding and structure studies
- Implement
RMSD,DRMSD - Implement
ALPHARMSD,ANTIBETARMSD,PARABETARMSD - Add
MOVINGRESTRAINTfor steered MD - Improve visualization for RMSD CVs
- Add protein folding examples
Impact: Enables standard biomolecular simulation workflows
Goal: Modern enhanced sampling methods
- Implement OPES (
OPES_METAD,OPES_METAD_EXPLORE) - Add
PATHcollective variables - Implement
CUSTOMCV with arbitrary functions - Add expanded ensemble support (
ECV_*) - Performance optimization for OPES
Impact: State-of-the-art enhanced sampling capabilities
Goal: Complete analysis workflow
- Implement
HISTOGRAM - Implement
REWEIGHT_BIAS - Add explicit virtual atom definitions
- Improve post-processing tools
- Add comprehensive examples and tutorials
Impact: End-to-end workflow from simulation to analysis
- β Chemistry-aware selection (SMARTS/SMILES vs. manual indices)
- β Pythonic API (type-safe, self-documenting)
- β Workflow integration (zntrack for reproducibility)
- β Automatic visualization (molecular structure + CV highlighting)
- β ML force field integration (ASE ecosystem)
- Maintain Pythonic API - dataclasses, type hints, clear names
- Chemistry-aware where possible - leverage RDKit/SMARTS
- zntrack integration - all new components as Nodes where appropriate
- Automatic visualization - highlight relevant atoms for new CVs
- Generate PLUMED - all features must compile to valid plumed.dat
- Unit tests for each new CV class
- Integration tests with ASE
- PLUMED output validation
- Regression tests against PLUMED reference
- Performance benchmarks
- PLUMED 2 documentation: https://www.plumed.org/doc-master/
- OPES paper: Invernizzi & Parrinello, J. Phys. Chem. Lett. 2020
- Path CVs: Branduardi et al., J. Chem. Phys. 2007
- hillclimber repository: (local package)
To work on any of these features:
- Check if issue exists in GitHub repo
- Create feature branch:
feature/restraint-cv - Implement following hillclimber design patterns
- Add tests in
tests/test_*.py - Update documentation and examples
- Submit PR with description and use cases
Implemented Features:
- β
RestraintBias- Harmonic restraints (PLUMEDRESTRAINT) - β
UpperWallBias- Upper wall potentials (PLUMEDUPPER_WALLS) - β
LowerWallBias- Lower wall potentials (PLUMEDLOWER_WALLS) - β
BiasProtocol- Protocol interface for all bias types
Design Decisions:
- All bias classes use consistent "Bias" suffix (RestraintBias, UpperWallBias, LowerWallBias, MetadBias)
- Biases implement
PlumedGeneratorprotocol and generate PLUMED commands viato_plumed() - Biases work on any
CollectiveVariableand are added toMetaDynamicsModelvia theactionsparameter BiasProtocolprovides common interface: all biases have acv: CollectiveVariableattribute
Test Coverage:
- 9 comprehensive tests in
tests/test_biases.py - Tests cover basic functionality, custom labels, different CV types, and parameter variations
- All tests passing β
Files Modified:
hillclimber/biases.py(new) - Bias potential classeshillclimber/interfaces.py- Added BiasProtocol and MetadynamicsBias protocolshillclimber/metadynamics.py- Renamed MetaDBiasCV to MetadBiashillclimber/__init__.py- Added exports for new bias classestests/test_biases.py(new) - Test suite
Last Updated: 2025-10-21 Review Status: Phase 1 partially complete (restraints & walls implemented) Next Review: After implementing ANGLE and COMBINE CVs