From 3a285ca8e38755b6f7a810543153b60dd122fb6d Mon Sep 17 00:00:00 2001 From: "Documenter.jl" Date: Sun, 15 Sep 2024 18:59:38 +0000 Subject: [PATCH] build based on a720285 --- dev/.documenter-siteinfo.json | 2 +- dev/all_exported/index.html | 6 +- dev/gettingstarted/aceintro/index.html | 2 +- dev/gettingstarted/installation/index.html | 2 +- .../parallel-fitting/index.html | 2 +- dev/gettingstarted/pkg/index.html | 2 +- .../saving-and-loading/index.html | 2 +- dev/index.html | 2 +- .../basic_julia_workflow/index.html | 56 +- .../dataset_analysis/58193850.svg | 854 ++++++++++++++++++ .../{0682dbc5.svg => 60323c83.svg} | 606 ++++++------- .../dataset_analysis/60da91d6.svg | 361 -------- .../dataset_analysis/8e0cf436.svg | 854 ------------------ .../dataset_analysis/d3be526d.svg | 361 ++++++++ .../dataset_analysis/index.html | 6 +- .../descriptor/{38d91eed.svg => 18c78ecb.svg} | 216 ++--- dev/literate_tutorials/descriptor/index.html | 4 +- .../{c7c25d36.svg => 92e274f7.svg} | 100 +- .../{3c766f4d.svg => cb6bde6f.svg} | 76 +- .../{57245b5f.svg => f4446e63.svg} | 84 +- .../smoothness_priors/index.html | 8 +- dev/tutorials/index.html | 2 +- dev/tutorials/lammps/index.html | 2 +- dev/tutorials/molly/index.html | 2 +- dev/tutorials/python_ase/index.html | 2 +- dev/tutorials/scripting/index.html | 2 +- 26 files changed, 1808 insertions(+), 1808 deletions(-) create mode 100644 dev/literate_tutorials/dataset_analysis/58193850.svg rename dev/literate_tutorials/dataset_analysis/{0682dbc5.svg => 60323c83.svg} (50%) delete mode 100644 dev/literate_tutorials/dataset_analysis/60da91d6.svg delete mode 100644 dev/literate_tutorials/dataset_analysis/8e0cf436.svg create mode 100644 dev/literate_tutorials/dataset_analysis/d3be526d.svg rename dev/literate_tutorials/descriptor/{38d91eed.svg => 18c78ecb.svg} (82%) rename dev/literate_tutorials/smoothness_priors/{c7c25d36.svg => 92e274f7.svg} (88%) rename dev/literate_tutorials/smoothness_priors/{3c766f4d.svg => cb6bde6f.svg} (88%) rename dev/literate_tutorials/smoothness_priors/{57245b5f.svg => f4446e63.svg} (87%) diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index 96648123..8cb1e6f5 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.10.5","generation_timestamp":"2024-09-15T09:49:45","documenter_version":"1.7.0"}} \ No newline at end of file +{"documenter":{"julia_version":"1.10.5","generation_timestamp":"2024-09-15T18:59:19","documenter_version":"1.7.0"}} \ No newline at end of file diff --git a/dev/all_exported/index.html b/dev/all_exported/index.html index b1f26d29..94da3066 100644 --- a/dev/all_exported/index.html +++ b/dev/all_exported/index.html @@ -1,6 +1,6 @@ -Reference · ACEpotentials.jl

ACEpotentials.jl API

Exported

ACEpotentials.acefit!Method

acefit!(rawdata, model; kwargs...)

provides a convenient interface to fitting the parameters of an ACE model. The data should be provided as a collection of AbstractSystem structures.

Keyword arguments:

  • energy_key, force_key, virial_key specify

the label of the data to which the parameters will be fitted.

  • weights specifies the regression weights, default is 30 for energy, 1 for forces and virials
  • solver specifies the lsq solver, default is BLR (BayesianLinearRegression)
  • smoothness specifies the smoothness prior, i.e. how strongly damped parameters corresponding to high polynomial degrees are; is 2.
  • prior specifies a covariance of the prior, if nothing then a smoothness prior is used, using the smoothness parameter
  • repulsion_restraint specifies whether to add artificial data to the training set that effectively introduces a restraints encouraging repulsion in the limit rij -> 0.
  • restraint_weight specifies the weight of the repulsion restraint.
  • export_lammps : path to a file to which the fitted potential will be exported in a LAMMPS compatible format (yace)
  • export_json : path to a file to which the fitted potential will be exported in a JSON format, which can be read from Julia or Python
source
ACEpotentials.site_descriptorsMethod
site_descriptors(system::AbstractSystem, model::ACEPotential;
-                 domain, nlist)

Compute site descriptors for all atoms in system, returning them as a vector of vectors. If the optional kw argument domain is passed as a list of integers (atom indices), then only the site descriptors for those atoms are computed and returned. The neighbourlist nlist can be supplied optionally as a kw arg, otherwise it is recomputed.

source

Not exported

ACEpotentials.at_dimerMethod

function at_dimer(r, z1, z0) : generates a dimer with separation r and atomic numbers z1 and z0. (can also use symbols or strings)

source
ACEpotentials.at_trimerMethod

function at_trimer(r1, r2, θ, z0, z1, z2) : generates a trimer with separations r1 and r2, angle θ and atomic numbers z0, z1 and z2 (can also use symbols or strings), where z0 is the species of the central atom, z1 at distance r1 and z2 at distance r2.

source
ACEpotentials.copy_runfitMethod
  copy_runfit(dest)

Copies the runfit.jl script and an example model parameter file to dest. If called from the destination directory, use

ACEpotentials.copy_runfit(@__DIR__())

This is intended to setup a local project directory with the necessary scripts to run a fitting job.

source
ACEpotentials.decohesion_curveMethod

Generate a decohesion curve for testing the smoothness of a potential. Arguments:

  • at0 : unit cell
  • pot : potential implementing energy

Keyword Arguments:

  • dim = 1 : dimension into which to expand
  • mult = 10 : multiplicative factor for expanding the cell in dim direction
  • aa = :auto : array of stretch values of the lattice parameter to use
  • npoints = 100 : number of points to use in the stretch array (for auto aa)
source
ACEpotentials.dimer_energyMethod

function dimer_energy(pot, r, z1, z0) : energy of a dimer with separation r and atomic numbers z1 and z0 using the potential pot; subtracting the 1-body contributions.

source
ACEpotentials.dimersMethod

dimers(potential, elements; kwargs...) : Generate a dictionary of dimer curves for a given potential.

  • potential : potential to use to evaluate energy
  • elements : list of chemical species, symbols for which the dimers are to be computed

The function returns a dictionary Ddim such that D[(s1, s2)] contains pairs or arrays (rr, E) which can be plotted plot(rr, E).

source
ACEpotentials.get_adfMethod

function get_adf(data::AbstractVector{<: Atoms}, r_cut; kwargs...) :

Angular distribution, i.e. list of angles in [0, π] between all pairs of bonds of length at most r_cut. Keyword arguments:

  • skip = 3 : only consider every skipth atom in the dataset.
  • maxsamples = 100_000 : maximum number of samples to return.
source
ACEpotentials.get_rdfMethod

function get_rdf(data::AbstractVector{<: Atoms}, r_cut; kwargs...) :

Produce a list of r values that occur in the dataset, restricted to the cutoff radius r_cut. Keyword arguments:

  • rescale = true : resample the data to account for volume scaling, i.e. a distance r will be kept with probability min(1, (r0/r)^2).
  • r0 = :min : parameter for resampling. If :min then the minimum r occuring in the dataset is taken.
  • maxsamples = 100_000 : maximum number of samples to return.
source
ACEpotentials.make_modelMethod
  make_model(model_dict::Dict)

User-facing script to generate a model from a dictionary. See documentation for details.

source
ACEpotentials.save_modelMethod
  save_model(model, filename; kwargs...)

save model constructor, model parameters, and other information to a JSON file.

  • model : the model to be saved
  • filename : the name of the file to which the model will be saved
  • model_spec : the arguments used to construct the model; without this the model cannot be reconstructed unless the original script is available
  • errors : the fitting / test errors computed during the fitting
  • verbose : print information about the saving process
  • save_project : save Project.toml and Manifest.toml for reproducibility
source
ACEpotentials.trimer_energyMethod

function trimer_energy(IP, r1, r2, θ, z0, z1, z2) : computes the energy of a trimer, subtracting the 2-body and 1-body contributions.

source
ACEpotentials.trimersMethod

