atomate.vasp package¶
Subpackages¶
- atomate.vasp.analysis package
- atomate.vasp.builders package
- Subpackages
- Submodules
- atomate.vasp.builders.bandgap_estimation module
- atomate.vasp.builders.base module
- atomate.vasp.builders.boltztrap_materials module
- atomate.vasp.builders.dielectric module
- atomate.vasp.builders.file_materials module
- atomate.vasp.builders.fix_tasks module
- atomate.vasp.builders.materials_descriptor module
- atomate.vasp.builders.materials_ehull module
- atomate.vasp.builders.tags module
- atomate.vasp.builders.tasks_materials module
- atomate.vasp.builders.utils module
- Module contents
- atomate.vasp.firetasks package
- Subpackages
- atomate.vasp.firetasks.tests package
- Submodules
- atomate.vasp.firetasks.tests.test_copy module
- atomate.vasp.firetasks.tests.test_exchange module
- atomate.vasp.firetasks.tests.test_get_interpolated_poscar module
- atomate.vasp.firetasks.tests.test_lobster_tasks module
- atomate.vasp.firetasks.tests.test_polarization_to_db module
- atomate.vasp.firetasks.tests.test_write_vasp module
- atomate.vasp.firetasks.tests.test_write_vasp_from_interpolated_poscar module
- Module contents
- atomate.vasp.firetasks.tests package
- Submodules
- atomate.vasp.firetasks.approx_neb_dynamic_tasks module
- atomate.vasp.firetasks.approx_neb_tasks module
- atomate.vasp.firetasks.electrode_tasks module
- atomate.vasp.firetasks.exchange module
- atomate.vasp.firetasks.glue_tasks module
- atomate.vasp.firetasks.lobster_tasks module
- atomate.vasp.firetasks.neb_tasks module
- atomate.vasp.firetasks.parse_outputs module
- atomate.vasp.firetasks.run_calc module
- atomate.vasp.firetasks.write_inputs module
- Module contents
- Subpackages
- atomate.vasp.fireworks package
- Submodules
- atomate.vasp.fireworks.approx_neb module
- atomate.vasp.fireworks.approx_neb_dynamic module
- atomate.vasp.fireworks.core module
- atomate.vasp.fireworks.exchange module
- atomate.vasp.fireworks.lobster module
- atomate.vasp.fireworks.nmr module
- atomate.vasp.fireworks.polarization module
- Module contents
- atomate.vasp.tests package
- atomate.vasp.workflows package
- Subpackages
- atomate.vasp.workflows.base package
- Submodules
- atomate.vasp.workflows.base.adsorption module
- atomate.vasp.workflows.base.approx_neb module
- atomate.vasp.workflows.base.bulk_modulus module
- atomate.vasp.workflows.base.core module
- atomate.vasp.workflows.base.deformations module
- atomate.vasp.workflows.base.elastic module
- atomate.vasp.workflows.base.electrode module
- atomate.vasp.workflows.base.exchange module
- atomate.vasp.workflows.base.ferroelectric module
- atomate.vasp.workflows.base.gibbs module
- atomate.vasp.workflows.base.hubbard_hund_linresp module
- atomate.vasp.workflows.base.lobster module
- atomate.vasp.workflows.base.magnetism module
- atomate.vasp.workflows.base.neb module
- atomate.vasp.workflows.base.raman module
- atomate.vasp.workflows.base.thermal_expansion module
- Module contents
- atomate.vasp.workflows.presets package
- atomate.vasp.workflows.tests package
- Submodules
- atomate.vasp.workflows.tests.test_adsorbate_workflow module
- atomate.vasp.workflows.tests.test_approx_neb_workflow module
- atomate.vasp.workflows.tests.test_bulk_modulus_workflow module
- atomate.vasp.workflows.tests.test_elastic_workflow module
- atomate.vasp.workflows.tests.test_exchange_workflow module
- atomate.vasp.workflows.tests.test_ferroelectric_workflow module
- atomate.vasp.workflows.tests.test_hubbard_hund_linresp module
- atomate.vasp.workflows.tests.test_insertion_workflow module
- atomate.vasp.workflows.tests.test_lobster_workflow module
- atomate.vasp.workflows.tests.test_magnetism_workflow module
- atomate.vasp.workflows.tests.test_neb_workflow module
- atomate.vasp.workflows.tests.test_nmr module
- atomate.vasp.workflows.tests.test_raman_workflow module
- atomate.vasp.workflows.tests.test_vasp_workflows module
- Module contents
- atomate.vasp.workflows.base package
- Module contents
- Subpackages
Submodules¶
atomate.vasp.config module¶
atomate.vasp.database module¶
atomate.vasp.drones module¶
This Drone tries to produce a more sensible task dictionary than the default VaspToDbTaskDrone. Some of the changes are documented in this thread: https://groups.google.com/forum/#!topic/pymatgen/pQ-emBpeV5U
-
class
atomate.vasp.drones.
VaspDrone
(runs=None, parse_dos='auto', bandstructure_mode='auto', parse_locpot=True, additional_fields=None, use_full_uri=True, parse_bader=False, parse_chgcar=False, parse_aeccar=False, parse_potcar_file=True, store_volumetric_data=(), store_additional_json=False)¶ Bases:
pymatgen.apps.borg.hive.AbstractDrone
pymatgen-db VaspToDbTaskDrone with updated schema and documents processing methods. Please refer to matgendb.creator.VaspToDbTaskDrone documentation.
-
__init__
(runs=None, parse_dos='auto', bandstructure_mode='auto', parse_locpot=True, additional_fields=None, use_full_uri=True, parse_bader=False, parse_chgcar=False, parse_aeccar=False, parse_potcar_file=True, store_volumetric_data=(), store_additional_json=False)¶ Initialize a Vasp drone to parse VASP outputs Args:
- runs (list): Naming scheme for multiple calculations in on folder e.g. [“relax1”,”relax2”].
Can be subfolder or extension
parse_dos (str or bool): Whether to parse the DOS. Can be “auto”, True or False. “auto” will only parse DOS if NSW = 0, so there are no ionic steps bandstructure_mode (str or bool): How to parse the bandstructure or not. Can be “auto”,”line”, True or False.
- “auto” will parse the bandstructure with projections for NSCF calcs and decide automatically
if it’s line mode or uniform. Saves the bandstructure in the output doc.
- “line” will parse the bandstructure as a line mode calculation with projections.
Saves the bandstructure in the output doc.
- True will parse the bandstructure with projections as a uniform calculation.
Saves the bandstructure in the output doc.
- False will parse the bandstructure without projections to calculate vbm, cbm, band_gap, is_metal and efermi
Dose not saves the bandstructure in the output doc.
parse_locpot (bool): Parses the LOCPOT file and saves the 3 axis averages additional_fields (dict): dictionary of additional fields to add to output document use_full_uri (bool): converts the directory path to the full URI path parse_bader (bool): Run and parse Bader charge data. Defaults to True if Bader is present parse_chgcar (bool): Run and parse CHGCAR file parse_aeccar (bool): Run and parse AECCAR0 and AECCAR2 files store_volumetric_data (list): List of files to store, choose from (‘CHGCAR’, ‘LOCPOT’, ‘AECCAR0’, ‘AECCAR1’, ‘AECCAR2’, ‘ELFCAR’), case insensitive store_additional_json (bool): If True, parse any .json files present and store as sub-doc including the FW.json if present
-
as_dict
()¶ A JSON serializable dict representation of an object.
-
assimilate
(path)¶ Adapted from matgendb.creator Parses vasp runs(vasprun.xml file) and insert the result into the db. Get the entire task doc from the vasprum.xml and the OUTCAR files in the path. Also adds some post-processed info.
- Args:
path (str): Path to the directory containing vasprun.xml and OUTCAR files
- Returns:
(dict): a task dictionary
-
filter_files
(path, file_pattern='vasprun.xml')¶ Find the files that match the pattern in the given path and return them in an ordered dictionary. The searched for files are filtered by the run types defined in self.runs. e.g. [“relax1”, “relax2”, …]. Only 2 schemes of the file filtering is enabled: searching for run types in the list of files and in the filenames. Modify this method if more sophisticated filtering scheme is needed.
- Args:
path (string): path to the folder file_pattern (string): files to be searched for
- Returns:
- dict: names of the files to be processed further. The key is set from list
of run types: self.runs
-
classmethod
from_dict
(d)¶ - Parameters
d – Dict representation.
- Returns
MSONable class.
-
generate_doc
(dir_name, vasprun_files, outcar_files)¶ Adapted from matgendb.creator.generate_doc
-
get_valid_paths
(path)¶ There are some restrictions on the valid directory structures:
There can be only one vasp run in each directory. Nested directories are fine.
Directories designated “relax1”…”relax9” are considered to be parts of a multiple-optimization run.
Directories containing vasp output with “.relax1”…”.relax9” are also considered as parts of a multiple-optimization run.
-
post_process
(dir_name, d)¶ Post-processing for various files other than the vasprun.xml and OUTCAR. Looks for files: transformations.json and custodian.json. Modify this if other output files need to be processed.
- Args:
- dir_name:
The dir_name.
- d:
Current doc generated.
-
process_bandstructure
(vrun)¶
-
process_dos
(vrun)¶
-
process_raw_data
(dir_name, taskname='standard')¶ It is useful to store what raw data has been calculated and exists for easier querying of the taskdoc.
- Parameters
dir_name – directory to search
taskname – taskname, e.g. “relax1”
- Returns
dict of files present
-
process_vasprun
(dir_name, taskname, filename)¶ Adapted from matgendb.creator
Process a vasprun.xml file.
-
schema
= {'analysis': {'delta_volume', 'delta_volume_as_percent', 'errors', 'max_force', 'warnings'}, 'calcs_reversed': {'completed_at', 'composition_reduced', 'composition_unit_cell', 'dir_name', 'elements', 'formula_anonymous', 'formula_pretty', 'formula_reduced_abc', 'has_vasp_completed', 'input', 'nelements', 'nsites', 'output', 'run_type', 'task', 'vasp_version'}, 'input': {'hubbards', 'is_hubbard', 'is_lasph', 'potcar_spec', 'pseudo_potential', 'structure', 'xc_override'}, 'output': {'bandgap', 'cbm', 'density', 'energy', 'energy_per_atom', 'forces', 'is_gap_direct', 'is_metal', 'spacegroup', 'stress', 'structure', 'vbm'}, 'root': {'analysis', 'calcs_reversed', 'chemsys', 'completed_at', 'composition_reduced', 'composition_unit_cell', 'dir_name', 'elements', 'formula_anonymous', 'formula_pretty', 'formula_reduced_abc', 'input', 'nelements', 'nsites', 'output', 'run_stats', 'schema', 'state'}}¶
-
static
set_analysis
(d, max_force_threshold=0.5, volume_change_threshold=0.2)¶ Adapted from matgendb.creator
set the ‘analysis’ key
-
validate_doc
(d)¶ Sanity check. Make sure all the important keys are set
-
atomate.vasp.powerups module¶
atomate.vasp.submission_filter module¶
-
class
atomate.vasp.submission_filter.
SubmissionFilter
(is_valid=True, potcar_exists=True, max_natoms=200, is_ordered=True, not_in_MP=True, MAPI_KEY=None, require_bandstructure=False)¶ Bases:
pymatgen.alchemy.filters.AbstractStructureFilter
-
NO_POTCARS
= ['Po', 'At', 'Rn', 'Fr', 'Ra', 'Am', 'Cm', 'Bk', 'Cf', 'Es', 'Fm', 'Md', 'No', 'Lr']¶
-
__init__
(is_valid=True, potcar_exists=True, max_natoms=200, is_ordered=True, not_in_MP=True, MAPI_KEY=None, require_bandstructure=False)¶ Initialize a submission filter for checking that structures are valid for calculations.
- Args:
is_valid (bool): If true, checks structure validity potcar_exists (bool): If true, ensures all elements have VASP PAW_PBE POTCAR max_natoms (int): If not None, ensures structure has <=max_natoms atoms is_ordered (bool): If true, ensures structure is ordered not_in_MP (bool): If true, ensures structure not in MP MAPI_KEY (str): For MP checks, your MAPI key if not previously set as config var require_bandstructure (bool): For MP checks, require a band structure calc
-
as_dict
()¶ A JSON serializable dict representation of an object.
-
classmethod
from_dict
(d)¶ - Parameters
d – Dict representation.
- Returns
MSONable class.
-
test
(structure)¶ Method to execute the test.
- Args:
structure (Structure): Input structure to test
- Returns:
(bool) Structures that return true are kept in the Transmuter object during filtering.
-