atomate.vasp.builders package

Submodules

atomate.vasp.builders.bandgap_estimation module

class atomate.vasp.builders.bandgap_estimation.BandgapEstimationBuilder(materials_write)

Bases: object

__init__(materials_write)

Starting with an existing materials collection with dielectric constant data, adds estimated band gaps that may be more accurate than typical GGA calculations.

Run the “DielectricBuilder” before running this builder.

Args:

materials_write: mongodb collection for materials (write access needed)

static from_file(db_file, m='materials', **kwargs)

Get builder using only a db file.

Args:

db_file: (str) path to db file m: (str) name of “materials” collection **kwargs: other parameters to feed into the builder, e.g. mapi_key

Returns:

BandgapEstimationBuilder

reset()
run()

atomate.vasp.builders.base module

class atomate.vasp.builders.base.AbstractBuilder

Bases: object

Abstract builder class. Defines the contract and must be subclassed by all builders.

abstract classmethod from_file(filename)

Set the builder from a config file, e.g., a db file

abstract reset()

Unset the building.

abstract run()

Run the builder.

atomate.vasp.builders.boltztrap_materials module

class atomate.vasp.builders.boltztrap_materials.BoltztrapMaterialsBuilder(materials_write, boltztrap_read)

Bases: atomate.vasp.builders.base.AbstractBuilder

__init__(materials_write, boltztrap_read)

Update materials collection based on boltztrap collection.

Args:

materials_write (pymongo.collection): mongodb collection for materials (write access needed) boltztrap_read (pymongo.collection): mongodb collection for boltztrap (suggest read-only for safety)

classmethod from_file(db_file, m='materials', b='boltztrap', **kwargs)

Get a BoltztrapMaterialsBuilder using only a db file.

Args:

db_file (str): path to db file m (str): name of “materials” collection b (str): name of “boltztrap” collection **kwargs: other params to put into BoltztrapMaterialsBuilder

reset()

Unset the building.

run()

Run the builder.

atomate.vasp.builders.dielectric module

class atomate.vasp.builders.dielectric.DielectricBuilder(materials_write)

Bases: object

__init__(materials_write)

Starting with an existing materials collection, adds some averages and eigenvalues for dielectric constants rather than just the tensor

Args:

materials_write: mongodb collection for materials (write access needed)

static from_file(db_file, m='materials', **kwargs)

Get a DielectricBuilder using only a db file.

Args:

db_file: (str) path to db file m: (str) name of “materials” collection **kwargs: other parameters to feed into the builder, e.g. mapi_key

Returns:

DielectricBuilder

reset()
run()

atomate.vasp.builders.file_materials module

class atomate.vasp.builders.file_materials.FileMaterialsBuilder(materials_write, data_file, delimiter=',', header_lines=0)

Bases: atomate.vasp.builders.base.AbstractBuilder

__init__(materials_write, data_file, delimiter=',', header_lines=0)

Updates the database using a data file. Format of file must be: <material_id or formula>, <property>, <value>

Comment lines should start with ‘#’.

Args:

materials_write: mongodb collection for materials (write access needed) data_file (str): path to data file delimiter (str): delimiter for file parsing header_lines (int): number of header lines to skip in data file

classmethod from_file(db_file, data_file=None, m='materials', **kwargs)

Get a FileMaterialsBuilder using only a db file.

Args:

db_file (str): path to db file data_file (str): path to data file m (str): name of “materials” collection **kwargs: other parameters to feed into the builder, e.g. mapi_key

reset()

Unset the building.

run()

Run the builder.

atomate.vasp.builders.fix_tasks module

class atomate.vasp.builders.fix_tasks.FixTasksBuilder(tasks_write)

Bases: atomate.vasp.builders.base.AbstractBuilder

__init__(tasks_write)

Fix historical problems in the tasks database

Args:

tasks_write (pymongo.collection): mongodb collection for tasks (write access needed)

classmethod from_file(db_file, t='tasks', **kwargs)

Get a FixTasksBuilder using only a db file.

Args:

db_file (str): path to db file t (str): name of “tasks” collection **kwargs: other params to put into FixTasksBuilder

reset()

Unset the building.

run()

Run the builder.

atomate.vasp.builders.materials_descriptor module

class atomate.vasp.builders.materials_descriptor.MaterialsDescriptorBuilder(materials_write, update_all=False)

Bases: atomate.vasp.builders.base.AbstractBuilder