trimers(potential, elements, r1, r2; kwargs...) : Generate a dictionary of trimer curves for a given potential.

  • potential : potential to use to evaluate energy
  • elements : list of chemical species, symbols for which the trimers are to be computed
  • r1, r2 : distance between the central atom and the first, second neighbour

The function returns a dictionary Dtri such that D[(s1, s2, s3)] contains pairs or arrays (θ, E) which can be plotted plot(θ, E).

source
ACEpotentials.Models.OneBodyType

mutable struct OneBody{T}

this should not normally be constructed by a user, but instead E0 should be passed to the relevant model constructor, which will construct it.

source
ACEpotentials.Models._AA_dotMethod

This naive code is not supposed to be fast, it is only used to generate a dynamic polynomial representating the operation AA ⋅ c -> εᵢ

The generated (giant) polynomial is then used to generate optimized evaluation and gradient code.

source
ACEpotentials.Models._make_smatrixMethod

Takes an object and converts it to an SMatrix{NZ, NZ} via the following rules:

  • if obj is already an SMatrix{NZ, NZ} then it just return obj
  • if obj is an AbstractMatrix and size(obj) == (NZ, NZ) then it converts it to an SMatrix{NZ, NZ} with the same entries.
  • otherwise it generates an SMatrix{NZ, NZ} filled with the value obj.
source
ACEpotentials.Models.agnesi_transformMethod

function agnesi_transform: constructs a generalized agnesi transform.

trans = agnesi_transform(r0, p, q)

with q >= p. This generates an AnalyticTransform object that implements

\[ x(r) = \frac{1}{1 + a (r/r_0)^q / (1 + (r/r0)^(q-p))}\]

with default a chosen such that $|x'(r)|$ is maximised at $r = r_0$. But a may also be specified directly as a keyword argument.

The transform satisfies

\[ x(r) \sim \frac{1}{1 + a (r/r_0)^p} \quad \text{as} \quad r \to 0 +Reference · ACEpotentials.jl

ACEpotentials.jl API

Exported

ACEpotentials.acefit!Method

acefit!(rawdata, model; kwargs...)

provides a convenient interface to fitting the parameters of an ACE model. The data should be provided as a collection of AbstractSystem structures.

Keyword arguments:

  • energy_key, force_key, virial_key specify

the label of the data to which the parameters will be fitted.

  • weights specifies the regression weights, default is 30 for energy, 1 for forces and virials
  • solver specifies the lsq solver, default is BLR (BayesianLinearRegression)
  • smoothness specifies the smoothness prior, i.e. how strongly damped parameters corresponding to high polynomial degrees are; is 2.
  • prior specifies a covariance of the prior, if nothing then a smoothness prior is used, using the smoothness parameter
  • repulsion_restraint specifies whether to add artificial data to the training set that effectively introduces a restraints encouraging repulsion in the limit rij -> 0.
  • restraint_weight specifies the weight of the repulsion restraint.
  • export_lammps : path to a file to which the fitted potential will be exported in a LAMMPS compatible format (yace)
  • export_json : path to a file to which the fitted potential will be exported in a JSON format, which can be read from Julia or Python
source
ACEpotentials.site_descriptorsMethod
site_descriptors(system::AbstractSystem, model::ACEPotential;
+                 domain, nlist)

Compute site descriptors for all atoms in system, returning them as a vector of vectors. If the optional kw argument domain is passed as a list of integers (atom indices), then only the site descriptors for those atoms are computed and returned. The neighbourlist nlist can be supplied optionally as a kw arg, otherwise it is recomputed.

source

Not exported

ACEpotentials.at_dimerMethod

function at_dimer(r, z1, z0) : generates a dimer with separation r and atomic numbers z1 and z0. (can also use symbols or strings)

source
ACEpotentials.at_trimerMethod

function at_trimer(r1, r2, θ, z0, z1, z2) : generates a trimer with separations r1 and r2, angle θ and atomic numbers z0, z1 and z2 (can also use symbols or strings), where z0 is the species of the central atom, z1 at distance r1 and z2 at distance r2.

source
ACEpotentials.copy_runfitMethod
  copy_runfit(dest)

Copies the runfit.jl script and an example model parameter file to dest. If called from the destination directory, use

ACEpotentials.copy_runfit(@__DIR__())

This is intended to setup a local project directory with the necessary scripts to run a fitting job.

source
ACEpotentials.decohesion_curveMethod

Generate a decohesion curve for testing the smoothness of a potential. Arguments:

  • at0 : unit cell
  • pot : potential implementing energy

Keyword Arguments:

  • dim = 1 : dimension into which to expand
  • mult = 10 : multiplicative factor for expanding the cell in dim direction
  • aa = :auto : array of stretch values of the lattice parameter to use
  • npoints = 100 : number of points to use in the stretch array (for auto aa)
source
ACEpotentials.dimer_energyMethod

function dimer_energy(pot, r, z1, z0) : energy of a dimer with separation r and atomic numbers z1 and z0 using the potential pot; subtracting the 1-body contributions.

source
ACEpotentials.dimersMethod

dimers(potential, elements; kwargs...) : Generate a dictionary of dimer curves for a given potential.

  • potential : potential to use to evaluate energy
  • elements : list of chemical species, symbols for which the dimers are to be computed

The function returns a dictionary Ddim such that D[(s1, s2)] contains pairs or arrays (rr, E) which can be plotted plot(rr, E).

source
ACEpotentials.get_adfMethod

function get_adf(data::AbstractVector{<: Atoms}, r_cut; kwargs...) :

Angular distribution, i.e. list of angles in [0, π] between all pairs of bonds of length at most r_cut. Keyword arguments:

  • skip = 3 : only consider every skipth atom in the dataset.
  • maxsamples = 100_000 : maximum number of samples to return.
source
ACEpotentials.get_rdfMethod

function get_rdf(data::AbstractVector{<: Atoms}, r_cut; kwargs...) :

Produce a list of r values that occur in the dataset, restricted to the cutoff radius r_cut. Keyword arguments:

  • rescale = true : resample the data to account for volume scaling, i.e. a distance r will be kept with probability min(1, (r0/r)^2).
  • r0 = :min : parameter for resampling. If :min then the minimum r occuring in the dataset is taken.
  • maxsamples = 100_000 : maximum number of samples to return.
source
ACEpotentials.make_modelMethod
  make_model(model_dict::Dict)

User-facing script to generate a model from a dictionary. See documentation for details.

source
ACEpotentials.save_modelMethod
  save_model(model, filename; kwargs...)

save model constructor, model parameters, and other information to a JSON file.

  • model : the model to be saved
  • filename : the name of the file to which the model will be saved
  • model_spec : the arguments used to construct the model; without this the model cannot be reconstructed unless the original script is available
  • errors : the fitting / test errors computed during the fitting
  • verbose : print information about the saving process
  • save_project : save Project.toml and Manifest.toml for reproducibility
source
ACEpotentials.trimer_energyMethod

function trimer_energy(IP, r1, r2, θ, z0, z1, z2) : computes the energy of a trimer, subtracting the 2-body and 1-body contributions.

source
ACEpotentials.trimersMethod

trimers(potential, elements, r1, r2; kwargs...) : Generate a dictionary of trimer curves for a given potential.

  • potential : potential to use to evaluate energy
  • elements : list of chemical species, symbols for which the trimers are to be computed
  • r1, r2 : distance between the central atom and the first, second neighbour

The function returns a dictionary Dtri such that D[(s1, s2, s3)] contains pairs or arrays (θ, E) which can be plotted plot(θ, E).

source
ACEpotentials.Models.OneBodyType

mutable struct OneBody{T}

this should not normally be constructed by a user, but instead E0 should be passed to the relevant model constructor, which will construct it.

source
ACEpotentials.Models._AA_dotMethod

This naive code is not supposed to be fast, it is only used to generate a dynamic polynomial representating the operation AA ⋅ c -> εᵢ

The generated (giant) polynomial is then used to generate optimized evaluation and gradient code.

source
ACEpotentials.Models._make_smatrixMethod

Takes an object and converts it to an SMatrix{NZ, NZ} via the following rules:

  • if obj is already an SMatrix{NZ, NZ} then it just return obj
  • if obj is an AbstractMatrix and size(obj) == (NZ, NZ) then it converts it to an SMatrix{NZ, NZ} with the same entries.
  • otherwise it generates an SMatrix{NZ, NZ} filled with the value obj.
source
ACEpotentials.Models.agnesi_transformMethod

function agnesi_transform: constructs a generalized agnesi transform.

trans = agnesi_transform(r0, p, q)

with q >= p. This generates an AnalyticTransform object that implements

\[ x(r) = \frac{1}{1 + a (r/r_0)^q / (1 + (r/r0)^(q-p))}\]

with default a chosen such that $|x'(r)|$ is maximised at $r = r_0$. But a may also be specified directly as a keyword argument.

The transform satisfies

\[ x(r) \sim \frac{1}{1 + a (r/r_0)^p} \quad \text{as} \quad r \to 0 \quad \text{and} \quad - x(r) \sim \frac{1}{1 + a (r/r_0)^p} \quad \text{as} r \to \infty.\]

As default parameters we recommend p = 2, q = 4 and the defaults for a.

source
ACEpotentials.Models.fast_evaluatorMethod
  fast_evaluator(model; aa_static = :auto)

Constructs an experimental "fast evaluator" for a fitted model, which merges some operations resulting in a "slimmer" and usually faster evaluator. In some cases the performance gain can be significant, especially when the fitted parameters are sparse.

To construct the fast evaluator,

fpot = fast_evaluator(model)

An optional keyword argument aa_static = true can be used to enforce optimizing the n-correlation layer for very small models (at most a few hundred parameters). For larger models this results in a stack overflow.

source
ACEpotentials.Models.get_nnll_specMethod

Get the specification of the BBbasis as a list (Vector) of vectors of @NamedTuple{n::Int, l::Int}.

Parameters

  • tensor : a SparseEquivTensor, possibly from ACEModel
source
ACEpotentials.Models.sparse_AA_specMethod

This is one of the most important functions to generate an ACE model with sparse AA basis. It generates the AA basis specification as a list (Vector) of vectors of @NamedTuple{n::Int, l::Int, m::Int}.

Parameters

  • order : maximum correlation order
  • r_spec : radial basis specification in the format Vector{@NamedTuple{a::Int64, b::Int64}}
  • max_level : maximum level of the basis, either a single scalar, or an iterable (one for each order)
  • level : a function that computes the level of a basis element; see e.g. TotalDegree and EuclideanDegree
source
+ x(r) \sim \frac{1}{1 + a (r/r_0)^p} \quad \text{as} r \to \infty.\]

