Builders
Builders construct the initial structures that enter an ALF active-learning
loop. A builder task typically returns a MoleculesObject containing an
ase.Atoms object, a molecule id, and any metadata the sampler needs later.
In a master configuration, the selected builder is specified with the
builder_task import string:
{
"builder_task": "alframework.builders.builders.simple_condensed_phase_builder_task",
"builder_config_path": "builder_config.json"
}
Most builder tasks run on the alf_sampler_executor Parsl executor because
they feed candidate structures into the sampler queue.
Supported Builder Tasks
Builder task |
What it builds |
Typical use |
|---|---|---|
|
Loads a random |
Reusing pre-generated atomic configurations, such as the UO2 example. |
|
Places fragment-library molecules into a simulation cell with density, minimum-distance, and placement controls. |
Standard molecular or condensed-phase workflows, including simple water and ionic-liquid examples. |
|
Batched condensed-phase builder that returns multiple
|
Higher builder throughput when |
|
Creates a charge-neutral random atomic system from element charge rules, then places atoms in a cubic periodic box. |
Molten salts or other ionic atomic systems. |
|
Creates a specialized binary Ti/Al random atomic system. |
Ti/Al alloy-style test or demonstration systems. |
|
Loads reactant, transition-state, and product structures and stores the reaction set in metadata. |
Reactive sampling workflows. |
|
Builds molecular fragments from SMILES with RDKit, then uses condensed-phase placement logic. |
Optional SMILES-based condensed-phase workflows when RDKit is installed. |
Choosing A Builder
Use simple_condensed_phase_builder_task for most workflows that start from
fragment files such as .xyz or other ASE-readable molecule files. This is
the standard choice for molecular liquid, solvent, and mixture examples.
Use simple_multi_condensed_phase_builder_task when builder submission
overhead is significant or when one builder task should produce several
independent candidates. Pair this with maximum_builder_structures in the
master configuration so ALF accounts for the number of structures returned by
each builder task.
Use atomic_system_task when the system is described by atomic species and
formal charges rather than molecular fragments. The task chooses a neutral
composition near target_num_atoms and enforces minimum-image placement
constraints in a cubic periodic box.
Use simple_cfg_loader_task when useful initial structures already exist as
.cfg files. This is a lightweight loader rather than a packing builder.
Use load_reactive_task for reaction-path workflows. It loads one reactant,
transition-state, and product triplet, chooses one structure as the current
configuration, and stores the rest of the reaction context in metadata for the
reactive sampler.
Use rdkit_condensed_phase_builder_task only when RDKit is installed and
SMILES strings are the desired source of molecular fragments. It is optional
because RDKit is not part of the lightest ALF setup.
Common Configuration Fields
- Fragment and condensed-phase builders
These fields are used by
simple_condensed_phase_builder_task,simple_multi_condensed_phase_builder_task, and related condensed-phase builders.Field
Meaning
molecule_library_dirormolecule_library_pathDirectory containing molecular fragment files. Older examples may use either spelling depending on the builder task.
solute_molecule_optionsList of possible solute fragment sets. A builder task chooses one set for a generated structure.
solvent_moleculesSolvent fragments, optionally with relative sampling weights.
cell_rangePer-axis simulation-cell size ranges.
RrangeDensity or packing range sampled for generated structures.
min_distMinimum allowed interatomic distance during placement.
max_patienceNumber of failed placement attempts before giving up on a structure.
center_first_moleculeWhether to center the first solute without random rotation.
max_atomsOptional atom-count cap for generated systems.
shakeRandom coordinate perturbation applied during placement or loading.
- Atomic-system builders
These fields are used by
atomic_system_taskand related atomic box builders.Field
Meaning
atom_chargesMapping from element symbol to formal charge used to choose a neutral composition.
target_num_atomsTarget system size. The final count may differ slightly so the system can remain neutral.
min_distanceMinimum atom-atom distance in Angstroms.
box_length_rangeRange from which the cubic simulation-box length is sampled.
- Reactive builders
These fields are used by
load_reactive_task.Field
Meaning
molecule_library_dirDirectory containing reaction structure files.
r_filesReactant structure file or file pattern read by ASE.
ts_filesTransition-state structure file or file pattern read by ASE.
p_filesProduct structure file or file pattern read by ASE.
N_reactionsNumber of reaction entries available in the files.
- Batched builders
maximum_builder_structuresbelongs in the master configuration, not the builder configuration. It tells ALF how many candidate structures one builder task may return. Use it withsimple_multi_condensed_phase_builder_task.
Builder API Links
You can link from this guide directly to API pages: