From 129c5dfbfb721ecb3f6f8d4610e43dba18626744 Mon Sep 17 00:00:00 2001
From: Anubhav Jain Bases: Task to copy the given list of files from the given directory to the destination directory.
To customize override the setup_copy and copy_files methods. from_dir (str): path to the directory containing the files to be copied.
to_dir (str): path to the destination directory
filesystem (str)
files_to_copy (list): list of file names.
-exclude_files (list): list of file names to be excluded.' + _('Searching') + '
').appendTo(this.out);
this.dots = $('').appendTo(this.title);
- this.status = $('').appendTo(this.out);
+ this.status = $('').appendTo(this.out);
$('#search-progress').text(_('Preparing search...'));
@@ -138,7 +148,6 @@ var Search = {
*/
query : function(query) {
var i;
- var stopwords = DOCUMENTATION_OPTIONS.SEARCH_LANGUAGE_STOP_WORDS;
// stem the searchterms and add them to the correct list
var stemmer = new Stemmer();
@@ -260,11 +269,7 @@ var Search = {
displayNextItem();
});
} else if (DOCUMENTATION_OPTIONS.HAS_SOURCE) {
- var suffix = DOCUMENTATION_OPTIONS.SOURCELINK_SUFFIX;
- if (suffix === undefined) {
- suffix = '.txt';
- }
- $.ajax({url: DOCUMENTATION_OPTIONS.URL_ROOT + '_sources/' + item[5] + (item[5].slice(-suffix.length) === suffix ? '' : suffix),
+ $.ajax({url: DOCUMENTATION_OPTIONS.URL_ROOT + item[0] + DOCUMENTATION_OPTIONS.FILE_SUFFIX,
dataType: "text",
complete: function(jqxhr, textstatus) {
var data = jqxhr.responseText;
@@ -314,12 +319,13 @@ var Search = {
for (var prefix in objects) {
for (var name in objects[prefix]) {
var fullname = (prefix ? prefix + '.' : '') + name;
- if (fullname.toLowerCase().indexOf(object) > -1) {
+ var fullnameLower = fullname.toLowerCase()
+ if (fullnameLower.indexOf(object) > -1) {
var score = 0;
- var parts = fullname.split('.');
+ var parts = fullnameLower.split('.');
// check for different match types: exact matches of full name or
// "last name" (i.e. last dotted part)
- if (fullname == object || parts[parts.length - 1] == object) {
+ if (fullnameLower == object || parts[parts.length - 1] == object) {
score += Scorer.objNameMatch;
// matches in last name
} else if (parts[parts.length - 1].indexOf(object) > -1) {
@@ -386,6 +392,19 @@ var Search = {
{files: terms[word], score: Scorer.term},
{files: titleterms[word], score: Scorer.title}
];
+ // add support for partial matches
+ if (word.length > 2) {
+ for (var w in terms) {
+ if (w.match(word) && !terms[word]) {
+ _o.push({files: terms[w], score: Scorer.partialTerm})
+ }
+ }
+ for (var w in titleterms) {
+ if (w.match(word) && !titleterms[word]) {
+ _o.push({files: titleterms[w], score: Scorer.partialTitle})
+ }
+ }
+ }
// no match but word was a required one
if ($u.every(_o, function(o){return o.files === undefined;})) {
@@ -425,8 +444,12 @@ var Search = {
var valid = true;
// check if all requirements are matched
- if (fileMap[file].length != searchterms.length)
- continue;
+ var filteredTermCount = // as search terms with length < 3 are discarded: ignore
+ searchterms.filter(function(term){return term.length > 2}).length
+ if (
+ fileMap[file].length != searchterms.length &&
+ fileMap[file].length != filteredTermCount
+ ) continue;
// ensure that none of the excluded terms is in the search result
for (i = 0; i < excluded.length; i++) {
@@ -457,7 +480,8 @@ var Search = {
* words. the first one is used to find the occurrence, the
* latter for highlighting it.
*/
- makeSearchSummary : function(text, keywords, hlwords) {
+ makeSearchSummary : function(htmlText, keywords, hlwords) {
+ var text = Search.htmlToText(htmlText);
var textLower = text.toLowerCase();
var start = 0;
$.each(keywords, function() {
diff --git a/docs/atomate.common.firetasks.html b/docs/atomate.common.firetasks.html
index 4b9ed6af3..9f43d145f 100644
--- a/docs/atomate.common.firetasks.html
+++ b/docs/atomate.common.firetasks.html
@@ -1,18 +1,17 @@
-
+
-
-
-
Navigation
Submodules
atomate.common.firetasks.glue_tasks moduleΒΆ
atomate.common.firetasks.glue_tasks.
CopyFiles
(*args, **kwargs)ΒΆatomate.common.firetasks.glue_tasks.
CopyFiles
(*args, **kwargs)ΒΆ
fireworks.core.firework.FiretaskBase
-
+
copy_files
()ΒΆcopy_files
()ΒΆ
Defines the copy operation. Override this to customize copying.
optional_params
= ['from_dir', 'to_dir', 'filesystem', 'files_to_copy', 'exclude_files']ΒΆoptional_params
= ['from_dir', 'to_dir', 'filesystem', 'files_to_copy', 'exclude_files']ΒΆ
run_task
(fw_spec)ΒΆrun_task
(fw_spec)ΒΆ
This method gets called when the Firetask is run. It can take in a Firework spec, perform some task using that data, and then return an output in the form of a FWAction.
-In addition, this spec contains a special β_fw_envβ key that contains the env settings of the FWorker calling this method. This provides for abstracting out certain commands or settings. For example, βfooβ may be named βfoo1β in resource @@ -101,28 +98,29 @@
setup_copy
(from_dir, to_dir=None, filesystem=None, files_to_copy=None, exclude_files=None, from_path_dict=None)ΒΆsetup_copy
(from_dir, to_dir=None, filesystem=None, files_to_copy=None, exclude_files=None, from_path_dict=None)ΒΆ
setup the copy i.e setup the from directory, filesystem, destination directory etc.
-from_dir (str) +
from_dir (str) to_dir (str) filesystem (str) files_to_copy (list): if None all the files in the from_dir will be copied exclude_files (list) from_path_dict (dict): dict specification of the path. If specified must contain atleast
--+the key βpathβ that specifies the path to the from_dir.
+the key βpathβ that specifies the path to the from_dir.
+
atomate.common.firetasks.glue_tasks.
CopyFilesFromCalcLoc
(*args, **kwargs)ΒΆatomate.common.firetasks.glue_tasks.
CopyFilesFromCalcLoc
(*args, **kwargs)ΒΆ
Bases: fireworks.core.firework.FiretaskBase
Based on CopyVaspOutputs but for general file copying. Note that βcalc_locsβ must be set in the fw_spec. Files are copied to the current folder.
-None: if filenames not set, all files in calc_loc will be copied +
calc_loc: name of target fw to get location for within the calc_locs.
+None: if filenames not set, all files in calc_loc will be copied β$ALL_NO_SUBDIRSβ in filenames: similar to filenames is None β$ALLβ in filenames: all files and subfolders copied, name_prepend
--+and name_append cannot be set in this case
+and name_append cannot be set in this case
+
name_prepend (str): string to prepend filenames, e.g. can be a directory. +
name_prepend (str): string to prepend filenames, e.g. can be a directory. name_append (str): string to append to destination filenames.
optional_params
= ['filenames', 'name_prepend', 'name_append']ΒΆoptional_params
= ['filenames', 'name_prepend', 'name_append']ΒΆ
required_params
= ['calc_loc']ΒΆrequired_params
= ['calc_loc']ΒΆ
run_task
(fw_spec=None)ΒΆrun_task
(fw_spec=None)ΒΆ
This method gets called when the Firetask is run. It can take in a Firework spec, perform some task using that data, and then return an output in the form of a FWAction.
-In addition, this spec contains a special β_fw_envβ key that contains the env settings of the FWorker calling this method. This provides for abstracting out certain commands or settings. For example, βfooβ may be named βfoo1β in resource @@ -180,11 +175,12 @@
atomate.common.firetasks.glue_tasks.
CreateFolder
(*args, **kwargs)ΒΆatomate.common.firetasks.glue_tasks.
CreateFolder
(*args, **kwargs)ΒΆ
Bases: fireworks.core.firework.FiretaskBase
FireTask to create new folder with the option of changing directory to the new folder.
-folder_name (str): folder name.
+Defaults to False.
+Defaults to True.
+optional_params
= ['change_dir', 'relative_path']ΒΆoptional_params
= ['change_dir', 'relative_path']ΒΆ
required_params
= ['folder_name']ΒΆrequired_params
= ['folder_name']ΒΆ
run_task
(fw_spec)ΒΆrun_task
(fw_spec)ΒΆ
This method gets called when the Firetask is run. It can take in a Firework spec, perform some task using that data, and then return an output in the form of a FWAction.
-In addition, this spec contains a special β_fw_envβ key that contains the env settings of the FWorker calling this method. This provides for abstracting out certain commands or settings. For example, βfooβ may be named βfoo1β in resource @@ -235,11 +228,12 @@
atomate.common.firetasks.glue_tasks.
DeleteFiles
(*args, **kwargs)ΒΆatomate.common.firetasks.glue_tasks.
DeleteFiles
(*args, **kwargs)ΒΆ
Bases: fireworks.core.firework.FiretaskBase
Delete files Uses glob to search for files so any pattern it can accept can be used
-files: list of files to remove
+required_params
= ['files']ΒΆrequired_params
= ['files']ΒΆ
run_task
(fw_spec=None)ΒΆrun_task
(fw_spec=None)ΒΆ
This method gets called when the Firetask is run. It can take in a Firework spec, perform some task using that data, and then return an output in the form of a FWAction.
-In addition, this spec contains a special β_fw_envβ key that contains the env settings of the FWorker calling this method. This provides for abstracting out certain commands or settings. For example, βfooβ may be named βfoo1β in resource @@ -278,11 +270,12 @@
atomate.common.firetasks.glue_tasks.
PassCalcLocs
(*args, **kwargs)ΒΆatomate.common.firetasks.glue_tasks.
PassCalcLocs
(*args, **kwargs)ΒΆ
Bases: fireworks.core.firework.FiretaskBase
Passes information about where the current calculation is located for the next FireWork. This is achieved by passing a key to the fw_spec called βcalc_locsβ with this information.
-name (str): descriptive name for this calculation file/dir
+defaults to None
+current working directory.
+optional_params
= ['filesystem', 'path']ΒΆoptional_params
= ['filesystem', 'path']ΒΆ
required_params
= ['name']ΒΆrequired_params
= ['name']ΒΆ
run_task
(fw_spec)ΒΆrun_task
(fw_spec)ΒΆ
This method gets called when the Firetask is run. It can take in a Firework spec, perform some task using that data, and then return an output in the form of a FWAction.
-In addition, this spec contains a special β_fw_envβ key that contains the env settings of the FWorker calling this method. This provides for abstracting out certain commands or settings. For example, βfooβ may be named βfoo1β in resource @@ -335,11 +325,12 @@
atomate.common.firetasks.glue_tasks.
PassResult
(*args, **kwargs)ΒΆatomate.common.firetasks.glue_tasks.
PassResult
(*args, **kwargs)ΒΆ
Bases: fireworks.core.firework.FiretaskBase
Passes properties and corresponding user-specified data resulting from a run from parent to child fireworks. Uses a string syntax similar to Mongo-style queries to designate values of output file dictionaries to retrieve. For example, one could specify a task to pass the stress from the current calculation using:
PassResult(pass_dict={βstressβ: β>>ionic_steps.-1.stressβ})
-to child fireworks. If value is a string beginning with β>>β, the firework will search the parsed VASP output dictionary for the designated property by following the sequence of keys separated with periods, e. g. β>>ionic_steps.-1.stressβ is used to designate the stress from the last ionic_step. If the value -is not a string or does not begin with β>>β, it is passed as is.
with which to parse the output, e. g. pymatgen.io.vasp.Vasprun +or pymatgen.io.feff.LDos.from_file, class must be MSONable
+e. g. {βfilenameβ: βvasprun.xmlβ, βparse_dosβ: False, +βparse_eigenβ: False}
+to β.β, e. g. current directory
+defaults to β_setβ
+to βprev_calc_resultβ
+optional_params
= ['calc_dir', 'mod_spec_cmd', 'mod_spec_key']ΒΆoptional_params
= ['calc_dir', 'mod_spec_cmd', 'mod_spec_key']ΒΆ
required_params
= ['pass_dict', 'parse_class', 'parse_kwargs']ΒΆrequired_params
= ['pass_dict', 'parse_class', 'parse_kwargs']ΒΆ
run_task
(fw_spec)ΒΆrun_task
(fw_spec)ΒΆ
This method gets called when the Firetask is run. It can take in a Firework spec, perform some task using that data, and then return an output in the form of a FWAction.
-In addition, this spec contains a special β_fw_envβ key that contains the env settings of the FWorker calling this method. This provides for abstracting out certain commands or settings. For example, βfooβ may be named βfoo1β in resource @@ -411,11 +398,12 @@
atomate.common.firetasks.glue_tasks.
get_calc_loc
(target_name, calc_locs)ΒΆatomate.common.firetasks.glue_tasks.
get_calc_loc
(target_name, calc_locs)ΒΆ
This is a helper method that helps you pick out a certain calculation from an array of calc_locs.
-with matching nameget_
+Otherwise, return most recent calc_loc overall
matching name, else use most recent calc_loc
+calc_locs: (dict) The dictionary of all calc_locs
+calc_locs: (dict) The dictionary of all calc_locs
+(dict) dict with subkeys path, filesystem, and name
atomate.common.firetasks.parse_outputs.
ToDbTask
(*args, **kwargs)ΒΆatomate.common.firetasks.parse_outputs.
ToDbTask
(*args, **kwargs)ΒΆ
Bases: fireworks.core.firework.FiretaskBase
General task to parse output data via a Drone and either (i) write to JSON file or (ii) insert into a database.
-drone (AbstractDrone): Drone to convert the data to dict
+Default is None, which will write data to JSON file.
+mmdb (MMDb) (str): If db_file, sets the type of MMDb, e.g. βatomate.vasp.database.MMVaspDbβ calc_dir (str): path to dir (on current filesystem) that contains calculation output files.
--Default: use current working directory.
Default: use current working directory.
+recent calc_loc with the matching name
+options (dict): dict of options to pass into the Drone +
options (dict): dict of options to pass into the Drone additional_fields (dict): dict of additional fields to add
optional_params
= ['mmdb', 'db_file', 'calc_dir', 'calc_loc', 'additional_fields', 'options']ΒΆoptional_params
= ['mmdb', 'db_file', 'calc_dir', 'calc_loc', 'additional_fields', 'options']ΒΆ
run_task
(fw_spec)ΒΆrun_task
(fw_spec)ΒΆ
This method gets called when the Firetask is run. It can take in a Firework spec, perform some task using that data, and then return an output in the form of a FWAction.
-In addition, this spec contains a special β_fw_envβ key that contains the env settings of the FWorker calling this method. This provides for abstracting out certain commands or settings. For example, βfooβ may be named βfoo1β in resource @@ -506,11 +490,12 @@
atomate.common.firetasks.run_calc.
RunCommand
(*args, **kwargs)ΒΆatomate.common.firetasks.run_calc.
RunCommand
(*args, **kwargs)ΒΆ
Bases: fireworks.core.firework.FiretaskBase
Execute a command directly (no custodian).
-cmd (str): the name of the full executable to run. Supports env_chk.
+expand_vars (str): Set to true to expand variable names in the cmd.
+run_task
(fw_spec)ΒΆrun_task
(fw_spec)ΒΆ
This method gets called when the Firetask is run. It can take in a Firework spec, perform some task using that data, and then return an output in the form of a FWAction.
-In addition, this spec contains a special β_fw_envβ key that contains the env settings of the FWorker calling this method. This provides for abstracting out certain commands or settings. For example, βfooβ may be named βfoo1β in resource @@ -558,11 +541,12 @@
atomate.common.firetasks.run_calc.
RunCustodianFromObjects
(*args, **kwargs)ΒΆatomate.common.firetasks.run_calc.
RunCustodianFromObjects
(*args, **kwargs)ΒΆ
Bases: fireworks.core.firework.FiretaskBase
Run VASP using custodian in a generic manner using built-in custodian objects
-jobs: ([Job]) - a list of custodian jobs to run +handlers: ([ErrorHandler]) - a list of error handlers
+validators: ([Validator]) - a list of Validators +custodian_params ({}) - dict of all other custodian parameters
+optional_params
= ['validators', 'custodian_params']ΒΆoptional_params
= ['validators', 'custodian_params']ΒΆ
run_task
(fw_spec)ΒΆrun_task
(fw_spec)ΒΆ
This method gets called when the Firetask is run. It can take in a Firework spec, perform some task using that data, and then return an output in the form of a FWAction.
-In addition, this spec contains a special β_fw_envβ key that contains the env settings of the FWorker calling this method. This provides for abstracting out certain commands or settings. For example, βfooβ may be named βfoo1β in resource @@ -610,11 +592,12 @@
atomate.common.firetasks.tests.test_glue_tasks.
TestCopyFilesFromCalcLoc
(methodName='runTest')ΒΆatomate.common.firetasks.tests.test_glue_tasks.
TestCopyFilesFromCalcLoc
(methodName='runTest')ΒΆ
Bases: atomate.utils.testing.AtomateTest
setUpClass
()ΒΆsetUpClass
()ΒΆ
Hook method for setting up class fixture before running tests in the class.
test_copyfilesfromcalcloc
()ΒΆtest_copyfilesfromcalcloc
()ΒΆ
atomate.common.firetasks.tests.test_glue_tasks.
TestCreateFolder
(methodName='runTest')ΒΆatomate.common.firetasks.tests.test_glue_tasks.
TestCreateFolder
(methodName='runTest')ΒΆ
Bases: atomate.utils.testing.AtomateTest
test_createfolder
()ΒΆtest_createfolder
()ΒΆ
atomate.common.firetasks.tests.test_glue_tasks.
TestDeleteFiles
(methodName='runTest')ΒΆatomate.common.firetasks.tests.test_glue_tasks.
TestDeleteFiles
(methodName='runTest')ΒΆ
Bases: atomate.utils.testing.AtomateTest
test_cleanupfiles
()ΒΆtest_cleanupfiles
()ΒΆ
atomate.common.firetasks.tests.test_glue_tasks.
TestPassCalcLocs
(methodName='runTest')ΒΆatomate.common.firetasks.tests.test_glue_tasks.
TestPassCalcLocs
(methodName='runTest')ΒΆ
Bases: atomate.utils.testing.AtomateTest
test_passcalclocs
()ΒΆtest_passcalclocs
()ΒΆ
atomate.common.firetasks.tests.test_parse_outputs.
TestDrone
ΒΆatomate.common.firetasks.tests.test_parse_outputs.
TestDrone
ΒΆ
Bases: pymatgen.apps.borg.hive.AbstractDrone
__init__
()ΒΆ__init__
()ΒΆ
Initialize self. See help(type(self)) for accurate signature.
assimilate
(path)ΒΆassimilate
(path)ΒΆ
Assimilate data in a directory path into a pymatgen object. Because of the quirky nature of Pythonβs multiprocessing, the object must support pymatgenβs as_dict() for parallel processing.
-path: directory path
+An assimilated object
+get_valid_paths
(path)ΒΆget_valid_paths
(path)ΒΆ
Checks if path contains valid data for assimilation, and then returns the valid paths. The paths returned can be a list of directory or file paths, depending on what kind of data you are assimilating. For @@ -131,15 +130,14 @@
(parent, subdirs, files).
+List of valid dir/file paths for assimilation
+atomate.common.firetasks.tests.test_parse_outputs.
TestToDbTask
(methodName='runTest')ΒΆatomate.common.firetasks.tests.test_parse_outputs.
TestToDbTask
(methodName='runTest')ΒΆ
Bases: atomate.utils.testing.AtomateTest
test_ToDbTask
()ΒΆtest_ToDbTask
()ΒΆ
atomate.feff.firetasks.glue_tasks.
CopyFeffOutputs
(*args, **kwargs)ΒΆatomate.feff.firetasks.glue_tasks.
CopyFeffOutputs
(*args, **kwargs)ΒΆ
Bases: atomate.common.firetasks.glue_tasks.CopyFiles
Copy files from a previous run directory to the current directory. Note: must specify either βcalc_locβ or βcalc_dirβ to indicate the directory
--containing the files to copy.
containing the files to copy.
+search for the most recent calc_loc with the matching name.
+calc_dir (str): path to dir that contains VASP output files. +
calc_dir (str): path to dir that contains VASP output files. filesystem (str): remote filesystem. e.g. username@host exclude_files (list): list fo filenames to be excluded when copying.
optional_params
= ['calc_loc', 'calc_dir', 'filesystem', 'exclude_files']ΒΆoptional_params
= ['calc_loc', 'calc_dir', 'filesystem', 'exclude_files']ΒΆ
run_task
(fw_spec)ΒΆrun_task
(fw_spec)ΒΆ
This method gets called when the Firetask is run. It can take in a Firework spec, perform some task using that data, and then return an output in the form of a FWAction.
-In addition, this spec contains a special β_fw_envβ key that contains the env settings of the FWorker calling this method. This provides for abstracting out certain commands or settings. For example, βfooβ may be named βfoo1β in resource @@ -99,11 +96,12 @@
atomate.feff.firetasks.parse_outputs.
AddPathsToFilepadTask
(*args, **kwargs)ΒΆatomate.feff.firetasks.parse_outputs.
AddPathsToFilepadTask
(*args, **kwargs)ΒΆ
Bases: fireworks.core.firework.FiretaskBase
Insert the scattering amplitude outputs(all feffNNNN.dat files) to gridfs using filepad.
-labels (list): list of labels to tag the inserted files. Useful for querying later. filepad_file (str): path to the filepad connection settings file. compress (bool): wether or not to compress the file contents before insertion. -metadata (dict): metadata.
optional_params
= ['labels', 'filepad_file', 'compress', 'metadata']ΒΆoptional_params
= ['labels', 'filepad_file', 'compress', 'metadata']ΒΆ
run_task
(fw_spec)ΒΆrun_task
(fw_spec)ΒΆ
This method gets called when the Firetask is run. It can take in a Firework spec, perform some task using that data, and then return an output in the form of a FWAction.
-In addition, this spec contains a special β_fw_envβ key that contains the env settings of the FWorker calling this method. This provides for abstracting out certain commands or settings. For example, βfooβ may be named βfoo1β in resource @@ -147,11 +143,12 @@
atomate.feff.firetasks.parse_outputs.
SpectrumToDbTask
(*args, **kwargs)ΒΆatomate.feff.firetasks.parse_outputs.
SpectrumToDbTask
(*args, **kwargs)ΒΆ
Bases: fireworks.core.firework.FiretaskBase
Parse the output of absorption/core-loss spectrum calculations(xmu.dat, eels.dat) and insert it into the database.
-absorbing_atom (str): absorbing atom symbol structure (Structure): input structure spectrum_type (str): XANES, EXAFS, ELNES, EXELFS -output_file (str): the output file name. xmu.dat or eels.dat
input_file (str): path to the feff input file. +output_file (str): the output file name. xmu.dat or eels.dat
+input_file (str): path to the feff input file. calc_dir (str): path to dir (on current filesystem) that contains FEFF output files.
--Default: use current working directory.
Default: use current working directory.
+recent calc_loc with the matching name
+db_file (str): path to the db file. +
db_file (str): path to the db file. edge (str): absorption edge metadata (dict): meta data
optional_params
= ['input_file', 'calc_dir', 'calc_loc', 'db_file', 'edge', 'metadata']ΒΆoptional_params
= ['input_file', 'calc_dir', 'calc_loc', 'db_file', 'edge', 'metadata']ΒΆ
required_params
= ['absorbing_atom', 'structure', 'spectrum_type', 'output_file']ΒΆrequired_params
= ['absorbing_atom', 'structure', 'spectrum_type', 'output_file']ΒΆ
run_task
(fw_spec)ΒΆrun_task
(fw_spec)ΒΆ
This method gets called when the Firetask is run. It can take in a Firework spec, perform some task using that data, and then return an output in the form of a FWAction.
-In addition, this spec contains a special β_fw_envβ key that contains the env settings of the FWorker calling this method. This provides for abstracting out certain commands or settings. For example, βfooβ may be named βfoo1β in resource @@ -211,11 +206,12 @@
atomate.feff.firetasks.run_calc.
RunFeffDirect
(*args, **kwargs)ΒΆatomate.feff.firetasks.run_calc.
RunFeffDirect
(*args, **kwargs)ΒΆ
Bases: fireworks.core.firework.FiretaskBase
Run FEFF.
-feff_cmd (str): the name of the full executable for running FEFF (supports env_chk)
+required_params
= ['feff_cmd']ΒΆrequired_params
= ['feff_cmd']ΒΆ
run_task
(fw_spec)ΒΆrun_task
(fw_spec)ΒΆ
This method gets called when the Firetask is run. It can take in a Firework spec, perform some task using that data, and then return an output in the form of a FWAction.
-In addition, this spec contains a special β_fw_envβ key that contains the env settings of the FWorker calling this method. This provides for abstracting out certain commands or settings. For example, βfooβ may be named βfoo1β in resource @@ -256,11 +250,12 @@
atomate.feff.firetasks.write_inputs.
WriteEXAFSPaths
(*args, **kwargs)ΒΆatomate.feff.firetasks.write_inputs.
WriteEXAFSPaths
(*args, **kwargs)ΒΆ
Bases: fireworks.core.firework.FiretaskBase
Write the scattering paths to paths.dat file.
-feff_input_set: (FeffDictSet subclass) +paths (list): list of paths. A path = list of site indices.
+degeneracies (list): list of path degeneracies.
+optional_params
= ['degeneracies']ΒΆoptional_params
= ['degeneracies']ΒΆ
required_params
= ['feff_input_set', 'paths']ΒΆrequired_params
= ['feff_input_set', 'paths']ΒΆ
run_task
(fw_spec)ΒΆrun_task
(fw_spec)ΒΆ
This method gets called when the Firetask is run. It can take in a Firework spec, perform some task using that data, and then return an output in the form of a FWAction.
-In addition, this spec contains a special β_fw_envβ key that contains the env settings of the FWorker calling this method. This provides for abstracting out certain commands or settings. For example, βfooβ may be named βfoo1β in resource @@ -309,11 +302,12 @@
atomate.feff.firetasks.write_inputs.
WriteFeffFromIOSet
(*args, **kwargs)ΒΆatomate.feff.firetasks.write_inputs.
WriteFeffFromIOSet
(*args, **kwargs)ΒΆ
Bases: fireworks.core.firework.FiretaskBase
Generate FEFF input (feff.inp) from the given InputSet object or InputSet name
-absorbing_atom (str): absorbing atom symbol +
absorbing_atom (str): absorbing atom symbol structure (Structure): input structure feff_input_set (str or FeffDictSet subclass): The inputset for setting params. If string
--+then either the entire path to the class or the spectrum type must be provided -e.g. βpymatgen.io.feff.sets.MPXANESSetβ or βXANESβ
++then either the entire path to the class or the spectrum type must be provided +e.g. βpymatgen.io.feff.sets.MPXANESSetβ or βXANESβ
+
radius (float): cluster radius in angstroms +other_params (dict): **kwargs to pass into the desired InputSet if using str feff_input_set
optional_params
= ['radius', 'other_params']ΒΆoptional_params
= ['radius', 'other_params']ΒΆ
required_params
= ['absorbing_atom', 'structure', 'feff_input_set']ΒΆrequired_params
= ['absorbing_atom', 'structure', 'feff_input_set']ΒΆ
run_task
(fw_spec)ΒΆrun_task
(fw_spec)ΒΆ
This method gets called when the Firetask is run. It can take in a Firework spec, perform some task using that data, and then return an output in the form of a FWAction.
-In addition, this spec contains a special β_fw_envβ key that contains the env settings of the FWorker calling this method. This provides for abstracting out certain commands or settings. For example, βfooβ may be named βfoo1β in resource @@ -365,11 +357,12 @@
atomate.feff.firetasks.write_inputs.
get_feff_input_set_obj
(fis, *args, **kwargs)ΒΆatomate.feff.firetasks.write_inputs.
get_feff_input_set_obj
(fis, *args, **kwargs)ΒΆ
returns feff input set object.
-the entire path to the class or the spectrum type must be provided +e.g. βpymatgen.io.feff.sets.MPXANESSetβ or βXANESβ
+args (tuple): feff input set args +
args (tuple): feff input set args kwargs (dict): feff input set kwargs
FeffDictSet object
+atomate.feff.firetasks.tests.test_tasks.
TestTasks
(methodName='runTest')ΒΆatomate.feff.firetasks.tests.test_tasks.
TestTasks
(methodName='runTest')ΒΆ
Bases: atomate.utils.testing.AtomateTest
setUp
()ΒΆsetUp
()ΒΆ
Create scratch directory(removes the old one if there is one) and change to it. Also initialize launchpad.
test_copy_feff_outputs_task
()ΒΆtest_copy_feff_outputs_task
()ΒΆ
test_write_paths_task
()ΒΆtest_write_paths_task
()ΒΆ
atomate.feff.fireworks.core.
EELSFW
(absorbing_atom, structure, feff_input_set='ELNES', edge='K', radius=10.0, name='EELS spectroscopy', beam_energy=100, beam_direction=None, collection_angle=1, convergence_angle=1, user_eels_settings=None, feff_cmd='feff', override_default_feff_params=None, db_file=None, parents=None, metadata=None, **kwargs)ΒΆatomate.feff.fireworks.core.
EELSFW
(absorbing_atom, structure, feff_input_set='ELNES', edge='K', radius=10.0, name='EELS spectroscopy', beam_energy=100, beam_direction=None, collection_angle=1, convergence_angle=1, user_eels_settings=None, feff_cmd='feff', override_default_feff_params=None, db_file=None, parents=None, metadata=None, **kwargs)ΒΆ
Bases: fireworks.core.firework.Firework
__init__
(absorbing_atom, structure, feff_input_set='ELNES', edge='K', radius=10.0, name='EELS spectroscopy', beam_energy=100, beam_direction=None, collection_angle=1, convergence_angle=1, user_eels_settings=None, feff_cmd='feff', override_default_feff_params=None, db_file=None, parents=None, metadata=None, **kwargs)ΒΆ__init__
(absorbing_atom, structure, feff_input_set='ELNES', edge='K', radius=10.0, name='EELS spectroscopy', beam_energy=100, beam_direction=None, collection_angle=1, convergence_angle=1, user_eels_settings=None, feff_cmd='feff', override_default_feff_params=None, db_file=None, parents=None, metadata=None, **kwargs)ΒΆ
Write the input set for FEFF-EELSS spectroscopy, run feff and insert the core-loss spectrum to the database(or dump to a json file if db_file=None).
-absorbing_atom (str): absorbing atom symbol +
absorbing_atom (str): absorbing atom symbol structure (Structure): input structure feff_input_set (str or FeffDictSet subclass): The inputset for setting params. If string
--then the entire path to the class or the spectrum type must be provide -e.g. βpymatgen.io.feff.sets.MPELNESSetβ or βELNESβ
edge (str): absorption edge +
then the entire path to the class or the spectrum type must be provide +e.g. βpymatgen.io.feff.sets.MPELNESSetβ or βELNESβ
+edge (str): absorption edge radius (float): cluster radius in angstroms name (str) beam_energy (float): Incident beam energy in keV @@ -96,16 +95,15 @@
atomate.feff.fireworks.core.
EXAFSPathsFW
(absorbing_atom, structure, paths, degeneracies=None, edge='K', radius=10.0, name='EXAFS Paths', feff_input_set='pymatgen.io.feff.sets.MPEXAFSSet', feff_cmd='feff', override_default_feff_params=None, parents=None, filepad_file=None, labels=None, metadata=None, **kwargs)ΒΆatomate.feff.fireworks.core.
EXAFSPathsFW
(absorbing_atom, structure, paths, degeneracies=None, edge='K', radius=10.0, name='EXAFS Paths', feff_input_set='pymatgen.io.feff.sets.MPEXAFSSet', feff_cmd='feff', override_default_feff_params=None, parents=None, filepad_file=None, labels=None, metadata=None, **kwargs)ΒΆ
Bases: fireworks.core.firework.Firework
__init__
(absorbing_atom, structure, paths, degeneracies=None, edge='K', radius=10.0, name='EXAFS Paths', feff_input_set='pymatgen.io.feff.sets.MPEXAFSSet', feff_cmd='feff', override_default_feff_params=None, parents=None, filepad_file=None, labels=None, metadata=None, **kwargs)ΒΆ__init__
(absorbing_atom, structure, paths, degeneracies=None, edge='K', radius=10.0, name='EXAFS Paths', feff_input_set='pymatgen.io.feff.sets.MPEXAFSSet', feff_cmd='feff', override_default_feff_params=None, parents=None, filepad_file=None, labels=None, metadata=None, **kwargs)ΒΆ
Write the input set for FEFF-EXAFS spectroscopy with customized scattering paths, run feff, and insert the scattering amplitude output files(feffNNNN.dat files) to filepad.
-absorbing_atom (str): absorbing atom symbol structure (Structure): input structure paths (list): list of paths. A path = list of site indices that defines the path legs. degeneracies (list): degeneracy of each path. @@ -119,7 +117,8 @@
atomate.feff.fireworks.core.
XASFW
(absorbing_atom, structure, feff_input_set='XANES', edge='K', radius=10.0, name='XAS spectroscopy', feff_cmd='feff', override_default_feff_params=None, db_file=None, parents=None, metadata=None, **kwargs)ΒΆatomate.feff.fireworks.core.
XASFW
(absorbing_atom, structure, feff_input_set='XANES', edge='K', radius=10.0, name='XAS spectroscopy', feff_cmd='feff', override_default_feff_params=None, db_file=None, parents=None, metadata=None, **kwargs)ΒΆ
Bases: fireworks.core.firework.Firework
__init__
(absorbing_atom, structure, feff_input_set='XANES', edge='K', radius=10.0, name='XAS spectroscopy', feff_cmd='feff', override_default_feff_params=None, db_file=None, parents=None, metadata=None, **kwargs)ΒΆ__init__
(absorbing_atom, structure, feff_input_set='XANES', edge='K', radius=10.0, name='XAS spectroscopy', feff_cmd='feff', override_default_feff_params=None, db_file=None, parents=None, metadata=None, **kwargs)ΒΆ
Write the input set for FEFF-XAS spectroscopy, run FEFF and insert the absorption coefficient to the database (or dump to a json file if db_file=None).
-absorbing_atom (str): absorbing atom symbol +
absorbing_atom (str): absorbing atom symbol structure (Structure): input structure feff_input_set (str or FeffDictSet subclass): The inputset for setting params. If string
--then either the entire path to the class or spectrum type must be provided -e.g. βpymatgen.io.feff.sets.MPXANESSetβ or βXANESβ
edge (str): absorption edge +
then either the entire path to the class or spectrum type must be provided +e.g. βpymatgen.io.feff.sets.MPXANESSetβ or βXANESβ
+edge (str): absorption edge radius (float): cluster radius in angstroms name (str) feff_cmd (str): path to the feff binary @@ -188,13 +187,11 @@
atomate.feff.fireworks.tests.test_fireworks.
TestFireworks
(methodName='runTest')ΒΆatomate.feff.fireworks.tests.test_fireworks.
TestFireworks
(methodName='runTest')ΒΆ
Bases: atomate.utils.testing.AtomateTest
setUp
()ΒΆsetUp
()ΒΆ
Create scratch directory(removes the old one if there is one) and change to it. Also initialize launchpad.
test_exafs_paths_fw
()ΒΆtest_exafs_paths_fw
()ΒΆ
atomate.feff.database.
FeffCalcDb
(host='localhost', port=27017, database='feff', collection='tasks', user=None, password=None, **kwargs)ΒΆatomate.feff.database.
FeffCalcDb
(host='localhost', port=27017, database='feff', collection='tasks', user=None, password=None, **kwargs)ΒΆ
Bases: atomate.utils.database.CalcDb
__init__
(host='localhost', port=27017, database='feff', collection='tasks', user=None, password=None, **kwargs)ΒΆ__init__
(host='localhost', port=27017, database='feff', collection='tasks', user=None, password=None, **kwargs)ΒΆ
Initialize self. See help(type(self)) for accurate signature.
build_indexes
(indexes=None, background=True)ΒΆbuild_indexes
(indexes=None, background=True)ΒΆ
Build the indexes.
-indexes (list): list of single field indexes to be built. +background (bool): Run in the background or not.
+reset
()ΒΆreset
()ΒΆ
atomate.feff.workflows.core.
get_absorbing_atom_indices
(structure, absorbing_atom)ΒΆatomate.feff.workflows.core.
get_absorbing_atom_indices
(structure, absorbing_atom)ΒΆ
+structure (Structure): +absorbing_atom (int/str):
+list of site ids
+atomate.feff.workflows.core.
get_unique_site_indices
(structure)ΒΆatomate.feff.workflows.core.
get_unique_site_indices
(structure)ΒΆ
atomate.feff.workflows.core.
get_wf_eels
(absorbing_atom, structure=None, feff_input_set='pymatgen.io.feff.sets.MPELNESSet', edge='K', radius=10.0, beam_energy=100, beam_direction=None, collection_angle=1, convergence_angle=1, user_eels_settings=None, user_tag_settings=None, feff_cmd='feff', db_file=None, metadata=None, use_primitive=False)ΒΆatomate.feff.workflows.core.
get_wf_eels
(absorbing_atom, structure=None, feff_input_set='pymatgen.io.feff.sets.MPELNESSet', edge='K', radius=10.0, beam_energy=100, beam_direction=None, collection_angle=1, convergence_angle=1, user_eels_settings=None, user_tag_settings=None, feff_cmd='feff', db_file=None, metadata=None, use_primitive=False)ΒΆ
Returns FEFF ELNES/EXELFS spectroscopy workflow.
-absorbing_atom (str): absorbing atom symbol +
absorbing_atom (str): absorbing atom symbol structure (Structure): input structure. If None and mp_id is provided, the corresponding
--structure will be fetched from the Materials Project db.
structure will be fetched from the Materials Project db.
+then either the entire path to the class or spectrum type must be provided +e.g. βpymatgen.io.feff.sets.MPELNESSetβ or βELNESβ
+edge (str): absorption edge. K, L1, L2, L3 radius (float): cluster radius in angstroms. Ignored for reciprocal space calculations beam_energy (float): the incident beam energy in keV beam_direction (list): incident beam direction. Default is none ==> the spectrum will be
-+averaged over all directions.
averaged over all directions.
+collection_angle (float): collection angle in mrad convergence_angle (float): convergence angle in mrad user_eels_settings (dict): override default eels settings. @@ -105,27 +105,27 @@
++reduce the number of fireworks in the workflow if the absorbing atoms is +specified by its atomic symbol.
+
Workflow
atomate.feff.workflows.core.
get_wf_exafs_paths
(absorbing_atom, structure, paths, degeneracies=None, edge='K', radius=10.0, feff_input_set='pymatgen.io.feff.sets.MPEXAFSSet', feff_cmd='feff', db_file=None, metadata=None, user_tag_settings=None, use_primitive=False, labels=None, filepad_file=None)ΒΆatomate.feff.workflows.core.
get_wf_exafs_paths
(absorbing_atom, structure, paths, degeneracies=None, edge='K', radius=10.0, feff_input_set='pymatgen.io.feff.sets.MPEXAFSSet', feff_cmd='feff', db_file=None, metadata=None, user_tag_settings=None, use_primitive=False, labels=None, filepad_file=None)ΒΆ
Returns FEFF EXAFS spectroscopy workflow that generates the scattering amplitudes for the given list of scattering paths. The scattering amplitude output files(feffNNNN.dat files) are inserted to filepad(see fireworks.utilities.filepad.py) on completion.
-then the returned workflow will have fireworks for each absorbing site with the +same symbol.
+structure (Structure): input structure paths (list): list of paths. path = list of site indices. @@ -134,43 +134,45 @@
reduce the number of fireworks in the workflow if the absorbing atom is +specified by its atomic symbol.
+filepad. Useful for fetching the data from filepad later.
+filepad_file (str): path to filepad connection settings file.
+filepad_file (str): path to filepad connection settings file.
+Workflow
atomate.feff.workflows.core.
get_wf_xas
(absorbing_atom, structure, feff_input_set='pymatgen.io.feff.sets.MPXANESSet', edge='K', radius=10.0, feff_cmd='feff', db_file=None, metadata=None, user_tag_settings=None, use_primitive=False)ΒΆatomate.feff.workflows.core.
get_wf_xas
(absorbing_atom, structure, feff_input_set='pymatgen.io.feff.sets.MPXANESSet', edge='K', radius=10.0, feff_cmd='feff', db_file=None, metadata=None, user_tag_settings=None, use_primitive=False)ΒΆ
Returns FEFF XANES/EXAFS spectroscopy workflow.
-then the returned workflow will have fireworks for each absorbing site with the +same symbol.
+structure (Structure): input structure feff_input_set (str or FeffDictSet subclass): The inputset for setting params. If string
-+then either the entire path to the class or spectrum type must be provided -e.g. βpymatgen.io.feff.sets.MPXANESSetβ or βXANESβ
then either the entire path to the class or spectrum type must be provided +e.g. βpymatgen.io.feff.sets.MPXANESSetβ or βXANESβ
+edge (str): absorption edge. Example: K, L1, L2, L3 radius (float): cluster radius in angstroms. Ignored for K space calculations feff_cmd (str): path to the feff binary @@ -178,12 +180,13 @@
++reduce the number of fireworks in the workflow if the absorbing atom is +specified by its atomic symbol.
+
Workflow
atomate.feff.workflows.presets.
wf_Xanes_K_edge
(structure, c=None)ΒΆatomate.feff.workflows.presets.
wf_Xanes_K_edge
(structure, c=None)ΒΆ
atomate.feff.workflows.tests.test_eels_workflows.
TestEELSWorkflow
(methodName='runTest')ΒΆatomate.feff.workflows.tests.test_eels_workflows.
TestEELSWorkflow
(methodName='runTest')ΒΆ
Bases: atomate.utils.testing.AtomateTest
setUp
()ΒΆsetUp
()ΒΆ
Create scratch directory(removes the old one if there is one) and change to it. Also initialize launchpad.
test_eels_wflow_abatom_by_idx
()ΒΆtest_eels_wflow_abatom_by_idx
()ΒΆ
test_eels_wflow_abatom_by_symbol
()ΒΆtest_eels_wflow_abatom_by_symbol
()ΒΆ
test_elnes_vs_exelfs
()ΒΆtest_elnes_vs_exelfs
()ΒΆ
atomate.feff.workflows.tests.test_exafs_scattering_paths.
TestEXAFSPaths
(methodName='runTest')ΒΆatomate.feff.workflows.tests.test_exafs_scattering_paths.
TestEXAFSPaths
(methodName='runTest')ΒΆ
Bases: unittest.case.TestCase
setUp
()ΒΆsetUp
()ΒΆ
Hook method for setting up the test fixture before exercising it.
test_feff_input_sets
()ΒΆtest_feff_input_sets
()ΒΆ
test_paths
()ΒΆtest_paths
()ΒΆ
test_wflow_composition
()ΒΆtest_wflow_composition
()ΒΆ
atomate.feff.workflows.tests.test_xas_workflows.
TestXASWorkflow
(methodName='runTest')ΒΆatomate.feff.workflows.tests.test_xas_workflows.
TestXASWorkflow
(methodName='runTest')ΒΆ
Bases: atomate.utils.testing.AtomateTest
setUp
()ΒΆsetUp
()ΒΆ
Create scratch directory(removes the old one if there is one) and change to it. Also initialize launchpad.
test_xanes_vs_exafs
()ΒΆtest_xanes_vs_exafs
()ΒΆ
test_xas_wflow_abatom_by_idx
()ΒΆtest_xas_wflow_abatom_by_idx
()ΒΆ
test_xas_wflow_abatom_by_symbol
()ΒΆtest_xas_wflow_abatom_by_symbol
()ΒΆ
atomate.lammps.firetasks.glue_tasks.
CopyPackmolOutputs
(*args, **kwargs)ΒΆatomate.lammps.firetasks.glue_tasks.
CopyPackmolOutputs
(*args, **kwargs)ΒΆ
Bases: atomate.common.firetasks.glue_tasks.CopyFiles
Copy files from a previous run directory to the current directory. Note: must specify either βcalc_locβ or βcalc_dirβ to indicate the directory
--containing the files to copy.
containing the files to copy.
+search for the most recent calc_loc with the matching name.
+calc_dir (str): path to dir that contains VASP output files. filesystem (str): remote filesystem. e.g. username@host exclude_files (list): list fo filenames to be excluded when copying.
--+NOte: by default nothing is excluded.
+NOte: by default nothing is excluded.
+
optional_params
= ['calc_loc', 'calc_dir', 'filesystem', 'exclude_files']ΒΆoptional_params
= ['calc_loc', 'calc_dir', 'filesystem', 'exclude_files']ΒΆ
run_task
(fw_spec)ΒΆrun_task
(fw_spec)ΒΆ
This method gets called when the Firetask is run. It can take in a Firework spec, perform some task using that data, and then return an output in the form of a FWAction.
-In addition, this spec contains a special β_fw_envβ key that contains the env settings of the FWorker calling this method. This provides for abstracting out certain commands or settings. For example, βfooβ may be named βfoo1β in resource @@ -88,11 +86,12 @@
atomate.lammps.firetasks.parse_outputs.
LammpsToDB
(*args, **kwargs)ΒΆatomate.lammps.firetasks.parse_outputs.
LammpsToDB
(*args, **kwargs)ΒΆ
Bases: fireworks.core.firework.FiretaskBase
Enter a LAMMPS calculation into the database.
-