As default parameters we recommend p = 2, q = 4 and the defaults for a.

source
ACEpotentials.Models.fast_evaluatorMethod
  fast_evaluator(model; aa_static = :auto)

Constructs an experimental "fast evaluator" for a fitted model, which merges some operations resulting in a "slimmer" and usually faster evaluator. In some cases the performance gain can be significant, especially when the fitted parameters are sparse.

To construct the fast evaluator,

fpot = fast_evaluator(model)

An optional keyword argument aa_static = true can be used to enforce optimizing the n-correlation layer for very small models (at most a few hundred parameters). For larger models this results in a stack overflow.

source
ACEpotentials.Models.get_nnll_specMethod

Get the specification of the BBbasis as a list (Vector) of vectors of @NamedTuple{n::Int, l::Int}.

Parameters

  • tensor : a SparseEquivTensor, possibly from ACEModel
source
ACEpotentials.Models.sparse_AA_specMethod

This is one of the most important functions to generate an ACE model with sparse AA basis. It generates the AA basis specification as a list (Vector) of vectors of @NamedTuple{n::Int, l::Int, m::Int}.

Parameters

  • order : maximum correlation order
  • r_spec : radial basis specification in the format Vector{@NamedTuple{a::Int64, b::Int64}}
  • max_level : maximum level of the basis, either a single scalar, or an iterable (one for each order)
  • level : a function that computes the level of a basis element; see e.g. TotalDegree and EuclideanDegree
source
diff --git a/dev/gettingstarted/aceintro/index.html b/dev/gettingstarted/aceintro/index.html index 6c89c980..170e68bd 100644 --- a/dev/gettingstarted/aceintro/index.html +++ b/dev/gettingstarted/aceintro/index.html @@ -6,4 +6,4 @@ \sum_j \phi_{nlm}({\bm r}_j).\]

Density correlations

Next, we form the $N$-correlations of the density, $\rho^{\otimes N}$ and project them onto the tensor project basis,

\[ {\bm A}_{\mathbf{nlm}} = \Big\langle \otimes_{t = 1}^N \phi_{n_t l_t m_t}, \rho^{\otimes N} \Big\rangle = \prod_{t = 1}^N A_{n_t l_t m_t}.\]

The reason to introduce these is that in the next step, the symmetrisation step, the density project would lose all angular information while the $N$-correlations retain most (though not all) of it.

Symmetrisation

Finally, we symmetrise the $N$-correlations, by integrating over the $O(3)$-Haar measure,

\[ B_{\mathbf{nlm}} \propto - \int_{O(3)} {\bm A}_{\mathbf{nlm}} \circ Q \, dQ \]

Because of properties of the spherical harmonics one can write this as

\[ {\bm B} = \mathcal{U} {\bm A},\]

where ${\bm A}$ is the vector of 1, 2, ..., N correlations (the maximal $N$ is an approximation parameter!) and $\mathcal{U}$ is a sparse matrix (the coupling coefficients).

If one symmetrised all possible $N$-correlations then this would create a spanning set, but one can easily reduce this to an actual basis. This construction then yields a basis of the space of symmetric polynomials.

Notes:

Linear Dependence

The construction described above introduces a lot of linear dependence which is removed in the ACE basis construction in a mixed symbolic / numerical procedure. In the end we no longer index the symmetrized basis functions as $B_{\bm nlm}$ but as $B_{\mathbf{nl}i}$ with $i$ indexing the linearly independent basis functions from the $\mathbf{nl}$ block.

+ \int_{O(3)} {\bm A}_{\mathbf{nlm}} \circ Q \, dQ \]

Because of properties of the spherical harmonics one can write this as

\[ {\bm B} = \mathcal{U} {\bm A},\]

where ${\bm A}$ is the vector of 1, 2, ..., N correlations (the maximal $N$ is an approximation parameter!) and $\mathcal{U}$ is a sparse matrix (the coupling coefficients).

If one symmetrised all possible $N$-correlations then this would create a spanning set, but one can easily reduce this to an actual basis. This construction then yields a basis of the space of symmetric polynomials.

Notes:

Linear Dependence

The construction described above introduces a lot of linear dependence which is removed in the ACE basis construction in a mixed symbolic / numerical procedure. In the end we no longer index the symmetrized basis functions as $B_{\bm nlm}$ but as $B_{\mathbf{nl}i}$ with $i$ indexing the linearly independent basis functions from the $\mathbf{nl}$ block.

diff --git a/dev/gettingstarted/installation/index.html b/dev/gettingstarted/installation/index.html index e37e932e..834c0b7e 100644 --- a/dev/gettingstarted/installation/index.html +++ b/dev/gettingstarted/installation/index.html @@ -10,4 +10,4 @@ registry add https://github.com/ACEsuit/ACEregistry

Press Backspace or Ctrl-c to exit the package manager. Use Ctrl-d, or exit() followed by Enter, to close the Julia REPL.

Setting up a new ACEpotentials.jl project

Create a folder for your new project and change to it. Start the Julia REPL and activate a new project by switching to the package manager with ], and then running

activate .

Now you can install ACEpotentials. Remaining in the package manager, use

add ACEpotentials

Depending on your usage you may also need to add other packages, e.g. AtomsBase, Molly, DFTK etc.

Returning to a project

When returning to a project, there are several methods for reactivating it. One is to simply activate . in the package manager, as above. Alternatively set the JULIA_PROJECT environment variable to the directory with Project.toml before starting julia, or call julia as julia --project=<dir>. Special syntax like JULIA_PROJECT=@. or julia --project=@. searches the current directory and its parents for a Project.toml file.

Setting up the Python ASE calculator

Warning

The current version of ACEpotentials does not have a tested ASE interface. If you need an ASE interface, consider using a version < 0.8 of ACEpotentials.

We use a wrapper called pyjulip to call julia and evaluate ACE potentials. In a terminal, with the correct julia project and python environment selected, run the following code:

python -m pip install julia
 python -c "import julia; julia.install()"

Make sure to use the correct python and pip, e.g. the ones that are in the correct Conda environment. Then, to set up pyjulip:

git clone https://github.com/casv2/pyjulip.git
 cd pyjulip
-pip install .

Troubleshooting

There are currently no known recurring problems with ACEpotentials installation.

+pip install .

Troubleshooting

There are currently no known recurring problems with ACEpotentials installation.

