hillclimber 0.1.0a2__tar.gz → 0.1.0a3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of hillclimber might be problematic. Click here for more details.
- {hillclimber-0.1.0a2 → hillclimber-0.1.0a3}/PKG-INFO +59 -1
- {hillclimber-0.1.0a2 → hillclimber-0.1.0a3}/README.md +58 -0
- {hillclimber-0.1.0a2 → hillclimber-0.1.0a3}/hillclimber/__init__.py +4 -0
- hillclimber-0.1.0a3/hillclimber/analysis.py +636 -0
- {hillclimber-0.1.0a2 → hillclimber-0.1.0a3}/hillclimber/biases.py +14 -14
- {hillclimber-0.1.0a2 → hillclimber-0.1.0a3}/hillclimber/cvs.py +60 -45
- {hillclimber-0.1.0a2 → hillclimber-0.1.0a3}/hillclimber/metadynamics.py +100 -26
- {hillclimber-0.1.0a2 → hillclimber-0.1.0a3}/hillclimber/opes.py +22 -7
- {hillclimber-0.1.0a2 → hillclimber-0.1.0a3}/pyproject.toml +1 -1
- {hillclimber-0.1.0a2 → hillclimber-0.1.0a3}/tests/conftest.py +3 -3
- {hillclimber-0.1.0a2 → hillclimber-0.1.0a3}/tests/test_cv_gyration.py +48 -4
- hillclimber-0.1.0a3/tests/test_cv_torsion.py +121 -0
- hillclimber-0.1.0a3/tests/test_metad.py +464 -0
- {hillclimber-0.1.0a2 → hillclimber-0.1.0a3}/tests/test_opes.py +11 -11
- hillclimber-0.1.0a2/tests/test_cv_torsion.py +0 -38
- hillclimber-0.1.0a2/tests/test_metad.py +0 -138
- {hillclimber-0.1.0a2 → hillclimber-0.1.0a3}/.claude/settings.local.json +0 -0
- {hillclimber-0.1.0a2 → hillclimber-0.1.0a3}/.gitignore +0 -0
- {hillclimber-0.1.0a2 → hillclimber-0.1.0a3}/.python-version +0 -0
- {hillclimber-0.1.0a2 → hillclimber-0.1.0a3}/AGENTS.md +0 -0
- {hillclimber-0.1.0a2 → hillclimber-0.1.0a3}/CLAUDE.md +0 -0
- {hillclimber-0.1.0a2 → hillclimber-0.1.0a3}/Getting_started.md +0 -0
- {hillclimber-0.1.0a2 → hillclimber-0.1.0a3}/LICENSE +0 -0
- {hillclimber-0.1.0a2 → hillclimber-0.1.0a3}/TODO.md +0 -0
- {hillclimber-0.1.0a2 → hillclimber-0.1.0a3}/examples/01_distance_metad.py +0 -0
- {hillclimber-0.1.0a2 → hillclimber-0.1.0a3}/examples/02_torsion_metad.py +0 -0
- {hillclimber-0.1.0a2 → hillclimber-0.1.0a3}/examples/03_coordination_number.py +0 -0
- {hillclimber-0.1.0a2 → hillclimber-0.1.0a3}/examples/04_2d_metad.py +0 -0
- {hillclimber-0.1.0a2 → hillclimber-0.1.0a3}/examples/05_opes_sampling.py +0 -0
- {hillclimber-0.1.0a2 → hillclimber-0.1.0a3}/examples/06_walls_restraints.py +0 -0
- {hillclimber-0.1.0a2 → hillclimber-0.1.0a3}/examples/README.md +0 -0
- {hillclimber-0.1.0a2 → hillclimber-0.1.0a3}/hillclimber/actions.py +0 -0
- {hillclimber-0.1.0a2 → hillclimber-0.1.0a3}/hillclimber/calc.py +0 -0
- {hillclimber-0.1.0a2 → hillclimber-0.1.0a3}/hillclimber/interfaces.py +0 -0
- {hillclimber-0.1.0a2 → hillclimber-0.1.0a3}/hillclimber/nodes.py +0 -0
- {hillclimber-0.1.0a2 → hillclimber-0.1.0a3}/hillclimber/selectors.py +0 -0
- {hillclimber-0.1.0a2 → hillclimber-0.1.0a3}/hillclimber/virtual_atoms.py +0 -0
- {hillclimber-0.1.0a2 → hillclimber-0.1.0a3}/main.py +0 -0
- {hillclimber-0.1.0a2 → hillclimber-0.1.0a3}/tests/test_biases.py +0 -0
- {hillclimber-0.1.0a2 → hillclimber-0.1.0a3}/tests/test_cv_angle.py +0 -0
- {hillclimber-0.1.0a2 → hillclimber-0.1.0a3}/tests/test_cv_coordination.py +0 -0
- {hillclimber-0.1.0a2 → hillclimber-0.1.0a3}/tests/test_cv_distance.py +0 -0
- {hillclimber-0.1.0a2 → hillclimber-0.1.0a3}/tests/test_cv_distance_new.py +0 -0
- {hillclimber-0.1.0a2 → hillclimber-0.1.0a3}/tests/test_selectors.py +0 -0
- {hillclimber-0.1.0a2 → hillclimber-0.1.0a3}/tests/test_virtual_atoms.py +0 -0
- {hillclimber-0.1.0a2 → hillclimber-0.1.0a3}/uv.lock +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: hillclimber
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.0a3
|
|
4
4
|
Summary: Python interfaces for the plumed library with enhanced sampling.
|
|
5
5
|
License-File: LICENSE
|
|
6
6
|
Requires-Python: >=3.11
|
|
@@ -124,6 +124,64 @@ with project:
|
|
|
124
124
|
project.build()
|
|
125
125
|
```
|
|
126
126
|
|
|
127
|
+
## Units
|
|
128
|
+
|
|
129
|
+
hillclimber uses **ASE units** throughout the package:
|
|
130
|
+
|
|
131
|
+
- **Distances**: Ångström (Å)
|
|
132
|
+
- **Energies**: electronvolt (eV)
|
|
133
|
+
- **Time**: femtoseconds (fs)
|
|
134
|
+
- **Temperature**: Kelvin (K)
|
|
135
|
+
- **Mass**: atomic mass units (amu)
|
|
136
|
+
|
|
137
|
+
### Unit Conversion with PLUMED
|
|
138
|
+
|
|
139
|
+
PLUMED internally uses different units (nm, kJ/mol, ps). hillclimber automatically handles the conversion by adding a `UNITS` line to the PLUMED input:
|
|
140
|
+
|
|
141
|
+
```
|
|
142
|
+
UNITS LENGTH=A TIME=0.001 ENERGY=96.48533288249877
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
This tells PLUMED to interpret all input parameters in ASE units:
|
|
146
|
+
- `LENGTH=A`: Distances are in Ångström
|
|
147
|
+
- `TIME=0.001`: Time values are in fs (1 fs = 0.001 ps)
|
|
148
|
+
- `ENERGY=96.485`: Energies are in eV (1 eV = 96.485 kJ/mol)
|
|
149
|
+
|
|
150
|
+
**All PLUMED parameters (HEIGHT, BARRIER, KAPPA, SIGMA, etc.) should be specified in ASE units (eV, Å, fs).** The UNITS line ensures PLUMED interprets them correctly.
|
|
151
|
+
|
|
152
|
+
### Example with Units
|
|
153
|
+
|
|
154
|
+
```python
|
|
155
|
+
config = hc.MetaDynamicsConfig(
|
|
156
|
+
height=0.5, # eV - Gaussian hill height
|
|
157
|
+
pace=150, # MD steps - deposition frequency
|
|
158
|
+
biasfactor=10.0, # Dimensionless - well-tempered factor
|
|
159
|
+
temp=300.0 # Kelvin - system temperature
|
|
160
|
+
)
|
|
161
|
+
|
|
162
|
+
bias = hc.MetadBias(
|
|
163
|
+
cv=distance_cv,
|
|
164
|
+
sigma=0.1, # Å - Gaussian width for distance CV
|
|
165
|
+
grid_min=0.0, # Å - minimum grid value
|
|
166
|
+
grid_max=5.0, # Å - maximum grid value
|
|
167
|
+
grid_bin=100 # Number of bins
|
|
168
|
+
)
|
|
169
|
+
|
|
170
|
+
# Restraint example
|
|
171
|
+
restraint = hc.RestraintBias(
|
|
172
|
+
cv=distance_cv,
|
|
173
|
+
kappa=200.0, # eV/Ų - force constant
|
|
174
|
+
at=2.5 # Å - restraint center
|
|
175
|
+
)
|
|
176
|
+
|
|
177
|
+
metad_model = hc.MetaDynamicsModel(
|
|
178
|
+
config=config,
|
|
179
|
+
bias_cvs=[bias],
|
|
180
|
+
actions=[restraint],
|
|
181
|
+
timestep=0.5 # fs - MD timestep
|
|
182
|
+
)
|
|
183
|
+
```
|
|
184
|
+
|
|
127
185
|
## Collective Variables
|
|
128
186
|
|
|
129
187
|
hillclimber supports multiple types of collective variables:
|
|
@@ -112,6 +112,64 @@ with project:
|
|
|
112
112
|
project.build()
|
|
113
113
|
```
|
|
114
114
|
|
|
115
|
+
## Units
|
|
116
|
+
|
|
117
|
+
hillclimber uses **ASE units** throughout the package:
|
|
118
|
+
|
|
119
|
+
- **Distances**: Ångström (Å)
|
|
120
|
+
- **Energies**: electronvolt (eV)
|
|
121
|
+
- **Time**: femtoseconds (fs)
|
|
122
|
+
- **Temperature**: Kelvin (K)
|
|
123
|
+
- **Mass**: atomic mass units (amu)
|
|
124
|
+
|
|
125
|
+
### Unit Conversion with PLUMED
|
|
126
|
+
|
|
127
|
+
PLUMED internally uses different units (nm, kJ/mol, ps). hillclimber automatically handles the conversion by adding a `UNITS` line to the PLUMED input:
|
|
128
|
+
|
|
129
|
+
```
|
|
130
|
+
UNITS LENGTH=A TIME=0.001 ENERGY=96.48533288249877
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
This tells PLUMED to interpret all input parameters in ASE units:
|
|
134
|
+
- `LENGTH=A`: Distances are in Ångström
|
|
135
|
+
- `TIME=0.001`: Time values are in fs (1 fs = 0.001 ps)
|
|
136
|
+
- `ENERGY=96.485`: Energies are in eV (1 eV = 96.485 kJ/mol)
|
|
137
|
+
|
|
138
|
+
**All PLUMED parameters (HEIGHT, BARRIER, KAPPA, SIGMA, etc.) should be specified in ASE units (eV, Å, fs).** The UNITS line ensures PLUMED interprets them correctly.
|
|
139
|
+
|
|
140
|
+
### Example with Units
|
|
141
|
+
|
|
142
|
+
```python
|
|
143
|
+
config = hc.MetaDynamicsConfig(
|
|
144
|
+
height=0.5, # eV - Gaussian hill height
|
|
145
|
+
pace=150, # MD steps - deposition frequency
|
|
146
|
+
biasfactor=10.0, # Dimensionless - well-tempered factor
|
|
147
|
+
temp=300.0 # Kelvin - system temperature
|
|
148
|
+
)
|
|
149
|
+
|
|
150
|
+
bias = hc.MetadBias(
|
|
151
|
+
cv=distance_cv,
|
|
152
|
+
sigma=0.1, # Å - Gaussian width for distance CV
|
|
153
|
+
grid_min=0.0, # Å - minimum grid value
|
|
154
|
+
grid_max=5.0, # Å - maximum grid value
|
|
155
|
+
grid_bin=100 # Number of bins
|
|
156
|
+
)
|
|
157
|
+
|
|
158
|
+
# Restraint example
|
|
159
|
+
restraint = hc.RestraintBias(
|
|
160
|
+
cv=distance_cv,
|
|
161
|
+
kappa=200.0, # eV/Ų - force constant
|
|
162
|
+
at=2.5 # Å - restraint center
|
|
163
|
+
)
|
|
164
|
+
|
|
165
|
+
metad_model = hc.MetaDynamicsModel(
|
|
166
|
+
config=config,
|
|
167
|
+
bias_cvs=[bias],
|
|
168
|
+
actions=[restraint],
|
|
169
|
+
timestep=0.5 # fs - MD timestep
|
|
170
|
+
)
|
|
171
|
+
```
|
|
172
|
+
|
|
115
173
|
## Collective Variables
|
|
116
174
|
|
|
117
175
|
hillclimber supports multiple types of collective variables:
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
from hillclimber.actions import PrintAction
|
|
2
|
+
from hillclimber.analysis import sum_hills, read_colvar, plot_cv_time_series
|
|
2
3
|
from hillclimber.biases import RestraintBias, UpperWallBias, LowerWallBias
|
|
3
4
|
from hillclimber.cvs import DistanceCV, AngleCV, CoordinationNumberCV, TorsionCV, RadiusOfGyrationCV
|
|
4
5
|
from hillclimber.metadynamics import MetadBias, MetaDynamicsConfig, MetaDynamicsModel
|
|
@@ -26,4 +27,7 @@ __all__ = [
|
|
|
26
27
|
"RestraintBias",
|
|
27
28
|
"UpperWallBias",
|
|
28
29
|
"LowerWallBias",
|
|
30
|
+
"sum_hills",
|
|
31
|
+
"read_colvar",
|
|
32
|
+
"plot_cv_time_series",
|
|
29
33
|
]
|