You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: docs/user/key_concepts_overview.md
+13-13
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
# Key concepts in atomate2: `Job` & `Flow``Makers`, `InputSet`, `TaskDocument`, and `Builder`
4
4
5
-
# Introduction
5
+
##Introduction
6
6
This tutorial will give you a comprehensive high-level overview of the key concepts in atomate2, diving into the important features of `Job` and `Flow` makers, as well as `InputSets`, `TaskDocuments`, and `Builders`.
7
7
8
8
## `Job` and `Flow` makers
@@ -94,11 +94,11 @@ Oftentimes, such flows then involve dynamic jobs. For the phonon calculations th
94
94
In this particular case, the flow maker `BasePhononMaker` is also inheriting from `ABC` (Abstract Base Classes). <!--more comprehensive explanation on ABCs?-->
95
95
96
96
97
-
# InputSet
97
+
##InputSet
98
98
99
99
An `InputSet` is a convenient way to provide a collection of input data for one or more input files as dict-like container. They set the backbone framework to handle the input settings for a variety of computational codes, like e.g. VASP, Q-Chem, LAMMPS, CP2K and ABINIT.
100
100
101
-
## Basics
101
+
###Basics
102
102
103
103
The [pymatgen](https://github.com/materialsproject/pymatgen) class `InputSet` is a core class to manage and write the input files for the several computational codes to a file location the user specifies.
104
104
There are predefined "recipes" for generating `InputSets` tailored to specific tasks like structural relaxation or the band structure calculation and more, that are provided as `InputGenerator` classes.
@@ -137,7 +137,7 @@ class InputSet(MSONable, MutableMapping):
137
137
138
138
It is essential to emphasize that all `InputSet` must implement the `from_directory` classmethod.
139
139
140
-
## Examples
140
+
###Examples
141
141
142
142
Diving into the specifics for the `VaspInputSet` will demonstrate you some important features of an input set.
143
143
@@ -173,15 +173,15 @@ If necessary, it is also possible to specify optional files. The `VaspInputSet`
173
173
174
174
The corresponding input generator is the `VaspInputGenerator`.
175
175
176
-
# TaskDocument
176
+
##TaskDocument
177
177
A `TaskDocument` (often shorted to TaskDoc) is a dictionary object that makes it feasible to collect all the information of the respective computational chemistry calculation run.
178
178
179
-
## Basics
179
+
###Basics
180
180
181
181
`TaskDocuments` are schemas that contain and store all the information of a calculation run, like the (resulting) structure, input data (`InputDoc`), output data (`OutputDoc`), task directory name (`dir_name`) and many more items depending on the respective prerequisites of the computational software that is used.
182
182
Task documents are a very practical way to transfer (input and output) data between two different jobs. For instance, when you need the structure or path to the (current) job directory in the subsequent step, you can pass it in form of `taskdoc.structure` and `taskdoc.dir_name`, with `taskdoc` as an example instance of the task document class in question.
183
183
184
-
## Technical Aspects
184
+
###Technical Aspects
185
185
186
186
In atomate2, the `TaskDocument` objects inherit from the [emmet](https://github.com/materialsproject/emmet/) classes `StructureMetadata` or `MoleculeMetadata`.
187
187
@@ -191,7 +191,7 @@ class StructureMetadata(EmmetBaseModel):
191
191
```
192
192
They contain the structure or molecule metadata, tailored to the variety of computational software.
193
193
194
-
## Examples
194
+
###Examples
195
195
196
196
Let's take the `ForceFieldTaskDocument` as an illustrative example for task documents, inheriting from the `StructureMetadata` class.
197
197
@@ -263,16 +263,16 @@ class TaskDocument(StructureMetadata, MoleculeMetadata):
263
263
```
264
264
Now, the TaskDoc stores structure or molecule metadata like `structure`, CP2K-specific items like `included_objects` or `cp2k_objects` and more items.
265
265
266
-
# Builder
266
+
##Builder
267
267
268
268
The `Builder` object is provided by the [maggma](https://github.com/materialsproject/maggma/) toolkit and serves as a data processing step.
269
269
270
-
## Basics
270
+
###Basics
271
271
272
272
`Builders` offer an interface for writing data transformations: you can get items from a `Store`, process and manipulate the input data and prepare an output document, as well as update and add the processed items to the target store(s).
273
273
274
274
275
-
## Technical Aspects
275
+
###Technical Aspects
276
276
277
277
The `Builder` and `Store` are the core classes of maggma and give the user tools to build data pipelines from different types of data sources.
278
278
@@ -299,7 +299,7 @@ class Builder(MSONable, metaclass=ABCMeta):
299
299
```
300
300
The `Builder` class has three main functionalities that are `get_items` to retrieve data from the source store(s), `process_item` to handle the input items and create an output document to be then added to the target store(s) by `update_target`.
301
301
302
-
## Examples
302
+
###Examples
303
303
304
304
Atomate2 supplies us with the `ElasticBuilder` that is a handy example for a `Builder`:
305
305
```
@@ -330,6 +330,6 @@ Then during the data and item processing stage, the deformations will be grouped
330
330
Finally, the builder compiles the processed items into an ElasticDocument from the group of tasks, and adds the new elastic documents to the elasticity store.
331
331
332
332
333
-
# Exercises
333
+
##Exercises
334
334
335
335
Construct a flow for a `DoubleRelaxMaker` (a workflow consisting of two relax jobs) based on the `CHGNetRelaxMaker`. Then add a final non-SCF static job using the `CHGNetStaticMaker`. Compare your result with the [DoubleRelaxMaker for VASP](https://materialsproject.github.io/atomate2/reference/atomate2.vasp.flows.core.DoubleRelaxMaker.html#atomate2.vasp.flows.core.DoubleRelaxMaker). Try to replicate one of the other [VASP workflows](https://materialsproject.github.io/atomate2/user/codes/vasp.html#list-of-vasp-workflows) as well!
0 commit comments