__init__(materials_write, update_all=False)

Starting with an existing materials collection, adds some compositional and structural descriptors.

Args:

materials_write: mongodb collection for materials (write access needed) update_all: (bool) - if true, updates all docs. If false, updates incrementally

classmethod from_file(db_file, m='materials', **kwargs)

Get a MaterialsDescriptorBuilder using only a db file.

Args:

db_file: (str) path to db file m: (str) name of “materials” collection **kwargs: other parameters to feed into the builder

reset()

Unset the building.

run()

Run the builder.

atomate.vasp.builders.materials_ehull module

class atomate.vasp.builders.materials_ehull.MaterialsEhullBuilder(materials_write, mapi_key=None, update_all=False)

Bases: atomate.vasp.builders.base.AbstractBuilder

__init__(materials_write, mapi_key=None, update_all=False)

Starting with an existing materials collection, adds stability information and the Materials Project ID. Args:

materials_write: mongodb collection for materials (write access needed) mapi_key: (str) Materials API key (if MAPI_KEY env. var. not set) update_all: (bool) - if true, updates all docs. If false, only updates

docs w/o a stability key

classmethod from_file(db_file, m='materials', **kwargs)

Get a MaterialsEhullBuilder using only a db file Args:

db_file: (str) path to db file m: (str) name of “materials” collection **kwargs: other parameters to feed into the builder, e.g. mapi_key

reset()

Unset the building.

run()

Run the builder.

atomate.vasp.builders.tags module

class atomate.vasp.builders.tags.TagsBuilder(materials_write, tasks_read, tasks_prefix='t')

Bases: atomate.vasp.builders.base.AbstractBuilder

__init__(materials_write, tasks_read, tasks_prefix='t')

Starting with an existing materials collection, searches all its component tasks for the “tags” and key in the tasks collection and copies them to the materials collection. Thus, the “tags” for a material will be the union of all the tags for its component tasks.

Args:

materials_write (pymongo.collection): materials collection with write access. tasks_read (pymongo.collection): read-only(for safety) tasks collection. tasks_prefix (str): the string prefix for tasks, e.g. “t” for a task_id like “t-132”

classmethod from_file(db_file, m='materials', t='tasks', **kwargs)

Get a TagsCollector using only a db file.

Args:

db_file (str): path to db file m (str): name of “materials” collection **kwargs: other parameters to feed into the builder, e.g. update_all

reset()

Unset the building.

run()

Run the builder.

atomate.vasp.builders.tasks_materials module

class atomate.vasp.builders.tasks_materials.TasksMaterialsBuilder(materials_write, counter_write, tasks_read, tasks_prefix='t', materials_prefix='m', query=None, settings_file=None)

Bases: atomate.vasp.builders.base.AbstractBuilder

__init__(materials_write, counter_write, tasks_read, tasks_prefix='t', materials_prefix='m', query=None, settings_file=None)

Create a materials collection from a tasks collection.

Args:

materials_write (pymongo.collection): mongodb collection for materials (write access needed) counter_write (pymongo.collection): mongodb collection for counter (write access needed) tasks_read (pymongo.collection): mongodb collection for tasks (suggest read-only for safety) tasks_prefix (str): a string prefix for tasks, e.g. “t” gives a task_id like “t-132” materials_prefix (str): a string prefix to prepend to material_ids query (dict): a pymongo query on tasks_read for which tasks to include in the builder settings_file (str): filepath to a custom settings path

classmethod from_file(db_file, m='materials', c='counter', t='tasks', **kwargs)

Get a TaskMaterialsBuilder using only a db file.

Args:

db_file (str): path to db file m (str): name of “materials” collection c (str): name of “counter” collection t (str): name of “tasks” collection **kwargs: other params to put into TasksMaterialsBuilder

reset()

Unset the building.

run()

Run the builder.

atomate.vasp.builders.tasks_materials.module_dir = '/Users/ajain/Documents/code_lbl/atomate/atomate/vasp/builders'

This class collects all “tasks” (individual calculations) on a single compound and produces a summary report in a new collection (“materials”). The tasks are matched based on having the same crystal structure, with some options for overriding this.

There is lots of config for this builder in the accompanying “tasks_materials_settings.yaml” file.

atomate.vasp.builders.utils module

This class contains common functions for builders

atomate.vasp.builders.utils.dbid_to_int(dbid)
atomate.vasp.builders.utils.dbid_to_str(prefix, dbid)

Module contents