{"id":9499,"library":"atomate","title":"atomate: Materials Science Workflows with FireWorks","description":"atomate provides pre-built, robust workflows for computational materials science, primarily leveraging the VASP code and integrating with the FireWorks workflow management system. It builds upon pymatgen, custodian, and maggma for comprehensive materials data handling and job execution. The current version is 1.1.0, with releases occurring a few times a year to add features and fix bugs.","status":"active","version":"1.1.0","language":"en","source_language":"en","source_url":"https://github.com/hackingmaterials/atomate","tags":["materials science","workflow automation","fireworks","VASP","DFT","pymatgen"],"install":[{"cmd":"pip install atomate","lang":"bash","label":"Basic Installation"}],"dependencies":[{"reason":"Core materials analysis library for structures, calculations, etc.","package":"pymatgen"},{"reason":"Workflow management system for submitting and managing jobs.","package":"fireworks"},{"reason":"Robust job management for error handling and self-correction in calculations.","package":"custodian"},{"reason":"Data store abstraction for handling calculation results.","package":"maggma"}],"imports":[{"note":"Common workflow for static energy calculation in VASP.","symbol":"wf_static","correct":"from atomate.vasp.workflows.base import wf_static"},{"note":"A Firetask for running VASP calculations via Custodian.","symbol":"RunVaspCustodian","correct":"from atomate.vasp.firetasks.run_calc import RunVaspCustodian"},{"note":"Required for defining material structures; often used with atomate workflows.","symbol":"Structure","correct":"from pymatgen.core import Structure"}],"quickstart":{"code":"import os\nfrom atomate.vasp.workflows.base import wf_static\nfrom pymatgen.core import Structure\n\n# Define a simple structure for a quick example\nstructure = Structure(\n    lattice=[[3, 0, 0], [0, 3, 0], [0, 0, 3]],\n    species=[\"Fe\", \"O\"],\n    coords=[[0, 0, 0], [0.5, 0.5, 0.5]]\n)\n\n# Set VASP command and database file path from environment variables if available\n# These are crucial for running actual simulations.\nvasp_cmd = os.environ.get('VASP_CMD', 'vasp_std') # Default to 'vasp_std' if not set\ndb_file = os.environ.get('ATOMATE_DB_FILE', None) # If None, atomate looks for default FireWorks config\n\n# Create a static energy workflow for this structure\n# Note: This code *defines* the workflow; running it requires FireWorks setup,\n# a VASP executable, and a MongoDB database.\nworkflow = wf_static(\n    structure=structure,\n    vasp_cmd=vasp_cmd,\n    db_file=db_file\n)\n\nprint(f\"Successfully created atomate workflow: {workflow.name}\")\nprint(f\"This workflow contains {len(workflow.fws)} FireWorks.\")\nprint(\"To run, ensure FireWorks is configured (FW_CONFIG_FILE), MongoDB is running, and VASP is accessible.\")\n# Example of how you would submit (requires FireWorks LaunchPad setup):\n# from fireworks import LaunchPad\n# lpad = LaunchPad.auto_load()\n# lpad.add_wf(workflow)\n# print(\"Workflow added to LaunchPad. Use 'lpad_launch --nlaunches 1' to start.\")","lang":"python","description":"This quickstart demonstrates how to define a basic VASP static energy workflow using atomate. It requires `pymatgen` for structure definition and outputs a `FireWorks.Workflow` object. To actually execute this workflow, you will need a properly configured FireWorks environment, a running MongoDB instance, and the VASP executable accessible on your system. The `vasp_cmd` and `db_file` parameters are critical for job execution and result storage."},"warnings":[{"fix":"Consult the atomate 1.x documentation and relevant FireWorks documentation for updated API calls. Consider a fresh installation if upgrading from highly outdated versions.","message":"Major architectural changes occurred in atomate prior to version 1.0 (e.g., introduction of 'atomate2' as a separate project with jobflow). If migrating from very old versions (<0.9.x), expect significant API differences.","severity":"breaking","affected_versions":"<1.0.0"},{"fix":"Follow the FireWorks installation guide (fireworks.readthedocs.io) to set up your `FW_CONFIG_FILE` and ensure MongoDB is running and accessible. Common environment variables are `FW_CONFIG_FILE` and `VASP_CMD`.","message":"atomate relies heavily on FireWorks for workflow management. You must have a working FireWorks installation with a configured `FW_CONFIG_FILE` pointing to a MongoDB instance to run workflows.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Ensure VASP is installed, compiled, and its executable is in your system's PATH or explicitly provided to `vasp_cmd` (e.g., `vasp_cmd='/path/to/vasp_std'`).","message":"VASP executable must be available on your system where FireWorks jobs are launched. The `vasp_cmd` parameter in workflows and firetasks specifies how to call VASP.","severity":"gotcha","affected_versions":"All versions using VASP workflows"},{"fix":"Review the `atomate` documentation or `setup.py` on GitHub for required optional dependencies based on your specific use case. Consider `pip install \"pymatgen[full]\"` as a common addition.","message":"The `pip install atomate` command installs a minimal set of dependencies. For full functionality or specific integrations, you may need to install additional packages (e.g., `pymatgen[full]`, `atomate-vasp` if using split versions, or other specific database connectors).","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-17T00:00:00.000Z","next_check":"2026-07-16T00:00:00.000Z","problems":[{"fix":"Install FireWorks: `pip install fireworks`","cause":"The FireWorks library, a core dependency for atomate's workflow engine, is not installed.","error":"ModuleNotFoundError: No module named 'fireworks'"},{"fix":"Set up your FireWorks configuration file. Create a `FW_CONFIG_FILE.yaml` (or similar) and set the environment variable: `export FW_CONFIG_FILE=/path/to/your/FW_CONFIG_FILE.yaml`. Consult FireWorks documentation for details.","cause":"atomate workflows, through FireWorks, require a configuration file (`FW_CONFIG_FILE`) to connect to a MongoDB database for job management.","error":"fireworks.utilities.fw_config.ConfigError: Cannot find FireWorks configuration file!"},{"fix":"Explicitly pass `db_file='path/to/db.json'` or `db_file=None` if using FireWorks' default config. Ensure your FireWorks configuration (via `FW_CONFIG_FILE`) correctly points to your database.","cause":"Some atomate workflows or firetasks expect a 'db_file' parameter or a configured default for database interaction, which may be missing or incorrectly set.","error":"KeyError: 'db_file'"},{"fix":"Pass `vasp_cmd='vasp_std'` (or your specific VASP executable path) directly to the workflow/firetask, or set it as an environment variable (e.g., `export VASP_CMD=/usr/local/bin/vasp_std`).","cause":"The command to execute VASP was not provided to the workflow or firetask, and no default was found in the configuration.","error":"ValueError: vasp_cmd is None or not found. Please provide vasp_cmd in the config or as an argument."}]}