Difference between revisions of "Creating oxygenated amorphous carbon"
| Line 1: | Line 1: | ||
| − | This tutorial will focus on using Grand-Canonical Monte-Carlo (GCMC) to determine equilibrium structures and properties of oxygenated amorphous carbon using '''TurboGAP'''. | + | This tutorial will focus on using Grand-Canonical Monte-Carlo (GCMC) to determine equilibrium structures and properties of oxygenated amorphous carbon using '''TurboGAP'''. |
| − | The structure of this tutorial as as follows: | + | The structure of this tutorial as as follows: |
| − | |||
| − | |||
| − | |||
| − | + | # Create an amorphous carbon structure using molecular dynamics, via a melt-quench procedure. | |
| + | # Perform a standard GCMC calculation to populate the structure with oxygen. | ||
| + | # Perform a hybrid Monte-Carlo/MD simulation, using the Hamiltonian MD approach, for an increased acceptance rate. | ||
| + | <span id="introduction"></span> | ||
| + | = Introduction = | ||
| + | |||
| + | <span id="what-is-turbogap"></span> | ||
| + | == What is '''TurboGAP'''? == | ||
| + | |||
| + | TurboGAP is a code used to simulate Machine-Learned Potentials, specifically, <u>Gaussian Approximation Potentials</u>. | ||
| + | |||
| + | It has numerous selling points: | ||
| + | |||
| + | # It is ''fast''. | ||
| + | #* It uses '''soap<sub>turbo</sub>''' descriptors, which are both faster and more accurate than your typical SOAP expansion (also found in QUIP). See the original paper paper by Miguel Caro for more details: [https://doi-org.libproxy.kcl.ac.uk/10.1103/PhysRevB.100.024112 Optimizing many-body atomic descriptors for enhanced computational performance of machine learning based interatomic potentials]. | ||
| + | #* 2b/3b/core potentials (of course). | ||
| + | #* MPI parallelised, (overlapping domain decomposition currently being developed with help of CSC). | ||
| + | #* <u>GPU implementation</u> in progress (with CSC support too). | ||
| + | # It can perform not just molecular statics (with/without box relaxation) and dynamics (NVT/NPT), it can perform ''Monte-Carlo'' simulations. | ||
| + | #* Full Grand-Canonical Monte Carlo (NVT) / (NPT) with multiple move types available: | ||
| + | #* Insertion / removal / displacement / swap / volume / hybrid MD / Hamiltonian. | ||
| + | # Prediction of an arbitrary number of local properties. | ||
| + | # ML Van der Waals (by prediction of local hirshfeld volumes) using Tkachenko-Scheffler | ||
| + | #* Heikki Muhli has developed full ''Many-Body Polarizability'' capability. | ||
| + | # (Sneak Peek!): we have added the capability to simulate numerous types of experimental data (ML XPS/XRD) and can allow them to influence simulation! (Talk to Tigany Zarrouk/look out for the papers when they come out on arXiv)! | ||
| + | |||
| + | <span id="installing-turbogap"></span> | ||
| + | == Installing TurboGAP == | ||
| + | |||
| + | <u>Note</u>: This step is ''not'' necessary if you are at the MLIP workshop. TurboGAP is installed in the path (on Mahti) | ||
| + | |||
| + | <syntaxhighlight lang="bash">/projappl/project_2008666/turbogap | ||
| + | </syntaxhighlight> | ||
| + | To install TurboGAP please run | ||
| + | |||
| + | <syntaxhighlight lang="bash">git clone --recursive http://github.com/mcaroba/turbogap.git /your/turbogap/source/directory | ||
| + | </syntaxhighlight> | ||
| + | Where /your/turbogap/source/directory is the directory where you're putting the TurboGAP source code. To build the TurboGAP binary and library, you need to select the options that best match your architecture, by editing this line in the Makefile with one of the names of the corresponding makefiles in turbogap/makefiles: | ||
| + | |||
| + | <syntaxhighlight lang="bash">include makefiles/Makefile.Ubuntu_gfortran_mpi | ||
| + | </syntaxhighlight> | ||
| + | Then just run <code>make</code> | ||
| + | |||
| + | <syntaxhighlight lang="bash">make | ||
| + | </syntaxhighlight> | ||
| + | <span id="make-the-potential-work-in-turbogap"></span> | ||
| + | == Make the potential work in '''TurboGAP''' == | ||
| + | |||
| + | You must convert potentials which are trained from [https://github.com/libatoms/QUIP libAtoms] (the xml files) to <code>*.gap</code> files. It can be run by | ||
| + | |||
| + | <syntaxhighlight lang="bash">python3 /path/turbogap/tools/quip_to_xml/make_gap_fit.py your_potential.xml your_potential.gap {your_hirshfeld.xml} | ||
| + | </syntaxhighlight> | ||
| + | <span id="tutorial"></span> | ||
| + | = Tutorial = | ||
| + | |||
| + | <span id="create-amorphous-carbon"></span> | ||
== Create Amorphous Carbon == | == Create Amorphous Carbon == | ||
| − | |||
| − | + | Here, we perform molecular dynamics simulations to form amorphous carbon from graphite. To do this, we use a simple melt-quench procedure. | |
| − | + | ||
| − | + | # We heat up the graphite to 9000K, thereby randomizing the structure. | |
| − | + | # We quench to 1000K. | |
| + | # We anneal the structure at 1000K, to allow the carbon bonds a chance to reform. | ||
| + | # Cool to 300K, which is the temperature we want to do our GCMC simulations. | ||
| − | === 1. Randomise === | + | <span id="randomise"></span> |
| + | === 1. Randomise === | ||
| + | <span id="quench"></span> | ||
=== 2. Quench === | === 2. Quench === | ||
| + | <span id="anneal"></span> | ||
=== 3. Anneal === | === 3. Anneal === | ||
| − | === 4. Cool === | + | <span id="cool"></span> |
| − | + | === 4. Cool === | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | == | + | <span id="perform-standard-gcmc"></span> |
| + | = Perform Standard GCMC = | ||
| − | + | There are many options for GCMC steps which one can perform. | |
| − | + | # Move: move any particle randomly, up to some maximum amount. | |
| + | # | ||
| − | + | <span id="using-hamiltonian-md-for-hybrid-type-moves"></span> | |
| − | + | = Using Hamiltonian MD, for hybrid type moves = | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | + | <span id="npt-monte-carlo"></span> | |
| + | = NPT Monte-Carlo = | ||
Revision as of 22:59, 1 November 2023
This tutorial will focus on using Grand-Canonical Monte-Carlo (GCMC) to determine equilibrium structures and properties of oxygenated amorphous carbon using TurboGAP.
The structure of this tutorial as as follows:
- Create an amorphous carbon structure using molecular dynamics, via a melt-quench procedure.
- Perform a standard GCMC calculation to populate the structure with oxygen.
- Perform a hybrid Monte-Carlo/MD simulation, using the Hamiltonian MD approach, for an increased acceptance rate.
Contents
Introduction
What is TurboGAP?
TurboGAP is a code used to simulate Machine-Learned Potentials, specifically, Gaussian Approximation Potentials.
It has numerous selling points:
- It is fast.
- It uses soapturbo descriptors, which are both faster and more accurate than your typical SOAP expansion (also found in QUIP). See the original paper paper by Miguel Caro for more details: Optimizing many-body atomic descriptors for enhanced computational performance of machine learning based interatomic potentials.
- 2b/3b/core potentials (of course).
- MPI parallelised, (overlapping domain decomposition currently being developed with help of CSC).
- GPU implementation in progress (with CSC support too).
- It can perform not just molecular statics (with/without box relaxation) and dynamics (NVT/NPT), it can perform Monte-Carlo simulations.
- Full Grand-Canonical Monte Carlo (NVT) / (NPT) with multiple move types available:
- Insertion / removal / displacement / swap / volume / hybrid MD / Hamiltonian.
- Prediction of an arbitrary number of local properties.
- ML Van der Waals (by prediction of local hirshfeld volumes) using Tkachenko-Scheffler
- Heikki Muhli has developed full Many-Body Polarizability capability.
- (Sneak Peek!): we have added the capability to simulate numerous types of experimental data (ML XPS/XRD) and can allow them to influence simulation! (Talk to Tigany Zarrouk/look out for the papers when they come out on arXiv)!
Installing TurboGAP
Note: This step is not necessary if you are at the MLIP workshop. TurboGAP is installed in the path (on Mahti)
/projappl/project_2008666/turbogap
To install TurboGAP please run
git clone --recursive http://github.com/mcaroba/turbogap.git /your/turbogap/source/directory
Where /your/turbogap/source/directory is the directory where you're putting the TurboGAP source code. To build the TurboGAP binary and library, you need to select the options that best match your architecture, by editing this line in the Makefile with one of the names of the corresponding makefiles in turbogap/makefiles:
include makefiles/Makefile.Ubuntu_gfortran_mpi
Then just run make
make
Make the potential work in TurboGAP
You must convert potentials which are trained from libAtoms (the xml files) to *.gap files. It can be run by
python3 /path/turbogap/tools/quip_to_xml/make_gap_fit.py your_potential.xml your_potential.gap {your_hirshfeld.xml}
Tutorial
Create Amorphous Carbon
Here, we perform molecular dynamics simulations to form amorphous carbon from graphite. To do this, we use a simple melt-quench procedure.
- We heat up the graphite to 9000K, thereby randomizing the structure.
- We quench to 1000K.
- We anneal the structure at 1000K, to allow the carbon bonds a chance to reform.
- Cool to 300K, which is the temperature we want to do our GCMC simulations.
1. Randomise
2. Quench
3. Anneal
4. Cool
Perform Standard GCMC
There are many options for GCMC steps which one can perform.
- Move: move any particle randomly, up to some maximum amount.
Using Hamiltonian MD, for hybrid type moves