diff --git a/dev/gettingstarted/parallel-fitting/index.html b/dev/gettingstarted/parallel-fitting/index.html index 6dd2c729..5d7897f4 100644 --- a/dev/gettingstarted/parallel-fitting/index.html +++ b/dev/gettingstarted/parallel-fitting/index.html @@ -5,4 +5,4 @@ @everywhere using ACEpotentials

Parallel BLAS or LAPACK

Many ACEfit solvers, and possibly other routines, utilize BLAS or LAPACK. To see benefits from threading, one should set one or more of the following environment variables, depending on the particular library used.

export OMP_NUM_THREADS=8
 export MKL_NUM_THREADS=8
 export OPENBLAS_NUM_THREADS=8
-export VECLIB_MAXIMUM_THREADS=8

Distributed solution of the linear least squares systems is currently not supported. We would welcome collaboration on this with interested developers.

+export VECLIB_MAXIMUM_THREADS=8

Distributed solution of the linear least squares systems is currently not supported. We would welcome collaboration on this with interested developers.

diff --git a/dev/gettingstarted/pkg/index.html b/dev/gettingstarted/pkg/index.html index 616f057a..8c1a7be6 100644 --- a/dev/gettingstarted/pkg/index.html +++ b/dev/gettingstarted/pkg/index.html @@ -1,4 +1,4 @@ Using the Julia Package Manager · ACEpotentials.jl

Using the Julia Package Manager

This is a very brief introduction to the Julia package manager, intended for newcomers to Julia who are here primarily to use the ACEsuit. But it is not really ACE specific at all.

The package manager provides functionality to organize reproducable Julia projects. A project is specified by a Project.toml where the user specifies which packages are required, and version bounds on those packages. The Package manager can then resolve these dependencies which results in a Manifest.toml where the full Julia environment is precisely specified. This can be used in a workflow as follows:

  1. To start a new project that uses ACEpotentials.jl, e.g. to develop a new interatomic potential for TiAl we first create a new folder where the project will live, e.g., ace_TiAl_project. Change to that folder and start the Julia REPL. Type ] to switch to the package manager, then activate a new project in the current directory via activate .

  2. You now have an empty project. Start adding the packages you need, often just add ACEpotentials will suffice. Type status to see your required packages listed. (Note this is only a subset of the installed packages!). Exit the REPL and type ls; you will then see a new file Project.toml which lists the project requirements, and a Manifest.toml which lists the actually packages and the version that have been installed.

  3. Specify version bounds: We strongly encourage doing this rigorously! Open Project.toml in an editor and under the [compat] section you can now add version bounds, e.g. ACEpotentials = "0.6.1" following semver. Please see the Pkg.jl docs for details on how to specify those bounds. Start a Julia REPL again, type ] to switch to the package manager and then up to up- or down-grade all installed packages to the latest version compatible with your bounds.

Using a Development Branch (rarely required)

If you are a user rather than developer it should almost never be required for you to check out a package (or, dev it in the package manager). When developers make changes to - say - ACEpotentials.jl they will always immediately tag another version and then you can adjust your version bounds in your project to update as well as enforce which version to use. However a developer would frequently do this, and occasionally it might be required when iterating between a user and developer for testing. There are multiple ways to achieve this; the following is our recommended procedure:

Suppose for example that a development branch co/dev of ACE1.jl is needed in a project project. Then one should perform the following steps:

  • Make sure ACE1 has been added to project/Project.toml
  • In a separate folder, /path/to/ , clone ACE1.jl
cd /path/to
 git clone git@github.com:ACEsuit/ACE1.jl.git
-git checkout co/dev

so that the repo will now live in /path/to/ACE1.jl

  • Go to and activate project, then in a Julia REPL switch to the package manager ] and execute
dev /path/to/ACE1.jl

This will replace the ACE1 package in the Manifest with the version that lives in /path/to/ACE1.jl

Later on, when you want to go back to the standad Pkg versin control you can simply free ACE1.

Further Notes

  • The Project.toml should always be committed to your project git repo. Whether Manifest.toml is also committed is a matter of taste or context. Tracking the Manifest will (normally) ensure future compatibility since it allows you to reconstruct the precise Julia environment that was used when the Manifest was created.
  • https://pkgdocs.julialang.org/v1/
  • https://pkgdocs.julialang.org/v1/compatibility/
+git checkout co/dev

so that the repo will now live in /path/to/ACE1.jl

dev /path/to/ACE1.jl

This will replace the ACE1 package in the Manifest with the version that lives in /path/to/ACE1.jl

Later on, when you want to go back to the standad Pkg versin control you can simply free ACE1.

Further Notes

diff --git a/dev/gettingstarted/saving-and-loading/index.html b/dev/gettingstarted/saving-and-loading/index.html index 1208458f..796df789 100644 --- a/dev/gettingstarted/saving-and-loading/index.html +++ b/dev/gettingstarted/saving-and-loading/index.html @@ -1,2 +1,2 @@ -Saving and Loading Potentials · ACEpotentials.jl

Saving and Loading Potentials

Warning

Saving and loading potentials is currently only supported for the a workflow that uses JSON / dictionaries to specify models. For anything "too creative" the user is responsible for ensuring reproducability.

General Principles

Loading a saved potentials is only guaranteed if the Julia environment remains the same. A new project should therefore always work with a specified Project.toml and Manifest.toml. See out Pkg intro for a brief introduction and references to further details.

If the manifest changes, but the ACEpotentials version remains the same or a backward compatible update (cf semver) then in principle a saved potential should remain loadable. We cannot guarntee this but would consider it a bug if this is not the case.

Normally, we save the entire Julia environment together with a fitted potential. This way it should always be possible to reconstruct the environment and hence the potential. More details follow.

Saving JSON-specified potentials

If using the runfit.jl script, then an output folder is specified, where all information including the full model specification and model parameters are stored as a JSON file (together with other meta-information).

Loading a JSON-specified potential

Suppose the result of runfit.jl (or an analogous approach) is saved to path/result.json. If the original or a compatible Julia environment is activated, then

model, meta = ACEpotentials.load_model("path/result.json")

will return a model::ACEPotential structure that should be equivalent to the original fitted potential. The meta::Dict dictionary contains all the remaining information saved in result.json.

Recovering the Julia environment

At the moment, this process is not implemented, but the result.json file can loaded into a dictionary which can then be investigated to manually reconstruct the environment and then load the potential as described in the previous section.

+Saving and Loading Potentials · ACEpotentials.jl

Saving and Loading Potentials

Warning

Saving and loading potentials is currently only supported for the a workflow that uses JSON / dictionaries to specify models. For anything "too creative" the user is responsible for ensuring reproducability.

General Principles

Loading a saved potentials is only guaranteed if the Julia environment remains the same. A new project should therefore always work with a specified Project.toml and Manifest.toml. See out Pkg intro for a brief introduction and references to further details.

If the manifest changes, but the ACEpotentials version remains the same or a backward compatible update (cf semver) then in principle a saved potential should remain loadable. We cannot guarntee this but would consider it a bug if this is not the case.

Normally, we save the entire Julia environment together with a fitted potential. This way it should always be possible to reconstruct the environment and hence the potential. More details follow.

Saving JSON-specified potentials

If using the runfit.jl script, then an output folder is specified, where all information including the full model specification and model parameters are stored as a JSON file (together with other meta-information).

Loading a JSON-specified potential

Suppose the result of runfit.jl (or an analogous approach) is saved to path/result.json. If the original or a compatible Julia environment is activated, then

model, meta = ACEpotentials.load_model("path/result.json")

will return a model::ACEPotential structure that should be equivalent to the original fitted potential. The meta::Dict dictionary contains all the remaining information saved in result.json.

Recovering the Julia environment

At the moment, this process is not implemented, but the result.json file can loaded into a dictionary which can then be investigated to manually reconstruct the environment and then load the potential as described in the previous section.

diff --git a/dev/index.html b/dev/index.html index 127e4d4d..9c7fc408 100644 --- a/dev/index.html +++ b/dev/index.html @@ -1,2 +1,2 @@ -Home · ACEpotentials.jl

ACEpotentials.jl Documentation

ACEpotentials.jl facilitates the creation and use of atomic cluster expansion (ACE) interatomic potentials. For a quick start, we recommend reading the installation instructions, followed by the tutorials.

ACE models are defined in terms of body-ordered invariant features of atomic environments. For mathematical details, see this brief introduction and the references listed below.

Overview

ACEpotentials.jl ties together several Julia packages implementing different aspects of ACE modelling and fitting and provides some additional fitting and analysis tools for convenience. For example, it provides routines for parsing and manipulating the data to which interatomic potentials are fit (total energies, forces, virials, etc). Moreover, it integrates ACE potentials with the JuliaMolSim eco-system. These pages document ACEpotentialstogether with the relevant parts of the wider ecosystem.

