Batch active learning ACE (BALACE)
Automated framework for parameterizing interatomic potential using ACE for disordered material systems.
Overview:

Requirements:
LAMMPS
A Lammps installation with the ML-PACE package. See (https://docs.lammps.org/Build_extras.html#ml-pace) for futher instructions.
VASP
A VASP installation is needed to run AIMD and single-point calculations. In our development we used version 6.4.3, but other version should be compatible. The VASP installation should be setup to work with Fireworks.
Fireworks
A FireWorks launchpad attached to a MongoDB is needed for the framework to manage various jobs that will run. Large scale storage in the MongoDB is not currently necessary as the framework uses local files on the system to extract structures from OUTCARS and dumpfiles for building the training data sets etc. A free MongoDB Atlas database can be used as described here (https://www.mongodb.com/products/platform/atlas-database)
Pacemaker
To use the framework pacemaker is needed to parameterize ACE potentials, which needs to be installed in the the following way:
Installation of tensorpotential
tensorpotential allows for the GPU accelerated optimization of the ACE potential using TensorFlow. However, it is recommended to use it even if you don't have a GPU available.
Install it using the following commands:
Install Tensorflow (newer version should be also compatible)
pip install tensorflow
Download the tensorpotential from this repository. Clone with
git clone https://github.com/ICAMS/TensorPotential.git
cd TensorPotential
Run installation script
pip install --upgrade .
Installation of pacemaker and pyace
The python-ace package with its pacemaker framework is also needed. It contains the pacemaker tools and other Python wrappers and utilities.
To install pyace:
Download pyace
git clone https://github.com/ICAMS/python-ace.git
Run installation script
pip install --upgrade .
API
balace
Source code in src/vitrum/batch_active/learning.py
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 | |
__init__(config_file='balace.yaml', filename='balace.pickle', auto_queue=False)
Initialize the balace class.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config_file
|
str
|
yaml file containing configuration for the balace class. Defaults to "balace.yaml". |
'balace.yaml'
|
filename
|
str
|
filename to save the class to. Defaults to "balace.pickle". |
'balace.pickle'
|
auto_queue
|
bool
|
whether to automatically queue runs. Defaults to False. |
False
|
Attributes:
| Name | Type | Description |
|---|---|---|
auto_queue |
bool
|
whether to automatically queue runs |
state |
str
|
current state of the balace run |
filename |
str
|
filename to save the class to |
runs |
dict
|
dictionary containing information about runs |
wd |
str
|
working directory |
units |
list of str
|
list of composition units to use |
iteration |
int
|
current iteration number |
atom_types |
list of str
|
list of atom types |
incar_settings |
dict
|
dictionary containing incar settings |
high_temp_params |
dict
|
dictionary containing high temperature parameters |
strain_params |
dict
|
dictionary containing strain parameters |
launchpad |
str
|
launchpad yaml file |
database |
dict
|
dictionary containing database information |
qadapter_file |
str
|
file containing qadapter |
reference_energy |
str
|
reference energy to use |
lammps_params |
dict
|
dictionary containing lammps parameters |
selection_params |
dict
|
dictionary containing selection parameters |
composition_params |
dict
|
dictionary containing composition parameters |
Source code in src/vitrum/batch_active/learning.py
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 | |
load_config()
Loads the YAML configuration file.
Source code in src/vitrum/batch_active/learning.py
86 87 88 89 90 91 92 93 94 95 96 | |
run_pace()
The main loop for the active learning workflow. It runs through the following states: - Runs a high temperature AIMD simulation using VASP. - Trains the ACE model using the current database of structures. - Runs LAMMPS simulations with the current ACE potential to generate new structures. - Evaluates the new structures with VASP static calculations.
Returns:
| Type | Description |
|---|---|
|
None |
Source code in src/vitrum/batch_active/learning.py
271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 | |
set_defaults()
Sets default values for missing attributes.
Source code in src/vitrum/batch_active/learning.py
98 99 100 101 102 103 104 105 106 107 108 109 110 111 | |
validate_config()
Validates required config values.
Source code in src/vitrum/batch_active/learning.py
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 | |