### Install PyACE and Pacemaker Source: https://pacemaker.readthedocs.io/en/latest/pacemaker/install Commands to download and install the pyace package, which provides the Pacemaker toolset. ```bash git clone https://github.com/ICAMS/python-ace.git cd python-ace wget https://github.com/ICAMS/python-ace/archive/refs/master.zip cd python-ace-master pip install --upgrade . python setup.py install ``` -------------------------------- ### Install TensorPotential Source: https://pacemaker.readthedocs.io/en/latest/pacemaker/install Steps to install TensorFlow dependencies and the TensorPotential package via cloning or downloading the source code. ```bash pip install tensorflow==2.8.0 pip install tensorflow[and-cuda] git clone https://github.com/ICAMS/TensorPotential.git cd TensorPotential wget https://github.com/ICAMS/TensorPotential/archive/refs/heads/main.zip unzip main.zip cd TensorPotential-main pip install --upgrade . python setup.py install ``` -------------------------------- ### Resolve Protobuf Version Issues Source: https://pacemaker.readthedocs.io/en/latest/pacemaker/install Workaround for the TypeError related to protobuf descriptors by installing a compatible version. ```bash pip install protobuf==3.20.* ``` -------------------------------- ### Two-Stage Fitting Scheme for Energy and Force Weights Source: https://pacemaker.readthedocs.io/en/latest/pacemaker/faq This example outlines a two-stage fitting scheme in Pacemaker to optimize both energy and force metrics by adjusting the kappa parameter in the loss function. It involves an initial fit with a high force weight (high kappa) followed by a second fit with a high energy weight (low kappa), using the output of the first stage as input for the second. ```bash pacemaker input.yaml # step 1 with kappa: 0.95 cp interim_potential_0.yaml cont.yaml # or cp output_potential.yaml cont.yaml pacemaker input_k-0.1.yaml -p cont.yaml # step 2 with kappa: 0.05 .. 0.1 ``` -------------------------------- ### Continue Pacemaker Fitting from Existing Potential Source: https://pacemaker.readthedocs.io/en/latest/pacemaker/faq Demonstrates how to continue or restart a Pacemaker fitting process from a previously generated potential file. This can be done by specifying the path to the starting potential in the input.yaml file or via the command line interface. This is useful for resuming interrupted fits or performing multi-stage fitting. ```yaml potential: /path/to/your/potential.yaml ``` ```bash pacemaker input.yaml -p /path/to/your/potential.yaml ``` -------------------------------- ### Adjust Minimization Tolerance for Extended Optimization Source: https://pacemaker.readthedocs.io/en/latest/pacemaker/faq This example shows how to decrease the `gtol` parameter for the BFGS minimization algorithm within the `input.yaml` file's `fit.options` section. This allows the optimization to run longer by reducing the tolerance for updates, which can be useful if the optimization stops too early. ```yaml fit: options: {gtol: 5e-7} ``` -------------------------------- ### Define Potential and Initial Potential for Ladder Fitting Source: https://pacemaker.readthedocs.io/en/latest/pacemaker/inputfile Configures the final potential shape and the optional initial potential file to start the fitting process from a specific state. ```yaml potential: deltaSplineBins: 0.001 element: Al initial_potential: some_start_or_interim_potential.yaml ``` -------------------------------- ### Set Environment Variable for Dataset Path Source: https://pacemaker.readthedocs.io/en/latest/pacemaker/faq This example demonstrates how to set the `PACEMAKERDATAPATH` environment variable, which is recommended for organizing dataset files. By setting this variable, you can specify a central location for all your dataset files, simplifying path management. ```bash export PACEMAKERDATAPATH=/path/to/my/dataset/files ``` -------------------------------- ### Configure LAMMPS Build with ML-PACE (cmake) Source: https://pacemaker.readthedocs.io/en/latest/pacemaker/quickstart Instructions for configuring the LAMMPS build process using CMake, specifically enabling the ML-PACE package. This example shows how to enable both serial and MPI builds with the ML-PACE support. ```bash cd lammps mkdir build cd build cmake -DCMAKE_BUILD_TYPE=Release -DPKG_ML-PACE=ON ../cmake # or for MPI build: cmake -DCMAKE_BUILD_TYPE=Release -D BUILD_MPI=ON -DPKG_ML-PACE=ON ../cmake cmake --build . # or make ``` -------------------------------- ### LAMMPS Input Script with PACE Potential Source: https://pacemaker.readthedocs.io/en/latest/pacemaker/quickstart Example LAMMPS input script demonstrating how to use the converted YACE potential file with the 'pair_style pace' command. It specifies the potential file and the element types involved. ```lammps pair_style pace pair_coeff * * output_potential.yace Al Ni ``` -------------------------------- ### LAMMPS Input Script with PACE/KK Potential Source: https://pacemaker.readthedocs.io/en/latest/pacemaker/quickstart Example LAMMPS input script for using the KOKKOS implementation of the PACE potential ('pair_style pace/kk'). This is used when LAMMPS is compiled with KOKKOS support for GPU acceleration. ```lammps pair_style pace product pair_coeff * * output_potential.yace Al Ni ``` -------------------------------- ### Reset Potential from File in Pacemaker Source: https://pacemaker.readthedocs.io/en/latest/pacemaker/faq This code snippet illustrates how to reset a potential from a specified file while preserving its 'shape' in Pacemaker. Setting `reset: true` will reinitialize radial coefficients to delta_nk and B-basis function coefficients to zero, effectively starting the fit from a known potential structure but with reset coefficients. ```yaml #input.yaml potential: filename: /path/to/your/potential.yaml reset: true ``` -------------------------------- ### Execute Pacemaker Fitting Source: https://pacemaker.readthedocs.io/en/latest/pacemaker/quickstart Commands to initiate the fitting process using the Pacemaker CLI, including background execution and GPU device selection. ```bash pacemaker input.yaml nohup pacemaker input.yaml & export CUDA_VISIBLE_DEVICES=0 ``` -------------------------------- ### Prepare Manual Fitting Dataset with Pandas Source: https://pacemaker.readthedocs.io/en/latest/pacemaker/quickstart Demonstrates how to load and prepare a fitting dataset using pandas DataFrames. The code shows how to read a pickled DataFrame containing structural information, energies, forces, and corrected energies, which are essential for the `pacemaker` fitting process. It also outlines the meaning of each column in the DataFrame. ```python import pandas as pd df = pd.read_pickle("../data/exmpl_df.pckl.gzip", compression="gzip", protocol=4) ``` ```python import pandas as pd from ase import Atoms # Collect raw data for the first structure # Positions pos1 = [[2.04748516, 2.04748516, 0. ], [0. , 0. , 0. ], [2.04748516, 0. , 1.44281847], [0. , 2.04748516, 1.44475745]] ``` -------------------------------- ### Generate Pacemaker Input File Source: https://pacemaker.readthedocs.io/en/latest/pacemaker/quickstart Interactively generates a default `pacemaker` input configuration file in YAML format. The utility prompts the user for essential parameters like dataset filename, test set size, list of elements, cutoff radius, and number of functions, creating a general-purpose `input.yaml` file. ```bash pacemaker -t ``` -------------------------------- ### Create and Save Atomic Data with ASE Source: https://pacemaker.readthedocs.io/en/latest/pacemaker/quickstart Demonstrates how to define lattice vectors, atomic symbols, and forces to create ASE Atoms objects. The data is then aggregated into a pandas DataFrame and saved as a compressed pickle file for use in fitting. ```python from ase import Atoms import pandas as pd lattice1 = [[4.09497, 0., 0.], [0., 4.09497, 0.], [0., 0., 2.887576]] symbls1 = ['Al', 'Al', 'Ni', 'Ni'] e1 = -21.07723361 f1 = [[0.0, 0.0, 0.0], [0.0, 0.0, 0.0], [0.0, 0.0, 0.00725587], [0.0, 0.0, -0.00725587]] at1 = Atoms(symbols=symbls1, positions=pos1, cell=lattice1, pbc=True) data = {'energy': [e1], 'forces': [f1], 'ase_atoms': [at1], 'energy_corrected': [e1]} df = pd.DataFrame(data) df.to_pickle('my_data.pckl.gzip', compression='gzip', protocol=4) ``` -------------------------------- ### Configure Binary Interaction Potential in input.yaml Source: https://pacemaker.readthedocs.io/en/latest/pacemaker/faq This configuration snippet illustrates how to define a binary interaction potential within `input.yaml`. It specifies parameters for bonds, functions, and initial potentials, enabling the fitting of potentials for specific pairs of elements like Al-Ni. ```yaml potential: deltaSplineBins: 0.001, elements: [Al, Ni], bonds: { BINARY: { rcut': 6.2, dcut': 0.01, core-repulsion': [0.0, 5.0], radbase': ChebExpCos, radparameters': [5.25] } } functions: { BINARY: { nradmax_by_orders: [5, 2, 2, 1], lmax_by_orders: [0, 2, 2, 1], } } ## provide list of initial potentials initial_potential: [Al.yaml, Ni.yaml] ``` -------------------------------- ### Configure Pacemaker Input File Source: https://pacemaker.readthedocs.io/en/latest/pacemaker/quickstart Shows the structure of the YAML input file required for the Pacemaker fitting process, specifically setting the path to the training dataset. ```yaml data: filename: /path/to/the/pyace/data/exmpl_df.pckl.gzip ``` -------------------------------- ### Create and Manage Python Environments Source: https://pacemaker.readthedocs.io/en/latest/pacemaker/install Commands to create and activate a dedicated Python environment for Pacemaker using Mamba or Conda package managers. ```bash mamba create -n ace python=3.9 source activate ace mamba activate ace mamba deactivate ``` ```bash conda create -n ace python=3.9 ``` -------------------------------- ### Tune Potential Parameters with Python API Source: https://pacemaker.readthedocs.io/en/latest/pacemaker/faq This snippet demonstrates how to load a potential configuration from a YAML file, modify specific parameters like bond distances, core repulsion, and cutoff radii using the Python API, and then save the updated configuration. It's useful for fine-tuning simulation potentials programmatically. ```Python from pyace import * bbasisconf = BBasisConfiguration("original_potential.yaml") for block in bbasisconf.funcspecs_blocks: block.r_in = 2.3 # minimal interatomic distance in dataset block.delta_in = 0.1 block.core_rep_parameters=[1e3, 1.0] block.rho_cut = block.drho_cut = 5 bbasisconf.save("tuned_potential.yaml") ``` -------------------------------- ### Initialize and Use PyACECalculator in ASE Source: https://pacemaker.readthedocs.io/en/latest/pacemaker/quickstart Python code snippet demonstrating how to use the fitted Pacemaker potential within the Atomic Simulation Environment (ASE) using the PyACECalculator. It shows creating an ASE atoms object and attaching the calculator. ```python from ase.build import bulk from pyace import PyACECalculator # Create simple ASE atoms structure atoms = bulk('Al', cubic=True) # Create calculator calc = PyACECalculator('output_potential.yaml') # Attach it to the Atmos atoms.set_calculator(calc) ``` -------------------------------- ### Configure Train/Test Data Split in input.yaml Source: https://pacemaker.readthedocs.io/en/latest/pacemaker/faq This section shows how to specify the split between training and testing datasets within the `input.yaml` configuration file. It covers both using a `test_size` parameter for automatic splitting and providing separate filenames for training and testing data. ```yaml data: test_size: 0.1 # for 10% of data used for testing ``` ```yaml data: filename: /path/to/train_data.pckl.gzip test_filename: /path/to/test_data.pckl.gzip ``` -------------------------------- ### Configure GPU Backend Settings Source: https://pacemaker.readthedocs.io/en/latest/pacemaker/faq This snippet shows how to configure GPU settings within the input.yaml file for the backend. It allows specifying the GPU index and memory limit for fitting processes. Setting gpu_ind to -1 disables GPU utilization. mem_limit controls the maximum GPU memory in MB. ```yaml backend: gpu_config: {gpu_ind: , mem_limit: } ``` -------------------------------- ### Configure potential upfitting Source: https://pacemaker.readthedocs.io/en/latest/pacemaker/inputfile Specifies how to continue fitting an existing potential by referencing a YAML file, either through a configuration block or command-line parameters. ```yaml potential: potential.yaml # Or with explicit filename and options potential: filename: potential.yaml # initial_potential: initial_potential.yaml # reset: true ``` -------------------------------- ### Specify Trainable Parameters for Binary Fit in input.yaml Source: https://pacemaker.readthedocs.io/en/latest/pacemaker/faq This configuration shows how to set `trainable_parameters` to `BINARY` within the `input.yaml` file's `fit` section. This is used in conjunction with defining a binary interaction potential to ensure that only the parameters for binary interactions are trained during the fitting process. ```yaml fit: ... trainable_parameters: BINARY ... ``` -------------------------------- ### Generate Augmented Dataset (Python CLI) Source: https://pacemaker.readthedocs.io/en/latest/pacemaker/utilities The `pace_augment` utility generates an augmented dataset by predicting energies and forces using a ZBL potential. It requires a potential file and a dataset, with options to specify active set files, maximum structures, output filenames, and various parameters for controlling the augmentation process, such as the number of atoms, seed structures, and energy-per-atom limits. ```python usage: pace_augment [-h] -d DATASET [-a ACTIVE_SET_INV_FNAME] [-m MAX_STRUCTURES] [-o AUGMENTED_STRUCTURES_FILENAME] [-V] [-mnat MAX_NUM_AT] [-mss MAX_SEED_STRUCTURES] [-minepa MIN_AUG_EPA] [-maxepa MAX_AUG_EPA] [-eparmax EPA_RELIABLE_MAX] [-nnstep NN_DISTANCE_STEP] [-nnmin NN_DISTANCE_MIN] potential_file Utility to generate augmented dataset with ZBL and/or EOS data positional arguments: potential_file B-basis file name (.yaml) optional arguments: -h, --help show this help message and exit -d DATASET, --dataset DATASET Dataset file name(s), ex.: -d filename.pckl.gzip [-d filename2.pckl.gzip] -a ACTIVE_SET_INV_FNAME, --active-set-inv ACTIVE_SET_INV_FNAME Active Set Inverted (ASI) filename, considered as extra B-projections -m MAX_STRUCTURES, --max-structures MAX_STRUCTURES Maximum number of structures to select (default -1 = all) -o AUGMENTED_STRUCTURES_FILENAME, --output AUGMENTED_STRUCTURES_FILENAME Augmented structures filename, (default: aug_df.pkl.gz) -V suppress verbosity of numerical procedures -mnat MAX_NUM_AT, --max-num-atoms MAX_NUM_AT Maximum number of atoms for seed structures, selected for augmentation (-1 = no limit, default = 32) -mss MAX_SEED_STRUCTURES, --max-seed-structures MAX_SEED_STRUCTURES Maximum number of seed structures, selected for augmentation (-1 = all, default = 100) -minepa MIN_AUG_EPA, --min--aug-epa MIN_AUG_EPA Minimal augmented energy-per-atom (default None = no limit) -maxepa MAX_AUG_EPA, --max--aug-epa MAX_AUG_EPA Maximal augmented energy-per-atom (default None = 150) -eparmax EPA_RELIABLE_MAX, --epa-reliable-max EPA_RELIABLE_MAX Maximum for reliable energy-per-atom (default None = no limit) -nnstep NN_DISTANCE_STEP, --nn-dist-step NN_DISTANCE_STEP Nearest-neighbour distance step for data augmentation (default = 0.1) -nnmin NN_DISTANCE_MIN, --nn-dist-min NN_DISTANCE_MIN Nearest-neighbour distance step for data augmentation (default = 1) ``` ```bash pace_augment NiNb-FM-upfit-mu.yaml -a NiNb-FM-upfit-mu.asi -d df_all_NbNi_FM_new_str.pckl.gzip ``` -------------------------------- ### Compile ML-PACE Library for LAMMPS (make) Source: https://pacemaker.readthedocs.io/en/latest/pacemaker/quickstart Instructions for compiling the ML-PACE library within the LAMMPS source directory using the 'make' build system. This involves compiling the library and then including it in the LAMMPS compilation. ```bash cd lammps/src make lib-pace args="-b" make yes-ml-pace make serial # or make mpi ``` -------------------------------- ### Configure B-basis potential parameters Source: https://pacemaker.readthedocs.io/en/latest/pacemaker/inputfile Defines the structure of a B-basis potential including elements, embedding functions, bond parameters, and function expansion settings using YAML. ```yaml potential: deltaSplineBins: 0.001 elements: [ Al, Ni ] embeddings: Al: { npot: 'FinnisSinclairShiftedScaled', fs_parameters: [ 1, 1, 1, 0.5 ], ndensity: 2, rho_core_cut: 200000, drho_core_cut: 250 } Ni: { npot: 'FinnisSinclairShiftedScaled', fs_parameters: [ 1, 1 ], ndensity: 1, rho_core_cut: 3000, drho_core_cut: 150 } bonds: ALL: { radbase: ChebExpCos, radparameters: [ 5.25 ], rcut: 5, dcut: 0.01, r_in: 1.0, delta_in: 0.5, core-repulsion: [ 100.0, 5.0 ] } BINARY: { radbase: ChebPow, radparameters: [ 6.25 ], rcut: 5.5, dcut: 0.01, r_in: 1.0, delta_in: 0.5, core-repulsion: [ 10.0, 5.0 ] } functions: UNARY: { nradmax_by_orders: [ 15, 3, 2, 2, 1 ], lmax_by_orders: [ 0, 2, 2, 1, 1 ] } BINARY: { nradmax_by_orders: [ 15, 2, 2, 2 ], lmax_by_orders: [ 0, 2, 2, 1 ] } ``` -------------------------------- ### Run `pace_select` for D-optimality Structure Selection Source: https://pacemaker.readthedocs.io/en/latest/pacemaker/active_learning This command-line utility selects an optimal subset of extrapolative structures using the D-optimality criterion. It takes potential files, element mappings, and lists of structure dump files as input, and outputs a selected subset of structures. Options allow for specifying active sets, batch processing, and the number of structures to select. ```bash pace_select -p potential.yaml -a potential.asi -e "Ni Nb" -m 100 extrapolative_structures_1.dump extrapolative_structures_2.dump ``` -------------------------------- ### Select Representative Structures using D-optimality (Python CLI) Source: https://pacemaker.readthedocs.io/en/latest/pacemaker/utilities The `pace_select` utility selects the most representative training structures from a large dataset based on the D-optimality criterion. It requires a potential file and can take various optional arguments to control the selection process, such as the maximum number of structures, elements, and memory limits. The output is a file containing the selected structures. ```python usage: pace_select [-h] -p POTENTIAL_FILE [-a ACTIVE_SET_INV_FNAME] [-e ELEMENTS] [-m MAX_STRUCTURES] [-o SELECTED_STRUCTURES_FILENAME] [-b BATCH_SIZE] [-g GAMMA_TOLERANCE] [-i MAXVOL_ITERS] [-r MAXVOL_REFINEMENT] [-mem MEMORY_LIMIT] [-V] dataset [dataset ...] Utility to select structures for training se based on D-optimality criterion positional arguments: dataset Dataset file name(s), ex.: filename.pckl.gzip [extrapolative_structures.dat] optional arguments: -h, --help show this help message and exit -p POTENTIAL_FILE, --potential_file POTENTIAL_FILE B-basis file name (.yaml) -a ACTIVE_SET_INV_FNAME, --active-set-inv ACTIVE_SET_INV_FNAME Active Set Inverted (ASI) filename -e ELEMENTS, --elements ELEMENTS List of elements, used in LAMMPS, i.e. "Ni Nb O" -m MAX_STRUCTURES, --max-structures MAX_STRUCTURES Maximum number of structures to select (default -1 = all) -o SELECTED_STRUCTURES_FILENAME, --output SELECTED_STRUCTURES_FILENAME Selected structures filename, default: selected.pkl.gz -b BATCH_SIZE, --batch_size BATCH_SIZE Batch size (number of structures) considered simultaneously.If not provided - all dataset at once is considered -g GAMMA_TOLERANCE, --gamma_tolerance GAMMA_TOLERANCE Gamma tolerance -i MAXVOL_ITERS, --maxvol_iters MAXVOL_ITERS Number of maximum iteration in MaxVol algorithm -r MAXVOL_REFINEMENT, --maxvol_refinement MAXVOL_REFINEMENT Number of refinements (epochs) -mem MEMORY_LIMIT, --memory-limit MEMORY_LIMIT Memory limit (i.e. 1GB, 500MB or 'auto') -V suppress verbosity of numerical procedures ``` ```bash pace_select -p NiNb_potential.yaml -a NiNb_potential.asi -m 100 -e "Ni Nb" extrapolative_structures_1.dump extrapolative_structures_2.dump ``` -------------------------------- ### Configure Tensorpot Backend Evaluator Source: https://pacemaker.readthedocs.io/en/latest/pacemaker/inputfile Defines the backend evaluator settings in the YAML configuration file. It allows tuning of batch sizes and display frequency for metric calculations. ```yaml backend: evaluator: tensorpot # batch_size: 10 # batch_size_reduction: True # batch_size_reduction_factor: 1.618 # display_step: 20 ``` -------------------------------- ### Extend Basis Set (Ladder Scheme) Fitting in Pacemaker Source: https://pacemaker.readthedocs.io/en/latest/pacemaker/faq This section explains how to extend the basis set during a Pacemaker fitting process, often referred to as ladder scheme fitting. It involves specifying an initial potential file to build upon, allowing for incremental basis set growth. This is configured via the input.yaml file or the command line. ```yaml potential: ... initial_potential: /path/to/your/potential.yaml ... ``` ```bash pacemaker input.yaml -ip /path/to/your/potential.yaml ``` -------------------------------- ### Generate Active Sets with pace_activeset Source: https://pacemaker.readthedocs.io/en/latest/pacemaker/active_learning Command-line usage for generating linear and full active sets from a dataset and potential file. ```bash pace_activeset -d fitting_data_info.pckl.gzip output_potential.yaml pace_activeset -d fitting_data_info.pckl.gzip output_potential.yaml -f ``` -------------------------------- ### Collect DFT Data with pace_collect Source: https://pacemaker.readthedocs.io/en/latest/pacemaker/quickstart Utility to collect DFT calculation data (VASP) from specified directories. It processes `vasprun.xml` or `OUTCAR` files, calculates free energies and forces, applies single-atom corrections, and saves the results to a compressed pickle file. It supports specifying free atom energies manually or automatically. ```bash pace_collect -wd path/to/my_dft_calculation --free-atom-energy Al:-0.123 Cu:-0.456 ``` ```bash pace_collect -wd path/to/my_dft_calculation --free-atom-energy auto ``` -------------------------------- ### Use Active Set with ASE Calculator Source: https://pacemaker.readthedocs.io/en/latest/pacemaker/active_learning Python implementation for loading an active set into a PyACECalculator and retrieving per-atom extrapolation grades. ```python from pyace import * calc = PyACECalculator("output_potential.yaml") calc.set_active_set("output_potential.asi") atoms.set_calculator(calc) atoms.get_potential_energy() print(calc.results["gamma"]) ``` -------------------------------- ### Pacemaker Fit Statistics Log Source: https://pacemaker.readthedocs.io/en/latest/pacemaker/quickstart This snippet displays the fit statistics summary printed during Pacemaker's optimization process. It includes total loss, contributions from energy and forces, number of parameters/functions, and error metrics like RMSE, MAE, and MAX_AE for energy and forces. ```text --------------------------------------------FIT STATS-------------------------------------------- Iteration: #1000Loss: Total: 1.9159e-04 (100%) Energy: 1.6074e-04 ( 84%) Force: 3.0859e-05 ( 16%) L1: 0.0000e+00 ( 0%) L2: 0.0000e+00 ( 0%) Number of params./funcs: 232/86 Avg. time: 526.93 mcs/at ------------------------------------------------------------------------------------------------- Energy/at, meV/at Energy_low/at, meV/at Force, meV/A Force_low, meV/A RMSE: 17.93 16.73 7.86 7.06 MAE: 12.22 11.11 5.31 3.30 MAX_AE: 53.19 38.30 35.19 20.32 ------------------------------------------------------------------------------------------------- ``` -------------------------------- ### Evaluate Potential Energy and Forces Source: https://pacemaker.readthedocs.io/en/latest/pacemaker/quickstart This snippet demonstrates how to extract the potential energy and forces from an atoms object using the PACEMAKER calculator. It assumes the calculator is already attached to the atoms object. ```python # Evaluate properties energy = atoms.get_potential_energy() forces = atoms.get_forces() # Check more properties calc.results ``` -------------------------------- ### Integrate Extrapolation Grade in LAMMPS Source: https://pacemaker.readthedocs.io/en/latest/pacemaker/active_learning LAMMPS input script configuration to compute per-atom extrapolation grades, dump structures for active learning, and halt simulations on extreme extrapolation. ```lammps pair_style pace/extrapolation pair_coeff * * output_potential.yaml output_potential.asi Al Cu fix pace_gamma all pair 10 pace/extrapolation gamma 1 compute max_pace_gamma all reduce max f_pace_gamma variable dump_skip equal "c_max_pace_gamma < 5" dump pace_dump all custom 20 extrapolative_structures.dump id type x y z f_pace_gamma dump_modify pace_dump skip v_dump_skip variable max_pace_gamma equal c_max_pace_gamma fix extreme_extrapolation all halt 10 v_max_pace_gamma > 25 ``` -------------------------------- ### Set Ladder Step Parameters Source: https://pacemaker.readthedocs.io/en/latest/pacemaker/inputfile Configures the ladder_step in the fit section to control how basis functions are added during the hierarchical fitting process. ```yaml fit: ladder_step: [ 10, 0.02 ] ``` -------------------------------- ### Pacemaker Fitting Configuration Source: https://pacemaker.readthedocs.io/en/latest/pacemaker/inputfile Configuration block for the 'fit' section in Pacemaker, specifying parameters for loss functions, data weighting, and optimization. This section allows fine-tuning of the fitting process, including regularization, weighting policies, and optimization algorithms. ```yaml fit: ## LOSS FUNCTION OPTIONS ## loss: { ## [0..1] or auto, relative force weight, ## kappa = 0 - energies-only fit, ## kappa = 1 - forces-only fit ## auto - determined from dataset based on variance of energies and forces kappa: 0, ## L1-regularization coefficient L1_coeffs: 0, ## L2-regularization coefficient L2_coeffs: 0, ## w0 radial smoothness regularization coefficient w0_rad: 0, ## w1 radial smoothness regularization coefficient w1_rad: 0, ## w2 radial smoothness regularization coefficient w2_rad: 0 } ## DATA WEIGHTING OPTIONS ## weighting: { ## weights for the structures energies/forces are associated according to the distance to E_min: ## convex hull ( energy: convex_hull) or minimal energy per atom (energy: cohesive) type: EnergyBasedWeightingPolicy, ## number of structures to randomly select from the initial dataset nfit: 10000, ## only the structures with energy up to E_min + DEup will be selected DEup: 10.0, ## eV, upper energy range (E_min + DElow, E_min + DEup) ## only the structures with maximal force on atom up to DFup will be selected DFup: 50.0, ## eV/A ## lower energy range (E_min, E_min + DElow) DElow: 1.0, ## eV ## delta_E shift for weights, see paper DE: 1.0, ## delta_F shift for weights, see paper DF: 1.0, ## 0= 1 - number of basis functions to add in ladder scheme, ## - float between 0 and 1 - relative ladder step size wrt. current basis step ## - list of both above values - select maximum between two possibilities on each iteration ## see. Ladder scheme fitting for more info ## Possible values: ## body_order - new basis functions are added according to the body-order, i.e., a function with higher body-order ## will not be added until the list of functions of the previous body-order is exhausted ## power_order - the order of adding new basis functions is defined by the "power rank" p of a function. ## p = len(ns) + sum(ns) + sum(ls). Functions with the smallest p are added first #ladder_type: body_order # early stoppping ## min_relative_train_loss_per_iter: 5e-5 ## min_relative_test_loss_per_iter: 1e-5 ## early_stopping_patience: 200 ## callbacks during the fitting. Module quick_validation.py should be available for import ## see example/pacemaker_with_callback for more details and examples #callbacks: # - quick_validation.test_fcc_potential_callback ``` -------------------------------- ### Pacemaker Optimization Step Log Source: https://pacemaker.readthedocs.io/en/latest/pacemaker/quickstart This snippet shows the format of an optimization step log entry from Pacemaker. It includes iteration number, evaluation count, loss, RMSE for energy and forces, and time per evaluation. This helps in monitoring the progress of the fitting process. ```text Iteration #999 (1052 evals): Loss: 0.000192 | RMSE Energy(low): 17.95 (16.79) meV/at | Forces(low): 7.89 (7.04) meV/A | Time/eval: 517.83 mcs/at ``` -------------------------------- ### Convert Pacemaker Potential to YACE Format Source: https://pacemaker.readthedocs.io/en/latest/pacemaker/quickstart This command-line utility converts the final fitted potential from Pacemaker's YAML format to the YACE format, which is required for use with LAMMPS. ```bash pace_yaml2yace output_potential.yaml ``` -------------------------------- ### CLI: pace_select Source: https://pacemaker.readthedocs.io/en/latest/pacemaker/utilities Utility to select the most representative training structures from a large dataset using the D-optimality criterion. ```APIDOC ## CLI pace_select ### Description Selects a subset of training structures from a dataset using the D-optimality criterion to optimize training efficiency. ### Method CLI Command ### Endpoint pace_select [options] dataset [dataset ...] ### Parameters #### Positional Arguments - **dataset** (string) - Required - Dataset file name(s) (e.g., filename.pckl.gzip) #### Optional Arguments - **-p, --potential_file** (string) - Required - B-basis file name (.yaml) - **-m, --max-structures** (integer) - Optional - Maximum number of structures to select (default -1) - **-e, --elements** (string) - Optional - List of elements used in LAMMPS (e.g., "Ni Nb") - **-o, --output** (string) - Optional - Output filename for selected structures ### Request Example pace_select -p NiNb_potential.yaml -a NiNb_potential.asi -m 100 -e "Ni Nb" extrapolative_structures_1.dump ``` -------------------------------- ### Define Core-Repulsion Potential in Pacemaker Source: https://pacemaker.readthedocs.io/en/latest/pacemaker/faq This snippet shows how to define a core-repulsion potential in Pacemaker's input.yaml. This is used to ensure expected repulsive behavior at short distances, especially when training data lacks sufficient short-distance information. It replaces the standard ACE potential with an exponential repulsion. ```yaml potential: # ... other potential parameters ... core_repulsion: | # Define core repulsion parameters here # Example: # type: exponential # radius: 0.1 # strength: 10.0 ``` -------------------------------- ### CLI: pace_augment Source: https://pacemaker.readthedocs.io/en/latest/pacemaker/utilities Utility to generate an augmented dataset where energies and forces are predicted using ZBL potentials. ```APIDOC ## CLI pace_augment ### Description Generates an augmented dataset for training, incorporating ZBL and/or EOS data to improve model robustness. ### Method CLI Command ### Endpoint pace_augment [options] potential_file ### Parameters #### Positional Arguments - **potential_file** (string) - Required - B-basis file name (.yaml) #### Optional Arguments - **-d, --dataset** (string) - Required - Dataset file name(s) - **-m, --max-structures** (integer) - Optional - Maximum number of structures to select - **-o, --output** (string) - Optional - Augmented structures filename - **-mnat, --max-num-atoms** (integer) - Optional - Maximum number of atoms for seed structures ### Request Example pace_augment NiNb-FM-upfit-mu.yaml -a NiNb-FM-upfit-mu.asi -d df_all_NbNi_FM_new_str.pckl.gzip ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.