References

  • Drautz, R.: Atomic cluster expansion for accurate and transferable interatomic potentials. Phys. Rev. B Condens. Matter. 99, 014104 (2019). [DOI] [arxiv]

  • G. Dusson, M. Bachmayr, G. Csanyi, S. Etter, C. van der Oord, and C. Ortner. Atomic cluster expansion: Completeness, efficiency and stability. J. Comp. Phys. 454, 110946, 2022. [DOI] [arxiv]

  • W. C. Witt, C. van der Oord, E. Gelžinyté, T. Järvinen, A. Ross, J. P. Darby, C. H. Ho, W. J. Baldwin, M. Sachs, J. Kermode, N. Bernstein, G. Csányi, and C. Ortner. ACEpotentials.jl: A Julia Implementation of the Atomic Cluster Expansion. J. Chem. Phys., 159:164101, 2023. [DOI] [arxiv]

Key Dependencies

+Home · ACEpotentials.jl

ACEpotentials.jl Documentation

ACEpotentials.jl facilitates the creation and use of atomic cluster expansion (ACE) interatomic potentials. For a quick start, we recommend reading the installation instructions, followed by the tutorials.

ACE models are defined in terms of body-ordered invariant features of atomic environments. For mathematical details, see this brief introduction and the references listed below.

Overview

ACEpotentials.jl ties together several Julia packages implementing different aspects of ACE modelling and fitting and provides some additional fitting and analysis tools for convenience. For example, it provides routines for parsing and manipulating the data to which interatomic potentials are fit (total energies, forces, virials, etc). Moreover, it integrates ACE potentials with the JuliaMolSim eco-system. These pages document ACEpotentialstogether with the relevant parts of the wider ecosystem.

References

  • Drautz, R.: Atomic cluster expansion for accurate and transferable interatomic potentials. Phys. Rev. B Condens. Matter. 99, 014104 (2019). [DOI] [arxiv]

  • G. Dusson, M. Bachmayr, G. Csanyi, S. Etter, C. van der Oord, and C. Ortner. Atomic cluster expansion: Completeness, efficiency and stability. J. Comp. Phys. 454, 110946, 2022. [DOI] [arxiv]

  • W. C. Witt, C. van der Oord, E. Gelžinyté, T. Järvinen, A. Ross, J. P. Darby, C. H. Ho, W. J. Baldwin, M. Sachs, J. Kermode, N. Bernstein, G. Csányi, and C. Ortner. ACEpotentials.jl: A Julia Implementation of the Atomic Cluster Expansion. J. Chem. Phys., 159:164101, 2023. [DOI] [arxiv]

Key Dependencies

diff --git a/dev/literate_tutorials/basic_julia_workflow/index.html b/dev/literate_tutorials/basic_julia_workflow/index.html index f8fe2d9b..3b5620f2 100644 --- a/dev/literate_tutorials/basic_julia_workflow/index.html +++ b/dev/literate_tutorials/basic_julia_workflow/index.html @@ -47,63 +47,63 @@ [ Info: Assembling linear problem. [ Info: - Creating feature matrix with size (1770, 270). [ Info: - Beginning assembly with processor count: 1. - Progress: 3%|█▎ | ETA: 0:07:39 Progress: 9%|███▊ | ETA: 0:02:41 Progress: 14%|█████▋ | ETA: 0:01:47 Progress: 18%|███████▌ | ETA: 0:01:19 Progress: 23%|█████████▍ | ETA: 0:01:02 Progress: 27%|███████████▏ | ETA: 0:00:51 Progress: 32%|█████████████ | ETA: 0:00:43 Progress: 36%|██████████████▉ | ETA: 0:00:36 Progress: 41%|████████████████▊ | ETA: 0:00:31 Progress: 45%|██████████████████▋ | ETA: 0:00:27 Progress: 50%|████████████████████▌ | ETA: 0:00:23 Progress: 55%|██████████████████████▍ | ETA: 0:00:20 Progress: 59%|████████████████████████▎ | ETA: 0:00:17 Progress: 64%|██████████████████████████▏ | ETA: 0:00:14 Progress: 68%|████████████████████████████ | ETA: 0:00:12 Progress: 73%|█████████████████████████████▉ | ETA: 0:00:10 Progress: 77%|███████████████████████████████▋ | ETA: 0:00:08 Progress: 82%|█████████████████████████████████▌ | ETA: 0:00:06 Progress: 86%|███████████████████████████████████▍ | ETA: 0:00:05 Progress: 91%|█████████████████████████████████████▎ | ETA: 0:00:03 Progress: 95%|███████████████████████████████████████▏ | ETA: 0:00:01 Progress: 100%|█████████████████████████████████████████| Time: 0:00:31 + Progress: 3%|█▎ | ETA: 0:07:30 Progress: 9%|███▊ | ETA: 0:02:38 Progress: 14%|█████▋ | ETA: 0:01:45 Progress: 18%|███████▌ | ETA: 0:01:18 Progress: 23%|█████████▍ | ETA: 0:01:02 Progress: 27%|███████████▏ | ETA: 0:00:50 Progress: 32%|█████████████ | ETA: 0:00:42 Progress: 36%|██████████████▉ | ETA: 0:00:36 Progress: 41%|████████████████▊ | ETA: 0:00:31 Progress: 45%|██████████████████▋ | ETA: 0:00:26 Progress: 50%|████████████████████▌ | ETA: 0:00:23 Progress: 55%|██████████████████████▍ | ETA: 0:00:19 Progress: 59%|████████████████████████▎ | ETA: 0:00:17 Progress: 64%|██████████████████████████▏ | ETA: 0:00:14 Progress: 68%|████████████████████████████ | ETA: 0:00:12 Progress: 73%|█████████████████████████████▉ | ETA: 0:00:10 Progress: 77%|███████████████████████████████▋ | ETA: 0:00:08 Progress: 82%|█████████████████████████████████▌ | ETA: 0:00:06 Progress: 86%|███████████████████████████████████▍ | ETA: 0:00:05 Progress: 91%|█████████████████████████████████████▎ | ETA: 0:00:03 Progress: 95%|███████████████████████████████████████▏ | ETA: 0:00:01 Progress: 100%|█████████████████████████████████████████| Time: 0:00:31 [ Info: - Assembly completed. [ Info: Assembling full weight vector. Progress: 3%|█▎ | ETA: 0:00:04 Progress: 100%|█████████████████████████████████████████| Time: 0:00:00 Iter Function value Gradient norm 0 4.531070e+03 2.176975e+03 - * time: 0.016276121139526367 + * time: 0.017196178436279297 1 4.511962e+03 3.381033e+02 - * time: 0.9558250904083252 + * time: 0.9717080593109131 2 3.126360e+03 4.498989e+02 - * time: 0.9684891700744629 + * time: 0.9844470024108887 3 3.075386e+03 3.787742e+02 - * time: 0.9769480228424072 + * time: 0.9928081035614014 4 3.042578e+03 3.110060e+02 - * time: 0.9812231063842773 + * time: 0.9971091747283936 5 2.996447e+03 1.577183e+02 - * time: 0.9854340553283691 + * time: 1.0013840198516846 6 2.956635e+03 1.426538e+02 - * time: 0.9895830154418945 + * time: 1.0056400299072266 7 2.904828e+03 5.021431e+02 - * time: 0.9958159923553467 + * time: 1.011810064315796 8 2.633319e+03 3.264234e+03 - * time: 1.0039889812469482 + * time: 1.019989013671875 9 2.132198e+03 9.266791e+02 - * time: 1.0101261138916016 + * time: 1.0260491371154785 10 1.305131e+03 2.650596e+01 - * time: 1.024327039718628 + * time: 1.0401980876922607 11 1.300301e+03 1.728341e+02 - * time: 1.032461166381836 + * time: 1.0484650135040283 12 1.136213e+03 1.788406e+03 - * time: 1.0385141372680664 + * time: 1.0546610355377197 13 9.266028e+02 1.724264e+03 - * time: 1.0447571277618408 + * time: 1.0608890056610107 14 8.683957e+02 8.369458e+02 - * time: 1.0508840084075928 + * time: 1.0670139789581299 15 8.542065e+02 1.202458e+01 - * time: 1.0550282001495361 + * time: 1.0711259841918945 16 8.460816e+02 6.359850e+02 - * time: 1.0610849857330322 + * time: 1.0772931575775146 17 8.383414e+02 2.348007e+02 - * time: 1.0672461986541748 + * time: 1.0833721160888672 18 8.375127e+02 1.452398e+01 - * time: 1.0732920169830322 + * time: 1.089576005935669 19 8.374630e+02 3.587759e+00 - * time: 1.0795249938964844 + * time: 1.0956990718841553 20 8.374628e+02 8.462346e-02 - * time: 1.0835280418395996 + * time: 1.0997819900512695 21 8.374628e+02 1.975340e-04 - * time: 1.0895140171051025 + * time: 1.105816125869751 22 8.374628e+02 4.682667e-05 - * time: 1.0955970287322998 + * time: 1.1120150089263916 23 8.374628e+02 9.691217e-06 - * time: 1.1016690731048584 + * time: 1.1181421279907227 24 8.374628e+02 2.150332e-05 - * time: 1.1056849956512451 + * time: 1.122192144393921 25 8.374628e+02 5.243516e-06 - * time: 1.1099090576171875 + * time: 1.1262950897216797 * Status: success (objective increased between iterations) * Candidate solution @@ -164,4 +164,4 @@ └────────────┴─────────┴──────────┴─────────┘

If we want to save the fitted potentials to disk to later use we can simply save the hyperparameters and the parameters. At the moment this must be done manually but a more complete and convenient interface for this will be provided, also adding various sanity checks.

using JSON
 open("TiAl_model.json", "w") do f
 	 JSON.print(f, Dict("hyperparams" => hyperparams, "params" => model.ps))
-end

To load the model back from disk it is safest to work within the same Julia project, i.e. the same version of all packages; ideally the the Manifest should not be changed. One then generates the model again, loads the parameters from disk and then sets them in the model. Again, this will be automated in the future.

Finally, we delete the model to clean up.

rm("TiAl_model.json")

Fast Evaluator

ACEpotentials.jl provides an experimental "fast evaluator". This tries to merge some of the operations in the full model resulting in a "slimmer" and usually faster evaluator. In some cases the performance gain can be multiple factors up to an order of magnitude. This is particularly important when using a parameter estimation solver that sparsifies. In that case, the performance gain can be significant.

To construct the fast evaluator, simply use

fpot = fast_evaluator(model)

An optional keyword argument aa_static = true can be used to optimize the n-correlation layer for very small models (at most a few hundred parameters). For larger models this leads to a stack overflow.


This page was generated using Literate.jl.

+end

To load the model back from disk it is safest to work within the same Julia project, i.e. the same version of all packages; ideally the the Manifest should not be changed. One then generates the model again, loads the parameters from disk and then sets them in the model. Again, this will be automated in the future.

Finally, we delete the model to clean up.

rm("TiAl_model.json")

Fast Evaluator

ACEpotentials.jl provides an experimental "fast evaluator". This tries to merge some of the operations in the full model resulting in a "slimmer" and usually faster evaluator. In some cases the performance gain can be multiple factors up to an order of magnitude. This is particularly important when using a parameter estimation solver that sparsifies. In that case, the performance gain can be significant.

To construct the fast evaluator, simply use

fpot = fast_evaluator(model)

An optional keyword argument aa_static = true can be used to optimize the n-correlation layer for very small models (at most a few hundred parameters). For larger models this leads to a stack overflow.


This page was generated using Literate.jl.

diff --git a/dev/literate_tutorials/dataset_analysis/58193850.svg b/dev/literate_tutorials/dataset_analysis/58193850.svg new file mode 100644 index 00000000..09ac2f04 --- /dev/null +++ b/dev/literate_tutorials/dataset_analysis/58193850.svg @@ -0,0 +1,854 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/literate_tutorials/dataset_analysis/0682dbc5.svg b/dev/literate_tutorials/dataset_analysis/60323c83.svg similarity index 50% rename from dev/literate_tutorials/dataset_analysis/0682dbc5.svg rename to dev/literate_tutorials/dataset_analysis/60323c83.svg index 412f3ee9..118f35d7 100644 --- a/dev/literate_tutorials/dataset_analysis/0682dbc5.svg +++ b/dev/literate_tutorials/dataset_analysis/60323c83.svg @@ -1,321 +1,321 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/literate_tutorials/dataset_analysis/60da91d6.svg b/dev/literate_tutorials/dataset_analysis/60da91d6.svg deleted file mode 100644 index 1c42a350..00000000 --- a/dev/literate_tutorials/dataset_analysis/60da91d6.svg +++ /dev/null @@ -1,361 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dev/literate_tutorials/dataset_analysis/8e0cf436.svg b/dev/literate_tutorials/dataset_analysis/8e0cf436.svg deleted file mode 100644 index a7a33718..00000000 --- a/dev/literate_tutorials/dataset_analysis/8e0cf436.svg +++ /dev/null @@ -1,854 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/dev/literate_tutorials/dataset_analysis/d3be526d.svg b/dev/literate_tutorials/dataset_analysis/d3be526d.svg new file mode 100644 index 00000000..8b0f5ec8 --- /dev/null +++ b/dev/literate_tutorials/dataset_analysis/d3be526d.svg @@ -0,0 +1,361 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/literate_tutorials/dataset_analysis/index.html b/dev/literate_tutorials/dataset_analysis/index.html index 85dec9fb..ee5d9b4b 100644 --- a/dev/literate_tutorials/dataset_analysis/index.html +++ b/dev/literate_tutorials/dataset_analysis/index.html @@ -15,7 +15,7 @@ xlabel = L"\theta", ylabel = "ADF", xlims = (0, π)) vline!([ eq_angle,], label = "109.5˚", lw=3) -plot(plt_rdf, plt_adf, layout = (2,1), size = (800, 400))Example block output

One way we can use these distribution functions is to look at fitted potentials relative to where data is given. But even before a potential is fitted we can illustrate some properties of the basis functions used in ACEpotentials. E.g. we can illustrate why we have chosen the distance transforms. First, we generate a default Si model and a second one with modified transform. Note that we are stripping the units from r_cut because ACEpotentials currently expects unitless values; implicitly understood as Å and eV.

r_cut_ul = ustrip(u"Å", r_cut)
+plot(plt_rdf, plt_adf, layout = (2,1), size = (800, 400))
Example block output

One way we can use these distribution functions is to look at fitted potentials relative to where data is given. But even before a potential is fitted we can illustrate some properties of the basis functions used in ACEpotentials. E.g. we can illustrate why we have chosen the distance transforms. First, we generate a default Si model and a second one with modified transform. Note that we are stripping the units from r_cut because ACEpotentials currently expects unitless values; implicitly understood as Å and eV.

r_cut_ul = ustrip(u"Å", r_cut)
 
 model1 = ace1_model(elements = [:Si,], order = 3,
                     totaldegree = 10, rcut = r_cut_ul)
@@ -40,7 +40,7 @@
                      yticks = [], xlims = (0, r_cut_ul))
 vline!([ustrip(rnn(:Si)),], label = L"r_{\rm nn}", lw=3)
 
-plot(plt_t, plt_rdf, layout=grid(2, 1, heights=[0.7, 0.3]), size = (800, 400))
Example block output

To finish this tutorial, we quickly demonstrate what happens when there is more than one chemical species present in a dataset.

tial_data, _, _ = ACEpotentials.example_dataset("TiAl_tutorial")
+plot(plt_t, plt_rdf, layout=grid(2, 1, heights=[0.7, 0.3]), size = (800, 400))
Example block output

To finish this tutorial, we quickly demonstrate what happens when there is more than one chemical species present in a dataset.

tial_data, _, _ = ACEpotentials.example_dataset("TiAl_tutorial")
 
 rdf = ACEpotentials.get_rdf(tial_data, r_cut)
 plt_TiTi = histogram(rdf[(:Ti, :Ti)], bins=100, xlabel = "", c = 1,
@@ -49,4 +49,4 @@
          ylabel = "RDF - TiAl", label = "", yticks = [], xlims = (0, r_cut_ul) )
 plt_AlAl = histogram(rdf[(:Al, :Al)], bins=100, xlabel = L"r [\AA]", c = 3,
          ylabel = "RDF - AlAl", label = "", yticks = [], xlims = (0, r_cut_ul), )
-plot(plt_TiTi, plt_TiAl, plt_AlAl, layout = (3,1), size = (700, 700))
Example block output

This page was generated using Literate.jl.

+plot(plt_TiTi, plt_TiAl, plt_AlAl, layout = (3,1), size = (700, 700))Example block output

This page was generated using Literate.jl.

diff --git a/dev/literate_tutorials/descriptor/38d91eed.svg b/dev/literate_tutorials/descriptor/18c78ecb.svg similarity index 82% rename from dev/literate_tutorials/descriptor/38d91eed.svg rename to dev/literate_tutorials/descriptor/18c78ecb.svg index 68f963bf..4cc779f3 100644 --- a/dev/literate_tutorials/descriptor/38d91eed.svg +++ b/dev/literate_tutorials/descriptor/18c78ecb.svg @@ -1,122 +1,122 @@ - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/literate_tutorials/descriptor/index.html b/dev/literate_tutorials/descriptor/index.html index 7224aa6f..04df5357 100644 --- a/dev/literate_tutorials/descriptor/index.html +++ b/dev/literate_tutorials/descriptor/index.html @@ -16,10 +16,10 @@ p = scatter( descriptors_trans[1,:], descriptors_trans[2,:], descriptors_trans[3,:], marker=:circle, linewidth=0, group=config_types, legend=:right) -plot!(p, xlabel="PC1", ylabel="PC2", zlabel="PC3", camera=(20,10))Example block output

The basis used above uses defaults that are suitable for regression of a potential energy surface, but other defaults might be better when using the ACE descriptor for other tasks such as classification. The following short script shows how to make some changes of this kind:

model = ace1_model(elements = [:Si,], order = 3, totaldegree = 10,
+plot!(p, xlabel="PC1", ylabel="PC2", zlabel="PC3", camera=(20,10))
Example block output

The basis used above uses defaults that are suitable for regression of a potential energy surface, but other defaults might be better when using the ACE descriptor for other tasks such as classification. The following short script shows how to make some changes of this kind:

model = ace1_model(elements = [:Si,], order = 3, totaldegree = 10,
        pair_transform = (:agnesi, 1, 4),
        pair_envelope = (:x, 0, 2),
        transform = (:agnesi, 1, 4),
        envelope = (:x, 0, 2),
        r0 = :bondlen, # default, could specify explicitly
-       )
  • [pair_]transform = (:agnesi, 1, 4) : this generates a transform that behaves as t' ~ r^3 near zero and t' ~ r^-2 near the cutoff
  • [pair_]envelope = (:x, 0, 2) : this generates an envelope that is ~ (x - xcut)^2 at the cutoff and just ~ 1 for r -> 0.

This page was generated using Literate.jl.

+ )
  • [pair_]transform = (:agnesi, 1, 4) : this generates a transform that behaves as t' ~ r^3 near zero and t' ~ r^-2 near the cutoff
  • [pair_]envelope = (:x, 0, 2) : this generates an envelope that is ~ (x - xcut)^2 at the cutoff and just ~ 1 for r -> 0.

This page was generated using Literate.jl.

diff --git a/dev/literate_tutorials/smoothness_priors/c7c25d36.svg b/dev/literate_tutorials/smoothness_priors/92e274f7.svg similarity index 88% rename from dev/literate_tutorials/smoothness_priors/c7c25d36.svg rename to dev/literate_tutorials/smoothness_priors/92e274f7.svg index 9acbd16a..06c70cce 100644 --- a/dev/literate_tutorials/smoothness_priors/c7c25d36.svg +++ b/dev/literate_tutorials/smoothness_priors/92e274f7.svg @@ -1,64 +1,64 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/literate_tutorials/smoothness_priors/3c766f4d.svg b/dev/literate_tutorials/smoothness_priors/cb6bde6f.svg similarity index 88% rename from dev/literate_tutorials/smoothness_priors/3c766f4d.svg rename to dev/literate_tutorials/smoothness_priors/cb6bde6f.svg index 8d7abfd5..48c71d83 100644 --- a/dev/literate_tutorials/smoothness_priors/3c766f4d.svg +++ b/dev/literate_tutorials/smoothness_priors/cb6bde6f.svg @@ -1,52 +1,52 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/literate_tutorials/smoothness_priors/57245b5f.svg b/dev/literate_tutorials/smoothness_priors/f4446e63.svg similarity index 87% rename from dev/literate_tutorials/smoothness_priors/57245b5f.svg rename to dev/literate_tutorials/smoothness_priors/f4446e63.svg index 58935b67..3ce1cc2f 100644 --- a/dev/literate_tutorials/smoothness_priors/57245b5f.svg +++ b/dev/literate_tutorials/smoothness_priors/f4446e63.svg @@ -1,56 +1,56 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/literate_tutorials/smoothness_priors/index.html b/dev/literate_tutorials/smoothness_priors/index.html index 864e6527..40b210fd 100644 --- a/dev/literate_tutorials/smoothness_priors/index.html +++ b/dev/literate_tutorials/smoothness_priors/index.html @@ -14,7 +14,7 @@ A, Y, W = ACEfit.assemble(data, model);
[ Info: Assembling linear problem.
 [ Info:   - Creating feature matrix with size (1052, 223).
 [ Info:   - Beginning assembly with processor count:  1.
-
Progress:   4%|█▌                                       |  ETA: 0:02:02
Progress:   9%|███▉                                     |  ETA: 0:00:57
Progress:  15%|██████▎                                  |  ETA: 0:00:39
Progress:  21%|████████▌                                |  ETA: 0:00:30
Progress:  26%|██████████▉                              |  ETA: 0:00:25
Progress:  32%|█████████████▏                           |  ETA: 0:00:21
Progress:  38%|███████████████▌                         |  ETA: 0:00:18
Progress:  43%|█████████████████▊                       |  ETA: 0:00:16
Progress:  49%|████████████████████▏                    |  ETA: 0:00:14
Progress:  53%|█████████████████████▋                   |  ETA: 0:00:12
Progress:  58%|████████████████████████                 |  ETA: 0:00:11
Progress:  64%|██████████████████████████▎              |  ETA: 0:00:09
Progress:  70%|████████████████████████████▋            |  ETA: 0:00:07
Progress:  75%|███████████████████████████████          |  ETA: 0:00:06
Progress:  81%|█████████████████████████████████▎       |  ETA: 0:00:04
Progress:  87%|███████████████████████████████████▋     |  ETA: 0:00:03
Progress:  92%|█████████████████████████████████████▉   |  ETA: 0:00:02
Progress:  98%|████████████████████████████████████████▎|  ETA: 0:00:00
Progress: 100%|█████████████████████████████████████████| Time: 0:00:22
+
Progress:   4%|█▌                                       |  ETA: 0:01:59
Progress:   9%|███▉                                     |  ETA: 0:00:56
Progress:  15%|██████▎                                  |  ETA: 0:00:38
Progress:  21%|████████▌                                |  ETA: 0:00:30
Progress:  26%|██████████▉                              |  ETA: 0:00:24
Progress:  32%|█████████████▏                           |  ETA: 0:00:21
Progress:  38%|███████████████▌                         |  ETA: 0:00:18
Progress:  43%|█████████████████▊                       |  ETA: 0:00:15
Progress:  49%|████████████████████▏                    |  ETA: 0:00:13
Progress:  53%|█████████████████████▋                   |  ETA: 0:00:12
Progress:  58%|████████████████████████                 |  ETA: 0:00:10
Progress:  64%|██████████████████████████▎              |  ETA: 0:00:09
Progress:  70%|████████████████████████████▋            |  ETA: 0:00:07
Progress:  75%|███████████████████████████████          |  ETA: 0:00:06
Progress:  81%|█████████████████████████████████▎       |  ETA: 0:00:04
Progress:  87%|███████████████████████████████████▋     |  ETA: 0:00:03
Progress:  92%|█████████████████████████████████████▉   |  ETA: 0:00:02
Progress:  98%|████████████████████████████████████████▎|  ETA: 0:00:00
Progress: 100%|█████████████████████████████████████████| Time: 0:00:21
 [ Info:   - Assembly completed.
 [ Info: Assembling full weight vector.

A positive definite matrix P specifies a normal prior distribution in the Bayesian framework, but for the purpose of this tutorial it is maybe more intuitive to simply think of it as a regularisation operator. The regularised linear least squares problem is

\[ \| A c - y \|^2 + \lambda \| P c \|^2\]

where A is the design matrix, $y$ is the vector of observations, $c$ is the vector of parameters, and $\lambda$ is a regularisation parameter. The prior matrix $P$ is specified by the user. At present we support diagonal operators $P$. The diagonal elements of $P$ are the prior variances. The larger the prior variance, the smoother the fitted potential. Although not strictly true, we can think of each basis function as specified by a the parameters $(n_t, l_t)_{t = 1}^N$, where $N$ is the correlation-order, i.e., corresponding prior matrix element must be a function of those $n_t, l_t$ values,

\[ P_{\bf k \bf k} = \gamma({\bf k}).\]

We currently provide convenient interfaces for three classes: algebraic, exponential and gaussian. Technically, (but loosely speaking) an algebraic prior declares that the target function has p derivatives (for some parameter p), the exponential prior declares that the target function is analytic, while the gaussian prior declares that the target function is entire. In practice, especially for small datasets when the model is underdetermined, one may use a stronger prior than is justified by our knowledge about the target function. For large and diverse datasets it can happen that too strong a prior will adversely affect the fit accuracy. For the definition of the three main prior classes, see the documentation for

?algebraic_smoothness_prior
 ?exp_smoothness_prior
@@ -50,14 +50,14 @@
     plot!(plt_dim, D[(:Si, :Si)]..., label = l, lw=2)
 end
 vline!([r_nn,], lw=2, ls=:dash, label = L"r_{\rm nn}")
-plt_dim
Example block output

Next, we look at a trimer curve. This is generated using ACEpotentials.trimers. Both the Id and Algebraic(2) regularised models contain fairly significant oscillations while the Algebraic(4) and Gaussian models are much smoother. In addition, it appears that the Gaussian regularised model is somewhat more physically realistic on this slice with high energy at small bond-angles (thought the low energy at angle π seems somewhat strange).

plt_trim = plot(legend = :topright, xlabel = L"\theta", ylabel = "E [eV]",
+plt_dim
Example block output

Next, we look at a trimer curve. This is generated using ACEpotentials.trimers. Both the Id and Algebraic(2) regularised models contain fairly significant oscillations while the Algebraic(4) and Gaussian models are much smoother. In addition, it appears that the Gaussian regularised model is somewhat more physically realistic on this slice with high energy at small bond-angles (thought the low energy at angle π seems somewhat strange).

plt_trim = plot(legend = :topright, xlabel = L"\theta", ylabel = "E [eV]",
                xlims = (0, pi), ylims = (-0.6, 0.2))
 for l in labels
     D = ACEpotentials.trimers(pots[l], [:Si,], r_nn*u"Å",  r_nn*u"Å")
     plot!(plt_trim, D[(:Si, :Si, :Si)]..., label = l, lw=2)
 end
 vline!(plt_trim, [1.90241,], lw=2, label = "equilibrium angle")
-plt_trim
Example block output

Finally, we plot a decohesion curve, which contains more significant many-body effects. Arguably, none of our potentials perform very well on this test. Usually larger datasets, and longer cutoffs help in this case.

using AtomsBuilder  # gives us `bulk`
+plt_trim
Example block output

Finally, we plot a decohesion curve, which contains more significant many-body effects. Arguably, none of our potentials perform very well on this test. Usually larger datasets, and longer cutoffs help in this case.

using AtomsBuilder  # gives us `bulk`
 
 at0 = bulk(:Si, cubic=true)
 plt_dec = plot(legend = :topright, xlabel = L"r [\AA]", ylabel = "strain [eV/Å]",
@@ -66,4 +66,4 @@
     rr, E, dE = ACEpotentials.decohesion_curve(at0, pots[l])
     plot!(plt_dec, ustrip.(rr), ustrip.(dE), label = l, lw=2)
 end
-plt_dec
Example block output

This page was generated using Literate.jl.

+plt_decExample block output

This page was generated using Literate.jl.

diff --git a/dev/tutorials/index.html b/dev/tutorials/index.html index 08444204..7aa3b4cd 100644 --- a/dev/tutorials/index.html +++ b/dev/tutorials/index.html @@ -24,4 +24,4 @@ * [TiAl Potential (ACEpotentials)](../literate_tutorials/ACEpotentials_TiAl.md) * [TiAl Potential (command line JSON)](../outdated/first_example_json.md) ---> +--> diff --git a/dev/tutorials/lammps/index.html b/dev/tutorials/lammps/index.html index 555211db..8e519a90 100644 --- a/dev/tutorials/lammps/index.html +++ b/dev/tutorials/lammps/index.html @@ -19,4 +19,4 @@ pair_coeff 1 3 table potential_pairpot.table I_Pb pair_coeff 2 2 table potential_pairpot.table Cs_Cs pair_coeff 2 3 table potential_pairpot.table Cs_Pb -pair_coeff 3 3 table potential_pairpot.table Pb_Pb

where we are using the ordering I, Cs, Pb.

+pair_coeff 3 3 table potential_pairpot.table Pb_Pb

where we are using the ordering I, Cs, Pb.

diff --git a/dev/tutorials/molly/index.html b/dev/tutorials/molly/index.html index 3083ffb8..add0b1e6 100644 --- a/dev/tutorials/molly/index.html +++ b/dev/tutorials/molly/index.html @@ -36,4 +36,4 @@ dt=1.0u"fs", coupling=AndersenThermostat(temp, 1.0u"ps"), )

After this you can run the simulation by

# Perform MD for 1000 steps
-simulate!(sys, simulator, 1000)
+simulate!(sys, simulator, 1000) diff --git a/dev/tutorials/python_ase/index.html b/dev/tutorials/python_ase/index.html index 7b149ebf..7b029d79 100644 --- a/dev/tutorials/python_ase/index.html +++ b/dev/tutorials/python_ase/index.html @@ -2,4 +2,4 @@ python-ase · ACEpotentials.jl

python-ase

An ACEpotentials.jl model can be used in python as an ase calculator. To do this, you will need to install two python packages, julia and pyjulip as documented on the installation page.

Python reads the potential.json file directly. To load an ACE potential as an ase calculator, use the following syntax:

import pyjulip
 calc = pyjulip.ACE1("first_potential.json")

Using that calculator, we can then evaluatuate energies, forces, etc, e.g.,

ats = ase.io.read('atoms_object.xyz')
 ats.calc = calc
-print(ats.get_potential_energy())

See the ase documentation for more details.

Another option: ASE's LAMMPSlib calculator

Alternatively, to avoid direct Julia-Python interaction, one can export to LAMMPS (see LAMMPS) and utilize ASE's LAMMPSlib calculator.

+print(ats.get_potential_energy())

See the ase documentation for more details.

Another option: ASE's LAMMPSlib calculator

Alternatively, to avoid direct Julia-Python interaction, one can export to LAMMPS (see LAMMPS) and utilize ASE's LAMMPSlib calculator.

diff --git a/dev/tutorials/scripting/index.html b/dev/tutorials/scripting/index.html index a5c3a8ca..201dc5f2 100644 --- a/dev/tutorials/scripting/index.html +++ b/dev/tutorials/scripting/index.html @@ -1,4 +1,4 @@ Basic Shell Workflow · ACEpotentials.jl

Basic Shell Workflow

This short introduces a basic workflow where models are specified via JSON files and model fitting is achieved via a shell script.

At the start of a new project we

  • create a project folder
  • activate a Julia project in that folder
  • add ACEpotentials to the Julia project
  • generate a fitting script and example model specification file
mkdir myace
 cd myace
-julia --project=. -e 'using Pkg; Pkg.add("ACEpotentials"); using ACEpotentials; ACEpotentials.copy_runfit(@__DIR__())'

This should create two new files in the myace folder:

  • runfit.jl
  • example_params.json

Copy (or move) the example_params.json file to a new filename, e.g.

cp example_params.json myace_params_1.json

then edit that file to specify the model hyperparameters, the fitting method (see also ACEfit.jl), and the path to the dataset (or, datasets if validation and or test sets are also provided). To produce a fit, use

julia --project=. runfit.jl -p myace_params_1.json -o results_1

This will write all outputs to the ./results_1 folder, in particular results.json which contains the model specification, the fitted model parameters, and a dictionary of computed errors (rmse, mae). The list of required outputs and the output filename(s) can be changed in the model spec json.

+julia --project=. -e 'using Pkg; Pkg.add("ACEpotentials"); using ACEpotentials; ACEpotentials.copy_runfit(@__DIR__())'

This should create two new files in the myace folder:

  • runfit.jl
  • example_params.json

Copy (or move) the example_params.json file to a new filename, e.g.

cp example_params.json myace_params_1.json

then edit that file to specify the model hyperparameters, the fitting method (see also ACEfit.jl), and the path to the dataset (or, datasets if validation and or test sets are also provided). To produce a fit, use

julia --project=. runfit.jl -p myace_params_1.json -o results_1

This will write all outputs to the ./results_1 folder, in particular results.json which contains the model specification, the fitted model parameters, and a dictionary of computed errors (rmse, mae). The list of required outputs and the output filename(s) can be changed in the model spec json.