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
This script utilises the `hex` slurm experiment management package.
18
21
The script is designed to run on a slurm cluster, but can also be run locally by removing the slurm-specific code.
19
22
`hex` can be installed via pip:
@@ -35,7 +38,9 @@ To use the RAFFLE generator, you need to install the `raffle_generator` branch o
35
38
cd agox
36
39
pip install -e .
37
40
38
-
The RAFFLE generator differs slightly from the standard AGOX generator, as it requires a host structure to be provided directly to the generator.
41
+
The RAFFLE generator differs slightly from the standard AGOX generator.
42
+
If using `from_host` in RAFFLE, then the host structure must be provided to the generator directly in addition to the environment.
43
+
Otherwise, the host structure (without information regarding the system's energy) is provided automatically by the AGOX framework.
39
44
40
45
An environment must be set up for the search, this defines the host structure, the stoichiometry of atoms to be added, and the bounding box for the search.
41
46
The bounding box must first be defined in terms of a lower left and upper right corner, which can be done using the `bounds_to_confinement` function.
@@ -93,15 +98,17 @@ The RAFFLE generator can then be set up using the `RaffleGenerator` class in AGO
93
98
94
99
generator = RaffleGenerator(
95
100
**environment.get_confinement(),
96
-
host= template,
101
+
element_energies= {
102
+
'Si': -4.0,
103
+
'Ge': -3.5
104
+
}, # example element energies
97
105
database= database,
98
-
environment= environment,
99
-
species= symbols,
100
106
n_structures=5,
101
107
...
102
108
)
103
109
104
110
This sets up the RAFFLE generator to generate 5 structures each iteration, using the host structure and the environment defined earlier.
111
+
A more extensive list of arguments specific to the RAFFLE generator can be found at the end of this tutorial in the section :ref:`raffle_generator_arguments`.
105
112
106
113
Evaluators and structure filters can be set up as usual in AGOX.
107
114
For example, to set up an evaluator to perform structural optimisation, and a pre- and post-process filter that removes structures with bondlengths less than a certain value, you can use the following code:
@@ -143,3 +150,43 @@ Finally, the AGOX search can be set up and run using the `AGOX` class in AGOX:
143
150
144
151
## Run the AGOX search for N_iterations
145
152
agox.run(N_iterations=40)
153
+
154
+
155
+
.. _raffle_generator_arguments:
156
+
157
+
RAFFLE generator specific arguments
158
+
-----------------------------------
159
+
160
+
The RAFFLE generator has several specific arguments that can be set to control the generation of structures.
161
+
The required argument for the RAFFLE generator is:
162
+
163
+
- ``element_energies``: A dictionary of element energies, taking the form ``{'Si': -4.0, 'Ge': -3.5}``. These are reference energies for the elements in the system, similar to chemical potentials.
164
+
165
+
More information on this can be found in :ref:`element-energies`.
166
+
167
+
Other optional arguments that can be set include:
168
+
169
+
- ``n_structures``: The number of structures to generate in each iteration.
170
+
- ``host``: The host structure to use for the generation. This can be an ASE Atoms object.
171
+
- ``kBT``: The weighting factor for scaling the importance of different atomic features based on their system's relative energy.
172
+
- ``history_len``: The length of the history for tracking change in the generalised descriptor.
173
+
- ``width``: The width of the Gaussian functions used in the distribution functions (list of three floats, for 2-, 3-, and 4-body interactions).
174
+
- ``sigma``: The standard deviation of the Gaussian functions used in the distribution functions (list of three floats, for 2-, 3-, and 4-body interactions).
175
+
- ``cutoff_min``: The minimum cutoff for the Gaussian functions (list of three floats, for 2-, 3-, and 4-body interactions).
176
+
- ``cutoff_max``: The maximum cutoff for the Gaussian functions (list of three floats, for 2-, 3-, and 4-body interactions).
177
+
- ``radius_distance_tol``: The radius distance tolerance for the element-pair covalent radii (list of four floats, for 3-body min, 3-body max, 4-body min, and 4-body max interactions).
178
+
- ``transfer_data``: A list of ASE Atoms objects used to initialise the generalised descriptor.
179
+
- ``method_ratio``: The ratio of placement methods to use in the generation (dictionary with keys `void`, `rand`, `walk`, `grow`, and `min`, and values as floats representing the relative importance of each method).
180
+
- ``deallocate_systems``: A boolean flag to indicate whether to deallocate the individual distribution functions of systems after they have been combined into the generalised descriptor.
181
+
- ``from_host``: A boolean flag to indicate whether to represent the energies with respect to the host structure.
182
+
- ``max_walk_attempts``: The maximum number of attempts to place an atom using the `walk` method before giving up.
183
+
- ``walk_step_size_coarse``: The initial/coarse step size for the `walk` method.
184
+
- ``walk_step_size_fine``: The final/fine step size for the `walk` method.
185
+
- ``grid_spacing``: The spacing of the grid used for the `void` and `min` methods.
186
+
- ``seed``: A random seed for reproducibility.
187
+
188
+
Other arguments exist that are not specific to the RAFFLE generator, but are used in the AGOX framework, such as:
189
+
190
+
- ``database``: The database object to use for storing the generated structures.
191
+
192
+
Documentation of these arguments can be found in the AGOX documentation: https://agox.gitlab.io/agox/generators/
0 commit comments