data.oc.structure_generator#
Attributes#
Classes#
A class that creates adsorbate/bulk/slab objects given specified indices, |
Functions#
|
Writes vasp inputs and metadata for a specified slab |
|
|
|
Module Contents#
- class data.oc.structure_generator.StructureGenerator(args, bulk_index, surface_index, adsorbate_index)#
A class that creates adsorbate/bulk/slab objects given specified indices, and writes vasp input files and metadata for multiple placements of the adsorbate on the slab. You can choose random, heuristic, or both types of placements.
The output directory structure will have the following nested structure, where “files” represents the vasp input files and the metadata.pkl:
- outputdir/
- bulk0/
- surface0/
surface/files ads0/
heur0/files heur1/files rand0/files …
- ads1/
…
- surface1/
…
- bulk1/
…
Precomputed surfaces will be calculated and saved out if they don’t already exist in the provided directory.
- Parameters:
args (argparse.Namespace) – Contains all command line args
bulk_index (int) – Index of the bulk within the bulk db
surface_index (int) – Index of the surface in the list of all possible surfaces
adsorbate_index (int) – Index of the adsorbate within the adsorbate db
- args#
- bulk_index#
- surface_index#
- adsorbate_index#
- logger#
- run()#
Create adsorbate/bulk/surface objects, generate adslab placements, and write to files.
- _write_adslabs(adslab_obj, mode_str)#
Write one set of adslabs (called separately for random and heurstic placements)
- data.oc.structure_generator.write_surface(args, slab, bulk_index, surface_index)#
Writes vasp inputs and metadata for a specified slab
- data.oc.structure_generator.parse_args()#
- data.oc.structure_generator.precompute_slabs(bulk_ind)#
- data.oc.structure_generator.run_placements(inputs)#
- data.oc.structure_generator.args#