diff --git a/README.md b/README.md index e4b0ebc075b9607b8c1658955e2a78acbdd8b9f2..bbd3dd1ac1112e3887fee0e2149c9188867500bc 100644 --- a/README.md +++ b/README.md @@ -1,93 +1,9 @@ # MODELS +This is a submodule of **Tadah!** and is not intended to be used on its own (although it is technically possible). +If you're interested in running **LAMMPS simulations** with Tadah! potentials, visit [Tadah!LAMMPS](https://git.ecdf.ed.ac.uk/tadah/tadah.lammps). For those interested in **developing machine learning interatomic potentials**, see [Tadah!MLIP](https://git.ecdf.ed.ac.uk/tadah/tadah.mlip). -## Getting started +Please refer to the online documentation for more information: -To make it easy for you to get started with GitLab, here's a list of recommended next steps. - -Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)! - -## Add your files - -- [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files -- [ ] [Add files using the command line](https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command: - -``` -cd existing_repo -git remote add origin https://git.ecdf.ed.ac.uk/tadah/models.git -git branch -M main -git push -uf origin main -``` - -## Integrate with your tools - -- [ ] [Set up project integrations](https://git.ecdf.ed.ac.uk/tadah/models/-/settings/integrations) - -## Collaborate with your team - -- [ ] [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/) -- [ ] [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html) -- [ ] [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically) -- [ ] [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/) -- [ ] [Set auto-merge](https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html) - -## Test and Deploy - -Use the built-in continuous integration in GitLab. - -- [ ] [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/index.html) -- [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing (SAST)](https://docs.gitlab.com/ee/user/application_security/sast/) -- [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html) -- [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/) -- [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html) - -*** - -# Editing this README - -When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thanks to [makeareadme.com](https://www.makeareadme.com/) for this template. - -## Suggestions for a good README - -Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information. - -## Name -Choose a self-explaining name for your project. - -## Description -Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors. - -## Badges -On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge. - -## Visuals -Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method. - -## Installation -Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection. - -## Usage -Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README. - -## Support -Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc. - -## Roadmap -If you have ideas for releases in the future, it is a good idea to list them in the README. - -## Contributing -State if you are open to contributions and what your requirements are for accepting them. - -For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self. - -You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser. - -## Authors and acknowledgment -Show your appreciation to those who have contributed to the project. - -## License -For open source projects, say how it is licensed. - -## Project status -If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers. +[https://tadah.readthedocs.io/](https://tadah.readthedocs.io/) \ No newline at end of file diff --git a/include/tadah/models/descriptors/d2/d2_blip.h b/include/tadah/models/descriptors/d2/d2_blip.h index 1ba3b14a89846678768aebe1084d24c95e1feaf7..b556dee8647103b18c69bcfc8b54ba84c96f0f5e 100644 --- a/include/tadah/models/descriptors/d2/d2_blip.h +++ b/include/tadah/models/descriptors/d2/d2_blip.h @@ -5,10 +5,10 @@ /** \brief Blip two-body descriptor. * * \f[ - * V_i^{\eta,r_s} =\sum_{j \neq i} B(\eta(r_{ij}-r_s))f_c(r_{ij}) + * V_i^{\eta,r_s} =\sum_{j \neq i} \mathcal{B}(\eta(r_{ij}-r_s))f_c(r_{ij}) * \f] * - * where \f$ f_c \f$ is a cutoff function and \f$ B \f$ is a blip + * where \f$ f_c \f$ is a cutoff function and \f$ \mathcal{B} \f$ is a blip * basis function centered at \f$r_s\f$ of width \f$4/\eta\f$. * * \ref CGRID2B parameters control position \f$ r_s \f$ of blip centres. @@ -20,7 +20,7 @@ * * \f[ \begin{equation} - B(r) = + \mathcal{B}(r) = \begin{cases} 1-\frac{3}{2}r^2+\frac{3}{4}|r|^3 & \text{if} \qquad 0<|r|<1\\ \frac{1}{4}(2-|r|)^3 & \text{if} \qquad 1<|r|<2\\ diff --git a/include/tadah/models/descriptors/d2/d2_mie.h b/include/tadah/models/descriptors/d2/d2_mie.h index 22163c66cbe9f1905e352f401649e506d75c1add..e42ae90614a43b80e04d77f717409abe630784d7 100644 --- a/include/tadah/models/descriptors/d2/d2_mie.h +++ b/include/tadah/models/descriptors/d2/d2_mie.h @@ -19,7 +19,7 @@ * * Required Config Key: \ref INIT2B \ref TYPE2B * - * TYPE2B D2_MIE 12 6 + * TYPE2B D2_MIE 12 6 ELEMENT1 ELEMENT2 * * will result in Lennard-Jones type descriptor */ diff --git a/include/tadah/models/descriptors/d2/d2_mjoin.h b/include/tadah/models/descriptors/d2/d2_mjoin.h index fc22f65d3554194b22c869d99038a1ffba126233..622473341fa31b76fb3dd15e4e71249dc4b652ff 100644 --- a/include/tadah/models/descriptors/d2/d2_mjoin.h +++ b/include/tadah/models/descriptors/d2/d2_mjoin.h @@ -19,11 +19,11 @@ * * ``` * TYPE2B D2_mJoin # <-- Meta descriptor for concatenating two-body descriptors - * TYPE2B D2_MIE 11 6 # <-- MIE exponents + * TYPE2B D2_MIE 11 6 Ti Ti # <-- MIE exponents * RCTYPE2B Cut_Cos * RCUT2B 3.0 * - * TYPE2B D2_Blip 6 6 # <-- grid sizes + * TYPE2B D2_Blip 6 6 Ti Nb Nb Nb # <-- grid sizes * RCTYPE2B Cut_Tanh * RCUT2B 7.5 * SGRID2B -2 6 0.1 10 # Grid for D2_Blip, blips widths, auto generated diff --git a/include/tadah/models/descriptors/d2/d2_zbl.h b/include/tadah/models/descriptors/d2/d2_zbl.h index 585887ebb2d3dbeb759329597d42693c1e14e3e1..cb7e7f510c4b1d2d608e0454be73700f8666a27e 100644 --- a/include/tadah/models/descriptors/d2/d2_zbl.h +++ b/include/tadah/models/descriptors/d2/d2_zbl.h @@ -8,42 +8,41 @@ * * The ZBL (Ziegler-Biersack-Littmark) potential is an empirical potential used to model short-range interactions between atoms. * - * The constant term \( \frac{4 \pi \varepsilon_0 e^2}{1} \) is set to 1 and will be fitted as needed. + * The constant term \f$ \frac{e^2}{4 \pi \varepsilon_0 } \f$ is set to 1 and will be fitted as needed. * * The simplified expression for the ZBL potential is given by: * * \f[ - * V(r) = \frac{Z_1 Z_2 }{r} \phi\left(\frac{r}{a}\right) + * V(r) = \frac{Z_1 Z_2}{r} \phi\left(\frac{r}{a}\right) * \f] * - * where \( a \) is the screening length, expressed as: + * where \f$ a \f$ is the screening length, expressed as: * \f[ - * a = \frac{s_0 \cdot a_0}{Z_1^{p_0} + Z_2^{p_1}} + * a = \frac{s_0 a_0}{Z_1^{p_0} + Z_2^{p_1}} * \f] * - * Here, \( a_0 \), \( s_0 \), \( p_0 \), and \( p_1 \) are adjustable hyperparameters. + * Here, \f$ a_0 \f$, \f$ s_0 \f$, \f$ p_0 \f$, and \f$ p_1 \f$ are adjustable hyperparameters. * Setting any of these to -1 uses the default values: * - * - \( a_0 = 0.52917721067 \) Å - * - \( s_0 = 0.88534 \) - * - \( p_0 = 0.23 \) - * - \( p_1 = 0.23 \) + * - \f$ a_0 = 0.52917721067 \, \text{Å} \f$ + * - \f$ s_0 = 0.88534 \f$ + * - \f$ p_0 = 0.23 \f$ + * - \f$ p_1 = 0.23 \f$ * - * - * The screening function \(\phi\) is defined as: + * The screening function \f$ \phi \f$ is defined as: * \f[ * \phi(x) = 0.1818 e^{-3.2x} + 0.5099 e^{-0.9423x} + 0.2802 e^{-0.4029x} + 0.02817 e^{-0.2016x} * \f] * * Required Config Key: \ref INIT2B \ref TYPE2B * - * - TYPE2B D2_ZBL \( a_0 \) \( s_0 \) \( p_0 \) \( p_1 \) + * - TYPE2B D2_ZBL \f$ a_0 \f$ \f$ s_0 \f$ \f$ p_0 \f$ \f$ p_1 \f$ ELEMENT1 ELEMENT2 * * Examples: * - * - TYPE2B D2_ZBL 0.53 0.90 0.23 0.23 # Custom parameters - * - TYPE2B D2_ZBL -1 -1 -1 -1 # Default values - * - TYPE2B D2_ZBL 0.53 -1 -1 -1 # Mix of default and custom + * - TYPE2B D2_ZBL 0.53 0.90 0.23 0.23 Kr Kr # Custom parameters + * - TYPE2B D2_ZBL -1 -1 -1 -1 Kr Kr # Default values + * - TYPE2B D2_ZBL 0.53 -1 -1 -1 Kr Kr # Mix of default and custom * */ class D2_ZBL : public D2_Base { diff --git a/include/tadah/models/descriptors/dm/dm_blip.h b/include/tadah/models/descriptors/dm/dm_blip.h index 9cfe441f5662b316e6d53f767f1f74219ceae5c1..5b691d37b8b34b8e2871a603b4967169ad90946e 100644 --- a/include/tadah/models/descriptors/dm/dm_blip.h +++ b/include/tadah/models/descriptors/dm/dm_blip.h @@ -13,7 +13,7 @@ * (expansion in the Blip basis instead of usual Gaussians): * \f[ * \rho_i^{\eta,r_s,l_x,l_y,l_z} = \sum_{j \neq i} x_{ij}^{l_x}y_{ij}^{l_y}z_{ij}^{l_z} - * \B{\Big(-\eta(r_{ij}-r_s)^2\Big)}f_c(r_{ij}) + * \mathcal{B}{\Big(-\eta(r_{ij}-r_s)^2\Big)}f_c(r_{ij}) * \f] * * \ref CGRIDMB parameters control position \f$ r_s \f$ of the gaussian basis function. diff --git a/include/tadah/models/descriptors/dm/dm_func.h b/include/tadah/models/descriptors/dm/dm_func.h index 0a94484249aaf21798a0d56be105ac9107ea92e4..b054bc2fd8c956edc326907e3636e4149de72b13 100644 --- a/include/tadah/models/descriptors/dm/dm_func.h +++ b/include/tadah/models/descriptors/dm/dm_func.h @@ -14,11 +14,11 @@ public: /** * @class F_RLR - * @brief Implements an embedding function of the form: \( s \cdot x \cdot \log(c \cdot x) \) + * @brief Implements an embedding function of the form: \f$ s x \log(c x) \f$ * * This class supports embedding functions characterized by two main parameters: - * - **SEMBFUNC**: Controls the depth of the embedding function. - * - **CEMBFUNC**: Determines the x-intercept, with the x-intercept at \( 1/c \). + * - **SEMBFUNC**: Controls the depth, \f$ s \f$, of the embedding function. + * - **CEMBFUNC**: Determines the x-intercept, with the x-intercept at \f$ 1/c \f$. * * The number of keys for these parameters must match the entries in the mEAD descriptor. * diff --git a/include/tadah/models/descriptors/dm/dm_mEAD.h b/include/tadah/models/descriptors/dm/dm_mEAD.h index 733ebce7d46514c87fcbf2b6e2fb726ecefbdb8d..a5e09e687914219f4f7f378396c223aeb2635112 100644 --- a/include/tadah/models/descriptors/dm/dm_mEAD.h +++ b/include/tadah/models/descriptors/dm/dm_mEAD.h @@ -5,43 +5,32 @@ /** Modified Embedded Atom Descriptor * - * REQUIRED KEYS: SCGRIDMB, CGRIDMB - * + REQUIRED KEYS BY THE EMBEDDING FUNCTION + * REQUIRED KEYS: SGRIDMB, CGRIDMB, and KEYS OF THE EMBEDDING FUNCTION * - * - * TODO Below description is for EAD not mEAD - * This descriptor has mathematical form very similar to EAD. - * It allow: for different embedding functions to be used. + * This descriptor has a mathematical form very similar to DM_EAD + * but allows the usage of a custom-defined embedding function, \f$ \mathcal{F} \f$, in place of the default quadratic one. * * \f[ * V_i^{L,\eta,r_s} = \sum_{l_x,l_y,l_z}^{l_x+l_y+l_z=L} \frac{L!}{l_x!l_y!l_z!} - * \Big( \rho_i^{\eta,r_s,l_x,l_y,l_z} \Big)^2 + * \mathcal{F}\Big( \rho_i^{\eta,r_s,l_x,l_y,l_z} \Big) * \f] * - * where density \f$ \rho \f$ is calculated using Gaussian Type Orbitals: + * where the density \f$ \rho \f$ is calculated using Gaussian Type Orbitals: * \f[ - * \rho_i^{\eta,r_s,l_x,l_y,l_z} = \sum_{j \neq i} x_{ij}^{l_x}y_{ij}^{l_y}z_{ij}^{l_z} - * \exp{\Big(-\eta(r_{ij}-r_s)^2\Big)}f_c(r_{ij}) + * \rho_i^{\eta,r_s,l_x,l_y,l_z} = \sum_{j \neq i} x_{ij}^{l_x} y_{ij}^{l_y} z_{ij}^{l_z} + * \exp{\Big(-\eta(r_{ij}-r_s)^2\Big)} f_c(r_{ij}) * \f] * - * \ref CGRIDMB parameters control position \f$ r_s \f$ of the gaussian basis function. - * - * \ref SGRIDMB parameters control width \f$ \eta \f$ of the gaussian basis function. - * + * \ref CGRIDMB parameters control the position \f$ r_s \f$ of the Gaussian basis function. * - * e.g. \f$L_{max}=2\f$ will calculate descriptors with \f$ L=0,1,2 \f$ (s,p,d orbitals). + * \ref SGRIDMB parameters control the width \f$ \eta \f$ of the Gaussian basis function. * - * More information about this descriptor: - * - * <div class="csl-entry">Zhang, Y., Hu, C.,Jiang, B. - * (2019). Embedded atom neural network potentials: efficient and accurate - * machine learning with a physically inspired representation. - * <i>Journal of Physical Chemistry Letters</i>, <i>10</i>(17), - * 4962–4967. https://doi.org/10.1021/acs.jpclett.9b02037</div> + * e.g., \f$L_{max}=2\f$ will calculate descriptors with \f$ L=0,1,2 \f$ (s, p, d orbitals). * * Required Config keys: * \ref INITMB \ref CGRIDMB \ref SGRIDMB */ + template <typename F> class DM_mEAD: public DM_Base { private: diff --git a/include/tadah/models/descriptors/dm/dm_mjoin.h b/include/tadah/models/descriptors/dm/dm_mjoin.h index 164adf93cae87d0a954dd8a73e4fafb0068aec9f..55f8e528f44aeada1a9a9294a04831a91d9fd52b 100644 --- a/include/tadah/models/descriptors/dm/dm_mjoin.h +++ b/include/tadah/models/descriptors/dm/dm_mjoin.h @@ -21,13 +21,13 @@ * * ``` * TYPEMB DM_mJoin # Meta descriptor for concatenating many-body descriptors - * TYPEMB DM_EAD 1 5 5 # L number, cgrid, sgrid + * TYPEMB DM_EAD 1 5 5 * * # L number, cgrid, sgrid, list of element pairs * RCTYPEMB Cut_Cos * RCUTMB 3.0 * CGRIDMB -1 5 0 3.0 # Grid for DM_EAD, blips centers, auto-generated * SGRIDMB -2 5 1.0 10.0 # Grid for DM_EAD, blips widths, auto-generated * - * TYPEMB DM_Blip 0 7 7 # L number, cgrid, sgrid + * TYPEMB DM_Blip 0 7 7 Ta Ta # L number, cgrid, sgrid, list of element pairs * RCTYPEMB Cut_Tanh * RCUTMB 7.5 * SGRIDMB -2 7 0.1 10 # Grid for DM_Blip, blips widths, auto-generated