diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5173b143b..0ba1b1d76 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,6 +38,7 @@ jobs: pre-commit: runs-on: ubuntu-latest + timeout-minutes: 30 steps: - uses: actions/checkout@v1 @@ -58,15 +59,21 @@ jobs: - name: Install python dependencies run: - pip install -e . + pip install .[pre-commit] + pip freeze + + - name: Run pre-commit + run: + pre-commit run --all-files || (git status --short; git diff ; exit 1) tests: runs-on: ubuntu-latest + timeout-minutes: 30 strategy: matrix: - python-version: ['3.7', '3.6'] + python-version: ['3.8', '3.7', '3.6'] steps: - uses: actions/checkout@v1 @@ -99,9 +106,16 @@ jobs: run: | pip install numpy==1.16.4 pip install PyCifRW~=4.4 - pip install -e . + # install aiida-testing manually + #pip install git+https://github.com/broeder-j/aiida-testing.git@fa44c3ba4e57192fdbdee1cf3581576acc93800c + #pip install git+https://github.com/aiidateam/aiida-testing.git@export_cache + pip install .[testing] reentry scan - name: Run pytest - run: - cd ./aiida_fleur/tests/ && ./run_all_cov.sh + run: | + # create fake codes for tests to work on ci + cd ./aiida_fleur/tests/ + touch local_exe/inpgen && chmod +x local_exe/inpgen + touch local_exe/fleur && chmod +x local_exe/fleur + ./run_all_cov.sh diff --git a/.gitignore b/.gitignore index 823a92004..f2abc28d4 100644 --- a/.gitignore +++ b/.gitignore @@ -53,7 +53,7 @@ coverage.xml *,cover .hypothesis/ aiida_fleur/tests/coverage - +aiida_fleur/tests/local_exe/ # Translations *.mo *.pot @@ -143,4 +143,3 @@ Temporary Items .vscode # End of https://www.gitignore.io/api/python,linux,macos - diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 200cc5dca..46383d5c7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,9 +1,46 @@ -# modernizer: make sure our code-base is Python 3 ready -- repo: https://github.com/python-modernize/python-modernize.git - sha: a234ce4e185cf77a55632888f1811d83b4ad9ef2 +repos: +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v2.5.0 + hooks: + - id: double-quote-string-fixer + types: [python] + - id: end-of-file-fixer + - id: fix-encoding-pragma + - id: mixed-line-ending + types: [python] + - id: trailing-whitespace + types: [python] + +- repo: git://github.com/pre-commit/mirrors-yapf + rev: v0.30.0 hooks: - - id: python-modernize - exclude: ^docs/ - args: - - --write - - --nobackups + - id: yapf + name: yapf + types: [python] + exclude: &exclude_files > + (?x)^( + docs/.*| + )$ + args: ['-i'] + +- repo: local + hooks: + + - id: pylint + name: pylint + entry: pylint + types: [python] + language: system + exclude: '^(docs/)|(examples/)' + + - id: version-number + name: Check version numbers + entry: python ./utils/validate_version_consistency.py + language: system + files: >- + (?x)^( + setup.json| + utils/validate_version_consistency.py| + aiida_fleur/__init__.py + )$ + pass_filenames: false diff --git a/.pylintrc b/.pylintrc new file mode 100644 index 000000000..5cea3ea62 --- /dev/null +++ b/.pylintrc @@ -0,0 +1,461 @@ +[MASTER] + +# A comma-separated list of package or module names from where C extensions may +# be loaded. Extensions are loading into the active Python interpreter and may +# run arbitrary code +extension-pkg-whitelist= + +# Add files or directories to the blacklist. They should be base names, not +# paths. +ignore=CVS,test,examples,setup.py + +# Add files or directories matching the regex patterns to the blacklist. The +# regex matches against base names, not paths. +ignore-patterns= + +# Python code to execute, usually for sys.path manipulation such as +# pygtk.require(). +#init-hook= + +# Use multiple processes to speed up Pylint. +jobs=1 + +# List of plugins (as comma separated values of python modules names) to load, +# usually to register additional checkers. +load-plugins= + +# Pickle collected data for later comparisons. +persistent=yes + +# Specify a configuration file. +#rcfile= + +# Allow loading of arbitrary C extensions. Extensions are imported into the +# active Python interpreter and may run arbitrary code. +unsafe-load-any-extension=no + + +[MESSAGES CONTROL] + +# Only show warnings with the listed confidence levels. Leave empty to show +# all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED +confidence= + +# Disable the message, report, category or checker with the given id(s). You +# can either give multiple identifiers separated by comma (,) or put this +# option multiple times (only on the command line, not in the configuration +# file where it should appear only once).You can also use "--disable=all" to +# disable everything first and then reenable specific checks. For example, if +# you want to run only the similarities checker, you can use "--disable=all +# --enable=similarities". If you want to run only the classes checker, but have +# no Warning level messages displayed, use"--disable=all --enable=classes +# --disable=W" +disable=too-few-public-methods, + too-many-public-methods, + bad-continuation, + wrong-import-position, + line-too-long, + locally-disabled, + wildcard-import, + locally-enabled, + too-many-instance-attributes, + fixme, # Since time is rare, it is fine to leave ideas + len-as-condition, + useless-object-inheritance, + wrong-import-order, + import-outside-toplevel, # + duplicate-code, # Prob sometimes has to be, maybe ignore for examples and tests + unnecessary-pass, + no-else-raise, # FIXME ? + no-else-return, # FIXME ? + unexpected-keyword-arg, # FIXME + protected-access, # FIXME + no-member, # FIXME + invalid-name, # FIXME + unused-variable, # FIXME + unused-argument, # FIXME + unused-import, # FIXME + missing-function-docstring, # FIXME + too-many-locals, # FIXME + too-many-branches, # FIXME + inconsistent-return-statements, # FIXME + no-self-use, # FIXME + c-extension-no-member, # FIXME + too-many-statements, # FIXME ? + too-many-nested-blocks, # FIXME ? + too-many-lines, # FIXME ? + too-many-return-statements, # FIXME ? + too-many-arguments, # FIXME + pointless-string-statement # Because of multi line comments, or outcommented code + +# Enable the message, report, category or checker with the given id(s). You can +# either give multiple identifier separated by comma (,) or put this option +# multiple time (only on the command line, not in the configuration file where +# it should appear only once). See also the "--disable" option for examples. +enable= + + +[REPORTS] + +# Python expression which should return a note less than 10 (10 is the highest +# note). You have access to the variables errors warning, statement which +# respectively contain the number of errors / warnings messages and the total +# number of statements analyzed. This is used by the global evaluation report +# (RP0004). +evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10) + +# Template used to display messages. This is a python new-style format string +# used to format the message information. See doc for all details +#msg-template= + +# Set the output format. Available formats are text, parseable, colorized, json +# and msvs (visual studio).You can also give a reporter class, eg +# mypackage.mymodule.MyReporterClass. +output-format=text + +# Tells whether to display a full report or only the messages +reports=no + +# Activate the evaluation score. +score=yes + + +[REFACTORING] + +# Maximum number of nested blocks for function / method body +max-nested-blocks=5 + + +[BASIC] + +# Naming hint for argument names +argument-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ + +# Regular expression matching correct argument names +argument-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ + +# Naming hint for attribute names +attr-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ + +# Regular expression matching correct attribute names +attr-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ + +# Bad variable names which should always be refused, separated by a comma +bad-names=foo,bar,baz,toto,tutu,tata + +# Naming hint for class attribute names +class-attribute-name-hint=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$ + +# Regular expression matching correct class attribute names +class-attribute-rgx=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$ + +# Naming hint for class names +class-name-hint=[A-Z_][a-zA-Z0-9]+$ + +# Regular expression matching correct class names +class-rgx=[A-Z_][a-zA-Z0-9]+$ + +# Naming hint for constant names +const-name-hint=(([A-Z_][A-Z0-9_]*)|(__.*__))$ + +# Regular expression matching correct constant names +const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$ + +# Minimum line length for functions/classes that require docstrings, shorter +# ones are exempt. +docstring-min-length=5 + +# Naming hint for function names +function-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ + +# Regular expression matching correct function names +function-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ + +# Good variable names which should always be accepted, separated by a comma +good-names=i,j,k,m,n,ex,Run,_,_INPUT_FILE_NAME, _OUTPUT_FILE_NAME,t,x,y,z,f,ParameterData,KpointsData,pk + +# Include a hint for the correct naming format with invalid-name +include-naming-hint=no + +# Naming hint for inline iteration names +inlinevar-name-hint=[A-Za-z_][A-Za-z0-9_]*$ + +# Regular expression matching correct inline iteration names +inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$ + +# Naming hint for method names +method-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ + +# Regular expression matching correct method names +method-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*)|(setUp)|(tearDown))$ + +# Naming hint for module names +module-name-hint=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$ + +# Regular expression matching correct module names +module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$ + +# Colon-delimited sets of names that determine each other's naming style when +# the name regexes allow several styles. +name-group= + +# Regular expression which should only match function or class names that do +# not require a docstring. +no-docstring-rgx=^_,setUp,tearDown + +# List of decorators that produce properties, such as abc.abstractproperty. Add +# to this list to register other decorators that produce valid properties. +property-classes=abc.abstractproperty + +# Naming hint for variable names +variable-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ + +# Regular expression matching correct variable names +variable-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ + + +[FORMAT] + +# Expected format of line ending, e.g. empty (any line ending), LF or CRLF. +expected-line-ending-format= + +# Regexp for a line that is allowed to be longer than the limit. +ignore-long-lines=^\s*(# )??$ + +# Number of spaces of indent required inside a hanging or continued line. +indent-after-paren=4 + +# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1 +# tab). +indent-string=' ' + +# Maximum number of characters on a single line. +max-line-length=140 + +# Maximum number of lines in a module +max-module-lines=1000 + +# List of optional constructs for which whitespace checking is disabled. `dict- +# separator` is used to allow tabulation in dicts, etc.: {1 : 1,\n222: 2}. +# `trailing-comma` allows a space between comma and closing bracket: (a, ). +# `empty-line` allows space-only lines. +no-space-check=trailing-comma,dict-separator + +# Allow the body of a class to be on the same line as the declaration if body +# contains single statement. +single-line-class-stmt=no + +# Allow the body of an if to be on the same line as the test if there is no +# else. +single-line-if-stmt=no + + +[SPELLING] + +# Spelling dictionary name. Available dictionaries: none. To make it working +# install python-enchant package. +spelling-dict= + +# List of comma separated words that should not be checked. +spelling-ignore-words= + +# A path to a file that contains private dictionary; one word per line. +spelling-private-dict-file= + +# Tells whether to store unknown words to indicated private dictionary in +# --spelling-private-dict-file option instead of raising a message. +spelling-store-unknown-words=no + + +[LOGGING] + +# Logging modules to check that the string format arguments are in logging +# function parameter format +logging-modules=logging + + +[SIMILARITIES] + +# Ignore comments when computing similarities. +ignore-comments=yes + +# Ignore docstrings when computing similarities. +ignore-docstrings=yes + +# Ignore imports when computing similarities. +ignore-imports=no + +# Minimum lines number of a similarity. +min-similarity-lines=4 + + +[VARIABLES] + +# List of additional names supposed to be defined in builtins. Remember that +# you should avoid to define new builtins when possible. +additional-builtins= + +# Tells whether unused global variables should be treated as a violation. +allow-global-unused-variables=yes + +# List of strings which can identify a callback function by name. A callback +# name must start or end with one of those strings. +callbacks=cb_,_cb + +# A regular expression matching the name of dummy variables (i.e. expectedly +# not used). +dummy-variables-rgx=_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused_ + +# Argument names that match this expression will be ignored. Default to name +# with leading underscore +ignored-argument-names=_.*|^ignored_|^unused_ + +# Tells whether we should check for unused import in __init__ files. +init-import=no + +# List of qualified module names which can have objects that can redefine +# builtins. +redefining-builtins-modules= + + +[MISCELLANEOUS] + +# List of note tags to take in consideration, separated by a comma. +notes=FIXME,XXX,TODO + + +[TYPECHECK] + +# List of decorators that produce context managers, such as +# contextlib.contextmanager. Add to this list to register other decorators that +# produce valid context managers. +contextmanager-decorators=contextlib.contextmanager + +# List of members which are set dynamically and missed by pylint inference +# system, and so shouldn't trigger E1101 when accessed. Python regular +# expressions are accepted. +generated-members=self.exit_codes.* + +# Tells whether missing members accessed in mixin class should be ignored. A +# mixin class is detected if its name ends with "mixin" (case insensitive). +ignore-mixin-members=yes + +# This flag controls whether pylint should warn about no-member and similar +# checks whenever an opaque object is returned when inferring. The inference +# can return multiple potential results while evaluating a Python object, but +# some branches might not be evaluated, which results in partial inference. In +# that case, it might be useful to still emit no-member and other checks for +# the rest of the inferred objects. +ignore-on-opaque-inference=yes + +# List of class names for which member attributes should not be checked (useful +# for classes with dynamically set attributes). This supports the use of +# qualified names. +ignored-classes=optparse.Values,thread._local,_thread._local + +# List of module names for which member attributes should not be checked +# (useful for modules/projects where namespaces are manipulated during runtime +# and thus existing member attributes cannot be deduced by static analysis. It +# supports qualified module names, as well as Unix pattern matching. +ignored-modules= + +# Show a hint with possible names when a member name was not found. The aspect +# of finding the hint is based on edit distance. +missing-member-hint=yes + +# The minimum edit distance a name should have in order to be considered a +# similar match for a missing member name. +missing-member-hint-distance=1 + +# The total number of similar names that should be taken in consideration when +# showing a hint for a missing member. +missing-member-max-choices=1 + + +[IMPORTS] + +# Allow wildcard imports from modules that define __all__. +allow-wildcard-with-all=no + +# Analyse import fallback blocks. This can be used to support both Python 2 and +# 3 compatible code, which means that the block might have code that exists +# only in one or another interpreter, leading to false positives when analysed. +analyse-fallback-blocks=no + +# Deprecated modules which should not be used, separated by a comma +deprecated-modules=regsub,TERMIOS,Bastion,rexec + +# Create a graph of external dependencies in the given file (report RP0402 must +# not be disabled) +ext-import-graph= + +# Create a graph of every (i.e. internal and external) dependencies in the +# given file (report RP0402 must not be disabled) +import-graph= + +# Create a graph of internal dependencies in the given file (report RP0402 must +# not be disabled) +int-import-graph= + +# Force import order to recognize a module as part of the standard +# compatibility libraries. +known-standard-library= + +# Force import order to recognize a module as part of a third party library. +known-third-party=enchant + + +[DESIGN] + +# Maximum number of arguments for function / method +max-args=6 + +# Maximum number of attributes for a class (see R0902). +max-attributes=7 + +# Maximum number of boolean expressions in a if statement +max-bool-expr=5 + +# Maximum number of branch for function / method body +max-branches=12 + +# Maximum number of locals for function / method body +max-locals=20 + +# Maximum number of parents for a class (see R0901). +max-parents=20 + +# Maximum number of public methods for a class (see R0904). +max-public-methods=20 + +# Maximum number of return / yield for function / method body +max-returns=6 + +# Maximum number of statements in function / method body +max-statements=50 + +# Minimum number of public methods for a class (see R0903). +min-public-methods=1 + + +[CLASSES] + +# List of method names used to declare (i.e. assign) instance attributes. +defining-attr-methods=__init__,__new__,setUp + +# List of member names, which should be excluded from the protected access +# warning. +exclude-protected=_asdict,_fields,_replace,_source,_make,_get_linkname_retrieved + +# List of valid names for the first argument in a class method. +valid-classmethod-first-arg=cls + +# List of valid names for the first argument in a metaclass class method. +valid-metaclass-classmethod-first-arg=mcs + + +[EXCEPTIONS] + +# Exceptions that will emit a warning when being caught. Defaults to +# "Exception" +overgeneral-exceptions=Exception diff --git a/.style.yapf b/.style.yapf new file mode 100644 index 000000000..d00d415df --- /dev/null +++ b/.style.yapf @@ -0,0 +1,7 @@ +[style] +based_on_style = google +column_limit = 120 +coalesce_brackets = true +align_closing_bracket_with_visual_indent = true +split_arguments_when_comma_terminated = true +indent_dictionary_value = false diff --git a/CHANGELOG.md b/CHANGELOG.md index 063b6a099..bfae795a2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,14 @@ +## v1.1.1 +### release compatible with AiiDA-core 1.4.0 +- still support of Fleur MaX4 version (release branch) with inpgen +- bugfixes and other general improvements +- new: BandDos workchain: workchain for Band and DOS calculation using the new Fleur BandDOS file +- basic workchains are now cachable, by moving cf out of workchains +- first calcjob and workchain regression tests for outside CI env +- provenance of the result nodes of magnetic workchains is fixed +- corehole and initial_cls workchain are fixed and working +- exit codes for inpgen parser + ## v1.1.0 ### release compatible with AiiDA-core 1.1.0 - support of Fleur Max4 version (release branch) @@ -122,4 +133,3 @@ Version for used at the MAX AiiDA-fleur tutorial in May 2017 ### Workflows - Some basic sketches of basic workflows available (working AiiDa workflow system just released)i - diff --git a/LICENSE b/LICENSE index 5813276a7..a5d1ce2ec 100644 --- a/LICENSE +++ b/LICENSE @@ -20,4 +20,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - diff --git a/STYLE_CONVENTION.txt b/STYLE_CONVENTION.txt new file mode 100644 index 000000000..8b96c1d64 --- /dev/null +++ b/STYLE_CONVENTION.txt @@ -0,0 +1,84 @@ +Here are some guidelines/conventions for AiiDA-FLEUR developers. + +GENERAL: +######## + +Keep in mind that this software will be used by others and build on top on. +So keep your code clean and be careful with any API changes. +Coding Style: PeP8 + +Naming convention: +------------------ +Classes are named in CamelCase i.e FleurCalculation +Constants are named in ALLCAPS +for other variables use lowercase with underscores + +WORKCHAINS GENERAL: + +1. Every Workflow/Workchain needs a clear documentation of input, output! + Think this through and be very careful to change it later on, because you will break the code of others! + Therefore, thinking about good names (see below) is not wasted time. + +2. Reuse as much of previous workflows as possible, use subworkflows. +(otherwise your code explodes, is hard to understand again und not reusable) + +3. If you think some processing is common or might be useful for something else, +make it modular, and import the method (goes along with point 2.). + +4. Try to keep the workflow context clean! + This part will always be saved and visible, there people can track what is going on. + +5. Write clear report statements in the workflow report. + +6. Exit code conventions: + See https://aiida-fleur.readthedocs.io/en/v1.1.1/user_guide/hints/exit_codes.html + Everything from 0-200 is used by AiiDA-core. + If you implement a new exit code it has to be added to this list. + +7. ERROR handling: + +Error handling is very important and might take a lot of effort. +Write at least an outline (named: inspect_xx, handle_xx), which skeleton for all the errors (treated or not). (look at the AiiDA QE workflows as example) +Now iterative implement every time you encounter a 'crash' because something failed a proper exit code. + +Keep in mind, your workflow should never: + +7.1 end up in a while true (because of a calculation or subworkflow failure) +7.2 crash with at a later point, because a calculation, or subworkflow failed, or due to other errors. +(The user won't understand so easily what happend, also this makes it impossible to build useful error handling of your workflow on top (when using your workflow as a subworkflow)) +.... + + +########################## + +AiiDA-FLEUR specific: + +1. Output nodes of a workflow has the link naming convention 'output_name_description' + i.e 'output_scf_wc_para' + +2. Every workflow should give back one parameter output node named 'output_wcname_para' + which contains all the 'physical results' the workflow is designed to provide, + or at least information to access these results directly (if stored in files and so on) + further the node should contain valuable information to make sense/judge the quality of the data. + + Try to design this node in a way that if you take a look at it, you understand + the following questions: + + which workflow was run, what version? + what came out? What was put in, how can I see what was put in? + Is this valuable or garbage? + +3. so far name Fleur workflows/workchains name: FleurNameWorkChain + +4. Every time the implementation changes the provenance of calculations or workchain classes their + respected version numbers have to be increased. Changes in a calculation plugin always change + the version of the aiida-fleur package. In general be careful chang + +5. AiiDA-Fleur specific Database migration: Try to make them obsolete. Therefore, avoid renameing +classes which are nodes, link labels, or the provenance of node classes. + +Link naming convention: + +Node label convention: + +Descriptions convention: diff --git a/WF_STYLE_CONVENTION.txt b/WF_STYLE_CONVENTION.txt deleted file mode 100644 index d011444cd..000000000 --- a/WF_STYLE_CONVENTION.txt +++ /dev/null @@ -1,71 +0,0 @@ -__author__: Jens Broeder (j.broeder@fz-juelich.de) - -Here are some guidelines for writing FLEUR workflows/workchains and AiiDA in general. -Keep in mind that a workflow is REAL SOFTWARE which will be used by others and build on top and NOT a script. - - -######################## - -GENERAL: - -1. Every Workflow needs a clear documentation of input, output! Think this through and do not change it later on, because you will break the code of others! Therefore thinking about good names (see below) is not wasted time. - -2. reuse as much of previous workflows as possible, use subworkflows. -(otherwise your code explodes, is hard to understand again und not reusable) - -3. If you think some processing is common or might be useful for something else, -make it modular, and import the method (goes along with point 2.). - -4. Try to keep the workflow context clean! (this part will always be saved and visible, there people track what is going on. - -5. Write clear report statements in the workflow report. - -6. ggf one has to think about resource management. -i.e if a big system needs to be calculated and the user says use x hundred cores, -and in the workflow simulations on very small systems need to be done, it makes no -sense to submit a job with the same huge amount -(use a default amount of resources, or the given ones if they are less, for small calculations) - -7. ERROR handling: - -Error handling is very important and might take a lot of effort. Write at least an outline (named: inspect_xx, handle_xx), which skeleton for all the errors (treated or not). (look at the AiiDA QE workflows as example) -Now iterative put every time you encounter a 'crash' because something failed (usually variable/node access stuff), the corresponding code in a try block and call your handler. -Use self.abort('message') to clearly terminate the workflow in the case something went wrong and it makes no sense to continue. - -Keep in mind, your workflow should never: - -7.1 end up in a while true (because of a calculation or subworkflow failure) -7.2 crash with at a later point because a calculation or subworkflow failed. -(The user won't understand so easily what happend, also this makes it impossible to build useful error handling of your workflow on top (when using your workflow as a subworkflow)) -.... - - - - -########################## - -FLEUR Specific: - -1. Output nodes of a workflow has the naming convention 'output_name_description' - i.e 'output_scf_wc_para' - -2. Every workflow should give back one parameter output node named 'output_wcname_para' - which contains all the 'physical results' the workflow is designed to provide, - or at least information to access these results directly (if stored in files and so on) - further the node should contain valuable information to make sense/judge the quality of the data. - - Try to design this node in a way that if you take a look at it, you understand - the following questions: - - which workflow was run, what version? - what came out? What was put in, how can I see what was put in? - Is this valuable or garbage? - -3. so far name Fleur workflows/workchains name: FleurNameWorkChain - -4. (advanced) group workflow internal(between) calculations and add extras to calculation. (that way one can extract them from global queries, if need. - -5. Write base subworkchains, that take all Parameters as given, but do their task very well and then write workchains on top of these. - Which then can use workchains to optimize the parameters for Fleur. - -6. Outsource methods to test for calculation failure, that you have only one routine in all workchains, that you can improve diff --git a/aiida_fleur/__init__.py b/aiida_fleur/__init__.py index 0c95b44e4..ff3344956 100644 --- a/aiida_fleur/__init__.py +++ b/aiida_fleur/__init__.py @@ -9,8 +9,7 @@ # For further information please visit http://www.flapw.de or # # http://aiida-fleur.readthedocs.io/en/develop/ # ############################################################################### - ''' AiiDA-FLEUR ''' -__version__ = "1.1.0" +__version__ = '1.1.1' diff --git a/aiida_fleur/calculation/__init__.py b/aiida_fleur/calculation/__init__.py index 41282c702..026bb6106 100644 --- a/aiida_fleur/calculation/__init__.py +++ b/aiida_fleur/calculation/__init__.py @@ -9,7 +9,6 @@ # For further information please visit http://www.flapw.de or # # http://aiida-fleur.readthedocs.io/en/develop/ # ############################################################################### - ''' FLEUR plug-in ''' diff --git a/aiida_fleur/calculation/fleur.py b/aiida_fleur/calculation/fleur.py index 19db9e24c..cc38ec026 100644 --- a/aiida_fleur/calculation/fleur.py +++ b/aiida_fleur/calculation/fleur.py @@ -9,12 +9,10 @@ # For further information please visit http://www.flapw.de or # # http://aiida-fleur.readthedocs.io/en/develop/ # ############################################################################### - """ This file contains a CalcJob that represents FLEUR calculation. """ from __future__ import absolute_import -from __future__ import print_function import os import io import six @@ -26,7 +24,6 @@ from aiida.common.utils import classproperty from aiida.common.exceptions import InputValidationError from aiida.common.exceptions import UniquenessError - from aiida_fleur.data.fleurinp import FleurinpData from aiida_fleur.calculation.fleurinputgen import FleurinputgenCalculation @@ -148,61 +145,45 @@ class FleurCalculation(CalcJob): ####### # all possible files first chargedensity - _copy_filelist1 = [_INP_FILE_NAME, - _ENPARA_FILE_NAME, - _SYMOUT_FILE_NAME, - _CDN1_FILE_NAME, - _KPTS_FILE_NAME, - _STARS_FILE_NAME, - _WKF2_FILE_NAME] + _copy_filelist1 = [ + _INP_FILE_NAME, _ENPARA_FILE_NAME, _SYMOUT_FILE_NAME, _CDN1_FILE_NAME, _KPTS_FILE_NAME, _STARS_FILE_NAME, + _WKF2_FILE_NAME + ] # after inpgen, before first chargedensity _copy_filelist_inpgen = [_INPXML_FILE_NAME] # for after fleur SCF [name, destination_name] - _copy_scf_noinp = [ - [_CDN1_FILE_NAME, _CDN1_FILE_NAME]] + _copy_scf_noinp = [[_CDN1_FILE_NAME, _CDN1_FILE_NAME]] - _copy_scf_noinp_hdf = [ - [_CDN_LAST_HDF5_FILE_NAME, _CDN_HDF5_FILE_NAME]] + _copy_scf_noinp_hdf = [[_CDN_LAST_HDF5_FILE_NAME, _CDN_HDF5_FILE_NAME]] - _copy_scf = [[_CDN1_FILE_NAME, _CDN1_FILE_NAME], - [_INPXML_FILE_NAME, _INPXML_FILE_NAME]] + _copy_scf = [[_CDN1_FILE_NAME, _CDN1_FILE_NAME], [_INPXML_FILE_NAME, _INPXML_FILE_NAME]] - _copy_scf_hdf = [[_CDN_LAST_HDF5_FILE_NAME, _CDN_HDF5_FILE_NAME], - [_INPXML_FILE_NAME, _INPXML_FILE_NAME]] + _copy_scf_hdf = [[_CDN_LAST_HDF5_FILE_NAME, _CDN_HDF5_FILE_NAME], [_INPXML_FILE_NAME, _INPXML_FILE_NAME]] _copy_filelist_scf_remote = [_MIX_HISTORY_FILE_NAME] - _copy_filelist3 = [_INP_FILE_NAME, - _ENPARA_FILE_NAME, - _SYMOUT_FILE_NAME, - _CDN1_FILE_NAME, - _KPTS_FILE_NAME, - _STARS_FILE_NAME, - _WKF2_FILE_NAME, - _MIX_HISTORY_FILE_NAME, - _OUT_FILE_NAME, - _POT_FILE_NAME] + _copy_filelist3 = [ + _INP_FILE_NAME, _ENPARA_FILE_NAME, _SYMOUT_FILE_NAME, _CDN1_FILE_NAME, _KPTS_FILE_NAME, _STARS_FILE_NAME, + _WKF2_FILE_NAME, _MIX_HISTORY_FILE_NAME, _OUT_FILE_NAME, _POT_FILE_NAME + ] # files need for rerun - _copy_filelist_dos = [_INPXML_FILE_NAME, - _CDN1_FILE_NAME] + _copy_filelist_dos = [_INPXML_FILE_NAME, _CDN1_FILE_NAME] - _copy_filelist_band = [_INPXML_FILE_NAME, - _POT_FILE_NAME, - _CDN1_FILE_NAME] + _copy_filelist_band = [_INPXML_FILE_NAME, _POT_FILE_NAME, _CDN1_FILE_NAME] _copy_filelist_hybrid = [] _copy_filelist_jij = [] # possible settings_dict keys - _settings_keys = ['additional_retrieve_list', 'remove_from_retrieve_list', - 'additional_remotecopy_list', 'remove_from_remotecopy_list', - 'cmdline'] + _settings_keys = [ + 'additional_retrieve_list', 'remove_from_retrieve_list', 'additional_remotecopy_list', + 'remove_from_remotecopy_list', 'cmdline' + ] # possible modes? - _fleur_modes = ['band', 'dos', 'forces', 'chargeDen', - 'latticeCo', 'scf'] + _fleur_modes = ['band', 'dos', 'forces', 'chargeDen', 'latticeCo', 'scf', 'force_theorem', 'gw'] @classmethod def define(cls, spec): @@ -210,30 +191,34 @@ def define(cls, spec): # spec.input('metadata.options.input_filename', valid_type=six.string_types, # default=cls._INPXML_FILE_NAME) - spec.input('metadata.options.output_filename', valid_type=six.string_types, - default=cls._OUTXML_FILE_NAME) + spec.input('metadata.options.output_filename', valid_type=six.string_types, default=cls._OUTXML_FILE_NAME) spec.input('metadata.options.use_kpoints', valid_type=type(True), default=cls._use_kpoints) # inputs - spec.input('fleurinpdata', valid_type=FleurinpData, required=False, - help="Use a FleruinpData node that specifies the input parameters" - "usually copy from the parent calculation, basically makes" - "the inp.xml file visible in the db and makes sure it has " - "the files needed.") - spec.input('parent_folder', valid_type=RemoteData, required=False, - help="Use a remote or local repository folder as parent folder " - "(also for restarts and similar). It should contain all the " - "needed files for a Fleur calc, only edited files should be " - "uploaded from the repository.") - spec.input('settings', valid_type=Dict, required=False, - help="This parameter data node is used to specify for some " - "advanced features how the plugin behaves. You can add files" - "the retrieve list, or add command line switches, " - "for all available features here check the documentation.") + spec.input('fleurinpdata', + valid_type=FleurinpData, + required=False, + help='Use a FleruinpData node that specifies the input parameters' + 'usually copy from the parent calculation, basically makes' + 'the inp.xml file visible in the db and makes sure it has ' + 'the files needed.') + spec.input('parent_folder', + valid_type=RemoteData, + required=False, + help='Use a remote or local repository folder as parent folder ' + '(also for restarts and similar). It should contain all the ' + 'needed files for a Fleur calc, only edited files should be ' + 'uploaded from the repository.') + spec.input('settings', + valid_type=Dict, + required=False, + help='This parameter data node is used to specify for some ' + 'advanced features how the plugin behaves. You can add files' + 'the retrieve list, or add command line switches, ' + 'for all available features here check the documentation.') # parser - spec.input('metadata.options.parser_name', - valid_type=six.string_types, default='fleur.fleurparser') + spec.input('metadata.options.parser_name', valid_type=six.string_types, default='fleur.fleurparser') # declare outputs of the calculation spec.output('output_parameters', valid_type=Dict, required=False) @@ -243,27 +228,20 @@ def define(cls, spec): spec.default_output_node = 'output_parameters' # exit codes - spec.exit_code(300, 'ERROR_NO_RETRIEVED_FOLDER', - message='No retrieved folder found.') - spec.exit_code(301, 'ERROR_OPENING_OUTPUTS', - message='One of the output files can not be opened.') - spec.exit_code(302, 'ERROR_FLEUR_CALC_FAILED', - message='FLEUR calculation failed for unknown reason.') - spec.exit_code(303, 'ERROR_NO_OUTXML', - message='XML output file was not found.') - spec.exit_code(304, 'ERROR_XMLOUT_PARSING_FAILED', - message='Parsing of XML output file failed.') - spec.exit_code(305, 'ERROR_RELAX_PARSING_FAILED', - message='Parsing of relax XML output file failed.') - spec.exit_code(310, 'ERROR_NOT_ENOUGH_MEMORY', - message='FLEUR calculation failed due to lack of memory.') - spec.exit_code(311, 'ERROR_VACUUM_SPILL_RELAX', + spec.exit_code(300, 'ERROR_NO_RETRIEVED_FOLDER', message='No retrieved folder found.') + spec.exit_code(301, 'ERROR_OPENING_OUTPUTS', message='One of the output files can not be opened.') + spec.exit_code(302, 'ERROR_FLEUR_CALC_FAILED', message='FLEUR calculation failed for unknown reason.') + spec.exit_code(303, 'ERROR_NO_OUTXML', message='XML output file was not found.') + spec.exit_code(304, 'ERROR_XMLOUT_PARSING_FAILED', message='Parsing of XML output file failed.') + spec.exit_code(305, 'ERROR_RELAX_PARSING_FAILED', message='Parsing of relax XML output file failed.') + spec.exit_code(310, 'ERROR_NOT_ENOUGH_MEMORY', message='FLEUR calculation failed due to lack of memory.') + spec.exit_code(311, + 'ERROR_VACUUM_SPILL_RELAX', message='FLEUR calculation failed because an atom spilled to the' - 'vacuum during relaxation') - spec.exit_code(312, 'ERROR_MT_RADII', - message='FLEUR calculation failed due to MT overlap.') - spec.exit_code(313, 'ERROR_MT_RADII_RELAX', - message='Overlapping MT-spheres during relaxation.') + 'vacuum during relaxation') + spec.exit_code(312, 'ERROR_MT_RADII', message='FLEUR calculation failed due to MT overlap.') + spec.exit_code(313, 'ERROR_MT_RADII_RELAX', message='Overlapping MT-spheres during relaxation.') + spec.exit_code(314, 'ERROR_DROP_CDN', message='Problem with cdn is suspected. Consider removing cdn') @classproperty def _get_outut_folder(self): @@ -334,19 +312,17 @@ def prepare_for_submission(self, folder): if parent_calc_folder is None: has_parent = False if not has_fleurinp: - raise InputValidationError( - "No parent calculation found and no fleurinp data " - "given, need either one or both for a " - "'fleurcalculation'.") + raise InputValidationError('No parent calculation found and no fleurinp data ' + 'given, need either one or both for a ' + "'fleurcalculation'.") else: # extract parent calculation - parent_calcs = parent_calc_folder.get_incoming( - node_class=CalcJob).all() + parent_calcs = parent_calc_folder.get_incoming(node_class=CalcJob).all() n_parents = len(parent_calcs) if n_parents != 1: - raise UniquenessError("Input RemoteData is child of {} " - "calculation{}, while it should have a single parent" - "".format(n_parents, "" if n_parents == 0 else "s")) + raise UniquenessError('Input RemoteData is child of {} ' + 'calculation{}, while it should have a single parent' + ''.format(n_parents, '' if n_parents == 0 else 's')) parent_calc = parent_calcs[0].node parent_calc_class = parent_calc.process_class has_parent = True @@ -372,9 +348,8 @@ def prepare_for_submission(self, folder): # don't copy files, copy files locally copy_remotely = False else: - raise InputValidationError( - "parent_calc, must be either an 'inpgen calculation' or" - " a 'fleur calculation'.") + raise InputValidationError("parent_calc, must be either an 'inpgen calculation' or" + " a 'fleur calculation'.") # check existence of settings (optional) if 'settings' in self.inputs: @@ -390,9 +365,10 @@ def prepare_for_submission(self, folder): # check for for allowed keys, ignore unknown keys but warn. for key in settings_dict.keys(): if key not in self._settings_keys: - self.logger.warning("settings dict key {} for Fleur calculation" - "not recognized, only {} are allowed." - "".format(key, self._settings_keys)) + self.logger.warning( + 'settings dict key %s for Fleur calculation' + 'not recognized, only %s are allowed.' + '', key, str(self._settings_keys)) # TODO: Detailed check of FleurinpData # if certain files are there in fleurinpData @@ -403,9 +379,7 @@ def prepare_for_submission(self, folder): # add files belonging to fleurinp into local_copy_list allfiles = fleurinp.files for file1 in allfiles: - local_copy_list.append(( - fleurinp.uuid, file1, - file1)) + local_copy_list.append((fleurinp.uuid, file1, file1)) modes = fleurinp.get_fleur_modes() # add files to mode_retrieved_filelist @@ -423,11 +397,9 @@ def prepare_for_submission(self, folder): if 'remove_from_retrieve_list' not in settings_dict: settings_dict['remove_from_retrieve_list'] = [] if with_hdf5: - settings_dict['remove_from_retrieve_list'].append( - self._CDN_LAST_HDF5_FILE_NAME) + settings_dict['remove_from_retrieve_list'].append(self._CDN_LAST_HDF5_FILE_NAME) else: - settings_dict['remove_from_retrieve_list'].append( - self._CDN1_FILE_NAME) + settings_dict['remove_from_retrieve_list'].append(self._CDN1_FILE_NAME) # if noco, ldau, gw... # TODO: check from where it was copied, and copy files of its parent @@ -437,14 +409,11 @@ def prepare_for_submission(self, folder): # copy necessary files # TODO: check first if file exist and throw a warning if not outfolder_uuid = parent_calc.outputs.retrieved.uuid - self.logger.info("out folder path {}".format(outfolder_uuid)) + self.logger.info('out folder path %s', outfolder_uuid) if fleurinpgen and (not has_fleurinp): for file1 in self._copy_filelist_inpgen: - local_copy_list.append(( - outfolder_uuid, - os.path.join(file1), - os.path.join(file1))) + local_copy_list.append((outfolder_uuid, os.path.join(file1), os.path.join(file1))) elif not fleurinpgen and (not has_fleurinp): # fleurCalc # need to copy inp.xml from the parent calc if with_hdf5: @@ -452,10 +421,7 @@ def prepare_for_submission(self, folder): else: copylist = self._copy_scf for file1 in copylist: - local_copy_list.append(( - outfolder_uuid, - file1[0], - file1[1])) + local_copy_list.append((outfolder_uuid, file1[0], file1[1])) # TODO: get inp.xml from parent fleurinpdata; otherwise it will be doubled in rep elif fleurinpgen and has_fleurinp: # everything is taken care of @@ -467,10 +433,7 @@ def prepare_for_submission(self, folder): else: copylist = self._copy_scf_noinp for file1 in copylist: - local_copy_list.append(( - outfolder_uuid, - file1[0], - file1[1])) + local_copy_list.append((outfolder_uuid, file1[0], file1[1])) # TODO: not on same computer -> copy needed files from repository # if they are not there throw an error @@ -493,20 +456,16 @@ def prepare_for_submission(self, folder): filelist_tocopy_remote.remove(file1) for file1 in filelist_tocopy_remote: - remote_copy_list.append(( - parent_calc_folder.computer.uuid, - os.path.join( - parent_calc_folder.get_remote_path(), file1), - self._get_outut_folder)) + remote_copy_list.append( + (parent_calc_folder.computer.uuid, os.path.join(parent_calc_folder.get_remote_path(), + file1), self._get_outut_folder)) - self.logger.info( - "remote copy file list {}".format(remote_copy_list)) + self.logger.info('remote copy file list %s', str(remote_copy_list)) # create a JUDFT_WARN_ONLY file in the calculation folder with io.StringIO(u'/n') as handle: warn_only_filename = self._JUDFT_WARN_ONLY_INFO_FILE_NAME - folder.create_file_from_filelike( - handle, filename=warn_only_filename, mode='w') + folder.create_file_from_filelike(handle, filename=warn_only_filename, mode='w') ########## MAKE CALCINFO ########### @@ -518,7 +477,7 @@ def prepare_for_submission(self, folder): # calcinfo.cmdline_params = (list(cmdline_params) # + ["-in", self._INPUT_FILE_NAME]) - self.logger.info("local copy file list {}".format(local_copy_list)) + self.logger.info('local copy file list %s', str(local_copy_list)) calcinfo.local_copy_list = local_copy_list calcinfo.remote_copy_list = remote_copy_list @@ -528,25 +487,23 @@ def prepare_for_submission(self, folder): retrieve_list = [] retrieve_list.append(self._OUTXML_FILE_NAME) retrieve_list.append(self._INPXML_FILE_NAME) - retrieve_list.append( - self._SHELLOUTPUT_FILE_NAME) + retrieve_list.append(self._SHELLOUTPUT_FILE_NAME) retrieve_list.append(self._ERROR_FILE_NAME) retrieve_list.append(self._USAGE_FILE_NAME) # retrieve_list.append(self._TIME_INFO_FILE_NAME) # retrieve_list.append(self._OUT_FILE_NAME) if with_hdf5: - retrieve_list.append( - self._CDN_LAST_HDF5_FILE_NAME) + retrieve_list.append(self._CDN_LAST_HDF5_FILE_NAME) else: retrieve_list.append(self._CDN1_FILE_NAME) for mode_file in mode_retrieved_filelist: retrieve_list.append(mode_file) - self.logger.info('retrieve_list: {}'.format(retrieve_list)) + self.logger.info('retrieve_list: %s', str(retrieve_list)) # user specific retrieve add_retrieve = settings_dict.get('additional_retrieve_list', []) - self.logger.info('add_retrieve: {}'.format(add_retrieve)) + self.logger.info('add_retrieve: %s', str(add_retrieve)) for file1 in add_retrieve: retrieve_list.append(file1) @@ -564,16 +521,16 @@ def prepare_for_submission(self, folder): walltime_sec = self.node.get_attribute('max_wallclock_seconds') cmdline_params = [] # , "-wtime", "{}".format(walltime_sec)]"-xml" - cmdline_params.append("-minimalOutput") + cmdline_params.append('-minimalOutput') if with_hdf5: - cmdline_params.append("-last_extra") - cmdline_params.append("-no_send") + cmdline_params.append('-last_extra') + cmdline_params.append('-no_send') if walltime_sec: - walltime_min = max(1, walltime_sec/60) - cmdline_params.append("-wtime") - cmdline_params.append("{}".format(walltime_min)) + walltime_min = int(max(1, walltime_sec / 60)) + cmdline_params.append('-wtime') + cmdline_params.append('{}'.format(int(walltime_min))) # user specific commandline_options for command in settings_dict.get('cmdline', []): diff --git a/aiida_fleur/calculation/fleurinputgen.py b/aiida_fleur/calculation/fleurinputgen.py index dcc2b36fa..b26b77e9d 100644 --- a/aiida_fleur/calculation/fleurinputgen.py +++ b/aiida_fleur/calculation/fleurinputgen.py @@ -9,7 +9,6 @@ # For further information please visit http://www.flapw.de or # # http://aiida-fleur.readthedocs.io/en/develop/ # ############################################################################### - """ Input plug-in for the FLEUR input generator 'inpgen'. The input generator for the Fleur code is a preprocessor @@ -18,7 +17,7 @@ """ from __future__ import absolute_import import six -from six.moves import zip +from six.moves import zip as zip_six from aiida.engine import CalcJob from aiida.common.exceptions import InputValidationError @@ -29,6 +28,7 @@ from aiida_fleur.data.fleurinp import FleurinpData from aiida_fleur.tools.StructureData_util import abs_to_rel_f, abs_to_rel from aiida_fleur.tools.xml_util import convert_to_fortran_bool, convert_to_fortran_string +from aiida_fleur.common.constants import bohr_a class FleurinputgenCalculation(CalcJob): @@ -37,6 +37,8 @@ class FleurinputgenCalculation(CalcJob): For more information about produced files and the FLEUR-code family, go to http://www.flapw.de/. """ + __version__ = '1.2.0' + # Default input and output files _INPUT_FILE = 'aiida.in' # will be shown with inputcat _OUTPUT_FILE = 'out' # 'shell.out' #will be shown with outputcat @@ -49,8 +51,7 @@ class FleurinputgenCalculation(CalcJob): _ERROR_FILE_NAME = 'out.error' _STRUCT_FILE_NAME = 'struct.xsf' - _settings_keys = ['additional_retrieve_list', 'remove_from_retrieve_list', - 'cmdline'] + _settings_keys = ['additional_retrieve_list', 'remove_from_retrieve_list', 'cmdline'] # TODO switch all these to init_internal_params? _OUTPUT_SUBFOLDER = './fleur_inp_out/' _PREFIX = 'aiida' @@ -60,26 +61,23 @@ class FleurinputgenCalculation(CalcJob): _automatic_namelists = {} # Specify here what namelist and parameters the inpgen takes - _possible_namelists = ['title', 'input', 'lattice', 'gen', 'shift', 'factor', 'qss', - 'soc', 'atom', 'comp', 'exco', 'film', 'kpt', 'end'] + _possible_namelists = [ + 'title', 'input', 'lattice', 'gen', 'shift', 'factor', 'qss', 'soc', 'atom', 'comp', 'exco', 'film', 'kpt', + 'end' + ] # this order is important! - _possible_params = {'input': ['film', 'cartesian', 'cal_symm', 'checkinp', - 'symor', 'oldfleur'], - 'lattice': ['latsys', 'a0', 'a', 'b', 'c', 'alpha', - 'beta', 'gamma'], - 'atom': ['id', 'z', 'rmt', 'dx', 'jri', 'lmax', - 'lnonsph', 'ncst', 'econfig', 'bmu', 'lo', - 'element', 'name'], - 'comp': ['jspins', 'frcor', 'ctail', 'kcrel', 'gmax', - 'gmaxxc', 'kmax'], - 'exco': ['xctyp', 'relxc'], - 'film': ['dvac', 'dtild'], - 'soc': ['theta', 'phi'], - 'qss': ['x', 'y', 'z'], - 'kpt': ['nkpt', 'kpts', 'div1', 'div2', 'div3', - 'tkb', 'tria'], - 'title': {} - } + _possible_params = { + 'input': ['film', 'cartesian', 'cal_symm', 'checkinp', 'symor', 'oldfleur'], + 'lattice': ['latsys', 'a0', 'a', 'b', 'c', 'alpha', 'beta', 'gamma'], + 'atom': ['id', 'z', 'rmt', 'dx', 'jri', 'lmax', 'lnonsph', 'ncst', 'econfig', 'bmu', 'lo', 'element', 'name'], + 'comp': ['jspins', 'frcor', 'ctail', 'kcrel', 'gmax', 'gmaxxc', 'kmax'], + 'exco': ['xctyp', 'relxc'], + 'film': ['dvac', 'dtild'], + 'soc': ['theta', 'phi'], + 'qss': ['x', 'y', 'z'], + 'kpt': ['nkpt', 'kpts', 'div1', 'div2', 'div3', 'tkb', 'tria'], + 'title': {} + } # Keywords that cannot be set # TODO: To specify what combinations are not allowed together, @@ -101,24 +99,24 @@ class FleurinputgenCalculation(CalcJob): def define(cls, spec): super(FleurinputgenCalculation, cls).define(spec) - spec.input('metadata.options.input_filename', valid_type=six.string_types, - default=cls._INPUT_FILE) - spec.input('metadata.options.output_filename', valid_type=six.string_types, - default=cls._INPXML_FILE_NAME) - spec.input('structure', valid_type=StructureData, - help="Choose the input structure to use") - spec.input('parameters', valid_type=Dict, required=False, - help="Use a node that specifies the input parameters " - "for the namelists") - spec.input('settings', valid_type=Dict, required=False, - help="This parameter data node is used to specify for some " - "advanced features how the plugin behaves. You can add files" - "the retrieve list, or add command line switches, " - "for all available features here check the documentation.") + spec.input('metadata.options.input_filename', valid_type=six.string_types, default=cls._INPUT_FILE) + spec.input('metadata.options.output_filename', valid_type=six.string_types, default=cls._INPXML_FILE_NAME) + spec.input('structure', valid_type=StructureData, help='Choose the input structure to use') + spec.input('parameters', + valid_type=Dict, + required=False, + help='Use a node that specifies the input parameters ' + 'for the namelists') + spec.input('settings', + valid_type=Dict, + required=False, + help='This parameter data node is used to specify for some ' + 'advanced features how the plugin behaves. You can add files' + 'the retrieve list, or add command line switches, ' + 'for all available features here check the documentation.') # parser - spec.input('metadata.options.parser_name', valid_type=six.string_types, - default='fleur.fleurinpgenparser') + spec.input('metadata.options.parser_name', valid_type=six.string_types, default='fleur.fleurinpgenparser') # declaration of outputs of the calclation spec.output('fleurinpData', valid_type=FleurinpData, required=True) @@ -130,14 +128,15 @@ def define(cls, spec): # message='Fleur lattice needs atom positions as input.') # spec.exit_code(254, 'ERROR_INPUT_PARAMS_LEFTOVER', # message='Excessive input parameters were specified.') - spec.exit_code(300, 'ERROR_NO_RETRIEVED_FOLDER', - message='No retrieved folder found.') - spec.exit_code(301, 'ERROR_OPENING_OUTPUTS', - message='One of the output files can not be opened.') - spec.exit_code(306, 'ERROR_NO_INPXML', - message='XML input file was not found.') - spec.exit_code(307, 'ERROR_MISSING_RETRIEVED_FILES', - message='Some required files were not retrieved.') + spec.exit_code(300, 'ERROR_NO_RETRIEVED_FOLDER', message='No retrieved folder found.') + spec.exit_code(301, 'ERROR_OPENING_OUTPUTS', message='One of the output files can not be opened.') + spec.exit_code(306, 'ERROR_NO_INPXML', message='XML input file was not found.') + spec.exit_code(307, 'ERROR_MISSING_RETRIEVED_FILES', message='Some required files were not retrieved.') + spec.exit_code(308, + 'ERROR_FLEURINPDATA_INPUT_NOT_VALID', + message=('During parsing: FleurinpData could not be initialized, see log. ' + 'Maybe no Schemafile was found or the Fleurinput is not valid.')) + spec.exit_code(309, 'ERROR_FLEURINPDATE_NOT_VALID', message='During parsing: FleurinpData failed validation.') def prepare_for_submission(self, folder): """ @@ -149,8 +148,7 @@ def prepare_for_submission(self, folder): """ # Get the connection between coordination number and element symbol - _atomic_numbers = {data['symbol']: num for num, - data in six.iteritems(PeriodicTableElements)} + _atomic_numbers = {data['symbol']: num for num, data in six.iteritems(PeriodicTableElements)} possible_namelists = self._possible_namelists possible_params = self._possible_params @@ -161,8 +159,7 @@ def prepare_for_submission(self, folder): film = False # convert these 'booleans' to the inpgen format. - replacer_values_bool = [True, False, 'True', 'False', 't', 'T', - 'F', 'f'] + replacer_values_bool = [True, False, 'True', 'False', 't', 'T', 'F', 'f'] # some keywords require a string " around them in the input file. string_replace = ['econfig', 'lo', 'element', 'name'] @@ -173,7 +170,7 @@ def prepare_for_submission(self, folder): # but we have to convert from Angstrom to a.u (bohr radii) scaling_factors = [1.0, 1.0, 1.0] scaling_lat = 1. # /bohr_to_ang = 0.52917720859 - scaling_pos = 1. / 0.52917720859 # Angstrom to atomic + scaling_pos = 1. / bohr_a # Angstrom to atomic own_lattice = False # not self._use_aiida_structure ########################################## @@ -198,8 +195,7 @@ def prepare_for_submission(self, folder): # use default parameters_dict = {} else: - parameters_dict = _lowercase_dict(parameters.get_dict(), - dict_name='parameters') + parameters_dict = _lowercase_dict(parameters.get_dict(), dict_name='parameters') # we write always out rel coordinates, because thats the way FLEUR uses # them best. we have to convert them from abs, because thats how they @@ -231,17 +227,15 @@ def prepare_for_submission(self, folder): namelists_toprint.insert(index, namelist) namelist = 'atom' if namelist not in possible_namelists: - raise InputValidationError( - "The namelist '{0}' is not supported by the fleur" - " inputgenerator. Check on the fleur website or add '{0}'" - "to _possible_namelists.".format(namelist)) + raise InputValidationError("The namelist '{0}' is not supported by the fleur" + " inputgenerator. Check on the fleur website or add '{0}'" + 'to _possible_namelists.'.format(namelist)) for para in paramdic.keys(): if para not in possible_params[namelist]: - raise InputValidationError( - "The property '{}' is not supported by the " - "namelist '{}'. " - "Check the fleur website, or if it really is," - " update _possible_params. ".format(para, namelist)) + raise InputValidationError("The property '{}' is not supported by the " + "namelist '{}'. " + 'Check the fleur website, or if it really is,' + ' update _possible_params. '.format(para, namelist)) if para in string_replace: # TODO check if its in the parameter dict paramdic[para] = convert_to_fortran_string(paramdic[para]) @@ -265,7 +259,6 @@ def prepare_for_submission(self, folder): input_params.pop('lattice', {}) own_lattice = False - # TODO allow only usual kpt meshes and use therefore Aiida kpointData # if self._use_kpoints: # try: @@ -293,9 +286,8 @@ def prepare_for_submission(self, folder): for key in settings_dict.keys(): if key not in self._settings_keys: # TODO warning - self.logger.info("settings dict key {} for Fleur calculation" - "not recognized, only {} are allowed." - "".format(key, self._settings_keys)) + self.logger.info('settings dict key %s for Fleur calculation' + 'not recognized, only %s are allowed.', key, str(self._settings_keys)) ############################## # END OF INITIAL INPUT CHECK # @@ -307,25 +299,23 @@ def prepare_for_submission(self, folder): #### STRUCTURE_PARAMETERS #### - scaling_factor_card = "" - cell_parameters_card = "" + scaling_factor_card = '' + cell_parameters_card = '' if not own_lattice: cell = structure.cell for vector in cell: scaled = [a * scaling_pos for a in vector] # scaling_pos=1./bohr_to_ang - cell_parameters_card += ("{0:18.10f} {1:18.10f} {2:18.10f}" - "\n".format(scaled[0], scaled[1], scaled[2])) - scaling_factor_card += ("{0:18.10f} {1:18.10f} {2:18.10f}" - "\n".format(scaling_factors[0], - scaling_factors[1], - scaling_factors[2])) + cell_parameters_card += ('{0:18.10f} {1:18.10f} {2:18.10f}' + '\n'.format(scaled[0], scaled[1], scaled[2])) + scaling_factor_card += ('{0:18.10f} {1:18.10f} {2:18.10f}' + '\n'.format(scaling_factors[0], scaling_factors[1], scaling_factors[2])) #### ATOMIC_POSITIONS #### # TODO: be careful with units - atomic_positions_card_list = [""] - atomic_positions_card_listtmp = [""] + atomic_positions_card_list = [''] + atomic_positions_card_listtmp = [''] if not own_lattice: natoms = len(structure.sites) @@ -369,28 +359,25 @@ def prepare_for_submission(self, folder): if suc: atomic_number_name = '{}.{}'.format(atomic_number, kind_namet) # append a label to the detached atom - atomic_positions_card_listtmp.append( - " {0:7} {1:18.10f} {2:18.10f} {3:18.10f} {4}" - "\n".format(atomic_number_name, - vector_rel[0], vector_rel[1], vector_rel[2], - kind_namet)) + atomic_positions_card_listtmp.append(' {0:7} {1:18.10f} {2:18.10f} {3:18.10f} {4}' + '\n'.format(atomic_number_name, vector_rel[0], vector_rel[1], + vector_rel[2], kind_namet)) else: - atomic_positions_card_listtmp.append( - " {0:7} {1:18.10f} {2:18.10f} {3:18.10f}" - "\n".format(atomic_number_name, - vector_rel[0], vector_rel[1], vector_rel[2])) + atomic_positions_card_listtmp.append(' {0:7} {1:18.10f} {2:18.10f} {3:18.10f}' + '\n'.format(atomic_number_name, vector_rel[0], vector_rel[1], + vector_rel[2])) # TODO check format # we write it later, since we do not know what natoms is before the loop... - atomic_positions_card_list.append(" {0:3}\n".format(natoms)) + atomic_positions_card_list.append(' {0:3}\n'.format(natoms)) for card in atomic_positions_card_listtmp: atomic_positions_card_list.append(card) else: # TODO with own lattice atomic positions have to come from somewhere # else.... User input? - raise InputValidationError("fleur lattice needs also the atom " - " position as input," - " not implemented yet, sorry!") - atomic_positions_card = "".join(atomic_positions_card_list) + raise InputValidationError('fleur lattice needs also the atom ' + ' position as input,' + ' not implemented yet, sorry!') + atomic_positions_card = ''.join(atomic_positions_card_list) del atomic_positions_card_list # Free memory #### Kpts #### @@ -407,23 +394,23 @@ def prepare_for_submission(self, folder): with open(input_filename, 'w') as infile: # first write title - infile.write("{0}\n".format(self._inp_title)) + infile.write('{0}\n'.format(self._inp_title)) # then write &input namelist - infile.write("&{0}".format('input')) + infile.write('&{0}'.format('input')) # namelist content; set to {} if not present, so that we leave an # empty namelist namelist = input_params.pop('input', {}) for k, val in sorted(six.iteritems(namelist)): infile.write(get_input_data_text(k, val, False, mapping=None)) - infile.write("/\n") + infile.write('/\n') # Write lattice information now infile.write(cell_parameters_card) - infile.write("{0:18.10f}\n".format(scaling_lat)) + infile.write('{0:18.10f}\n'.format(scaling_lat)) infile.write(scaling_factor_card) - infile.write("\n") + infile.write('\n') # Write Atomic positons infile.write(atomic_positions_card) @@ -434,7 +421,7 @@ def prepare_for_submission(self, folder): if namelist: if 'atom' in namels_name: namels_name = 'atom' - infile.write("&{0}\n".format(namels_name)) + infile.write('&{0}\n'.format(namels_name)) if namels_name in val_only_namelist: make_reversed = False if namels_name == 'soc': @@ -444,15 +431,14 @@ def prepare_for_submission(self, folder): else: for k, val in sorted(six.iteritems(namelist)): infile.write(get_input_data_text(k, val, False, mapping=None)) - infile.write("/\n") + infile.write('/\n') # infile.write(kpoints_card) if input_params: - raise InputValidationError( - "input_params leftover: The following namelists are specified" - " in input_params, but are " - "not valid namelists for the current type of calculation: " - "{}".format(",".join(list(input_params.keys())))) + raise InputValidationError('input_params leftover: The following namelists are specified' + ' in input_params, but are ' + 'not valid namelists for the current type of calculation: ' + '{}'.format(','.join(list(input_params.keys())))) calcinfo = CalcInfo() @@ -487,7 +473,8 @@ def prepare_for_submission(self, folder): codeinfo = CodeInfo() # , "-electronConfig"] # TODO? let the user decide -electronconfig? - cmdline_params = ["-explicit"] + #cmdline_params = ['-explicit', '-inc', '+all', '-f', '{}'.format(self._INPUT_FILE_NAME)] + cmdline_params = ['-explicit'] # user specific commandline_options for command in settings_dict.get('cmdline', []): @@ -519,17 +506,17 @@ def conv_to_fortran(val, quote_strings=True): else: val_str = '.false.' elif isinstance(val, numbers.Integral): - val_str = "{:d}".format(val) + val_str = '{:d}'.format(val) elif isinstance(val, numbers.Real): - val_str = ("{:18.10e}".format(val)).replace('e', 'd') + val_str = ('{:18.10e}'.format(val)).replace('e', 'd') elif isinstance(val, six.string_types): if quote_strings: val_str = "'{!s}'".format(val) else: - val_str = "{!s}".format(val) + val_str = '{!s}'.format(val) else: raise ValueError("Invalid value '{}' of type '{}' passed, accepts only booleans, ints, " - "floats and strings".format(val, type(val))) + 'floats and strings'.format(val, type(val))) return val_str @@ -559,8 +546,7 @@ def get_input_data_text(key, val, value_only, mapping=None): # hasattr(__iter__) if isinstance(val, dict): if mapping is None: - raise ValueError("If 'val' is a dictionary, you must provide also " - "the 'mapping' parameter") + raise ValueError("If 'val' is a dictionary, you must provide also " "the 'mapping' parameter") # At difference with the case of a list, at the beginning # list_of_strings @@ -572,36 +558,34 @@ def get_input_data_text(key, val, value_only, mapping=None): try: idx = mapping[elemk] except KeyError: - raise ValueError("Unable to find the key '{}' in the mapping " - "dictionary".format(elemk)) + raise ValueError("Unable to find the key '{}' in the mapping " 'dictionary'.format(elemk)) - list_of_strings.append(( - idx, " {0}({2})={1} ".format(key, conv_to_fortran(itemval), idx))) + list_of_strings.append((idx, ' {0}({2})={1} '.format(key, conv_to_fortran(itemval), idx))) # changed {0}({2}) = {1}\n".format # I first have to resort, then to remove the index from the first # column, finally to join the strings - list_of_strings = list(zip(*sorted(list_of_strings)))[1] - return "".join(list_of_strings) + list_of_strings = list(zip_six(*sorted(list_of_strings)))[1] + return ''.join(list_of_strings) elif not isinstance(val, six.string_types) and hasattr(val, '__iter__'): if value_only: list_of_strings = [ - " ({1}){0} ".format(conv_to_fortran(itemval), idx + 1) - for idx, itemval in enumerate(val)] + ' ({1}){0} '.format(conv_to_fortran(itemval), idx + 1) for idx, itemval in enumerate(val) + ] else: # a list/array/tuple of values list_of_strings = [ - " {0}({2})={1} ".format(key, conv_to_fortran(itemval), - idx + 1) - for idx, itemval in enumerate(val)] - return "".join(list_of_strings) + ' {0}({2})={1} '.format(key, conv_to_fortran(itemval), idx + 1) for idx, itemval in enumerate(val) + ] + return ''.join(list_of_strings) else: # single value # return " {0}={1} ".format(key, conv_to_fortran(val)) if value_only: - return " {0} ".format(val) + return ' {0} '.format(val) else: - return " {0}={1} ".format(key, val) + return ' {0}={1} '.format(key, val) + def _lowercase_dict(dic, dict_name): """ @@ -616,11 +600,10 @@ def _lowercase_dict(dic, dict_name): new_dict = dict((str(k).lower(), val) for k, val in six.iteritems(dic)) if len(new_dict) != len(dic): num_items = Counter(str(k).lower() for k in dic.keys()) - double_keys = ",".join([k for k, val in num_items if val > 1]) - raise InputValidationError( - "Inside the dictionary '{}' there are the following keys that " - "are repeated more than once when compared case-insensitively:" - "{}.This is not allowed.".format(dict_name, double_keys)) + double_keys = ','.join([k for k, val in num_items if val > 1]) + raise InputValidationError("Inside the dictionary '{}' there are the following keys that " + 'are repeated more than once when compared case-insensitively:' + '{}.This is not allowed.'.format(dict_name, double_keys)) return new_dict else: - raise TypeError("_lowercase_dict accepts only dictionaries as argument") + raise TypeError('_lowercase_dict accepts only dictionaries as argument') diff --git a/aiida_fleur/cmdline/__init__.py b/aiida_fleur/cmdline/__init__.py index 8456ddeff..6e91f601d 100644 --- a/aiida_fleur/cmdline/__init__.py +++ b/aiida_fleur/cmdline/__init__.py @@ -12,4 +12,3 @@ ''' AiiDA-FLEUR ''' - diff --git a/aiida_fleur/cmdline/commands/__init__.py b/aiida_fleur/cmdline/commands/__init__.py index ef28e597f..6e91f601d 100644 --- a/aiida_fleur/cmdline/commands/__init__.py +++ b/aiida_fleur/cmdline/commands/__init__.py @@ -9,7 +9,6 @@ # For further information please visit http://www.flapw.de or # # http://aiida-fleur.readthedocs.io/en/develop/ # ############################################################################### - ''' AiiDA-FLEUR ''' diff --git a/aiida_fleur/cmdline/commands/fleurinpdata.py b/aiida_fleur/cmdline/commands/fleurinpdata.py index fb8879866..4ac092fb0 100644 --- a/aiida_fleur/cmdline/commands/fleurinpdata.py +++ b/aiida_fleur/cmdline/commands/fleurinpdata.py @@ -9,19 +9,20 @@ # For further information please visit http://www.flapw.de or # # http://aiida-fleur.readthedocs.io/en/develop/ # ############################################################################### - """ Contains verdi commands for fleurinpdata """ from __future__ import absolute_import import click + # this will get replaced by data_plug.group #@data_plug.group('fleur.fleurinp') @click.group() def fleurinp(): pass + @fleurinp.command() def list_fleurinp(): """ @@ -30,6 +31,7 @@ def list_fleurinp(): click.echo('verdi data fleurinp list') #do a query and list all reuse AiiDA code + @fleurinp.command() def show(): """ @@ -38,6 +40,7 @@ def show(): """ click.echo('verdi data fleurinp list') + @fleurinp.command() def open_inp(): """ @@ -46,6 +49,7 @@ def open_inp(): """ click.echo('verdi data fleurinp list') + # this is a maybe @fleurinp.command() def get_structure(): @@ -61,11 +65,12 @@ def get_kpoints(): Prints some basic information about the kpoints data and returns a kpoints uuid/pk """ click.echo('verdi data fleurinp kpoints') - + + @fleurinp.command() def get_parameters(): """ - Prints some basic information about the parameter data and returns a + Prints some basic information about the parameter data and returns a parameter data uuid/pk """ click.echo('verdi data fleurinp parameter') diff --git a/aiida_fleur/cmdline/commands/scf_wc.py b/aiida_fleur/cmdline/commands/scf_wc.py index 73918d4b8..e7d76c829 100644 --- a/aiida_fleur/cmdline/commands/scf_wc.py +++ b/aiida_fleur/cmdline/commands/scf_wc.py @@ -9,10 +9,9 @@ # For further information please visit http://www.flapw.de or # # http://aiida-fleur.readthedocs.io/en/develop/ # ############################################################################### - """ contains verdi commands for the scf workchain -in general these should become options of verdi aiida-fleur workchains +in general these should become options of verdi aiida-fleur workchains """ from __future__ import absolute_import @@ -23,24 +22,27 @@ def scf_wc(): pass + @scf_wc.command() -def res(): +def res_scf(): """ Prints the result node to screen """ click.echo('verdi aiida-fleur scf res') + @scf_wc.command() -def show(): +def show_scf(): """ - plots the results of a + plots the results of a """ click.echo('verdi aiida-fleur scf show') + @scf_wc.command() -def list(): +def list_scf(): """ - similar to the verdi work list command, but this displays also some + similar to the verdi work list command, but this displays also some specific information about the scfs """ click.echo('verdi aiida-fleur scf list') diff --git a/aiida_fleur/cmdline/commands/workchains.py b/aiida_fleur/cmdline/commands/workchains.py index 105f4bd3a..ca4905af8 100644 --- a/aiida_fleur/cmdline/commands/workchains.py +++ b/aiida_fleur/cmdline/commands/workchains.py @@ -9,12 +9,10 @@ # For further information please visit http://www.flapw.de or # # http://aiida-fleur.readthedocs.io/en/develop/ # ############################################################################### - """ contains verdi commands that are useful for fleur workchains """ - from __future__ import absolute_import import click @@ -23,25 +21,28 @@ def workchains(): pass + @workchains.command() -def res(): +def res_wc(): """ Prints the result node to screen """ click.echo('verdi aiida-fleur workchains res pk/uuid/list') + @workchains.command() -def show(): +def show_wc(): """ plots the results of a workchain """ click.echo('verdi aiida-fleur workchains show pk/uuid/list') + @workchains.command() -def list(): +def list_wc(): """ - similar to the verdi work list command, but this displays also some - specific information about the fleur workchains, can be filtered for + similar to the verdi work list command, but this displays also some + specific information about the fleur workchains, can be filtered for certain workchains... """ click.echo('verdi aiida-fleur workchians list -scf -A -p') diff --git a/aiida_fleur/common/constants.py b/aiida_fleur/common/constants.py new file mode 100644 index 000000000..0a474ee13 --- /dev/null +++ b/aiida_fleur/common/constants.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- +############################################################################### +# Copyright (c), Forschungszentrum Jülich GmbH, IAS-1/PGI-1, Germany. # +# All rights reserved. # +# This file is part of the AiiDA-FLEUR package. # +# # +# The code is hosted on GitHub at https://github.com/JuDFTteam/aiida-fleur # +# For further information on the license, see the LICENSE.txt file # +# For further information please visit http://www.flapw.de or # +# http://aiida-fleur.readthedocs.io/en/develop/ # +############################################################################### +''' +Here we collect physical constants which are used throughout the code +that way we ensure consitency +''' + +htr_to_ev = 27.21138602 +bohr_a = 0.52917720903 diff --git a/aiida_fleur/common/mapping.py b/aiida_fleur/common/mapping.py index 6ac111500..cb01e3015 100644 --- a/aiida_fleur/common/mapping.py +++ b/aiida_fleur/common/mapping.py @@ -1,15 +1,19 @@ # -*- coding: utf-8 -*- +''' +This module collects helper methods which are commonly used for dictionaries. +''' from __future__ import absolute_import -from collections import Mapping +from collections.abc import Mapping import six from aiida.common.extendeddicts import AttributeDict from aiida.orm.nodes.data.dict import Dict +# FIXME, there might be overlap with tools/dict_utils or other tools. def update_mapping(original, source): """ - Update a nested dictionary with another optionally nested dictionary. The dictionaries may be + Update a nested dictionary with another optionally nested dictionary. The dictionaries may be plain Mapping objects or Dict nodes. If the original dictionary is an instance of Dict the returned dictionary will also be wrapped in Dict. @@ -27,11 +31,7 @@ def update_mapping(original, source): source = source.get_dict() for key, value in six.iteritems(source): - if ( - key in original and - (isinstance(value, Mapping) or isinstance(value, Dict)) and - (isinstance(original[key], Mapping) or isinstance(original[key], Dict)) - ): + if key in original and isinstance(value, (Dict, Mapping)) and isinstance(original[key], (Dict, Mapping)): original[key] = update_mapping(original[key], value) else: original[key] = value @@ -41,6 +41,7 @@ def update_mapping(original, source): return original + def prepare_process_inputs(process, inputs): """ Prepare the inputs for submission for the given process, according to its spec. That is to say diff --git a/aiida_fleur/common/workchain/base/restart.py b/aiida_fleur/common/workchain/base/restart.py index 6609dd008..c54e9ad3b 100644 --- a/aiida_fleur/common/workchain/base/restart.py +++ b/aiida_fleur/common/workchain/base/restart.py @@ -59,8 +59,7 @@ def __init__(self, *args, **kwargs): super(BaseRestartWorkChain, self).__init__(*args, **kwargs) if self._calculation_class is None or not issubclass(self._calculation_class, (CalcJob, WorkChain)): - raise ValueError( - 'no valid CalcJob or WorkChain class defined for `_calculation_class` attribute') + raise ValueError('no valid CalcJob or WorkChain class defined for `_calculation_class` attribute') self._load_error_handlers() @@ -86,9 +85,9 @@ def define(cls, spec): # yapf: disable # pylint: disable=bad-continuation super(BaseRestartWorkChain, cls).define(spec) - spec.input('max_iterations', valid_type=orm.Int, default=orm.Int(3), + spec.input('max_iterations', valid_type=orm.Int, default=lambda: orm.Int(3), help='Maximum number of iterations the work chain will restart the calculation to finish successfully.') - spec.input('clean_workdir', valid_type=orm.Bool, default=orm.Bool(False), + spec.input('clean_workdir', valid_type=orm.Bool, default=lambda: orm.Bool(False), help='If `True`, work directories of all called calculation will be cleaned at the end of execution.') spec.exit_code(101, 'ERROR_MAXIMUM_ITERATIONS_EXCEEDED', message='The maximum number of iterations was exceeded.') diff --git a/aiida_fleur/data/__init__.py b/aiida_fleur/data/__init__.py index 41282c702..026bb6106 100644 --- a/aiida_fleur/data/__init__.py +++ b/aiida_fleur/data/__init__.py @@ -9,7 +9,6 @@ # For further information please visit http://www.flapw.de or # # http://aiida-fleur.readthedocs.io/en/develop/ # ############################################################################### - ''' FLEUR plug-in ''' diff --git a/aiida_fleur/data/fleurinp.py b/aiida_fleur/data/fleurinp.py index 62438b4de..48e349f51 100644 --- a/aiida_fleur/data/fleurinp.py +++ b/aiida_fleur/data/fleurinp.py @@ -13,20 +13,18 @@ In this module is the :class:`~aiida_fleur.data.fleurinp.FleurinpData` class, and methods for FLEUR input manipulation plus methods for extration of AiiDA data structures. """ -# TODO: all methods to change now in fleurinpmodifier, do we still want to -# store the userchanges, or rather delete them? depends how well one can see things -# from fleurinpmodifier... # TODO: maybe add a modify method which returns a fleurinpmodifier class # TODO: inpxml to dict: maybe kpts should not be written to the dict? same with symmetry # TODO: test for large input files, I believe the recursion is still quite slow.. # TODO: 2D cell get kpoints and get structure also be carefull with tria = T!!! -#TODO : maybe save when get_structure or get_kpoints was executed on fleurinp, +# TODO : maybe save when get_structure or get_kpoints was executed on fleurinp, # because otherwise return this node instead of creating a new one! # TODO: get rid of duplicate code for parsing the inp.xml to an etree from __future__ import absolute_import from __future__ import print_function import os +import io import re import six from lxml import etree @@ -37,8 +35,8 @@ from aiida_fleur.tools.xml_util import replace_tag from aiida_fleur.fleur_schema.schemafile_index import get_internal_search_paths, get_schema_paths +from aiida_fleur.common.constants import bohr_a as BOHR_A -BOHR_A = 0.52917721092 class FleurinpData(Data): """ @@ -78,6 +76,11 @@ def __init__(self, **kwargs): Initialize a FleurinpData object set the files given """ files = kwargs.pop('files', None) + for filename in files: + if 'inp.xml' in filename: + files.pop(files.index(filename)) + files.append(filename) + break node = kwargs.pop('node', None) super(FleurinpData, self).__init__(**kwargs) @@ -91,7 +94,7 @@ def __init__(self, **kwargs): search_paths.append('./') # Now add also python path maybe will be decaptivated - #if pythonpath is non existent catch error + # if pythonpath is non existent catch error try: pythonpath = os.environ['PYTHONPATH'].split(':') except KeyError: @@ -100,7 +103,6 @@ def __init__(self, **kwargs): for path in pythonpath[:]: search_paths.append(path) - self.set_attribute('_has_schema', False) self.set_attribute('_schema_file_path', None) self.set_attribute('_search_paths', search_paths) @@ -110,6 +112,9 @@ def __init__(self, **kwargs): else: self.set_files(files) + # ignore machine dependent attributes in hash + _hash_ignored_attributes = ['_schema_file_path', '_search_paths'] + @property def _has_schema(self): """ @@ -185,16 +190,20 @@ def set_file(self, filename, dst_filename=None, node=None): """ self._add_path(filename, dst_filename=dst_filename, node=node) - - def open(self, key='inp.xml', mode='r'): + def open(self, path='inp.xml', mode='r', key=None): """ Returns an open file handle to the content of this data node. :param key: name of the file to be opened :param mode: the mode with which to open the file handle :returns: A file handle in read mode - """ - return super(FleurinpData, self).open(key, mode=mode) + """ + from aiida.orm.nodes.node import WarnWhenNotEntered # deep import might change + + if key is not None: + path = key + + return WarnWhenNotEntered(self._repository.open(path, mode=mode), repr(self)) def get_content(self, filename='inp.xml'): """ @@ -202,10 +211,9 @@ def get_content(self, filename='inp.xml'): :returns: A string of the file content """ - with self.open(key=filename, mode='r') as handle: + with self.open(path=filename, mode='r') as handle: return handle.read() - def del_file(self, filename): """ Remove a file from FleurinpData instancefind @@ -216,12 +224,12 @@ def del_file(self, filename): if filename in self.get_attribute('files'): try: self.get_attribute('files').remove(filename) - #self._del_attribute(‘filename') + # self._del_attribute(‘filename') except AttributeError: - ## There was no file set + # There was no file set pass # remove from sandbox folder - if filename in self.list_object_names():#get_folder_list(): + if filename in self.list_object_names(): # get_folder_list(): self.delete_object(filename) def find_schema(self, inp_version_number): @@ -239,14 +247,14 @@ def find_schema(self, inp_version_number): """ # user changed version number, or no file yet known. # TODO test if this still does the right thing if user adds one - #inp.xml and then an inp.xml with different version. + # inp.xml and then an inp.xml with different version. # or after copying and read schemafile_paths = [] - for path in self._search_paths:#paths: + for path in self._search_paths: # paths: for root, dirs, files in os.walk(path): for file1 in files: - if file1.endswith(".xsd"): + if file1.endswith('.xsd'): if ('Fleur' in file1) or ('fleur' in file1): schemafile_path = os.path.join(root, file1) schemafile_paths.append(schemafile_path) @@ -258,20 +266,20 @@ def find_schema(self, inp_version_number): i = i + 1 # This kind of hardcoded if re.search('name="FleurVersionType"', line): - imax = i + 10 # maybe make larger or different + imax = i + 10 # maybe make larger or different imin = i schema_version_numbers = [] - if (i > imin) and (i <= imax): + if imin < i <= imax: if re.search('enumeration value', line): schema_version_number = re.findall(r'\d+.\d+', line)[0] elif re.search('simpleType>', line): break schema_version_numbers.append(schema_version_number) schemafile.close() - #test if schemafiles works with multiple fleur versions + # test if schemafiles works with multiple fleur versions for version_number in schema_version_numbers: if version_number == inp_version_number: - #we found the right schemafile for the current inp.xml + # we found the right schemafile for the current inp.xml self.set_attribute('_schema_file_path', schemafile_path) self.set_attribute('_has_schema', True) return schemafile_paths, True @@ -280,29 +288,42 @@ def find_schema(self, inp_version_number): def _add_path(self, file1, dst_filename=None, node=None): """ - Add a single file to folder. The destination name can be different. - ``inp.xml`` is a special case. - file names are stored in the db, files in the repo. + Add a single file to the FleurinpData folder. + The destination name can be different. ``inp.xml`` is a special case. + file names are stored in the db, the whole file in the reporsitory. + :param file1: the file to be added, either string, absolute path, or filelike object whose contents to copy + Hint: Pass io.BytesIO(b"my string") to construct the file directly from a string. + :param dst_filename: string, new filename for given file in repo and db + :param node: aiida.orm.Node, usually FolderData if node is given get the 'file1' from the node + + :raise: ValueError, InputValidationError + :return: None """ - #TODO, only certain files should be allowed to be added + # TODO? Maybe only certain files should be allowed to be added + # contra: has to be maintained, also these files can be inputed from byte strings... #_list_of_allowed_files = ['inp.xml', 'enpara', 'cdn1', 'sym.out', 'kpts'] - #old_file_list = self.get_folder_list() - - if node: if not isinstance(node, Node): - #try: - node = load_node(node) - #except + node = load_node(node) # if this fails it will raise + if file1 not in node.list_object_names(): + # throw error, you try to add something that is not there + raise ValueError('file1 has to be in the specified node') - if file1 in node.list_object_names(): - file1 = node.open(file1, mode='r') - else:# throw error? you try to add something that is not there - raise ValueError("file1 has to be in the specified node") - - if isinstance(file1, six.string_types): + is_filelike = True + if dst_filename is None: + final_filename = file1 + else: + final_filename = dst_filename + # Override file1 with bytestring of file + # since we have to use 'with', and node has no method to copy files + # we read the whole file and write it again later + # this is not so nice, but we assume that input files are rather small... + with node.open(file1, mode='rb') as file2: + file1 = io.BytesIO(file2.read()) + + elif isinstance(file1, six.string_types): is_filelike = False if not os.path.isabs(file1): @@ -310,7 +331,7 @@ def _add_path(self, file1, dst_filename=None, node=None): #raise ValueError("Pass an absolute path for file1: {}".format(file1)) if not os.path.isfile(file1): - raise ValueError("file1 must exist and must be a single file: {}".format(file1)) + raise ValueError('file1 must exist and must be a single file: {}'.format(file1)) if dst_filename is None: final_filename = os.path.split(file1)[1] @@ -318,14 +339,20 @@ def _add_path(self, file1, dst_filename=None, node=None): final_filename = dst_filename else: is_filelike = True - final_filename = os.path.basename(file1.name) - + if dst_filename is None: + try: + final_filename = os.path.basename(file1.name) # Not sure if this still works for aiida>2.0 + except AttributeError: + final_filename = 'inp.xml' # fall back to default + else: + final_filename = dst_filename key = final_filename old_file_list = self.list_object_names() old_files_list = self.get_attribute('files', []) + # remove file from folder first if it exists if final_filename not in old_file_list: old_files_list.append(final_filename) else: @@ -335,61 +362,52 @@ def _add_path(self, file1, dst_filename=None, node=None): pass if is_filelike: - self.put_object_from_filelike(file1, key) - if file1.closed: - file1 = self.open(file1.name, file1.mode) - else: #reset reading to 0 - file1.seek(0) + self.put_object_from_filelike(file1, key, mode='wb') else: self.put_object_from_file(file1, key) - self.set_attribute('files', old_files_list) + self.set_attribute('files', old_files_list) # We want to keep the other files + ### Special case: 'inp.xml' ### # here this is hardcoded, might want to change? get filename from elsewhere + if final_filename == 'inp.xml': - #get input file version number + # get input file version number inp_version_number = None - if is_filelike: # at this point it was read.. - # TODO this does not work.. reading it now is [].. - inpfile = file1 - else: - inpfile = open(file1, 'r') - for line in inpfile.readlines(): - if re.search('fleurInputVersion', line): - inp_version_number = re.findall(r'\d+.\d+', line)[0] + lines = self.get_content(filename=final_filename).split('\n') + for line in lines: + if re.search('fleurInputVersion', str(line)): + inp_version_number = re.findall(r'\d+.\d+', str(line))[0] break - inpfile.close() - if inp_version_number is None: # we raise after file closure - raise InputValidationError("No fleurInputVersion number found " - "in given input file: {}. " - "Please check if this is a valid fleur input file. " - "It can not be validated and I can not use it. " - "".format(file1)) + if inp_version_number is None: + raise InputValidationError('No fleurInputVersion number found ' + 'in given input file: {}. {}' + 'Please check if this is a valid fleur input file. ' + 'It can not be validated and I can not use it. ' + ''.format(file1, lines)) # search for Schema file with same version number schemafile_paths, found = self.find_schema(inp_version_number) - if (not self._has_schema) and (self._schema_file_path is None): - err_msg = ("No XML schema file (.xsd) with matching version number {} " - "to the inp.xml file was found. I have looked here: {} " - "and have found only these schema files for Fleur: {}. " - "I need this file to validate your input and to know the structure " - "of the current inp.xml file, sorry.".format(inp_version_number, - self._search_paths, + err_msg = ('No XML schema file (.xsd) with matching version number {} ' + 'to the inp.xml file was found. I have looked here: {} ' + 'and have found only these schema files for Fleur: {}. ' + 'I need this file to validate your input and to know the structure ' + 'of the current inp.xml file, sorry.'.format(inp_version_number, self._search_paths, schemafile_paths)) raise InputValidationError(err_msg) - if self._schema_file_path is None:# or ('fleurInputVersion' in self.inp_userchanges): #(not) + if self._schema_file_path is None: schemafile_paths, found = self.find_schema(inp_version_number) if not found: - err_msg = ("No XML schema file (.xsd) with matching version number {} " - "to the inp.xml file was found. I have looked here: {} " - "and have found only these schema files for Fleur: {}. " - "I need this file to validate your input and to know the structure " - "of the current inp.xml file, sorry.".format(inp_version_number, - self._search_paths, + err_msg = ('No XML schema file (.xsd) with matching version number {} ' + 'to the inp.xml file was found. I have looked here: {} ' + 'and have found only these schema files for Fleur: {}. ' + 'I need this file to validate your input and to know the structure ' + 'of the current inp.xml file, sorry.'.format(inp_version_number, self._search_paths, schemafile_paths)) raise InputValidationError(err_msg) - # set inp dict of Fleurinpdata + + # finally set inp dict of Fleurinpdata self._set_inp_dict() def _set_inp_dict(self): @@ -402,25 +420,54 @@ def _set_inp_dict(self): 4. set inputxml_dict """ from aiida_fleur.tools.xml_util import get_inpxml_file_structure, inpxml_todict, clear_xml + import tempfile # get inpxml structure inpxmlstructure = get_inpxml_file_structure() # read xmlinp file into an etree with autocomplition from schema - inpxmlfile = self.open(key='inp.xml', mode='r') + # we do not validate here because we want this to always succeed xmlschema_doc = etree.parse(self._schema_file_path) xmlschema = etree.XMLSchema(xmlschema_doc) - parser = etree.XMLParser(attribute_defaults=True) - #dtd_validation=True + parser = etree.XMLParser(attribute_defaults=True, encoding='utf-8') + # dtd_validation=True + with self.open(path='inp.xml', mode='r') as inpxmlfile: + tree_x = etree.parse(inpxmlfile, parser) + + # relax.xml should be available to be used in xinclude + # hence copy relax.xml from the retrieved node into the temp file + fo = tempfile.NamedTemporaryFile(mode='w', delete=False) + try: + with self.open(path='relax.xml', mode='r') as relax_file: + relax_content = relax_file.read() + except FileNotFoundError: + relax_content = '' + fo.write(relax_content) + tempfile_name = fo.name + fo.close() + + # replace relax.xml by the temp file path + tree_x_string = etree.tostring(tree_x) + tree_x_string = tree_x_string.replace(bytes('relax.xml', 'utf-8'), bytes(tempfile_name, 'utf-8')) + tree_x = etree.fromstring(tree_x_string).getroottree() - tree_x = etree.parse(inpxmlfile, parser) - inpxmlfile.close() # replace XInclude parts to validate against schema tree_x = clear_xml(tree_x) + os.remove(tempfile_name) # check if it validates against the schema if not xmlschema.validate(tree_x): - raise InputValidationError("Input file is not validated against the schema.") + # get a more information on what does not validate + message = '' + parser_on_fly = etree.XMLParser(attribute_defaults=True, schema=xmlschema, encoding='utf-8') + inpxmlfile = etree.tostring(tree_x) + try: + tree_x = etree.fromstring(inpxmlfile, parser_on_fly) + except etree.XMLSyntaxError as msg: + message = msg + raise InputValidationError('Input file does not validate against the schema: {}'.format(message)) + + raise InputValidationError('Input file is not validated against the schema.' 'Reason is unknown') # convert etree into python dictionary root = tree_x.getroot() @@ -437,8 +484,8 @@ def inp_dict(self): """ return self.get_attribute('inp_dict', {}) - # TODO better validation? other files, if has a schema + def _validate(self): """ A validation method. Checks if an ``inp.xml`` file is in the FleurinpData. @@ -448,13 +495,12 @@ def _validate(self): super(FleurinpData, self)._validate() if 'inp.xml' in self.files: - #has_inpxml = True # does nothing so far + # has_inpxml = True # does nothing so far pass else: raise ValidationError('inp.xml file not in attribute "files". ' 'FleurinpData needs to have and inp.xml file!') - def get_fleur_modes(self): ''' Analyses ``inp.xml`` file to set up a calculation mode. 'Modes' are paths a FLEUR @@ -473,15 +519,18 @@ def get_fleur_modes(self): # 'dos': '/fleurInput/output', # 'band': '/fleurInput/output', # 'jspins': '/fleurInput/calculationSetup/magnetism', - fleur_modes = {'jspins' : '', 'dos' : '', 'band' : '', 'ldau' : '', 'forces' : '', - 'force_theorem': ''} + fleur_modes = {'jspins': '', 'dos': '', 'band': '', 'ldau': '', 'forces': '', 'force_theorem': '', 'gw': ''} if 'inp.xml' in self.files: fleur_modes['jspins'] = self.inp_dict['calculationSetup']['magnetism']['jspins'] - fleur_modes['dos'] = self.inp_dict['output']['dos']#'fleurInput'] + fleur_modes['dos'] = self.inp_dict['output']['dos'] # 'fleurInput'] fleur_modes['band'] = self.inp_dict['output']['band'] fleur_modes['forces'] = self.inp_dict['calculationSetup']['geometryOptimization']['l_f'] fleur_modes['force_theorem'] = 'forceTheorem' in self.inp_dict - ldau = False # TODO test if ldau in inp_dict.... + try: + fleur_modes['gw'] = int(self.inp_dict['calculationSetup']['expertModes']['gw']) != 0 + except KeyError: + fleur_modes['gw'] = False + ldau = False # TODO test if ldau in inp_dict.... fleur_modes['ldau'] = False return fleur_modes @@ -496,10 +545,10 @@ def get_structuredata_ncf(self): from aiida.orm import StructureData from aiida_fleur.tools.StructureData_util import rel_to_abs, rel_to_abs_f - #StructureData = DataFactory(‘structure’) - #Disclaimer: this routine needs some xpath expressions. these are hardcoded here, - #therefore maintainance might be needed, if you want to circumvent this, you have - #to get all the paths from somewhere. + # StructureData = DataFactory(‘structure’) + # Disclaimer: this routine needs some xpath expressions. these are hardcoded here, + # therefore maintainance might be needed, if you want to circumvent this, you have + # to get all the paths from somewhere. ####### # all hardcoded xpaths used and attributes names: @@ -527,13 +576,13 @@ def get_structuredata_ncf(self): return None # read in inpxml - inpxmlfile = self.open(key='inp.xml') - if self._schema_file_path: # Schema there, parse with schema + if self._schema_file_path: # Schema there, parse with schema xmlschema_doc = etree.parse(self._schema_file_path) xmlschema = etree.XMLSchema(xmlschema_doc) - parser = etree.XMLParser(attribute_defaults=True) - tree = etree.parse(inpxmlfile, parser) + parser = etree.XMLParser(attribute_defaults=True, encoding='utf-8') + with self.open(path='inp.xml', mode='r') as inpxmlfile: + tree = etree.parse(inpxmlfile, parser) tree.xinclude() # remove comments from inp.xml comments = tree.xpath('//comment()') @@ -541,35 +590,35 @@ def get_structuredata_ncf(self): p = c.getparent() p.remove(c) if not xmlschema.validate(tree): - raise ValueError("Input file is not validated against the schema.") - else: #schema not there, parse without + raise ValueError('Input file is not validated against the schema.') + else: # schema not there, parse without print('parsing inp.xml without XMLSchema') - tree = etree.parse(inpxmlfile) + with self.open(path='inp.xml', mode='r') as inpxmlfile: + tree = etree.parse(inpxmlfile) tree.xinclude() # remove comments from inp.xml comments = tree.xpath('//comment()') for c in comments: p = c.getparent() p.remove(c) - inpxmlfile.close() root = tree.getroot() # Fleur uses atomic units, convert to Angstrom # get cell matrix from inp.xml - row1 = root.xpath(bravaismatrix_bulk_xpath + row1_tag_name)#[0].text.split() + row1 = root.xpath(bravaismatrix_bulk_xpath + row1_tag_name) # [0].text.split() cell = None - if row1: #bulk calculation + if row1: # bulk calculation row1 = row1[0].text.split() row2 = root.xpath(bravaismatrix_bulk_xpath + row2_tag_name)[0].text.split() row3 = root.xpath(bravaismatrix_bulk_xpath + row3_tag_name)[0].text.split() # TODO? allow math? for i, cor in enumerate(row1): - row1[i] = float(cor)*BOHR_A + row1[i] = float(cor) * BOHR_A for i, cor in enumerate(row2): - row2[i] = float(cor)*BOHR_A + row2[i] = float(cor) * BOHR_A for i, cor in enumerate(row3): - row3[i] = float(cor)*BOHR_A + row3[i] = float(cor) * BOHR_A cell = [row1, row2, row3] # create new structure Node @@ -577,17 +626,17 @@ def get_structuredata_ncf(self): struc.pbc = [True, True, True] elif root.xpath(bravaismatrix_film_xpath + row1_tag_name): - #film calculation + # film calculation row1 = root.xpath(bravaismatrix_film_xpath + row1_tag_name)[0].text.split() row2 = root.xpath(bravaismatrix_film_xpath + row2_tag_name)[0].text.split() row3 = root.xpath(bravaismatrix_film_xpath + row3_tag_name)[0].text.split() for i, cor in enumerate(row1): - row1[i] = float(cor)*BOHR_A + row1[i] = float(cor) * BOHR_A for i, cor in enumerate(row2): - row2[i] = float(cor)*BOHR_A + row2[i] = float(cor) * BOHR_A for i, cor in enumerate(row3): - row3[i] = float(cor)*BOHR_A - #row3 = [0, 0, 0]#? TODO:what has it to be in this case? + row3[i] = float(cor) * BOHR_A + # row3 = [0, 0, 0]#? TODO:what has it to be in this case? cell = [row1, row2, row3] struc = StructureData(cell=cell) struc.pbc = [True, True, False] @@ -598,13 +647,13 @@ def get_structuredata_ncf(self): 'not supported.') return None - #get species for atom kinds + # get species for atom kinds #species = root.xpath(species_xpath) species_name = root.xpath(species_xpath + '/@' + species_attrib_name) species_element = root.xpath(species_xpath + '/@' + species_attrib_element) # alternativ: loop over species and species.get(species_attrib_name) - #save species info in a dict + # save species info in a dict species_dict = {} for i, spec in enumerate(species_name): species_dict[spec] = {species_attrib_element: species_element[i]} @@ -622,26 +671,24 @@ def get_structuredata_ncf(self): group_atom_positions_rel = atom_group.xpath(atom_group_tag_relpos) group_atom_positions_film = atom_group.xpath(atom_group_tag_filmpos) - if group_atom_positions_abs: #we have absolute positions + if group_atom_positions_abs: # we have absolute positions for atom in group_atom_positions_abs: postion_a = atom.text.split() # allow for math *, / for i, pos in enumerate(postion_a): if '/' in pos: temppos = pos.split('/') - postion_a[i] = float(temppos[0])/float(temppos[1]) + postion_a[i] = float(temppos[0]) / float(temppos[1]) elif '*' in pos: temppos = pos.split('*') - postion_a[i] = float(temppos[0])*float(temppos[1]) + postion_a[i] = float(temppos[0]) * float(temppos[1]) else: postion_a[i] = float(pos) - postion_a[i] = postion_a[i]*BOHR_A + postion_a[i] = postion_a[i] * BOHR_A # append atom to StructureData - struc.append_atom( - position=postion_a, - symbols=species_dict[current_species][species_attrib_element]) + struc.append_atom(position=postion_a, symbols=species_dict[current_species][species_attrib_element]) - elif group_atom_positions_rel: #we have relative positions + elif group_atom_positions_rel: # we have relative positions # TODO: check if film or 1D calc, because this is not allowed! I guess for atom in group_atom_positions_rel: postion_r = atom.text.split() @@ -649,10 +696,10 @@ def get_structuredata_ncf(self): for i, pos in enumerate(postion_r): if '/' in pos: temppos = pos.split('/') - postion_r[i] = float(temppos[0])/float(temppos[1]) + postion_r[i] = float(temppos[0]) / float(temppos[1]) elif '*' in pos: temppos = pos.split('*') - postion_r[i] = float(temppos[0])*float(temppos[1]) + postion_r[i] = float(temppos[0]) * float(temppos[1]) else: postion_r[i] = float(pos) @@ -660,12 +707,11 @@ def get_structuredata_ncf(self): new_abs_pos = rel_to_abs(postion_r, cell) # append atom to StructureData - struc.append_atom( - position=new_abs_pos, - symbols=species_dict[current_species][species_attrib_element]) + struc.append_atom(position=new_abs_pos, + symbols=species_dict[current_species][species_attrib_element]) - elif group_atom_positions_film: # Do we support mixture always, or only in film case? - #either support or throw error + elif group_atom_positions_film: # Do we support mixture always, or only in film case? + # either support or throw error for atom in group_atom_positions_film: # film pos are rel rel abs, therefore only transform first two coordinates postion_f = atom.text.split() @@ -673,27 +719,26 @@ def get_structuredata_ncf(self): for i, pos in enumerate(postion_f): if '/' in pos: temppos = pos.split('/') - postion_f[i] = float(temppos[0])/float(temppos[1]) + postion_f[i] = float(temppos[0]) / float(temppos[1]) elif '*' in postion_f[i]: temppos = pos.split('*') - postion_f[i] = float(temppos[0])*float(temppos[1]) + postion_f[i] = float(temppos[0]) * float(temppos[1]) else: postion_f[i] = float(pos) # now transform to absolute Positions - postion_f[2] = postion_f[2]*BOHR_A + postion_f[2] = postion_f[2] * BOHR_A new_abs_pos = rel_to_abs_f(postion_f, cell) # append atom to StructureData - struc.append_atom( - position=new_abs_pos, - symbols=species_dict[current_species][species_attrib_element]) + struc.append_atom(position=new_abs_pos, + symbols=species_dict[current_species][species_attrib_element]) else: - print('I should never get here, 1D not supported yet, ' - 'I only know relPos, absPos, filmPos') - #TODO throw error + # TODO throw error + print('I should never get here, 1D not supported yet, ' 'I only know relPos, absPos, filmPos') + # TODO throw error # TODO DATA-DATA links are not wanted, you might want to use a cf instead #struc.add_link_from(self, label='self.structure', link_type=LinkType.CREATE) - #label='self.structure' - #return {label : struc} + # label='self.structure' + # return {label : struc} return struc @cf @@ -708,8 +753,6 @@ def get_structuredata(self): """ return self.get_structuredata_ncf() - - def get_kpointsdata_ncf(self): """ This routine returns an AiiDA :class:`~aiida.orm.KpointsData` type produced from the @@ -720,17 +763,16 @@ def get_kpointsdata_ncf(self): """ from aiida.orm import KpointsData - - #HINT, TODO:? in this routine, the 'cell' you might get in an other way - #exp: StructureData.cell, but for this you have to make a structureData Node, + # HINT, TODO:? in this routine, the 'cell' you might get in an other way + # exp: StructureData.cell, but for this you have to make a structureData Node, # which might take more time for structures with lots of atoms. # then just parsing the cell from the inp.xml - #as in the routine get_structureData + # as in the routine get_structureData - #Disclaimer: this routine needs some xpath expressions. - #these are hardcoded here, therefore maintainance might be needed, + # Disclaimer: this routine needs some xpath expressions. + # these are hardcoded here, therefore maintainance might be needed, # if you want to circumvent this, you have - #to get all the paths from somewhere. + # to get all the paths from somewhere. ####### # all hardcoded xpaths used and attributes names: @@ -754,13 +796,13 @@ def get_kpointsdata_ncf(self): return False # else read in inpxml - inpxmlfile = self.open(key='inp.xml') - if self._schema_file_path: # Schema there, parse with schema + if self._schema_file_path: # Schema there, parse with schema xmlschema_doc = etree.parse(self._schema_file_path) xmlschema = etree.XMLSchema(xmlschema_doc) - parser = etree.XMLParser(attribute_defaults=True) - tree = etree.parse(inpxmlfile, parser) + parser = etree.XMLParser(attribute_defaults=True, encoding='utf-8') + with self.open(path='inp.xml', mode='r') as inpxmlfile: + tree = etree.parse(inpxmlfile, parser) tree.xinclude() # remove comments from inp.xml comments = tree.xpath('//comment()') @@ -768,51 +810,51 @@ def get_kpointsdata_ncf(self): p = c.getparent() p.remove(c) if not xmlschema.validate(tree): - raise ValueError("Input file is not validated against the schema.") - else: #schema not there, parse without + raise ValueError('Input file is not validated against the schema.') + else: # schema not there, parse without print('parsing inp.xml without XMLSchema') - tree = etree.parse(inpxmlfile) + with self.open(path='inp.xml', mode='r') as inpxmlfile: + tree = etree.parse(inpxmlfile) tree.xinclude() # remove comments from inp.xml comments = tree.xpath('//comment()') for c in comments: p = c.getparent() p.remove(c) - inpxmlfile.close() root = tree.getroot() # get cell matrix from inp.xml cell = None - row1 = root.xpath(bravaismatrix_bulk_xpath + row1_tag_name)#[0].text.split() + row1 = root.xpath(bravaismatrix_bulk_xpath + row1_tag_name) # [0].text.split() - if row1: #bulk calculation + if row1: # bulk calculation row1 = row1[0].text.split() row2 = root.xpath(bravaismatrix_bulk_xpath + row2_tag_name)[0].text.split() row3 = root.xpath(bravaismatrix_bulk_xpath + row3_tag_name)[0].text.split() # TODO? allow math? for i, cor in enumerate(row1): - row1[i] = float(cor)*BOHR_A + row1[i] = float(cor) * BOHR_A for i, cor in enumerate(row2): - row2[i] = float(cor)*BOHR_A + row2[i] = float(cor) * BOHR_A for i, cor in enumerate(row3): - row3[i] = float(cor)*BOHR_A + row3[i] = float(cor) * BOHR_A cell = [row1, row2, row3] - #set boundary conditions + # set boundary conditions pbc1 = [True, True, True] elif root.xpath(bravaismatrix_film_xpath + row1_tag_name): - #film calculation + # film calculation row1 = root.xpath(bravaismatrix_film_xpath + row1_tag_name)[0].text.split() row2 = root.xpath(bravaismatrix_film_xpath + row2_tag_name)[0].text.split() row3 = root.xpath(bravaismatrix_film_xpath + row3_tag_name)[0].text.split() for i, cor in enumerate(row1): - row1[i] = float(cor)*BOHR_A + row1[i] = float(cor) * BOHR_A for i, cor in enumerate(row2): - row2[i] = float(cor)*BOHR_A + row2[i] = float(cor) * BOHR_A for i, cor in enumerate(row3): - row3[i] = float(cor)*BOHR_A - #row3 = [0, 0, 0]#? TODO:what has it to be in this case? + row3[i] = float(cor) * BOHR_A + # row3 = [0, 0, 0]#? TODO:what has it to be in this case? cell = [row1, row2, row3] pbc1 = [True, True, False] @@ -835,8 +877,8 @@ def get_kpointsdata_ncf(self): for kpoint in kpoints: kpoint_pos = kpoint.text.split() for i, kval in enumerate(kpoint_pos): - kpoint_pos[i] = float(kval)/float(posscale[0]) - kpoint_weight = float(kpoint.get(kpoint_attrib_weight))/float(weightscale[0]) + kpoint_pos[i] = float(kval) / float(posscale[0]) + kpoint_weight = float(kpoint.get(kpoint_attrib_weight)) / float(weightscale[0]) kpoints_pos.append(kpoint_pos) kpoints_weight.append(kpoint_weight) totalw = 0 @@ -849,13 +891,12 @@ def get_kpointsdata_ncf(self): kps.set_kpoints(kpoints_pos, cartesian=False, weights=kpoints_weight) #kps.add_link_from(self, label='fleurinp.kpts', link_type=LinkType.CREATE) kps.label = 'fleurinp.kpts' - #return {label: kps} + # return {label: kps} return kps - else: # TODO parser other kpoints formats, if they fit in an AiiDA node + else: # TODO parser other kpoints formats, if they fit in an AiiDA node print('No kpoint list in inp.xml') return None - @cf def get_kpointsdata(self): """ @@ -868,7 +909,6 @@ def get_kpointsdata(self): return self.get_kpointsdata_ncf() - def get_parameterdata_ncf(self): """ This routine returns an AiiDA :class:`~aiida.orm.Dict` type produced from the ``inp.xml`` @@ -884,12 +924,10 @@ def get_parameterdata_ncf(self): return False # read in inpxml - inpxmlfile = self.open(key='inp.xml', mode='r') - new_parameters = get_inpgen_paranode_from_xml(etree.parse(inpxmlfile)) - inpxmlfile.close() # I don’t like this + with self.open(path='inp.xml', mode='r') as inpxmlfile: + new_parameters = get_inpgen_paranode_from_xml(etree.parse(inpxmlfile)) return new_parameters - # Is there a way to give self to calcfunctions? @staticmethod @cf @@ -942,27 +980,27 @@ def set_kpointsdata(self, fleurinp_orgi, KpointsDataNode): # add new inp.xml to fleurinpdata if not isinstance(KpointsDataNode, KpointsData): - raise InputValidationError( - "The node given is not a valid KpointsData node.") + raise InputValidationError('The node given is not a valid KpointsData node.') if 'inp.xml' in fleurinp.files: # read in inpxml - inpxmlfile = fleurinp.open(key='inp.xml') - if fleurinp._schema_file_path: # Schema there, parse with schema + if fleurinp._schema_file_path: # Schema there, parse with schema xmlschema_doc = etree.parse(fleurinp._schema_file_path) xmlschema = etree.XMLSchema(xmlschema_doc) - parser = etree.XMLParser(schema=xmlschema, attribute_defaults=True, - remove_blank_text=True) - tree = etree.parse(inpxmlfile, parser) - else: #schema not there, parse without + parser = etree.XMLParser(schema=xmlschema, + attribute_defaults=True, + remove_blank_text=True, + encoding='utf-8') + with fleurinp.open(path='inp.xml', mode='r') as inpxmlfile: + tree = etree.parse(inpxmlfile, parser) + else: # schema not there, parse without print('parsing inp.xml without XMLSchema') - parser = etree.XMLParser(attribute_defaults=True, remove_blank_text=True) - tree = etree.parse(inpxmlfile, parser) - inpxmlfile.close() + parser = etree.XMLParser(attribute_defaults=True, remove_blank_text=True, encoding='utf-8') + with self.open(path='inp.xml', mode='r') as inpxmlfile: + tree = etree.parse(inpxmlfile, parser) #root = tree.getroot() else: - raise InputValidationError( - "No inp.xml file yet specified, to add kpoints to.") + raise InputValidationError('No inp.xml file yet specified, to add kpoints to.') #cell_k = KpointsDataNode.cell @@ -976,26 +1014,25 @@ def set_kpointsdata(self, fleurinp_orgi, KpointsDataNode): totalw = totalw + weight #weightscale = totalw - new_kpo = etree.Element('kPointList', posScale="1.000", weightScale="1.0", count="{}".format(nkpts)) + new_kpo = etree.Element('kPointList', posScale='1.000', weightScale='1.0', count='{}'.format(nkpts)) for i, kpos in enumerate(kpoint_list[0]): - new_k = etree.Element('kPoint', weight="{}".format(kpoint_list[1][i])) - new_k.text = "{} {} {}".format(kpos[0], kpos[1], kpos[2]) + new_k = etree.Element('kPoint', weight='{}'.format(kpoint_list[1][i])) + new_k.text = '{} {} {}'.format(kpos[0], kpos[1], kpos[2]) new_kpo.append(new_k) new_tree = replace_tag(tree, kpointlist_xpath, new_kpo) - #use _write_new_fleur_xmlinp_file(fleurinp, inp_file_xmltree, fleur_change_dic): + # use _write_new_fleur_xmlinp_file(fleurinp, inp_file_xmltree, fleur_change_dic): - #TODO this should be sourced out to other methods. + # TODO this should be sourced out to other methods. # somehow directly writing inp.xml does not work, create new one - inpxmlfile = os.path.join( - fleurinp._get_folder_pathsubfolder.abspath, 'temp_inp.xml') + inpxmlfile = os.path.join(fleurinp._get_folder_pathsubfolder.abspath, 'temp_inp.xml') # write new inp.xml, schema evaluation will be done when the file gets added new_tree.write(inpxmlfile, pretty_print=True) print(('wrote tree to' + str(inpxmlfile))) # delete old inp.xml file, not needed anymore - #TODO maybe do some checks before + # TODO maybe do some checks before fleurinp.del_file('inp.xml') # now the new inp.xml file is added and with that the inpxml_dict will @@ -1017,29 +1054,27 @@ def get_tag(self, xpath): if 'inp.xml' in self.files: # read in inpxml - inpxmlfile = self.open(key='inp.xml', mode='r') - if self._schema_file_path: # Schema there, parse with schema + if self._schema_file_path: # Schema there, parse with schema #xmlschema_doc = etree.parse(self._schema_file_path) #xmlschema = etree.XMLSchema(xmlschema_doc) #parser = etree.XMLParser(schema=xmlschema, attribute_defaults=True) - tree = etree.parse(inpxmlfile)#, parser) - else: #schema not there, parse without + with self.open(path='inp.xml', mode='r') as inpxmlfile: + tree = etree.parse(inpxmlfile) # , parser) + else: # schema not there, parse without print('parsing inp.xml without XMLSchema') - tree = etree.parse(inpxmlfile) - inpxmlfile.close() + with self.open(path='inp.xml', mode='r') as inpxmlfile: + tree = etree.parse(inpxmlfile) root = tree.getroot() else: - raise InputValidationError( - "No inp.xml file yet specified, to get a tag from") + raise InputValidationError('No inp.xml file yet specified, to get a tag from') try: return_value = root.xpath(xpath) except etree.XPathEvalError: - raise InputValidationError( - 'There was a XpathEvalError on the xpath: {} \n Either it does ' - 'not exist, or something is wrong with the expression.' - ''.format(xpath)) - return [] + raise InputValidationError('There was a XpathEvalError on the xpath: {} \n Either it does ' + 'not exist, or something is wrong with the expression.' + ''.format(xpath)) + if len(return_value) == 1: return return_value else: diff --git a/aiida_fleur/data/fleurinpmodifier.py b/aiida_fleur/data/fleurinpmodifier.py index ab201419d..1352bbab2 100644 --- a/aiida_fleur/data/fleurinpmodifier.py +++ b/aiida_fleur/data/fleurinpmodifier.py @@ -35,71 +35,11 @@ def __init__(self, original): """ Initiation of FleurinpModifier. """ - assert isinstance(original, FleurinpData), "Wrong AiiDA data type" + assert isinstance(original, FleurinpData), 'Wrong AiiDA data type' self._original = original self._tasks = [] - @staticmethod - @cf - def modify_fleurinpdata(original, modifications): - """ - A CalcFunction that performs the modification of the given FleurinpData and stores - the result in a database. - - :param original: a FleurinpData to be modified - :param modifications: a python dictionary of modifications in the form of {'task': ...} - - :returns new_fleurinp: a modified FleurinpData that is stored in a database - """ - - # copy - # get schema - # read in inp.xml - # add modifications - # validate - # save inp.xml - # store new fleurinp (copy) - from aiida_fleur.tools.xml_util import clear_xml - - new_fleurinp = original.clone() - # TODO test if file is there! - inpxmlfile = new_fleurinp.open(key='inp.xml') - modification_tasks = modifications.get_dict()['tasks'] - - xmlschema_doc = etree.parse(new_fleurinp._schema_file_path) - xmlschema = etree.XMLSchema(xmlschema_doc) - parser = etree.XMLParser(attribute_defaults=True, remove_blank_text=True) - - tree = etree.parse(inpxmlfile, parser) - - try: - xmlschema.assertValid(clear_xml(tree)) - except etree.DocumentInvalid: - print("Input file is not validated against the schema") - raise - - new_fleurtree = FleurinpModifier.apply_modifications(fleurinp_tree_copy=tree, - modification_tasks=modification_tasks) - - # To include object store storage this prob has to be done differently - - inpxmlfile_new = inpxmlfile.name.replace('inp.xml', 'temp_inp.xml') - inpxmlfile.close() - - new_fleurtree.write(inpxmlfile_new, pretty_print=True) - - new_fleurinp.del_file('inp.xml') - new_fleurinp._add_path(str(inpxmlfile_new), 'inp.xml') - os.remove(inpxmlfile_new) - - # default label and description - new_fleurinp.label = 'mod_fleurinp' - new_fleurinp.description = ('Fleurinpdata with modifications' - ' (see inputs of modify_fleurinpdata)') - - return new_fleurinp - @staticmethod def apply_modifications(fleurinp_tree_copy, modification_tasks, schema_tree=None): """ @@ -119,25 +59,17 @@ def apply_modifications(fleurinp_tree_copy, modification_tasks, schema_tree=None from aiida_fleur.tools.xml_util import delete_att, set_species from aiida_fleur.tools.xml_util import change_atomgr_att, add_num_to_att from aiida_fleur.tools.xml_util import change_atomgr_att_label, set_species_label - from aiida_fleur.tools.xml_util import set_inpchanges, set_nkpts, shift_value + from aiida_fleur.tools.xml_util import set_inpchanges, set_nkpts, set_kpath, shift_value from aiida_fleur.tools.xml_util import shift_value_species_label from aiida_fleur.tools.xml_util import clear_xml - def xml_set_attribv_occ1(fleurinp_tree_copy, xpathn, attributename, - attribv, occ=None, create=False): + def xml_set_attribv_occ1(fleurinp_tree_copy, xpathn, attributename, attribv, occ=None, create=False): if occ is None: occ = [0] - xml_set_attribv_occ( - fleurinp_tree_copy, - xpathn, - attributename, - attribv, - occ=occ, - create=create) + xml_set_attribv_occ(fleurinp_tree_copy, xpathn, attributename, attribv, occ=occ, create=create) return fleurinp_tree_copy - def xml_set_first_attribv1(fleurinp_tree_copy, xpathn, - attributename, attribv, create=False): + def xml_set_first_attribv1(fleurinp_tree_copy, xpathn, attributename, attribv, create=False): xml_set_first_attribv(fleurinp_tree_copy, xpathn, attributename, attribv, create=create) return fleurinp_tree_copy @@ -174,40 +106,28 @@ def replace_tag1(fleurinp_tree_copy, xpath, newelement): return fleurinp_tree_copy def set_species1(fleurinp_tree_copy, species_name, attributedict, create=False): - fleurinp_tree_copy = set_species( - fleurinp_tree_copy, species_name, attributedict, create=create) + fleurinp_tree_copy = set_species(fleurinp_tree_copy, species_name, attributedict, create=create) return fleurinp_tree_copy def set_species2(fleurinp_tree_copy, at_label, attributedict, create=False): - fleurinp_tree_copy = set_species_label( - fleurinp_tree_copy, at_label, attributedict, create=create) + fleurinp_tree_copy = set_species_label(fleurinp_tree_copy, at_label, attributedict, create=create) return fleurinp_tree_copy - def change_atomgr_att1(fleurinp_tree_copy, attributedict, - position=None, species=None, create=False): + def change_atomgr_att1(fleurinp_tree_copy, attributedict, position=None, species=None, create=False): fleurinp_tree_copy = change_atomgr_att(fleurinp_tree_copy, attributedict, position=position, species=species) return fleurinp_tree_copy - def change_atomgr_att2(fleurinp_tree_copy, attributedict, - atom_label, create=False): - fleurinp_tree_copy = change_atomgr_att_label(fleurinp_tree_copy, - attributedict, - at_label=atom_label) + def change_atomgr_att2(fleurinp_tree_copy, attributedict, atom_label, create=False): + fleurinp_tree_copy = change_atomgr_att_label(fleurinp_tree_copy, attributedict, at_label=atom_label) return fleurinp_tree_copy - def add_num_to_att1(fleurinp_tree_copy, xpathn, attributename, - set_val, mode='abs', occ=None): + def add_num_to_att1(fleurinp_tree_copy, xpathn, attributename, set_val, mode='abs', occ=None): if occ is None: occ = [0] - fleurinp_tree_copy = add_num_to_att(fleurinp_tree_copy, - xpathn, - attributename, - set_val, - mode=mode, - occ=occ) + fleurinp_tree_copy = add_num_to_att(fleurinp_tree_copy, xpathn, attributename, set_val, mode=mode, occ=occ) return fleurinp_tree_copy def set_inpchanges1(fleurinp_tree_copy, change_dict): @@ -219,14 +139,17 @@ def shift_value1(fleurinp_tree_copy, change_dict, mode): return fleurinp_tree_copy def shift_value_species_label1(fleurinp_tree_copy, label, att_name, value, mode): - fleurinp_tree_copy = shift_value_species_label( - fleurinp_tree_copy, label, att_name, value, mode) + fleurinp_tree_copy = shift_value_species_label(fleurinp_tree_copy, label, att_name, value, mode) return fleurinp_tree_copy def set_nkpts1(fleurinp_tree_copy, count, gamma): fleurinp_tree_copy = set_nkpts(fleurinp_tree_copy, count, gamma) return fleurinp_tree_copy + def set_kpath1(fleurinp_tree_copy, kpath, count, gamma): + fleurinp_tree_copy = set_kpath(fleurinp_tree_copy, kpath, count, gamma) + return fleurinp_tree_copy + actions = { 'xml_set_attribv_occ': xml_set_attribv_occ1, 'xml_set_first_attribv': xml_set_first_attribv1, @@ -246,8 +169,8 @@ def set_nkpts1(fleurinp_tree_copy, count, gamma): 'shift_value': shift_value1, 'shift_value_species_label': shift_value_species_label1, 'set_nkpts': set_nkpts1, + 'set_kpath': set_kpath1, 'add_num_to_att': add_num_to_att1 - } workingtree = fleurinp_tree_copy @@ -259,7 +182,7 @@ def set_nkpts1(fleurinp_tree_copy, count, gamma): try: action = actions[task[0]] except KeyError: - raise ValueError("Unknown task {}".format(task[0])) + raise ValueError('Unknown task {}'.format(task[0])) workingtree = action(workingtree, *task[1:]) @@ -267,7 +190,7 @@ def set_nkpts1(fleurinp_tree_copy, count, gamma): try: xmlschema.assertValid(clear_xml(workingtree)) except etree.DocumentInvalid: - print("changes were not valid: {}".format(modification_tasks)) + print('changes were not valid: {}'.format(modification_tasks)) raise return workingtree @@ -296,7 +219,6 @@ def get_avail_actions(self): 'shift_value_species_label': self.shift_value_species_label, 'set_nkpts': self.set_nkpts, 'add_num_to_att': self.add_num_to_att - } return outside_actions @@ -506,6 +428,13 @@ def set_nkpts(self, count, gamma='F'): """ self._tasks.append(('set_nkpts', count, gamma)) + def set_kpath(self, kpath, count, gamma='F'): + """ + Appends a :py:func:`~aiida_fleur.tools.xml_util.set_kpath()` to + the list of tasks that will be done on the FleurinpData. + """ + self._tasks.append(('set_kpath', kpath, count, gamma)) + def add_num_to_att(self, xpathn, attributename, set_val, mode='abs', occ=None): """ Appends a :py:func:`~aiida_fleur.tools.xml_util.add_num_to_att()` to @@ -558,7 +487,7 @@ def show(self, display=True, validate=False): if validate: tree = self.validate() else: - with self._original.open(key='inp.xml') as inpxmlfile: + with self._original.open(path='inp.xml') as inpxmlfile: tree = etree.parse(inpxmlfile) tree = self.apply_modifications(tree, self._tasks) @@ -583,27 +512,84 @@ def freeze(self): :return: stored :class:`~aiida_fleur.data.fleurinp.FleurinpData` with applied changes """ - modifications = DataFactory("dict")(dict={"tasks": self._tasks}) + modifications = DataFactory('dict')(dict={'tasks': self._tasks}) modifications.description = 'Fleurinpmodifier Tasks and inputs of these.' modifications.label = 'Fleurinpdata modifications' # This runs in a inline calculation to keep provenance - out = self.modify_fleurinpdata( - original=self._original, - modifications=modifications, - metadata={'label': 'fleurinp modifier', - 'description': 'This calcfunction modified an Fleurinpdataobject'}) + out = modify_fleurinpdata(original=self._original, + modifications=modifications, + metadata={ + 'label': 'fleurinp modifier', + 'description': 'This calcfunction modified an Fleurinpdataobject' + }) return out - def undo(self, all=False): + def undo(self, revert_all=False): """ Cancels the last change or all of them - :param all: set True if need to cancel all the changes, False if the last one. + :param revert_all: set True if need to cancel all the changes, False if the last one. """ - if all: + if revert_all: self._tasks = [] else: if self._tasks: self._tasks.pop() #del self._tasks[-1] return self._tasks + + +@cf +def modify_fleurinpdata(original, modifications): + """ + A CalcFunction that performs the modification of the given FleurinpData and stores + the result in a database. + + :param original: a FleurinpData to be modified + :param modifications: a python dictionary of modifications in the form of {'task': ...} + + :returns new_fleurinp: a modified FleurinpData that is stored in a database + """ + + # copy + # get schema + # read in inp.xml + # add modifications + # validate + # save inp.xml + # store new fleurinp (copy) + from aiida_fleur.tools.xml_util import clear_xml + + new_fleurinp = original.clone() + modification_tasks = modifications.get_dict()['tasks'] + + xmlschema_doc = etree.parse(new_fleurinp._schema_file_path) + xmlschema = etree.XMLSchema(xmlschema_doc) + parser = etree.XMLParser(attribute_defaults=True, remove_blank_text=True) + with new_fleurinp.open(path='inp.xml', mode='r') as inpxmlfile: + tree = etree.parse(inpxmlfile, parser) + + try: + xmlschema.assertValid(clear_xml(tree)) + except etree.DocumentInvalid: + print('Input file is not validated against the schema') + raise + + new_fleurtree = FleurinpModifier.apply_modifications(fleurinp_tree_copy=tree, modification_tasks=modification_tasks) + + # To include object store storage this prob has to be done differently + + inpxmlfile_new = inpxmlfile.name.replace('inp.xml', 'temp_inp.xml') + inpxmlfile.close() + + new_fleurtree.write(inpxmlfile_new, pretty_print=True) + + new_fleurinp.del_file('inp.xml') + new_fleurinp._add_path(str(inpxmlfile_new), 'inp.xml') + os.remove(inpxmlfile_new) + + # default label and description + new_fleurinp.label = 'mod_fleurinp' + new_fleurinp.description = 'Fleurinpdata with modifications (see inputs of modify_fleurinpdata)' + + return new_fleurinp diff --git a/aiida_fleur/fleur_schema/input/0.32/FleurInputSchema.xsd b/aiida_fleur/fleur_schema/input/0.32/FleurInputSchema.xsd new file mode 100644 index 000000000..0493f484c --- /dev/null +++ b/aiida_fleur/fleur_schema/input/0.32/FleurInputSchema.xsd @@ -0,0 +1,1226 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/aiida_fleur/fleur_schema/input/0.33/FleurInputSchema.xsd b/aiida_fleur/fleur_schema/input/0.33/FleurInputSchema.xsd new file mode 100644 index 000000000..6a85750e1 --- /dev/null +++ b/aiida_fleur/fleur_schema/input/0.33/FleurInputSchema.xsd @@ -0,0 +1,1226 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/aiida_fleur/fleur_schema/schemafile_index.py b/aiida_fleur/fleur_schema/schemafile_index.py index bbe1f4f60..a2e0e0be8 100644 --- a/aiida_fleur/fleur_schema/schemafile_index.py +++ b/aiida_fleur/fleur_schema/schemafile_index.py @@ -17,10 +17,11 @@ import os # any additional schema file add here, plugin will find them -SCHEMA_FILE_PATHS = ['./input/0.27/FleurInputSchema.xsd', './input/0.28/FleurInputSchema.xsd', - './input/0.29/FleurInputSchema.xsd', './input/0.30/FleurInputSchema.xsd', - '.'] - +SCHEMA_FILE_PATHS = [ + './input/0.27/FleurInputSchema.xsd', './input/0.28/FleurInputSchema.xsd', './input/0.29/FleurInputSchema.xsd', + './input/0.30/FleurInputSchema.xsd', './input/0.31/FleurInputSchema.xsd', './input/0.32/FleurInputSchema.xsd', + './input/0.33/FleurInputSchema.xsd', '.' +] PACKAGE_DIRECTORY = os.path.dirname(os.path.abspath(__file__)) @@ -36,6 +37,7 @@ def get_schema_paths(): schema_paths.append(path) return schema_paths + def get_internal_search_paths(): """ returns all abs paths to dirs where schema files might be diff --git a/aiida_fleur/parsers/__init__.py b/aiida_fleur/parsers/__init__.py index cc1a3ede3..dd1e174dc 100644 --- a/aiida_fleur/parsers/__init__.py +++ b/aiida_fleur/parsers/__init__.py @@ -16,6 +16,7 @@ from __future__ import absolute_import from aiida.common.exceptions import OutputParsingError + #mainly created this Outputparsing error, that the user sees, that it comes from parsing a fleur calculation. class FleurOutputParsingError(OutputParsingError): pass diff --git a/aiida_fleur/parsers/fleur.py b/aiida_fleur/parsers/fleur.py index 7f1eab118..718be66ca 100644 --- a/aiida_fleur/parsers/fleur.py +++ b/aiida_fleur/parsers/fleur.py @@ -92,17 +92,16 @@ def parse(self, **kwargs): try: output_folder = self.retrieved except NotExistent: - self.logger.error("No retrieved folder found") + self.logger.error('No retrieved folder found') return self.exit_codes.ERROR_NO_RETRIEVED_FOLDER # check what is inside the folder list_of_files = output_folder.list_object_names() - self.logger.info("file list {}".format(list_of_files)) + self.logger.info('file list {}'.format(list_of_files)) # has output xml file, otherwise error if FleurCalculation._OUTXML_FILE_NAME not in list_of_files: - self.logger.error( - "XML out not found '{}'".format(FleurCalculation._OUTXML_FILE_NAME)) + self.logger.error("XML out not found '{}'".format(FleurCalculation._OUTXML_FILE_NAME)) return self.exit_codes.ERROR_NO_OUTXML else: has_xml_outfile = True @@ -110,9 +109,8 @@ def parse(self, **kwargs): # check if all files expected are there for the calculation for file in should_retrieve: if file not in list_of_files: - self.logger.warning( - "'{}' file not found in retrived folder, it" - " was probably not created by fleur".format(file)) + self.logger.warning("'{}' file not found in retrived folder, it" + ' was probably not created by fleur'.format(file)) # check if something was written to the error file if FleurCalculation._ERROR_FILE_NAME in list_of_files: @@ -122,57 +120,71 @@ def parse(self, **kwargs): with output_folder.open(errorfile, 'r') as efile: error_file_lines = efile.read() # Note: read(), not readlines() except IOError: - self.logger.error( - "Failed to open error file: {}.".format(errorfile)) + self.logger.error('Failed to open error file: {}.'.format(errorfile)) return self.exit_codes.ERROR_OPENING_OUTPUTS if error_file_lines: + if isinstance(error_file_lines, type(b'')): + error_file_lines = error_file_lines.replace(b'\x00', b' ') + else: + error_file_lines = error_file_lines.replace('\x00', ' ') if 'Run finished successfully' not in error_file_lines: - self.logger.warning( - 'The following was written into std error and piped to {}' - ' : \n {}'.format(errorfile, error_file_lines)) - self.logger.error('FLEUR calculation did not finish' - ' successfully.') - - mpiprocs = self.node.get_attribute('resources').get( - 'num_mpiprocs_per_machine', 1) - - with output_folder.open('out.xml', 'r') as out_file: #lazy out.xml parsing - outlines = out_file.readline() - line_avail = re.findall(r' 0.93: + mem_kb_avail = 1.0 + self.logger.info('Did not manage to find memory available info.') + else: + usage_json = FleurCalculation._USAGE_FILE_NAME + if usage_json in list_of_files: + with output_folder.open(usage_json, 'r') as us_file: + usage = json.load(us_file) + kb_used = usage['data']['VmPeak'] + else: + try: + line_used = re.findall(r'used.+', error_file_lines)[0] + kb_used = int(re.findall(r'\d+', line_used)[2]) + except IndexError: + self.logger.info('Did not manage to find memory usage info.') + + if kb_used * mpiprocs / mem_kb_avail > 0.93 or 'cgroup out-of-memory handler' in error_file_lines: return self.exit_codes.ERROR_NOT_ENOUGH_MEMORY elif 'Atom spills out into vacuum during relaxation' in error_file_lines: return self.exit_codes.ERROR_VACUUM_SPILL_RELAX elif 'Error checking M.T. radii' in error_file_lines: return self.exit_codes.ERROR_MT_RADII elif 'Overlapping MT-spheres during relaxation: ' in error_file_lines: - over_indices = re.findall( - r'relaxation: +\S+ +\S+ +\S+', error_file_lines)[0].split()[1:] - error_params = {'error_name': 'MT_OVERLAP_RELAX', - 'description': ('This output node contains information' - 'about FLEUR error'), - 'overlapped_indices': over_indices[:2], - 'overlaping_value': over_indices[2]} + overlap_line = re.findall(r'\S+ +\S+ olap: +\S+', error_file_lines)[0].split() + with output_folder.open('relax.xml', 'r') as rlx: + relax_dict = parse_relax_file(rlx) + it_number = len(relax_dict['energies']) + 1 # relax.xml was not updated + error_params = { + 'error_name': 'MT_OVERLAP_RELAX', + 'description': ('This output node contains information' + 'about FLEUR error'), + 'overlapped_indices': overlap_line[:2], + 'overlaping_value': overlap_line[3], + 'iteration_number': it_number + } link_name = self.get_linkname_outparams() error_params = Dict(dict=error_params) self.out('error_params', error_params) return self.exit_codes.ERROR_MT_RADII_RELAX + elif 'parent_folder' in calc.inputs: + if 'fleurinpdata' in calc.inputs: + if 'relax.xml' in calc.inputs.fleurinpdata.files: + return self.exit_codes.ERROR_DROP_CDN else: return self.exit_codes.ERROR_FLEUR_CALC_FAILED @@ -183,39 +195,34 @@ def parse(self, **kwargs): # if a relax.xml was retrieved if FleurCalculation._RELAX_FILE_NAME in list_of_files: - self.logger.info("relax.xml file found in retrieved folder") + self.logger.info('relax.xml file found in retrieved folder') has_relax_file = True ####### Parse the files ######## if has_xml_outfile: # open output file - outxmlfile_opened = output_folder.open(FleurCalculation._OUTXML_FILE_NAME, 'r') - simpledata, complexdata, parser_info, success = parse_xmlout_file(outxmlfile_opened) - outxmlfile_opened.close() + with output_folder.open(FleurCalculation._OUTXML_FILE_NAME, 'r') as outxmlfile_opened: + simpledata, complexdata, parser_info, success = parse_xmlout_file(outxmlfile_opened) # Call routines for output node creation if not success: - self.logger.error( - 'Parsing of XML output file was not successfull.') + self.logger.error('Parsing of XML output file was not successfull.') return self.exit_codes.ERROR_XMLOUT_PARSING_FAILED elif simpledata: - outputdata = dict(list(simpledata.items()) + - list(parser_info.items())) - outputdata['CalcJob_uuid'] = self.node.uuid + outputdata = dict(list(simpledata.items()) + list(parser_info.items())) + #outputdata['CalcJob_uuid'] = self.node.uuid outxml_params = Dict(dict=outputdata) link_name = self.get_linkname_outparams() self.out(link_name, outxml_params) elif complexdata: - parameter_data = dict( - list(complexdata.items()) + list(parser_info.items())) - parameter_data['CalcJob_uuid'] = self.node.uuid + parameter_data = dict(list(complexdata.items()) + list(parser_info.items())) + #parameter_data['CalcJob_uuid'] = self.node.uuid outxml_params_complex = Dict(dict=parameter_data) link_name = self.get_linkname_outparams_complex() self.out(link_name, outxml_params_complex) else: - self.logger.error( - "Something went wrong, neither simpledata nor complexdata found") + self.logger.error('Something went wrong, neither simpledata nor complexdata found') parameter_data = dict(list(parser_info.items())) outxml_params = Dict(dict=parameter_data) link_name = self.get_linkname_outparams() @@ -230,8 +237,7 @@ def parse(self, **kwargs): with output_folder.open(dos_file, 'r') as dosf: dos_lines = dosf.read() # Note: read() and not readlines() except IOError: - self.logger.error( - 'Failed to open DOS file: {}.'.format(dos_file)) + self.logger.error('Failed to open DOS file: {}.'.format(dos_file)) return self.exit_codes.ERROR_OPENING_OUTPUTS dos_data = parse_dos_file(dos_lines) # , number_of_atom_types) @@ -245,8 +251,7 @@ def parse(self, **kwargs): with output_folder.open(band_file, 'r') as bandf: bands_lines = bandf.read() # Note: read() and not readlines() except IOError: - self.logger.error("Failed to open bandstructure file: {}." - "".format(band_file)) + self.logger.error('Failed to open bandstructure file: {}.' ''.format(band_file)) return self.exit_codes.ERROR_OPENING_OUTPUTS bands_data = parse_bands_file(bands_lines) @@ -285,14 +290,14 @@ def parse_xmlout_file(outxmlfile): with parsed data """ - from lxml import etree + #from lxml import etree - global parser_info_out + #global parser_info_out + # FIXME: This is global, look for a different way to do this, python logging? parser_info_out = {'parser_warnings': [], 'unparsed': []} - parser_version = '0.2beta' - parser_info_out['parser_info'] = 'AiiDA Fleur Parser v{}'.format( - parser_version) + parser_version = '0.3.0' + parser_info_out['parser_info'] = 'AiiDA Fleur Parser v{}'.format(parser_version) #parsed_data = {} successful = True @@ -304,8 +309,7 @@ def parse_xmlout_file(outxmlfile): tree = etree.parse(outxmlfile, parser) except etree.XMLSyntaxError: outfile_broken = True - parser_info_out['parser_warnings'].append( - 'The out.xml file is broken I try to repair it.') + parser_info_out['parser_warnings'].append('The out.xml file is broken I try to repair it.') if outfile_broken: # repair xmlfile and try to parse what is possible. @@ -313,9 +317,8 @@ def parse_xmlout_file(outxmlfile): try: tree = etree.parse(outxmlfile, parser) except etree.XMLSyntaxError: - parser_info_out['parser_warnings'].append( - 'Skipping the parsing of the xml file. ' - 'Repairing was not possible.') + parser_info_out['parser_warnings'].append('Skipping the parsing of the xml file. ' + 'Repairing was not possible.') parse_xml = False successful = False @@ -379,7 +382,7 @@ def parse_simplexmlout_file(root, outfile_broken): # (if modes (dos and co) maybe parse anyway if broken?) if outfile_broken and (n_iters >= 2): iteration_to_parse = iteration_nodes[-2] - parser_info_out['last_iteration_parsed'] = n_iters-2 + parser_info_out['last_iteration_parsed'] = n_iters - 2 elif outfile_broken and (n_iters == 1): iteration_to_parse = iteration_nodes[0] parser_info_out['last_iteration_parsed'] = n_iters @@ -387,9 +390,8 @@ def parse_simplexmlout_file(root, outfile_broken): iteration_to_parse = iteration_nodes[-1] else: # there was no iteration found. # only the starting charge density could be generated - parser_info_out['parser_warnings'].append( - 'There was no iteration found in the outfile, either just a ' - 'starting density was generated or something went wrong.') + parser_info_out['parser_warnings'].append('There was no iteration found in the outfile, either just a ' + 'starting density was generated or something went wrong.') data_exists = False iteration_to_parse = None @@ -414,9 +416,8 @@ def parse_simplexmlout_file(root, outfile_broken): # should they be lists or dicts? warnings = {'info': {}, 'debug': {}, 'warning': {}, 'error': {}} - simple_data['number_of_atoms'] = (len(eval_xpath2(root, relPos_xpath)) - + len(eval_xpath2(root, absPos_xpath)) - + len(eval_xpath2(root, filmPos_xpath))) + simple_data['number_of_atoms'] = (len(eval_xpath2(root, relPos_xpath)) + len(eval_xpath2(root, absPos_xpath)) + + len(eval_xpath2(root, filmPos_xpath))) simple_data['number_of_atom_types'] = len(eval_xpath2(root, atomstypes_xpath)) simple_data['number_of_iterations'] = n_iters simple_data['number_of_symmetries'] = len(eval_xpath2(root, symmetries_xpath)) @@ -429,12 +430,9 @@ def parse_simplexmlout_file(root, outfile_broken): title = str(title).strip() simple_data['title'] = title simple_data['creator_name'] = eval_xpath(root, creator_name_xpath) - simple_data['creator_target_architecture'] = eval_xpath( - root, creator_target_architecture_xpath) - simple_data['creator_target_structure'] = eval_xpath( - root, creator_target_structure_xpath) - simple_data['output_file_version'] = eval_xpath( - root, output_version_xpath) + simple_data['creator_target_architecture'] = eval_xpath(root, creator_target_architecture_xpath) + simple_data['creator_target_structure'] = eval_xpath(root, creator_target_structure_xpath) + simple_data['output_file_version'] = eval_xpath(root, output_version_xpath) # time # Maybe change the behavior if things could not be parsed... @@ -470,8 +468,8 @@ def parse_simplexmlout_file(root, outfile_broken): diff = date_e - date_s offset = diff.days * 86400 # ncores = 12 #TODO parse parallelization_Parameters - time = offset + (int(endtimes[0])-int(starttimes[0]))*60*60 + ( - int(endtimes[1])-int(starttimes[1]))*60 + int(endtimes[2]) - int(starttimes[2]) + time = offset + (int(endtimes[0]) - int(starttimes[0])) * 60 * 60 + ( + int(endtimes[1]) - int(starttimes[1])) * 60 + int(endtimes[2]) - int(starttimes[2]) simple_data['walltime'] = time simple_data['walltime_units'] = 'seconds' #simple_data['core_hours'] = time*ncores*1.0/3600 @@ -499,10 +497,9 @@ def eval_xpath(node, xpath): try: return_value = node.xpath(xpath) except etree.XPathEvalError: - parser_info_out['parser_warnings'].append( - 'There was a XpathEvalError on the xpath: {} \n Either it does ' - 'not exist, or something is wrong with the expression.' - ''.format(xpath)) + parser_info_out['parser_warnings'].append('There was a XpathEvalError on the xpath: {} \n Either it does ' + 'not exist, or something is wrong with the expression.' + ''.format(xpath)) return [] # or rather None? if len(return_value) == 1: return return_value[0] @@ -521,10 +518,9 @@ def eval_xpath2(node, xpath): try: return_value = node.xpath(xpath) except etree.XPathEvalError: - parser_info_out['parser_warnings'].append( - 'There was a XpathEvalError on the xpath: {} \n Either it does ' - 'not exist, or something is wrong with the expression.' - ''.format(xpath)) + parser_info_out['parser_warnings'].append('There was a XpathEvalError on the xpath: {} \n Either it does ' + 'not exist, or something is wrong with the expression.' + ''.format(xpath)) return [] return return_value @@ -541,16 +537,14 @@ def get_xml_attribute(node, attributename): if attrib_value: return attrib_value else: - parser_info_out['parser_warnings'].append( - 'Tried to get attribute: "{}" from element {}.\n ' - 'I received "{}", maybe the attribute does not exist' - ''.format(attributename, node, attrib_value)) + parser_info_out['parser_warnings'].append('Tried to get attribute: "{}" from element {}.\n ' + 'I received "{}", maybe the attribute does not exist' + ''.format(attributename, node, attrib_value)) return None else: # something doesn't work here, some nodes get through here - parser_info_out['parser_warnings'].append( - 'Can not get attributename: "{}" from node "{}", ' - 'because node is not an element of etree.' - ''.format(attributename, node)) + parser_info_out['parser_warnings'].append('Can not get attributename: "{}" from node "{}", ' + 'because node is not an element of etree.' + ''.format(attributename, node)) return None @@ -566,14 +560,12 @@ def convert_to_float(value_string): try: value = float(value_string) except TypeError: - parser_info_out['parser_warnings'].append( - 'Could not convert: "{}" to float, TypeError' - ''.format(value_string)) + parser_info_out['parser_warnings'].append('Could not convert: "{}" to float, TypeError' + ''.format(value_string)) return value_string, False except ValueError: - parser_info_out['parser_warnings'].append( - 'Could not convert: "{}" to float, ValueError' - ''.format(value_string)) + parser_info_out['parser_warnings'].append('Could not convert: "{}" to float, ValueError' + ''.format(value_string)) return value_string, False return value, True @@ -589,14 +581,12 @@ def convert_to_int(value_string): try: value = int(value_string) except TypeError: - parser_info_out['parser_warnings'].append( - 'Could not convert: "{}" to int, TypeError' - ''.format(value_string)) + parser_info_out['parser_warnings'].append('Could not convert: "{}" to int, TypeError' + ''.format(value_string)) return value_string, False except ValueError: - parser_info_out['parser_warnings'].append( - 'Could not convert: "{}" to int, ValueError' - ''.format(value_string)) + parser_info_out['parser_warnings'].append('Could not convert: "{}" to int, ValueError' + ''.format(value_string)) return value_string, False return value, True @@ -608,7 +598,7 @@ def convert_htr_to_ev(value): suc = False value_to_save, suc = convert_to_float(value) if suc: - return value_to_save*htr + return value_to_save * htr else: return value @@ -627,7 +617,6 @@ def parse_simple_outnode(iteration_node, fleurmode): ########## all xpaths (maintain this) ############ # (specifies where to find things in the out.xml) # - # density densityconvergence_xpath = 'densityConvergence' chargedensity_xpath = 'densityConvergence/chargeDensity' @@ -784,213 +773,150 @@ def write_simple_outnode(value, value_type, value_name, dict_out): if suc: dict_out[value_name] = value_to_save else: - parser_info_out['unparsed'].append( - {value_name: value, - 'iteration': get_xml_attribute(iteration_node, iteration_current_number_name)}) + parser_info_out['unparsed'].append({ + value_name: + value, + 'iteration': + get_xml_attribute(iteration_node, iteration_current_number_name) + }) if eval_xpath(iteration_node, mae_force_theta_xpath) != []: # extract MAE force theorem parameters - mae_force_theta = eval_xpath2( - iteration_node, mae_force_theta_xpath) - write_simple_outnode( - mae_force_theta, 'list_floats', 'mae_force_theta', simple_data) + mae_force_theta = eval_xpath2(iteration_node, mae_force_theta_xpath) + write_simple_outnode(mae_force_theta, 'list_floats', 'mae_force_theta', simple_data) - mae_force_evsum = eval_xpath2( - iteration_node, mae_force_evsum_xpath) - write_simple_outnode( - mae_force_evsum, 'list_floats', 'mae_force_evSum', simple_data) + mae_force_evsum = eval_xpath2(iteration_node, mae_force_evsum_xpath) + write_simple_outnode(mae_force_evsum, 'list_floats', 'mae_force_evSum', simple_data) mae_force_phi = eval_xpath2(iteration_node, mae_force_phi_xpath) - write_simple_outnode( - mae_force_phi, 'list_floats', 'mae_force_phi', simple_data) + write_simple_outnode(mae_force_phi, 'list_floats', 'mae_force_phi', simple_data) units_e = eval_xpath2(iteration_node, mae_force_energ_units_xpath) - write_simple_outnode( - units_e[0], 'str', 'energy_units', simple_data) + write_simple_outnode(units_e[0], 'str', 'energy_units', simple_data) elif eval_xpath(iteration_node, spst_force_xpath) != []: # extract Spin spiral dispersion force theorem parameters spst_force_q = eval_xpath2(iteration_node, spst_force_q_xpath) - write_simple_outnode( - spst_force_q, 'list_floats', 'spst_force_q', simple_data) + write_simple_outnode(spst_force_q, 'list_floats', 'spst_force_q', simple_data) - spst_force_evsum = eval_xpath2( - iteration_node, spst_force_evsum_xpath) - write_simple_outnode( - spst_force_evsum, 'list_floats', 'spst_force_evSum', simple_data) + spst_force_evsum = eval_xpath2(iteration_node, spst_force_evsum_xpath) + write_simple_outnode(spst_force_evsum, 'list_floats', 'spst_force_evSum', simple_data) units_e = eval_xpath2(iteration_node, spst_force_energ_units_xpath) - write_simple_outnode( - units_e[0], 'str', 'energy_units', simple_data) + write_simple_outnode(units_e[0], 'str', 'energy_units', simple_data) elif eval_xpath(iteration_node, dmi_force_xpath) != []: # extract DMI force theorem parameters dmi_force_q = eval_xpath2(iteration_node, dmi_force_q_xpath) - write_simple_outnode( - dmi_force_q, 'list_ints', 'dmi_force_q', simple_data) + write_simple_outnode(dmi_force_q, 'list_ints', 'dmi_force_q', simple_data) - dmi_force_evsum = eval_xpath2( - iteration_node, dmi_force_evsum_xpath) - write_simple_outnode( - dmi_force_evsum, 'list_floats', 'dmi_force_evSum', simple_data) + dmi_force_evsum = eval_xpath2(iteration_node, dmi_force_evsum_xpath) + write_simple_outnode(dmi_force_evsum, 'list_floats', 'dmi_force_evSum', simple_data) - dmi_force_theta = eval_xpath2( - iteration_node, dmi_force_theta_xpath) - write_simple_outnode( - dmi_force_theta, 'list_floats', 'dmi_force_theta', simple_data) + dmi_force_theta = eval_xpath2(iteration_node, dmi_force_theta_xpath) + write_simple_outnode(dmi_force_theta, 'list_floats', 'dmi_force_theta', simple_data) dmi_force_phi = eval_xpath2(iteration_node, dmi_force_phi_xpath) - write_simple_outnode( - dmi_force_phi, 'list_floats', 'dmi_force_phi', simple_data) + write_simple_outnode(dmi_force_phi, 'list_floats', 'dmi_force_phi', simple_data) - dmi_force_angles = eval_xpath( - iteration_node, dmi_force_angles_xpath) - write_simple_outnode( - dmi_force_angles, 'int', 'dmi_force_angles', simple_data) + dmi_force_angles = eval_xpath(iteration_node, dmi_force_angles_xpath) + write_simple_outnode(dmi_force_angles, 'int', 'dmi_force_angles', simple_data) dmi_force_qs = eval_xpath(iteration_node, dmi_force_qs_xpath) - write_simple_outnode( - dmi_force_qs, 'int', 'dmi_force_qs', simple_data) + write_simple_outnode(dmi_force_qs, 'int', 'dmi_force_qs', simple_data) units_e = eval_xpath2(iteration_node, dmi_force_energ_units_xpath) - write_simple_outnode( - units_e[0], 'str', 'energy_units', simple_data) + write_simple_outnode(units_e[0], 'str', 'energy_units', simple_data) else: # total energy kmax_used = eval_xpath2(root, kmax_xpath)[0] write_simple_outnode(kmax_used, 'float', 'kmax', simple_data) - units_e = get_xml_attribute( - eval_xpath(iteration_node, totalenergy_xpath), units_name) - write_simple_outnode( - units_e, 'str', 'energy_hartree_units', simple_data) + units_e = get_xml_attribute(eval_xpath(iteration_node, totalenergy_xpath), units_name) + write_simple_outnode(units_e, 'str', 'energy_hartree_units', simple_data) - tE_htr = get_xml_attribute( - eval_xpath(iteration_node, totalenergy_xpath), value_name) - write_simple_outnode( - tE_htr, 'float', 'energy_hartree', simple_data) + tE_htr = get_xml_attribute(eval_xpath(iteration_node, totalenergy_xpath), value_name) + write_simple_outnode(tE_htr, 'float', 'energy_hartree', simple_data) - write_simple_outnode( - convert_htr_to_ev(tE_htr), 'float', 'energy', simple_data) + write_simple_outnode(convert_htr_to_ev(tE_htr), 'float', 'energy', simple_data) write_simple_outnode('eV', 'str', 'energy_units', simple_data) - sumofeigenvalues = get_xml_attribute( - eval_xpath(iteration_node, sumofeigenvalues_xpath), value_name) - write_simple_outnode( - sumofeigenvalues, 'float', 'sum_of_eigenvalues', simple_data) + sumofeigenvalues = get_xml_attribute(eval_xpath(iteration_node, sumofeigenvalues_xpath), value_name) + write_simple_outnode(sumofeigenvalues, 'float', 'sum_of_eigenvalues', simple_data) - coreElectrons = get_xml_attribute( - eval_xpath(iteration_node, core_electrons_xpath), value_name) - write_simple_outnode( - coreElectrons, 'float', 'energy_core_electrons', simple_data) + coreElectrons = get_xml_attribute(eval_xpath(iteration_node, core_electrons_xpath), value_name) + write_simple_outnode(coreElectrons, 'float', 'energy_core_electrons', simple_data) - valenceElectrons = get_xml_attribute( - eval_xpath(iteration_node, valence_electrons_xpath), value_name) - write_simple_outnode( - valenceElectrons, 'float', 'energy_valence_electrons', simple_data) + valenceElectrons = get_xml_attribute(eval_xpath(iteration_node, valence_electrons_xpath), value_name) + write_simple_outnode(valenceElectrons, 'float', 'energy_valence_electrons', simple_data) - ch_d_xc_d_inte = get_xml_attribute( - eval_xpath(iteration_node, chargeden_xc_den_integral_xpath), value_name) - write_simple_outnode( - ch_d_xc_d_inte, 'float', 'charge_den_xc_den_integral', simple_data) + ch_d_xc_d_inte = get_xml_attribute(eval_xpath(iteration_node, chargeden_xc_den_integral_xpath), value_name) + write_simple_outnode(ch_d_xc_d_inte, 'float', 'charge_den_xc_den_integral', simple_data) # bandgap - units_bandgap = get_xml_attribute( - eval_xpath(iteration_node, bandgap_xpath), units_name) - write_simple_outnode(units_bandgap, 'str', - 'bandgap_units', simple_data) + units_bandgap = get_xml_attribute(eval_xpath(iteration_node, bandgap_xpath), units_name) + write_simple_outnode(units_bandgap, 'str', 'bandgap_units', simple_data) - bandgap = get_xml_attribute( - eval_xpath(iteration_node, bandgap_xpath), value_name) + bandgap = get_xml_attribute(eval_xpath(iteration_node, bandgap_xpath), value_name) write_simple_outnode(bandgap, 'float', 'bandgap', simple_data) # fermi - fermi_energy = get_xml_attribute( - eval_xpath(iteration_node, fermi_energy_xpath), value_name) - write_simple_outnode(fermi_energy, 'float', - 'fermi_energy', simple_data) - units_fermi_energy = get_xml_attribute( - eval_xpath(iteration_node, fermi_energy_xpath), units_name) - write_simple_outnode( - units_fermi_energy, 'str', 'fermi_energy_units', simple_data) + fermi_energy = get_xml_attribute(eval_xpath(iteration_node, fermi_energy_xpath), value_name) + write_simple_outnode(fermi_energy, 'float', 'fermi_energy', simple_data) + units_fermi_energy = get_xml_attribute(eval_xpath(iteration_node, fermi_energy_xpath), units_name) + write_simple_outnode(units_fermi_energy, 'str', 'fermi_energy_units', simple_data) # density convergence - units = get_xml_attribute( - eval_xpath(iteration_node, densityconvergence_xpath), units_name) - write_simple_outnode( - units, 'str', 'density_convergence_units', simple_data) + units = get_xml_attribute(eval_xpath(iteration_node, densityconvergence_xpath), units_name) + write_simple_outnode(units, 'str', 'density_convergence_units', simple_data) if jspin == 1: - if not relax: # there are no charge densities written if relax - charge_density = get_xml_attribute( - eval_xpath(iteration_node, chargedensity_xpath), distance_name) - write_simple_outnode( - charge_density, 'float', 'charge_density', simple_data) + if not relax: # there are no charge densities written if relax + charge_density = get_xml_attribute(eval_xpath(iteration_node, chargedensity_xpath), distance_name) + write_simple_outnode(charge_density, 'float', 'charge_density', simple_data) elif jspin == 2: - charge_densitys = eval_xpath2( - iteration_node, chargedensity_xpath) + charge_densitys = eval_xpath2(iteration_node, chargedensity_xpath) - if not relax: # there are no charge densities written if relax + if not relax: # there are no charge densities written if relax if charge_densitys: # otherwise we get a keyerror if calculation failed. - charge_density1 = get_xml_attribute( - charge_densitys[0], distance_name) - charge_density2 = get_xml_attribute( - charge_densitys[1], distance_name) + charge_density1 = get_xml_attribute(charge_densitys[0], distance_name) + charge_density2 = get_xml_attribute(charge_densitys[1], distance_name) else: # Is non a problem? charge_density1 = None charge_density2 = None - write_simple_outnode( - charge_density1, 'float', 'charge_density1', simple_data) - write_simple_outnode( - charge_density2, 'float', 'charge_density2', simple_data) + write_simple_outnode(charge_density1, 'float', 'charge_density1', simple_data) + write_simple_outnode(charge_density2, 'float', 'charge_density2', simple_data) - spin_density = get_xml_attribute( - eval_xpath(iteration_node, spindensity_xpath), distance_name) - write_simple_outnode( - spin_density, 'float', 'spin_density', simple_data) + spin_density = get_xml_attribute(eval_xpath(iteration_node, spindensity_xpath), distance_name) + write_simple_outnode(spin_density, 'float', 'spin_density', simple_data) - overall_charge_density = get_xml_attribute( - eval_xpath(iteration_node, overallchargedensity_xpath), distance_name) - write_simple_outnode( - overall_charge_density, 'float', 'overall_charge_density', simple_data) + overall_charge_density = get_xml_attribute(eval_xpath(iteration_node, overallchargedensity_xpath), + distance_name) + write_simple_outnode(overall_charge_density, 'float', 'overall_charge_density', simple_data) # magnetic moments #TODO orbMag Moment - m_units = get_xml_attribute( - eval_xpath(iteration_node, magnetic_moments_in_mtpheres_xpath), units_name) - write_simple_outnode( - m_units, 'str', 'magnetic_moment_units', simple_data) - write_simple_outnode( - m_units, 'str', 'orbital_magnetic_moment_units', simple_data) + m_units = get_xml_attribute(eval_xpath(iteration_node, magnetic_moments_in_mtpheres_xpath), units_name) + write_simple_outnode(m_units, 'str', 'magnetic_moment_units', simple_data) + write_simple_outnode(m_units, 'str', 'orbital_magnetic_moment_units', simple_data) moments = eval_xpath(iteration_node, magneticmoments_xpath) - write_simple_outnode( - moments, 'list_floats', 'magnetic_moments', simple_data) + write_simple_outnode(moments, 'list_floats', 'magnetic_moments', simple_data) - spinup = eval_xpath( - iteration_node, magneticmoments_spinupcharge_xpath) - write_simple_outnode( - spinup, 'list_floats', 'magnetic_spin_up_charges', simple_data) + spinup = eval_xpath(iteration_node, magneticmoments_spinupcharge_xpath) + write_simple_outnode(spinup, 'list_floats', 'magnetic_spin_up_charges', simple_data) - spindown = eval_xpath( - iteration_node, magneticmoments_spindowncharge_xpath) - write_simple_outnode( - spindown, 'list_floats', 'magnetic_spin_down_charges', simple_data) + spindown = eval_xpath(iteration_node, magneticmoments_spindowncharge_xpath) + write_simple_outnode(spindown, 'list_floats', 'magnetic_spin_down_charges', simple_data) # orbital magnetic moments - orbmoments = eval_xpath( - iteration_node, orbmagneticmoments_xpath) - write_simple_outnode( - orbmoments, 'list_floats', 'orbital_magnetic_moments', simple_data) + orbmoments = eval_xpath(iteration_node, orbmagneticmoments_xpath) + write_simple_outnode(orbmoments, 'list_floats', 'orbital_magnetic_moments', simple_data) - orbspinup = eval_xpath( - iteration_node, orbmagneticmoments_spinupcharge_xpath) - write_simple_outnode( - orbspinup, 'list_floats', 'orbital_magnetic_spin_up_charges', simple_data) + orbspinup = eval_xpath(iteration_node, orbmagneticmoments_spinupcharge_xpath) + write_simple_outnode(orbspinup, 'list_floats', 'orbital_magnetic_spin_up_charges', simple_data) - orbspindown = eval_xpath( - iteration_node, orbmagneticmoments_spindowncharge_xpath) - write_simple_outnode( - orbspindown, 'list_floats', 'orbital_magnetic_spin_down_charges', simple_data) + orbspindown = eval_xpath(iteration_node, orbmagneticmoments_spindowncharge_xpath) + write_simple_outnode(orbspindown, 'list_floats', 'orbital_magnetic_spin_down_charges', simple_data) # TODO: atomtype dependence # moment = get_xml_attribute( @@ -1032,24 +958,20 @@ def write_simple_outnode(value, value_type, value_name, dict_out): all_atoms = eval_xpath2(root, atomstypes_xpath) for a_type in all_atoms: - element = get_xml_attribute(a_type, 'species')[:2] + element = get_xml_attribute(a_type, 'species').split('-')[0] type_positions = eval_xpath2(a_type, pos_attr) for pos in type_positions: pos = [convert_frac(x) for x in pos.text.split()] - atom_positions.append([element]+pos) + atom_positions.append([element] + pos) - write_simple_outnode( - relax_brav_vectors, 'list', 'relax_brav_vectors', simple_data) - write_simple_outnode( - atom_positions, 'list', 'relax_atom_positions', simple_data) - write_simple_outnode( - str(bool(film)), 'str', 'film', simple_data) + write_simple_outnode(relax_brav_vectors, 'list', 'relax_brav_vectors', simple_data) + write_simple_outnode(atom_positions, 'list', 'relax_atom_positions', simple_data) + write_simple_outnode(str(bool(film)), 'str', 'film', simple_data) # total iterations - number_of_iterations_total = get_xml_attribute( - eval_xpath(iteration_node, iteration_xpath), overall_number_name) - write_simple_outnode( - number_of_iterations_total, 'int', 'number_of_iterations_total', simple_data) + number_of_iterations_total = get_xml_attribute(eval_xpath(iteration_node, iteration_xpath), + overall_number_name) + write_simple_outnode(number_of_iterations_total, 'int', 'number_of_iterations_total', simple_data) # forces atomtype dependend forces = eval_xpath2(iteration_node, forces_total_xpath) @@ -1058,21 +980,17 @@ def write_simple_outnode(value, value_type, value_name, dict_out): for force in forces: atomtype, _ = convert_to_int(get_xml_attribute(force, atomtype_name)) - forces_unit = get_xml_attribute( - eval_xpath(iteration_node, forces_units_xpath), units_name) + forces_unit = get_xml_attribute(eval_xpath(iteration_node, forces_units_xpath), units_name) write_simple_outnode(forces_unit, 'str', 'force_units', simple_data) force_x = get_xml_attribute(force, f_x_name) - write_simple_outnode( - force_x, 'float', 'force_x_type{}'.format(atomtype), simple_data) + write_simple_outnode(force_x, 'float', 'force_x_type{}'.format(atomtype), simple_data) force_y = get_xml_attribute(force, f_y_name) - write_simple_outnode( - force_y, 'float', 'force_y_type{}'.format(atomtype), simple_data) + write_simple_outnode(force_y, 'float', 'force_y_type{}'.format(atomtype), simple_data) force_z = get_xml_attribute(force, f_z_name) - write_simple_outnode( - force_z, 'float', 'force_z_type{}'.format(atomtype), simple_data) + write_simple_outnode(force_z, 'float', 'force_z_type{}'.format(atomtype), simple_data) force_xf, suc1 = convert_to_float(force_x) force_yf, suc2 = convert_to_float(force_y) @@ -1087,27 +1005,29 @@ def write_simple_outnode(value, value_type, value_name, dict_out): largest_force = abs(force_zf) pos_x = get_xml_attribute(force, new_x_name) - write_simple_outnode( - pos_x, 'float', 'abspos_x_type{}'.format(atomtype), simple_data) + write_simple_outnode(pos_x, 'float', 'abspos_x_type{}'.format(atomtype), simple_data) pos_y = get_xml_attribute(force, new_y_name) - write_simple_outnode( - pos_y, 'float', 'abspos_y_type{}'.format(atomtype), simple_data) + write_simple_outnode(pos_y, 'float', 'abspos_y_type{}'.format(atomtype), simple_data) pos_z = get_xml_attribute(force, new_z_name) - write_simple_outnode( - pos_z, 'float', 'abspos_z_type{}'.format(atomtype), simple_data) + write_simple_outnode(pos_z, 'float', 'abspos_z_type{}'.format(atomtype), simple_data) - write_simple_outnode( - largest_force, 'float', 'force_largest', simple_data) + write_simple_outnode(largest_force, 'float', 'force_largest', simple_data) return simple_data if parse_xml: root = tree.getroot() - simple_out = parse_simplexmlout_file(root, outfile_broken) - #simple_out['outputfile_path'] = outxmlfile - # TODO: parse complex out - complex_out = {} # parse_xmlout_file(root) - return simple_out, complex_out, parser_info_out, successful + if root is None: + parser_info_out['parser_warnings'].append( + 'Somehow the root from the xmltree is None, which it should not be, I skip the parsing.') + successful = False + return {}, {}, parser_info_out, successful + else: + simple_out = parse_simplexmlout_file(root, outfile_broken) + #simple_out['outputfile_path'] = outxmlfile + # TODO: parse complex out + complex_out = {} # parse_xmlout_file(root) + return simple_out, complex_out, parser_info_out, successful else: return {}, {}, parser_info_out, successful @@ -1150,9 +1070,7 @@ def parse_bands_file(bands_lines): fleur_bands = BandsData() # fleur_bands.set_cell(cell) #fleur_bands.set_kpoints(kpoints, cartesian=True) - fleur_bands.set_bands(bands=bands_values, - units='eV', - labels=bands_labels) + fleur_bands.set_bands(bands=bands_values, units='eV', labels=bands_labels) for line in bands_lines: pass @@ -1169,7 +1087,6 @@ def parse_relax_file(rlx): rlx.seek(0) tree = etree.parse(rlx) - xpath_disp = '/relaxation/displacements/displace' xpath_energy = '/relaxation/relaxation-history/step/@energy' xpath_steps = '/relaxation/relaxation-history/step' @@ -1202,6 +1119,7 @@ def parse_relax_file(rlx): return Dict(dict=out_dict) + def convert_frac(ratio): """ Converts ratio strings into float, e.g. 1.0/2.0 -> 0.5 """ try: diff --git a/aiida_fleur/parsers/fleur_inputgen.py b/aiida_fleur/parsers/fleur_inputgen.py index 996ae3dc0..10068518d 100644 --- a/aiida_fleur/parsers/fleur_inputgen.py +++ b/aiida_fleur/parsers/fleur_inputgen.py @@ -17,7 +17,7 @@ from __future__ import absolute_import from aiida.parsers import Parser -from aiida.common.exceptions import NotExistent +from aiida.common.exceptions import NotExistent, InputValidationError, ValidationError from aiida_fleur.data.fleurinp import FleurinpData from aiida_fleur.calculation.fleurinputgen import FleurinputgenCalculation @@ -34,7 +34,6 @@ class Fleur_inputgenParser(Parser): _setting_key = 'parser_options' - def __init__(self, node): """ Initialize the instance of Fleur_inputgenParser @@ -42,8 +41,7 @@ def __init__(self, node): super(Fleur_inputgenParser, self).__init__(node) # these files should be at least present after success of inpgen - self._default_files = {FleurinputgenCalculation._OUTPUT_FILE_NAME, - FleurinputgenCalculation._INPXML_FILE_NAME} + self._default_files = {FleurinputgenCalculation._OUTPUT_FILE_NAME, FleurinputgenCalculation._INPXML_FILE_NAME} self._other_files = {FleurinputgenCalculation._SHELLOUT_FILE_NAME} def parse(self, **kwargs): @@ -56,12 +54,12 @@ def parse(self, **kwargs): try: output_folder = self.retrieved except NotExistent: - self.logger.error("No retrieved folder found") + self.logger.error('No retrieved folder found') return self.exit_codes.ERROR_NO_RETRIEVED_FOLDER # check what is inside the folder list_of_files = output_folder.list_object_names() - self.logger.info("file list {}".format(list_of_files)) + self.logger.info('file list {}'.format(list_of_files)) errorfile = FleurinputgenCalculation._ERROR_FILE_NAME if errorfile in list_of_files: @@ -69,27 +67,32 @@ def parse(self, **kwargs): with output_folder.open(errorfile, 'r') as error_file: error_file_lines = error_file.read() except IOError: - self.logger.error( - "Failed to open error file: {}.".format(errorfile)) + self.logger.error('Failed to open error file: {}.'.format(errorfile)) return self.exit_codes.ERROR_OPENING_OUTPUTS # if not empty, has_error equals True, parse error. if error_file_lines: - self.logger.error( - "The following was written to the error file {} : \n '{}'" - "".format(errorfile, error_file_lines)) + self.logger.error("The following was written to the error file {} : \n '{}'" + ''.format(errorfile, error_file_lines)) inpxml_file = FleurinputgenCalculation._INPXML_FILE_NAME if inpxml_file not in list_of_files: - self.logger.error( - "XML inp not found '{}'".format(inpxml_file)) + self.logger.error("XML inp not found '{}'".format(inpxml_file)) return self.exit_codes.ERROR_NO_INPXML for file1 in self._default_files: if file1 not in list_of_files: - self.logger.error( - "'{}' file not found in retrived folder, it was probably " - "not created by inpgen".format(file1)) + self.logger.error("'{}' file not found in retrived folder, it was probably " + 'not created by inpgen'.format(file1)) return self.exit_codes.ERROR_MISSING_RETRIEVED_FILES + try: + fleurinp = FleurinpData(files=[inpxml_file], node=output_folder) + except InputValidationError as ex: + self.logger.error('FleurinpData initialization failed: {}'.format(str(ex))) + return self.exit_codes.ERROR_FLEURINPDATA_INPUT_NOT_VALID + except ValidationError as ex: + self.logger.error('FleurinpData validation failed: {}'.format(str(ex))) + return self.exit_codes.ERROR_FLEURINPDATA_NOT_VALID + self.logger.info('FleurinpData initialized') - self.out('fleurinpData', FleurinpData(files=[inpxml_file], node=output_folder)) + self.out('fleurinpData', fleurinp) diff --git a/aiida_fleur/tests/.aiida-testing-config.yml b/aiida_fleur/tests/.aiida-testing-config.yml new file mode 100644 index 000000000..ee5bcdef2 --- /dev/null +++ b/aiida_fleur/tests/.aiida-testing-config.yml @@ -0,0 +1,3 @@ +mock_code: + inpgen: local_exe/inpgen #~/codes/aiida/inpgen/max_r4/inpgen + fleur: local_exe/fleur #~/codes/aiida/fleur/max_r4/serial/fleur diff --git a/aiida_fleur/tests/.aiida/config.json b/aiida_fleur/tests/.aiida/config.json index 00ac910af..d74fb51db 100644 --- a/aiida_fleur/tests/.aiida/config.json +++ b/aiida_fleur/tests/.aiida/config.json @@ -4,4 +4,4 @@ "OLDEST_COMPATIBLE": 3 }, "profiles": {} -} \ No newline at end of file +} diff --git a/aiida_fleur/tests/README.txt b/aiida_fleur/tests/README.txt index 7fdbac79c..3976cadc5 100644 --- a/aiida_fleur/tests/README.txt +++ b/aiida_fleur/tests/README.txt @@ -2,4 +2,3 @@ Comments to the tests: In order for calcfunction and workfunction test to work, rabbitmq needs to be running. Otherwise they will fail... - diff --git a/aiida_fleur/tests/b_test_aiida_pytest_config.py b/aiida_fleur/tests/b_test_aiida_pytest_config.py deleted file mode 100644 index c24bb77fa..000000000 --- a/aiida_fleur/tests/b_test_aiida_pytest_config.py +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- - -from __future__ import absolute_import -import io - -from aiida_pytest.contextmanagers import redirect_stdout - - -def test_configure_from_file(configure): - from aiida.orm.user import User - user = User.get_all_users()[0] - assert user.first_name == 'AiiDA' - - -def test_db_flushed(configure): - from aiida.orm.nodes.base import Str - test_string = 'this string should not be present when the test run starts' - tag = 'Test string tag' - from aiida.orm.querybuilder import QueryBuilder - qb = QueryBuilder() - qb.append(Str, filters={'label': {'==': tag}}) - assert not qb.all() - str_obj = Str(test_string) - str_obj.label = tag - str_obj.store() - - -def test_daemon_running(configure_with_daemon): - from aiida.cmdline.verdilib import Daemon - output = io.BytesIO() - with redirect_stdout(output): - Daemon().daemon_status() - assert '## Found 1 process running:' in output.getvalue() diff --git a/aiida_fleur/tests/calculation/data_dir/mock-fleur-cb1b08bf8fdd75dbffc23aa733c840d5/JUDFT_WARN_ONLY b/aiida_fleur/tests/calculation/data_dir/mock-fleur-cb1b08bf8fdd75dbffc23aa733c840d5/JUDFT_WARN_ONLY new file mode 100644 index 000000000..65c71eb10 --- /dev/null +++ b/aiida_fleur/tests/calculation/data_dir/mock-fleur-cb1b08bf8fdd75dbffc23aa733c840d5/JUDFT_WARN_ONLY @@ -0,0 +1 @@ +/n diff --git a/aiida_fleur/tests/calculation/data_dir/mock-fleur-cb1b08bf8fdd75dbffc23aa733c840d5/_scheduler-stderr.txt b/aiida_fleur/tests/calculation/data_dir/mock-fleur-cb1b08bf8fdd75dbffc23aa733c840d5/_scheduler-stderr.txt new file mode 100644 index 000000000..e69de29bb diff --git a/aiida_fleur/tests/calculation/data_dir/mock-fleur-cb1b08bf8fdd75dbffc23aa733c840d5/_scheduler-stdout.txt b/aiida_fleur/tests/calculation/data_dir/mock-fleur-cb1b08bf8fdd75dbffc23aa733c840d5/_scheduler-stdout.txt new file mode 100644 index 000000000..e69de29bb diff --git a/aiida_fleur/tests/calculation/data_dir/mock-fleur-cb1b08bf8fdd75dbffc23aa733c840d5/cdn1 b/aiida_fleur/tests/calculation/data_dir/mock-fleur-cb1b08bf8fdd75dbffc23aa733c840d5/cdn1 new file mode 100644 index 000000000..2a3a43854 Binary files /dev/null and b/aiida_fleur/tests/calculation/data_dir/mock-fleur-cb1b08bf8fdd75dbffc23aa733c840d5/cdn1 differ diff --git a/aiida_fleur/tests/calculation/data_dir/mock-fleur-cb1b08bf8fdd75dbffc23aa733c840d5/inp.xml b/aiida_fleur/tests/calculation/data_dir/mock-fleur-cb1b08bf8fdd75dbffc23aa733c840d5/inp.xml new file mode 100644 index 000000000..4d34c362a --- /dev/null +++ b/aiida_fleur/tests/calculation/data_dir/mock-fleur-cb1b08bf8fdd75dbffc23aa733c840d5/inp.xml @@ -0,0 +1,368 @@ + + + + Si, alpha silicon, bulk, delta project + + + + + + + + + + .0000000000 .0000000000 .0000000000 + + + + + + + 0.437500 0.437500 0.437500 + 0.312500 0.437500 0.437500 + 0.187500 0.437500 0.437500 + 0.062500 0.437500 0.437500 + 0.062500 0.500000 0.500000 + 0.187500 0.562500 0.562500 + 0.312500 0.562500 0.562500 + 0.437500 0.437500 0.562500 + 0.312500 0.312500 0.437500 + 0.187500 0.312500 0.437500 + 0.125000 0.375000 0.437500 + 0.125000 0.437500 0.500000 + 0.187500 0.500000 0.625000 + 0.312500 0.437500 0.687500 + 0.312500 0.437500 0.562500 + 0.250000 0.250000 0.437500 + 0.250000 0.375000 0.437500 + 0.250000 0.437500 0.500000 + 0.250000 0.437500 0.625000 + 0.250000 0.500000 0.687500 + 0.187500 0.437500 0.562500 + 0.375000 0.375000 0.437500 + 0.375000 0.437500 0.500000 + 0.375000 0.437500 0.625000 + 0.250000 0.562500 0.625000 + 0.125000 0.500000 0.562500 + 0.437500 0.500000 0.500000 + 0.375000 0.500000 0.562500 + 0.250000 0.500000 0.562500 + 0.375000 0.375000 0.562500 + 0.250000 0.375000 0.562500 + 0.312500 0.312500 0.562500 + 0.312500 0.312500 0.312500 + 0.187500 0.312500 0.312500 + 0.062500 0.312500 0.312500 + 0.062500 0.375000 0.375000 + 0.187500 0.500000 0.500000 + 0.375000 0.375000 0.687500 + 0.187500 0.187500 0.312500 + 0.125000 0.250000 0.312500 + 0.125000 0.312500 0.375000 + 0.187500 0.375000 0.500000 + 0.312500 0.500000 0.625000 + 0.250000 0.250000 0.312500 + 0.250000 0.312500 0.375000 + 0.250000 0.312500 0.500000 + 0.312500 0.375000 0.625000 + 0.312500 0.375000 0.375000 + 0.312500 0.375000 0.500000 + 0.312500 0.500000 0.500000 + 0.187500 0.187500 0.187500 + 0.062500 0.187500 0.187500 + 0.062500 0.250000 0.250000 + 0.187500 0.375000 0.375000 + 0.125000 0.125000 0.187500 + 0.125000 0.187500 0.250000 + 0.187500 0.250000 0.375000 + 0.187500 0.250000 0.250000 + 0.062500 0.062500 0.062500 + 0.062500 0.125000 0.125000 + + + + + + + + + + + 1 0 0 .0000000000 + 0 1 0 .0000000000 + 0 0 1 .0000000000 + + + 0 1 0 .0000000000 + 1 0 0 .0000000000 + 0 0 1 .0000000000 + + + -1 0 0 .0000000000 + 0 -1 0 .0000000000 + 1 1 1 .5000000000 + + + 0 -1 0 .0000000000 + -1 0 0 .0000000000 + 1 1 1 .5000000000 + + + 0 1 0 .0000000000 + 1 0 0 .0000000000 + -1 -1 -1 .5000000000 + + + 1 0 0 .0000000000 + 0 1 0 .0000000000 + -1 -1 -1 .5000000000 + + + -1 0 0 .0000000000 + 0 -1 0 .0000000000 + 0 0 -1 .0000000000 + + + 0 -1 0 .0000000000 + -1 0 0 .0000000000 + 0 0 -1 .0000000000 + + + 0 0 1 .0000000000 + 1 0 0 .0000000000 + -1 -1 -1 .5000000000 + + + 0 0 1 .0000000000 + 0 1 0 .0000000000 + -1 -1 -1 .5000000000 + + + 1 1 1 .5000000000 + 0 -1 0 .0000000000 + 0 0 -1 .0000000000 + + + 1 1 1 .5000000000 + -1 0 0 .0000000000 + 0 0 -1 .0000000000 + + + -1 0 0 .0000000000 + 1 1 1 .5000000000 + 0 0 -1 .0000000000 + + + 1 0 0 .0000000000 + 0 0 1 .0000000000 + -1 -1 -1 .5000000000 + + + 0 1 0 .0000000000 + 0 0 1 .0000000000 + -1 -1 -1 .5000000000 + + + 0 -1 0 .0000000000 + 1 1 1 .5000000000 + 0 0 -1 .0000000000 + + + -1 0 0 .0000000000 + 0 0 -1 .0000000000 + 0 -1 0 .0000000000 + + + 0 1 0 .0000000000 + -1 -1 -1 .5000000000 + 1 0 0 .0000000000 + + + 0 -1 0 .0000000000 + 0 0 -1 .0000000000 + -1 0 0 .0000000000 + + + 1 0 0 .0000000000 + -1 -1 -1 .5000000000 + 0 1 0 .0000000000 + + + 1 1 1 .5000000000 + 0 0 -1 .0000000000 + 0 -1 0 .0000000000 + + + 0 0 1 .0000000000 + -1 -1 -1 .5000000000 + 1 0 0 .0000000000 + + + 1 1 1 .5000000000 + 0 0 -1 .0000000000 + -1 0 0 .0000000000 + + + 0 0 1 .0000000000 + -1 -1 -1 .5000000000 + 0 1 0 .0000000000 + + + 0 0 -1 .0000000000 + -1 0 0 .0000000000 + 0 -1 0 .0000000000 + + + 0 0 -1 .0000000000 + 0 -1 0 .0000000000 + -1 0 0 .0000000000 + + + -1 -1 -1 .5000000000 + 0 1 0 .0000000000 + 1 0 0 .0000000000 + + + -1 -1 -1 .5000000000 + 1 0 0 .0000000000 + 0 1 0 .0000000000 + + + 0 0 1 .0000000000 + 0 1 0 .0000000000 + 1 0 0 .0000000000 + + + 1 1 1 .5000000000 + -1 0 0 .0000000000 + 0 -1 0 .0000000000 + + + 1 1 1 .5000000000 + 0 -1 0 .0000000000 + -1 0 0 .0000000000 + + + 0 0 1 .0000000000 + 1 0 0 .0000000000 + 0 1 0 .0000000000 + + + 0 0 -1 .0000000000 + 1 1 1 .5000000000 + -1 0 0 .0000000000 + + + 0 0 -1 .0000000000 + 1 1 1 .5000000000 + 0 -1 0 .0000000000 + + + -1 -1 -1 .5000000000 + 0 0 1 .0000000000 + 1 0 0 .0000000000 + + + -1 -1 -1 .5000000000 + 0 0 1 .0000000000 + 0 1 0 .0000000000 + + + -1 0 0 .0000000000 + 1 1 1 .5000000000 + 0 -1 0 .0000000000 + + + 0 1 0 .0000000000 + 0 0 1 .0000000000 + 1 0 0 .0000000000 + + + 0 -1 0 .0000000000 + 1 1 1 .5000000000 + -1 0 0 .0000000000 + + + 1 0 0 .0000000000 + 0 0 1 .0000000000 + 0 1 0 .0000000000 + + + 1 0 0 .0000000000 + -1 -1 -1 .5000000000 + 0 0 1 .0000000000 + + + 0 1 0 .0000000000 + -1 -1 -1 .5000000000 + 0 0 1 .0000000000 + + + 0 -1 0 .0000000000 + 0 0 -1 .0000000000 + 1 1 1 .5000000000 + + + -1 0 0 .0000000000 + 0 0 -1 .0000000000 + 1 1 1 .5000000000 + + + -1 -1 -1 .5000000000 + 1 0 0 .0000000000 + 0 0 1 .0000000000 + + + -1 -1 -1 .5000000000 + 0 1 0 .0000000000 + 0 0 1 .0000000000 + + + 0 0 -1 .0000000000 + 0 -1 0 .0000000000 + 1 1 1 .5000000000 + + + 0 0 -1 .0000000000 + -1 0 0 .0000000000 + 1 1 1 .5000000000 + + + + + .000000000000000 5.167355275200000 5.167355275200000 + 5.167355275200000 .000000000000000 5.167355275200000 + 5.167355275200000 5.167355275200000 .000000000000000 + + + + + + + + + + + + + + + 1.000/8.000 1.000/8.000 1.000/8.000 + -1.000/8.000 -1.000/8.000 -1.000/8.000 + + + + + + + + + + + + + + + + + diff --git a/aiida_fleur/tests/calculation/data_dir/mock-fleur-cb1b08bf8fdd75dbffc23aa733c840d5/juDFT_times.json b/aiida_fleur/tests/calculation/data_dir/mock-fleur-cb1b08bf8fdd75dbffc23aa733c840d5/juDFT_times.json new file mode 100644 index 000000000..c3ad98c14 --- /dev/null +++ b/aiida_fleur/tests/calculation/data_dir/mock-fleur-cb1b08bf8fdd75dbffc23aa733c840d5/juDFT_times.json @@ -0,0 +1,434 @@ +{ + "timername" : "Total Run", + "totaltime" : 4.00000, + "subtimers": [ + { + "timername" : "Initialization", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1, + "subtimers": [ + { + "timername" : "r_inpXML", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1 + }, + { + "timername" : "postprocessInput", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1, + "subtimers": [ + { + "timername" : "strgn", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1, + "subtimers": [ + { + "timername" : "writeStars", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1 + } + ] + }, + { + "timername" : "stepf", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1 + } + ] + } + ] + }, + { + "timername" : "generation of start-density", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1, + "subtimers": [ + { + "timername" : "qpw_to_nmt", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1 + }, + { + "timername" : "cdntot", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1, + "subtimers": [ + { + "timername" : "MT", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1 + } + ] + } + ] + }, + { + "timername" : "Qfix", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1 + }, + { + "timername" : "Open file/memory for IO of eig", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1 + }, + { + "timername" : "Iteration", + "totaltime" : 4.00000, + "mintime" : 0.0000E+00, + "maxtime" : 1.00000, + "ncalls" : 11, + "subtimers": [ + { + "timername" : "generation of potential", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 11, + "subtimers": [ + { + "timername" : "psqpw", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 11 + }, + { + "timername" : "interstitial", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 11 + }, + { + "timername" : "MT-spheres", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 11 + }, + { + "timername" : "den-pot integrals", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 11 + }, + { + "timername" : "Vxc in interstitial", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 11 + }, + { + "timername" : "Vxc in MT", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 11 + } + ] + }, + { + "timername" : "gen. of hamil. and diag. (tota", + "totaltime" : 3.00000, + "mintime" : 0.0000E+00, + "maxtime" : 1.00000, + "ncalls" : 11, + "subtimers": [ + { + "timername" : "eigen", + "totaltime" : 3.00000, + "mintime" : 0.0000E+00, + "maxtime" : 1.00000, + "ncalls" : 11, + "subtimers": [ + { + "timername" : "Updating energy parameters", + "totaltime" : 1.00000, + "mintime" : 0.0000E+00, + "maxtime" : 1.00000, + "ncalls" : 11 + }, + { + "timername" : "tlmplm", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 11 + }, + { + "timername" : "Setup of H&S matrices", + "totaltime" : 2.00000, + "mintime" : 0.0000E+00, + "maxtime" : 1.00000, + "ncalls" : 660, + "subtimers": [ + { + "timername" : "Interstitial part", + "totaltime" : 1.00000, + "mintime" : 0.0000E+00, + "maxtime" : 1.00000, + "ncalls" : 660 + }, + { + "timername" : "MT part", + "totaltime" : 1.00000, + "mintime" : 0.0000E+00, + "maxtime" : 1.00000, + "ncalls" : 660, + "subtimers": [ + { + "timername" : "fjgj coefficients", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 660 + }, + { + "timername" : "spherical setup", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 660 + }, + { + "timername" : "non-spherical setup", + "totaltime" : 1.00000, + "mintime" : 0.0000E+00, + "maxtime" : 1.00000, + "ncalls" : 660 + }, + { + "timername" : "LO setup", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 660 + } + ] + }, + { + "timername" : "Matrix redistribution", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 660 + } + ] + }, + { + "timername" : "Diagonalization", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 660 + }, + { + "timername" : "EV output", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 660, + "subtimers": [ + { + "timername" : "IO (write)", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 660 + } + ] + } + ] + } + ] + }, + { + "timername" : "determination of fermi energy", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 11, + "subtimers": [ + { + "timername" : "IO (read)", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 660 + }, + { + "timername" : "IO (write)", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 660 + } + ] + }, + { + "timername" : "generation of new charge densi", + "totaltime" : 1.00000, + "mintime" : 0.0000E+00, + "maxtime" : 1.00000, + "ncalls" : 11, + "subtimers": [ + { + "timername" : "cdnval", + "totaltime" : 1.00000, + "mintime" : 0.0000E+00, + "maxtime" : 1.00000, + "ncalls" : 11, + "subtimers": [ + { + "timername" : "IO (read)", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 660 + }, + { + "timername" : "pwden", + "totaltime" : 1.00000, + "mintime" : 0.0000E+00, + "maxtime" : 1.00000, + "ncalls" : 660 + }, + { + "timername" : "abcof", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 660 + }, + { + "timername" : "cdnval: rhomt", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 660 + }, + { + "timername" : "cdnval: rhonmt", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 660 + }, + { + "timername" : "cdnval: rho(n)mtlo", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 660 + }, + { + "timername" : "cdnmt", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 11 + } + ] + }, + { + "timername" : "cdntot", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 22, + "subtimers": [ + { + "timername" : "MT", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 22 + } + ] + }, + { + "timername" : "cdngen: cdncore", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 11, + "subtimers": [ + { + "timername" : "qpw_to_nmt", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 11 + } + ] + } + ] + }, + { + "timername" : "determination of total energy", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 11 + }, + { + "timername" : "Charge Density Mixing", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 11, + "subtimers": [ + { + "timername" : "Reading of distances", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 11 + }, + { + "timername" : "Mixing", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 11 + }, + { + "timername" : "Postprocessing", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 11 + } + ] + } + ] + } + ] +} diff --git a/aiida_fleur/tests/calculation/data_dir/mock-fleur-cb1b08bf8fdd75dbffc23aa733c840d5/out.error b/aiida_fleur/tests/calculation/data_dir/mock-fleur-cb1b08bf8fdd75dbffc23aa733c840d5/out.error new file mode 100644 index 000000000..af9803b54 --- /dev/null +++ b/aiida_fleur/tests/calculation/data_dir/mock-fleur-cb1b08bf8fdd75dbffc23aa733c840d5/out.error @@ -0,0 +1,12 @@ +I/O warning : failed to load external entity "relax.xml" + + ***************************************** + Run finished successfully + Stop message: + all done + ***************************************** +Rank:0 used 0.676GB/ 712964 kB + % Total % Received % Xferd Average Speed Time Time Time Current + Dload Upload Total Spent Left Speed + 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 780 100 40 100 740 181 3352 --:--:-- --:--:-- --:--:-- 3363 +OK diff --git a/aiida_fleur/tests/calculation/data_dir/mock-fleur-cb1b08bf8fdd75dbffc23aa733c840d5/out.xml b/aiida_fleur/tests/calculation/data_dir/mock-fleur-cb1b08bf8fdd75dbffc23aa733c840d5/out.xml new file mode 100644 index 000000000..0fe9c6b19 --- /dev/null +++ b/aiida_fleur/tests/calculation/data_dir/mock-fleur-cb1b08bf8fdd75dbffc23aa733c840d5/out.xml @@ -0,0 +1,1013 @@ + + + + + + GEN + + + + + + + + + + Si, alpha silicon, bulk, delta project + + + + + + + + + + .0000000000 .0000000000 .0000000000 + + + + + + + 0.437500 0.437500 0.437500 + 0.312500 0.437500 0.437500 + 0.187500 0.437500 0.437500 + 0.062500 0.437500 0.437500 + 0.062500 0.500000 0.500000 + 0.187500 0.562500 0.562500 + 0.312500 0.562500 0.562500 + 0.437500 0.437500 0.562500 + 0.312500 0.312500 0.437500 + 0.187500 0.312500 0.437500 + 0.125000 0.375000 0.437500 + 0.125000 0.437500 0.500000 + 0.187500 0.500000 0.625000 + 0.312500 0.437500 0.687500 + 0.312500 0.437500 0.562500 + 0.250000 0.250000 0.437500 + 0.250000 0.375000 0.437500 + 0.250000 0.437500 0.500000 + 0.250000 0.437500 0.625000 + 0.250000 0.500000 0.687500 + 0.187500 0.437500 0.562500 + 0.375000 0.375000 0.437500 + 0.375000 0.437500 0.500000 + 0.375000 0.437500 0.625000 + 0.250000 0.562500 0.625000 + 0.125000 0.500000 0.562500 + 0.437500 0.500000 0.500000 + 0.375000 0.500000 0.562500 + 0.250000 0.500000 0.562500 + 0.375000 0.375000 0.562500 + 0.250000 0.375000 0.562500 + 0.312500 0.312500 0.562500 + 0.312500 0.312500 0.312500 + 0.187500 0.312500 0.312500 + 0.062500 0.312500 0.312500 + 0.062500 0.375000 0.375000 + 0.187500 0.500000 0.500000 + 0.375000 0.375000 0.687500 + 0.187500 0.187500 0.312500 + 0.125000 0.250000 0.312500 + 0.125000 0.312500 0.375000 + 0.187500 0.375000 0.500000 + 0.312500 0.500000 0.625000 + 0.250000 0.250000 0.312500 + 0.250000 0.312500 0.375000 + 0.250000 0.312500 0.500000 + 0.312500 0.375000 0.625000 + 0.312500 0.375000 0.375000 + 0.312500 0.375000 0.500000 + 0.312500 0.500000 0.500000 + 0.187500 0.187500 0.187500 + 0.062500 0.187500 0.187500 + 0.062500 0.250000 0.250000 + 0.187500 0.375000 0.375000 + 0.125000 0.125000 0.187500 + 0.125000 0.187500 0.250000 + 0.187500 0.250000 0.375000 + 0.187500 0.250000 0.250000 + 0.062500 0.062500 0.062500 + 0.062500 0.125000 0.125000 + + + + + + + + 1 0 0 .0000000000 + 0 1 0 .0000000000 + 0 0 1 .0000000000 + + + 0 1 0 .0000000000 + 1 0 0 .0000000000 + 0 0 1 .0000000000 + + + -1 0 0 .0000000000 + 0 -1 0 .0000000000 + 1 1 1 .5000000000 + + + 0 -1 0 .0000000000 + -1 0 0 .0000000000 + 1 1 1 .5000000000 + + + 0 1 0 .0000000000 + 1 0 0 .0000000000 + -1 -1 -1 .5000000000 + + + 1 0 0 .0000000000 + 0 1 0 .0000000000 + -1 -1 -1 .5000000000 + + + -1 0 0 .0000000000 + 0 -1 0 .0000000000 + 0 0 -1 .0000000000 + + + 0 -1 0 .0000000000 + -1 0 0 .0000000000 + 0 0 -1 .0000000000 + + + 0 0 1 .0000000000 + 1 0 0 .0000000000 + -1 -1 -1 .5000000000 + + + 0 0 1 .0000000000 + 0 1 0 .0000000000 + -1 -1 -1 .5000000000 + + + 1 1 1 .5000000000 + 0 -1 0 .0000000000 + 0 0 -1 .0000000000 + + + 1 1 1 .5000000000 + -1 0 0 .0000000000 + 0 0 -1 .0000000000 + + + -1 0 0 .0000000000 + 1 1 1 .5000000000 + 0 0 -1 .0000000000 + + + 1 0 0 .0000000000 + 0 0 1 .0000000000 + -1 -1 -1 .5000000000 + + + 0 1 0 .0000000000 + 0 0 1 .0000000000 + -1 -1 -1 .5000000000 + + + 0 -1 0 .0000000000 + 1 1 1 .5000000000 + 0 0 -1 .0000000000 + + + -1 0 0 .0000000000 + 0 0 -1 .0000000000 + 0 -1 0 .0000000000 + + + 0 1 0 .0000000000 + -1 -1 -1 .5000000000 + 1 0 0 .0000000000 + + + 0 -1 0 .0000000000 + 0 0 -1 .0000000000 + -1 0 0 .0000000000 + + + 1 0 0 .0000000000 + -1 -1 -1 .5000000000 + 0 1 0 .0000000000 + + + 1 1 1 .5000000000 + 0 0 -1 .0000000000 + 0 -1 0 .0000000000 + + + 0 0 1 .0000000000 + -1 -1 -1 .5000000000 + 1 0 0 .0000000000 + + + 1 1 1 .5000000000 + 0 0 -1 .0000000000 + -1 0 0 .0000000000 + + + 0 0 1 .0000000000 + -1 -1 -1 .5000000000 + 0 1 0 .0000000000 + + + 0 0 -1 .0000000000 + -1 0 0 .0000000000 + 0 -1 0 .0000000000 + + + 0 0 -1 .0000000000 + 0 -1 0 .0000000000 + -1 0 0 .0000000000 + + + -1 -1 -1 .5000000000 + 0 1 0 .0000000000 + 1 0 0 .0000000000 + + + -1 -1 -1 .5000000000 + 1 0 0 .0000000000 + 0 1 0 .0000000000 + + + 0 0 1 .0000000000 + 0 1 0 .0000000000 + 1 0 0 .0000000000 + + + 1 1 1 .5000000000 + -1 0 0 .0000000000 + 0 -1 0 .0000000000 + + + 1 1 1 .5000000000 + 0 -1 0 .0000000000 + -1 0 0 .0000000000 + + + 0 0 1 .0000000000 + 1 0 0 .0000000000 + 0 1 0 .0000000000 + + + 0 0 -1 .0000000000 + 1 1 1 .5000000000 + -1 0 0 .0000000000 + + + 0 0 -1 .0000000000 + 1 1 1 .5000000000 + 0 -1 0 .0000000000 + + + -1 -1 -1 .5000000000 + 0 0 1 .0000000000 + 1 0 0 .0000000000 + + + -1 -1 -1 .5000000000 + 0 0 1 .0000000000 + 0 1 0 .0000000000 + + + -1 0 0 .0000000000 + 1 1 1 .5000000000 + 0 -1 0 .0000000000 + + + 0 1 0 .0000000000 + 0 0 1 .0000000000 + 1 0 0 .0000000000 + + + 0 -1 0 .0000000000 + 1 1 1 .5000000000 + -1 0 0 .0000000000 + + + 1 0 0 .0000000000 + 0 0 1 .0000000000 + 0 1 0 .0000000000 + + + 1 0 0 .0000000000 + -1 -1 -1 .5000000000 + 0 0 1 .0000000000 + + + 0 1 0 .0000000000 + -1 -1 -1 .5000000000 + 0 0 1 .0000000000 + + + 0 -1 0 .0000000000 + 0 0 -1 .0000000000 + 1 1 1 .5000000000 + + + -1 0 0 .0000000000 + 0 0 -1 .0000000000 + 1 1 1 .5000000000 + + + -1 -1 -1 .5000000000 + 1 0 0 .0000000000 + 0 0 1 .0000000000 + + + -1 -1 -1 .5000000000 + 0 1 0 .0000000000 + 0 0 1 .0000000000 + + + 0 0 -1 .0000000000 + 0 -1 0 .0000000000 + 1 1 1 .5000000000 + + + 0 0 -1 .0000000000 + -1 0 0 .0000000000 + 1 1 1 .5000000000 + + + + + .000000000000000 5.167355275200000 5.167355275200000 + 5.167355275200000 .000000000000000 5.167355275200000 + 5.167355275200000 5.167355275200000 .000000000000000 + + + + + + + + + + + + + + + 1.000/8.000 1.000/8.000 1.000/8.000 + -1.000/8.000 -1.000/8.000 -1.000/8.000 + + + + + + + + + + + + + + + + + + + + + + + + + 0.437500 0.437500 0.437500 + 0.312500 0.437500 0.437500 + 0.187500 0.437500 0.437500 + 0.062500 0.437500 0.437500 + 0.062500 0.500000 0.500000 + 0.187500 0.562500 0.562500 + 0.312500 0.562500 0.562500 + 0.437500 0.437500 0.562500 + 0.312500 0.312500 0.437500 + 0.187500 0.312500 0.437500 + 0.125000 0.375000 0.437500 + 0.125000 0.437500 0.500000 + 0.187500 0.500000 0.625000 + 0.312500 0.437500 0.687500 + 0.312500 0.437500 0.562500 + 0.250000 0.250000 0.437500 + 0.250000 0.375000 0.437500 + 0.250000 0.437500 0.500000 + 0.250000 0.437500 0.625000 + 0.250000 0.500000 0.687500 + 0.187500 0.437500 0.562500 + 0.375000 0.375000 0.437500 + 0.375000 0.437500 0.500000 + 0.375000 0.437500 0.625000 + 0.250000 0.562500 0.625000 + 0.125000 0.500000 0.562500 + 0.437500 0.500000 0.500000 + 0.375000 0.500000 0.562500 + 0.250000 0.500000 0.562500 + 0.375000 0.375000 0.562500 + 0.250000 0.375000 0.562500 + 0.312500 0.312500 0.562500 + 0.312500 0.312500 0.312500 + 0.187500 0.312500 0.312500 + 0.062500 0.312500 0.312500 + 0.062500 0.375000 0.375000 + 0.187500 0.500000 0.500000 + 0.375000 0.375000 0.687500 + 0.187500 0.187500 0.312500 + 0.125000 0.250000 0.312500 + 0.125000 0.312500 0.375000 + 0.187500 0.375000 0.500000 + 0.312500 0.500000 0.625000 + 0.250000 0.250000 0.312500 + 0.250000 0.312500 0.375000 + 0.250000 0.312500 0.500000 + 0.312500 0.375000 0.625000 + 0.312500 0.375000 0.375000 + 0.312500 0.375000 0.500000 + 0.312500 0.500000 0.500000 + 0.187500 0.187500 0.187500 + 0.062500 0.187500 0.187500 + 0.062500 0.250000 0.250000 + 0.187500 0.375000 0.375000 + 0.125000 0.125000 0.187500 + 0.125000 0.187500 0.250000 + 0.187500 0.250000 0.375000 + 0.187500 0.250000 0.250000 + 0.062500 0.062500 0.062500 + 0.062500 0.125000 0.125000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/aiida_fleur/tests/calculation/data_dir/mock-fleur-cb1b08bf8fdd75dbffc23aa733c840d5/shell.out b/aiida_fleur/tests/calculation/data_dir/mock-fleur-cb1b08bf8fdd75dbffc23aa733c840d5/shell.out new file mode 100644 index 000000000..39ea32f54 --- /dev/null +++ b/aiida_fleur/tests/calculation/data_dir/mock-fleur-cb1b08bf8fdd75dbffc23aa733c840d5/shell.out @@ -0,0 +1,58 @@ + Welcome to FLEUR (www.flapw.de) + MaX-Release 4.0 (www.max-centre.eu) + stars are always ordered + -------------------------------------------------------- + Number of OMP-threads: 6 + -------------------------------------------------------- + Iteration: 1 Distance: 8.14211820818857 + Test for time of next iteration: + Time provided (min): 10 + Time used (min): 1 + Time per iter (min): 1 + Iteration: 2 Distance: 7.69204733499305 + Test for time of next iteration: + Time provided (min): 10 + Time used (min): 1 + Time per iter (min): 1 + Iteration: 3 Distance: 0.856944507774482 + Test for time of next iteration: + Time provided (min): 10 + Time used (min): 1 + Time per iter (min): 1 + Iteration: 4 Distance: 0.501438298333166 + Test for time of next iteration: + Time provided (min): 10 + Time used (min): 1 + Time per iter (min): 1 + Iteration: 5 Distance: 0.205605182835176 + Test for time of next iteration: + Time provided (min): 10 + Time used (min): 1 + Time per iter (min): 1 + Iteration: 6 Distance: 1.852288794887397E-002 + Test for time of next iteration: + Time provided (min): 10 + Time used (min): 1 + Time per iter (min): 1 + Iteration: 7 Distance: 1.291466956872122E-002 + Test for time of next iteration: + Time provided (min): 10 + Time used (min): 1 + Time per iter (min): 1 + Iteration: 8 Distance: 1.303177341130901E-003 + Test for time of next iteration: + Time provided (min): 10 + Time used (min): 1 + Time per iter (min): 1 + Iteration: 9 Distance: 1.207653876674686E-003 + Test for time of next iteration: + Time provided (min): 10 + Time used (min): 1 + Time per iter (min): 1 + Iteration: 10 Distance: 1.741120625902552E-004 + Test for time of next iteration: + Time provided (min): 10 + Time used (min): 1 + Time per iter (min): 1 + Iteration: 11 Distance: 3.295348349644261E-005 + Usage data send using curl: usage.json diff --git a/aiida_fleur/tests/calculation/data_dir/mock-inpgen-0e79463ff639be2cbb7c7d98aaadd1df/FleurInputSchema.xsd b/aiida_fleur/tests/calculation/data_dir/mock-inpgen-0e79463ff639be2cbb7c7d98aaadd1df/FleurInputSchema.xsd new file mode 100644 index 000000000..5053d677e --- /dev/null +++ b/aiida_fleur/tests/calculation/data_dir/mock-inpgen-0e79463ff639be2cbb7c7d98aaadd1df/FleurInputSchema.xsd @@ -0,0 +1,1037 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/aiida_fleur/tests/calculation/data_dir/mock-inpgen-0e79463ff639be2cbb7c7d98aaadd1df/_scheduler-stderr.txt b/aiida_fleur/tests/calculation/data_dir/mock-inpgen-0e79463ff639be2cbb7c7d98aaadd1df/_scheduler-stderr.txt new file mode 100644 index 000000000..e69de29bb diff --git a/aiida_fleur/tests/calculation/data_dir/mock-inpgen-0e79463ff639be2cbb7c7d98aaadd1df/_scheduler-stdout.txt b/aiida_fleur/tests/calculation/data_dir/mock-inpgen-0e79463ff639be2cbb7c7d98aaadd1df/_scheduler-stdout.txt new file mode 100644 index 000000000..e69de29bb diff --git a/aiida_fleur/tests/calculation/data_dir/mock-inpgen-0e79463ff639be2cbb7c7d98aaadd1df/aiida.in b/aiida_fleur/tests/calculation/data_dir/mock-inpgen-0e79463ff639be2cbb7c7d98aaadd1df/aiida.in new file mode 100644 index 000000000..791480719 --- /dev/null +++ b/aiida_fleur/tests/calculation/data_dir/mock-inpgen-0e79463ff639be2cbb7c7d98aaadd1df/aiida.in @@ -0,0 +1,17 @@ +A Fleur input generator calculation with aiida +&input cartesian=F / + 5.9805107790 0.0000000000 0.0000000000 + 0.0000000000 5.9805107790 0.0000000000 + 0.0000000000 0.0000000000 5.9805107790 + 1.0000000000 + 1.0000000000 1.0000000000 1.0000000000 + + 2 + 74 0.0000000000 0.0000000000 0.0000000000 + 74 0.5000000000 0.5000000000 0.5000000000 +&atom + econfig="[Kr] 4d10 4f14 | 5s2 5p6 6s2 5d4" element="W" jri=981 lmax=12 lnonsph=6 lo="5s 5p" rmt=2.1 / +&comp + gmax=15.0 gmaxxc=12.5 kmax=5.0 / +&kpt + div1=3 div2=3 div3=3 tkb=0.0005 / diff --git a/aiida_fleur/tests/calculation/data_dir/mock-inpgen-0e79463ff639be2cbb7c7d98aaadd1df/inp.xml b/aiida_fleur/tests/calculation/data_dir/mock-inpgen-0e79463ff639be2cbb7c7d98aaadd1df/inp.xml new file mode 100644 index 000000000..228256043 --- /dev/null +++ b/aiida_fleur/tests/calculation/data_dir/mock-inpgen-0e79463ff639be2cbb7c7d98aaadd1df/inp.xml @@ -0,0 +1,324 @@ + + + + A Fleur input generator calculation with aiida + + + + + + + + + + .0000000000 .0000000000 .0000000000 + + + + + + + 0.333333 0.333333 0.333333 + 0.333333 0.333333 0.000000 + 0.333333 0.000000 0.000000 + 0.000000 0.000000 0.000000 + + + + + + + + + + + 1 0 0 .0000000000 + 0 1 0 .0000000000 + 0 0 1 .0000000000 + + + -1 0 0 .0000000000 + 0 1 0 .0000000000 + 0 0 1 .0000000000 + + + 1 0 0 .0000000000 + 0 -1 0 .0000000000 + 0 0 1 .0000000000 + + + -1 0 0 .0000000000 + 0 -1 0 .0000000000 + 0 0 1 .0000000000 + + + 0 -1 0 .0000000000 + -1 0 0 .0000000000 + 0 0 1 .0000000000 + + + 0 -1 0 .0000000000 + 1 0 0 .0000000000 + 0 0 1 .0000000000 + + + 0 1 0 .0000000000 + -1 0 0 .0000000000 + 0 0 1 .0000000000 + + + 0 1 0 .0000000000 + 1 0 0 .0000000000 + 0 0 1 .0000000000 + + + 1 0 0 .0000000000 + 0 1 0 .0000000000 + 0 0 -1 .0000000000 + + + -1 0 0 .0000000000 + 0 1 0 .0000000000 + 0 0 -1 .0000000000 + + + 1 0 0 .0000000000 + 0 -1 0 .0000000000 + 0 0 -1 .0000000000 + + + -1 0 0 .0000000000 + 0 -1 0 .0000000000 + 0 0 -1 .0000000000 + + + 0 -1 0 .0000000000 + -1 0 0 .0000000000 + 0 0 -1 .0000000000 + + + 0 -1 0 .0000000000 + 1 0 0 .0000000000 + 0 0 -1 .0000000000 + + + 0 1 0 .0000000000 + -1 0 0 .0000000000 + 0 0 -1 .0000000000 + + + 0 1 0 .0000000000 + 1 0 0 .0000000000 + 0 0 -1 .0000000000 + + + 1 0 0 .0000000000 + 0 0 -1 .0000000000 + 0 -1 0 .0000000000 + + + -1 0 0 .0000000000 + 0 0 -1 .0000000000 + 0 -1 0 .0000000000 + + + 0 -1 0 .0000000000 + 0 0 -1 .0000000000 + -1 0 0 .0000000000 + + + 0 -1 0 .0000000000 + 0 0 -1 .0000000000 + 1 0 0 .0000000000 + + + 0 1 0 .0000000000 + 0 0 -1 .0000000000 + -1 0 0 .0000000000 + + + 0 1 0 .0000000000 + 0 0 -1 .0000000000 + 1 0 0 .0000000000 + + + 1 0 0 .0000000000 + 0 0 -1 .0000000000 + 0 1 0 .0000000000 + + + -1 0 0 .0000000000 + 0 0 -1 .0000000000 + 0 1 0 .0000000000 + + + 0 0 -1 .0000000000 + 0 1 0 .0000000000 + -1 0 0 .0000000000 + + + 0 0 -1 .0000000000 + 0 1 0 .0000000000 + 1 0 0 .0000000000 + + + 0 0 -1 .0000000000 + -1 0 0 .0000000000 + 0 -1 0 .0000000000 + + + 0 0 -1 .0000000000 + 1 0 0 .0000000000 + 0 -1 0 .0000000000 + + + 0 0 -1 .0000000000 + 0 -1 0 .0000000000 + -1 0 0 .0000000000 + + + 0 0 -1 .0000000000 + 0 -1 0 .0000000000 + 1 0 0 .0000000000 + + + 0 0 -1 .0000000000 + -1 0 0 .0000000000 + 0 1 0 .0000000000 + + + 0 0 -1 .0000000000 + 1 0 0 .0000000000 + 0 1 0 .0000000000 + + + 0 0 1 .0000000000 + 0 1 0 .0000000000 + -1 0 0 .0000000000 + + + 0 0 1 .0000000000 + 0 1 0 .0000000000 + 1 0 0 .0000000000 + + + 0 0 1 .0000000000 + -1 0 0 .0000000000 + 0 -1 0 .0000000000 + + + 0 0 1 .0000000000 + 1 0 0 .0000000000 + 0 -1 0 .0000000000 + + + 0 0 1 .0000000000 + 0 -1 0 .0000000000 + -1 0 0 .0000000000 + + + 0 0 1 .0000000000 + 0 -1 0 .0000000000 + 1 0 0 .0000000000 + + + 0 0 1 .0000000000 + -1 0 0 .0000000000 + 0 1 0 .0000000000 + + + 0 0 1 .0000000000 + 1 0 0 .0000000000 + 0 1 0 .0000000000 + + + 1 0 0 .0000000000 + 0 0 1 .0000000000 + 0 -1 0 .0000000000 + + + -1 0 0 .0000000000 + 0 0 1 .0000000000 + 0 -1 0 .0000000000 + + + 0 -1 0 .0000000000 + 0 0 1 .0000000000 + -1 0 0 .0000000000 + + + 0 -1 0 .0000000000 + 0 0 1 .0000000000 + 1 0 0 .0000000000 + + + 0 1 0 .0000000000 + 0 0 1 .0000000000 + -1 0 0 .0000000000 + + + 0 1 0 .0000000000 + 0 0 1 .0000000000 + 1 0 0 .0000000000 + + + 1 0 0 .0000000000 + 0 0 1 .0000000000 + 0 1 0 .0000000000 + + + -1 0 0 .0000000000 + 0 0 1 .0000000000 + 0 1 0 .0000000000 + + + + + 5.980510779000000 .000000000000000 .000000000000000 + .000000000000000 5.980510779000000 .000000000000000 + .000000000000000 .000000000000000 5.980510779000000 + + + + + + + + + + + + [Kr] (4d3/2) (4d5/2) (4f5/2) (4f7/2) + (5s1/2) (5p1/2) (5p3/2) (6s1/2) (5d3/2) (5d5/2) + + + + + + + + + + .0000000000 .0000000000 .0000000000 + + + + + 1.000/2.000 1.000/2.000 1.000/2.000 + + + + + + + + + + + + + + + + + diff --git a/aiida_fleur/tests/calculation/data_dir/mock-inpgen-0e79463ff639be2cbb7c7d98aaadd1df/out b/aiida_fleur/tests/calculation/data_dir/mock-inpgen-0e79463ff639be2cbb7c7d98aaadd1df/out new file mode 100644 index 000000000..ac6a89ae5 --- /dev/null +++ b/aiida_fleur/tests/calculation/data_dir/mock-inpgen-0e79463ff639be2cbb7c7d98aaadd1df/out @@ -0,0 +1,733 @@ +line: 1>A Fleur input generator calculation with aiida +line: 2>&input cartesian=F / +line: 3>5.9805107790 0.0000000000 0.0000000000 +line: 4>0.0000000000 5.9805107790 0.0000000000 +line: 5>0.0000000000 0.0000000000 5.9805107790 +line: 6>1.0000000000 +line: 7>1.0000000000 1.0000000000 1.0000000000 +line: 8> +line: 9>2 +line: 10>74 0.0000000000 0.0000000000 0.0000000000 +line: 11>74 0.5000000000 0.5000000000 0.5000000000 +line: 12>&atom +line: 13>econfig="[Kr] 4d10 4f14 | 5s2 5p6 6s2 5d4" element="W" jri=981 lm + + A Fleur input generator calculation with aiida + + film= F cartesian= F + checkinp= F symor= F + +a1 = 5.98051 0.00000 0.00000 +a2 = 0.00000 5.98051 0.00000 +a3 = 0.00000 0.00000 5.98051 + +dvac= 5.98051 aa = 1.00000 +scale = 1.00000 1.00000 1.00000 + +natin= 2 Z = 74 74 + positions: + 0.00000 0.00000 0.00000 + 0.50000 0.50000 0.50000 + + generators: 0 (excluding identity) + + + Lattice information: + -------------------- + + overall lattice constant a0 = 1.000000 bohr + + real-space primitive lattice vectors in units of a_{x,y,z} + a_1: 5.980511 0.000000 0.000000 + a_2: 0.000000 5.980511 0.000000 + a_3: 0.000000 0.000000 5.980511 + + lattice constants a_x, a_y, a_z = 1.000000 1.000000 1.000000 + volume of unit cell (a.u.^3) = 213.901994 + +dbg: lattice matrices + 213.901993664648 +dbg: as : + 5.980511 0.000000 0.000000 + 0.000000 5.980511 0.000000 + 0.000000 0.000000 5.980511 +dbg: bs : + 0.167210 0.000000 0.000000 + 0.000000 0.167210 0.000000 + 0.000000 0.000000 0.167210 +dbg: amat : + 5.980511 0.000000 0.000000 + 0.000000 5.980511 0.000000 + 0.000000 0.000000 5.980511 +dbg: bmat : + 0.525305 0.000000 0.000000 + 0.000000 0.525305 0.000000 + 0.000000 0.000000 0.525305 +dbg: amatinv : + 0.167210 0.000000 0.000000 + 0.000000 0.167210 0.000000 + 0.000000 0.000000 0.167210 +dbg: aamat : + 35.766509 0.000000 0.000000 + 0.000000 35.766509 0.000000 + 0.000000 0.000000 35.766509 +dbg: bbmat : + 0.275945 0.000000 0.000000 + 0.000000 0.275945 0.000000 + 0.000000 0.000000 0.275945 + +dbg: lattice vectors : +vector 1 : 5.98051 0.00000 0.00000 length : 5.98051 +vector 2 : 0.00000 5.98051 0.00000 length : 5.98051 +vector 3 : 0.00000 0.00000 5.98051 length : 5.98051 +angle between vectors (1,2) = 90.00000 +angle between vectors (1,3) = 90.00000 +angle between vectors (2,3) = 90.00000 + +dbg: reciprocal lattice vectors : +vector 1 : 0.52531 0.00000 0.00000 length : 0.52531 +vector 2 : 0.00000 0.52531 0.00000 length : 0.52531 +vector 3 : 0.00000 0.00000 0.52531 length : 0.52531 +angle between vectors (1,2) = 90.00000 +angle between vectors (1,3) = 90.00000 +angle between vectors (2,3) = 90.00000 + + + Point group of the Bravais lattice has 48 operations + + The system appears to be a supercell containing 2 primitive cells: + 1 0.000000 0.000000 0.000000 + 2 0.500000 0.500000 0.500000 + + DBG: symor,zorth,oldfleur : T T F + DBG: optype : 1 -2 -2 2 -2 4 4 -2 -2 2 2 -1 2 -4 -4 2 -2 2 -3 3 3 -3 4 -4 -2 4 -3 3 2 -4 3 -3 4 -2 3 -3 -4 2 -3 3 4 -4 3 -3 -3 3 -2 2 + DBG: invsym,invs,zrfs,invs2 : T T T T + DBG: (before reorder) invsop,zrfsop,invs2op : 12 9 4 + + Space group information: + ------------------------ + 48 operations + space group is symmorphic + has inversion symmetry + has 2d inversion + has z-reflection + + + Operations: (in International notation) + --------------------------------------- + lattice coordinates (scaled) Cartesian coordinates + + operation 1: 1 (inverse = 1) + ( 1 0 0 ) ( 0.000 ) ( 1.00000 0.00000 0.00000 ) ( 0.000 ) + ( 0 1 0 ) ( 0.000 ) ( 0.00000 1.00000 0.00000 ) ( 0.000 ) + ( 0 0 1 ) ( 0.000 ) ( 0.00000 0.00000 1.00000 ) ( 0.000 ) + _ + operation 2: 2 (inverse = 2) + ( -1 0 0 ) ( 0.000 ) ( -1.00000 0.00000 0.00000 ) ( 0.000 ) + ( 0 1 0 ) ( 0.000 ) ( 0.00000 1.00000 0.00000 ) ( 0.000 ) + ( 0 0 1 ) ( 0.000 ) ( 0.00000 0.00000 1.00000 ) ( 0.000 ) + _ + operation 3: 2 (inverse = 3) + ( 1 0 0 ) ( 0.000 ) ( 1.00000 0.00000 0.00000 ) ( 0.000 ) + ( 0 -1 0 ) ( 0.000 ) ( 0.00000 -1.00000 0.00000 ) ( 0.000 ) + ( 0 0 1 ) ( 0.000 ) ( 0.00000 0.00000 1.00000 ) ( 0.000 ) + + operation 4: 2 (inverse = 4) + ( -1 0 0 ) ( 0.000 ) ( -1.00000 0.00000 0.00000 ) ( 0.000 ) + ( 0 -1 0 ) ( 0.000 ) ( 0.00000 -1.00000 0.00000 ) ( 0.000 ) + ( 0 0 1 ) ( 0.000 ) ( 0.00000 0.00000 1.00000 ) ( 0.000 ) + _ + operation 5: 2 (inverse = 5) + ( 0 -1 0 ) ( 0.000 ) ( 0.00000 -1.00000 0.00000 ) ( 0.000 ) + ( -1 0 0 ) ( 0.000 ) ( -1.00000 0.00000 0.00000 ) ( 0.000 ) + ( 0 0 1 ) ( 0.000 ) ( 0.00000 0.00000 1.00000 ) ( 0.000 ) + + operation 6: 4 (inverse = 7) + ( 0 -1 0 ) ( 0.000 ) ( 0.00000 -1.00000 0.00000 ) ( 0.000 ) + ( 1 0 0 ) ( 0.000 ) ( 1.00000 0.00000 0.00000 ) ( 0.000 ) + ( 0 0 1 ) ( 0.000 ) ( 0.00000 0.00000 1.00000 ) ( 0.000 ) + + operation 7: 4 (inverse = 6) + ( 0 1 0 ) ( 0.000 ) ( 0.00000 1.00000 0.00000 ) ( 0.000 ) + ( -1 0 0 ) ( 0.000 ) ( -1.00000 0.00000 0.00000 ) ( 0.000 ) + ( 0 0 1 ) ( 0.000 ) ( 0.00000 0.00000 1.00000 ) ( 0.000 ) + _ + operation 8: 2 (inverse = 8) + ( 0 1 0 ) ( 0.000 ) ( 0.00000 1.00000 0.00000 ) ( 0.000 ) + ( 1 0 0 ) ( 0.000 ) ( 1.00000 0.00000 0.00000 ) ( 0.000 ) + ( 0 0 1 ) ( 0.000 ) ( 0.00000 0.00000 1.00000 ) ( 0.000 ) + _ + operation 9: 2 (inverse = 9) + ( 1 0 0 ) ( 0.000 ) ( 1.00000 0.00000 0.00000 ) ( 0.000 ) + ( 0 1 0 ) ( 0.000 ) ( 0.00000 1.00000 0.00000 ) ( 0.000 ) + ( 0 0 -1 ) ( 0.000 ) ( 0.00000 0.00000 -1.00000 ) ( 0.000 ) + + operation 10: 2 (inverse = 10) + ( -1 0 0 ) ( 0.000 ) ( -1.00000 0.00000 0.00000 ) ( 0.000 ) + ( 0 1 0 ) ( 0.000 ) ( 0.00000 1.00000 0.00000 ) ( 0.000 ) + ( 0 0 -1 ) ( 0.000 ) ( 0.00000 0.00000 -1.00000 ) ( 0.000 ) + + operation 11: 2 (inverse = 11) + ( 1 0 0 ) ( 0.000 ) ( 1.00000 0.00000 0.00000 ) ( 0.000 ) + ( 0 -1 0 ) ( 0.000 ) ( 0.00000 -1.00000 0.00000 ) ( 0.000 ) + ( 0 0 -1 ) ( 0.000 ) ( 0.00000 0.00000 -1.00000 ) ( 0.000 ) + _ + operation 12: 1 (inverse = 12) + ( -1 0 0 ) ( 0.000 ) ( -1.00000 0.00000 0.00000 ) ( 0.000 ) + ( 0 -1 0 ) ( 0.000 ) ( 0.00000 -1.00000 0.00000 ) ( 0.000 ) + ( 0 0 -1 ) ( 0.000 ) ( 0.00000 0.00000 -1.00000 ) ( 0.000 ) + + operation 13: 2 (inverse = 13) + ( 0 -1 0 ) ( 0.000 ) ( 0.00000 -1.00000 0.00000 ) ( 0.000 ) + ( -1 0 0 ) ( 0.000 ) ( -1.00000 0.00000 0.00000 ) ( 0.000 ) + ( 0 0 -1 ) ( 0.000 ) ( 0.00000 0.00000 -1.00000 ) ( 0.000 ) + _ + operation 14: 4 (inverse = 15) + ( 0 -1 0 ) ( 0.000 ) ( 0.00000 -1.00000 0.00000 ) ( 0.000 ) + ( 1 0 0 ) ( 0.000 ) ( 1.00000 0.00000 0.00000 ) ( 0.000 ) + ( 0 0 -1 ) ( 0.000 ) ( 0.00000 0.00000 -1.00000 ) ( 0.000 ) + _ + operation 15: 4 (inverse = 14) + ( 0 1 0 ) ( 0.000 ) ( 0.00000 1.00000 0.00000 ) ( 0.000 ) + ( -1 0 0 ) ( 0.000 ) ( -1.00000 0.00000 0.00000 ) ( 0.000 ) + ( 0 0 -1 ) ( 0.000 ) ( 0.00000 0.00000 -1.00000 ) ( 0.000 ) + + operation 16: 2 (inverse = 16) + ( 0 1 0 ) ( 0.000 ) ( 0.00000 1.00000 0.00000 ) ( 0.000 ) + ( 1 0 0 ) ( 0.000 ) ( 1.00000 0.00000 0.00000 ) ( 0.000 ) + ( 0 0 -1 ) ( 0.000 ) ( 0.00000 0.00000 -1.00000 ) ( 0.000 ) + _ + operation 17: 2 (inverse = 17) + ( 1 0 0 ) ( 0.000 ) ( 1.00000 0.00000 0.00000 ) ( 0.000 ) + ( 0 0 -1 ) ( 0.000 ) ( 0.00000 0.00000 -1.00000 ) ( 0.000 ) + ( 0 -1 0 ) ( 0.000 ) ( 0.00000 -1.00000 0.00000 ) ( 0.000 ) + + operation 18: 2 (inverse = 18) + ( -1 0 0 ) ( 0.000 ) ( -1.00000 0.00000 0.00000 ) ( 0.000 ) + ( 0 0 -1 ) ( 0.000 ) ( 0.00000 0.00000 -1.00000 ) ( 0.000 ) + ( 0 -1 0 ) ( 0.000 ) ( 0.00000 -1.00000 0.00000 ) ( 0.000 ) + _ + operation 19: 3 (inverse = 27) + ( 0 -1 0 ) ( 0.000 ) ( 0.00000 -1.00000 0.00000 ) ( 0.000 ) + ( 0 0 -1 ) ( 0.000 ) ( 0.00000 0.00000 -1.00000 ) ( 0.000 ) + ( -1 0 0 ) ( 0.000 ) ( -1.00000 0.00000 0.00000 ) ( 0.000 ) + + operation 20: 3 (inverse = 35) + ( 0 -1 0 ) ( 0.000 ) ( 0.00000 -1.00000 0.00000 ) ( 0.000 ) + ( 0 0 -1 ) ( 0.000 ) ( 0.00000 0.00000 -1.00000 ) ( 0.000 ) + ( 1 0 0 ) ( 0.000 ) ( 1.00000 0.00000 0.00000 ) ( 0.000 ) + + operation 21: 3 (inverse = 28) + ( 0 1 0 ) ( 0.000 ) ( 0.00000 1.00000 0.00000 ) ( 0.000 ) + ( 0 0 -1 ) ( 0.000 ) ( 0.00000 0.00000 -1.00000 ) ( 0.000 ) + ( -1 0 0 ) ( 0.000 ) ( -1.00000 0.00000 0.00000 ) ( 0.000 ) + _ + operation 22: 3 (inverse = 36) + ( 0 1 0 ) ( 0.000 ) ( 0.00000 1.00000 0.00000 ) ( 0.000 ) + ( 0 0 -1 ) ( 0.000 ) ( 0.00000 0.00000 -1.00000 ) ( 0.000 ) + ( 1 0 0 ) ( 0.000 ) ( 1.00000 0.00000 0.00000 ) ( 0.000 ) + + operation 23: 4 (inverse = 41) + ( 1 0 0 ) ( 0.000 ) ( 1.00000 0.00000 0.00000 ) ( 0.000 ) + ( 0 0 -1 ) ( 0.000 ) ( 0.00000 0.00000 -1.00000 ) ( 0.000 ) + ( 0 1 0 ) ( 0.000 ) ( 0.00000 1.00000 0.00000 ) ( 0.000 ) + _ + operation 24: 4 (inverse = 42) + ( -1 0 0 ) ( 0.000 ) ( -1.00000 0.00000 0.00000 ) ( 0.000 ) + ( 0 0 -1 ) ( 0.000 ) ( 0.00000 0.00000 -1.00000 ) ( 0.000 ) + ( 0 1 0 ) ( 0.000 ) ( 0.00000 1.00000 0.00000 ) ( 0.000 ) + _ + operation 25: 2 (inverse = 25) + ( 0 0 -1 ) ( 0.000 ) ( 0.00000 0.00000 -1.00000 ) ( 0.000 ) + ( 0 1 0 ) ( 0.000 ) ( 0.00000 1.00000 0.00000 ) ( 0.000 ) + ( -1 0 0 ) ( 0.000 ) ( -1.00000 0.00000 0.00000 ) ( 0.000 ) + + operation 26: 4 (inverse = 33) + ( 0 0 -1 ) ( 0.000 ) ( 0.00000 0.00000 -1.00000 ) ( 0.000 ) + ( 0 1 0 ) ( 0.000 ) ( 0.00000 1.00000 0.00000 ) ( 0.000 ) + ( 1 0 0 ) ( 0.000 ) ( 1.00000 0.00000 0.00000 ) ( 0.000 ) + _ + operation 27: 3 (inverse = 19) + ( 0 0 -1 ) ( 0.000 ) ( 0.00000 0.00000 -1.00000 ) ( 0.000 ) + ( -1 0 0 ) ( 0.000 ) ( -1.00000 0.00000 0.00000 ) ( 0.000 ) + ( 0 -1 0 ) ( 0.000 ) ( 0.00000 -1.00000 0.00000 ) ( 0.000 ) + + operation 28: 3 (inverse = 21) + ( 0 0 -1 ) ( 0.000 ) ( 0.00000 0.00000 -1.00000 ) ( 0.000 ) + ( 1 0 0 ) ( 0.000 ) ( 1.00000 0.00000 0.00000 ) ( 0.000 ) + ( 0 -1 0 ) ( 0.000 ) ( 0.00000 -1.00000 0.00000 ) ( 0.000 ) + + operation 29: 2 (inverse = 29) + ( 0 0 -1 ) ( 0.000 ) ( 0.00000 0.00000 -1.00000 ) ( 0.000 ) + ( 0 -1 0 ) ( 0.000 ) ( 0.00000 -1.00000 0.00000 ) ( 0.000 ) + ( -1 0 0 ) ( 0.000 ) ( -1.00000 0.00000 0.00000 ) ( 0.000 ) + _ + operation 30: 4 (inverse = 37) + ( 0 0 -1 ) ( 0.000 ) ( 0.00000 0.00000 -1.00000 ) ( 0.000 ) + ( 0 -1 0 ) ( 0.000 ) ( 0.00000 -1.00000 0.00000 ) ( 0.000 ) + ( 1 0 0 ) ( 0.000 ) ( 1.00000 0.00000 0.00000 ) ( 0.000 ) + + operation 31: 3 (inverse = 43) + ( 0 0 -1 ) ( 0.000 ) ( 0.00000 0.00000 -1.00000 ) ( 0.000 ) + ( -1 0 0 ) ( 0.000 ) ( -1.00000 0.00000 0.00000 ) ( 0.000 ) + ( 0 1 0 ) ( 0.000 ) ( 0.00000 1.00000 0.00000 ) ( 0.000 ) + _ + operation 32: 3 (inverse = 45) + ( 0 0 -1 ) ( 0.000 ) ( 0.00000 0.00000 -1.00000 ) ( 0.000 ) + ( 1 0 0 ) ( 0.000 ) ( 1.00000 0.00000 0.00000 ) ( 0.000 ) + ( 0 1 0 ) ( 0.000 ) ( 0.00000 1.00000 0.00000 ) ( 0.000 ) + + operation 33: 4 (inverse = 26) + ( 0 0 1 ) ( 0.000 ) ( 0.00000 0.00000 1.00000 ) ( 0.000 ) + ( 0 1 0 ) ( 0.000 ) ( 0.00000 1.00000 0.00000 ) ( 0.000 ) + ( -1 0 0 ) ( 0.000 ) ( -1.00000 0.00000 0.00000 ) ( 0.000 ) + _ + operation 34: 2 (inverse = 34) + ( 0 0 1 ) ( 0.000 ) ( 0.00000 0.00000 1.00000 ) ( 0.000 ) + ( 0 1 0 ) ( 0.000 ) ( 0.00000 1.00000 0.00000 ) ( 0.000 ) + ( 1 0 0 ) ( 0.000 ) ( 1.00000 0.00000 0.00000 ) ( 0.000 ) + + operation 35: 3 (inverse = 20) + ( 0 0 1 ) ( 0.000 ) ( 0.00000 0.00000 1.00000 ) ( 0.000 ) + ( -1 0 0 ) ( 0.000 ) ( -1.00000 0.00000 0.00000 ) ( 0.000 ) + ( 0 -1 0 ) ( 0.000 ) ( 0.00000 -1.00000 0.00000 ) ( 0.000 ) + _ + operation 36: 3 (inverse = 22) + ( 0 0 1 ) ( 0.000 ) ( 0.00000 0.00000 1.00000 ) ( 0.000 ) + ( 1 0 0 ) ( 0.000 ) ( 1.00000 0.00000 0.00000 ) ( 0.000 ) + ( 0 -1 0 ) ( 0.000 ) ( 0.00000 -1.00000 0.00000 ) ( 0.000 ) + _ + operation 37: 4 (inverse = 30) + ( 0 0 1 ) ( 0.000 ) ( 0.00000 0.00000 1.00000 ) ( 0.000 ) + ( 0 -1 0 ) ( 0.000 ) ( 0.00000 -1.00000 0.00000 ) ( 0.000 ) + ( -1 0 0 ) ( 0.000 ) ( -1.00000 0.00000 0.00000 ) ( 0.000 ) + + operation 38: 2 (inverse = 38) + ( 0 0 1 ) ( 0.000 ) ( 0.00000 0.00000 1.00000 ) ( 0.000 ) + ( 0 -1 0 ) ( 0.000 ) ( 0.00000 -1.00000 0.00000 ) ( 0.000 ) + ( 1 0 0 ) ( 0.000 ) ( 1.00000 0.00000 0.00000 ) ( 0.000 ) + _ + operation 39: 3 (inverse = 44) + ( 0 0 1 ) ( 0.000 ) ( 0.00000 0.00000 1.00000 ) ( 0.000 ) + ( -1 0 0 ) ( 0.000 ) ( -1.00000 0.00000 0.00000 ) ( 0.000 ) + ( 0 1 0 ) ( 0.000 ) ( 0.00000 1.00000 0.00000 ) ( 0.000 ) + + operation 40: 3 (inverse = 46) + ( 0 0 1 ) ( 0.000 ) ( 0.00000 0.00000 1.00000 ) ( 0.000 ) + ( 1 0 0 ) ( 0.000 ) ( 1.00000 0.00000 0.00000 ) ( 0.000 ) + ( 0 1 0 ) ( 0.000 ) ( 0.00000 1.00000 0.00000 ) ( 0.000 ) + + operation 41: 4 (inverse = 23) + ( 1 0 0 ) ( 0.000 ) ( 1.00000 0.00000 0.00000 ) ( 0.000 ) + ( 0 0 1 ) ( 0.000 ) ( 0.00000 0.00000 1.00000 ) ( 0.000 ) + ( 0 -1 0 ) ( 0.000 ) ( 0.00000 -1.00000 0.00000 ) ( 0.000 ) + _ + operation 42: 4 (inverse = 24) + ( -1 0 0 ) ( 0.000 ) ( -1.00000 0.00000 0.00000 ) ( 0.000 ) + ( 0 0 1 ) ( 0.000 ) ( 0.00000 0.00000 1.00000 ) ( 0.000 ) + ( 0 -1 0 ) ( 0.000 ) ( 0.00000 -1.00000 0.00000 ) ( 0.000 ) + + operation 43: 3 (inverse = 31) + ( 0 -1 0 ) ( 0.000 ) ( 0.00000 -1.00000 0.00000 ) ( 0.000 ) + ( 0 0 1 ) ( 0.000 ) ( 0.00000 0.00000 1.00000 ) ( 0.000 ) + ( -1 0 0 ) ( 0.000 ) ( -1.00000 0.00000 0.00000 ) ( 0.000 ) + _ + operation 44: 3 (inverse = 39) + ( 0 -1 0 ) ( 0.000 ) ( 0.00000 -1.00000 0.00000 ) ( 0.000 ) + ( 0 0 1 ) ( 0.000 ) ( 0.00000 0.00000 1.00000 ) ( 0.000 ) + ( 1 0 0 ) ( 0.000 ) ( 1.00000 0.00000 0.00000 ) ( 0.000 ) + _ + operation 45: 3 (inverse = 32) + ( 0 1 0 ) ( 0.000 ) ( 0.00000 1.00000 0.00000 ) ( 0.000 ) + ( 0 0 1 ) ( 0.000 ) ( 0.00000 0.00000 1.00000 ) ( 0.000 ) + ( -1 0 0 ) ( 0.000 ) ( -1.00000 0.00000 0.00000 ) ( 0.000 ) + + operation 46: 3 (inverse = 40) + ( 0 1 0 ) ( 0.000 ) ( 0.00000 1.00000 0.00000 ) ( 0.000 ) + ( 0 0 1 ) ( 0.000 ) ( 0.00000 0.00000 1.00000 ) ( 0.000 ) + ( 1 0 0 ) ( 0.000 ) ( 1.00000 0.00000 0.00000 ) ( 0.000 ) + _ + operation 47: 2 (inverse = 47) + ( 1 0 0 ) ( 0.000 ) ( 1.00000 0.00000 0.00000 ) ( 0.000 ) + ( 0 0 1 ) ( 0.000 ) ( 0.00000 0.00000 1.00000 ) ( 0.000 ) + ( 0 1 0 ) ( 0.000 ) ( 0.00000 1.00000 0.00000 ) ( 0.000 ) + + operation 48: 2 (inverse = 48) + ( -1 0 0 ) ( 0.000 ) ( -1.00000 0.00000 0.00000 ) ( 0.000 ) + ( 0 0 1 ) ( 0.000 ) ( 0.00000 0.00000 1.00000 ) ( 0.000 ) + ( 0 1 0 ) ( 0.000 ) ( 0.00000 1.00000 0.00000 ) ( 0.000 ) + + Multiplcation table: {R_j|t_j}{R_i|t_i} + operation j= 1 : 1 2 3 4 5 6 7 8 9 10 11 12 + 13 14 15 16 17 18 19 20 21 22 23 24 + 25 26 27 28 29 30 31 32 33 34 35 36 + 37 38 39 40 41 42 43 44 45 46 47 48 + operation j= 2 : 2 1 4 3 7 8 5 6 10 9 12 11 + 15 16 13 14 18 17 21 22 19 20 24 23 + 33 34 35 36 37 38 39 40 25 26 27 28 + 29 30 31 32 42 41 45 46 43 44 48 47 + operation j= 3 : 3 4 1 2 6 5 8 7 11 12 9 10 + 14 13 16 15 41 42 43 44 45 46 47 48 + 29 30 28 27 25 26 32 31 37 38 36 35 + 33 34 40 39 17 18 19 20 21 22 23 24 + operation j= 4 : 4 3 2 1 8 7 6 5 12 11 10 9 + 16 15 14 13 42 41 45 46 43 44 48 47 + 37 38 36 35 33 34 40 39 29 30 28 27 + 25 26 32 31 18 17 21 22 19 20 24 23 + operation j= 5 : 5 6 7 8 1 2 3 4 13 14 15 16 + 9 10 11 12 35 36 33 34 37 38 39 40 + 43 44 41 42 45 46 47 48 19 20 17 18 + 21 22 23 24 27 28 25 26 29 30 31 32 + operation j= 6 : 6 5 8 7 3 4 1 2 14 13 16 15 + 11 12 9 10 36 35 37 38 33 34 40 39 + 19 20 17 18 21 22 23 24 43 44 41 42 + 45 46 47 48 28 27 29 30 25 26 32 31 + operation j= 7 : 7 8 5 6 2 1 4 3 15 16 13 14 + 10 9 12 11 27 28 25 26 29 30 31 32 + 45 46 42 41 43 44 48 47 21 22 18 17 + 19 20 24 23 35 36 33 34 37 38 39 40 + operation j= 8 : 8 7 6 5 4 3 2 1 16 15 14 13 + 12 11 10 9 28 27 29 30 25 26 32 31 + 21 22 18 17 19 20 24 23 45 46 42 41 + 43 44 48 47 36 35 37 38 33 34 40 39 + operation j= 9 : 9 10 11 12 13 14 15 16 1 2 3 4 + 5 6 7 8 23 24 20 19 22 21 17 18 + 26 25 31 32 30 29 27 28 34 33 39 40 + 38 37 35 36 47 48 44 43 46 45 41 42 + operation j=10 : 10 9 12 11 15 16 13 14 2 1 4 3 + 7 8 5 6 24 23 22 21 20 19 18 17 + 34 33 39 40 38 37 35 36 26 25 31 32 + 30 29 27 28 48 47 46 45 44 43 42 41 + operation j=11 : 11 12 9 10 14 13 16 15 3 4 1 2 + 6 5 8 7 47 48 44 43 46 45 41 42 + 30 29 32 31 26 25 28 27 38 37 40 39 + 34 33 36 35 23 24 20 19 22 21 17 18 + operation j=12 : 12 11 10 9 16 15 14 13 4 3 2 1 + 8 7 6 5 48 47 46 45 44 43 42 41 + 38 37 40 39 34 33 36 35 30 29 32 31 + 26 25 28 27 24 23 22 21 20 19 18 17 + operation j=13 : 13 14 15 16 9 10 11 12 5 6 7 8 + 1 2 3 4 39 40 34 33 38 37 35 36 + 44 43 47 48 46 45 41 42 20 19 23 24 + 22 21 17 18 31 32 26 25 30 29 27 28 + operation j=14 : 14 13 16 15 11 12 9 10 6 5 8 7 + 3 4 1 2 40 39 38 37 34 33 36 35 + 20 19 23 24 22 21 17 18 44 43 47 48 + 46 45 41 42 32 31 30 29 26 25 28 27 + operation j=15 : 15 16 13 14 10 9 12 11 7 8 5 6 + 2 1 4 3 31 32 26 25 30 29 27 28 + 46 45 48 47 44 43 42 41 22 21 24 23 + 20 19 18 17 39 40 34 33 38 37 35 36 + operation j=16 : 16 15 14 13 12 11 10 9 8 7 6 5 + 4 3 2 1 32 31 30 29 26 25 28 27 + 22 21 24 23 20 19 18 17 46 45 48 47 + 44 43 42 41 40 39 38 37 34 33 36 35 + operation j=17 : 17 18 23 24 20 19 22 21 41 42 47 48 + 44 43 46 45 1 2 6 5 8 7 3 4 + 28 27 26 25 32 31 30 29 36 35 34 33 + 40 39 38 37 9 10 14 13 16 15 11 12 + operation j=18 : 18 17 24 23 22 21 20 19 42 41 48 47 + 46 45 44 43 2 1 8 7 6 5 4 3 + 36 35 34 33 40 39 38 37 28 27 26 25 + 32 31 30 29 10 9 16 15 14 13 12 11 + operation j=19 : 19 20 21 22 23 24 17 18 43 44 45 46 + 47 48 41 42 33 34 40 39 36 35 37 38 + 6 5 1 2 8 7 3 4 14 13 9 10 + 16 15 11 12 25 26 32 31 28 27 29 30 + operation j=20 : 20 19 22 21 17 18 23 24 44 43 46 45 + 41 42 47 48 34 33 36 35 40 39 38 37 + 14 13 9 10 16 15 11 12 6 5 1 2 + 8 7 3 4 26 25 28 27 32 31 30 29 + operation j=21 : 21 22 19 20 24 23 18 17 45 46 43 44 + 48 47 42 41 25 26 32 31 28 27 29 30 + 8 7 2 1 6 5 4 3 16 15 10 9 + 14 13 12 11 33 34 40 39 36 35 37 38 + operation j=22 : 22 21 20 19 18 17 24 23 46 45 44 43 + 42 41 48 47 26 25 28 27 32 31 30 29 + 16 15 10 9 14 13 12 11 8 7 2 1 + 6 5 4 3 34 33 36 35 40 39 38 37 + operation j=23 : 23 24 17 18 19 20 21 22 47 48 41 42 + 43 44 45 46 9 10 14 13 16 15 11 12 + 32 31 25 26 28 27 29 30 40 39 33 34 + 36 35 37 38 1 2 6 5 8 7 3 4 + operation j=24 : 24 23 18 17 21 22 19 20 48 47 42 41 + 45 46 43 44 10 9 16 15 14 13 12 11 + 40 39 33 34 36 35 37 38 32 31 25 26 + 28 27 29 30 2 1 8 7 6 5 4 3 + operation j=25 : 25 26 29 30 31 32 27 28 33 34 37 38 + 39 40 35 36 21 22 23 24 17 18 19 20 + 1 2 7 8 3 4 5 6 9 10 15 16 + 11 12 13 14 45 46 47 48 41 42 43 44 + operation j=26 : 26 25 30 29 27 28 31 32 34 33 38 37 + 35 36 39 40 22 21 17 18 23 24 20 19 + 9 10 15 16 11 12 13 14 1 2 7 8 + 3 4 5 6 46 45 41 42 47 48 44 43 + operation j=27 : 27 28 31 32 26 25 30 29 35 36 39 40 + 34 33 38 37 7 8 1 2 3 4 5 6 + 41 42 46 45 47 48 44 43 17 18 22 21 + 23 24 20 19 15 16 9 10 11 12 13 14 + operation j=28 : 28 27 32 31 30 29 26 25 36 35 40 39 + 38 37 34 33 8 7 3 4 1 2 6 5 + 17 18 22 21 23 24 20 19 41 42 46 45 + 47 48 44 43 16 15 11 12 9 10 14 13 + operation j=29 : 29 30 25 26 32 31 28 27 37 38 33 34 + 40 39 36 35 45 46 47 48 41 42 43 44 + 3 4 8 7 1 2 6 5 11 12 16 15 + 9 10 14 13 21 22 23 24 17 18 19 20 + operation j=30 : 30 29 26 25 28 27 32 31 38 37 34 33 + 36 35 40 39 46 45 41 42 47 48 44 43 + 11 12 16 15 9 10 14 13 3 4 8 7 + 1 2 6 5 22 21 17 18 23 24 20 19 + operation j=31 : 31 32 27 28 25 26 29 30 39 40 35 36 + 33 34 37 38 15 16 9 10 11 12 13 14 + 47 48 45 46 41 42 43 44 23 24 21 22 + 17 18 19 20 7 8 1 2 3 4 5 6 + operation j=32 : 32 31 28 27 29 30 25 26 40 39 36 35 + 37 38 33 34 16 15 11 12 9 10 14 13 + 23 24 21 22 17 18 19 20 47 48 45 46 + 41 42 43 44 8 7 3 4 1 2 6 5 + operation j=33 : 33 34 37 38 39 40 35 36 25 26 29 30 + 31 32 27 28 19 20 24 23 18 17 21 22 + 2 1 5 6 4 3 7 8 10 9 13 14 + 12 11 15 16 43 44 48 47 42 41 45 46 + operation j=34 : 34 33 38 37 35 36 39 40 26 25 30 29 + 27 28 31 32 20 19 18 17 24 23 22 21 + 10 9 13 14 12 11 15 16 2 1 5 6 + 4 3 7 8 44 43 42 41 48 47 46 45 + operation j=35 : 35 36 39 40 34 33 38 37 27 28 31 32 + 26 25 30 29 5 6 2 1 4 3 7 8 + 42 41 44 43 48 47 46 45 18 17 20 19 + 24 23 22 21 13 14 10 9 12 11 15 16 + operation j=36 : 36 35 40 39 38 37 34 33 28 27 32 31 + 30 29 26 25 6 5 4 3 2 1 8 7 + 18 17 20 19 24 23 22 21 42 41 44 43 + 48 47 46 45 14 13 12 11 10 9 16 15 + operation j=37 : 37 38 33 34 40 39 36 35 29 30 25 26 + 32 31 28 27 43 44 48 47 42 41 45 46 + 4 3 6 5 2 1 8 7 12 11 14 13 + 10 9 16 15 19 20 24 23 18 17 21 22 + operation j=38 : 38 37 34 33 36 35 40 39 30 29 26 25 + 28 27 32 31 44 43 42 41 48 47 46 45 + 12 11 14 13 10 9 16 15 4 3 6 5 + 2 1 8 7 20 19 18 17 24 23 22 21 + operation j=39 : 39 40 35 36 33 34 37 38 31 32 27 28 + 25 26 29 30 13 14 10 9 12 11 15 16 + 48 47 43 44 42 41 45 46 24 23 19 20 + 18 17 21 22 5 6 2 1 4 3 7 8 + operation j=40 : 40 39 36 35 37 38 33 34 32 31 28 27 + 29 30 25 26 14 13 12 11 10 9 16 15 + 24 23 19 20 18 17 21 22 48 47 43 44 + 42 41 45 46 6 5 4 3 2 1 8 7 + operation j=41 : 41 42 47 48 44 43 46 45 17 18 23 24 + 20 19 22 21 3 4 5 6 7 8 1 2 + 27 28 30 29 31 32 26 25 35 36 38 37 + 39 40 34 33 11 12 13 14 15 16 9 10 + operation j=42 : 42 41 48 47 46 45 44 43 18 17 24 23 + 22 21 20 19 4 3 7 8 5 6 2 1 + 35 36 38 37 39 40 34 33 27 28 30 29 + 31 32 26 25 12 11 15 16 13 14 10 9 + operation j=43 : 43 44 45 46 47 48 41 42 19 20 21 22 + 23 24 17 18 37 38 39 40 35 36 33 34 + 5 6 3 4 7 8 1 2 13 14 11 12 + 15 16 9 10 29 30 31 32 27 28 25 26 + operation j=44 : 44 43 46 45 41 42 47 48 20 19 22 21 + 17 18 23 24 38 37 35 36 39 40 34 33 + 13 14 11 12 15 16 9 10 5 6 3 4 + 7 8 1 2 30 29 27 28 31 32 26 25 + operation j=45 : 45 46 43 44 48 47 42 41 21 22 19 20 + 24 23 18 17 29 30 31 32 27 28 25 26 + 7 8 4 3 5 6 2 1 15 16 12 11 + 13 14 10 9 37 38 39 40 35 36 33 34 + operation j=46 : 46 45 44 43 42 41 48 47 22 21 20 19 + 18 17 24 23 30 29 27 28 31 32 26 25 + 15 16 12 11 13 14 10 9 7 8 4 3 + 5 6 2 1 38 37 35 36 39 40 34 33 + operation j=47 : 47 48 41 42 43 44 45 46 23 24 17 18 + 19 20 21 22 11 12 13 14 15 16 9 10 + 31 32 29 30 27 28 25 26 39 40 37 38 + 35 36 33 34 3 4 5 6 7 8 1 2 + operation j=48 : 48 47 42 41 45 46 43 44 24 23 18 17 + 21 22 19 20 12 11 15 16 13 14 10 9 + 39 40 37 38 35 36 33 34 31 32 29 30 + 27 28 25 26 4 3 7 8 5 6 2 1 + + + Space group can be generated using 5 generators: 12 20 10 11 5 + + generators (in lattice coordinates): + +&gen 5 + + -1 0 0 0.00000 + 0 -1 0 0.00000 + 0 0 -1 0.00000 + + 0 -1 0 0.00000 + 0 0 -1 0.00000 + 1 0 0 0.00000 + + -1 0 0 0.00000 + 0 1 0 0.00000 + 0 0 -1 0.00000 + + 1 0 0 0.00000 + 0 -1 0 0.00000 + 0 0 -1 0.00000 + + 0 -1 0 0.00000 + -1 0 0 0.00000 + 0 0 1 0.00000 + +/ ! end generators + + + + Atomic positions: + ----------------- + atom types = 2 + total = 2 + + lattice coordinates (scaled) Cartesian coordinates atom + + atom type 1: atomic identification number = 74.0 representative = 1 + 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 1 + + atom type 2: atomic identification number = 74.0 representative = 2 + 0.500000 0.500000 0.500000 2.990255 2.990255 2.990255 2 + +atoms% 2 atoms 2 + Z( 1)= 74 atoms 1 + 0.000000 0.000000 0.000000 1 + Z( 2)= 74 atoms 1 + 0.500000 0.500000 0.500000 2 + ---------------------------------------------------- + Suggested values for input: + + Atom Z lmax jri rmt dx + W 74 10 835 2.524896 0.015949 + W 74 10 835 2.524896 0.015949 +k_max = 3.96056 +G_max =11.88168 + + =============================================== + === modifying atomic input for &(all)atom === + =============================================== + +for atom 1 ( W) changed rmt to 2.100000 +for atom 1 ( W) changed jri to 981 +for atom 1 ( W) changed lmax to 12 +for atom 1 ( W) changed lnonsph to 6 +for atom 1 ( W) set econfig to [Kr] 4d10 4f14 | 5s2 5p6 6s2 5d4 + corestates = 16 with 60.0 electrons + valence st.= 5 with 14.0 electrons +nlod = 2 llod = 1 : 5s5p + nlo( 1) = 2 llo = 0 1 + lonqn = 5 5 +for atom 2 ( W) changed rmt to 2.100000 +for atom 2 ( W) changed jri to 981 +for atom 2 ( W) changed lmax to 12 +for atom 2 ( W) changed lnonsph to 6 +for atom 2 ( W) set econfig to [Kr] 4d10 4f14 | 5s2 5p6 6s2 5d4 + corestates = 16 with 60.0 electrons + valence st.= 5 with 14.0 electrons +nlod = 2 llod = 1 : 5s5p + nlo( 2) = 2 llo = 0 1 + lonqn = 5 5 +line: 14>&comp +line: 15>gmax=15.0 gmaxxc=12.5 kmax=5.0 / + ---------- + core : 1 -1 2.0 + core : 2 -1 2.0 + core : 2 1 2.0 + core : 2 -2 4.0 + core : 3 -1 2.0 + core : 3 1 2.0 + core : 3 -2 4.0 + core : 3 2 4.0 + core : 3 -3 6.0 + core : 4 -1 2.0 + core : 4 1 2.0 + core : 4 -2 4.0 + core : 4 2 4.0 + core : 4 -3 6.0 + core : 4 3 6.0 + core : 4 -4 8.0 + valence : 5 -1 2.0 5s + valence : 5 1 2.0 5p + valence : 5 -2 4.0 5p + valence : 6 -1 2.0 6s + valence : 5 2 2.0 5d + valence : 5 -3 2.0 5d + ---------- + ---------- + core : 1 -1 2.0 + core : 2 -1 2.0 + core : 2 1 2.0 + core : 2 -2 4.0 + core : 3 -1 2.0 + core : 3 1 2.0 + core : 3 -2 4.0 + core : 3 2 4.0 + core : 3 -3 6.0 + core : 4 -1 2.0 + core : 4 1 2.0 + core : 4 -2 4.0 + core : 4 2 4.0 + core : 4 -3 6.0 + core : 4 3 6.0 + core : 4 -4 8.0 + valence : 5 -1 2.0 5s + valence : 5 1 2.0 5p + valence : 5 -2 4.0 5p + valence : 6 -1 2.0 6s + valence : 5 2 2.0 5d + valence : 5 -3 2.0 5d + ---------- +Valence Electrons = 28 + ---------------------------------------------------- + Suggested values for input: + + Atom Z lmax jri rmt dx + W 74 10 835 2.524896 0.015949 + W 74 10 835 2.524896 0.015949 +k_max = 3.96056 +G_max =11.88168 +line: 16>&kpt +line: 17>div1=3 div2=3 div3=3 tkb=0.0005 / + values accepted unchanged + 3 3 3 nmop(i),i=1,3 + orientation of boundary faces + 1 -1 -0.4202441 ifac,iside,orient for xvec + 2 -1 -0.0323761 ifac,iside,orient for xvec + 3 -1 -0.0334420 ifac,iside,orient for xvec + 4 -1 -0.0182662 ifac,iside,orient for xvec +Bravais lattice vectors + 5.980511 0.000000 0.000000 + 0.000000 5.980511 0.000000 + 0.000000 0.000000 5.980511 +reciprocal lattice vectors + 1.050610 0.000000 0.000000 + 0.000000 1.050610 0.000000 + 0.000000 0.000000 1.050610 + 3 3 3 Monkhorst-Pack-parameters + 0 nreg; k-points in irreducible wedge of BZ + Monkhorst-Pack-fractions + 0 nbound; no k-points on boundary of BZ + 1 idim + -0.3333333 + 0.0000000 + 0.3333333 + 2 idim + -0.3333333 + 0.0000000 + 0.3333333 + 3 idim + -0.3333333 + 0.0000000 + 0.3333333 + +k-point count: 4 + +k-point mesh: 3 3 3 +k-point density: 2.855484 2.855484 2.855484 + diff --git a/aiida_fleur/tests/calculation/data_dir/mock-inpgen-0e79463ff639be2cbb7c7d98aaadd1df/out.error b/aiida_fleur/tests/calculation/data_dir/mock-inpgen-0e79463ff639be2cbb7c7d98aaadd1df/out.error new file mode 100644 index 000000000..e69de29bb diff --git a/aiida_fleur/tests/calculation/data_dir/mock-inpgen-0e79463ff639be2cbb7c7d98aaadd1df/shell.out b/aiida_fleur/tests/calculation/data_dir/mock-inpgen-0e79463ff639be2cbb7c7d98aaadd1df/shell.out new file mode 100644 index 000000000..91cd3bb77 --- /dev/null +++ b/aiida_fleur/tests/calculation/data_dir/mock-inpgen-0e79463ff639be2cbb7c7d98aaadd1df/shell.out @@ -0,0 +1,2 @@ + Welcome to FLEUR - inpgen (www.flapw.de) + MaX-Release 4.0 (www.max-centre.eu) diff --git a/aiida_fleur/tests/calculation/data_dir/mock-inpgen-0e79463ff639be2cbb7c7d98aaadd1df/struct.xsf b/aiida_fleur/tests/calculation/data_dir/mock-inpgen-0e79463ff639be2cbb7c7d98aaadd1df/struct.xsf new file mode 100644 index 000000000..f23cd8df4 --- /dev/null +++ b/aiida_fleur/tests/calculation/data_dir/mock-inpgen-0e79463ff639be2cbb7c7d98aaadd1df/struct.xsf @@ -0,0 +1,10 @@ + CRYSTAL + PRIMVEC +3.1647500 .0000000 .0000000 +.0000000 3.1647500 .0000000 +.0000000 .0000000 3.1647500 + PRIMCOORD + 2 1 + 74 .0000000 .0000000 .0000000 + 74 1.5823750 1.5823750 1.5823750 + diff --git a/aiida_fleur/tests/calculation/data_dir/mock-inpgen-5129f061d3a7cdba78de73e5d407ed1b/FleurInputSchema.xsd b/aiida_fleur/tests/calculation/data_dir/mock-inpgen-5129f061d3a7cdba78de73e5d407ed1b/FleurInputSchema.xsd new file mode 100644 index 000000000..5053d677e --- /dev/null +++ b/aiida_fleur/tests/calculation/data_dir/mock-inpgen-5129f061d3a7cdba78de73e5d407ed1b/FleurInputSchema.xsd @@ -0,0 +1,1037 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/aiida_fleur/tests/calculation/data_dir/mock-inpgen-5129f061d3a7cdba78de73e5d407ed1b/_scheduler-stderr.txt b/aiida_fleur/tests/calculation/data_dir/mock-inpgen-5129f061d3a7cdba78de73e5d407ed1b/_scheduler-stderr.txt new file mode 100644 index 000000000..e69de29bb diff --git a/aiida_fleur/tests/calculation/data_dir/mock-inpgen-5129f061d3a7cdba78de73e5d407ed1b/_scheduler-stdout.txt b/aiida_fleur/tests/calculation/data_dir/mock-inpgen-5129f061d3a7cdba78de73e5d407ed1b/_scheduler-stdout.txt new file mode 100644 index 000000000..e69de29bb diff --git a/aiida_fleur/tests/calculation/data_dir/mock-inpgen-5129f061d3a7cdba78de73e5d407ed1b/aiida.in b/aiida_fleur/tests/calculation/data_dir/mock-inpgen-5129f061d3a7cdba78de73e5d407ed1b/aiida.in new file mode 100644 index 000000000..8c5d52dee --- /dev/null +++ b/aiida_fleur/tests/calculation/data_dir/mock-inpgen-5129f061d3a7cdba78de73e5d407ed1b/aiida.in @@ -0,0 +1,16 @@ +A Fleur input generator calculation with aiida +&input cartesian=F / + -3.0138120625 3.0138120625 3.0138120625 + 3.0138120625 -3.0138120625 3.0138120625 + 3.0138120625 3.0138120625 -3.0138120625 + 1.0000000000 + 1.0000000000 1.0000000000 1.0000000000 + + 1 + 74 0.0000000000 0.0000000000 0.0000000000 +&atom + econfig="[Kr] 4d10 4f14 | 5s2 5p6 6s2 5d4" element="W" jri=981 lmax=12 lnonsph=6 lo="5s 5p" rmt=2.1 / +&comp + gmax=15.0 gmaxxc=12.5 kmax=5.0 / +&kpt + div1=3 div2=3 div3=3 tkb=0.0005 / diff --git a/aiida_fleur/tests/calculation/data_dir/mock-inpgen-5129f061d3a7cdba78de73e5d407ed1b/inp.xml b/aiida_fleur/tests/calculation/data_dir/mock-inpgen-5129f061d3a7cdba78de73e5d407ed1b/inp.xml new file mode 100644 index 000000000..2267555d9 --- /dev/null +++ b/aiida_fleur/tests/calculation/data_dir/mock-inpgen-5129f061d3a7cdba78de73e5d407ed1b/inp.xml @@ -0,0 +1,319 @@ + + + + A Fleur input generator calculation with aiida + + + + + + + + + + .0000000000 .0000000000 .0000000000 + + + + + + + -0.000000 0.333333 0.333333 + -0.333333 0.333333 0.333333 + -0.000000 0.000000 0.333333 + 0.000000 0.000000 0.000000 + + + + + + + + + + + 1 0 0 .0000000000 + 0 1 0 .0000000000 + 0 0 1 .0000000000 + + + -1 0 0 .0000000000 + -1 1 0 .0000000000 + -1 0 1 .0000000000 + + + 1 -1 0 .0000000000 + 0 -1 0 .0000000000 + 0 -1 1 .0000000000 + + + 0 -1 0 .0000000000 + 1 -1 0 .0000000000 + 0 -1 1 .0000000000 + + + -1 1 0 .0000000000 + -1 0 0 .0000000000 + -1 0 1 .0000000000 + + + 0 1 0 .0000000000 + 1 0 0 .0000000000 + 0 0 1 .0000000000 + + + 1 0 -1 .0000000000 + 0 1 -1 .0000000000 + 0 0 -1 .0000000000 + + + 0 0 -1 .0000000000 + 0 1 -1 .0000000000 + 1 0 -1 .0000000000 + + + 0 1 -1 .0000000000 + 1 0 -1 .0000000000 + 0 0 -1 .0000000000 + + + 0 1 -1 .0000000000 + 0 0 -1 .0000000000 + 1 0 -1 .0000000000 + + + 1 0 -1 .0000000000 + 0 0 -1 .0000000000 + 0 1 -1 .0000000000 + + + 0 0 -1 .0000000000 + 1 0 -1 .0000000000 + 0 1 -1 .0000000000 + + + -1 0 0 .0000000000 + 0 -1 0 .0000000000 + 0 0 -1 .0000000000 + + + 1 0 0 .0000000000 + 1 -1 0 .0000000000 + 1 0 -1 .0000000000 + + + 0 -1 0 .0000000000 + -1 0 0 .0000000000 + 0 0 -1 .0000000000 + + + 1 -1 0 .0000000000 + 1 0 0 .0000000000 + 1 0 -1 .0000000000 + + + 0 1 0 .0000000000 + -1 1 0 .0000000000 + 0 1 -1 .0000000000 + + + -1 1 0 .0000000000 + 0 1 0 .0000000000 + 0 1 -1 .0000000000 + + + -1 0 0 .0000000000 + 0 0 -1 .0000000000 + 0 -1 0 .0000000000 + + + 1 0 0 .0000000000 + 1 0 -1 .0000000000 + 1 -1 0 .0000000000 + + + 0 -1 0 .0000000000 + 0 0 -1 .0000000000 + -1 0 0 .0000000000 + + + 1 -1 0 .0000000000 + 1 0 -1 .0000000000 + 1 0 0 .0000000000 + + + 0 1 0 .0000000000 + 0 1 -1 .0000000000 + -1 1 0 .0000000000 + + + -1 1 0 .0000000000 + 0 1 -1 .0000000000 + 0 1 0 .0000000000 + + + 0 0 -1 .0000000000 + -1 0 0 .0000000000 + 0 -1 0 .0000000000 + + + 1 0 -1 .0000000000 + 1 0 0 .0000000000 + 1 -1 0 .0000000000 + + + 0 0 -1 .0000000000 + 0 -1 0 .0000000000 + -1 0 0 .0000000000 + + + 1 0 -1 .0000000000 + 1 -1 0 .0000000000 + 1 0 0 .0000000000 + + + 0 1 -1 .0000000000 + 0 1 0 .0000000000 + -1 1 0 .0000000000 + + + 0 1 -1 .0000000000 + -1 1 0 .0000000000 + 0 1 0 .0000000000 + + + -1 0 1 .0000000000 + -1 1 0 .0000000000 + -1 0 0 .0000000000 + + + 0 0 1 .0000000000 + 0 1 0 .0000000000 + 1 0 0 .0000000000 + + + 0 -1 1 .0000000000 + 1 -1 0 .0000000000 + 0 -1 0 .0000000000 + + + 0 -1 1 .0000000000 + 0 -1 0 .0000000000 + 1 -1 0 .0000000000 + + + -1 0 1 .0000000000 + -1 0 0 .0000000000 + -1 1 0 .0000000000 + + + 0 0 1 .0000000000 + 1 0 0 .0000000000 + 0 1 0 .0000000000 + + + 1 -1 0 .0000000000 + 0 -1 1 .0000000000 + 0 -1 0 .0000000000 + + + 0 -1 0 .0000000000 + 0 -1 1 .0000000000 + 1 -1 0 .0000000000 + + + -1 1 0 .0000000000 + -1 0 1 .0000000000 + -1 0 0 .0000000000 + + + 0 1 0 .0000000000 + 0 0 1 .0000000000 + 1 0 0 .0000000000 + + + 1 0 0 .0000000000 + 0 0 1 .0000000000 + 0 1 0 .0000000000 + + + -1 0 0 .0000000000 + -1 0 1 .0000000000 + -1 1 0 .0000000000 + + + 0 0 1 .0000000000 + -1 0 1 .0000000000 + 0 -1 1 .0000000000 + + + -1 0 1 .0000000000 + 0 0 1 .0000000000 + 0 -1 1 .0000000000 + + + 0 0 1 .0000000000 + 0 -1 1 .0000000000 + -1 0 1 .0000000000 + + + -1 0 1 .0000000000 + 0 -1 1 .0000000000 + 0 0 1 .0000000000 + + + 0 -1 1 .0000000000 + 0 0 1 .0000000000 + -1 0 1 .0000000000 + + + 0 -1 1 .0000000000 + -1 0 1 .0000000000 + 0 0 1 .0000000000 + + + + + -3.013812062500000 3.013812062500000 3.013812062500000 + 3.013812062500000 -3.013812062500000 3.013812062500000 + 3.013812062500000 3.013812062500000 -3.013812062500000 + + + + + + + + + + + + [Kr] (4d3/2) (4d5/2) (4f5/2) (4f7/2) + (5s1/2) (5p1/2) (5p3/2) (6s1/2) (5d3/2) (5d5/2) + + + + + + + + + + .0000000000 .0000000000 .0000000000 + + + + + + + + + + + + + + + + + diff --git a/aiida_fleur/tests/calculation/data_dir/mock-inpgen-5129f061d3a7cdba78de73e5d407ed1b/out b/aiida_fleur/tests/calculation/data_dir/mock-inpgen-5129f061d3a7cdba78de73e5d407ed1b/out new file mode 100644 index 000000000..fde7e1ade --- /dev/null +++ b/aiida_fleur/tests/calculation/data_dir/mock-inpgen-5129f061d3a7cdba78de73e5d407ed1b/out @@ -0,0 +1,687 @@ +line: 1>A Fleur input generator calculation with aiida +line: 2>&input cartesian=F / +line: 3>-3.0138120625 3.0138120625 3.0138120625 +line: 4>3.0138120625 -3.0138120625 3.0138120625 +line: 5>3.0138120625 3.0138120625 -3.0138120625 +line: 6>1.0000000000 +line: 7>1.0000000000 1.0000000000 1.0000000000 +line: 8> +line: 9>1 +line: 10>74 0.0000000000 0.0000000000 0.0000000000 +line: 11>&atom +line: 12>econfig="[Kr] 4d10 4f14 | 5s2 5p6 6s2 5d4" element="W" jri=981 lm + + A Fleur input generator calculation with aiida + + film= F cartesian= F + checkinp= F symor= F + +a1 = -3.01381 3.01381 3.01381 +a2 = 3.01381 -3.01381 3.01381 +a3 = 3.01381 3.01381 -3.01381 + +dvac= -3.01381 aa = 1.00000 +scale = 1.00000 1.00000 1.00000 + +natin= 1 Z = 74 + positions: + 0.00000 0.00000 0.00000 + + generators: 0 (excluding identity) + + + Lattice information: + -------------------- + + overall lattice constant a0 = 1.000000 bohr + + real-space primitive lattice vectors in units of a_{x,y,z} + a_1: -3.013812 3.013812 3.013812 + a_2: 3.013812 -3.013812 3.013812 + a_3: 3.013812 3.013812 -3.013812 + + lattice constants a_x, a_y, a_z = 1.000000 1.000000 1.000000 + volume of unit cell (a.u.^3) = 109.498581 + +dbg: lattice matrices + 109.498581120416 +dbg: as : + -3.013812 3.013812 3.013812 + 3.013812 -3.013812 3.013812 + 3.013812 3.013812 -3.013812 +dbg: bs : + -0.000000 0.165903 0.165903 + 0.165903 -0.000000 0.165903 + 0.165903 0.165903 -0.000000 +dbg: amat : + -3.013812 3.013812 3.013812 + 3.013812 -3.013812 3.013812 + 3.013812 3.013812 -3.013812 +dbg: bmat : + -0.000000 0.521199 0.521199 + 0.521199 -0.000000 0.521199 + 0.521199 0.521199 -0.000000 +dbg: amatinv : + -0.000000 0.165903 0.165903 + 0.165903 -0.000000 0.165903 + 0.165903 0.165903 -0.000000 +dbg: aamat : + 27.249189 -9.083063 -9.083063 + -9.083063 27.249189 -9.083063 + -9.083063 -9.083063 27.249189 +dbg: bbmat : + 0.543297 0.271649 0.271649 + 0.271649 0.543297 0.271649 + 0.271649 0.271649 0.543297 + +dbg: lattice vectors : +vector 1 : -3.01381 3.01381 3.01381 length : 5.22008 +vector 2 : 3.01381 -3.01381 3.01381 length : 5.22008 +vector 3 : 3.01381 3.01381 -3.01381 length : 5.22008 +angle between vectors (1,2) =109.47122 +angle between vectors (1,3) =109.47122 +angle between vectors (2,3) =109.47122 + +dbg: reciprocal lattice vectors : +vector 1 : -0.00000 0.52120 0.52120 length : 0.73709 +vector 2 : 0.52120 -0.00000 0.52120 length : 0.73709 +vector 3 : 0.52120 0.52120 -0.00000 length : 0.73709 +angle between vectors (1,2) = 60.00000 +angle between vectors (1,3) = 60.00000 +angle between vectors (2,3) = 60.00000 + + + Point group of the Bravais lattice has 48 operations + + DBG: symor,zorth,oldfleur : T F F + DBG: optype : 1 -2 -2 3 3 -2 -2 3 2 -4 3 -4 -1 2 2 -3 -3 2 2 -2 -3 4 4 -3 -3 4 2 -3 -2 4 3 -2 -4 2 -4 3 3 -4 -4 3 -2 2 4 -3 -3 2 4 -2 + DBG: invsym,invs,zrfs,invs2 : T T F F + DBG: (before reorder) invsop,zrfsop,invs2op : 13 7 46 + + Space group information: + ------------------------ + 48 operations + space group is symmorphic + has inversion symmetry + + + Operations: (in International notation) + --------------------------------------- + lattice coordinates (scaled) Cartesian coordinates + + operation 1: 1 (inverse = 1) + ( 1 0 0 ) ( 0.000 ) ( 1.00000 0.00000 0.00000 ) ( 0.000 ) + ( 0 1 0 ) ( 0.000 ) ( 0.00000 1.00000 -0.00000 ) ( 0.000 ) + ( 0 0 1 ) ( 0.000 ) ( -0.00000 -0.00000 1.00000 ) ( 0.000 ) + _ + operation 2: 2 (inverse = 2) + ( -1 0 0 ) ( 0.000 ) ( 1.00000 -0.00000 -0.00000 ) ( 0.000 ) + ( -1 1 0 ) ( 0.000 ) ( 0.00000 0.00000 -1.00000 ) ( 0.000 ) + ( -1 0 1 ) ( 0.000 ) ( -0.00000 -1.00000 0.00000 ) ( 0.000 ) + _ + operation 3: 2 (inverse = 3) + ( 1 -1 0 ) ( 0.000 ) ( -0.00000 0.00000 -1.00000 ) ( 0.000 ) + ( 0 -1 0 ) ( 0.000 ) ( 0.00000 1.00000 -0.00000 ) ( 0.000 ) + ( 0 -1 1 ) ( 0.000 ) ( -1.00000 -0.00000 0.00000 ) ( 0.000 ) + + operation 4: 3 (inverse = 5) + ( 0 -1 0 ) ( 0.000 ) ( -0.00000 1.00000 -0.00000 ) ( 0.000 ) + ( 1 -1 0 ) ( 0.000 ) ( 0.00000 0.00000 -1.00000 ) ( 0.000 ) + ( 0 -1 1 ) ( 0.000 ) ( -1.00000 -0.00000 0.00000 ) ( 0.000 ) + + operation 5: 3 (inverse = 4) + ( -1 1 0 ) ( 0.000 ) ( 0.00000 -0.00000 -1.00000 ) ( 0.000 ) + ( -1 0 0 ) ( 0.000 ) ( 1.00000 0.00000 -0.00000 ) ( 0.000 ) + ( -1 0 1 ) ( 0.000 ) ( -0.00000 -1.00000 0.00000 ) ( 0.000 ) + _ + operation 6: 2 (inverse = 6) + ( 0 1 0 ) ( 0.000 ) ( 0.00000 1.00000 0.00000 ) ( 0.000 ) + ( 1 0 0 ) ( 0.000 ) ( 1.00000 0.00000 -0.00000 ) ( 0.000 ) + ( 0 0 1 ) ( 0.000 ) ( -0.00000 -0.00000 1.00000 ) ( 0.000 ) + _ + operation 7: 2 (inverse = 7) + ( 1 0 -1 ) ( 0.000 ) ( -0.00000 -1.00000 0.00000 ) ( 0.000 ) + ( 0 1 -1 ) ( 0.000 ) ( -1.00000 -0.00000 -0.00000 ) ( 0.000 ) + ( 0 0 -1 ) ( 0.000 ) ( 0.00000 0.00000 1.00000 ) ( 0.000 ) + + operation 8: 3 (inverse = 31) + ( 0 0 -1 ) ( 0.000 ) ( -0.00000 -0.00000 1.00000 ) ( 0.000 ) + ( 0 1 -1 ) ( 0.000 ) ( -1.00000 0.00000 0.00000 ) ( 0.000 ) + ( 1 0 -1 ) ( 0.000 ) ( 0.00000 -1.00000 -0.00000 ) ( 0.000 ) + + operation 9: 2 (inverse = 9) + ( 0 1 -1 ) ( 0.000 ) ( -1.00000 -0.00000 0.00000 ) ( 0.000 ) + ( 1 0 -1 ) ( 0.000 ) ( -0.00000 -1.00000 -0.00000 ) ( 0.000 ) + ( 0 0 -1 ) ( 0.000 ) ( 0.00000 0.00000 1.00000 ) ( 0.000 ) + _ + operation 10: 4 (inverse = 33) + ( 0 1 -1 ) ( 0.000 ) ( -1.00000 -0.00000 0.00000 ) ( 0.000 ) + ( 0 0 -1 ) ( 0.000 ) ( -0.00000 0.00000 1.00000 ) ( 0.000 ) + ( 1 0 -1 ) ( 0.000 ) ( 0.00000 -1.00000 -0.00000 ) ( 0.000 ) + + operation 11: 3 (inverse = 37) + ( 1 0 -1 ) ( 0.000 ) ( -0.00000 -1.00000 0.00000 ) ( 0.000 ) + ( 0 0 -1 ) ( 0.000 ) ( 0.00000 -0.00000 1.00000 ) ( 0.000 ) + ( 0 1 -1 ) ( 0.000 ) ( -1.00000 0.00000 -0.00000 ) ( 0.000 ) + _ + operation 12: 4 (inverse = 39) + ( 0 0 -1 ) ( 0.000 ) ( -0.00000 -0.00000 1.00000 ) ( 0.000 ) + ( 1 0 -1 ) ( 0.000 ) ( 0.00000 -1.00000 0.00000 ) ( 0.000 ) + ( 0 1 -1 ) ( 0.000 ) ( -1.00000 0.00000 -0.00000 ) ( 0.000 ) + _ + operation 13: 1 (inverse = 13) + ( -1 0 0 ) ( 0.000 ) ( -1.00000 -0.00000 -0.00000 ) ( 0.000 ) + ( 0 -1 0 ) ( 0.000 ) ( -0.00000 -1.00000 0.00000 ) ( 0.000 ) + ( 0 0 -1 ) ( 0.000 ) ( 0.00000 0.00000 -1.00000 ) ( 0.000 ) + + operation 14: 2 (inverse = 14) + ( 1 0 0 ) ( 0.000 ) ( -1.00000 0.00000 0.00000 ) ( 0.000 ) + ( 1 -1 0 ) ( 0.000 ) ( -0.00000 -0.00000 1.00000 ) ( 0.000 ) + ( 1 0 -1 ) ( 0.000 ) ( 0.00000 1.00000 -0.00000 ) ( 0.000 ) + + operation 15: 2 (inverse = 15) + ( 0 -1 0 ) ( 0.000 ) ( -0.00000 -1.00000 -0.00000 ) ( 0.000 ) + ( -1 0 0 ) ( 0.000 ) ( -1.00000 -0.00000 0.00000 ) ( 0.000 ) + ( 0 0 -1 ) ( 0.000 ) ( 0.00000 0.00000 -1.00000 ) ( 0.000 ) + _ + operation 16: 3 (inverse = 17) + ( 1 -1 0 ) ( 0.000 ) ( -0.00000 0.00000 1.00000 ) ( 0.000 ) + ( 1 0 0 ) ( 0.000 ) ( -1.00000 -0.00000 0.00000 ) ( 0.000 ) + ( 1 0 -1 ) ( 0.000 ) ( 0.00000 1.00000 -0.00000 ) ( 0.000 ) + _ + operation 17: 3 (inverse = 16) + ( 0 1 0 ) ( 0.000 ) ( 0.00000 -1.00000 0.00000 ) ( 0.000 ) + ( -1 1 0 ) ( 0.000 ) ( -0.00000 -0.00000 1.00000 ) ( 0.000 ) + ( 0 1 -1 ) ( 0.000 ) ( 1.00000 0.00000 -0.00000 ) ( 0.000 ) + + operation 18: 2 (inverse = 18) + ( -1 1 0 ) ( 0.000 ) ( 0.00000 -0.00000 1.00000 ) ( 0.000 ) + ( 0 1 0 ) ( 0.000 ) ( -0.00000 -1.00000 0.00000 ) ( 0.000 ) + ( 0 1 -1 ) ( 0.000 ) ( 1.00000 0.00000 -0.00000 ) ( 0.000 ) + + operation 19: 2 (inverse = 19) + ( -1 0 0 ) ( 0.000 ) ( -1.00000 -0.00000 -0.00000 ) ( 0.000 ) + ( 0 0 -1 ) ( 0.000 ) ( -0.00000 0.00000 -1.00000 ) ( 0.000 ) + ( 0 -1 0 ) ( 0.000 ) ( 0.00000 -1.00000 0.00000 ) ( 0.000 ) + _ + operation 20: 2 (inverse = 20) + ( 1 0 0 ) ( 0.000 ) ( -1.00000 0.00000 0.00000 ) ( 0.000 ) + ( 1 0 -1 ) ( 0.000 ) ( -0.00000 1.00000 -0.00000 ) ( 0.000 ) + ( 1 -1 0 ) ( 0.000 ) ( 0.00000 -0.00000 1.00000 ) ( 0.000 ) + _ + operation 21: 3 (inverse = 25) + ( 0 -1 0 ) ( 0.000 ) ( -0.00000 -1.00000 -0.00000 ) ( 0.000 ) + ( 0 0 -1 ) ( 0.000 ) ( 0.00000 -0.00000 -1.00000 ) ( 0.000 ) + ( -1 0 0 ) ( 0.000 ) ( -1.00000 0.00000 0.00000 ) ( 0.000 ) + + operation 22: 4 (inverse = 43) + ( 1 -1 0 ) ( 0.000 ) ( -0.00000 0.00000 1.00000 ) ( 0.000 ) + ( 1 0 -1 ) ( 0.000 ) ( 0.00000 1.00000 0.00000 ) ( 0.000 ) + ( 1 0 0 ) ( 0.000 ) ( -1.00000 -0.00000 -0.00000 ) ( 0.000 ) + + operation 23: 4 (inverse = 26) + ( 0 1 0 ) ( 0.000 ) ( 0.00000 -1.00000 0.00000 ) ( 0.000 ) + ( 0 1 -1 ) ( 0.000 ) ( 1.00000 -0.00000 -0.00000 ) ( 0.000 ) + ( -1 1 0 ) ( 0.000 ) ( -0.00000 0.00000 1.00000 ) ( 0.000 ) + _ + operation 24: 3 (inverse = 44) + ( -1 1 0 ) ( 0.000 ) ( 0.00000 -0.00000 1.00000 ) ( 0.000 ) + ( 0 1 -1 ) ( 0.000 ) ( 1.00000 0.00000 0.00000 ) ( 0.000 ) + ( 0 1 0 ) ( 0.000 ) ( -0.00000 -1.00000 -0.00000 ) ( 0.000 ) + _ + operation 25: 3 (inverse = 21) + ( 0 0 -1 ) ( 0.000 ) ( -0.00000 -0.00000 -1.00000 ) ( 0.000 ) + ( -1 0 0 ) ( 0.000 ) ( -1.00000 0.00000 -0.00000 ) ( 0.000 ) + ( 0 -1 0 ) ( 0.000 ) ( 0.00000 -1.00000 0.00000 ) ( 0.000 ) + + operation 26: 4 (inverse = 23) + ( 1 0 -1 ) ( 0.000 ) ( -0.00000 1.00000 0.00000 ) ( 0.000 ) + ( 1 0 0 ) ( 0.000 ) ( -1.00000 0.00000 -0.00000 ) ( 0.000 ) + ( 1 -1 0 ) ( 0.000 ) ( 0.00000 -0.00000 1.00000 ) ( 0.000 ) + + operation 27: 2 (inverse = 27) + ( 0 0 -1 ) ( 0.000 ) ( -0.00000 -0.00000 -1.00000 ) ( 0.000 ) + ( 0 -1 0 ) ( 0.000 ) ( 0.00000 -1.00000 -0.00000 ) ( 0.000 ) + ( -1 0 0 ) ( 0.000 ) ( -1.00000 0.00000 0.00000 ) ( 0.000 ) + _ + operation 28: 3 (inverse = 45) + ( 1 0 -1 ) ( 0.000 ) ( -0.00000 1.00000 0.00000 ) ( 0.000 ) + ( 1 -1 0 ) ( 0.000 ) ( 0.00000 0.00000 1.00000 ) ( 0.000 ) + ( 1 0 0 ) ( 0.000 ) ( -1.00000 -0.00000 -0.00000 ) ( 0.000 ) + _ + operation 29: 2 (inverse = 29) + ( 0 1 -1 ) ( 0.000 ) ( 1.00000 -0.00000 0.00000 ) ( 0.000 ) + ( 0 1 0 ) ( 0.000 ) ( 0.00000 -1.00000 -0.00000 ) ( 0.000 ) + ( -1 1 0 ) ( 0.000 ) ( -0.00000 0.00000 1.00000 ) ( 0.000 ) + + operation 30: 4 (inverse = 47) + ( 0 1 -1 ) ( 0.000 ) ( 1.00000 -0.00000 0.00000 ) ( 0.000 ) + ( -1 1 0 ) ( 0.000 ) ( 0.00000 0.00000 1.00000 ) ( 0.000 ) + ( 0 1 0 ) ( 0.000 ) ( -0.00000 -1.00000 -0.00000 ) ( 0.000 ) + + operation 31: 3 (inverse = 8) + ( -1 0 1 ) ( 0.000 ) ( 0.00000 -1.00000 -0.00000 ) ( 0.000 ) + ( -1 1 0 ) ( 0.000 ) ( -0.00000 -0.00000 -1.00000 ) ( 0.000 ) + ( -1 0 0 ) ( 0.000 ) ( 1.00000 0.00000 0.00000 ) ( 0.000 ) + _ + operation 32: 2 (inverse = 32) + ( 0 0 1 ) ( 0.000 ) ( 0.00000 0.00000 1.00000 ) ( 0.000 ) + ( 0 1 0 ) ( 0.000 ) ( -0.00000 1.00000 0.00000 ) ( 0.000 ) + ( 1 0 0 ) ( 0.000 ) ( 1.00000 -0.00000 -0.00000 ) ( 0.000 ) + _ + operation 33: 4 (inverse = 10) + ( 0 -1 1 ) ( 0.000 ) ( -1.00000 0.00000 -0.00000 ) ( 0.000 ) + ( 1 -1 0 ) ( 0.000 ) ( -0.00000 -0.00000 -1.00000 ) ( 0.000 ) + ( 0 -1 0 ) ( 0.000 ) ( 0.00000 1.00000 0.00000 ) ( 0.000 ) + + operation 34: 2 (inverse = 34) + ( 0 -1 1 ) ( 0.000 ) ( -1.00000 0.00000 -0.00000 ) ( 0.000 ) + ( 0 -1 0 ) ( 0.000 ) ( -0.00000 1.00000 0.00000 ) ( 0.000 ) + ( 1 -1 0 ) ( 0.000 ) ( 0.00000 -0.00000 -1.00000 ) ( 0.000 ) + _ + operation 35: 4 (inverse = 38) + ( -1 0 1 ) ( 0.000 ) ( 0.00000 -1.00000 -0.00000 ) ( 0.000 ) + ( -1 0 0 ) ( 0.000 ) ( 1.00000 -0.00000 0.00000 ) ( 0.000 ) + ( -1 1 0 ) ( 0.000 ) ( -0.00000 0.00000 -1.00000 ) ( 0.000 ) + + operation 36: 3 (inverse = 40) + ( 0 0 1 ) ( 0.000 ) ( 0.00000 0.00000 1.00000 ) ( 0.000 ) + ( 1 0 0 ) ( 0.000 ) ( 1.00000 -0.00000 0.00000 ) ( 0.000 ) + ( 0 1 0 ) ( 0.000 ) ( -0.00000 1.00000 -0.00000 ) ( 0.000 ) + + operation 37: 3 (inverse = 11) + ( 1 -1 0 ) ( 0.000 ) ( -0.00000 0.00000 -1.00000 ) ( 0.000 ) + ( 0 -1 1 ) ( 0.000 ) ( -1.00000 -0.00000 -0.00000 ) ( 0.000 ) + ( 0 -1 0 ) ( 0.000 ) ( 0.00000 1.00000 0.00000 ) ( 0.000 ) + _ + operation 38: 4 (inverse = 35) + ( 0 -1 0 ) ( 0.000 ) ( -0.00000 1.00000 -0.00000 ) ( 0.000 ) + ( 0 -1 1 ) ( 0.000 ) ( -1.00000 0.00000 0.00000 ) ( 0.000 ) + ( 1 -1 0 ) ( 0.000 ) ( 0.00000 -0.00000 -1.00000 ) ( 0.000 ) + _ + operation 39: 4 (inverse = 12) + ( -1 1 0 ) ( 0.000 ) ( 0.00000 -0.00000 -1.00000 ) ( 0.000 ) + ( -1 0 1 ) ( 0.000 ) ( -0.00000 -1.00000 -0.00000 ) ( 0.000 ) + ( -1 0 0 ) ( 0.000 ) ( 1.00000 0.00000 0.00000 ) ( 0.000 ) + + operation 40: 3 (inverse = 36) + ( 0 1 0 ) ( 0.000 ) ( 0.00000 1.00000 0.00000 ) ( 0.000 ) + ( 0 0 1 ) ( 0.000 ) ( -0.00000 0.00000 1.00000 ) ( 0.000 ) + ( 1 0 0 ) ( 0.000 ) ( 1.00000 -0.00000 -0.00000 ) ( 0.000 ) + _ + operation 41: 2 (inverse = 41) + ( 1 0 0 ) ( 0.000 ) ( 1.00000 0.00000 0.00000 ) ( 0.000 ) + ( 0 0 1 ) ( 0.000 ) ( 0.00000 -0.00000 1.00000 ) ( 0.000 ) + ( 0 1 0 ) ( 0.000 ) ( -0.00000 1.00000 -0.00000 ) ( 0.000 ) + + operation 42: 2 (inverse = 42) + ( -1 0 0 ) ( 0.000 ) ( 1.00000 -0.00000 -0.00000 ) ( 0.000 ) + ( -1 0 1 ) ( 0.000 ) ( 0.00000 -1.00000 0.00000 ) ( 0.000 ) + ( -1 1 0 ) ( 0.000 ) ( -0.00000 0.00000 -1.00000 ) ( 0.000 ) + + operation 43: 4 (inverse = 22) + ( 0 0 1 ) ( 0.000 ) ( 0.00000 0.00000 -1.00000 ) ( 0.000 ) + ( -1 0 1 ) ( 0.000 ) ( -0.00000 1.00000 -0.00000 ) ( 0.000 ) + ( 0 -1 1 ) ( 0.000 ) ( 1.00000 -0.00000 0.00000 ) ( 0.000 ) + _ + operation 44: 3 (inverse = 24) + ( -1 0 1 ) ( 0.000 ) ( 0.00000 1.00000 -0.00000 ) ( 0.000 ) + ( 0 0 1 ) ( 0.000 ) ( -0.00000 0.00000 -1.00000 ) ( 0.000 ) + ( 0 -1 1 ) ( 0.000 ) ( 1.00000 -0.00000 0.00000 ) ( 0.000 ) + _ + operation 45: 3 (inverse = 28) + ( 0 0 1 ) ( 0.000 ) ( 0.00000 0.00000 -1.00000 ) ( 0.000 ) + ( 0 -1 1 ) ( 0.000 ) ( 1.00000 -0.00000 -0.00000 ) ( 0.000 ) + ( -1 0 1 ) ( 0.000 ) ( -0.00000 1.00000 0.00000 ) ( 0.000 ) + + operation 46: 2 (inverse = 46) + ( -1 0 1 ) ( 0.000 ) ( 0.00000 1.00000 -0.00000 ) ( 0.000 ) + ( 0 -1 1 ) ( 0.000 ) ( 1.00000 0.00000 0.00000 ) ( 0.000 ) + ( 0 0 1 ) ( 0.000 ) ( -0.00000 -0.00000 -1.00000 ) ( 0.000 ) + + operation 47: 4 (inverse = 30) + ( 0 -1 1 ) ( 0.000 ) ( 1.00000 0.00000 -0.00000 ) ( 0.000 ) + ( 0 0 1 ) ( 0.000 ) ( 0.00000 -0.00000 -1.00000 ) ( 0.000 ) + ( -1 0 1 ) ( 0.000 ) ( -0.00000 1.00000 0.00000 ) ( 0.000 ) + _ + operation 48: 2 (inverse = 48) + ( 0 -1 1 ) ( 0.000 ) ( 1.00000 0.00000 -0.00000 ) ( 0.000 ) + ( -1 0 1 ) ( 0.000 ) ( 0.00000 1.00000 0.00000 ) ( 0.000 ) + ( 0 0 1 ) ( 0.000 ) ( -0.00000 -0.00000 -1.00000 ) ( 0.000 ) + + Multiplcation table: {R_j|t_j}{R_i|t_i} + operation j= 1 : 1 2 3 4 5 6 7 8 9 10 11 12 + 13 14 15 16 17 18 19 20 21 22 23 24 + 25 26 27 28 29 30 31 32 33 34 35 36 + 37 38 39 40 41 42 43 44 45 46 47 48 + operation j= 2 : 2 1 5 6 3 4 31 32 33 34 35 36 + 14 13 17 18 15 16 20 19 23 24 21 22 + 43 44 45 46 47 48 7 8 9 10 11 12 + 39 40 37 38 42 41 25 26 27 28 29 30 + operation j= 3 : 3 4 1 2 6 5 37 38 39 40 41 42 + 18 17 16 15 14 13 44 43 47 48 45 46 + 26 25 29 30 27 28 33 34 31 32 36 35 + 7 8 9 10 11 12 20 19 23 24 21 22 + operation j= 4 : 4 3 6 5 1 2 33 34 31 32 36 35 + 17 18 14 13 16 15 43 44 45 46 47 48 + 20 19 23 24 21 22 37 38 39 40 41 42 + 9 10 7 8 12 11 26 25 29 30 27 28 + operation j= 5 : 5 6 2 1 4 3 39 40 37 38 42 41 + 16 15 18 17 13 14 26 25 29 30 27 28 + 44 43 47 48 45 46 9 10 7 8 12 11 + 31 32 33 34 35 36 19 20 21 22 23 24 + operation j= 6 : 6 5 4 3 2 1 9 10 7 8 12 11 + 15 16 13 14 18 17 25 26 27 28 29 30 + 19 20 21 22 23 24 39 40 37 38 42 41 + 33 34 31 32 36 35 44 43 47 48 45 46 + operation j= 7 : 7 8 11 12 10 9 1 2 6 5 3 4 + 46 45 48 47 43 44 24 23 22 21 20 19 + 30 29 28 27 26 25 32 31 36 35 34 33 + 41 42 40 39 37 38 17 18 14 13 16 15 + operation j= 8 : 8 7 10 9 11 12 32 31 36 35 34 33 + 45 46 43 44 48 47 23 24 20 19 22 21 + 17 18 14 13 16 15 1 2 6 5 3 4 + 40 39 41 42 38 37 30 29 28 27 26 25 + operation j= 9 : 9 10 12 11 8 7 6 5 1 2 4 3 + 48 47 46 45 44 43 30 29 28 27 26 25 + 24 23 22 21 20 19 40 39 41 42 38 37 + 36 35 32 31 33 34 18 17 16 15 14 13 + operation j=10 : 10 9 8 7 12 11 40 39 41 42 38 37 + 47 48 44 43 46 45 29 30 26 25 28 27 + 18 17 16 15 14 13 6 5 1 2 4 3 + 32 31 36 35 34 33 24 23 22 21 20 19 + operation j=11 : 11 12 7 8 9 10 41 42 40 39 37 38 + 44 43 47 48 45 46 18 17 16 15 14 13 + 29 30 26 25 28 27 36 35 32 31 33 34 + 1 2 6 5 3 4 23 24 20 19 22 21 + operation j=12 : 12 11 9 10 7 8 36 35 32 31 33 34 + 43 44 45 46 47 48 17 18 14 13 16 15 + 23 24 20 19 22 21 41 42 40 39 37 38 + 6 5 1 2 4 3 29 30 26 25 28 27 + operation j=13 : 13 14 18 17 16 15 46 45 48 47 44 43 + 1 2 6 5 4 3 41 42 40 39 38 37 + 36 35 32 31 34 33 28 27 30 29 26 25 + 24 23 22 21 19 20 12 11 8 7 10 9 + operation j=14 : 14 13 16 15 18 17 28 27 30 29 26 25 + 2 1 4 3 6 5 42 41 38 37 40 39 + 12 11 8 7 10 9 46 45 48 47 44 43 + 22 21 24 23 20 19 36 35 32 31 34 33 + operation j=15 : 15 16 17 18 14 13 48 47 46 45 43 44 + 6 5 1 2 3 4 36 35 32 31 34 33 + 41 42 40 39 38 37 22 21 24 23 20 19 + 30 29 28 27 25 26 11 12 10 9 8 7 + operation j=16 : 16 15 14 13 17 18 22 21 24 23 20 19 + 5 6 3 4 1 2 35 36 34 33 32 31 + 11 12 10 9 8 7 48 47 46 45 43 44 + 28 27 30 29 26 25 41 42 40 39 38 37 + operation j=17 : 17 18 15 16 13 14 30 29 28 27 25 26 + 4 3 2 1 5 6 12 11 8 7 10 9 + 42 41 38 37 40 39 24 23 22 21 19 20 + 48 47 46 45 43 44 35 36 34 33 32 31 + operation j=18 : 18 17 13 14 15 16 24 23 22 21 19 20 + 3 4 5 6 2 1 11 12 10 9 8 7 + 35 36 34 33 32 31 30 29 28 27 25 26 + 46 45 48 47 44 43 42 41 38 37 40 39 + operation j=19 : 19 20 24 23 22 21 44 43 47 48 46 45 + 41 42 40 39 38 37 1 2 6 5 4 3 + 32 31 36 35 33 34 26 25 29 30 28 27 + 18 17 16 15 13 14 8 7 12 11 9 10 + operation j=20 : 20 19 22 21 24 23 26 25 29 30 28 27 + 42 41 38 37 40 39 2 1 4 3 6 5 + 8 7 12 11 9 10 44 43 47 48 46 45 + 16 15 18 17 14 13 32 31 36 35 33 34 + operation j=21 : 21 22 23 24 20 19 47 48 44 43 45 46 + 40 39 41 42 37 38 32 31 36 35 33 34 + 1 2 6 5 4 3 16 15 18 17 14 13 + 29 30 26 25 27 28 7 8 9 10 12 11 + operation j=22 : 22 21 20 19 23 24 16 15 18 17 14 13 + 39 40 37 38 41 42 31 32 33 34 36 35 + 7 8 9 10 12 11 47 48 44 43 45 46 + 26 25 29 30 28 27 1 2 6 5 4 3 + operation j=23 : 23 24 21 22 19 20 29 30 26 25 27 28 + 38 37 42 41 39 40 8 7 12 11 9 10 + 2 1 4 3 6 5 18 17 16 15 13 14 + 47 48 44 43 45 46 31 32 33 34 36 35 + operation j=24 : 24 23 19 20 21 22 18 17 16 15 13 14 + 37 38 39 40 42 41 7 8 9 10 12 11 + 31 32 33 34 36 35 29 30 26 25 27 28 + 44 43 47 48 46 45 2 1 4 3 6 5 + operation j=25 : 25 26 30 29 28 27 43 44 45 46 48 47 + 36 35 32 31 34 33 6 5 1 2 3 4 + 40 39 41 42 37 38 20 19 23 24 22 21 + 17 18 14 13 15 16 10 9 11 12 7 8 + operation j=26 : 26 25 28 27 30 29 20 19 23 24 22 21 + 35 36 34 33 32 31 5 6 3 4 1 2 + 10 9 11 12 7 8 43 44 45 46 48 47 + 14 13 17 18 16 15 40 39 41 42 37 38 + operation j=27 : 27 28 29 30 26 25 45 46 43 44 47 48 + 32 31 36 35 33 34 40 39 41 42 37 38 + 6 5 1 2 3 4 14 13 17 18 16 15 + 23 24 20 19 21 22 9 10 7 8 11 12 + operation j=28 : 28 27 26 25 29 30 14 13 17 18 16 15 + 31 32 33 34 36 35 39 40 37 38 41 42 + 9 10 7 8 11 12 45 46 43 44 47 48 + 20 19 23 24 22 21 6 5 1 2 3 4 + operation j=29 : 29 30 27 28 25 26 23 24 20 19 21 22 + 34 33 35 36 31 32 10 9 11 12 7 8 + 5 6 3 4 1 2 17 18 14 13 15 16 + 45 46 43 44 47 48 39 40 37 38 41 42 + operation j=30 : 30 29 25 26 27 28 17 18 14 13 15 16 + 33 34 31 32 35 36 9 10 7 8 11 12 + 39 40 37 38 41 42 23 24 20 19 21 22 + 43 44 45 46 48 47 5 6 3 4 1 2 + operation j=31 : 31 32 35 36 34 33 2 1 4 3 5 6 + 28 27 30 29 25 26 22 21 24 23 19 20 + 48 47 46 45 44 43 8 7 12 11 10 9 + 42 41 38 37 39 40 15 16 13 14 18 17 + operation j=32 : 32 31 34 33 35 36 8 7 12 11 10 9 + 27 28 25 26 30 29 21 22 19 20 24 23 + 15 16 13 14 18 17 2 1 4 3 5 6 + 38 37 42 41 40 39 48 47 46 45 44 43 + operation j=33 : 33 34 36 35 32 31 4 3 2 1 6 5 + 30 29 28 27 26 25 48 47 46 45 44 43 + 22 21 24 23 19 20 38 37 42 41 40 39 + 12 11 8 7 9 10 16 15 18 17 13 14 + operation j=34 : 34 33 32 31 36 35 38 37 42 41 40 39 + 29 30 26 25 28 27 47 48 44 43 46 45 + 16 15 18 17 13 14 4 3 2 1 6 5 + 8 7 12 11 10 9 22 21 24 23 19 20 + operation j=35 : 35 36 31 32 33 34 42 41 38 37 39 40 + 26 25 29 30 27 28 16 15 18 17 13 14 + 47 48 44 43 46 45 12 11 8 7 9 10 + 2 1 4 3 5 6 21 22 19 20 24 23 + operation j=36 : 36 35 33 34 31 32 12 11 8 7 9 10 + 25 26 27 28 29 30 15 16 13 14 18 17 + 21 22 19 20 24 23 42 41 38 37 39 40 + 4 3 2 1 6 5 47 48 44 43 46 45 + operation j=37 : 37 38 41 42 40 39 3 4 5 6 1 2 + 24 23 22 21 20 19 46 45 48 47 43 44 + 28 27 30 29 25 26 34 33 35 36 32 31 + 11 12 10 9 7 8 14 13 17 18 15 16 + operation j=38 : 38 37 40 39 41 42 34 33 35 36 32 31 + 23 24 20 19 22 21 45 46 43 44 48 47 + 14 13 17 18 15 16 3 4 5 6 1 2 + 10 9 11 12 8 7 28 27 30 29 25 26 + operation j=39 : 39 40 42 41 38 37 5 6 3 4 2 1 + 22 21 24 23 19 20 28 27 30 29 25 26 + 46 45 48 47 43 44 10 9 11 12 8 7 + 35 36 34 33 31 32 13 14 15 16 17 18 + operation j=40 : 40 39 38 37 42 41 10 9 11 12 8 7 + 21 22 19 20 24 23 27 28 25 26 30 29 + 13 14 15 16 17 18 5 6 3 4 2 1 + 34 33 35 36 32 31 46 45 48 47 43 44 + operation j=41 : 41 42 37 38 39 40 11 12 10 9 7 8 + 19 20 21 22 23 24 13 14 15 16 17 18 + 27 28 25 26 30 29 35 36 34 33 31 32 + 3 4 5 6 1 2 45 46 43 44 48 47 + operation j=42 : 42 41 39 40 37 38 35 36 34 33 31 32 + 20 19 23 24 21 22 14 13 17 18 15 16 + 45 46 43 44 48 47 11 12 10 9 7 8 + 5 6 3 4 2 1 27 28 25 26 30 29 + operation j=43 : 43 44 48 47 46 45 25 26 27 28 30 29 + 12 11 8 7 10 9 4 3 2 1 5 6 + 38 37 42 41 39 40 19 20 21 22 24 23 + 15 16 13 14 17 18 34 33 35 36 31 32 + operation j=44 : 44 43 46 45 48 47 19 20 21 22 24 23 + 11 12 10 9 8 7 3 4 5 6 2 1 + 34 33 35 36 31 32 25 26 27 28 30 29 + 13 14 15 16 18 17 38 37 42 41 39 40 + operation j=45 : 45 46 47 48 44 43 27 28 25 26 29 30 + 8 7 12 11 9 10 38 37 42 41 39 40 + 4 3 2 1 5 6 13 14 15 16 18 17 + 21 22 19 20 23 24 33 34 31 32 35 36 + operation j=46 : 46 45 44 43 47 48 13 14 15 16 18 17 + 7 8 9 10 12 11 37 38 39 40 42 41 + 33 34 31 32 35 36 27 28 25 26 29 30 + 19 20 21 22 24 23 4 3 2 1 5 6 + operation j=47 : 47 48 45 46 43 44 21 22 19 20 23 24 + 10 9 11 12 7 8 34 33 35 36 31 32 + 3 4 5 6 2 1 15 16 13 14 17 18 + 27 28 25 26 29 30 37 38 39 40 42 41 + operation j=48 : 48 47 43 44 45 46 15 16 13 14 17 18 + 9 10 7 8 11 12 33 34 31 32 35 36 + 37 38 39 40 42 41 21 22 19 20 23 24 + 25 26 27 28 30 29 3 4 5 6 2 1 + + + Space group can be generated using 5 generators: 13 4 9 34 2 + + generators (in lattice coordinates): + +&gen 5 + + -1 0 0 0.00000 + 0 -1 0 0.00000 + 0 0 -1 0.00000 + + 0 -1 0 0.00000 + 1 -1 0 0.00000 + 0 -1 1 0.00000 + + 0 1 -1 0.00000 + 1 0 -1 0.00000 + 0 0 -1 0.00000 + + 0 -1 1 0.00000 + 0 -1 0 0.00000 + 1 -1 0 0.00000 + + -1 0 0 0.00000 + -1 1 0 0.00000 + -1 0 1 0.00000 + +/ ! end generators + + + + Atomic positions: + ----------------- + atom types = 1 + total = 1 + + lattice coordinates (scaled) Cartesian coordinates atom + + atom type 1: atomic identification number = 74.0 representative = 1 + 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 1 + +atoms% 1 atoms 1 + Z( 1)= 74 atoms 1 + 0.000000 0.000000 0.000000 1 + ---------------------------------------------------- + Suggested values for input: + + Atom Z lmax jri rmt dx + W 74 10 841 2.544787 0.015844 +k_max = 3.92960 +G_max =11.78881 + + =============================================== + === modifying atomic input for &(all)atom === + =============================================== + +for atom 1 ( W) changed rmt to 2.100000 +for atom 1 ( W) changed jri to 981 +for atom 1 ( W) changed lmax to 12 +for atom 1 ( W) changed lnonsph to 6 +for atom 1 ( W) set econfig to [Kr] 4d10 4f14 | 5s2 5p6 6s2 5d4 + corestates = 16 with 60.0 electrons + valence st.= 5 with 14.0 electrons +nlod = 2 llod = 1 : 5s5p + nlo( 1) = 2 llo = 0 1 + lonqn = 5 5 +line: 13>&comp +line: 14>gmax=15.0 gmaxxc=12.5 kmax=5.0 / + ---------- + core : 1 -1 2.0 + core : 2 -1 2.0 + core : 2 1 2.0 + core : 2 -2 4.0 + core : 3 -1 2.0 + core : 3 1 2.0 + core : 3 -2 4.0 + core : 3 2 4.0 + core : 3 -3 6.0 + core : 4 -1 2.0 + core : 4 1 2.0 + core : 4 -2 4.0 + core : 4 2 4.0 + core : 4 -3 6.0 + core : 4 3 6.0 + core : 4 -4 8.0 + valence : 5 -1 2.0 5s + valence : 5 1 2.0 5p + valence : 5 -2 4.0 5p + valence : 6 -1 2.0 6s + valence : 5 2 2.0 5d + valence : 5 -3 2.0 5d + ---------- +Valence Electrons = 14 + ---------------------------------------------------- + Suggested values for input: + + Atom Z lmax jri rmt dx + W 74 10 841 2.544787 0.015844 +k_max = 3.92960 +G_max =11.78881 +line: 15>&kpt +line: 16>div1=3 div2=3 div3=3 tkb=0.0005 / + 5.22007561671395 5.22007561671395 5.22007561671395 + -0.333333333333333 -0.333333333333333 -0.333333333333333 + body centered cubic + values accepted unchanged + 3 3 3 nmop(i),i=1,3 + orientation of boundary faces + 1 -1 -0.5740361 ifac,iside,orient for xvec + 2 -1 -0.0454288 ifac,iside,orient for xvec + 3 -1 -0.0256305 ifac,iside,orient for xvec + 4 -1 -0.0469244 ifac,iside,orient for xvec +Bravais lattice vectors + -3.013812 3.013812 3.013812 + 3.013812 -3.013812 3.013812 + 3.013812 3.013812 -3.013812 +reciprocal lattice vectors + -0.000000 1.042398 1.042398 + 1.042398 -0.000000 1.042398 + 1.042398 1.042398 -0.000000 + 3 3 3 Monkhorst-Pack-parameters + 0 nreg; k-points in irreducible wedge of BZ + Monkhorst-Pack-fractions + 0 nbound; no k-points on boundary of BZ + 1 idim + -0.3333333 + 0.0000000 + 0.3333333 + 2 idim + -0.3333333 + 0.0000000 + 0.3333333 + 3 idim + -0.3333333 + 0.0000000 + 0.3333333 + +k-point count: 4 + +k-point mesh: 3 3 3 +k-point density: 2.035038 2.035038 2.035038 + diff --git a/aiida_fleur/tests/calculation/data_dir/mock-inpgen-5129f061d3a7cdba78de73e5d407ed1b/out.error b/aiida_fleur/tests/calculation/data_dir/mock-inpgen-5129f061d3a7cdba78de73e5d407ed1b/out.error new file mode 100644 index 000000000..e69de29bb diff --git a/aiida_fleur/tests/calculation/data_dir/mock-inpgen-5129f061d3a7cdba78de73e5d407ed1b/shell.out b/aiida_fleur/tests/calculation/data_dir/mock-inpgen-5129f061d3a7cdba78de73e5d407ed1b/shell.out new file mode 100644 index 000000000..91cd3bb77 --- /dev/null +++ b/aiida_fleur/tests/calculation/data_dir/mock-inpgen-5129f061d3a7cdba78de73e5d407ed1b/shell.out @@ -0,0 +1,2 @@ + Welcome to FLEUR - inpgen (www.flapw.de) + MaX-Release 4.0 (www.max-centre.eu) diff --git a/aiida_fleur/tests/calculation/data_dir/mock-inpgen-5129f061d3a7cdba78de73e5d407ed1b/struct.xsf b/aiida_fleur/tests/calculation/data_dir/mock-inpgen-5129f061d3a7cdba78de73e5d407ed1b/struct.xsf new file mode 100644 index 000000000..0845c3478 --- /dev/null +++ b/aiida_fleur/tests/calculation/data_dir/mock-inpgen-5129f061d3a7cdba78de73e5d407ed1b/struct.xsf @@ -0,0 +1,9 @@ + CRYSTAL + PRIMVEC +-1.5948407 1.5948407 1.5948407 +1.5948407 -1.5948407 1.5948407 +1.5948407 1.5948407 -1.5948407 + PRIMCOORD + 1 1 + 74 .0000000 .0000000 .0000000 + diff --git a/aiida_fleur/tests/calculation/data_dir/mock-inpgen-6091815815005044f642e1ab38698ff5/FleurInputSchema.xsd b/aiida_fleur/tests/calculation/data_dir/mock-inpgen-6091815815005044f642e1ab38698ff5/FleurInputSchema.xsd new file mode 100644 index 000000000..5053d677e --- /dev/null +++ b/aiida_fleur/tests/calculation/data_dir/mock-inpgen-6091815815005044f642e1ab38698ff5/FleurInputSchema.xsd @@ -0,0 +1,1037 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/aiida_fleur/tests/calculation/data_dir/mock-inpgen-6091815815005044f642e1ab38698ff5/_scheduler-stderr.txt b/aiida_fleur/tests/calculation/data_dir/mock-inpgen-6091815815005044f642e1ab38698ff5/_scheduler-stderr.txt new file mode 100644 index 000000000..e69de29bb diff --git a/aiida_fleur/tests/calculation/data_dir/mock-inpgen-6091815815005044f642e1ab38698ff5/_scheduler-stdout.txt b/aiida_fleur/tests/calculation/data_dir/mock-inpgen-6091815815005044f642e1ab38698ff5/_scheduler-stdout.txt new file mode 100644 index 000000000..e69de29bb diff --git a/aiida_fleur/tests/calculation/data_dir/mock-inpgen-6091815815005044f642e1ab38698ff5/aiida.in b/aiida_fleur/tests/calculation/data_dir/mock-inpgen-6091815815005044f642e1ab38698ff5/aiida.in new file mode 100644 index 000000000..cc529be07 --- /dev/null +++ b/aiida_fleur/tests/calculation/data_dir/mock-inpgen-6091815815005044f642e1ab38698ff5/aiida.in @@ -0,0 +1,16 @@ +A Fleur input generator calculation with aiida +&input cartesian=F / + -6.0276216515 6.0276216515 6.0276216515 + 6.0276216515 -6.0276216515 6.0276216515 + 6.0276216515 6.0276216515 -6.0276216515 + 1.0000000000 + 1.0000000000 1.0000000000 1.0000000000 + + 1 + 74 0.0000000000 0.0000000000 0.0000000000 +&atom + econfig="[Kr] 4d10 4f14 | 5s2 5p6 6s2 5d4" element="W" jri=981 lmax=12 lnonsph=6 lo="5s 5p" rmt=2.1 / +&comp + gmax=15.0 gmaxxc=12.5 kmax=5.0 / +&kpt + div1=3 div2=3 div3=3 tkb=0.0005 / diff --git a/aiida_fleur/tests/calculation/data_dir/mock-inpgen-6091815815005044f642e1ab38698ff5/inp.xml b/aiida_fleur/tests/calculation/data_dir/mock-inpgen-6091815815005044f642e1ab38698ff5/inp.xml new file mode 100644 index 000000000..69cdfd0dd --- /dev/null +++ b/aiida_fleur/tests/calculation/data_dir/mock-inpgen-6091815815005044f642e1ab38698ff5/inp.xml @@ -0,0 +1,319 @@ + + + + A Fleur input generator calculation with aiida + + + + + + + + + + .0000000000 .0000000000 .0000000000 + + + + + + + -0.000000 0.333333 0.333333 + -0.333333 0.333333 0.333333 + 0.000000 0.000000 0.333333 + 0.000000 0.000000 0.000000 + + + + + + + + + + + 1 0 0 .0000000000 + 0 1 0 .0000000000 + 0 0 1 .0000000000 + + + -1 0 0 .0000000000 + -1 1 0 .0000000000 + -1 0 1 .0000000000 + + + 1 -1 0 .0000000000 + 0 -1 0 .0000000000 + 0 -1 1 .0000000000 + + + 0 -1 0 .0000000000 + 1 -1 0 .0000000000 + 0 -1 1 .0000000000 + + + -1 1 0 .0000000000 + -1 0 0 .0000000000 + -1 0 1 .0000000000 + + + 0 1 0 .0000000000 + 1 0 0 .0000000000 + 0 0 1 .0000000000 + + + 1 0 -1 .0000000000 + 0 1 -1 .0000000000 + 0 0 -1 .0000000000 + + + 0 0 -1 .0000000000 + 0 1 -1 .0000000000 + 1 0 -1 .0000000000 + + + 0 1 -1 .0000000000 + 1 0 -1 .0000000000 + 0 0 -1 .0000000000 + + + 0 1 -1 .0000000000 + 0 0 -1 .0000000000 + 1 0 -1 .0000000000 + + + 1 0 -1 .0000000000 + 0 0 -1 .0000000000 + 0 1 -1 .0000000000 + + + 0 0 -1 .0000000000 + 1 0 -1 .0000000000 + 0 1 -1 .0000000000 + + + -1 0 0 .0000000000 + 0 -1 0 .0000000000 + 0 0 -1 .0000000000 + + + 1 0 0 .0000000000 + 1 -1 0 .0000000000 + 1 0 -1 .0000000000 + + + 0 -1 0 .0000000000 + -1 0 0 .0000000000 + 0 0 -1 .0000000000 + + + 1 -1 0 .0000000000 + 1 0 0 .0000000000 + 1 0 -1 .0000000000 + + + 0 1 0 .0000000000 + -1 1 0 .0000000000 + 0 1 -1 .0000000000 + + + -1 1 0 .0000000000 + 0 1 0 .0000000000 + 0 1 -1 .0000000000 + + + -1 0 0 .0000000000 + 0 0 -1 .0000000000 + 0 -1 0 .0000000000 + + + 1 0 0 .0000000000 + 1 0 -1 .0000000000 + 1 -1 0 .0000000000 + + + 0 -1 0 .0000000000 + 0 0 -1 .0000000000 + -1 0 0 .0000000000 + + + 1 -1 0 .0000000000 + 1 0 -1 .0000000000 + 1 0 0 .0000000000 + + + 0 1 0 .0000000000 + 0 1 -1 .0000000000 + -1 1 0 .0000000000 + + + -1 1 0 .0000000000 + 0 1 -1 .0000000000 + 0 1 0 .0000000000 + + + 0 0 -1 .0000000000 + -1 0 0 .0000000000 + 0 -1 0 .0000000000 + + + 1 0 -1 .0000000000 + 1 0 0 .0000000000 + 1 -1 0 .0000000000 + + + 0 0 -1 .0000000000 + 0 -1 0 .0000000000 + -1 0 0 .0000000000 + + + 1 0 -1 .0000000000 + 1 -1 0 .0000000000 + 1 0 0 .0000000000 + + + 0 1 -1 .0000000000 + 0 1 0 .0000000000 + -1 1 0 .0000000000 + + + 0 1 -1 .0000000000 + -1 1 0 .0000000000 + 0 1 0 .0000000000 + + + -1 0 1 .0000000000 + -1 1 0 .0000000000 + -1 0 0 .0000000000 + + + 0 0 1 .0000000000 + 0 1 0 .0000000000 + 1 0 0 .0000000000 + + + 0 -1 1 .0000000000 + 1 -1 0 .0000000000 + 0 -1 0 .0000000000 + + + 0 -1 1 .0000000000 + 0 -1 0 .0000000000 + 1 -1 0 .0000000000 + + + -1 0 1 .0000000000 + -1 0 0 .0000000000 + -1 1 0 .0000000000 + + + 0 0 1 .0000000000 + 1 0 0 .0000000000 + 0 1 0 .0000000000 + + + 1 -1 0 .0000000000 + 0 -1 1 .0000000000 + 0 -1 0 .0000000000 + + + 0 -1 0 .0000000000 + 0 -1 1 .0000000000 + 1 -1 0 .0000000000 + + + -1 1 0 .0000000000 + -1 0 1 .0000000000 + -1 0 0 .0000000000 + + + 0 1 0 .0000000000 + 0 0 1 .0000000000 + 1 0 0 .0000000000 + + + 1 0 0 .0000000000 + 0 0 1 .0000000000 + 0 1 0 .0000000000 + + + -1 0 0 .0000000000 + -1 0 1 .0000000000 + -1 1 0 .0000000000 + + + 0 0 1 .0000000000 + -1 0 1 .0000000000 + 0 -1 1 .0000000000 + + + -1 0 1 .0000000000 + 0 0 1 .0000000000 + 0 -1 1 .0000000000 + + + 0 0 1 .0000000000 + 0 -1 1 .0000000000 + -1 0 1 .0000000000 + + + -1 0 1 .0000000000 + 0 -1 1 .0000000000 + 0 0 1 .0000000000 + + + 0 -1 1 .0000000000 + 0 0 1 .0000000000 + -1 0 1 .0000000000 + + + 0 -1 1 .0000000000 + -1 0 1 .0000000000 + 0 0 1 .0000000000 + + + + + -6.027621651500000 6.027621651500000 6.027621651500000 + 6.027621651500000 -6.027621651500000 6.027621651500000 + 6.027621651500000 6.027621651500000 -6.027621651500000 + + + + + + + + + + + + [Kr] (4d3/2) (4d5/2) (4f5/2) (4f7/2) + (5s1/2) (5p1/2) (5p3/2) (6s1/2) (5d3/2) (5d5/2) + + + + + + + + + + .0000000000 .0000000000 .0000000000 + + + + + + + + + + + + + + + + + diff --git a/aiida_fleur/tests/calculation/data_dir/mock-inpgen-6091815815005044f642e1ab38698ff5/out b/aiida_fleur/tests/calculation/data_dir/mock-inpgen-6091815815005044f642e1ab38698ff5/out new file mode 100644 index 000000000..abfeae01e --- /dev/null +++ b/aiida_fleur/tests/calculation/data_dir/mock-inpgen-6091815815005044f642e1ab38698ff5/out @@ -0,0 +1,687 @@ +line: 1>A Fleur input generator calculation with aiida +line: 2>&input cartesian=F / +line: 3>-6.0276216515 6.0276216515 6.0276216515 +line: 4>6.0276216515 -6.0276216515 6.0276216515 +line: 5>6.0276216515 6.0276216515 -6.0276216515 +line: 6>1.0000000000 +line: 7>1.0000000000 1.0000000000 1.0000000000 +line: 8> +line: 9>1 +line: 10>74 0.0000000000 0.0000000000 0.0000000000 +line: 11>&atom +line: 12>econfig="[Kr] 4d10 4f14 | 5s2 5p6 6s2 5d4" element="W" jri=981 lm + + A Fleur input generator calculation with aiida + + film= F cartesian= F + checkinp= F symor= F + +a1 = -6.02762 6.02762 6.02762 +a2 = 6.02762 -6.02762 6.02762 +a3 = 6.02762 6.02762 -6.02762 + +dvac= -6.02762 aa = 1.00000 +scale = 1.00000 1.00000 1.00000 + +natin= 1 Z = 74 + positions: + 0.00000 0.00000 0.00000 + + generators: 0 (excluding identity) + + + Lattice information: + -------------------- + + overall lattice constant a0 = 1.000000 bohr + + real-space primitive lattice vectors in units of a_{x,y,z} + a_1: -6.027622 6.027622 6.027622 + a_2: 6.027622 -6.027622 6.027622 + a_3: 6.027622 6.027622 -6.027622 + + lattice constants a_x, a_y, a_z = 1.000000 1.000000 1.000000 + volume of unit cell (a.u.^3) = 875.987571 + +dbg: lattice matrices + 875.987570549852 +dbg: as : + -6.027622 6.027622 6.027622 + 6.027622 -6.027622 6.027622 + 6.027622 6.027622 -6.027622 +dbg: bs : + -0.000000 0.082951 0.082951 + 0.082951 -0.000000 0.082951 + 0.082951 0.082951 -0.000000 +dbg: amat : + -6.027622 6.027622 6.027622 + 6.027622 -6.027622 6.027622 + 6.027622 6.027622 -6.027622 +dbg: bmat : + -0.000000 0.260600 0.260600 + 0.260600 -0.000000 0.260600 + 0.260600 0.260600 -0.000000 +dbg: amatinv : + -0.000000 0.082951 0.082951 + 0.082951 -0.000000 0.082951 + 0.082951 0.082951 -0.000000 +dbg: aamat : + 108.996668 -36.332223 -36.332223 + -36.332223 108.996668 -36.332223 + -36.332223 -36.332223 108.996668 +dbg: bbmat : + 0.135824 0.067912 0.067912 + 0.067912 0.135824 0.067912 + 0.067912 0.067912 0.135824 + +dbg: lattice vectors : +vector 1 : -6.02762 6.02762 6.02762 length : 10.44015 +vector 2 : 6.02762 -6.02762 6.02762 length : 10.44015 +vector 3 : 6.02762 6.02762 -6.02762 length : 10.44015 +angle between vectors (1,2) =109.47122 +angle between vectors (1,3) =109.47122 +angle between vectors (2,3) =109.47122 + +dbg: reciprocal lattice vectors : +vector 1 : -0.00000 0.26060 0.26060 length : 0.36854 +vector 2 : 0.26060 -0.00000 0.26060 length : 0.36854 +vector 3 : 0.26060 0.26060 -0.00000 length : 0.36854 +angle between vectors (1,2) = 60.00000 +angle between vectors (1,3) = 60.00000 +angle between vectors (2,3) = 60.00000 + + + Point group of the Bravais lattice has 48 operations + + DBG: symor,zorth,oldfleur : T F F + DBG: optype : 1 -2 -2 3 3 -2 -2 3 2 -4 3 -4 -1 2 2 -3 -3 2 2 -2 -3 4 4 -3 -3 4 2 -3 -2 4 3 -2 -4 2 -4 3 3 -4 -4 3 -2 2 4 -3 -3 2 4 -2 + DBG: invsym,invs,zrfs,invs2 : T T F F + DBG: (before reorder) invsop,zrfsop,invs2op : 13 7 46 + + Space group information: + ------------------------ + 48 operations + space group is symmorphic + has inversion symmetry + + + Operations: (in International notation) + --------------------------------------- + lattice coordinates (scaled) Cartesian coordinates + + operation 1: 1 (inverse = 1) + ( 1 0 0 ) ( 0.000 ) ( 1.00000 -0.00000 -0.00000 ) ( 0.000 ) + ( 0 1 0 ) ( 0.000 ) ( -0.00000 1.00000 -0.00000 ) ( 0.000 ) + ( 0 0 1 ) ( 0.000 ) ( 0.00000 0.00000 1.00000 ) ( 0.000 ) + _ + operation 2: 2 (inverse = 2) + ( -1 0 0 ) ( 0.000 ) ( 1.00000 0.00000 0.00000 ) ( 0.000 ) + ( -1 1 0 ) ( 0.000 ) ( -0.00000 -0.00000 -1.00000 ) ( 0.000 ) + ( -1 0 1 ) ( 0.000 ) ( 0.00000 -1.00000 -0.00000 ) ( 0.000 ) + _ + operation 3: 2 (inverse = 3) + ( 1 -1 0 ) ( 0.000 ) ( 0.00000 -0.00000 -1.00000 ) ( 0.000 ) + ( 0 -1 0 ) ( 0.000 ) ( -0.00000 1.00000 0.00000 ) ( 0.000 ) + ( 0 -1 1 ) ( 0.000 ) ( -1.00000 0.00000 -0.00000 ) ( 0.000 ) + + operation 4: 3 (inverse = 5) + ( 0 -1 0 ) ( 0.000 ) ( 0.00000 1.00000 0.00000 ) ( 0.000 ) + ( 1 -1 0 ) ( 0.000 ) ( -0.00000 -0.00000 -1.00000 ) ( 0.000 ) + ( 0 -1 1 ) ( 0.000 ) ( -1.00000 0.00000 -0.00000 ) ( 0.000 ) + + operation 5: 3 (inverse = 4) + ( -1 1 0 ) ( 0.000 ) ( -0.00000 0.00000 -1.00000 ) ( 0.000 ) + ( -1 0 0 ) ( 0.000 ) ( 1.00000 -0.00000 0.00000 ) ( 0.000 ) + ( -1 0 1 ) ( 0.000 ) ( 0.00000 -1.00000 -0.00000 ) ( 0.000 ) + _ + operation 6: 2 (inverse = 6) + ( 0 1 0 ) ( 0.000 ) ( -0.00000 1.00000 -0.00000 ) ( 0.000 ) + ( 1 0 0 ) ( 0.000 ) ( 1.00000 -0.00000 -0.00000 ) ( 0.000 ) + ( 0 0 1 ) ( 0.000 ) ( 0.00000 0.00000 1.00000 ) ( 0.000 ) + _ + operation 7: 2 (inverse = 7) + ( 1 0 -1 ) ( 0.000 ) ( 0.00000 -1.00000 0.00000 ) ( 0.000 ) + ( 0 1 -1 ) ( 0.000 ) ( -1.00000 0.00000 0.00000 ) ( 0.000 ) + ( 0 0 -1 ) ( 0.000 ) ( -0.00000 -0.00000 1.00000 ) ( 0.000 ) + + operation 8: 3 (inverse = 31) + ( 0 0 -1 ) ( 0.000 ) ( 0.00000 0.00000 1.00000 ) ( 0.000 ) + ( 0 1 -1 ) ( 0.000 ) ( -1.00000 -0.00000 -0.00000 ) ( 0.000 ) + ( 1 0 -1 ) ( 0.000 ) ( -0.00000 -1.00000 0.00000 ) ( 0.000 ) + + operation 9: 2 (inverse = 9) + ( 0 1 -1 ) ( 0.000 ) ( -1.00000 0.00000 0.00000 ) ( 0.000 ) + ( 1 0 -1 ) ( 0.000 ) ( 0.00000 -1.00000 0.00000 ) ( 0.000 ) + ( 0 0 -1 ) ( 0.000 ) ( -0.00000 -0.00000 1.00000 ) ( 0.000 ) + _ + operation 10: 4 (inverse = 33) + ( 0 1 -1 ) ( 0.000 ) ( -1.00000 0.00000 -0.00000 ) ( 0.000 ) + ( 0 0 -1 ) ( 0.000 ) ( 0.00000 -0.00000 1.00000 ) ( 0.000 ) + ( 1 0 -1 ) ( 0.000 ) ( -0.00000 -1.00000 0.00000 ) ( 0.000 ) + + operation 11: 3 (inverse = 37) + ( 1 0 -1 ) ( 0.000 ) ( 0.00000 -1.00000 -0.00000 ) ( 0.000 ) + ( 0 0 -1 ) ( 0.000 ) ( -0.00000 0.00000 1.00000 ) ( 0.000 ) + ( 0 1 -1 ) ( 0.000 ) ( -1.00000 -0.00000 0.00000 ) ( 0.000 ) + _ + operation 12: 4 (inverse = 39) + ( 0 0 -1 ) ( 0.000 ) ( 0.00000 0.00000 1.00000 ) ( 0.000 ) + ( 1 0 -1 ) ( 0.000 ) ( -0.00000 -1.00000 -0.00000 ) ( 0.000 ) + ( 0 1 -1 ) ( 0.000 ) ( -1.00000 -0.00000 0.00000 ) ( 0.000 ) + _ + operation 13: 1 (inverse = 13) + ( -1 0 0 ) ( 0.000 ) ( -1.00000 0.00000 0.00000 ) ( 0.000 ) + ( 0 -1 0 ) ( 0.000 ) ( 0.00000 -1.00000 0.00000 ) ( 0.000 ) + ( 0 0 -1 ) ( 0.000 ) ( -0.00000 -0.00000 -1.00000 ) ( 0.000 ) + + operation 14: 2 (inverse = 14) + ( 1 0 0 ) ( 0.000 ) ( -1.00000 -0.00000 -0.00000 ) ( 0.000 ) + ( 1 -1 0 ) ( 0.000 ) ( 0.00000 0.00000 1.00000 ) ( 0.000 ) + ( 1 0 -1 ) ( 0.000 ) ( -0.00000 1.00000 0.00000 ) ( 0.000 ) + + operation 15: 2 (inverse = 15) + ( 0 -1 0 ) ( 0.000 ) ( 0.00000 -1.00000 0.00000 ) ( 0.000 ) + ( -1 0 0 ) ( 0.000 ) ( -1.00000 0.00000 0.00000 ) ( 0.000 ) + ( 0 0 -1 ) ( 0.000 ) ( -0.00000 -0.00000 -1.00000 ) ( 0.000 ) + _ + operation 16: 3 (inverse = 17) + ( 1 -1 0 ) ( 0.000 ) ( 0.00000 -0.00000 1.00000 ) ( 0.000 ) + ( 1 0 0 ) ( 0.000 ) ( -1.00000 0.00000 -0.00000 ) ( 0.000 ) + ( 1 0 -1 ) ( 0.000 ) ( -0.00000 1.00000 0.00000 ) ( 0.000 ) + _ + operation 17: 3 (inverse = 16) + ( 0 1 0 ) ( 0.000 ) ( -0.00000 -1.00000 -0.00000 ) ( 0.000 ) + ( -1 1 0 ) ( 0.000 ) ( 0.00000 0.00000 1.00000 ) ( 0.000 ) + ( 0 1 -1 ) ( 0.000 ) ( 1.00000 -0.00000 0.00000 ) ( 0.000 ) + + operation 18: 2 (inverse = 18) + ( -1 1 0 ) ( 0.000 ) ( -0.00000 0.00000 1.00000 ) ( 0.000 ) + ( 0 1 0 ) ( 0.000 ) ( 0.00000 -1.00000 -0.00000 ) ( 0.000 ) + ( 0 1 -1 ) ( 0.000 ) ( 1.00000 -0.00000 0.00000 ) ( 0.000 ) + + operation 19: 2 (inverse = 19) + ( -1 0 0 ) ( 0.000 ) ( -1.00000 0.00000 0.00000 ) ( 0.000 ) + ( 0 0 -1 ) ( 0.000 ) ( 0.00000 0.00000 -1.00000 ) ( 0.000 ) + ( 0 -1 0 ) ( 0.000 ) ( -0.00000 -1.00000 -0.00000 ) ( 0.000 ) + _ + operation 20: 2 (inverse = 20) + ( 1 0 0 ) ( 0.000 ) ( -1.00000 -0.00000 -0.00000 ) ( 0.000 ) + ( 1 0 -1 ) ( 0.000 ) ( 0.00000 1.00000 0.00000 ) ( 0.000 ) + ( 1 -1 0 ) ( 0.000 ) ( -0.00000 0.00000 1.00000 ) ( 0.000 ) + _ + operation 21: 3 (inverse = 25) + ( 0 -1 0 ) ( 0.000 ) ( 0.00000 -1.00000 0.00000 ) ( 0.000 ) + ( 0 0 -1 ) ( 0.000 ) ( 0.00000 0.00000 -1.00000 ) ( 0.000 ) + ( -1 0 0 ) ( 0.000 ) ( -1.00000 -0.00000 -0.00000 ) ( 0.000 ) + + operation 22: 4 (inverse = 43) + ( 1 -1 0 ) ( 0.000 ) ( -0.00000 -0.00000 1.00000 ) ( 0.000 ) + ( 1 0 -1 ) ( 0.000 ) ( -0.00000 1.00000 -0.00000 ) ( 0.000 ) + ( 1 0 0 ) ( 0.000 ) ( -1.00000 0.00000 0.00000 ) ( 0.000 ) + + operation 23: 4 (inverse = 26) + ( 0 1 0 ) ( 0.000 ) ( -0.00000 -1.00000 -0.00000 ) ( 0.000 ) + ( 0 1 -1 ) ( 0.000 ) ( 1.00000 0.00000 0.00000 ) ( 0.000 ) + ( -1 1 0 ) ( 0.000 ) ( 0.00000 -0.00000 1.00000 ) ( 0.000 ) + _ + operation 24: 3 (inverse = 44) + ( -1 1 0 ) ( 0.000 ) ( -0.00000 -0.00000 1.00000 ) ( 0.000 ) + ( 0 1 -1 ) ( 0.000 ) ( 1.00000 -0.00000 -0.00000 ) ( 0.000 ) + ( 0 1 0 ) ( 0.000 ) ( 0.00000 -1.00000 0.00000 ) ( 0.000 ) + _ + operation 25: 3 (inverse = 21) + ( 0 0 -1 ) ( 0.000 ) ( 0.00000 0.00000 -1.00000 ) ( 0.000 ) + ( -1 0 0 ) ( 0.000 ) ( -1.00000 0.00000 0.00000 ) ( 0.000 ) + ( 0 -1 0 ) ( 0.000 ) ( -0.00000 -1.00000 -0.00000 ) ( 0.000 ) + + operation 26: 4 (inverse = 23) + ( 1 0 -1 ) ( 0.000 ) ( 0.00000 1.00000 -0.00000 ) ( 0.000 ) + ( 1 0 0 ) ( 0.000 ) ( -1.00000 -0.00000 0.00000 ) ( 0.000 ) + ( 1 -1 0 ) ( 0.000 ) ( -0.00000 0.00000 1.00000 ) ( 0.000 ) + + operation 27: 2 (inverse = 27) + ( 0 0 -1 ) ( 0.000 ) ( 0.00000 0.00000 -1.00000 ) ( 0.000 ) + ( 0 -1 0 ) ( 0.000 ) ( 0.00000 -1.00000 0.00000 ) ( 0.000 ) + ( -1 0 0 ) ( 0.000 ) ( -1.00000 -0.00000 -0.00000 ) ( 0.000 ) + _ + operation 28: 3 (inverse = 45) + ( 1 0 -1 ) ( 0.000 ) ( -0.00000 1.00000 -0.00000 ) ( 0.000 ) + ( 1 -1 0 ) ( 0.000 ) ( -0.00000 -0.00000 1.00000 ) ( 0.000 ) + ( 1 0 0 ) ( 0.000 ) ( -1.00000 0.00000 0.00000 ) ( 0.000 ) + _ + operation 29: 2 (inverse = 29) + ( 0 1 -1 ) ( 0.000 ) ( 1.00000 0.00000 -0.00000 ) ( 0.000 ) + ( 0 1 0 ) ( 0.000 ) ( -0.00000 -1.00000 0.00000 ) ( 0.000 ) + ( -1 1 0 ) ( 0.000 ) ( 0.00000 -0.00000 1.00000 ) ( 0.000 ) + + operation 30: 4 (inverse = 47) + ( 0 1 -1 ) ( 0.000 ) ( 1.00000 -0.00000 -0.00000 ) ( 0.000 ) + ( -1 1 0 ) ( 0.000 ) ( -0.00000 -0.00000 1.00000 ) ( 0.000 ) + ( 0 1 0 ) ( 0.000 ) ( 0.00000 -1.00000 0.00000 ) ( 0.000 ) + + operation 31: 3 (inverse = 8) + ( -1 0 1 ) ( 0.000 ) ( 0.00000 -1.00000 0.00000 ) ( 0.000 ) + ( -1 1 0 ) ( 0.000 ) ( 0.00000 0.00000 -1.00000 ) ( 0.000 ) + ( -1 0 0 ) ( 0.000 ) ( 1.00000 -0.00000 -0.00000 ) ( 0.000 ) + _ + operation 32: 2 (inverse = 32) + ( 0 0 1 ) ( 0.000 ) ( -0.00000 -0.00000 1.00000 ) ( 0.000 ) + ( 0 1 0 ) ( 0.000 ) ( -0.00000 1.00000 -0.00000 ) ( 0.000 ) + ( 1 0 0 ) ( 0.000 ) ( 1.00000 0.00000 0.00000 ) ( 0.000 ) + _ + operation 33: 4 (inverse = 10) + ( 0 -1 1 ) ( 0.000 ) ( -1.00000 0.00000 0.00000 ) ( 0.000 ) + ( 1 -1 0 ) ( 0.000 ) ( 0.00000 0.00000 -1.00000 ) ( 0.000 ) + ( 0 -1 0 ) ( 0.000 ) ( -0.00000 1.00000 -0.00000 ) ( 0.000 ) + + operation 34: 2 (inverse = 34) + ( 0 -1 1 ) ( 0.000 ) ( -1.00000 -0.00000 0.00000 ) ( 0.000 ) + ( 0 -1 0 ) ( 0.000 ) ( 0.00000 1.00000 -0.00000 ) ( 0.000 ) + ( 1 -1 0 ) ( 0.000 ) ( -0.00000 0.00000 -1.00000 ) ( 0.000 ) + _ + operation 35: 4 (inverse = 38) + ( -1 0 1 ) ( 0.000 ) ( -0.00000 -1.00000 0.00000 ) ( 0.000 ) + ( -1 0 0 ) ( 0.000 ) ( 1.00000 0.00000 -0.00000 ) ( 0.000 ) + ( -1 1 0 ) ( 0.000 ) ( 0.00000 -0.00000 -1.00000 ) ( 0.000 ) + + operation 36: 3 (inverse = 40) + ( 0 0 1 ) ( 0.000 ) ( -0.00000 -0.00000 1.00000 ) ( 0.000 ) + ( 1 0 0 ) ( 0.000 ) ( 1.00000 -0.00000 -0.00000 ) ( 0.000 ) + ( 0 1 0 ) ( 0.000 ) ( 0.00000 1.00000 0.00000 ) ( 0.000 ) + + operation 37: 3 (inverse = 11) + ( 1 -1 0 ) ( 0.000 ) ( 0.00000 0.00000 -1.00000 ) ( 0.000 ) + ( 0 -1 1 ) ( 0.000 ) ( -1.00000 0.00000 0.00000 ) ( 0.000 ) + ( 0 -1 0 ) ( 0.000 ) ( -0.00000 1.00000 -0.00000 ) ( 0.000 ) + _ + operation 38: 4 (inverse = 35) + ( 0 -1 0 ) ( 0.000 ) ( 0.00000 1.00000 0.00000 ) ( 0.000 ) + ( 0 -1 1 ) ( 0.000 ) ( -1.00000 -0.00000 -0.00000 ) ( 0.000 ) + ( 1 -1 0 ) ( 0.000 ) ( -0.00000 0.00000 -1.00000 ) ( 0.000 ) + _ + operation 39: 4 (inverse = 12) + ( -1 1 0 ) ( 0.000 ) ( 0.00000 0.00000 -1.00000 ) ( 0.000 ) + ( -1 0 1 ) ( 0.000 ) ( 0.00000 -1.00000 0.00000 ) ( 0.000 ) + ( -1 0 0 ) ( 0.000 ) ( 1.00000 -0.00000 -0.00000 ) ( 0.000 ) + + operation 40: 3 (inverse = 36) + ( 0 1 0 ) ( 0.000 ) ( -0.00000 1.00000 -0.00000 ) ( 0.000 ) + ( 0 0 1 ) ( 0.000 ) ( -0.00000 -0.00000 1.00000 ) ( 0.000 ) + ( 1 0 0 ) ( 0.000 ) ( 1.00000 0.00000 0.00000 ) ( 0.000 ) + _ + operation 41: 2 (inverse = 41) + ( 1 0 0 ) ( 0.000 ) ( 1.00000 -0.00000 -0.00000 ) ( 0.000 ) + ( 0 0 1 ) ( 0.000 ) ( -0.00000 -0.00000 1.00000 ) ( 0.000 ) + ( 0 1 0 ) ( 0.000 ) ( 0.00000 1.00000 0.00000 ) ( 0.000 ) + + operation 42: 2 (inverse = 42) + ( -1 0 0 ) ( 0.000 ) ( 1.00000 0.00000 0.00000 ) ( 0.000 ) + ( -1 0 1 ) ( 0.000 ) ( -0.00000 -1.00000 -0.00000 ) ( 0.000 ) + ( -1 1 0 ) ( 0.000 ) ( 0.00000 -0.00000 -1.00000 ) ( 0.000 ) + + operation 43: 4 (inverse = 22) + ( 0 0 1 ) ( 0.000 ) ( -0.00000 -0.00000 -1.00000 ) ( 0.000 ) + ( -1 0 1 ) ( 0.000 ) ( 0.00000 1.00000 0.00000 ) ( 0.000 ) + ( 0 -1 1 ) ( 0.000 ) ( 1.00000 0.00000 -0.00000 ) ( 0.000 ) + _ + operation 44: 3 (inverse = 24) + ( -1 0 1 ) ( 0.000 ) ( -0.00000 1.00000 0.00000 ) ( 0.000 ) + ( 0 0 1 ) ( 0.000 ) ( 0.00000 -0.00000 -1.00000 ) ( 0.000 ) + ( 0 -1 1 ) ( 0.000 ) ( 1.00000 0.00000 -0.00000 ) ( 0.000 ) + _ + operation 45: 3 (inverse = 28) + ( 0 0 1 ) ( 0.000 ) ( -0.00000 -0.00000 -1.00000 ) ( 0.000 ) + ( 0 -1 1 ) ( 0.000 ) ( 1.00000 0.00000 0.00000 ) ( 0.000 ) + ( -1 0 1 ) ( 0.000 ) ( 0.00000 1.00000 -0.00000 ) ( 0.000 ) + + operation 46: 2 (inverse = 46) + ( -1 0 1 ) ( 0.000 ) ( -0.00000 1.00000 -0.00000 ) ( 0.000 ) + ( 0 -1 1 ) ( 0.000 ) ( 1.00000 -0.00000 -0.00000 ) ( 0.000 ) + ( 0 0 1 ) ( 0.000 ) ( 0.00000 0.00000 -1.00000 ) ( 0.000 ) + + operation 47: 4 (inverse = 30) + ( 0 -1 1 ) ( 0.000 ) ( 1.00000 -0.00000 0.00000 ) ( 0.000 ) + ( 0 0 1 ) ( 0.000 ) ( -0.00000 0.00000 -1.00000 ) ( 0.000 ) + ( -1 0 1 ) ( 0.000 ) ( 0.00000 1.00000 -0.00000 ) ( 0.000 ) + _ + operation 48: 2 (inverse = 48) + ( 0 -1 1 ) ( 0.000 ) ( 1.00000 -0.00000 -0.00000 ) ( 0.000 ) + ( -1 0 1 ) ( 0.000 ) ( -0.00000 1.00000 -0.00000 ) ( 0.000 ) + ( 0 0 1 ) ( 0.000 ) ( 0.00000 0.00000 -1.00000 ) ( 0.000 ) + + Multiplcation table: {R_j|t_j}{R_i|t_i} + operation j= 1 : 1 2 3 4 5 6 7 8 9 10 11 12 + 13 14 15 16 17 18 19 20 21 22 23 24 + 25 26 27 28 29 30 31 32 33 34 35 36 + 37 38 39 40 41 42 43 44 45 46 47 48 + operation j= 2 : 2 1 5 6 3 4 31 32 33 34 35 36 + 14 13 17 18 15 16 20 19 23 24 21 22 + 43 44 45 46 47 48 7 8 9 10 11 12 + 39 40 37 38 42 41 25 26 27 28 29 30 + operation j= 3 : 3 4 1 2 6 5 37 38 39 40 41 42 + 18 17 16 15 14 13 44 43 47 48 45 46 + 26 25 29 30 27 28 33 34 31 32 36 35 + 7 8 9 10 11 12 20 19 23 24 21 22 + operation j= 4 : 4 3 6 5 1 2 33 34 31 32 36 35 + 17 18 14 13 16 15 43 44 45 46 47 48 + 20 19 23 24 21 22 37 38 39 40 41 42 + 9 10 7 8 12 11 26 25 29 30 27 28 + operation j= 5 : 5 6 2 1 4 3 39 40 37 38 42 41 + 16 15 18 17 13 14 26 25 29 30 27 28 + 44 43 47 48 45 46 9 10 7 8 12 11 + 31 32 33 34 35 36 19 20 21 22 23 24 + operation j= 6 : 6 5 4 3 2 1 9 10 7 8 12 11 + 15 16 13 14 18 17 25 26 27 28 29 30 + 19 20 21 22 23 24 39 40 37 38 42 41 + 33 34 31 32 36 35 44 43 47 48 45 46 + operation j= 7 : 7 8 11 12 10 9 1 2 6 5 3 4 + 46 45 48 47 43 44 24 23 22 21 20 19 + 30 29 28 27 26 25 32 31 36 35 34 33 + 41 42 40 39 37 38 17 18 14 13 16 15 + operation j= 8 : 8 7 10 9 11 12 32 31 36 35 34 33 + 45 46 43 44 48 47 23 24 20 19 22 21 + 17 18 14 13 16 15 1 2 6 5 3 4 + 40 39 41 42 38 37 30 29 28 27 26 25 + operation j= 9 : 9 10 12 11 8 7 6 5 1 2 4 3 + 48 47 46 45 44 43 30 29 28 27 26 25 + 24 23 22 21 20 19 40 39 41 42 38 37 + 36 35 32 31 33 34 18 17 16 15 14 13 + operation j=10 : 10 9 8 7 12 11 40 39 41 42 38 37 + 47 48 44 43 46 45 29 30 26 25 28 27 + 18 17 16 15 14 13 6 5 1 2 4 3 + 32 31 36 35 34 33 24 23 22 21 20 19 + operation j=11 : 11 12 7 8 9 10 41 42 40 39 37 38 + 44 43 47 48 45 46 18 17 16 15 14 13 + 29 30 26 25 28 27 36 35 32 31 33 34 + 1 2 6 5 3 4 23 24 20 19 22 21 + operation j=12 : 12 11 9 10 7 8 36 35 32 31 33 34 + 43 44 45 46 47 48 17 18 14 13 16 15 + 23 24 20 19 22 21 41 42 40 39 37 38 + 6 5 1 2 4 3 29 30 26 25 28 27 + operation j=13 : 13 14 18 17 16 15 46 45 48 47 44 43 + 1 2 6 5 4 3 41 42 40 39 38 37 + 36 35 32 31 34 33 28 27 30 29 26 25 + 24 23 22 21 19 20 12 11 8 7 10 9 + operation j=14 : 14 13 16 15 18 17 28 27 30 29 26 25 + 2 1 4 3 6 5 42 41 38 37 40 39 + 12 11 8 7 10 9 46 45 48 47 44 43 + 22 21 24 23 20 19 36 35 32 31 34 33 + operation j=15 : 15 16 17 18 14 13 48 47 46 45 43 44 + 6 5 1 2 3 4 36 35 32 31 34 33 + 41 42 40 39 38 37 22 21 24 23 20 19 + 30 29 28 27 25 26 11 12 10 9 8 7 + operation j=16 : 16 15 14 13 17 18 22 21 24 23 20 19 + 5 6 3 4 1 2 35 36 34 33 32 31 + 11 12 10 9 8 7 48 47 46 45 43 44 + 28 27 30 29 26 25 41 42 40 39 38 37 + operation j=17 : 17 18 15 16 13 14 30 29 28 27 25 26 + 4 3 2 1 5 6 12 11 8 7 10 9 + 42 41 38 37 40 39 24 23 22 21 19 20 + 48 47 46 45 43 44 35 36 34 33 32 31 + operation j=18 : 18 17 13 14 15 16 24 23 22 21 19 20 + 3 4 5 6 2 1 11 12 10 9 8 7 + 35 36 34 33 32 31 30 29 28 27 25 26 + 46 45 48 47 44 43 42 41 38 37 40 39 + operation j=19 : 19 20 24 23 22 21 44 43 47 48 46 45 + 41 42 40 39 38 37 1 2 6 5 4 3 + 32 31 36 35 33 34 26 25 29 30 28 27 + 18 17 16 15 13 14 8 7 12 11 9 10 + operation j=20 : 20 19 22 21 24 23 26 25 29 30 28 27 + 42 41 38 37 40 39 2 1 4 3 6 5 + 8 7 12 11 9 10 44 43 47 48 46 45 + 16 15 18 17 14 13 32 31 36 35 33 34 + operation j=21 : 21 22 23 24 20 19 47 48 44 43 45 46 + 40 39 41 42 37 38 32 31 36 35 33 34 + 1 2 6 5 4 3 16 15 18 17 14 13 + 29 30 26 25 27 28 7 8 9 10 12 11 + operation j=22 : 22 21 20 19 23 24 16 15 18 17 14 13 + 39 40 37 38 41 42 31 32 33 34 36 35 + 7 8 9 10 12 11 47 48 44 43 45 46 + 26 25 29 30 28 27 1 2 6 5 4 3 + operation j=23 : 23 24 21 22 19 20 29 30 26 25 27 28 + 38 37 42 41 39 40 8 7 12 11 9 10 + 2 1 4 3 6 5 18 17 16 15 13 14 + 47 48 44 43 45 46 31 32 33 34 36 35 + operation j=24 : 24 23 19 20 21 22 18 17 16 15 13 14 + 37 38 39 40 42 41 7 8 9 10 12 11 + 31 32 33 34 36 35 29 30 26 25 27 28 + 44 43 47 48 46 45 2 1 4 3 6 5 + operation j=25 : 25 26 30 29 28 27 43 44 45 46 48 47 + 36 35 32 31 34 33 6 5 1 2 3 4 + 40 39 41 42 37 38 20 19 23 24 22 21 + 17 18 14 13 15 16 10 9 11 12 7 8 + operation j=26 : 26 25 28 27 30 29 20 19 23 24 22 21 + 35 36 34 33 32 31 5 6 3 4 1 2 + 10 9 11 12 7 8 43 44 45 46 48 47 + 14 13 17 18 16 15 40 39 41 42 37 38 + operation j=27 : 27 28 29 30 26 25 45 46 43 44 47 48 + 32 31 36 35 33 34 40 39 41 42 37 38 + 6 5 1 2 3 4 14 13 17 18 16 15 + 23 24 20 19 21 22 9 10 7 8 11 12 + operation j=28 : 28 27 26 25 29 30 14 13 17 18 16 15 + 31 32 33 34 36 35 39 40 37 38 41 42 + 9 10 7 8 11 12 45 46 43 44 47 48 + 20 19 23 24 22 21 6 5 1 2 3 4 + operation j=29 : 29 30 27 28 25 26 23 24 20 19 21 22 + 34 33 35 36 31 32 10 9 11 12 7 8 + 5 6 3 4 1 2 17 18 14 13 15 16 + 45 46 43 44 47 48 39 40 37 38 41 42 + operation j=30 : 30 29 25 26 27 28 17 18 14 13 15 16 + 33 34 31 32 35 36 9 10 7 8 11 12 + 39 40 37 38 41 42 23 24 20 19 21 22 + 43 44 45 46 48 47 5 6 3 4 1 2 + operation j=31 : 31 32 35 36 34 33 2 1 4 3 5 6 + 28 27 30 29 25 26 22 21 24 23 19 20 + 48 47 46 45 44 43 8 7 12 11 10 9 + 42 41 38 37 39 40 15 16 13 14 18 17 + operation j=32 : 32 31 34 33 35 36 8 7 12 11 10 9 + 27 28 25 26 30 29 21 22 19 20 24 23 + 15 16 13 14 18 17 2 1 4 3 5 6 + 38 37 42 41 40 39 48 47 46 45 44 43 + operation j=33 : 33 34 36 35 32 31 4 3 2 1 6 5 + 30 29 28 27 26 25 48 47 46 45 44 43 + 22 21 24 23 19 20 38 37 42 41 40 39 + 12 11 8 7 9 10 16 15 18 17 13 14 + operation j=34 : 34 33 32 31 36 35 38 37 42 41 40 39 + 29 30 26 25 28 27 47 48 44 43 46 45 + 16 15 18 17 13 14 4 3 2 1 6 5 + 8 7 12 11 10 9 22 21 24 23 19 20 + operation j=35 : 35 36 31 32 33 34 42 41 38 37 39 40 + 26 25 29 30 27 28 16 15 18 17 13 14 + 47 48 44 43 46 45 12 11 8 7 9 10 + 2 1 4 3 5 6 21 22 19 20 24 23 + operation j=36 : 36 35 33 34 31 32 12 11 8 7 9 10 + 25 26 27 28 29 30 15 16 13 14 18 17 + 21 22 19 20 24 23 42 41 38 37 39 40 + 4 3 2 1 6 5 47 48 44 43 46 45 + operation j=37 : 37 38 41 42 40 39 3 4 5 6 1 2 + 24 23 22 21 20 19 46 45 48 47 43 44 + 28 27 30 29 25 26 34 33 35 36 32 31 + 11 12 10 9 7 8 14 13 17 18 15 16 + operation j=38 : 38 37 40 39 41 42 34 33 35 36 32 31 + 23 24 20 19 22 21 45 46 43 44 48 47 + 14 13 17 18 15 16 3 4 5 6 1 2 + 10 9 11 12 8 7 28 27 30 29 25 26 + operation j=39 : 39 40 42 41 38 37 5 6 3 4 2 1 + 22 21 24 23 19 20 28 27 30 29 25 26 + 46 45 48 47 43 44 10 9 11 12 8 7 + 35 36 34 33 31 32 13 14 15 16 17 18 + operation j=40 : 40 39 38 37 42 41 10 9 11 12 8 7 + 21 22 19 20 24 23 27 28 25 26 30 29 + 13 14 15 16 17 18 5 6 3 4 2 1 + 34 33 35 36 32 31 46 45 48 47 43 44 + operation j=41 : 41 42 37 38 39 40 11 12 10 9 7 8 + 19 20 21 22 23 24 13 14 15 16 17 18 + 27 28 25 26 30 29 35 36 34 33 31 32 + 3 4 5 6 1 2 45 46 43 44 48 47 + operation j=42 : 42 41 39 40 37 38 35 36 34 33 31 32 + 20 19 23 24 21 22 14 13 17 18 15 16 + 45 46 43 44 48 47 11 12 10 9 7 8 + 5 6 3 4 2 1 27 28 25 26 30 29 + operation j=43 : 43 44 48 47 46 45 25 26 27 28 30 29 + 12 11 8 7 10 9 4 3 2 1 5 6 + 38 37 42 41 39 40 19 20 21 22 24 23 + 15 16 13 14 17 18 34 33 35 36 31 32 + operation j=44 : 44 43 46 45 48 47 19 20 21 22 24 23 + 11 12 10 9 8 7 3 4 5 6 2 1 + 34 33 35 36 31 32 25 26 27 28 30 29 + 13 14 15 16 18 17 38 37 42 41 39 40 + operation j=45 : 45 46 47 48 44 43 27 28 25 26 29 30 + 8 7 12 11 9 10 38 37 42 41 39 40 + 4 3 2 1 5 6 13 14 15 16 18 17 + 21 22 19 20 23 24 33 34 31 32 35 36 + operation j=46 : 46 45 44 43 47 48 13 14 15 16 18 17 + 7 8 9 10 12 11 37 38 39 40 42 41 + 33 34 31 32 35 36 27 28 25 26 29 30 + 19 20 21 22 24 23 4 3 2 1 5 6 + operation j=47 : 47 48 45 46 43 44 21 22 19 20 23 24 + 10 9 11 12 7 8 34 33 35 36 31 32 + 3 4 5 6 2 1 15 16 13 14 17 18 + 27 28 25 26 29 30 37 38 39 40 42 41 + operation j=48 : 48 47 43 44 45 46 15 16 13 14 17 18 + 9 10 7 8 11 12 33 34 31 32 35 36 + 37 38 39 40 42 41 21 22 19 20 23 24 + 25 26 27 28 30 29 3 4 5 6 2 1 + + + Space group can be generated using 5 generators: 13 4 9 34 2 + + generators (in lattice coordinates): + +&gen 5 + + -1 0 0 0.00000 + 0 -1 0 0.00000 + 0 0 -1 0.00000 + + 0 -1 0 0.00000 + 1 -1 0 0.00000 + 0 -1 1 0.00000 + + 0 1 -1 0.00000 + 1 0 -1 0.00000 + 0 0 -1 0.00000 + + 0 -1 1 0.00000 + 0 -1 0 0.00000 + 1 -1 0 0.00000 + + -1 0 0 0.00000 + -1 1 0 0.00000 + -1 0 1 0.00000 + +/ ! end generators + + + + Atomic positions: + ----------------- + atom types = 1 + total = 1 + + lattice coordinates (scaled) Cartesian coordinates atom + + atom type 1: atomic identification number = 74.0 representative = 1 + 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 1 + +atoms% 1 atoms 1 + Z( 1)= 74 atoms 1 + 0.000000 0.000000 0.000000 1 + ---------------------------------------------------- + Suggested values for input: + + Atom Z lmax jri rmt dx + W 74 10 925 2.800000 0.014507 +k_max = 3.57143 +G_max =10.71429 + + =============================================== + === modifying atomic input for &(all)atom === + =============================================== + +for atom 1 ( W) changed rmt to 2.100000 +for atom 1 ( W) changed jri to 981 +for atom 1 ( W) changed lmax to 12 +for atom 1 ( W) changed lnonsph to 6 +for atom 1 ( W) set econfig to [Kr] 4d10 4f14 | 5s2 5p6 6s2 5d4 + corestates = 16 with 60.0 electrons + valence st.= 5 with 14.0 electrons +nlod = 2 llod = 1 : 5s5p + nlo( 1) = 2 llo = 0 1 + lonqn = 5 5 +line: 13>&comp +line: 14>gmax=15.0 gmaxxc=12.5 kmax=5.0 / + ---------- + core : 1 -1 2.0 + core : 2 -1 2.0 + core : 2 1 2.0 + core : 2 -2 4.0 + core : 3 -1 2.0 + core : 3 1 2.0 + core : 3 -2 4.0 + core : 3 2 4.0 + core : 3 -3 6.0 + core : 4 -1 2.0 + core : 4 1 2.0 + core : 4 -2 4.0 + core : 4 2 4.0 + core : 4 -3 6.0 + core : 4 3 6.0 + core : 4 -4 8.0 + valence : 5 -1 2.0 5s + valence : 5 1 2.0 5p + valence : 5 -2 4.0 5p + valence : 6 -1 2.0 6s + valence : 5 2 2.0 5d + valence : 5 -3 2.0 5d + ---------- +Valence Electrons = 14 + ---------------------------------------------------- + Suggested values for input: + + Atom Z lmax jri rmt dx + W 74 10 925 2.800000 0.014507 +k_max = 3.57143 +G_max =10.71429 +line: 15>&kpt +line: 16>div1=3 div2=3 div3=3 tkb=0.0005 / + 10.4401469492002 10.4401469492002 10.4401469492002 + -0.333333333333333 -0.333333333333333 -0.333333333333333 + body centered cubic + values accepted unchanged + 3 3 3 nmop(i),i=1,3 + orientation of boundary faces + 1 -1 -0.2870182 ifac,iside,orient for xvec + 2 -1 -0.0227144 ifac,iside,orient for xvec + 3 -1 -0.0128152 ifac,iside,orient for xvec + 4 -1 -0.0234622 ifac,iside,orient for xvec +Bravais lattice vectors + -6.027622 6.027622 6.027622 + 6.027622 -6.027622 6.027622 + 6.027622 6.027622 -6.027622 +reciprocal lattice vectors + -0.000000 0.521199 0.521199 + 0.521199 -0.000000 0.521199 + 0.521199 0.521199 -0.000000 + 3 3 3 Monkhorst-Pack-parameters + 0 nreg; k-points in irreducible wedge of BZ + Monkhorst-Pack-fractions + 0 nbound; no k-points on boundary of BZ + 1 idim + -0.3333333 + 0.0000000 + 0.3333333 + 2 idim + -0.3333333 + 0.0000000 + 0.3333333 + 3 idim + -0.3333333 + 0.0000000 + 0.3333333 + +k-point count: 4 + +k-point mesh: 3 3 3 +k-point density: 4.070075 4.070075 4.070075 + diff --git a/aiida_fleur/tests/calculation/data_dir/mock-inpgen-6091815815005044f642e1ab38698ff5/out.error b/aiida_fleur/tests/calculation/data_dir/mock-inpgen-6091815815005044f642e1ab38698ff5/out.error new file mode 100644 index 000000000..e69de29bb diff --git a/aiida_fleur/tests/calculation/data_dir/mock-inpgen-6091815815005044f642e1ab38698ff5/shell.out b/aiida_fleur/tests/calculation/data_dir/mock-inpgen-6091815815005044f642e1ab38698ff5/shell.out new file mode 100644 index 000000000..91cd3bb77 --- /dev/null +++ b/aiida_fleur/tests/calculation/data_dir/mock-inpgen-6091815815005044f642e1ab38698ff5/shell.out @@ -0,0 +1,2 @@ + Welcome to FLEUR - inpgen (www.flapw.de) + MaX-Release 4.0 (www.max-centre.eu) diff --git a/aiida_fleur/tests/calculation/data_dir/mock-inpgen-6091815815005044f642e1ab38698ff5/struct.xsf b/aiida_fleur/tests/calculation/data_dir/mock-inpgen-6091815815005044f642e1ab38698ff5/struct.xsf new file mode 100644 index 000000000..2d3445b04 --- /dev/null +++ b/aiida_fleur/tests/calculation/data_dir/mock-inpgen-6091815815005044f642e1ab38698ff5/struct.xsf @@ -0,0 +1,9 @@ + CRYSTAL + PRIMVEC +-3.1896800 3.1896800 3.1896800 +3.1896800 -3.1896800 3.1896800 +3.1896800 3.1896800 -3.1896800 + PRIMCOORD + 1 1 + 74 .0000000 .0000000 .0000000 + diff --git a/aiida_fleur/tests/calculation/test_fleur.py b/aiida_fleur/tests/calculation/test_fleur.py new file mode 100644 index 000000000..4839484dc --- /dev/null +++ b/aiida_fleur/tests/calculation/test_fleur.py @@ -0,0 +1,118 @@ +# -*- coding: utf-8 -*- +"""Tests for the `FleurCalculation` class.""" + +from __future__ import absolute_import +import os +import pytest +from aiida import orm +from aiida.plugins import CalculationFactory +from aiida.engine import run_get_node +from aiida.common import datastructures + +from aiida_fleur.calculation.fleur import FleurCalculation + +import aiida_fleur + +aiida_path = os.path.dirname(aiida_fleur.__file__) +TEST_INP_XML_PATH = os.path.join(aiida_path, 'tests/files/inpxml/Si/inp.xml') #W/files/inp.xml') +CALC_ENTRY_POINT = 'fleur.fleur' + + +def test_fleur_default_calcinfo(aiida_profile, fixture_sandbox, generate_calc_job, fixture_code, create_fleurinp): + """Test a default `FleurCalculation`.""" + + parameters = {} + fleurinp = create_fleurinp(TEST_INP_XML_PATH) + inputs = { + 'code': fixture_code(CALC_ENTRY_POINT), + 'fleurinpdata': fleurinp, + # 'parameters': orm.Dict(dict=parameters), + 'metadata': { + 'options': { + 'resources': { + 'num_machines': 1 + }, + 'max_wallclock_seconds': int(60), + 'withmpi': False + } + } + } + + calc_info = generate_calc_job(fixture_sandbox, CALC_ENTRY_POINT, inputs) + codes_info = calc_info.codes_info + + cmdline_params = ['-minimalOutput', '-wtime', '1'] + local_copy_list = [(fleurinp.uuid, 'inp.xml', 'inp.xml')] + retrieve_list = ['cdn1', 'inp.xml', 'out.error', 'out.xml', 'shell.out', 'usage.json'] + retrieve_temporary_list = [] + + # Check the attributes of the returned `CalcInfo` + assert isinstance(calc_info, datastructures.CalcInfo) + assert sorted(codes_info[0].cmdline_params) == sorted(cmdline_params) + assert sorted(calc_info.local_copy_list) == sorted(local_copy_list) + assert sorted(calc_info.retrieve_list) == sorted(retrieve_list) + #assert sorted(calc_info.retrieve_temporary_list) == sorted(retrieve_temporary_list) + assert sorted(calc_info.remote_symlink_list) == sorted([]) + + # Checks on the files written to the sandbox folder as raw input + assert sorted(fixture_sandbox.get_content_list()) == sorted(['JUDFT_WARN_ONLY']) + # file_regression.check(input_written, encoding='utf-8', extension='.in') + + +@pytest.mark.skip(reason='mock code buggy, todo: check, ggf own fixture') +def test_FleurJobCalc_full_mock(aiida_profile, mock_code_factory, create_fleurinp, clear_database, + hash_code_by_entrypoint): # pylint: disable=redefined-outer-name + """ + Tests the fleur inputgenerate with a mock executable if the datafiles are their, + otherwise runs inpgen itself if a executable was specified + + """ + + mock_code = mock_code_factory( + label='fleur', + data_dir_abspath=os.path.join(os.path.dirname(os.path.abspath(__file__)), 'data_dir/'), + entry_point=CALC_ENTRY_POINT, + ignore_files=[ + '_aiidasubmit.sh', + 'cdnc', + 'out', + 'FleurInputSchema.xsd', + 'cdn.hdf', + 'usage.json', # 'cdn??'] + 'cdn00', + 'cdn01', + 'cdn02', + 'cdn03', + 'cdn04', + 'cdn05', + 'cdn06', + 'cdn07', + 'cdn08', + 'cdn09', + 'cdn10', + 'cdn11' + ]) + #mock_code.append_text = 'rm cdn?? broyd* wkf2 inf cdnc stars pot* FleurInputSchema* cdn.hdf' + + inputs = { + 'fleurinpdata': create_fleurinp(TEST_INP_XML_PATH), + #'parameters': orm.Dict(dict=parameters), + 'metadata': { + 'options': { + 'resources': { + 'num_machines': 1, + 'tot_num_mpiprocs': 1 + }, + 'max_wallclock_seconds': int(600), + 'withmpi': True + } + } + } + #calc = CalculationFactory(CALC_ENTRY_POINT, code=mock_code, **inputs) + + res, node = run_get_node(CalculationFactory(CALC_ENTRY_POINT), code=mock_code, **inputs) + + print((res['remote_folder'].list_objects())) + print((res['retrieved'].list_objects())) + assert node.is_finished_ok + #assert False diff --git a/aiida_fleur/tests/calculation/test_inpgen.py b/aiida_fleur/tests/calculation/test_inpgen.py new file mode 100644 index 000000000..6e905ee8a --- /dev/null +++ b/aiida_fleur/tests/calculation/test_inpgen.py @@ -0,0 +1,198 @@ +# -*- coding: utf-8 -*- +"""Tests for the `FleurinputgenCalculation` class.""" + +from __future__ import absolute_import +from __future__ import print_function +import os +import pytest +from aiida import orm +from aiida.common import datastructures +from aiida.engine import run_get_node +from aiida.plugins import CalculationFactory, DataFactory +from aiida_fleur.calculation.fleur import FleurCalculation + + +def test_fleurinpgen_default_calcinfo(aiida_profile, fixture_sandbox, generate_calc_job, fixture_code, + generate_structure): # file_regression + """Test a default `FleurinputgenCalculation`.""" + entry_point_name = 'fleur.inpgen' + + parameters = {} + + inputs = { + 'code': fixture_code(entry_point_name), + 'structure': generate_structure(), + # 'parameters': orm.Dict(dict=parameters), + 'metadata': { + 'options': { + 'resources': { + 'num_machines': 1 + }, + 'max_wallclock_seconds': int(100), + 'withmpi': False + } + } + } + + calc_info = generate_calc_job(fixture_sandbox, entry_point_name, inputs) + codes_info = calc_info.codes_info + cmdline_params = ['-explicit'] # for inpgen2 ['+all', '-explicit', 'aiida.in'] + local_copy_list = [] + retrieve_list = ['inp.xml', 'out', 'shell.out', 'out.error', 'struct.xsf', 'aiida.in'] + retrieve_temporary_list = [] + + # Check the attributes of the returned `CalcInfo` + assert isinstance(calc_info, datastructures.CalcInfo) + #assert sorted(codes_info[0].cmdline_params) == sorted(cmdline_params) + assert sorted(calc_info.local_copy_list) == sorted(local_copy_list) + assert sorted(calc_info.retrieve_list) == sorted(retrieve_list) + # assert sorted(calc_info.retrieve_temporary_list) == sorted(retrieve_temporary_list) + assert sorted(calc_info.remote_symlink_list) == sorted([]) + + with fixture_sandbox.open('aiida.in') as handle: + input_written = handle.read() + + aiida_in_text = """A Fleur input generator calculation with aiida\n&input cartesian=F / + 0.0000000000 5.1306064465 5.1306064465 + 5.1306064465 0.0000000000 5.1306064465 + 5.1306064465 5.1306064465 0.0000000000 + 1.0000000000 + 1.0000000000 1.0000000000 1.0000000000 + + 2\n 14 0.0000000000 0.0000000000 0.0000000000 + 14 0.2500000000 0.2500000000 0.2500000000\n""" + # Checks on the files written to the sandbox folder as raw input + assert sorted(fixture_sandbox.get_content_list()) == sorted(['aiida.in']) + assert input_written == aiida_in_text + # file_regression.check(input_written, encoding='utf-8', extension='.in') + + +def test_fleurinpgen_with_parameters(aiida_profile, fixture_sandbox, generate_calc_job, fixture_code, + generate_structure): # file_regression + """Test a default `FleurinputgenCalculation`.""" + + # Todo add (more) tests with full parameter possibilities, i.e econfig, los, .... + + entry_point_name = 'fleur.inpgen' + + parameters = { + 'atom': { + 'element': 'Si', + 'rmt': 2.1, + 'jri': 981, + 'lmax': 12, + 'lnonsph': 6 + }, #'econfig': '[He] 2s2 2p6 | 3s2 3p2', 'lo': ''}, + 'comp': { + 'kmax': 5.0, + 'gmaxxc': 12.5, + 'gmax': 15.0 + }, + 'kpt': { + 'div1': 17, + 'div2': 17, + 'div3': 17, + 'tkb': 0.0005 + } + } + + inputs = { + 'code': fixture_code(entry_point_name), + 'structure': generate_structure(), + 'parameters': orm.Dict(dict=parameters), + 'metadata': { + 'options': { + 'resources': { + 'num_machines': 1 + }, + 'max_wallclock_seconds': int(100), + 'withmpi': False + } + } + } + calc_info = generate_calc_job(fixture_sandbox, entry_point_name, inputs) + + with fixture_sandbox.open('aiida.in') as handle: + input_written = handle.read() + + aiida_in_text = """A Fleur input generator calculation with aiida\n&input cartesian=F / + 0.0000000000 5.1306064465 5.1306064465 + 5.1306064465 0.0000000000 5.1306064465 + 5.1306064465 5.1306064465 0.0000000000 + 1.0000000000 + 1.0000000000 1.0000000000 1.0000000000 + + 2\n 14 0.0000000000 0.0000000000 0.0000000000 + 14 0.2500000000 0.2500000000 0.2500000000 +&atom + element="Si" jri=981 lmax=12 lnonsph=6 rmt=2.1 / +&comp + gmax=15.0 gmaxxc=12.5 kmax=5.0 / +&kpt + div1=17 div2=17 div3=17 tkb=0.0005 / +""" + # Checks on the files written to the sandbox folder as raw input + assert sorted(fixture_sandbox.get_content_list()) == sorted(['aiida.in']) + assert input_written == aiida_in_text + # file_regression.check(input_written, encoding='utf-8', extension='.in') + + +@pytest.mark.skip(reason='mock code buggy, todo has to be checked') +def test_FleurinpgenJobCalc_full_mock(aiida_profile, mock_code_factory, generate_structure_W): # pylint: disable=redefined-outer-name + """ + Tests the fleur inputgenerate with a mock executable if the datafiles are their, + otherwise runs inpgen itself if a executable was specified + + """ + CALC_ENTRY_POINT = 'fleur.inpgen' + + parameters = { + 'atom': { + 'element': 'W', + 'rmt': 2.1, + 'jri': 981, + 'lmax': 12, + 'lnonsph': 6, + 'econfig': '[Kr] 4d10 4f14 | 5s2 5p6 6s2 5d4', + 'lo': '5s 5p' + }, + 'comp': { + 'kmax': 5.0, + 'gmaxxc': 12.5, + 'gmax': 15.0 + }, + 'kpt': { + 'div1': 3, + 'div2': 3, + 'div3': 3, + 'tkb': 0.0005 + } + } + + mock_code = mock_code_factory(label='inpgen', + data_dir_abspath=os.path.join(os.path.dirname(os.path.abspath(__file__)), + 'data_dir/'), + entry_point=CALC_ENTRY_POINT, + ignore_files=['_aiidasubmit.sh']) + print(mock_code) + inputs = { + 'structure': generate_structure_W(), + 'parameters': orm.Dict(dict=parameters), + 'metadata': { + 'options': { + 'resources': { + 'num_machines': 1, + 'tot_num_mpiprocs': 1 + }, + 'max_wallclock_seconds': int(100), + 'withmpi': False + } + } + } + calc = CalculationFactory(CALC_ENTRY_POINT) # (code=mock_code, **inputs) + print(calc) + res, node = run_get_node(CalculationFactory(CALC_ENTRY_POINT), code=mock_code, **inputs) + + print((res['remote_folder'].list_objects())) + print((res['retrieved'].list_objects())) + assert node.is_finished_ok diff --git a/aiida_fleur/tests/cmdline/__init__.py b/aiida_fleur/tests/cmdline/__init__.py index 1ad75df2b..713971d59 100644 --- a/aiida_fleur/tests/cmdline/__init__.py +++ b/aiida_fleur/tests/cmdline/__init__.py @@ -3,9 +3,8 @@ AiiDA-FLEUR ''' -__copyright__ = u"Copyright (c), 2015-2017, Forschungszentrum Juelich GmbH, Germany. All rights reserved." -__license__ = "MIT license, see LICENSE.txt file." -__contributors__ = "Jens Broeder" -__paper__ = "" -__paper_short__ = "" - +__copyright__ = u'Copyright (c), 2015-2017, Forschungszentrum Juelich GmbH, Germany. All rights reserved.' +__license__ = 'MIT license, see LICENSE.txt file.' +__contributors__ = 'Jens Broeder' +__paper__ = '' +__paper_short__ = '' diff --git a/aiida_fleur/tests/conftest.py b/aiida_fleur/tests/conftest.py index 0011accde..e3fdf178a 100644 --- a/aiida_fleur/tests/conftest.py +++ b/aiida_fleur/tests/conftest.py @@ -10,7 +10,8 @@ import pytest import six -pytest_plugins = ['aiida.manage.tests.pytest_fixtures'] # pylint: disable=invalid-name +# aiida_testing.mock_codes in development, not yet a stable dependency.. +pytest_plugins = ['aiida.manage.tests.pytest_fixtures', 'aiida_testing.mock_code', 'aiida_testing.export_cache'] # pylint: disable=invalid-name @pytest.fixture(scope='function') @@ -117,10 +118,8 @@ def _generate_calc_job_node(entry_point_name, computer, test_name=None, inputs=N if test_name is not None: basepath = os.path.dirname(os.path.abspath(__file__)) - filepath = os.path.join( - basepath, 'parsers', 'fixtures', entry_point_name[len( - 'quantumespresso.'):], test_name - ) + filepath = os.path.join(basepath, 'parsers', 'fixtures', entry_point_name[len('quantumespresso.'):], + test_name) retrieved = orm.FolderData() retrieved.put_object_from_tree(filepath) @@ -136,25 +135,6 @@ def _generate_calc_job_node(entry_point_name, computer, test_name=None, inputs=N return _generate_calc_job_node -@pytest.fixture(scope='session') -def generate_upf_data(): - """Return a `UpfData` instance for the given element a file for which should exist in `tests/fixtures/pseudos`.""" - - def _generate_upf_data(element): - """Return `UpfData` node.""" - from aiida.orm import UpfData - - filename = os.path.join('tests', 'fixtures', 'pseudos', '{}.upf'.format(element)) - filepath = os.path.abspath(filename) - - with io.open(filepath, 'r') as handle: - upf = UpfData(file=handle.name) - - return upf - - return _generate_upf_data - - @pytest.fixture def generate_structure(): """Return a `StructureData` representing bulk silicon.""" @@ -164,11 +144,10 @@ def _generate_structure(): from aiida.orm import StructureData param = 5.43 - cell = [[param / 2., param / 2., 0], [param / 2., 0, param / 2.], [0, param / 2., param / 2.]] + cell = [[0, param / 2., param / 2.], [param / 2., 0, param / 2.], [param / 2., param / 2., 0]] structure = StructureData(cell=cell) structure.append_atom(position=(0., 0., 0.), symbols='Si', name='Si') - structure.append_atom(position=(param / 4., param / 4., param / 4.), - symbols='Si', name='Si') + structure.append_atom(position=(param / 4., param / 4., param / 4.), symbols='Si', name='Si') return structure @@ -232,7 +211,10 @@ def _generate_remote_data(computer, remote_path, entry_point_name=None): return _generate_remote_data + ############### Here AiiDA-Fleur fixtures begin ################## + + @pytest.fixture def create_fleurinp(): """Returns fleurinp constuctor""" @@ -249,11 +231,13 @@ def _make_fleurinp(inpxmlfilepath): @pytest.fixture def inpxml_etree(): """Returns the etree generator""" + def _get_etree(path): from lxml import etree with open(path, 'r') as inpxmlfile: tree = etree.parse(inpxmlfile) return tree + return _get_etree @@ -297,14 +281,10 @@ def _generate_work_chain_node(entry_point_name, computer, test_name=None, inputs input_node.store() node.add_incoming(input_node, link_type=LinkType.INPUT_WORK, link_label=link_label) - node.store() - if test_name is not None: basepath = os.path.dirname(os.path.abspath(__file__)) - filepath = os.path.join( - basepath, 'parsers', 'fixtures', entry_point_name[len( - 'quantumespresso.'):], test_name - ) + filepath = os.path.join(basepath, 'parsers', 'fixtures', entry_point_name[len('quantumespresso.'):], + test_name) retrieved = orm.FolderData() retrieved.put_object_from_tree(filepath) @@ -330,13 +310,11 @@ def _generate_film_structure(): bohr_a_0 = 0.52917721092 # A a = 7.497 * bohr_a_0 - cell = [[0.7071068*a, 0.0, 0.0], - [0.0, 1.0*a, 0.0], - [0.0, 0.0, 0.7071068*a]] + cell = [[0.7071068 * a, 0.0, 0.0], [0.0, 1.0 * a, 0.0], [0.0, 0.0, 0.7071068 * a]] structure = StructureData(cell=cell) - structure.append_atom(position=(0., 0., -1.99285*bohr_a_0), symbols='Fe') - structure.append_atom(position=(0.5*0.7071068*a, 0.5*a, 0.0), symbols='Pt') - structure.append_atom(position=(0., 0., 2.65059*bohr_a_0), symbols='Pt') + structure.append_atom(position=(0., 0., -1.99285 * bohr_a_0), symbols='Fe') + structure.append_atom(position=(0.5 * 0.7071068 * a, 0.5 * a, 0.0), symbols='Pt') + structure.append_atom(position=(0., 0., 2.65059 * bohr_a_0), symbols='Pt') structure.pbc = (True, True, False) return structure @@ -345,7 +323,180 @@ def _generate_film_structure(): @pytest.fixture(scope='function', autouse=True) -def clear_database_aiida_fleur(aiida_profile): # pylint: disable=redefined-outer-name +def clear_database_aiida_fleur(clear_database): # pylint: disable=redefined-outer-name """Clear the database before each test. """ - aiida_profile.reset_db() + #aiida_profile.reset_db() + #yield + #aiida_profile.reset_db() + + +@pytest.fixture +def read_dict_from_file(): + """returns a dict read from a json file to construct and Outputnode of a JobCalc or Workchain""" + + def _read_dict_from_file(jsonfilepath): + """Return dict from json""" + import json + + node_dict = {} + with open(jsonfilepath, 'r') as jfile: + node_dict = json.load(jfile) + + return node_dict + + return _read_dict_from_file + + +@pytest.fixture +def generate_structure2(): + """Return a `StructureData` representing bulk silicon.""" + + def _generate_structure2(): + """Return a `StructureData` representing bulk silicon.""" + from aiida.orm import StructureData + + def rel_to_abs(vector, cell): + """ + converts interal coordinates to absolut coordinates in Angstroem. + """ + if len(vector) == 3: + postionR = vector + row1 = cell[0] + row2 = cell[1] + row3 = cell[2] + new_abs_pos = [ + postionR[0] * row1[0] + postionR[1] * row2[0] + postionR[2] * row3[0], + postionR[0] * row1[1] + postionR[1] * row2[1] + postionR[2] * row3[1], + postionR[0] * row1[2] + postionR[1] * row2[2] + postionR[2] * row3[2] + ] + return new_abs_pos + + bohr_a_0 = 0.52917721092 # A + a = 5.167355275190 * bohr_a_0 + cell = [[0.0, a, a], [a, 0.0, a], [a, a, 0.0]] + structure = StructureData(cell=cell) + pos1 = rel_to_abs((1. / 8., 1. / 8., 1. / 8.), cell) + pos2 = rel_to_abs((-1. / 8., -1. / 8., -1. / 8.), cell) + structure.append_atom(position=pos1, symbols='Si') + structure.append_atom(position=pos2, symbols='Si') + + return structure + + return _generate_structure2 + + +@pytest.fixture +def generate_structure_W(): + """Return a `StructureData` representing bulk tungsten.""" + + def _generate_structure_W(): + """Return a `StructureData` representing bulk tungsten.""" + from aiida.orm import StructureData + + # W bcc structure + bohr_a_0 = 0.52917721092 # A + a = 3.013812049196 * bohr_a_0 + cell = [[-a, a, a], [a, -a, a], [a, a, -a]] + structure = StructureData(cell=cell) + structure.append_atom(position=(0., 0., 0.), symbols='W', name='W') + + #param = 3.18968 # 1.58950065353588 * 0.5291772109 + #cell = [[-param, param, param], [param, -param, param], [param, param, -param]] + #structure = StructureData(cell=cell) + #structure.append_atom(position=(0., 0., 0.), symbols='W', name='W') + + return structure + + return _generate_structure_W + + +@pytest.fixture +def generate_structure_cif(): + """Return a `StructureData` from a cif file path.""" + + def _generate_structure_cif(cif_filepath): + """Return a `StructureData` from a cif file.""" + from aiida.orm import CifData + + structure = CifData.get_or_create(cif_filepath)[0].get_structure() + return structure + + return _generate_structure_cif + + +@pytest.fixture(scope='function') +def create_or_fake_local_code(aiida_local_code_factory): + + def _get_code(executable, exec_relpath, entrypoint): + import pathlib + from aiida.tools.importexport import import_data, export + from aiida.orm import ProcessNode, QueryBuilder, Code, load_node + + _exe_path = os.path.abspath(exec_relpath) + + # if path is non existent, we create a dummy executable + # if all caches are there, it should run, like on a CI server + if not os.path.exists(_exe_path): + open(_exe_path, 'a').close() + + # make sure code is found in PATH + os.environ['PATH'] += ':' + _exe_path + + # get code using aiida_local_code_factory fixture + code = aiida_local_code_factory(entrypoint, executable) + + return code + + return _get_code + + +@pytest.fixture(scope='function') +def inpgen_local_code(create_or_fake_local_code): + """ + Create, inpgen code + """ + executable = 'inpgen' # name of the inpgen executable + exec_rel_path = 'local_exe/' # location where it is found + entrypoint = 'fleur.inpgen' # entrypoint + # prepend text to be added before execution + inpgen_code = create_or_fake_local_code(executable, exec_rel_path, entrypoint) + return inpgen_code + + +@pytest.fixture(scope='function') +def fleur_local_code(create_or_fake_local_code): + """ + Create or load Fleur code + """ + executable = 'fleur' # name of the KKRhost executable + exec_rel_path = 'local_exe/' # location where it is found + entrypoint = 'fleur.fleur' # entrypoint + fleur_code = create_or_fake_local_code(executable, exec_rel_path, entrypoint) + + return fleur_code + + +@pytest.fixture(scope='function') +def clear_spec(): + """Ficture to delete the spec of workchains""" + from aiida_fleur.workflows.scf import FleurScfWorkChain + from aiida_fleur.workflows.base_fleur import FleurBaseWorkChain + from aiida_fleur.workflows.eos import FleurEosWorkChain + + def clear_sp(): + # I do not fully comprehend why do we require this for a clean environment + if hasattr(FleurScfWorkChain, '_spec'): + # we require this as long we have mutable types as defaults, see aiidateam/aiida-core#3143 + # otherwise we will run into DbNode matching query does not exist + del FleurScfWorkChain._spec + if hasattr(FleurBaseWorkChain, '_spec'): + # we require this as long we have mutable types as defaults, see aiidateam/aiida-core#3143 + # otherwise we will run into DbNode matching query does not exist + del FleurBaseWorkChain._spec + if hasattr(FleurEosWorkChain, '_spec'): + del FleurEosWorkChain._spec + + clear_sp() + yield # test runs + clear_sp() diff --git a/aiida_fleur/tests/data/__init__.py b/aiida_fleur/tests/data/__init__.py index 1ad75df2b..713971d59 100644 --- a/aiida_fleur/tests/data/__init__.py +++ b/aiida_fleur/tests/data/__init__.py @@ -3,9 +3,8 @@ AiiDA-FLEUR ''' -__copyright__ = u"Copyright (c), 2015-2017, Forschungszentrum Juelich GmbH, Germany. All rights reserved." -__license__ = "MIT license, see LICENSE.txt file." -__contributors__ = "Jens Broeder" -__paper__ = "" -__paper_short__ = "" - +__copyright__ = u'Copyright (c), 2015-2017, Forschungszentrum Juelich GmbH, Germany. All rights reserved.' +__license__ = 'MIT license, see LICENSE.txt file.' +__contributors__ = 'Jens Broeder' +__paper__ = '' +__paper_short__ = '' diff --git a/aiida_fleur/tests/data/test_fleurinp.py b/aiida_fleur/tests/data/test_fleurinp.py index 5b401b80f..d7b6b9f1b 100644 --- a/aiida_fleur/tests/data/test_fleurinp.py +++ b/aiida_fleur/tests/data/test_fleurinp.py @@ -9,7 +9,9 @@ # For further information please visit http://www.flapw.de or # # http://aiida-fleur.readthedocs.io/en/develop/ # ############################################################################### - +''' +Contains extensive tests for the FleurinpData structure of AiiDA-Fleur +''' from __future__ import absolute_import import os import pytest @@ -35,7 +37,7 @@ inpxmlfilelist2.append(os.path.join(subdir, file)) -@pytest.mark.parametrize("inpxmlfilepath", inpxmlfilelist) +@pytest.mark.parametrize('inpxmlfilepath', inpxmlfilelist) def test_fleurinp_valid_inpxml(create_fleurinp, inpxmlfilepath): """ test if valid inp.xml files are recognized by fleur @@ -48,7 +50,7 @@ def test_fleurinp_valid_inpxml(create_fleurinp, inpxmlfilepath): assert fleurinp_tmp._validate() is None # if fails, _validate throws an error -@pytest.mark.parametrize("inpxmlfilepath", inpxmlfilelist2) +@pytest.mark.parametrize('inpxmlfilepath', inpxmlfilelist2) def test_fleurinp_non_valid_inpxml(create_fleurinp, inpxmlfilepath): """ Test what happens if inp.xml file is not valid @@ -64,7 +66,8 @@ def test_fleurinp_non_valid_inpxml(create_fleurinp, inpxmlfilepath): # test kpoints and structure and parameter data extraction -@pytest.mark.parametrize("inpxmlfilepath", inpxmlfilelist) + +@pytest.mark.parametrize('inpxmlfilepath', inpxmlfilelist) def test_fleurinp_kpointsdata_extraction(create_fleurinp, inpxmlfilepath): """ Extract a kpointsData from the fleurinp data, i.e inp.xml and check if @@ -83,7 +86,7 @@ def test_fleurinp_kpointsdata_extraction(create_fleurinp, inpxmlfilepath): # or without a kpoint list. Therefore this test might let two much through -@pytest.mark.parametrize("inpxmlfilepath", inpxmlfilelist) +@pytest.mark.parametrize('inpxmlfilepath', inpxmlfilelist) def test_fleurinp_parameterdata_extraction(create_fleurinp, inpxmlfilepath): """ Extract a ParameterData from the fleurinp data, i.e inp.xml and check if @@ -99,7 +102,7 @@ def test_fleurinp_parameterdata_extraction(create_fleurinp, inpxmlfilepath): # ToDo check if it is also right for inpgen... -@pytest.mark.parametrize("inpxmlfilepath", inpxmlfilelist) +@pytest.mark.parametrize('inpxmlfilepath', inpxmlfilelist) def test_fleurinp_structuredata_extraction(create_fleurinp, inpxmlfilepath): """ Extract a ParameterData from the fleurinp data, i.e inp.xml and check if @@ -121,7 +124,7 @@ def test_fleurinp_structuredata_extraction(create_fleurinp, inpxmlfilepath): # Input Modification tests -@pytest.mark.parametrize("inpxmlfilepath", inpxmlfilelist) +@pytest.mark.parametrize('inpxmlfilepath', inpxmlfilelist) def test_fleurinp_single_value_modification(create_fleurinp, inpxmlfilepath): """ set kmax, itmax, minDistance in inp.xml input file of fleurinpdata to @@ -141,9 +144,9 @@ def test_fleurinp_single_value_modification(create_fleurinp, inpxmlfilepath): # TODO check if set right -@pytest.mark.parametrize("inpxmlfilepath", inpxmlfilelist) +@pytest.mark.parametrize('inpxmlfilepath', inpxmlfilelist) def test_fleurinp_first_species_modification(create_fleurinp, inpxmlfilepath): """ Decrease the rmt of the first species by 10%, check if rmt was set """ - pass + return diff --git a/aiida_fleur/tests/data/test_fleurinpmodifier.py b/aiida_fleur/tests/data/test_fleurinpmodifier.py index 637df6552..17ae4056e 100644 --- a/aiida_fleur/tests/data/test_fleurinpmodifier.py +++ b/aiida_fleur/tests/data/test_fleurinpmodifier.py @@ -9,6 +9,7 @@ # For further information please visit http://www.flapw.de or # # http://aiida-fleur.readthedocs.io/en/develop/ # ############################################################################### +''' Contains tests for modifing FleurinpData with Fleurinpmodifier ''' from __future__ import absolute_import import os @@ -32,9 +33,12 @@ def test_fleurinp_modifier1(create_fleurinp): fm.set_species('all', {'mtSphere': {'radius': 3.333}}) fm.undo() changes = fm.changes() - assert changes == [ - ('set_inpchanges', {'Kmax': 3.9, 'dos': True}), ('shift_value', {'Kmax': 0.1}, 'rel'), - ('shift_value_species_label', ' 222', 'radius', 3, 'abs')] + assert changes == [('set_inpchanges', { + 'Kmax': 3.9, + 'dos': True + }), ('shift_value', { + 'Kmax': 0.1 + }, 'rel'), ('shift_value_species_label', ' 222', 'radius', 3, 'abs')] fm.show(validate=True) fm.freeze() @@ -59,8 +63,7 @@ def test_fleurinp_modifier2(create_fleurinp, inpxml_etree): fm.xml_set_all_attribv('/fleurInput/calculationSetup/soc', 'theta', 12) fm.xml_set_first_attribv('/fleurInput/calculationSetup/soc', 'theta', 12) fm.xml_set_attribv_occ('/fleurInput/calculationSetup/soc', 'theta', 12) - fm.set_species_label(" 222", {'mtSphere': {'radius': 3.333}}) - fm.set_atomgr_att_label( - attributedict={'force': [('relaxXYZ', 'FFF')]}, atom_label=" 222") - fm.set_atomgr_att(attributedict={'force': [('relaxXYZ', 'TFF')]}, species="Fe-1") + fm.set_species_label(' 222', {'mtSphere': {'radius': 3.333}}) + fm.set_atomgr_att_label(attributedict={'force': [('relaxXYZ', 'FFF')]}, atom_label=' 222') + fm.set_atomgr_att(attributedict={'force': [('relaxXYZ', 'TFF')]}, species='Fe-1') fm.show() diff --git a/aiida_fleur/tests/data_dir/FleurCreateMagneticWorkChain-nodes-26395875a3ba14da35b15925b027c489.tar.gz b/aiida_fleur/tests/data_dir/FleurCreateMagneticWorkChain-nodes-26395875a3ba14da35b15925b027c489.tar.gz new file mode 100644 index 000000000..abd00bf3c Binary files /dev/null and b/aiida_fleur/tests/data_dir/FleurCreateMagneticWorkChain-nodes-26395875a3ba14da35b15925b027c489.tar.gz differ diff --git a/aiida_fleur/tests/data_dir/FleurEosWorkChain-nodes-2024b779d0c928e74fe0bb5c4d9f4146.tar.gz b/aiida_fleur/tests/data_dir/FleurEosWorkChain-nodes-2024b779d0c928e74fe0bb5c4d9f4146.tar.gz new file mode 100644 index 000000000..d8914abc2 Binary files /dev/null and b/aiida_fleur/tests/data_dir/FleurEosWorkChain-nodes-2024b779d0c928e74fe0bb5c4d9f4146.tar.gz differ diff --git a/aiida_fleur/tests/data_dir/FleurMaeWorkChain-nodes-5f4339cda378d7de863accdb83ba5f37.tar.gz b/aiida_fleur/tests/data_dir/FleurMaeWorkChain-nodes-5f4339cda378d7de863accdb83ba5f37.tar.gz new file mode 100644 index 000000000..51fdd9b00 Binary files /dev/null and b/aiida_fleur/tests/data_dir/FleurMaeWorkChain-nodes-5f4339cda378d7de863accdb83ba5f37.tar.gz differ diff --git a/aiida_fleur/tests/data_dir/FleurMaeWorkChain-nodes-88af204c18c1e2bd868f3f29a83a1439.tar.gz b/aiida_fleur/tests/data_dir/FleurMaeWorkChain-nodes-88af204c18c1e2bd868f3f29a83a1439.tar.gz new file mode 100644 index 000000000..79dfb2b55 Binary files /dev/null and b/aiida_fleur/tests/data_dir/FleurMaeWorkChain-nodes-88af204c18c1e2bd868f3f29a83a1439.tar.gz differ diff --git a/aiida_fleur/tests/data_dir/FleurScfWorkChain-nodes-1e55cc193b442149b9c741a55ea33831.tar.gz b/aiida_fleur/tests/data_dir/FleurScfWorkChain-nodes-1e55cc193b442149b9c741a55ea33831.tar.gz new file mode 100644 index 000000000..084a4e5c4 Binary files /dev/null and b/aiida_fleur/tests/data_dir/FleurScfWorkChain-nodes-1e55cc193b442149b9c741a55ea33831.tar.gz differ diff --git a/aiida_fleur/tests/data_dir/FleurScfWorkChain-nodes-566d51d48486b7ba0206f56185018a49.tar.gz b/aiida_fleur/tests/data_dir/FleurScfWorkChain-nodes-566d51d48486b7ba0206f56185018a49.tar.gz new file mode 100644 index 000000000..5cdb3b350 Binary files /dev/null and b/aiida_fleur/tests/data_dir/FleurScfWorkChain-nodes-566d51d48486b7ba0206f56185018a49.tar.gz differ diff --git a/aiida_fleur/tests/data_dir/FleurScfWorkChain-nodes-b301f089b62fe7db7319fcd6b233e588.tar.gz b/aiida_fleur/tests/data_dir/FleurScfWorkChain-nodes-b301f089b62fe7db7319fcd6b233e588.tar.gz new file mode 100644 index 000000000..0d68d9dda Binary files /dev/null and b/aiida_fleur/tests/data_dir/FleurScfWorkChain-nodes-b301f089b62fe7db7319fcd6b233e588.tar.gz differ diff --git a/aiida_fleur/tests/data_dir/FleurScfWorkChain-nodes-f49ff6420a686d1d4f66362de12eeeaf.tar.gz b/aiida_fleur/tests/data_dir/FleurScfWorkChain-nodes-f49ff6420a686d1d4f66362de12eeeaf.tar.gz new file mode 100644 index 000000000..c87848f68 Binary files /dev/null and b/aiida_fleur/tests/data_dir/FleurScfWorkChain-nodes-f49ff6420a686d1d4f66362de12eeeaf.tar.gz differ diff --git a/aiida_fleur/tests/data_dir/W_structure_para.tar.gz b/aiida_fleur/tests/data_dir/W_structure_para.tar.gz new file mode 100644 index 000000000..923461430 Binary files /dev/null and b/aiida_fleur/tests/data_dir/W_structure_para.tar.gz differ diff --git a/aiida_fleur/tests/data_dir/fleur_initial_cls_wc-nodes-156aa1a388baf0846a2e65a5b50679a9.tar.gz b/aiida_fleur/tests/data_dir/fleur_initial_cls_wc-nodes-156aa1a388baf0846a2e65a5b50679a9.tar.gz new file mode 100644 index 000000000..5f56f4967 Binary files /dev/null and b/aiida_fleur/tests/data_dir/fleur_initial_cls_wc-nodes-156aa1a388baf0846a2e65a5b50679a9.tar.gz differ diff --git a/aiida_fleur/tests/files/cif/AlB.cif b/aiida_fleur/tests/files/cif/AlB.cif index b5715e7a6..790cfa9e9 100644 --- a/aiida_fleur/tests/files/cif/AlB.cif +++ b/aiida_fleur/tests/files/cif/AlB.cif @@ -83,4 +83,4 @@ _atom_site_occupancy _atom_site_attached_hydrogens Al1 Al0+ 1 a 0 0 0 . 1. 0 B1 B0+ 2 d 0.3333 0.6667 0.5 . 1. 0 -#End of TTdata_606058-ICSD \ No newline at end of file +#End of TTdata_606058-ICSD diff --git a/aiida_fleur/tests/files/cif/W43421.cif b/aiida_fleur/tests/files/cif/W43421.cif new file mode 100644 index 000000000..11b6f4ea5 --- /dev/null +++ b/aiida_fleur/tests/files/cif/W43421.cif @@ -0,0 +1,151 @@ + +#(C) 2019 by FIZ Karlsruhe - Leibniz Institute for Information Infrastructure. All rights reserved. +data_43421-ICSD +_database_code_ICSD 43421 +_audit_creation_date 2000-07-15 +_audit_update_record 2006-04-01 +_chemical_name_systematic 'Tungsten - HT' +_chemical_formula_structural W +_chemical_formula_sum W1 +_chemical_name_structure_type bcc-W +_exptl_crystal_density_diffrn 19.26 +_publ_section_title 'X-ray determination of the thermal expansion of tungsten' +loop_ +_citation_id +_citation_journal_full +_citation_year +_citation_journal_volume +_citation_page_first +_citation_page_last +_citation_journal_id_ASTM +primary 'Current Science' 1962 31 497 499 CUSCAM +loop_ +_publ_author_name +'Deshpande, V.T.' +'Pawar, R.' +_cell_length_a 3.16475(20) +_cell_length_b 3.16475 +_cell_length_c 3.16475 +_cell_angle_alpha 90. +_cell_angle_beta 90. +_cell_angle_gamma 90. +_cell_volume 31.7 +_cell_formula_units_Z 2 +_symmetry_space_group_name_H-M 'I m -3 m' +_symmetry_Int_Tables_number 229 +loop_ +_symmetry_equiv_pos_site_id +_symmetry_equiv_pos_as_xyz +1 'z, y, -x' +2 'y, x, -z' +3 'x, z, -y' +4 'z, x, -y' +5 'y, z, -x' +6 'x, y, -z' +7 'z, -y, x' +8 'y, -x, z' +9 'x, -z, y' +10 'z, -x, y' +11 'y, -z, x' +12 'x, -y, z' +13 '-z, y, x' +14 '-y, x, z' +15 '-x, z, y' +16 '-z, x, y' +17 '-y, z, x' +18 '-x, y, z' +19 '-z, -y, -x' +20 '-y, -x, -z' +21 '-x, -z, -y' +22 '-z, -x, -y' +23 '-y, -z, -x' +24 '-x, -y, -z' +25 '-z, -y, x' +26 '-y, -x, z' +27 '-x, -z, y' +28 '-z, -x, y' +29 '-y, -z, x' +30 '-x, -y, z' +31 '-z, y, -x' +32 '-y, x, -z' +33 '-x, z, -y' +34 '-z, x, -y' +35 '-y, z, -x' +36 '-x, y, -z' +37 'z, -y, -x' +38 'y, -x, -z' +39 'x, -z, -y' +40 'z, -x, -y' +41 'y, -z, -x' +42 'x, -y, -z' +43 'z, y, x' +44 'y, x, z' +45 'x, z, y' +46 'z, x, y' +47 'y, z, x' +48 'x, y, z' +49 'z+1/2, y+1/2, -x+1/2' +50 'y+1/2, x+1/2, -z+1/2' +51 'x+1/2, z+1/2, -y+1/2' +52 'z+1/2, x+1/2, -y+1/2' +53 'y+1/2, z+1/2, -x+1/2' +54 'x+1/2, y+1/2, -z+1/2' +55 'z+1/2, -y+1/2, x+1/2' +56 'y+1/2, -x+1/2, z+1/2' +57 'x+1/2, -z+1/2, y+1/2' +58 'z+1/2, -x+1/2, y+1/2' +59 'y+1/2, -z+1/2, x+1/2' +60 'x+1/2, -y+1/2, z+1/2' +61 '-z+1/2, y+1/2, x+1/2' +62 '-y+1/2, x+1/2, z+1/2' +63 '-x+1/2, z+1/2, y+1/2' +64 '-z+1/2, x+1/2, y+1/2' +65 '-y+1/2, z+1/2, x+1/2' +66 '-x+1/2, y+1/2, z+1/2' +67 '-z+1/2, -y+1/2, -x+1/2' +68 '-y+1/2, -x+1/2, -z+1/2' +69 '-x+1/2, -z+1/2, -y+1/2' +70 '-z+1/2, -x+1/2, -y+1/2' +71 '-y+1/2, -z+1/2, -x+1/2' +72 '-x+1/2, -y+1/2, -z+1/2' +73 '-z+1/2, -y+1/2, x+1/2' +74 '-y+1/2, -x+1/2, z+1/2' +75 '-x+1/2, -z+1/2, y+1/2' +76 '-z+1/2, -x+1/2, y+1/2' +77 '-y+1/2, -z+1/2, x+1/2' +78 '-x+1/2, -y+1/2, z+1/2' +79 '-z+1/2, y+1/2, -x+1/2' +80 '-y+1/2, x+1/2, -z+1/2' +81 '-x+1/2, z+1/2, -y+1/2' +82 '-z+1/2, x+1/2, -y+1/2' +83 '-y+1/2, z+1/2, -x+1/2' +84 '-x+1/2, y+1/2, -z+1/2' +85 'z+1/2, -y+1/2, -x+1/2' +86 'y+1/2, -x+1/2, -z+1/2' +87 'x+1/2, -z+1/2, -y+1/2' +88 'z+1/2, -x+1/2, -y+1/2' +89 'y+1/2, -z+1/2, -x+1/2' +90 'x+1/2, -y+1/2, -z+1/2' +91 'z+1/2, y+1/2, x+1/2' +92 'y+1/2, x+1/2, z+1/2' +93 'x+1/2, z+1/2, y+1/2' +94 'z+1/2, x+1/2, y+1/2' +95 'y+1/2, z+1/2, x+1/2' +96 'x+1/2, y+1/2, z+1/2' +loop_ +_atom_type_symbol +_atom_type_oxidation_number +W0+ 0 +loop_ +_atom_site_label +_atom_site_type_symbol +_atom_site_symmetry_multiplicity +_atom_site_Wyckoff_symbol +_atom_site_fract_x +_atom_site_fract_y +_atom_site_fract_z +_atom_site_B_iso_or_equiv +_atom_site_occupancy +_atom_site_attached_hydrogens +W1 W0+ 2 a 0 0 0 . 1. 0 +#End of TTdata_43421-ICSD diff --git a/aiida_fleur/tests/files/inpxml/FePt/inp.xml b/aiida_fleur/tests/files/inpxml/FePt/inp.xml index 5e1bd257a..8780fb5c9 100644 --- a/aiida_fleur/tests/files/inpxml/FePt/inp.xml +++ b/aiida_fleur/tests/files/inpxml/FePt/inp.xml @@ -63,7 +63,7 @@ - + diff --git a/aiida_fleur/tests/files/inpxml/NiO_ldauXML/files/NiO b/aiida_fleur/tests/files/inpxml/NiO_ldauXML/files/NiO index f4bfeba41..36d0e0995 100644 --- a/aiida_fleur/tests/files/inpxml/NiO_ldauXML/files/NiO +++ b/aiida_fleur/tests/files/inpxml/NiO_ldauXML/files/NiO @@ -10,4 +10,3 @@ NiO bct uc (AFM1) 8 0.5 0.5 0.0 28 0.5 0.5 0.5 8 0.0 0.0 0.5 - diff --git a/aiida_fleur/tests/files/inpxml/Si/inp.xml b/aiida_fleur/tests/files/inpxml/Si/inp.xml new file mode 100644 index 000000000..4d34c362a --- /dev/null +++ b/aiida_fleur/tests/files/inpxml/Si/inp.xml @@ -0,0 +1,368 @@ + + + + Si, alpha silicon, bulk, delta project + + + + + + + + + + .0000000000 .0000000000 .0000000000 + + + + + + + 0.437500 0.437500 0.437500 + 0.312500 0.437500 0.437500 + 0.187500 0.437500 0.437500 + 0.062500 0.437500 0.437500 + 0.062500 0.500000 0.500000 + 0.187500 0.562500 0.562500 + 0.312500 0.562500 0.562500 + 0.437500 0.437500 0.562500 + 0.312500 0.312500 0.437500 + 0.187500 0.312500 0.437500 + 0.125000 0.375000 0.437500 + 0.125000 0.437500 0.500000 + 0.187500 0.500000 0.625000 + 0.312500 0.437500 0.687500 + 0.312500 0.437500 0.562500 + 0.250000 0.250000 0.437500 + 0.250000 0.375000 0.437500 + 0.250000 0.437500 0.500000 + 0.250000 0.437500 0.625000 + 0.250000 0.500000 0.687500 + 0.187500 0.437500 0.562500 + 0.375000 0.375000 0.437500 + 0.375000 0.437500 0.500000 + 0.375000 0.437500 0.625000 + 0.250000 0.562500 0.625000 + 0.125000 0.500000 0.562500 + 0.437500 0.500000 0.500000 + 0.375000 0.500000 0.562500 + 0.250000 0.500000 0.562500 + 0.375000 0.375000 0.562500 + 0.250000 0.375000 0.562500 + 0.312500 0.312500 0.562500 + 0.312500 0.312500 0.312500 + 0.187500 0.312500 0.312500 + 0.062500 0.312500 0.312500 + 0.062500 0.375000 0.375000 + 0.187500 0.500000 0.500000 + 0.375000 0.375000 0.687500 + 0.187500 0.187500 0.312500 + 0.125000 0.250000 0.312500 + 0.125000 0.312500 0.375000 + 0.187500 0.375000 0.500000 + 0.312500 0.500000 0.625000 + 0.250000 0.250000 0.312500 + 0.250000 0.312500 0.375000 + 0.250000 0.312500 0.500000 + 0.312500 0.375000 0.625000 + 0.312500 0.375000 0.375000 + 0.312500 0.375000 0.500000 + 0.312500 0.500000 0.500000 + 0.187500 0.187500 0.187500 + 0.062500 0.187500 0.187500 + 0.062500 0.250000 0.250000 + 0.187500 0.375000 0.375000 + 0.125000 0.125000 0.187500 + 0.125000 0.187500 0.250000 + 0.187500 0.250000 0.375000 + 0.187500 0.250000 0.250000 + 0.062500 0.062500 0.062500 + 0.062500 0.125000 0.125000 + + + + + + + + + + + 1 0 0 .0000000000 + 0 1 0 .0000000000 + 0 0 1 .0000000000 + + + 0 1 0 .0000000000 + 1 0 0 .0000000000 + 0 0 1 .0000000000 + + + -1 0 0 .0000000000 + 0 -1 0 .0000000000 + 1 1 1 .5000000000 + + + 0 -1 0 .0000000000 + -1 0 0 .0000000000 + 1 1 1 .5000000000 + + + 0 1 0 .0000000000 + 1 0 0 .0000000000 + -1 -1 -1 .5000000000 + + + 1 0 0 .0000000000 + 0 1 0 .0000000000 + -1 -1 -1 .5000000000 + + + -1 0 0 .0000000000 + 0 -1 0 .0000000000 + 0 0 -1 .0000000000 + + + 0 -1 0 .0000000000 + -1 0 0 .0000000000 + 0 0 -1 .0000000000 + + + 0 0 1 .0000000000 + 1 0 0 .0000000000 + -1 -1 -1 .5000000000 + + + 0 0 1 .0000000000 + 0 1 0 .0000000000 + -1 -1 -1 .5000000000 + + + 1 1 1 .5000000000 + 0 -1 0 .0000000000 + 0 0 -1 .0000000000 + + + 1 1 1 .5000000000 + -1 0 0 .0000000000 + 0 0 -1 .0000000000 + + + -1 0 0 .0000000000 + 1 1 1 .5000000000 + 0 0 -1 .0000000000 + + + 1 0 0 .0000000000 + 0 0 1 .0000000000 + -1 -1 -1 .5000000000 + + + 0 1 0 .0000000000 + 0 0 1 .0000000000 + -1 -1 -1 .5000000000 + + + 0 -1 0 .0000000000 + 1 1 1 .5000000000 + 0 0 -1 .0000000000 + + + -1 0 0 .0000000000 + 0 0 -1 .0000000000 + 0 -1 0 .0000000000 + + + 0 1 0 .0000000000 + -1 -1 -1 .5000000000 + 1 0 0 .0000000000 + + + 0 -1 0 .0000000000 + 0 0 -1 .0000000000 + -1 0 0 .0000000000 + + + 1 0 0 .0000000000 + -1 -1 -1 .5000000000 + 0 1 0 .0000000000 + + + 1 1 1 .5000000000 + 0 0 -1 .0000000000 + 0 -1 0 .0000000000 + + + 0 0 1 .0000000000 + -1 -1 -1 .5000000000 + 1 0 0 .0000000000 + + + 1 1 1 .5000000000 + 0 0 -1 .0000000000 + -1 0 0 .0000000000 + + + 0 0 1 .0000000000 + -1 -1 -1 .5000000000 + 0 1 0 .0000000000 + + + 0 0 -1 .0000000000 + -1 0 0 .0000000000 + 0 -1 0 .0000000000 + + + 0 0 -1 .0000000000 + 0 -1 0 .0000000000 + -1 0 0 .0000000000 + + + -1 -1 -1 .5000000000 + 0 1 0 .0000000000 + 1 0 0 .0000000000 + + + -1 -1 -1 .5000000000 + 1 0 0 .0000000000 + 0 1 0 .0000000000 + + + 0 0 1 .0000000000 + 0 1 0 .0000000000 + 1 0 0 .0000000000 + + + 1 1 1 .5000000000 + -1 0 0 .0000000000 + 0 -1 0 .0000000000 + + + 1 1 1 .5000000000 + 0 -1 0 .0000000000 + -1 0 0 .0000000000 + + + 0 0 1 .0000000000 + 1 0 0 .0000000000 + 0 1 0 .0000000000 + + + 0 0 -1 .0000000000 + 1 1 1 .5000000000 + -1 0 0 .0000000000 + + + 0 0 -1 .0000000000 + 1 1 1 .5000000000 + 0 -1 0 .0000000000 + + + -1 -1 -1 .5000000000 + 0 0 1 .0000000000 + 1 0 0 .0000000000 + + + -1 -1 -1 .5000000000 + 0 0 1 .0000000000 + 0 1 0 .0000000000 + + + -1 0 0 .0000000000 + 1 1 1 .5000000000 + 0 -1 0 .0000000000 + + + 0 1 0 .0000000000 + 0 0 1 .0000000000 + 1 0 0 .0000000000 + + + 0 -1 0 .0000000000 + 1 1 1 .5000000000 + -1 0 0 .0000000000 + + + 1 0 0 .0000000000 + 0 0 1 .0000000000 + 0 1 0 .0000000000 + + + 1 0 0 .0000000000 + -1 -1 -1 .5000000000 + 0 0 1 .0000000000 + + + 0 1 0 .0000000000 + -1 -1 -1 .5000000000 + 0 0 1 .0000000000 + + + 0 -1 0 .0000000000 + 0 0 -1 .0000000000 + 1 1 1 .5000000000 + + + -1 0 0 .0000000000 + 0 0 -1 .0000000000 + 1 1 1 .5000000000 + + + -1 -1 -1 .5000000000 + 1 0 0 .0000000000 + 0 0 1 .0000000000 + + + -1 -1 -1 .5000000000 + 0 1 0 .0000000000 + 0 0 1 .0000000000 + + + 0 0 -1 .0000000000 + 0 -1 0 .0000000000 + 1 1 1 .5000000000 + + + 0 0 -1 .0000000000 + -1 0 0 .0000000000 + 1 1 1 .5000000000 + + + + + .000000000000000 5.167355275200000 5.167355275200000 + 5.167355275200000 .000000000000000 5.167355275200000 + 5.167355275200000 5.167355275200000 .000000000000000 + + + + + + + + + + + + + + + 1.000/8.000 1.000/8.000 1.000/8.000 + -1.000/8.000 -1.000/8.000 -1.000/8.000 + + + + + + + + + + + + + + + + + diff --git a/aiida_fleur/tests/files/inpxml/W/files/W_delta_inp b/aiida_fleur/tests/files/inpxml/W/files/W_delta_inp index db80afa7c..6140e7bde 100644 --- a/aiida_fleur/tests/files/inpxml/W/files/W_delta_inp +++ b/aiida_fleur/tests/files/inpxml/W/files/W_delta_inp @@ -9,4 +9,4 @@ bcc tungsten &atom element="W" rmt=2.3 jri=981 lmax=12 lnonsph=6 lo="5s 5p" / &comp kmax=5.0 gmaxxc=12.5 gmax=15.0 / -&kpt div1=25 div2=25 div3=25 tkb=0.0005 / \ No newline at end of file +&kpt div1=25 div2=25 div3=25 tkb=0.0005 / diff --git a/aiida_fleur/tests/files/inpxml/W/files/inp.xml b/aiida_fleur/tests/files/inpxml/W/files/inp.xml index 0f81b36e7..94df1f3d7 100644 --- a/aiida_fleur/tests/files/inpxml/W/files/inp.xml +++ b/aiida_fleur/tests/files/inpxml/W/files/inp.xml @@ -1,5 +1,5 @@ - + A Fleur input generator calulation with aiida @@ -13,7 +13,7 @@ .0000000000 .0000000000 .0000000000 - + -9.000000 11.000000 11.000000 @@ -360,7 +360,7 @@ - + diff --git a/aiida_fleur/tests/files/jsons/fleur_output_eos_wc_para.json b/aiida_fleur/tests/files/jsons/fleur_output_eos_wc_para.json new file mode 100644 index 000000000..8adef8b70 --- /dev/null +++ b/aiida_fleur/tests/files/jsons/fleur_output_eos_wc_para.json @@ -0,0 +1 @@ +{"bulk_deriv": -612.513884563477, "bulk_modulus": 29201.4098068761, "bulk_modulus_units": "GPa", "calculations": [], "distance_charge": [4.4141e-06, 4.8132e-06, 1.02898e-05, 1.85615e-05], "distance_charge_units": "me/bohr^3", "errors": [], "guess": 1.0, "info": ["Consider refining your basis set."], "initial_structure": "d6985712-7eca-4730-991f-1d924cbd1062", "natoms": 1, "nsteps": 4, "residuals": [], "scaling": [0.998, 1.0, 1.002, 1.004], "scaling_gs": 1.00286268683922, "scf_wfs": [], "stepsize": 0.002, "structures": ["f7fddbb5-51af-4dac-a4ba-021d1bf5795b", "28e9ed28-837c-447e-aae7-371b70454dc4", "fc340850-1a54-4be4-abed-576621b3015f", "77fd128b-e88c-4d7d-9aea-d909166926cb"], "successful": true, "total_energy": [-439902.565469453, -439902.560450163, -439902.564547518, -439902.563105211], "total_energy_units": "Htr", "volume_gs": 16.2724654374658, "volume_units": "A^3", "volumes": [16.1935634057491, 16.2260154366224, 16.2584674674955, 16.290919498369], "warnings": ["Abnormality in Total energy list detected. Check entr(ies) [1]."], "workflow_name": "fleur_eos_wc", "workflow_version": "0.3.3"} diff --git a/aiida_fleur/tests/files/jsons/fleur_output_scf_wc_para.json b/aiida_fleur/tests/files/jsons/fleur_output_scf_wc_para.json new file mode 100644 index 000000000..40d688a7a --- /dev/null +++ b/aiida_fleur/tests/files/jsons/fleur_output_scf_wc_para.json @@ -0,0 +1 @@ +{"conv_mode": "density", "distance_charge": 0.1406279038, "distance_charge_all": [61.1110641131, 43.7556515683, 43.7556515683], "distance_charge_units": "me/bohr^3", "errors": [], "force_diff_last": "can not be determined", "force_largest": 0.0, "info": [], "iterations_total": 23, "last_calc_uuid": "b20b5b94-5d80-41a8-82bf-b4d8eee9bddc", "loop_count": 1, "material": "FePt2", "total_energy": -38166.176928494, "total_energy_all": [-38166.542950054, -38166.345602746, -38166.345602746], "total_energy_units": "Htr", "total_wall_time": 245, "total_wall_time_units": "s", "warnings": [], "workflow_name": "FleurScfWorkChain", "workflow_version": "0.4.0"} diff --git a/aiida_fleur/tests/files/jsons/fleur_outputpara.json b/aiida_fleur/tests/files/jsons/fleur_outputpara.json new file mode 100644 index 000000000..788d5129d --- /dev/null +++ b/aiida_fleur/tests/files/jsons/fleur_outputpara.json @@ -0,0 +1 @@ +{"CalcJob_uuid": "a6511a00-7759-484a-839d-c100dafd6118", "bandgap": 0.0029975592, "bandgap_units": "eV", "charge_den_xc_den_integral": -3105.2785777045, "charge_density1": 3.55653e-05, "charge_density2": 6.70788e-05, "creator_name": "fleur 27", "creator_target_architecture": "GEN", "creator_target_structure": " ", "density_convergence_units": "me/bohr^3", "end_date": {"date": "2019/07/17", "time": "12:50:27"}, "energy": -4405621.1469633, "energy_core_electrons": -99592.985569309, "energy_hartree": -161903.59225823, "energy_hartree_units": "Htr", "energy_units": "eV", "energy_valence_electrons": -158.7015525598, "fermi_energy": -0.2017877885, "fermi_energy_units": "Htr", "force_largest": 0.0, "magnetic_moment_units": "muBohr", "magnetic_moments": [2.7677822875, 2.47601e-05, 2.22588e-05, 6.05518e-05, 0.0001608849, 0.0001504687, 0.0001321699, -3.35528e-05, 1.87169e-05, -0.0002957294], "magnetic_spin_down_charges": [5.8532354421, 6.7738647125, 6.8081938915, 6.8073232631, 6.8162583243, 6.8156475799, 6.8188399492, 6.813423175, 6.7733972589, 6.6797683064], "magnetic_spin_up_charges": [8.6210177296, 6.7738894726, 6.8082161503, 6.8073838149, 6.8164192092, 6.8157980486, 6.8189721191, 6.8133896222, 6.7734159758, 6.679472577], "number_of_atom_types": 10, "number_of_atoms": 10, "number_of_iterations": 49, "number_of_iterations_total": 49, "number_of_kpoints": 240, "number_of_species": 1, "number_of_spin_components": 2, "number_of_symmetries": 2, "orbital_magnetic_moment_units": "muBohr", "orbital_magnetic_moments": [], "orbital_magnetic_spin_down_charges": [], "orbital_magnetic_spin_up_charges": [], "output_file_version": "0.27", "overall_charge_density": 7.25099e-05, "parser_info": "AiiDA Fleur Parser v0.2beta", "parser_warnings": [], "spin_density": 7.91911e-05, "start_date": {"date": "2019/07/17", "time": "10:38:24"}, "sum_of_eigenvalues": -99751.687121869, "title": "A Fleur input generator calculation with aiida", "unparsed": [], "walltime": 7923, "walltime_units": "seconds", "warnings": {"debug": {}, "error": {}, "info": {}, "warning": {}}} diff --git a/aiida_fleur/tests/files/outxml/BeTi_out.xml b/aiida_fleur/tests/files/outxml/BeTi_out.xml index dd76530e8..294a31519 100644 --- a/aiida_fleur/tests/files/outxml/BeTi_out.xml +++ b/aiida_fleur/tests/files/outxml/BeTi_out.xml @@ -2837,4 +2837,4 @@ - \ No newline at end of file + diff --git a/aiida_fleur/tests/files/outxml/all_test/Be27Ti9_out.xml b/aiida_fleur/tests/files/outxml/all_test/Be27Ti9_out.xml index 9e9713004..d869d4e8f 100644 --- a/aiida_fleur/tests/files/outxml/all_test/Be27Ti9_out.xml +++ b/aiida_fleur/tests/files/outxml/all_test/Be27Ti9_out.xml @@ -597,4 +597,4 @@ - \ No newline at end of file + diff --git a/aiida_fleur/tests/files/outxml/all_test/Be_out.xml b/aiida_fleur/tests/files/outxml/all_test/Be_out.xml index 43c812560..d7d334d03 100644 --- a/aiida_fleur/tests/files/outxml/all_test/Be_out.xml +++ b/aiida_fleur/tests/files/outxml/all_test/Be_out.xml @@ -1367,4 +1367,4 @@ - \ No newline at end of file + diff --git a/aiida_fleur/tests/files/outxml/all_test/FePt_out.xml b/aiida_fleur/tests/files/outxml/all_test/FePt_out.xml index 816b2ab41..191ea5af2 100644 --- a/aiida_fleur/tests/files/outxml/all_test/FePt_out.xml +++ b/aiida_fleur/tests/files/outxml/all_test/FePt_out.xml @@ -4462,4 +4462,4 @@ - \ No newline at end of file + diff --git a/aiida_fleur/tests/files/outxml/all_test/dmi_FT_out.xml b/aiida_fleur/tests/files/outxml/all_test/dmi_FT_out.xml new file mode 100644 index 000000000..b87d5acb4 --- /dev/null +++ b/aiida_fleur/tests/files/outxml/all_test/dmi_FT_out.xml @@ -0,0 +1,1185 @@ + + + + + + GEN + + + CPP_MPI CPP_HDF + + + + + + + + + + A Fleur input generator calculation with aiida + + + + + + + + + + .0000000000 .0000000000 .0000000000 + + + + + + + -0.475000 -0.479167 0.000000 + -0.425000 -0.479167 0.000000 + -0.375000 -0.479167 0.000000 + -0.325000 -0.479167 0.000000 + -0.275000 -0.479167 0.000000 + -0.225000 -0.479167 0.000000 + -0.175000 -0.479167 0.000000 + -0.125000 -0.479167 0.000000 + -0.075000 -0.479167 0.000000 + -0.025000 -0.479167 0.000000 + 0.025000 -0.479167 0.000000 + 0.075000 -0.479167 0.000000 + 0.125000 -0.479167 0.000000 + 0.175000 -0.479167 0.000000 + 0.225000 -0.479167 0.000000 + 0.275000 -0.479167 0.000000 + 0.325000 -0.479167 0.000000 + 0.375000 -0.479167 0.000000 + 0.425000 -0.479167 0.000000 + 0.475000 -0.479167 0.000000 + -0.475000 -0.437500 0.000000 + -0.425000 -0.437500 0.000000 + -0.375000 -0.437500 0.000000 + -0.325000 -0.437500 0.000000 + -0.275000 -0.437500 0.000000 + -0.225000 -0.437500 0.000000 + -0.175000 -0.437500 0.000000 + -0.125000 -0.437500 0.000000 + -0.075000 -0.437500 0.000000 + -0.025000 -0.437500 0.000000 + 0.025000 -0.437500 0.000000 + 0.075000 -0.437500 0.000000 + 0.125000 -0.437500 0.000000 + 0.175000 -0.437500 0.000000 + 0.225000 -0.437500 0.000000 + 0.275000 -0.437500 0.000000 + 0.325000 -0.437500 0.000000 + 0.375000 -0.437500 0.000000 + 0.425000 -0.437500 0.000000 + 0.475000 -0.437500 0.000000 + -0.475000 -0.395833 0.000000 + -0.425000 -0.395833 0.000000 + -0.375000 -0.395833 0.000000 + -0.325000 -0.395833 0.000000 + -0.275000 -0.395833 0.000000 + -0.225000 -0.395833 0.000000 + -0.175000 -0.395833 0.000000 + -0.125000 -0.395833 0.000000 + -0.075000 -0.395833 0.000000 + -0.025000 -0.395833 0.000000 + 0.025000 -0.395833 0.000000 + 0.075000 -0.395833 0.000000 + 0.125000 -0.395833 0.000000 + 0.175000 -0.395833 0.000000 + 0.225000 -0.395833 0.000000 + 0.275000 -0.395833 0.000000 + 0.325000 -0.395833 0.000000 + 0.375000 -0.395833 0.000000 + 0.425000 -0.395833 0.000000 + 0.475000 -0.395833 0.000000 + -0.475000 -0.354167 0.000000 + -0.425000 -0.354167 0.000000 + -0.375000 -0.354167 0.000000 + -0.325000 -0.354167 0.000000 + -0.275000 -0.354167 0.000000 + -0.225000 -0.354167 0.000000 + -0.175000 -0.354167 0.000000 + -0.125000 -0.354167 0.000000 + -0.075000 -0.354167 0.000000 + -0.025000 -0.354167 0.000000 + 0.025000 -0.354167 0.000000 + 0.075000 -0.354167 0.000000 + 0.125000 -0.354167 0.000000 + 0.175000 -0.354167 0.000000 + 0.225000 -0.354167 0.000000 + 0.275000 -0.354167 0.000000 + 0.325000 -0.354167 0.000000 + 0.375000 -0.354167 0.000000 + 0.425000 -0.354167 0.000000 + 0.475000 -0.354167 0.000000 + -0.475000 -0.312500 0.000000 + -0.425000 -0.312500 0.000000 + -0.375000 -0.312500 0.000000 + -0.325000 -0.312500 0.000000 + -0.275000 -0.312500 0.000000 + -0.225000 -0.312500 0.000000 + -0.175000 -0.312500 0.000000 + -0.125000 -0.312500 0.000000 + -0.075000 -0.312500 0.000000 + -0.025000 -0.312500 0.000000 + 0.025000 -0.312500 0.000000 + 0.075000 -0.312500 0.000000 + 0.125000 -0.312500 0.000000 + 0.175000 -0.312500 0.000000 + 0.225000 -0.312500 0.000000 + 0.275000 -0.312500 0.000000 + 0.325000 -0.312500 0.000000 + 0.375000 -0.312500 0.000000 + 0.425000 -0.312500 0.000000 + 0.475000 -0.312500 0.000000 + -0.475000 -0.270833 0.000000 + -0.425000 -0.270833 0.000000 + -0.375000 -0.270833 0.000000 + -0.325000 -0.270833 0.000000 + -0.275000 -0.270833 0.000000 + -0.225000 -0.270833 0.000000 + -0.175000 -0.270833 0.000000 + -0.125000 -0.270833 0.000000 + -0.075000 -0.270833 0.000000 + -0.025000 -0.270833 0.000000 + 0.025000 -0.270833 0.000000 + 0.075000 -0.270833 0.000000 + 0.125000 -0.270833 0.000000 + 0.175000 -0.270833 0.000000 + 0.225000 -0.270833 0.000000 + 0.275000 -0.270833 0.000000 + 0.325000 -0.270833 0.000000 + 0.375000 -0.270833 0.000000 + 0.425000 -0.270833 0.000000 + 0.475000 -0.270833 0.000000 + -0.475000 -0.229167 0.000000 + -0.425000 -0.229167 0.000000 + -0.375000 -0.229167 0.000000 + -0.325000 -0.229167 0.000000 + -0.275000 -0.229167 0.000000 + -0.225000 -0.229167 0.000000 + -0.175000 -0.229167 0.000000 + -0.125000 -0.229167 0.000000 + -0.075000 -0.229167 0.000000 + -0.025000 -0.229167 0.000000 + 0.025000 -0.229167 0.000000 + 0.075000 -0.229167 0.000000 + 0.125000 -0.229167 0.000000 + 0.175000 -0.229167 0.000000 + 0.225000 -0.229167 0.000000 + 0.275000 -0.229167 0.000000 + 0.325000 -0.229167 0.000000 + 0.375000 -0.229167 0.000000 + 0.425000 -0.229167 0.000000 + 0.475000 -0.229167 0.000000 + -0.475000 -0.187500 0.000000 + -0.425000 -0.187500 0.000000 + -0.375000 -0.187500 0.000000 + -0.325000 -0.187500 0.000000 + -0.275000 -0.187500 0.000000 + -0.225000 -0.187500 0.000000 + -0.175000 -0.187500 0.000000 + -0.125000 -0.187500 0.000000 + -0.075000 -0.187500 0.000000 + -0.025000 -0.187500 0.000000 + 0.025000 -0.187500 0.000000 + 0.075000 -0.187500 0.000000 + 0.125000 -0.187500 0.000000 + 0.175000 -0.187500 0.000000 + 0.225000 -0.187500 0.000000 + 0.275000 -0.187500 0.000000 + 0.325000 -0.187500 0.000000 + 0.375000 -0.187500 0.000000 + 0.425000 -0.187500 0.000000 + 0.475000 -0.187500 0.000000 + -0.475000 -0.145833 0.000000 + -0.425000 -0.145833 0.000000 + -0.375000 -0.145833 0.000000 + -0.325000 -0.145833 0.000000 + -0.275000 -0.145833 0.000000 + -0.225000 -0.145833 0.000000 + -0.175000 -0.145833 0.000000 + -0.125000 -0.145833 0.000000 + -0.075000 -0.145833 0.000000 + -0.025000 -0.145833 0.000000 + 0.025000 -0.145833 0.000000 + 0.075000 -0.145833 0.000000 + 0.125000 -0.145833 0.000000 + 0.175000 -0.145833 0.000000 + 0.225000 -0.145833 0.000000 + 0.275000 -0.145833 0.000000 + 0.325000 -0.145833 0.000000 + 0.375000 -0.145833 0.000000 + 0.425000 -0.145833 0.000000 + 0.475000 -0.145833 0.000000 + -0.475000 -0.104167 0.000000 + -0.425000 -0.104167 0.000000 + -0.375000 -0.104167 0.000000 + -0.325000 -0.104167 0.000000 + -0.275000 -0.104167 0.000000 + -0.225000 -0.104167 0.000000 + -0.175000 -0.104167 0.000000 + -0.125000 -0.104167 0.000000 + -0.075000 -0.104167 0.000000 + -0.025000 -0.104167 0.000000 + 0.025000 -0.104167 0.000000 + 0.075000 -0.104167 0.000000 + 0.125000 -0.104167 0.000000 + 0.175000 -0.104167 0.000000 + 0.225000 -0.104167 0.000000 + 0.275000 -0.104167 0.000000 + 0.325000 -0.104167 0.000000 + 0.375000 -0.104167 0.000000 + 0.425000 -0.104167 0.000000 + 0.475000 -0.104167 0.000000 + -0.475000 -0.062500 0.000000 + -0.425000 -0.062500 0.000000 + -0.375000 -0.062500 0.000000 + -0.325000 -0.062500 0.000000 + -0.275000 -0.062500 0.000000 + -0.225000 -0.062500 0.000000 + -0.175000 -0.062500 0.000000 + -0.125000 -0.062500 0.000000 + -0.075000 -0.062500 0.000000 + -0.025000 -0.062500 0.000000 + 0.025000 -0.062500 0.000000 + 0.075000 -0.062500 0.000000 + 0.125000 -0.062500 0.000000 + 0.175000 -0.062500 0.000000 + 0.225000 -0.062500 0.000000 + 0.275000 -0.062500 0.000000 + 0.325000 -0.062500 0.000000 + 0.375000 -0.062500 0.000000 + 0.425000 -0.062500 0.000000 + 0.475000 -0.062500 0.000000 + -0.475000 -0.020833 0.000000 + -0.425000 -0.020833 0.000000 + -0.375000 -0.020833 0.000000 + -0.325000 -0.020833 0.000000 + -0.275000 -0.020833 0.000000 + -0.225000 -0.020833 0.000000 + -0.175000 -0.020833 0.000000 + -0.125000 -0.020833 0.000000 + -0.075000 -0.020833 0.000000 + -0.025000 -0.020833 0.000000 + 0.025000 -0.020833 0.000000 + 0.075000 -0.020833 0.000000 + 0.125000 -0.020833 0.000000 + 0.175000 -0.020833 0.000000 + 0.225000 -0.020833 0.000000 + 0.275000 -0.020833 0.000000 + 0.325000 -0.020833 0.000000 + 0.375000 -0.020833 0.000000 + 0.425000 -0.020833 0.000000 + 0.475000 -0.020833 0.000000 + -0.475000 0.020833 0.000000 + -0.425000 0.020833 0.000000 + -0.375000 0.020833 0.000000 + -0.325000 0.020833 0.000000 + -0.275000 0.020833 0.000000 + -0.225000 0.020833 0.000000 + -0.175000 0.020833 0.000000 + -0.125000 0.020833 0.000000 + -0.075000 0.020833 0.000000 + -0.025000 0.020833 0.000000 + 0.025000 0.020833 0.000000 + 0.075000 0.020833 0.000000 + 0.125000 0.020833 0.000000 + 0.175000 0.020833 0.000000 + 0.225000 0.020833 0.000000 + 0.275000 0.020833 0.000000 + 0.325000 0.020833 0.000000 + 0.375000 0.020833 0.000000 + 0.425000 0.020833 0.000000 + 0.475000 0.020833 0.000000 + -0.475000 0.062500 0.000000 + -0.425000 0.062500 0.000000 + -0.375000 0.062500 0.000000 + -0.325000 0.062500 0.000000 + -0.275000 0.062500 0.000000 + -0.225000 0.062500 0.000000 + -0.175000 0.062500 0.000000 + -0.125000 0.062500 0.000000 + -0.075000 0.062500 0.000000 + -0.025000 0.062500 0.000000 + 0.025000 0.062500 0.000000 + 0.075000 0.062500 0.000000 + 0.125000 0.062500 0.000000 + 0.175000 0.062500 0.000000 + 0.225000 0.062500 0.000000 + 0.275000 0.062500 0.000000 + 0.325000 0.062500 0.000000 + 0.375000 0.062500 0.000000 + 0.425000 0.062500 0.000000 + 0.475000 0.062500 0.000000 + -0.475000 0.104167 0.000000 + -0.425000 0.104167 0.000000 + -0.375000 0.104167 0.000000 + -0.325000 0.104167 0.000000 + -0.275000 0.104167 0.000000 + -0.225000 0.104167 0.000000 + -0.175000 0.104167 0.000000 + -0.125000 0.104167 0.000000 + -0.075000 0.104167 0.000000 + -0.025000 0.104167 0.000000 + 0.025000 0.104167 0.000000 + 0.075000 0.104167 0.000000 + 0.125000 0.104167 0.000000 + 0.175000 0.104167 0.000000 + 0.225000 0.104167 0.000000 + 0.275000 0.104167 0.000000 + 0.325000 0.104167 0.000000 + 0.375000 0.104167 0.000000 + 0.425000 0.104167 0.000000 + 0.475000 0.104167 0.000000 + -0.475000 0.145833 0.000000 + -0.425000 0.145833 0.000000 + -0.375000 0.145833 0.000000 + -0.325000 0.145833 0.000000 + -0.275000 0.145833 0.000000 + -0.225000 0.145833 0.000000 + -0.175000 0.145833 0.000000 + -0.125000 0.145833 0.000000 + -0.075000 0.145833 0.000000 + -0.025000 0.145833 0.000000 + 0.025000 0.145833 0.000000 + 0.075000 0.145833 0.000000 + 0.125000 0.145833 0.000000 + 0.175000 0.145833 0.000000 + 0.225000 0.145833 0.000000 + 0.275000 0.145833 0.000000 + 0.325000 0.145833 0.000000 + 0.375000 0.145833 0.000000 + 0.425000 0.145833 0.000000 + 0.475000 0.145833 0.000000 + -0.475000 0.187500 0.000000 + -0.425000 0.187500 0.000000 + -0.375000 0.187500 0.000000 + -0.325000 0.187500 0.000000 + -0.275000 0.187500 0.000000 + -0.225000 0.187500 0.000000 + -0.175000 0.187500 0.000000 + -0.125000 0.187500 0.000000 + -0.075000 0.187500 0.000000 + -0.025000 0.187500 0.000000 + 0.025000 0.187500 0.000000 + 0.075000 0.187500 0.000000 + 0.125000 0.187500 0.000000 + 0.175000 0.187500 0.000000 + 0.225000 0.187500 0.000000 + 0.275000 0.187500 0.000000 + 0.325000 0.187500 0.000000 + 0.375000 0.187500 0.000000 + 0.425000 0.187500 0.000000 + 0.475000 0.187500 0.000000 + -0.475000 0.229167 0.000000 + -0.425000 0.229167 0.000000 + -0.375000 0.229167 0.000000 + -0.325000 0.229167 0.000000 + -0.275000 0.229167 0.000000 + -0.225000 0.229167 0.000000 + -0.175000 0.229167 0.000000 + -0.125000 0.229167 0.000000 + -0.075000 0.229167 0.000000 + -0.025000 0.229167 0.000000 + 0.025000 0.229167 0.000000 + 0.075000 0.229167 0.000000 + 0.125000 0.229167 0.000000 + 0.175000 0.229167 0.000000 + 0.225000 0.229167 0.000000 + 0.275000 0.229167 0.000000 + 0.325000 0.229167 0.000000 + 0.375000 0.229167 0.000000 + 0.425000 0.229167 0.000000 + 0.475000 0.229167 0.000000 + -0.475000 0.270833 0.000000 + -0.425000 0.270833 0.000000 + -0.375000 0.270833 0.000000 + -0.325000 0.270833 0.000000 + -0.275000 0.270833 0.000000 + -0.225000 0.270833 0.000000 + -0.175000 0.270833 0.000000 + -0.125000 0.270833 0.000000 + -0.075000 0.270833 0.000000 + -0.025000 0.270833 0.000000 + 0.025000 0.270833 0.000000 + 0.075000 0.270833 0.000000 + 0.125000 0.270833 0.000000 + 0.175000 0.270833 0.000000 + 0.225000 0.270833 0.000000 + 0.275000 0.270833 0.000000 + 0.325000 0.270833 0.000000 + 0.375000 0.270833 0.000000 + 0.425000 0.270833 0.000000 + 0.475000 0.270833 0.000000 + -0.475000 0.312500 0.000000 + -0.425000 0.312500 0.000000 + -0.375000 0.312500 0.000000 + -0.325000 0.312500 0.000000 + -0.275000 0.312500 0.000000 + -0.225000 0.312500 0.000000 + -0.175000 0.312500 0.000000 + -0.125000 0.312500 0.000000 + -0.075000 0.312500 0.000000 + -0.025000 0.312500 0.000000 + 0.025000 0.312500 0.000000 + 0.075000 0.312500 0.000000 + 0.125000 0.312500 0.000000 + 0.175000 0.312500 0.000000 + 0.225000 0.312500 0.000000 + 0.275000 0.312500 0.000000 + 0.325000 0.312500 0.000000 + 0.375000 0.312500 0.000000 + 0.425000 0.312500 0.000000 + 0.475000 0.312500 0.000000 + -0.475000 0.354167 0.000000 + -0.425000 0.354167 0.000000 + -0.375000 0.354167 0.000000 + -0.325000 0.354167 0.000000 + -0.275000 0.354167 0.000000 + -0.225000 0.354167 0.000000 + -0.175000 0.354167 0.000000 + -0.125000 0.354167 0.000000 + -0.075000 0.354167 0.000000 + -0.025000 0.354167 0.000000 + 0.025000 0.354167 0.000000 + 0.075000 0.354167 0.000000 + 0.125000 0.354167 0.000000 + 0.175000 0.354167 0.000000 + 0.225000 0.354167 0.000000 + 0.275000 0.354167 0.000000 + 0.325000 0.354167 0.000000 + 0.375000 0.354167 0.000000 + 0.425000 0.354167 0.000000 + 0.475000 0.354167 0.000000 + -0.475000 0.395833 0.000000 + -0.425000 0.395833 0.000000 + -0.375000 0.395833 0.000000 + -0.325000 0.395833 0.000000 + -0.275000 0.395833 0.000000 + -0.225000 0.395833 0.000000 + -0.175000 0.395833 0.000000 + -0.125000 0.395833 0.000000 + -0.075000 0.395833 0.000000 + -0.025000 0.395833 0.000000 + 0.025000 0.395833 0.000000 + 0.075000 0.395833 0.000000 + 0.125000 0.395833 0.000000 + 0.175000 0.395833 0.000000 + 0.225000 0.395833 0.000000 + 0.275000 0.395833 0.000000 + 0.325000 0.395833 0.000000 + 0.375000 0.395833 0.000000 + 0.425000 0.395833 0.000000 + 0.475000 0.395833 0.000000 + -0.475000 0.437500 0.000000 + -0.425000 0.437500 0.000000 + -0.375000 0.437500 0.000000 + -0.325000 0.437500 0.000000 + -0.275000 0.437500 0.000000 + -0.225000 0.437500 0.000000 + -0.175000 0.437500 0.000000 + -0.125000 0.437500 0.000000 + -0.075000 0.437500 0.000000 + -0.025000 0.437500 0.000000 + 0.025000 0.437500 0.000000 + 0.075000 0.437500 0.000000 + 0.125000 0.437500 0.000000 + 0.175000 0.437500 0.000000 + 0.225000 0.437500 0.000000 + 0.275000 0.437500 0.000000 + 0.325000 0.437500 0.000000 + 0.375000 0.437500 0.000000 + 0.425000 0.437500 0.000000 + 0.475000 0.437500 0.000000 + -0.475000 0.479167 0.000000 + -0.425000 0.479167 0.000000 + -0.375000 0.479167 0.000000 + -0.325000 0.479167 0.000000 + -0.275000 0.479167 0.000000 + -0.225000 0.479167 0.000000 + -0.175000 0.479167 0.000000 + -0.125000 0.479167 0.000000 + -0.075000 0.479167 0.000000 + -0.025000 0.479167 0.000000 + 0.025000 0.479167 0.000000 + 0.075000 0.479167 0.000000 + 0.125000 0.479167 0.000000 + 0.175000 0.479167 0.000000 + 0.225000 0.479167 0.000000 + 0.275000 0.479167 0.000000 + 0.325000 0.479167 0.000000 + 0.375000 0.479167 0.000000 + 0.425000 0.479167 0.000000 + 0.475000 0.479167 0.000000 + + + + + + + + 1 0 0 .0000000000 + 0 1 0 .0000000000 + 0 0 1 .0000000000 + + + + + 5.301179702900000 .000000000000000 .000000000000000 + .000000000000000 7.497000033000000 .000000000000000 + .000000000000000 .000000000000000 13.619999999999999 + + + + + + + + + + + + + + + + + + + + + + + + + + .0000000000 .0000000000 -1.9928500088 + + + + + 1.000/2.000 1.000/2.000 .0000000000 + + + + + .0000000000 .0000000000 2.6505900117 + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.475000 -0.479167 0.000000 + -0.425000 -0.479167 0.000000 + -0.375000 -0.479167 0.000000 + -0.325000 -0.479167 0.000000 + -0.275000 -0.479167 0.000000 + -0.225000 -0.479167 0.000000 + -0.175000 -0.479167 0.000000 + -0.125000 -0.479167 0.000000 + -0.075000 -0.479167 0.000000 + -0.025000 -0.479167 0.000000 + 0.025000 -0.479167 0.000000 + 0.075000 -0.479167 0.000000 + 0.125000 -0.479167 0.000000 + 0.175000 -0.479167 0.000000 + 0.225000 -0.479167 0.000000 + 0.275000 -0.479167 0.000000 + 0.325000 -0.479167 0.000000 + 0.375000 -0.479167 0.000000 + 0.425000 -0.479167 0.000000 + 0.475000 -0.479167 0.000000 + -0.475000 -0.437500 0.000000 + -0.425000 -0.437500 0.000000 + -0.375000 -0.437500 0.000000 + -0.325000 -0.437500 0.000000 + -0.275000 -0.437500 0.000000 + -0.225000 -0.437500 0.000000 + -0.175000 -0.437500 0.000000 + -0.125000 -0.437500 0.000000 + -0.075000 -0.437500 0.000000 + -0.025000 -0.437500 0.000000 + 0.025000 -0.437500 0.000000 + 0.075000 -0.437500 0.000000 + 0.125000 -0.437500 0.000000 + 0.175000 -0.437500 0.000000 + 0.225000 -0.437500 0.000000 + 0.275000 -0.437500 0.000000 + 0.325000 -0.437500 0.000000 + 0.375000 -0.437500 0.000000 + 0.425000 -0.437500 0.000000 + 0.475000 -0.437500 0.000000 + -0.475000 -0.395833 0.000000 + -0.425000 -0.395833 0.000000 + -0.375000 -0.395833 0.000000 + -0.325000 -0.395833 0.000000 + -0.275000 -0.395833 0.000000 + -0.225000 -0.395833 0.000000 + -0.175000 -0.395833 0.000000 + -0.125000 -0.395833 0.000000 + -0.075000 -0.395833 0.000000 + -0.025000 -0.395833 0.000000 + 0.025000 -0.395833 0.000000 + 0.075000 -0.395833 0.000000 + 0.125000 -0.395833 0.000000 + 0.175000 -0.395833 0.000000 + 0.225000 -0.395833 0.000000 + 0.275000 -0.395833 0.000000 + 0.325000 -0.395833 0.000000 + 0.375000 -0.395833 0.000000 + 0.425000 -0.395833 0.000000 + 0.475000 -0.395833 0.000000 + -0.475000 -0.354167 0.000000 + -0.425000 -0.354167 0.000000 + -0.375000 -0.354167 0.000000 + -0.325000 -0.354167 0.000000 + -0.275000 -0.354167 0.000000 + -0.225000 -0.354167 0.000000 + -0.175000 -0.354167 0.000000 + -0.125000 -0.354167 0.000000 + -0.075000 -0.354167 0.000000 + -0.025000 -0.354167 0.000000 + 0.025000 -0.354167 0.000000 + 0.075000 -0.354167 0.000000 + 0.125000 -0.354167 0.000000 + 0.175000 -0.354167 0.000000 + 0.225000 -0.354167 0.000000 + 0.275000 -0.354167 0.000000 + 0.325000 -0.354167 0.000000 + 0.375000 -0.354167 0.000000 + 0.425000 -0.354167 0.000000 + 0.475000 -0.354167 0.000000 + -0.475000 -0.312500 0.000000 + -0.425000 -0.312500 0.000000 + -0.375000 -0.312500 0.000000 + -0.325000 -0.312500 0.000000 + -0.275000 -0.312500 0.000000 + -0.225000 -0.312500 0.000000 + -0.175000 -0.312500 0.000000 + -0.125000 -0.312500 0.000000 + -0.075000 -0.312500 0.000000 + -0.025000 -0.312500 0.000000 + 0.025000 -0.312500 0.000000 + 0.075000 -0.312500 0.000000 + 0.125000 -0.312500 0.000000 + 0.175000 -0.312500 0.000000 + 0.225000 -0.312500 0.000000 + 0.275000 -0.312500 0.000000 + 0.325000 -0.312500 0.000000 + 0.375000 -0.312500 0.000000 + 0.425000 -0.312500 0.000000 + 0.475000 -0.312500 0.000000 + -0.475000 -0.270833 0.000000 + -0.425000 -0.270833 0.000000 + -0.375000 -0.270833 0.000000 + -0.325000 -0.270833 0.000000 + -0.275000 -0.270833 0.000000 + -0.225000 -0.270833 0.000000 + -0.175000 -0.270833 0.000000 + -0.125000 -0.270833 0.000000 + -0.075000 -0.270833 0.000000 + -0.025000 -0.270833 0.000000 + 0.025000 -0.270833 0.000000 + 0.075000 -0.270833 0.000000 + 0.125000 -0.270833 0.000000 + 0.175000 -0.270833 0.000000 + 0.225000 -0.270833 0.000000 + 0.275000 -0.270833 0.000000 + 0.325000 -0.270833 0.000000 + 0.375000 -0.270833 0.000000 + 0.425000 -0.270833 0.000000 + 0.475000 -0.270833 0.000000 + -0.475000 -0.229167 0.000000 + -0.425000 -0.229167 0.000000 + -0.375000 -0.229167 0.000000 + -0.325000 -0.229167 0.000000 + -0.275000 -0.229167 0.000000 + -0.225000 -0.229167 0.000000 + -0.175000 -0.229167 0.000000 + -0.125000 -0.229167 0.000000 + -0.075000 -0.229167 0.000000 + -0.025000 -0.229167 0.000000 + 0.025000 -0.229167 0.000000 + 0.075000 -0.229167 0.000000 + 0.125000 -0.229167 0.000000 + 0.175000 -0.229167 0.000000 + 0.225000 -0.229167 0.000000 + 0.275000 -0.229167 0.000000 + 0.325000 -0.229167 0.000000 + 0.375000 -0.229167 0.000000 + 0.425000 -0.229167 0.000000 + 0.475000 -0.229167 0.000000 + -0.475000 -0.187500 0.000000 + -0.425000 -0.187500 0.000000 + -0.375000 -0.187500 0.000000 + -0.325000 -0.187500 0.000000 + -0.275000 -0.187500 0.000000 + -0.225000 -0.187500 0.000000 + -0.175000 -0.187500 0.000000 + -0.125000 -0.187500 0.000000 + -0.075000 -0.187500 0.000000 + -0.025000 -0.187500 0.000000 + 0.025000 -0.187500 0.000000 + 0.075000 -0.187500 0.000000 + 0.125000 -0.187500 0.000000 + 0.175000 -0.187500 0.000000 + 0.225000 -0.187500 0.000000 + 0.275000 -0.187500 0.000000 + 0.325000 -0.187500 0.000000 + 0.375000 -0.187500 0.000000 + 0.425000 -0.187500 0.000000 + 0.475000 -0.187500 0.000000 + -0.475000 -0.145833 0.000000 + -0.425000 -0.145833 0.000000 + -0.375000 -0.145833 0.000000 + -0.325000 -0.145833 0.000000 + -0.275000 -0.145833 0.000000 + -0.225000 -0.145833 0.000000 + -0.175000 -0.145833 0.000000 + -0.125000 -0.145833 0.000000 + -0.075000 -0.145833 0.000000 + -0.025000 -0.145833 0.000000 + 0.025000 -0.145833 0.000000 + 0.075000 -0.145833 0.000000 + 0.125000 -0.145833 0.000000 + 0.175000 -0.145833 0.000000 + 0.225000 -0.145833 0.000000 + 0.275000 -0.145833 0.000000 + 0.325000 -0.145833 0.000000 + 0.375000 -0.145833 0.000000 + 0.425000 -0.145833 0.000000 + 0.475000 -0.145833 0.000000 + -0.475000 -0.104167 0.000000 + -0.425000 -0.104167 0.000000 + -0.375000 -0.104167 0.000000 + -0.325000 -0.104167 0.000000 + -0.275000 -0.104167 0.000000 + -0.225000 -0.104167 0.000000 + -0.175000 -0.104167 0.000000 + -0.125000 -0.104167 0.000000 + -0.075000 -0.104167 0.000000 + -0.025000 -0.104167 0.000000 + 0.025000 -0.104167 0.000000 + 0.075000 -0.104167 0.000000 + 0.125000 -0.104167 0.000000 + 0.175000 -0.104167 0.000000 + 0.225000 -0.104167 0.000000 + 0.275000 -0.104167 0.000000 + 0.325000 -0.104167 0.000000 + 0.375000 -0.104167 0.000000 + 0.425000 -0.104167 0.000000 + 0.475000 -0.104167 0.000000 + -0.475000 -0.062500 0.000000 + -0.425000 -0.062500 0.000000 + -0.375000 -0.062500 0.000000 + -0.325000 -0.062500 0.000000 + -0.275000 -0.062500 0.000000 + -0.225000 -0.062500 0.000000 + -0.175000 -0.062500 0.000000 + -0.125000 -0.062500 0.000000 + -0.075000 -0.062500 0.000000 + -0.025000 -0.062500 0.000000 + 0.025000 -0.062500 0.000000 + 0.075000 -0.062500 0.000000 + 0.125000 -0.062500 0.000000 + 0.175000 -0.062500 0.000000 + 0.225000 -0.062500 0.000000 + 0.275000 -0.062500 0.000000 + 0.325000 -0.062500 0.000000 + 0.375000 -0.062500 0.000000 + 0.425000 -0.062500 0.000000 + 0.475000 -0.062500 0.000000 + -0.475000 -0.020833 0.000000 + -0.425000 -0.020833 0.000000 + -0.375000 -0.020833 0.000000 + -0.325000 -0.020833 0.000000 + -0.275000 -0.020833 0.000000 + -0.225000 -0.020833 0.000000 + -0.175000 -0.020833 0.000000 + -0.125000 -0.020833 0.000000 + -0.075000 -0.020833 0.000000 + -0.025000 -0.020833 0.000000 + 0.025000 -0.020833 0.000000 + 0.075000 -0.020833 0.000000 + 0.125000 -0.020833 0.000000 + 0.175000 -0.020833 0.000000 + 0.225000 -0.020833 0.000000 + 0.275000 -0.020833 0.000000 + 0.325000 -0.020833 0.000000 + 0.375000 -0.020833 0.000000 + 0.425000 -0.020833 0.000000 + 0.475000 -0.020833 0.000000 + -0.475000 0.020833 0.000000 + -0.425000 0.020833 0.000000 + -0.375000 0.020833 0.000000 + -0.325000 0.020833 0.000000 + -0.275000 0.020833 0.000000 + -0.225000 0.020833 0.000000 + -0.175000 0.020833 0.000000 + -0.125000 0.020833 0.000000 + -0.075000 0.020833 0.000000 + -0.025000 0.020833 0.000000 + 0.025000 0.020833 0.000000 + 0.075000 0.020833 0.000000 + 0.125000 0.020833 0.000000 + 0.175000 0.020833 0.000000 + 0.225000 0.020833 0.000000 + 0.275000 0.020833 0.000000 + 0.325000 0.020833 0.000000 + 0.375000 0.020833 0.000000 + 0.425000 0.020833 0.000000 + 0.475000 0.020833 0.000000 + -0.475000 0.062500 0.000000 + -0.425000 0.062500 0.000000 + -0.375000 0.062500 0.000000 + -0.325000 0.062500 0.000000 + -0.275000 0.062500 0.000000 + -0.225000 0.062500 0.000000 + -0.175000 0.062500 0.000000 + -0.125000 0.062500 0.000000 + -0.075000 0.062500 0.000000 + -0.025000 0.062500 0.000000 + 0.025000 0.062500 0.000000 + 0.075000 0.062500 0.000000 + 0.125000 0.062500 0.000000 + 0.175000 0.062500 0.000000 + 0.225000 0.062500 0.000000 + 0.275000 0.062500 0.000000 + 0.325000 0.062500 0.000000 + 0.375000 0.062500 0.000000 + 0.425000 0.062500 0.000000 + 0.475000 0.062500 0.000000 + -0.475000 0.104167 0.000000 + -0.425000 0.104167 0.000000 + -0.375000 0.104167 0.000000 + -0.325000 0.104167 0.000000 + -0.275000 0.104167 0.000000 + -0.225000 0.104167 0.000000 + -0.175000 0.104167 0.000000 + -0.125000 0.104167 0.000000 + -0.075000 0.104167 0.000000 + -0.025000 0.104167 0.000000 + 0.025000 0.104167 0.000000 + 0.075000 0.104167 0.000000 + 0.125000 0.104167 0.000000 + 0.175000 0.104167 0.000000 + 0.225000 0.104167 0.000000 + 0.275000 0.104167 0.000000 + 0.325000 0.104167 0.000000 + 0.375000 0.104167 0.000000 + 0.425000 0.104167 0.000000 + 0.475000 0.104167 0.000000 + -0.475000 0.145833 0.000000 + -0.425000 0.145833 0.000000 + -0.375000 0.145833 0.000000 + -0.325000 0.145833 0.000000 + -0.275000 0.145833 0.000000 + -0.225000 0.145833 0.000000 + -0.175000 0.145833 0.000000 + -0.125000 0.145833 0.000000 + -0.075000 0.145833 0.000000 + -0.025000 0.145833 0.000000 + 0.025000 0.145833 0.000000 + 0.075000 0.145833 0.000000 + 0.125000 0.145833 0.000000 + 0.175000 0.145833 0.000000 + 0.225000 0.145833 0.000000 + 0.275000 0.145833 0.000000 + 0.325000 0.145833 0.000000 + 0.375000 0.145833 0.000000 + 0.425000 0.145833 0.000000 + 0.475000 0.145833 0.000000 + -0.475000 0.187500 0.000000 + -0.425000 0.187500 0.000000 + -0.375000 0.187500 0.000000 + -0.325000 0.187500 0.000000 + -0.275000 0.187500 0.000000 + -0.225000 0.187500 0.000000 + -0.175000 0.187500 0.000000 + -0.125000 0.187500 0.000000 + -0.075000 0.187500 0.000000 + -0.025000 0.187500 0.000000 + 0.025000 0.187500 0.000000 + 0.075000 0.187500 0.000000 + 0.125000 0.187500 0.000000 + 0.175000 0.187500 0.000000 + 0.225000 0.187500 0.000000 + 0.275000 0.187500 0.000000 + 0.325000 0.187500 0.000000 + 0.375000 0.187500 0.000000 + 0.425000 0.187500 0.000000 + 0.475000 0.187500 0.000000 + -0.475000 0.229167 0.000000 + -0.425000 0.229167 0.000000 + -0.375000 0.229167 0.000000 + -0.325000 0.229167 0.000000 + -0.275000 0.229167 0.000000 + -0.225000 0.229167 0.000000 + -0.175000 0.229167 0.000000 + -0.125000 0.229167 0.000000 + -0.075000 0.229167 0.000000 + -0.025000 0.229167 0.000000 + 0.025000 0.229167 0.000000 + 0.075000 0.229167 0.000000 + 0.125000 0.229167 0.000000 + 0.175000 0.229167 0.000000 + 0.225000 0.229167 0.000000 + 0.275000 0.229167 0.000000 + 0.325000 0.229167 0.000000 + 0.375000 0.229167 0.000000 + 0.425000 0.229167 0.000000 + 0.475000 0.229167 0.000000 + -0.475000 0.270833 0.000000 + -0.425000 0.270833 0.000000 + -0.375000 0.270833 0.000000 + -0.325000 0.270833 0.000000 + -0.275000 0.270833 0.000000 + -0.225000 0.270833 0.000000 + -0.175000 0.270833 0.000000 + -0.125000 0.270833 0.000000 + -0.075000 0.270833 0.000000 + -0.025000 0.270833 0.000000 + 0.025000 0.270833 0.000000 + 0.075000 0.270833 0.000000 + 0.125000 0.270833 0.000000 + 0.175000 0.270833 0.000000 + 0.225000 0.270833 0.000000 + 0.275000 0.270833 0.000000 + 0.325000 0.270833 0.000000 + 0.375000 0.270833 0.000000 + 0.425000 0.270833 0.000000 + 0.475000 0.270833 0.000000 + -0.475000 0.312500 0.000000 + -0.425000 0.312500 0.000000 + -0.375000 0.312500 0.000000 + -0.325000 0.312500 0.000000 + -0.275000 0.312500 0.000000 + -0.225000 0.312500 0.000000 + -0.175000 0.312500 0.000000 + -0.125000 0.312500 0.000000 + -0.075000 0.312500 0.000000 + -0.025000 0.312500 0.000000 + 0.025000 0.312500 0.000000 + 0.075000 0.312500 0.000000 + 0.125000 0.312500 0.000000 + 0.175000 0.312500 0.000000 + 0.225000 0.312500 0.000000 + 0.275000 0.312500 0.000000 + 0.325000 0.312500 0.000000 + 0.375000 0.312500 0.000000 + 0.425000 0.312500 0.000000 + 0.475000 0.312500 0.000000 + -0.475000 0.354167 0.000000 + -0.425000 0.354167 0.000000 + -0.375000 0.354167 0.000000 + -0.325000 0.354167 0.000000 + -0.275000 0.354167 0.000000 + -0.225000 0.354167 0.000000 + -0.175000 0.354167 0.000000 + -0.125000 0.354167 0.000000 + -0.075000 0.354167 0.000000 + -0.025000 0.354167 0.000000 + 0.025000 0.354167 0.000000 + 0.075000 0.354167 0.000000 + 0.125000 0.354167 0.000000 + 0.175000 0.354167 0.000000 + 0.225000 0.354167 0.000000 + 0.275000 0.354167 0.000000 + 0.325000 0.354167 0.000000 + 0.375000 0.354167 0.000000 + 0.425000 0.354167 0.000000 + 0.475000 0.354167 0.000000 + -0.475000 0.395833 0.000000 + -0.425000 0.395833 0.000000 + -0.375000 0.395833 0.000000 + -0.325000 0.395833 0.000000 + -0.275000 0.395833 0.000000 + -0.225000 0.395833 0.000000 + -0.175000 0.395833 0.000000 + -0.125000 0.395833 0.000000 + -0.075000 0.395833 0.000000 + -0.025000 0.395833 0.000000 + 0.025000 0.395833 0.000000 + 0.075000 0.395833 0.000000 + 0.125000 0.395833 0.000000 + 0.175000 0.395833 0.000000 + 0.225000 0.395833 0.000000 + 0.275000 0.395833 0.000000 + 0.325000 0.395833 0.000000 + 0.375000 0.395833 0.000000 + 0.425000 0.395833 0.000000 + 0.475000 0.395833 0.000000 + -0.475000 0.437500 0.000000 + -0.425000 0.437500 0.000000 + -0.375000 0.437500 0.000000 + -0.325000 0.437500 0.000000 + -0.275000 0.437500 0.000000 + -0.225000 0.437500 0.000000 + -0.175000 0.437500 0.000000 + -0.125000 0.437500 0.000000 + -0.075000 0.437500 0.000000 + -0.025000 0.437500 0.000000 + 0.025000 0.437500 0.000000 + 0.075000 0.437500 0.000000 + 0.125000 0.437500 0.000000 + 0.175000 0.437500 0.000000 + 0.225000 0.437500 0.000000 + 0.275000 0.437500 0.000000 + 0.325000 0.437500 0.000000 + 0.375000 0.437500 0.000000 + 0.425000 0.437500 0.000000 + 0.475000 0.437500 0.000000 + -0.475000 0.479167 0.000000 + -0.425000 0.479167 0.000000 + -0.375000 0.479167 0.000000 + -0.325000 0.479167 0.000000 + -0.275000 0.479167 0.000000 + -0.225000 0.479167 0.000000 + -0.175000 0.479167 0.000000 + -0.125000 0.479167 0.000000 + -0.075000 0.479167 0.000000 + -0.025000 0.479167 0.000000 + 0.025000 0.479167 0.000000 + 0.075000 0.479167 0.000000 + 0.125000 0.479167 0.000000 + 0.175000 0.479167 0.000000 + 0.225000 0.479167 0.000000 + 0.275000 0.479167 0.000000 + 0.325000 0.479167 0.000000 + 0.375000 0.479167 0.000000 + 0.425000 0.479167 0.000000 + 0.475000 0.479167 0.000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/aiida_fleur/tests/files/outxml/all_test/mae_FT_out.xml b/aiida_fleur/tests/files/outxml/all_test/mae_FT_out.xml new file mode 100644 index 000000000..c15a4f6bd --- /dev/null +++ b/aiida_fleur/tests/files/outxml/all_test/mae_FT_out.xml @@ -0,0 +1,1225 @@ + + + + + + GEN + + + CPP_MPI CPP_HDF + + + + + + + + + + A Fleur input generator calculation with aiida + + + + + + + + + + .0000000000 .0000000000 .0000000000 + + + + + + + -0.475000 -0.479167 0.000000 + -0.425000 -0.479167 0.000000 + -0.375000 -0.479167 0.000000 + -0.325000 -0.479167 0.000000 + -0.275000 -0.479167 0.000000 + -0.225000 -0.479167 0.000000 + -0.175000 -0.479167 0.000000 + -0.125000 -0.479167 0.000000 + -0.075000 -0.479167 0.000000 + -0.025000 -0.479167 0.000000 + 0.025000 -0.479167 0.000000 + 0.075000 -0.479167 0.000000 + 0.125000 -0.479167 0.000000 + 0.175000 -0.479167 0.000000 + 0.225000 -0.479167 0.000000 + 0.275000 -0.479167 0.000000 + 0.325000 -0.479167 0.000000 + 0.375000 -0.479167 0.000000 + 0.425000 -0.479167 0.000000 + 0.475000 -0.479167 0.000000 + -0.475000 -0.437500 0.000000 + -0.425000 -0.437500 0.000000 + -0.375000 -0.437500 0.000000 + -0.325000 -0.437500 0.000000 + -0.275000 -0.437500 0.000000 + -0.225000 -0.437500 0.000000 + -0.175000 -0.437500 0.000000 + -0.125000 -0.437500 0.000000 + -0.075000 -0.437500 0.000000 + -0.025000 -0.437500 0.000000 + 0.025000 -0.437500 0.000000 + 0.075000 -0.437500 0.000000 + 0.125000 -0.437500 0.000000 + 0.175000 -0.437500 0.000000 + 0.225000 -0.437500 0.000000 + 0.275000 -0.437500 0.000000 + 0.325000 -0.437500 0.000000 + 0.375000 -0.437500 0.000000 + 0.425000 -0.437500 0.000000 + 0.475000 -0.437500 0.000000 + -0.475000 -0.395833 0.000000 + -0.425000 -0.395833 0.000000 + -0.375000 -0.395833 0.000000 + -0.325000 -0.395833 0.000000 + -0.275000 -0.395833 0.000000 + -0.225000 -0.395833 0.000000 + -0.175000 -0.395833 0.000000 + -0.125000 -0.395833 0.000000 + -0.075000 -0.395833 0.000000 + -0.025000 -0.395833 0.000000 + 0.025000 -0.395833 0.000000 + 0.075000 -0.395833 0.000000 + 0.125000 -0.395833 0.000000 + 0.175000 -0.395833 0.000000 + 0.225000 -0.395833 0.000000 + 0.275000 -0.395833 0.000000 + 0.325000 -0.395833 0.000000 + 0.375000 -0.395833 0.000000 + 0.425000 -0.395833 0.000000 + 0.475000 -0.395833 0.000000 + -0.475000 -0.354167 0.000000 + -0.425000 -0.354167 0.000000 + -0.375000 -0.354167 0.000000 + -0.325000 -0.354167 0.000000 + -0.275000 -0.354167 0.000000 + -0.225000 -0.354167 0.000000 + -0.175000 -0.354167 0.000000 + -0.125000 -0.354167 0.000000 + -0.075000 -0.354167 0.000000 + -0.025000 -0.354167 0.000000 + 0.025000 -0.354167 0.000000 + 0.075000 -0.354167 0.000000 + 0.125000 -0.354167 0.000000 + 0.175000 -0.354167 0.000000 + 0.225000 -0.354167 0.000000 + 0.275000 -0.354167 0.000000 + 0.325000 -0.354167 0.000000 + 0.375000 -0.354167 0.000000 + 0.425000 -0.354167 0.000000 + 0.475000 -0.354167 0.000000 + -0.475000 -0.312500 0.000000 + -0.425000 -0.312500 0.000000 + -0.375000 -0.312500 0.000000 + -0.325000 -0.312500 0.000000 + -0.275000 -0.312500 0.000000 + -0.225000 -0.312500 0.000000 + -0.175000 -0.312500 0.000000 + -0.125000 -0.312500 0.000000 + -0.075000 -0.312500 0.000000 + -0.025000 -0.312500 0.000000 + 0.025000 -0.312500 0.000000 + 0.075000 -0.312500 0.000000 + 0.125000 -0.312500 0.000000 + 0.175000 -0.312500 0.000000 + 0.225000 -0.312500 0.000000 + 0.275000 -0.312500 0.000000 + 0.325000 -0.312500 0.000000 + 0.375000 -0.312500 0.000000 + 0.425000 -0.312500 0.000000 + 0.475000 -0.312500 0.000000 + -0.475000 -0.270833 0.000000 + -0.425000 -0.270833 0.000000 + -0.375000 -0.270833 0.000000 + -0.325000 -0.270833 0.000000 + -0.275000 -0.270833 0.000000 + -0.225000 -0.270833 0.000000 + -0.175000 -0.270833 0.000000 + -0.125000 -0.270833 0.000000 + -0.075000 -0.270833 0.000000 + -0.025000 -0.270833 0.000000 + 0.025000 -0.270833 0.000000 + 0.075000 -0.270833 0.000000 + 0.125000 -0.270833 0.000000 + 0.175000 -0.270833 0.000000 + 0.225000 -0.270833 0.000000 + 0.275000 -0.270833 0.000000 + 0.325000 -0.270833 0.000000 + 0.375000 -0.270833 0.000000 + 0.425000 -0.270833 0.000000 + 0.475000 -0.270833 0.000000 + -0.475000 -0.229167 0.000000 + -0.425000 -0.229167 0.000000 + -0.375000 -0.229167 0.000000 + -0.325000 -0.229167 0.000000 + -0.275000 -0.229167 0.000000 + -0.225000 -0.229167 0.000000 + -0.175000 -0.229167 0.000000 + -0.125000 -0.229167 0.000000 + -0.075000 -0.229167 0.000000 + -0.025000 -0.229167 0.000000 + 0.025000 -0.229167 0.000000 + 0.075000 -0.229167 0.000000 + 0.125000 -0.229167 0.000000 + 0.175000 -0.229167 0.000000 + 0.225000 -0.229167 0.000000 + 0.275000 -0.229167 0.000000 + 0.325000 -0.229167 0.000000 + 0.375000 -0.229167 0.000000 + 0.425000 -0.229167 0.000000 + 0.475000 -0.229167 0.000000 + -0.475000 -0.187500 0.000000 + -0.425000 -0.187500 0.000000 + -0.375000 -0.187500 0.000000 + -0.325000 -0.187500 0.000000 + -0.275000 -0.187500 0.000000 + -0.225000 -0.187500 0.000000 + -0.175000 -0.187500 0.000000 + -0.125000 -0.187500 0.000000 + -0.075000 -0.187500 0.000000 + -0.025000 -0.187500 0.000000 + 0.025000 -0.187500 0.000000 + 0.075000 -0.187500 0.000000 + 0.125000 -0.187500 0.000000 + 0.175000 -0.187500 0.000000 + 0.225000 -0.187500 0.000000 + 0.275000 -0.187500 0.000000 + 0.325000 -0.187500 0.000000 + 0.375000 -0.187500 0.000000 + 0.425000 -0.187500 0.000000 + 0.475000 -0.187500 0.000000 + -0.475000 -0.145833 0.000000 + -0.425000 -0.145833 0.000000 + -0.375000 -0.145833 0.000000 + -0.325000 -0.145833 0.000000 + -0.275000 -0.145833 0.000000 + -0.225000 -0.145833 0.000000 + -0.175000 -0.145833 0.000000 + -0.125000 -0.145833 0.000000 + -0.075000 -0.145833 0.000000 + -0.025000 -0.145833 0.000000 + 0.025000 -0.145833 0.000000 + 0.075000 -0.145833 0.000000 + 0.125000 -0.145833 0.000000 + 0.175000 -0.145833 0.000000 + 0.225000 -0.145833 0.000000 + 0.275000 -0.145833 0.000000 + 0.325000 -0.145833 0.000000 + 0.375000 -0.145833 0.000000 + 0.425000 -0.145833 0.000000 + 0.475000 -0.145833 0.000000 + -0.475000 -0.104167 0.000000 + -0.425000 -0.104167 0.000000 + -0.375000 -0.104167 0.000000 + -0.325000 -0.104167 0.000000 + -0.275000 -0.104167 0.000000 + -0.225000 -0.104167 0.000000 + -0.175000 -0.104167 0.000000 + -0.125000 -0.104167 0.000000 + -0.075000 -0.104167 0.000000 + -0.025000 -0.104167 0.000000 + 0.025000 -0.104167 0.000000 + 0.075000 -0.104167 0.000000 + 0.125000 -0.104167 0.000000 + 0.175000 -0.104167 0.000000 + 0.225000 -0.104167 0.000000 + 0.275000 -0.104167 0.000000 + 0.325000 -0.104167 0.000000 + 0.375000 -0.104167 0.000000 + 0.425000 -0.104167 0.000000 + 0.475000 -0.104167 0.000000 + -0.475000 -0.062500 0.000000 + -0.425000 -0.062500 0.000000 + -0.375000 -0.062500 0.000000 + -0.325000 -0.062500 0.000000 + -0.275000 -0.062500 0.000000 + -0.225000 -0.062500 0.000000 + -0.175000 -0.062500 0.000000 + -0.125000 -0.062500 0.000000 + -0.075000 -0.062500 0.000000 + -0.025000 -0.062500 0.000000 + 0.025000 -0.062500 0.000000 + 0.075000 -0.062500 0.000000 + 0.125000 -0.062500 0.000000 + 0.175000 -0.062500 0.000000 + 0.225000 -0.062500 0.000000 + 0.275000 -0.062500 0.000000 + 0.325000 -0.062500 0.000000 + 0.375000 -0.062500 0.000000 + 0.425000 -0.062500 0.000000 + 0.475000 -0.062500 0.000000 + -0.475000 -0.020833 0.000000 + -0.425000 -0.020833 0.000000 + -0.375000 -0.020833 0.000000 + -0.325000 -0.020833 0.000000 + -0.275000 -0.020833 0.000000 + -0.225000 -0.020833 0.000000 + -0.175000 -0.020833 0.000000 + -0.125000 -0.020833 0.000000 + -0.075000 -0.020833 0.000000 + -0.025000 -0.020833 0.000000 + 0.025000 -0.020833 0.000000 + 0.075000 -0.020833 0.000000 + 0.125000 -0.020833 0.000000 + 0.175000 -0.020833 0.000000 + 0.225000 -0.020833 0.000000 + 0.275000 -0.020833 0.000000 + 0.325000 -0.020833 0.000000 + 0.375000 -0.020833 0.000000 + 0.425000 -0.020833 0.000000 + 0.475000 -0.020833 0.000000 + -0.475000 0.020833 0.000000 + -0.425000 0.020833 0.000000 + -0.375000 0.020833 0.000000 + -0.325000 0.020833 0.000000 + -0.275000 0.020833 0.000000 + -0.225000 0.020833 0.000000 + -0.175000 0.020833 0.000000 + -0.125000 0.020833 0.000000 + -0.075000 0.020833 0.000000 + -0.025000 0.020833 0.000000 + 0.025000 0.020833 0.000000 + 0.075000 0.020833 0.000000 + 0.125000 0.020833 0.000000 + 0.175000 0.020833 0.000000 + 0.225000 0.020833 0.000000 + 0.275000 0.020833 0.000000 + 0.325000 0.020833 0.000000 + 0.375000 0.020833 0.000000 + 0.425000 0.020833 0.000000 + 0.475000 0.020833 0.000000 + -0.475000 0.062500 0.000000 + -0.425000 0.062500 0.000000 + -0.375000 0.062500 0.000000 + -0.325000 0.062500 0.000000 + -0.275000 0.062500 0.000000 + -0.225000 0.062500 0.000000 + -0.175000 0.062500 0.000000 + -0.125000 0.062500 0.000000 + -0.075000 0.062500 0.000000 + -0.025000 0.062500 0.000000 + 0.025000 0.062500 0.000000 + 0.075000 0.062500 0.000000 + 0.125000 0.062500 0.000000 + 0.175000 0.062500 0.000000 + 0.225000 0.062500 0.000000 + 0.275000 0.062500 0.000000 + 0.325000 0.062500 0.000000 + 0.375000 0.062500 0.000000 + 0.425000 0.062500 0.000000 + 0.475000 0.062500 0.000000 + -0.475000 0.104167 0.000000 + -0.425000 0.104167 0.000000 + -0.375000 0.104167 0.000000 + -0.325000 0.104167 0.000000 + -0.275000 0.104167 0.000000 + -0.225000 0.104167 0.000000 + -0.175000 0.104167 0.000000 + -0.125000 0.104167 0.000000 + -0.075000 0.104167 0.000000 + -0.025000 0.104167 0.000000 + 0.025000 0.104167 0.000000 + 0.075000 0.104167 0.000000 + 0.125000 0.104167 0.000000 + 0.175000 0.104167 0.000000 + 0.225000 0.104167 0.000000 + 0.275000 0.104167 0.000000 + 0.325000 0.104167 0.000000 + 0.375000 0.104167 0.000000 + 0.425000 0.104167 0.000000 + 0.475000 0.104167 0.000000 + -0.475000 0.145833 0.000000 + -0.425000 0.145833 0.000000 + -0.375000 0.145833 0.000000 + -0.325000 0.145833 0.000000 + -0.275000 0.145833 0.000000 + -0.225000 0.145833 0.000000 + -0.175000 0.145833 0.000000 + -0.125000 0.145833 0.000000 + -0.075000 0.145833 0.000000 + -0.025000 0.145833 0.000000 + 0.025000 0.145833 0.000000 + 0.075000 0.145833 0.000000 + 0.125000 0.145833 0.000000 + 0.175000 0.145833 0.000000 + 0.225000 0.145833 0.000000 + 0.275000 0.145833 0.000000 + 0.325000 0.145833 0.000000 + 0.375000 0.145833 0.000000 + 0.425000 0.145833 0.000000 + 0.475000 0.145833 0.000000 + -0.475000 0.187500 0.000000 + -0.425000 0.187500 0.000000 + -0.375000 0.187500 0.000000 + -0.325000 0.187500 0.000000 + -0.275000 0.187500 0.000000 + -0.225000 0.187500 0.000000 + -0.175000 0.187500 0.000000 + -0.125000 0.187500 0.000000 + -0.075000 0.187500 0.000000 + -0.025000 0.187500 0.000000 + 0.025000 0.187500 0.000000 + 0.075000 0.187500 0.000000 + 0.125000 0.187500 0.000000 + 0.175000 0.187500 0.000000 + 0.225000 0.187500 0.000000 + 0.275000 0.187500 0.000000 + 0.325000 0.187500 0.000000 + 0.375000 0.187500 0.000000 + 0.425000 0.187500 0.000000 + 0.475000 0.187500 0.000000 + -0.475000 0.229167 0.000000 + -0.425000 0.229167 0.000000 + -0.375000 0.229167 0.000000 + -0.325000 0.229167 0.000000 + -0.275000 0.229167 0.000000 + -0.225000 0.229167 0.000000 + -0.175000 0.229167 0.000000 + -0.125000 0.229167 0.000000 + -0.075000 0.229167 0.000000 + -0.025000 0.229167 0.000000 + 0.025000 0.229167 0.000000 + 0.075000 0.229167 0.000000 + 0.125000 0.229167 0.000000 + 0.175000 0.229167 0.000000 + 0.225000 0.229167 0.000000 + 0.275000 0.229167 0.000000 + 0.325000 0.229167 0.000000 + 0.375000 0.229167 0.000000 + 0.425000 0.229167 0.000000 + 0.475000 0.229167 0.000000 + -0.475000 0.270833 0.000000 + -0.425000 0.270833 0.000000 + -0.375000 0.270833 0.000000 + -0.325000 0.270833 0.000000 + -0.275000 0.270833 0.000000 + -0.225000 0.270833 0.000000 + -0.175000 0.270833 0.000000 + -0.125000 0.270833 0.000000 + -0.075000 0.270833 0.000000 + -0.025000 0.270833 0.000000 + 0.025000 0.270833 0.000000 + 0.075000 0.270833 0.000000 + 0.125000 0.270833 0.000000 + 0.175000 0.270833 0.000000 + 0.225000 0.270833 0.000000 + 0.275000 0.270833 0.000000 + 0.325000 0.270833 0.000000 + 0.375000 0.270833 0.000000 + 0.425000 0.270833 0.000000 + 0.475000 0.270833 0.000000 + -0.475000 0.312500 0.000000 + -0.425000 0.312500 0.000000 + -0.375000 0.312500 0.000000 + -0.325000 0.312500 0.000000 + -0.275000 0.312500 0.000000 + -0.225000 0.312500 0.000000 + -0.175000 0.312500 0.000000 + -0.125000 0.312500 0.000000 + -0.075000 0.312500 0.000000 + -0.025000 0.312500 0.000000 + 0.025000 0.312500 0.000000 + 0.075000 0.312500 0.000000 + 0.125000 0.312500 0.000000 + 0.175000 0.312500 0.000000 + 0.225000 0.312500 0.000000 + 0.275000 0.312500 0.000000 + 0.325000 0.312500 0.000000 + 0.375000 0.312500 0.000000 + 0.425000 0.312500 0.000000 + 0.475000 0.312500 0.000000 + -0.475000 0.354167 0.000000 + -0.425000 0.354167 0.000000 + -0.375000 0.354167 0.000000 + -0.325000 0.354167 0.000000 + -0.275000 0.354167 0.000000 + -0.225000 0.354167 0.000000 + -0.175000 0.354167 0.000000 + -0.125000 0.354167 0.000000 + -0.075000 0.354167 0.000000 + -0.025000 0.354167 0.000000 + 0.025000 0.354167 0.000000 + 0.075000 0.354167 0.000000 + 0.125000 0.354167 0.000000 + 0.175000 0.354167 0.000000 + 0.225000 0.354167 0.000000 + 0.275000 0.354167 0.000000 + 0.325000 0.354167 0.000000 + 0.375000 0.354167 0.000000 + 0.425000 0.354167 0.000000 + 0.475000 0.354167 0.000000 + -0.475000 0.395833 0.000000 + -0.425000 0.395833 0.000000 + -0.375000 0.395833 0.000000 + -0.325000 0.395833 0.000000 + -0.275000 0.395833 0.000000 + -0.225000 0.395833 0.000000 + -0.175000 0.395833 0.000000 + -0.125000 0.395833 0.000000 + -0.075000 0.395833 0.000000 + -0.025000 0.395833 0.000000 + 0.025000 0.395833 0.000000 + 0.075000 0.395833 0.000000 + 0.125000 0.395833 0.000000 + 0.175000 0.395833 0.000000 + 0.225000 0.395833 0.000000 + 0.275000 0.395833 0.000000 + 0.325000 0.395833 0.000000 + 0.375000 0.395833 0.000000 + 0.425000 0.395833 0.000000 + 0.475000 0.395833 0.000000 + -0.475000 0.437500 0.000000 + -0.425000 0.437500 0.000000 + -0.375000 0.437500 0.000000 + -0.325000 0.437500 0.000000 + -0.275000 0.437500 0.000000 + -0.225000 0.437500 0.000000 + -0.175000 0.437500 0.000000 + -0.125000 0.437500 0.000000 + -0.075000 0.437500 0.000000 + -0.025000 0.437500 0.000000 + 0.025000 0.437500 0.000000 + 0.075000 0.437500 0.000000 + 0.125000 0.437500 0.000000 + 0.175000 0.437500 0.000000 + 0.225000 0.437500 0.000000 + 0.275000 0.437500 0.000000 + 0.325000 0.437500 0.000000 + 0.375000 0.437500 0.000000 + 0.425000 0.437500 0.000000 + 0.475000 0.437500 0.000000 + -0.475000 0.479167 0.000000 + -0.425000 0.479167 0.000000 + -0.375000 0.479167 0.000000 + -0.325000 0.479167 0.000000 + -0.275000 0.479167 0.000000 + -0.225000 0.479167 0.000000 + -0.175000 0.479167 0.000000 + -0.125000 0.479167 0.000000 + -0.075000 0.479167 0.000000 + -0.025000 0.479167 0.000000 + 0.025000 0.479167 0.000000 + 0.075000 0.479167 0.000000 + 0.125000 0.479167 0.000000 + 0.175000 0.479167 0.000000 + 0.225000 0.479167 0.000000 + 0.275000 0.479167 0.000000 + 0.325000 0.479167 0.000000 + 0.375000 0.479167 0.000000 + 0.425000 0.479167 0.000000 + 0.475000 0.479167 0.000000 + + + + + + + + 1 0 0 .0000000000 + 0 1 0 .0000000000 + 0 0 1 .0000000000 + + + + + 5.301179702900000 .000000000000000 .000000000000000 + .000000000000000 7.497000033000000 .000000000000000 + .000000000000000 .000000000000000 13.619999999999999 + + + + + + + + + + + + + + + + + + + + + + + + + + .0000000000 .0000000000 -1.9928500088 + + + + + 1.000/2.000 1.000/2.000 .0000000000 + + + + + .0000000000 .0000000000 2.6505900117 + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.475000 -0.479167 0.000000 + -0.425000 -0.479167 0.000000 + -0.375000 -0.479167 0.000000 + -0.325000 -0.479167 0.000000 + -0.275000 -0.479167 0.000000 + -0.225000 -0.479167 0.000000 + -0.175000 -0.479167 0.000000 + -0.125000 -0.479167 0.000000 + -0.075000 -0.479167 0.000000 + -0.025000 -0.479167 0.000000 + 0.025000 -0.479167 0.000000 + 0.075000 -0.479167 0.000000 + 0.125000 -0.479167 0.000000 + 0.175000 -0.479167 0.000000 + 0.225000 -0.479167 0.000000 + 0.275000 -0.479167 0.000000 + 0.325000 -0.479167 0.000000 + 0.375000 -0.479167 0.000000 + 0.425000 -0.479167 0.000000 + 0.475000 -0.479167 0.000000 + -0.475000 -0.437500 0.000000 + -0.425000 -0.437500 0.000000 + -0.375000 -0.437500 0.000000 + -0.325000 -0.437500 0.000000 + -0.275000 -0.437500 0.000000 + -0.225000 -0.437500 0.000000 + -0.175000 -0.437500 0.000000 + -0.125000 -0.437500 0.000000 + -0.075000 -0.437500 0.000000 + -0.025000 -0.437500 0.000000 + 0.025000 -0.437500 0.000000 + 0.075000 -0.437500 0.000000 + 0.125000 -0.437500 0.000000 + 0.175000 -0.437500 0.000000 + 0.225000 -0.437500 0.000000 + 0.275000 -0.437500 0.000000 + 0.325000 -0.437500 0.000000 + 0.375000 -0.437500 0.000000 + 0.425000 -0.437500 0.000000 + 0.475000 -0.437500 0.000000 + -0.475000 -0.395833 0.000000 + -0.425000 -0.395833 0.000000 + -0.375000 -0.395833 0.000000 + -0.325000 -0.395833 0.000000 + -0.275000 -0.395833 0.000000 + -0.225000 -0.395833 0.000000 + -0.175000 -0.395833 0.000000 + -0.125000 -0.395833 0.000000 + -0.075000 -0.395833 0.000000 + -0.025000 -0.395833 0.000000 + 0.025000 -0.395833 0.000000 + 0.075000 -0.395833 0.000000 + 0.125000 -0.395833 0.000000 + 0.175000 -0.395833 0.000000 + 0.225000 -0.395833 0.000000 + 0.275000 -0.395833 0.000000 + 0.325000 -0.395833 0.000000 + 0.375000 -0.395833 0.000000 + 0.425000 -0.395833 0.000000 + 0.475000 -0.395833 0.000000 + -0.475000 -0.354167 0.000000 + -0.425000 -0.354167 0.000000 + -0.375000 -0.354167 0.000000 + -0.325000 -0.354167 0.000000 + -0.275000 -0.354167 0.000000 + -0.225000 -0.354167 0.000000 + -0.175000 -0.354167 0.000000 + -0.125000 -0.354167 0.000000 + -0.075000 -0.354167 0.000000 + -0.025000 -0.354167 0.000000 + 0.025000 -0.354167 0.000000 + 0.075000 -0.354167 0.000000 + 0.125000 -0.354167 0.000000 + 0.175000 -0.354167 0.000000 + 0.225000 -0.354167 0.000000 + 0.275000 -0.354167 0.000000 + 0.325000 -0.354167 0.000000 + 0.375000 -0.354167 0.000000 + 0.425000 -0.354167 0.000000 + 0.475000 -0.354167 0.000000 + -0.475000 -0.312500 0.000000 + -0.425000 -0.312500 0.000000 + -0.375000 -0.312500 0.000000 + -0.325000 -0.312500 0.000000 + -0.275000 -0.312500 0.000000 + -0.225000 -0.312500 0.000000 + -0.175000 -0.312500 0.000000 + -0.125000 -0.312500 0.000000 + -0.075000 -0.312500 0.000000 + -0.025000 -0.312500 0.000000 + 0.025000 -0.312500 0.000000 + 0.075000 -0.312500 0.000000 + 0.125000 -0.312500 0.000000 + 0.175000 -0.312500 0.000000 + 0.225000 -0.312500 0.000000 + 0.275000 -0.312500 0.000000 + 0.325000 -0.312500 0.000000 + 0.375000 -0.312500 0.000000 + 0.425000 -0.312500 0.000000 + 0.475000 -0.312500 0.000000 + -0.475000 -0.270833 0.000000 + -0.425000 -0.270833 0.000000 + -0.375000 -0.270833 0.000000 + -0.325000 -0.270833 0.000000 + -0.275000 -0.270833 0.000000 + -0.225000 -0.270833 0.000000 + -0.175000 -0.270833 0.000000 + -0.125000 -0.270833 0.000000 + -0.075000 -0.270833 0.000000 + -0.025000 -0.270833 0.000000 + 0.025000 -0.270833 0.000000 + 0.075000 -0.270833 0.000000 + 0.125000 -0.270833 0.000000 + 0.175000 -0.270833 0.000000 + 0.225000 -0.270833 0.000000 + 0.275000 -0.270833 0.000000 + 0.325000 -0.270833 0.000000 + 0.375000 -0.270833 0.000000 + 0.425000 -0.270833 0.000000 + 0.475000 -0.270833 0.000000 + -0.475000 -0.229167 0.000000 + -0.425000 -0.229167 0.000000 + -0.375000 -0.229167 0.000000 + -0.325000 -0.229167 0.000000 + -0.275000 -0.229167 0.000000 + -0.225000 -0.229167 0.000000 + -0.175000 -0.229167 0.000000 + -0.125000 -0.229167 0.000000 + -0.075000 -0.229167 0.000000 + -0.025000 -0.229167 0.000000 + 0.025000 -0.229167 0.000000 + 0.075000 -0.229167 0.000000 + 0.125000 -0.229167 0.000000 + 0.175000 -0.229167 0.000000 + 0.225000 -0.229167 0.000000 + 0.275000 -0.229167 0.000000 + 0.325000 -0.229167 0.000000 + 0.375000 -0.229167 0.000000 + 0.425000 -0.229167 0.000000 + 0.475000 -0.229167 0.000000 + -0.475000 -0.187500 0.000000 + -0.425000 -0.187500 0.000000 + -0.375000 -0.187500 0.000000 + -0.325000 -0.187500 0.000000 + -0.275000 -0.187500 0.000000 + -0.225000 -0.187500 0.000000 + -0.175000 -0.187500 0.000000 + -0.125000 -0.187500 0.000000 + -0.075000 -0.187500 0.000000 + -0.025000 -0.187500 0.000000 + 0.025000 -0.187500 0.000000 + 0.075000 -0.187500 0.000000 + 0.125000 -0.187500 0.000000 + 0.175000 -0.187500 0.000000 + 0.225000 -0.187500 0.000000 + 0.275000 -0.187500 0.000000 + 0.325000 -0.187500 0.000000 + 0.375000 -0.187500 0.000000 + 0.425000 -0.187500 0.000000 + 0.475000 -0.187500 0.000000 + -0.475000 -0.145833 0.000000 + -0.425000 -0.145833 0.000000 + -0.375000 -0.145833 0.000000 + -0.325000 -0.145833 0.000000 + -0.275000 -0.145833 0.000000 + -0.225000 -0.145833 0.000000 + -0.175000 -0.145833 0.000000 + -0.125000 -0.145833 0.000000 + -0.075000 -0.145833 0.000000 + -0.025000 -0.145833 0.000000 + 0.025000 -0.145833 0.000000 + 0.075000 -0.145833 0.000000 + 0.125000 -0.145833 0.000000 + 0.175000 -0.145833 0.000000 + 0.225000 -0.145833 0.000000 + 0.275000 -0.145833 0.000000 + 0.325000 -0.145833 0.000000 + 0.375000 -0.145833 0.000000 + 0.425000 -0.145833 0.000000 + 0.475000 -0.145833 0.000000 + -0.475000 -0.104167 0.000000 + -0.425000 -0.104167 0.000000 + -0.375000 -0.104167 0.000000 + -0.325000 -0.104167 0.000000 + -0.275000 -0.104167 0.000000 + -0.225000 -0.104167 0.000000 + -0.175000 -0.104167 0.000000 + -0.125000 -0.104167 0.000000 + -0.075000 -0.104167 0.000000 + -0.025000 -0.104167 0.000000 + 0.025000 -0.104167 0.000000 + 0.075000 -0.104167 0.000000 + 0.125000 -0.104167 0.000000 + 0.175000 -0.104167 0.000000 + 0.225000 -0.104167 0.000000 + 0.275000 -0.104167 0.000000 + 0.325000 -0.104167 0.000000 + 0.375000 -0.104167 0.000000 + 0.425000 -0.104167 0.000000 + 0.475000 -0.104167 0.000000 + -0.475000 -0.062500 0.000000 + -0.425000 -0.062500 0.000000 + -0.375000 -0.062500 0.000000 + -0.325000 -0.062500 0.000000 + -0.275000 -0.062500 0.000000 + -0.225000 -0.062500 0.000000 + -0.175000 -0.062500 0.000000 + -0.125000 -0.062500 0.000000 + -0.075000 -0.062500 0.000000 + -0.025000 -0.062500 0.000000 + 0.025000 -0.062500 0.000000 + 0.075000 -0.062500 0.000000 + 0.125000 -0.062500 0.000000 + 0.175000 -0.062500 0.000000 + 0.225000 -0.062500 0.000000 + 0.275000 -0.062500 0.000000 + 0.325000 -0.062500 0.000000 + 0.375000 -0.062500 0.000000 + 0.425000 -0.062500 0.000000 + 0.475000 -0.062500 0.000000 + -0.475000 -0.020833 0.000000 + -0.425000 -0.020833 0.000000 + -0.375000 -0.020833 0.000000 + -0.325000 -0.020833 0.000000 + -0.275000 -0.020833 0.000000 + -0.225000 -0.020833 0.000000 + -0.175000 -0.020833 0.000000 + -0.125000 -0.020833 0.000000 + -0.075000 -0.020833 0.000000 + -0.025000 -0.020833 0.000000 + 0.025000 -0.020833 0.000000 + 0.075000 -0.020833 0.000000 + 0.125000 -0.020833 0.000000 + 0.175000 -0.020833 0.000000 + 0.225000 -0.020833 0.000000 + 0.275000 -0.020833 0.000000 + 0.325000 -0.020833 0.000000 + 0.375000 -0.020833 0.000000 + 0.425000 -0.020833 0.000000 + 0.475000 -0.020833 0.000000 + -0.475000 0.020833 0.000000 + -0.425000 0.020833 0.000000 + -0.375000 0.020833 0.000000 + -0.325000 0.020833 0.000000 + -0.275000 0.020833 0.000000 + -0.225000 0.020833 0.000000 + -0.175000 0.020833 0.000000 + -0.125000 0.020833 0.000000 + -0.075000 0.020833 0.000000 + -0.025000 0.020833 0.000000 + 0.025000 0.020833 0.000000 + 0.075000 0.020833 0.000000 + 0.125000 0.020833 0.000000 + 0.175000 0.020833 0.000000 + 0.225000 0.020833 0.000000 + 0.275000 0.020833 0.000000 + 0.325000 0.020833 0.000000 + 0.375000 0.020833 0.000000 + 0.425000 0.020833 0.000000 + 0.475000 0.020833 0.000000 + -0.475000 0.062500 0.000000 + -0.425000 0.062500 0.000000 + -0.375000 0.062500 0.000000 + -0.325000 0.062500 0.000000 + -0.275000 0.062500 0.000000 + -0.225000 0.062500 0.000000 + -0.175000 0.062500 0.000000 + -0.125000 0.062500 0.000000 + -0.075000 0.062500 0.000000 + -0.025000 0.062500 0.000000 + 0.025000 0.062500 0.000000 + 0.075000 0.062500 0.000000 + 0.125000 0.062500 0.000000 + 0.175000 0.062500 0.000000 + 0.225000 0.062500 0.000000 + 0.275000 0.062500 0.000000 + 0.325000 0.062500 0.000000 + 0.375000 0.062500 0.000000 + 0.425000 0.062500 0.000000 + 0.475000 0.062500 0.000000 + -0.475000 0.104167 0.000000 + -0.425000 0.104167 0.000000 + -0.375000 0.104167 0.000000 + -0.325000 0.104167 0.000000 + -0.275000 0.104167 0.000000 + -0.225000 0.104167 0.000000 + -0.175000 0.104167 0.000000 + -0.125000 0.104167 0.000000 + -0.075000 0.104167 0.000000 + -0.025000 0.104167 0.000000 + 0.025000 0.104167 0.000000 + 0.075000 0.104167 0.000000 + 0.125000 0.104167 0.000000 + 0.175000 0.104167 0.000000 + 0.225000 0.104167 0.000000 + 0.275000 0.104167 0.000000 + 0.325000 0.104167 0.000000 + 0.375000 0.104167 0.000000 + 0.425000 0.104167 0.000000 + 0.475000 0.104167 0.000000 + -0.475000 0.145833 0.000000 + -0.425000 0.145833 0.000000 + -0.375000 0.145833 0.000000 + -0.325000 0.145833 0.000000 + -0.275000 0.145833 0.000000 + -0.225000 0.145833 0.000000 + -0.175000 0.145833 0.000000 + -0.125000 0.145833 0.000000 + -0.075000 0.145833 0.000000 + -0.025000 0.145833 0.000000 + 0.025000 0.145833 0.000000 + 0.075000 0.145833 0.000000 + 0.125000 0.145833 0.000000 + 0.175000 0.145833 0.000000 + 0.225000 0.145833 0.000000 + 0.275000 0.145833 0.000000 + 0.325000 0.145833 0.000000 + 0.375000 0.145833 0.000000 + 0.425000 0.145833 0.000000 + 0.475000 0.145833 0.000000 + -0.475000 0.187500 0.000000 + -0.425000 0.187500 0.000000 + -0.375000 0.187500 0.000000 + -0.325000 0.187500 0.000000 + -0.275000 0.187500 0.000000 + -0.225000 0.187500 0.000000 + -0.175000 0.187500 0.000000 + -0.125000 0.187500 0.000000 + -0.075000 0.187500 0.000000 + -0.025000 0.187500 0.000000 + 0.025000 0.187500 0.000000 + 0.075000 0.187500 0.000000 + 0.125000 0.187500 0.000000 + 0.175000 0.187500 0.000000 + 0.225000 0.187500 0.000000 + 0.275000 0.187500 0.000000 + 0.325000 0.187500 0.000000 + 0.375000 0.187500 0.000000 + 0.425000 0.187500 0.000000 + 0.475000 0.187500 0.000000 + -0.475000 0.229167 0.000000 + -0.425000 0.229167 0.000000 + -0.375000 0.229167 0.000000 + -0.325000 0.229167 0.000000 + -0.275000 0.229167 0.000000 + -0.225000 0.229167 0.000000 + -0.175000 0.229167 0.000000 + -0.125000 0.229167 0.000000 + -0.075000 0.229167 0.000000 + -0.025000 0.229167 0.000000 + 0.025000 0.229167 0.000000 + 0.075000 0.229167 0.000000 + 0.125000 0.229167 0.000000 + 0.175000 0.229167 0.000000 + 0.225000 0.229167 0.000000 + 0.275000 0.229167 0.000000 + 0.325000 0.229167 0.000000 + 0.375000 0.229167 0.000000 + 0.425000 0.229167 0.000000 + 0.475000 0.229167 0.000000 + -0.475000 0.270833 0.000000 + -0.425000 0.270833 0.000000 + -0.375000 0.270833 0.000000 + -0.325000 0.270833 0.000000 + -0.275000 0.270833 0.000000 + -0.225000 0.270833 0.000000 + -0.175000 0.270833 0.000000 + -0.125000 0.270833 0.000000 + -0.075000 0.270833 0.000000 + -0.025000 0.270833 0.000000 + 0.025000 0.270833 0.000000 + 0.075000 0.270833 0.000000 + 0.125000 0.270833 0.000000 + 0.175000 0.270833 0.000000 + 0.225000 0.270833 0.000000 + 0.275000 0.270833 0.000000 + 0.325000 0.270833 0.000000 + 0.375000 0.270833 0.000000 + 0.425000 0.270833 0.000000 + 0.475000 0.270833 0.000000 + -0.475000 0.312500 0.000000 + -0.425000 0.312500 0.000000 + -0.375000 0.312500 0.000000 + -0.325000 0.312500 0.000000 + -0.275000 0.312500 0.000000 + -0.225000 0.312500 0.000000 + -0.175000 0.312500 0.000000 + -0.125000 0.312500 0.000000 + -0.075000 0.312500 0.000000 + -0.025000 0.312500 0.000000 + 0.025000 0.312500 0.000000 + 0.075000 0.312500 0.000000 + 0.125000 0.312500 0.000000 + 0.175000 0.312500 0.000000 + 0.225000 0.312500 0.000000 + 0.275000 0.312500 0.000000 + 0.325000 0.312500 0.000000 + 0.375000 0.312500 0.000000 + 0.425000 0.312500 0.000000 + 0.475000 0.312500 0.000000 + -0.475000 0.354167 0.000000 + -0.425000 0.354167 0.000000 + -0.375000 0.354167 0.000000 + -0.325000 0.354167 0.000000 + -0.275000 0.354167 0.000000 + -0.225000 0.354167 0.000000 + -0.175000 0.354167 0.000000 + -0.125000 0.354167 0.000000 + -0.075000 0.354167 0.000000 + -0.025000 0.354167 0.000000 + 0.025000 0.354167 0.000000 + 0.075000 0.354167 0.000000 + 0.125000 0.354167 0.000000 + 0.175000 0.354167 0.000000 + 0.225000 0.354167 0.000000 + 0.275000 0.354167 0.000000 + 0.325000 0.354167 0.000000 + 0.375000 0.354167 0.000000 + 0.425000 0.354167 0.000000 + 0.475000 0.354167 0.000000 + -0.475000 0.395833 0.000000 + -0.425000 0.395833 0.000000 + -0.375000 0.395833 0.000000 + -0.325000 0.395833 0.000000 + -0.275000 0.395833 0.000000 + -0.225000 0.395833 0.000000 + -0.175000 0.395833 0.000000 + -0.125000 0.395833 0.000000 + -0.075000 0.395833 0.000000 + -0.025000 0.395833 0.000000 + 0.025000 0.395833 0.000000 + 0.075000 0.395833 0.000000 + 0.125000 0.395833 0.000000 + 0.175000 0.395833 0.000000 + 0.225000 0.395833 0.000000 + 0.275000 0.395833 0.000000 + 0.325000 0.395833 0.000000 + 0.375000 0.395833 0.000000 + 0.425000 0.395833 0.000000 + 0.475000 0.395833 0.000000 + -0.475000 0.437500 0.000000 + -0.425000 0.437500 0.000000 + -0.375000 0.437500 0.000000 + -0.325000 0.437500 0.000000 + -0.275000 0.437500 0.000000 + -0.225000 0.437500 0.000000 + -0.175000 0.437500 0.000000 + -0.125000 0.437500 0.000000 + -0.075000 0.437500 0.000000 + -0.025000 0.437500 0.000000 + 0.025000 0.437500 0.000000 + 0.075000 0.437500 0.000000 + 0.125000 0.437500 0.000000 + 0.175000 0.437500 0.000000 + 0.225000 0.437500 0.000000 + 0.275000 0.437500 0.000000 + 0.325000 0.437500 0.000000 + 0.375000 0.437500 0.000000 + 0.425000 0.437500 0.000000 + 0.475000 0.437500 0.000000 + -0.475000 0.479167 0.000000 + -0.425000 0.479167 0.000000 + -0.375000 0.479167 0.000000 + -0.325000 0.479167 0.000000 + -0.275000 0.479167 0.000000 + -0.225000 0.479167 0.000000 + -0.175000 0.479167 0.000000 + -0.125000 0.479167 0.000000 + -0.075000 0.479167 0.000000 + -0.025000 0.479167 0.000000 + 0.025000 0.479167 0.000000 + 0.075000 0.479167 0.000000 + 0.125000 0.479167 0.000000 + 0.175000 0.479167 0.000000 + 0.225000 0.479167 0.000000 + 0.275000 0.479167 0.000000 + 0.325000 0.479167 0.000000 + 0.375000 0.479167 0.000000 + 0.425000 0.479167 0.000000 + 0.475000 0.479167 0.000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/aiida_fleur/tests/files/outxml/all_test/ssdisp_FT_out.xml b/aiida_fleur/tests/files/outxml/all_test/ssdisp_FT_out.xml new file mode 100644 index 000000000..565bf84e1 --- /dev/null +++ b/aiida_fleur/tests/files/outxml/all_test/ssdisp_FT_out.xml @@ -0,0 +1,1317 @@ + + + + + + GEN + + + CPP_MPI CPP_HDF + + + + + + + + + + A Fleur input generator calculation with aiida + + + + + + + + + + .0000000000 .0000000000 .0000000000 + + + + + + + -0.475000 -0.479167 0.000000 + -0.425000 -0.479167 0.000000 + -0.375000 -0.479167 0.000000 + -0.325000 -0.479167 0.000000 + -0.275000 -0.479167 0.000000 + -0.225000 -0.479167 0.000000 + -0.175000 -0.479167 0.000000 + -0.125000 -0.479167 0.000000 + -0.075000 -0.479167 0.000000 + -0.025000 -0.479167 0.000000 + 0.025000 -0.479167 0.000000 + 0.075000 -0.479167 0.000000 + 0.125000 -0.479167 0.000000 + 0.175000 -0.479167 0.000000 + 0.225000 -0.479167 0.000000 + 0.275000 -0.479167 0.000000 + 0.325000 -0.479167 0.000000 + 0.375000 -0.479167 0.000000 + 0.425000 -0.479167 0.000000 + 0.475000 -0.479167 0.000000 + -0.475000 -0.437500 0.000000 + -0.425000 -0.437500 0.000000 + -0.375000 -0.437500 0.000000 + -0.325000 -0.437500 0.000000 + -0.275000 -0.437500 0.000000 + -0.225000 -0.437500 0.000000 + -0.175000 -0.437500 0.000000 + -0.125000 -0.437500 0.000000 + -0.075000 -0.437500 0.000000 + -0.025000 -0.437500 0.000000 + 0.025000 -0.437500 0.000000 + 0.075000 -0.437500 0.000000 + 0.125000 -0.437500 0.000000 + 0.175000 -0.437500 0.000000 + 0.225000 -0.437500 0.000000 + 0.275000 -0.437500 0.000000 + 0.325000 -0.437500 0.000000 + 0.375000 -0.437500 0.000000 + 0.425000 -0.437500 0.000000 + 0.475000 -0.437500 0.000000 + -0.475000 -0.395833 0.000000 + -0.425000 -0.395833 0.000000 + -0.375000 -0.395833 0.000000 + -0.325000 -0.395833 0.000000 + -0.275000 -0.395833 0.000000 + -0.225000 -0.395833 0.000000 + -0.175000 -0.395833 0.000000 + -0.125000 -0.395833 0.000000 + -0.075000 -0.395833 0.000000 + -0.025000 -0.395833 0.000000 + 0.025000 -0.395833 0.000000 + 0.075000 -0.395833 0.000000 + 0.125000 -0.395833 0.000000 + 0.175000 -0.395833 0.000000 + 0.225000 -0.395833 0.000000 + 0.275000 -0.395833 0.000000 + 0.325000 -0.395833 0.000000 + 0.375000 -0.395833 0.000000 + 0.425000 -0.395833 0.000000 + 0.475000 -0.395833 0.000000 + -0.475000 -0.354167 0.000000 + -0.425000 -0.354167 0.000000 + -0.375000 -0.354167 0.000000 + -0.325000 -0.354167 0.000000 + -0.275000 -0.354167 0.000000 + -0.225000 -0.354167 0.000000 + -0.175000 -0.354167 0.000000 + -0.125000 -0.354167 0.000000 + -0.075000 -0.354167 0.000000 + -0.025000 -0.354167 0.000000 + 0.025000 -0.354167 0.000000 + 0.075000 -0.354167 0.000000 + 0.125000 -0.354167 0.000000 + 0.175000 -0.354167 0.000000 + 0.225000 -0.354167 0.000000 + 0.275000 -0.354167 0.000000 + 0.325000 -0.354167 0.000000 + 0.375000 -0.354167 0.000000 + 0.425000 -0.354167 0.000000 + 0.475000 -0.354167 0.000000 + -0.475000 -0.312500 0.000000 + -0.425000 -0.312500 0.000000 + -0.375000 -0.312500 0.000000 + -0.325000 -0.312500 0.000000 + -0.275000 -0.312500 0.000000 + -0.225000 -0.312500 0.000000 + -0.175000 -0.312500 0.000000 + -0.125000 -0.312500 0.000000 + -0.075000 -0.312500 0.000000 + -0.025000 -0.312500 0.000000 + 0.025000 -0.312500 0.000000 + 0.075000 -0.312500 0.000000 + 0.125000 -0.312500 0.000000 + 0.175000 -0.312500 0.000000 + 0.225000 -0.312500 0.000000 + 0.275000 -0.312500 0.000000 + 0.325000 -0.312500 0.000000 + 0.375000 -0.312500 0.000000 + 0.425000 -0.312500 0.000000 + 0.475000 -0.312500 0.000000 + -0.475000 -0.270833 0.000000 + -0.425000 -0.270833 0.000000 + -0.375000 -0.270833 0.000000 + -0.325000 -0.270833 0.000000 + -0.275000 -0.270833 0.000000 + -0.225000 -0.270833 0.000000 + -0.175000 -0.270833 0.000000 + -0.125000 -0.270833 0.000000 + -0.075000 -0.270833 0.000000 + -0.025000 -0.270833 0.000000 + 0.025000 -0.270833 0.000000 + 0.075000 -0.270833 0.000000 + 0.125000 -0.270833 0.000000 + 0.175000 -0.270833 0.000000 + 0.225000 -0.270833 0.000000 + 0.275000 -0.270833 0.000000 + 0.325000 -0.270833 0.000000 + 0.375000 -0.270833 0.000000 + 0.425000 -0.270833 0.000000 + 0.475000 -0.270833 0.000000 + -0.475000 -0.229167 0.000000 + -0.425000 -0.229167 0.000000 + -0.375000 -0.229167 0.000000 + -0.325000 -0.229167 0.000000 + -0.275000 -0.229167 0.000000 + -0.225000 -0.229167 0.000000 + -0.175000 -0.229167 0.000000 + -0.125000 -0.229167 0.000000 + -0.075000 -0.229167 0.000000 + -0.025000 -0.229167 0.000000 + 0.025000 -0.229167 0.000000 + 0.075000 -0.229167 0.000000 + 0.125000 -0.229167 0.000000 + 0.175000 -0.229167 0.000000 + 0.225000 -0.229167 0.000000 + 0.275000 -0.229167 0.000000 + 0.325000 -0.229167 0.000000 + 0.375000 -0.229167 0.000000 + 0.425000 -0.229167 0.000000 + 0.475000 -0.229167 0.000000 + -0.475000 -0.187500 0.000000 + -0.425000 -0.187500 0.000000 + -0.375000 -0.187500 0.000000 + -0.325000 -0.187500 0.000000 + -0.275000 -0.187500 0.000000 + -0.225000 -0.187500 0.000000 + -0.175000 -0.187500 0.000000 + -0.125000 -0.187500 0.000000 + -0.075000 -0.187500 0.000000 + -0.025000 -0.187500 0.000000 + 0.025000 -0.187500 0.000000 + 0.075000 -0.187500 0.000000 + 0.125000 -0.187500 0.000000 + 0.175000 -0.187500 0.000000 + 0.225000 -0.187500 0.000000 + 0.275000 -0.187500 0.000000 + 0.325000 -0.187500 0.000000 + 0.375000 -0.187500 0.000000 + 0.425000 -0.187500 0.000000 + 0.475000 -0.187500 0.000000 + -0.475000 -0.145833 0.000000 + -0.425000 -0.145833 0.000000 + -0.375000 -0.145833 0.000000 + -0.325000 -0.145833 0.000000 + -0.275000 -0.145833 0.000000 + -0.225000 -0.145833 0.000000 + -0.175000 -0.145833 0.000000 + -0.125000 -0.145833 0.000000 + -0.075000 -0.145833 0.000000 + -0.025000 -0.145833 0.000000 + 0.025000 -0.145833 0.000000 + 0.075000 -0.145833 0.000000 + 0.125000 -0.145833 0.000000 + 0.175000 -0.145833 0.000000 + 0.225000 -0.145833 0.000000 + 0.275000 -0.145833 0.000000 + 0.325000 -0.145833 0.000000 + 0.375000 -0.145833 0.000000 + 0.425000 -0.145833 0.000000 + 0.475000 -0.145833 0.000000 + -0.475000 -0.104167 0.000000 + -0.425000 -0.104167 0.000000 + -0.375000 -0.104167 0.000000 + -0.325000 -0.104167 0.000000 + -0.275000 -0.104167 0.000000 + -0.225000 -0.104167 0.000000 + -0.175000 -0.104167 0.000000 + -0.125000 -0.104167 0.000000 + -0.075000 -0.104167 0.000000 + -0.025000 -0.104167 0.000000 + 0.025000 -0.104167 0.000000 + 0.075000 -0.104167 0.000000 + 0.125000 -0.104167 0.000000 + 0.175000 -0.104167 0.000000 + 0.225000 -0.104167 0.000000 + 0.275000 -0.104167 0.000000 + 0.325000 -0.104167 0.000000 + 0.375000 -0.104167 0.000000 + 0.425000 -0.104167 0.000000 + 0.475000 -0.104167 0.000000 + -0.475000 -0.062500 0.000000 + -0.425000 -0.062500 0.000000 + -0.375000 -0.062500 0.000000 + -0.325000 -0.062500 0.000000 + -0.275000 -0.062500 0.000000 + -0.225000 -0.062500 0.000000 + -0.175000 -0.062500 0.000000 + -0.125000 -0.062500 0.000000 + -0.075000 -0.062500 0.000000 + -0.025000 -0.062500 0.000000 + 0.025000 -0.062500 0.000000 + 0.075000 -0.062500 0.000000 + 0.125000 -0.062500 0.000000 + 0.175000 -0.062500 0.000000 + 0.225000 -0.062500 0.000000 + 0.275000 -0.062500 0.000000 + 0.325000 -0.062500 0.000000 + 0.375000 -0.062500 0.000000 + 0.425000 -0.062500 0.000000 + 0.475000 -0.062500 0.000000 + -0.475000 -0.020833 0.000000 + -0.425000 -0.020833 0.000000 + -0.375000 -0.020833 0.000000 + -0.325000 -0.020833 0.000000 + -0.275000 -0.020833 0.000000 + -0.225000 -0.020833 0.000000 + -0.175000 -0.020833 0.000000 + -0.125000 -0.020833 0.000000 + -0.075000 -0.020833 0.000000 + -0.025000 -0.020833 0.000000 + 0.025000 -0.020833 0.000000 + 0.075000 -0.020833 0.000000 + 0.125000 -0.020833 0.000000 + 0.175000 -0.020833 0.000000 + 0.225000 -0.020833 0.000000 + 0.275000 -0.020833 0.000000 + 0.325000 -0.020833 0.000000 + 0.375000 -0.020833 0.000000 + 0.425000 -0.020833 0.000000 + 0.475000 -0.020833 0.000000 + -0.475000 0.020833 0.000000 + -0.425000 0.020833 0.000000 + -0.375000 0.020833 0.000000 + -0.325000 0.020833 0.000000 + -0.275000 0.020833 0.000000 + -0.225000 0.020833 0.000000 + -0.175000 0.020833 0.000000 + -0.125000 0.020833 0.000000 + -0.075000 0.020833 0.000000 + -0.025000 0.020833 0.000000 + 0.025000 0.020833 0.000000 + 0.075000 0.020833 0.000000 + 0.125000 0.020833 0.000000 + 0.175000 0.020833 0.000000 + 0.225000 0.020833 0.000000 + 0.275000 0.020833 0.000000 + 0.325000 0.020833 0.000000 + 0.375000 0.020833 0.000000 + 0.425000 0.020833 0.000000 + 0.475000 0.020833 0.000000 + -0.475000 0.062500 0.000000 + -0.425000 0.062500 0.000000 + -0.375000 0.062500 0.000000 + -0.325000 0.062500 0.000000 + -0.275000 0.062500 0.000000 + -0.225000 0.062500 0.000000 + -0.175000 0.062500 0.000000 + -0.125000 0.062500 0.000000 + -0.075000 0.062500 0.000000 + -0.025000 0.062500 0.000000 + 0.025000 0.062500 0.000000 + 0.075000 0.062500 0.000000 + 0.125000 0.062500 0.000000 + 0.175000 0.062500 0.000000 + 0.225000 0.062500 0.000000 + 0.275000 0.062500 0.000000 + 0.325000 0.062500 0.000000 + 0.375000 0.062500 0.000000 + 0.425000 0.062500 0.000000 + 0.475000 0.062500 0.000000 + -0.475000 0.104167 0.000000 + -0.425000 0.104167 0.000000 + -0.375000 0.104167 0.000000 + -0.325000 0.104167 0.000000 + -0.275000 0.104167 0.000000 + -0.225000 0.104167 0.000000 + -0.175000 0.104167 0.000000 + -0.125000 0.104167 0.000000 + -0.075000 0.104167 0.000000 + -0.025000 0.104167 0.000000 + 0.025000 0.104167 0.000000 + 0.075000 0.104167 0.000000 + 0.125000 0.104167 0.000000 + 0.175000 0.104167 0.000000 + 0.225000 0.104167 0.000000 + 0.275000 0.104167 0.000000 + 0.325000 0.104167 0.000000 + 0.375000 0.104167 0.000000 + 0.425000 0.104167 0.000000 + 0.475000 0.104167 0.000000 + -0.475000 0.145833 0.000000 + -0.425000 0.145833 0.000000 + -0.375000 0.145833 0.000000 + -0.325000 0.145833 0.000000 + -0.275000 0.145833 0.000000 + -0.225000 0.145833 0.000000 + -0.175000 0.145833 0.000000 + -0.125000 0.145833 0.000000 + -0.075000 0.145833 0.000000 + -0.025000 0.145833 0.000000 + 0.025000 0.145833 0.000000 + 0.075000 0.145833 0.000000 + 0.125000 0.145833 0.000000 + 0.175000 0.145833 0.000000 + 0.225000 0.145833 0.000000 + 0.275000 0.145833 0.000000 + 0.325000 0.145833 0.000000 + 0.375000 0.145833 0.000000 + 0.425000 0.145833 0.000000 + 0.475000 0.145833 0.000000 + -0.475000 0.187500 0.000000 + -0.425000 0.187500 0.000000 + -0.375000 0.187500 0.000000 + -0.325000 0.187500 0.000000 + -0.275000 0.187500 0.000000 + -0.225000 0.187500 0.000000 + -0.175000 0.187500 0.000000 + -0.125000 0.187500 0.000000 + -0.075000 0.187500 0.000000 + -0.025000 0.187500 0.000000 + 0.025000 0.187500 0.000000 + 0.075000 0.187500 0.000000 + 0.125000 0.187500 0.000000 + 0.175000 0.187500 0.000000 + 0.225000 0.187500 0.000000 + 0.275000 0.187500 0.000000 + 0.325000 0.187500 0.000000 + 0.375000 0.187500 0.000000 + 0.425000 0.187500 0.000000 + 0.475000 0.187500 0.000000 + -0.475000 0.229167 0.000000 + -0.425000 0.229167 0.000000 + -0.375000 0.229167 0.000000 + -0.325000 0.229167 0.000000 + -0.275000 0.229167 0.000000 + -0.225000 0.229167 0.000000 + -0.175000 0.229167 0.000000 + -0.125000 0.229167 0.000000 + -0.075000 0.229167 0.000000 + -0.025000 0.229167 0.000000 + 0.025000 0.229167 0.000000 + 0.075000 0.229167 0.000000 + 0.125000 0.229167 0.000000 + 0.175000 0.229167 0.000000 + 0.225000 0.229167 0.000000 + 0.275000 0.229167 0.000000 + 0.325000 0.229167 0.000000 + 0.375000 0.229167 0.000000 + 0.425000 0.229167 0.000000 + 0.475000 0.229167 0.000000 + -0.475000 0.270833 0.000000 + -0.425000 0.270833 0.000000 + -0.375000 0.270833 0.000000 + -0.325000 0.270833 0.000000 + -0.275000 0.270833 0.000000 + -0.225000 0.270833 0.000000 + -0.175000 0.270833 0.000000 + -0.125000 0.270833 0.000000 + -0.075000 0.270833 0.000000 + -0.025000 0.270833 0.000000 + 0.025000 0.270833 0.000000 + 0.075000 0.270833 0.000000 + 0.125000 0.270833 0.000000 + 0.175000 0.270833 0.000000 + 0.225000 0.270833 0.000000 + 0.275000 0.270833 0.000000 + 0.325000 0.270833 0.000000 + 0.375000 0.270833 0.000000 + 0.425000 0.270833 0.000000 + 0.475000 0.270833 0.000000 + -0.475000 0.312500 0.000000 + -0.425000 0.312500 0.000000 + -0.375000 0.312500 0.000000 + -0.325000 0.312500 0.000000 + -0.275000 0.312500 0.000000 + -0.225000 0.312500 0.000000 + -0.175000 0.312500 0.000000 + -0.125000 0.312500 0.000000 + -0.075000 0.312500 0.000000 + -0.025000 0.312500 0.000000 + 0.025000 0.312500 0.000000 + 0.075000 0.312500 0.000000 + 0.125000 0.312500 0.000000 + 0.175000 0.312500 0.000000 + 0.225000 0.312500 0.000000 + 0.275000 0.312500 0.000000 + 0.325000 0.312500 0.000000 + 0.375000 0.312500 0.000000 + 0.425000 0.312500 0.000000 + 0.475000 0.312500 0.000000 + -0.475000 0.354167 0.000000 + -0.425000 0.354167 0.000000 + -0.375000 0.354167 0.000000 + -0.325000 0.354167 0.000000 + -0.275000 0.354167 0.000000 + -0.225000 0.354167 0.000000 + -0.175000 0.354167 0.000000 + -0.125000 0.354167 0.000000 + -0.075000 0.354167 0.000000 + -0.025000 0.354167 0.000000 + 0.025000 0.354167 0.000000 + 0.075000 0.354167 0.000000 + 0.125000 0.354167 0.000000 + 0.175000 0.354167 0.000000 + 0.225000 0.354167 0.000000 + 0.275000 0.354167 0.000000 + 0.325000 0.354167 0.000000 + 0.375000 0.354167 0.000000 + 0.425000 0.354167 0.000000 + 0.475000 0.354167 0.000000 + -0.475000 0.395833 0.000000 + -0.425000 0.395833 0.000000 + -0.375000 0.395833 0.000000 + -0.325000 0.395833 0.000000 + -0.275000 0.395833 0.000000 + -0.225000 0.395833 0.000000 + -0.175000 0.395833 0.000000 + -0.125000 0.395833 0.000000 + -0.075000 0.395833 0.000000 + -0.025000 0.395833 0.000000 + 0.025000 0.395833 0.000000 + 0.075000 0.395833 0.000000 + 0.125000 0.395833 0.000000 + 0.175000 0.395833 0.000000 + 0.225000 0.395833 0.000000 + 0.275000 0.395833 0.000000 + 0.325000 0.395833 0.000000 + 0.375000 0.395833 0.000000 + 0.425000 0.395833 0.000000 + 0.475000 0.395833 0.000000 + -0.475000 0.437500 0.000000 + -0.425000 0.437500 0.000000 + -0.375000 0.437500 0.000000 + -0.325000 0.437500 0.000000 + -0.275000 0.437500 0.000000 + -0.225000 0.437500 0.000000 + -0.175000 0.437500 0.000000 + -0.125000 0.437500 0.000000 + -0.075000 0.437500 0.000000 + -0.025000 0.437500 0.000000 + 0.025000 0.437500 0.000000 + 0.075000 0.437500 0.000000 + 0.125000 0.437500 0.000000 + 0.175000 0.437500 0.000000 + 0.225000 0.437500 0.000000 + 0.275000 0.437500 0.000000 + 0.325000 0.437500 0.000000 + 0.375000 0.437500 0.000000 + 0.425000 0.437500 0.000000 + 0.475000 0.437500 0.000000 + -0.475000 0.479167 0.000000 + -0.425000 0.479167 0.000000 + -0.375000 0.479167 0.000000 + -0.325000 0.479167 0.000000 + -0.275000 0.479167 0.000000 + -0.225000 0.479167 0.000000 + -0.175000 0.479167 0.000000 + -0.125000 0.479167 0.000000 + -0.075000 0.479167 0.000000 + -0.025000 0.479167 0.000000 + 0.025000 0.479167 0.000000 + 0.075000 0.479167 0.000000 + 0.125000 0.479167 0.000000 + 0.175000 0.479167 0.000000 + 0.225000 0.479167 0.000000 + 0.275000 0.479167 0.000000 + 0.325000 0.479167 0.000000 + 0.375000 0.479167 0.000000 + 0.425000 0.479167 0.000000 + 0.475000 0.479167 0.000000 + + + + + + + + 1 0 0 .0000000000 + 0 1 0 .0000000000 + 0 0 1 .0000000000 + + + + + 5.301179702900000 .000000000000000 .000000000000000 + .000000000000000 7.497000033000000 .000000000000000 + .000000000000000 .000000000000000 13.619999999999999 + + + + + + + + + + + + + + + + + + + + + + + + + + .0000000000 .0000000000 -1.9928500088 + + + + + 1.000/2.000 1.000/2.000 .0000000000 + + + + + .0000000000 .0000000000 2.6505900117 + + + + + + + + + + + + + + + + + + + + + + + + + + + -0.475000 -0.479167 0.000000 + -0.425000 -0.479167 0.000000 + -0.375000 -0.479167 0.000000 + -0.325000 -0.479167 0.000000 + -0.275000 -0.479167 0.000000 + -0.225000 -0.479167 0.000000 + -0.175000 -0.479167 0.000000 + -0.125000 -0.479167 0.000000 + -0.075000 -0.479167 0.000000 + -0.025000 -0.479167 0.000000 + 0.025000 -0.479167 0.000000 + 0.075000 -0.479167 0.000000 + 0.125000 -0.479167 0.000000 + 0.175000 -0.479167 0.000000 + 0.225000 -0.479167 0.000000 + 0.275000 -0.479167 0.000000 + 0.325000 -0.479167 0.000000 + 0.375000 -0.479167 0.000000 + 0.425000 -0.479167 0.000000 + 0.475000 -0.479167 0.000000 + -0.475000 -0.437500 0.000000 + -0.425000 -0.437500 0.000000 + -0.375000 -0.437500 0.000000 + -0.325000 -0.437500 0.000000 + -0.275000 -0.437500 0.000000 + -0.225000 -0.437500 0.000000 + -0.175000 -0.437500 0.000000 + -0.125000 -0.437500 0.000000 + -0.075000 -0.437500 0.000000 + -0.025000 -0.437500 0.000000 + 0.025000 -0.437500 0.000000 + 0.075000 -0.437500 0.000000 + 0.125000 -0.437500 0.000000 + 0.175000 -0.437500 0.000000 + 0.225000 -0.437500 0.000000 + 0.275000 -0.437500 0.000000 + 0.325000 -0.437500 0.000000 + 0.375000 -0.437500 0.000000 + 0.425000 -0.437500 0.000000 + 0.475000 -0.437500 0.000000 + -0.475000 -0.395833 0.000000 + -0.425000 -0.395833 0.000000 + -0.375000 -0.395833 0.000000 + -0.325000 -0.395833 0.000000 + -0.275000 -0.395833 0.000000 + -0.225000 -0.395833 0.000000 + -0.175000 -0.395833 0.000000 + -0.125000 -0.395833 0.000000 + -0.075000 -0.395833 0.000000 + -0.025000 -0.395833 0.000000 + 0.025000 -0.395833 0.000000 + 0.075000 -0.395833 0.000000 + 0.125000 -0.395833 0.000000 + 0.175000 -0.395833 0.000000 + 0.225000 -0.395833 0.000000 + 0.275000 -0.395833 0.000000 + 0.325000 -0.395833 0.000000 + 0.375000 -0.395833 0.000000 + 0.425000 -0.395833 0.000000 + 0.475000 -0.395833 0.000000 + -0.475000 -0.354167 0.000000 + -0.425000 -0.354167 0.000000 + -0.375000 -0.354167 0.000000 + -0.325000 -0.354167 0.000000 + -0.275000 -0.354167 0.000000 + -0.225000 -0.354167 0.000000 + -0.175000 -0.354167 0.000000 + -0.125000 -0.354167 0.000000 + -0.075000 -0.354167 0.000000 + -0.025000 -0.354167 0.000000 + 0.025000 -0.354167 0.000000 + 0.075000 -0.354167 0.000000 + 0.125000 -0.354167 0.000000 + 0.175000 -0.354167 0.000000 + 0.225000 -0.354167 0.000000 + 0.275000 -0.354167 0.000000 + 0.325000 -0.354167 0.000000 + 0.375000 -0.354167 0.000000 + 0.425000 -0.354167 0.000000 + 0.475000 -0.354167 0.000000 + -0.475000 -0.312500 0.000000 + -0.425000 -0.312500 0.000000 + -0.375000 -0.312500 0.000000 + -0.325000 -0.312500 0.000000 + -0.275000 -0.312500 0.000000 + -0.225000 -0.312500 0.000000 + -0.175000 -0.312500 0.000000 + -0.125000 -0.312500 0.000000 + -0.075000 -0.312500 0.000000 + -0.025000 -0.312500 0.000000 + 0.025000 -0.312500 0.000000 + 0.075000 -0.312500 0.000000 + 0.125000 -0.312500 0.000000 + 0.175000 -0.312500 0.000000 + 0.225000 -0.312500 0.000000 + 0.275000 -0.312500 0.000000 + 0.325000 -0.312500 0.000000 + 0.375000 -0.312500 0.000000 + 0.425000 -0.312500 0.000000 + 0.475000 -0.312500 0.000000 + -0.475000 -0.270833 0.000000 + -0.425000 -0.270833 0.000000 + -0.375000 -0.270833 0.000000 + -0.325000 -0.270833 0.000000 + -0.275000 -0.270833 0.000000 + -0.225000 -0.270833 0.000000 + -0.175000 -0.270833 0.000000 + -0.125000 -0.270833 0.000000 + -0.075000 -0.270833 0.000000 + -0.025000 -0.270833 0.000000 + 0.025000 -0.270833 0.000000 + 0.075000 -0.270833 0.000000 + 0.125000 -0.270833 0.000000 + 0.175000 -0.270833 0.000000 + 0.225000 -0.270833 0.000000 + 0.275000 -0.270833 0.000000 + 0.325000 -0.270833 0.000000 + 0.375000 -0.270833 0.000000 + 0.425000 -0.270833 0.000000 + 0.475000 -0.270833 0.000000 + -0.475000 -0.229167 0.000000 + -0.425000 -0.229167 0.000000 + -0.375000 -0.229167 0.000000 + -0.325000 -0.229167 0.000000 + -0.275000 -0.229167 0.000000 + -0.225000 -0.229167 0.000000 + -0.175000 -0.229167 0.000000 + -0.125000 -0.229167 0.000000 + -0.075000 -0.229167 0.000000 + -0.025000 -0.229167 0.000000 + 0.025000 -0.229167 0.000000 + 0.075000 -0.229167 0.000000 + 0.125000 -0.229167 0.000000 + 0.175000 -0.229167 0.000000 + 0.225000 -0.229167 0.000000 + 0.275000 -0.229167 0.000000 + 0.325000 -0.229167 0.000000 + 0.375000 -0.229167 0.000000 + 0.425000 -0.229167 0.000000 + 0.475000 -0.229167 0.000000 + -0.475000 -0.187500 0.000000 + -0.425000 -0.187500 0.000000 + -0.375000 -0.187500 0.000000 + -0.325000 -0.187500 0.000000 + -0.275000 -0.187500 0.000000 + -0.225000 -0.187500 0.000000 + -0.175000 -0.187500 0.000000 + -0.125000 -0.187500 0.000000 + -0.075000 -0.187500 0.000000 + -0.025000 -0.187500 0.000000 + 0.025000 -0.187500 0.000000 + 0.075000 -0.187500 0.000000 + 0.125000 -0.187500 0.000000 + 0.175000 -0.187500 0.000000 + 0.225000 -0.187500 0.000000 + 0.275000 -0.187500 0.000000 + 0.325000 -0.187500 0.000000 + 0.375000 -0.187500 0.000000 + 0.425000 -0.187500 0.000000 + 0.475000 -0.187500 0.000000 + -0.475000 -0.145833 0.000000 + -0.425000 -0.145833 0.000000 + -0.375000 -0.145833 0.000000 + -0.325000 -0.145833 0.000000 + -0.275000 -0.145833 0.000000 + -0.225000 -0.145833 0.000000 + -0.175000 -0.145833 0.000000 + -0.125000 -0.145833 0.000000 + -0.075000 -0.145833 0.000000 + -0.025000 -0.145833 0.000000 + 0.025000 -0.145833 0.000000 + 0.075000 -0.145833 0.000000 + 0.125000 -0.145833 0.000000 + 0.175000 -0.145833 0.000000 + 0.225000 -0.145833 0.000000 + 0.275000 -0.145833 0.000000 + 0.325000 -0.145833 0.000000 + 0.375000 -0.145833 0.000000 + 0.425000 -0.145833 0.000000 + 0.475000 -0.145833 0.000000 + -0.475000 -0.104167 0.000000 + -0.425000 -0.104167 0.000000 + -0.375000 -0.104167 0.000000 + -0.325000 -0.104167 0.000000 + -0.275000 -0.104167 0.000000 + -0.225000 -0.104167 0.000000 + -0.175000 -0.104167 0.000000 + -0.125000 -0.104167 0.000000 + -0.075000 -0.104167 0.000000 + -0.025000 -0.104167 0.000000 + 0.025000 -0.104167 0.000000 + 0.075000 -0.104167 0.000000 + 0.125000 -0.104167 0.000000 + 0.175000 -0.104167 0.000000 + 0.225000 -0.104167 0.000000 + 0.275000 -0.104167 0.000000 + 0.325000 -0.104167 0.000000 + 0.375000 -0.104167 0.000000 + 0.425000 -0.104167 0.000000 + 0.475000 -0.104167 0.000000 + -0.475000 -0.062500 0.000000 + -0.425000 -0.062500 0.000000 + -0.375000 -0.062500 0.000000 + -0.325000 -0.062500 0.000000 + -0.275000 -0.062500 0.000000 + -0.225000 -0.062500 0.000000 + -0.175000 -0.062500 0.000000 + -0.125000 -0.062500 0.000000 + -0.075000 -0.062500 0.000000 + -0.025000 -0.062500 0.000000 + 0.025000 -0.062500 0.000000 + 0.075000 -0.062500 0.000000 + 0.125000 -0.062500 0.000000 + 0.175000 -0.062500 0.000000 + 0.225000 -0.062500 0.000000 + 0.275000 -0.062500 0.000000 + 0.325000 -0.062500 0.000000 + 0.375000 -0.062500 0.000000 + 0.425000 -0.062500 0.000000 + 0.475000 -0.062500 0.000000 + -0.475000 -0.020833 0.000000 + -0.425000 -0.020833 0.000000 + -0.375000 -0.020833 0.000000 + -0.325000 -0.020833 0.000000 + -0.275000 -0.020833 0.000000 + -0.225000 -0.020833 0.000000 + -0.175000 -0.020833 0.000000 + -0.125000 -0.020833 0.000000 + -0.075000 -0.020833 0.000000 + -0.025000 -0.020833 0.000000 + 0.025000 -0.020833 0.000000 + 0.075000 -0.020833 0.000000 + 0.125000 -0.020833 0.000000 + 0.175000 -0.020833 0.000000 + 0.225000 -0.020833 0.000000 + 0.275000 -0.020833 0.000000 + 0.325000 -0.020833 0.000000 + 0.375000 -0.020833 0.000000 + 0.425000 -0.020833 0.000000 + 0.475000 -0.020833 0.000000 + -0.475000 0.020833 0.000000 + -0.425000 0.020833 0.000000 + -0.375000 0.020833 0.000000 + -0.325000 0.020833 0.000000 + -0.275000 0.020833 0.000000 + -0.225000 0.020833 0.000000 + -0.175000 0.020833 0.000000 + -0.125000 0.020833 0.000000 + -0.075000 0.020833 0.000000 + -0.025000 0.020833 0.000000 + 0.025000 0.020833 0.000000 + 0.075000 0.020833 0.000000 + 0.125000 0.020833 0.000000 + 0.175000 0.020833 0.000000 + 0.225000 0.020833 0.000000 + 0.275000 0.020833 0.000000 + 0.325000 0.020833 0.000000 + 0.375000 0.020833 0.000000 + 0.425000 0.020833 0.000000 + 0.475000 0.020833 0.000000 + -0.475000 0.062500 0.000000 + -0.425000 0.062500 0.000000 + -0.375000 0.062500 0.000000 + -0.325000 0.062500 0.000000 + -0.275000 0.062500 0.000000 + -0.225000 0.062500 0.000000 + -0.175000 0.062500 0.000000 + -0.125000 0.062500 0.000000 + -0.075000 0.062500 0.000000 + -0.025000 0.062500 0.000000 + 0.025000 0.062500 0.000000 + 0.075000 0.062500 0.000000 + 0.125000 0.062500 0.000000 + 0.175000 0.062500 0.000000 + 0.225000 0.062500 0.000000 + 0.275000 0.062500 0.000000 + 0.325000 0.062500 0.000000 + 0.375000 0.062500 0.000000 + 0.425000 0.062500 0.000000 + 0.475000 0.062500 0.000000 + -0.475000 0.104167 0.000000 + -0.425000 0.104167 0.000000 + -0.375000 0.104167 0.000000 + -0.325000 0.104167 0.000000 + -0.275000 0.104167 0.000000 + -0.225000 0.104167 0.000000 + -0.175000 0.104167 0.000000 + -0.125000 0.104167 0.000000 + -0.075000 0.104167 0.000000 + -0.025000 0.104167 0.000000 + 0.025000 0.104167 0.000000 + 0.075000 0.104167 0.000000 + 0.125000 0.104167 0.000000 + 0.175000 0.104167 0.000000 + 0.225000 0.104167 0.000000 + 0.275000 0.104167 0.000000 + 0.325000 0.104167 0.000000 + 0.375000 0.104167 0.000000 + 0.425000 0.104167 0.000000 + 0.475000 0.104167 0.000000 + -0.475000 0.145833 0.000000 + -0.425000 0.145833 0.000000 + -0.375000 0.145833 0.000000 + -0.325000 0.145833 0.000000 + -0.275000 0.145833 0.000000 + -0.225000 0.145833 0.000000 + -0.175000 0.145833 0.000000 + -0.125000 0.145833 0.000000 + -0.075000 0.145833 0.000000 + -0.025000 0.145833 0.000000 + 0.025000 0.145833 0.000000 + 0.075000 0.145833 0.000000 + 0.125000 0.145833 0.000000 + 0.175000 0.145833 0.000000 + 0.225000 0.145833 0.000000 + 0.275000 0.145833 0.000000 + 0.325000 0.145833 0.000000 + 0.375000 0.145833 0.000000 + 0.425000 0.145833 0.000000 + 0.475000 0.145833 0.000000 + -0.475000 0.187500 0.000000 + -0.425000 0.187500 0.000000 + -0.375000 0.187500 0.000000 + -0.325000 0.187500 0.000000 + -0.275000 0.187500 0.000000 + -0.225000 0.187500 0.000000 + -0.175000 0.187500 0.000000 + -0.125000 0.187500 0.000000 + -0.075000 0.187500 0.000000 + -0.025000 0.187500 0.000000 + 0.025000 0.187500 0.000000 + 0.075000 0.187500 0.000000 + 0.125000 0.187500 0.000000 + 0.175000 0.187500 0.000000 + 0.225000 0.187500 0.000000 + 0.275000 0.187500 0.000000 + 0.325000 0.187500 0.000000 + 0.375000 0.187500 0.000000 + 0.425000 0.187500 0.000000 + 0.475000 0.187500 0.000000 + -0.475000 0.229167 0.000000 + -0.425000 0.229167 0.000000 + -0.375000 0.229167 0.000000 + -0.325000 0.229167 0.000000 + -0.275000 0.229167 0.000000 + -0.225000 0.229167 0.000000 + -0.175000 0.229167 0.000000 + -0.125000 0.229167 0.000000 + -0.075000 0.229167 0.000000 + -0.025000 0.229167 0.000000 + 0.025000 0.229167 0.000000 + 0.075000 0.229167 0.000000 + 0.125000 0.229167 0.000000 + 0.175000 0.229167 0.000000 + 0.225000 0.229167 0.000000 + 0.275000 0.229167 0.000000 + 0.325000 0.229167 0.000000 + 0.375000 0.229167 0.000000 + 0.425000 0.229167 0.000000 + 0.475000 0.229167 0.000000 + -0.475000 0.270833 0.000000 + -0.425000 0.270833 0.000000 + -0.375000 0.270833 0.000000 + -0.325000 0.270833 0.000000 + -0.275000 0.270833 0.000000 + -0.225000 0.270833 0.000000 + -0.175000 0.270833 0.000000 + -0.125000 0.270833 0.000000 + -0.075000 0.270833 0.000000 + -0.025000 0.270833 0.000000 + 0.025000 0.270833 0.000000 + 0.075000 0.270833 0.000000 + 0.125000 0.270833 0.000000 + 0.175000 0.270833 0.000000 + 0.225000 0.270833 0.000000 + 0.275000 0.270833 0.000000 + 0.325000 0.270833 0.000000 + 0.375000 0.270833 0.000000 + 0.425000 0.270833 0.000000 + 0.475000 0.270833 0.000000 + -0.475000 0.312500 0.000000 + -0.425000 0.312500 0.000000 + -0.375000 0.312500 0.000000 + -0.325000 0.312500 0.000000 + -0.275000 0.312500 0.000000 + -0.225000 0.312500 0.000000 + -0.175000 0.312500 0.000000 + -0.125000 0.312500 0.000000 + -0.075000 0.312500 0.000000 + -0.025000 0.312500 0.000000 + 0.025000 0.312500 0.000000 + 0.075000 0.312500 0.000000 + 0.125000 0.312500 0.000000 + 0.175000 0.312500 0.000000 + 0.225000 0.312500 0.000000 + 0.275000 0.312500 0.000000 + 0.325000 0.312500 0.000000 + 0.375000 0.312500 0.000000 + 0.425000 0.312500 0.000000 + 0.475000 0.312500 0.000000 + -0.475000 0.354167 0.000000 + -0.425000 0.354167 0.000000 + -0.375000 0.354167 0.000000 + -0.325000 0.354167 0.000000 + -0.275000 0.354167 0.000000 + -0.225000 0.354167 0.000000 + -0.175000 0.354167 0.000000 + -0.125000 0.354167 0.000000 + -0.075000 0.354167 0.000000 + -0.025000 0.354167 0.000000 + 0.025000 0.354167 0.000000 + 0.075000 0.354167 0.000000 + 0.125000 0.354167 0.000000 + 0.175000 0.354167 0.000000 + 0.225000 0.354167 0.000000 + 0.275000 0.354167 0.000000 + 0.325000 0.354167 0.000000 + 0.375000 0.354167 0.000000 + 0.425000 0.354167 0.000000 + 0.475000 0.354167 0.000000 + -0.475000 0.395833 0.000000 + -0.425000 0.395833 0.000000 + -0.375000 0.395833 0.000000 + -0.325000 0.395833 0.000000 + -0.275000 0.395833 0.000000 + -0.225000 0.395833 0.000000 + -0.175000 0.395833 0.000000 + -0.125000 0.395833 0.000000 + -0.075000 0.395833 0.000000 + -0.025000 0.395833 0.000000 + 0.025000 0.395833 0.000000 + 0.075000 0.395833 0.000000 + 0.125000 0.395833 0.000000 + 0.175000 0.395833 0.000000 + 0.225000 0.395833 0.000000 + 0.275000 0.395833 0.000000 + 0.325000 0.395833 0.000000 + 0.375000 0.395833 0.000000 + 0.425000 0.395833 0.000000 + 0.475000 0.395833 0.000000 + -0.475000 0.437500 0.000000 + -0.425000 0.437500 0.000000 + -0.375000 0.437500 0.000000 + -0.325000 0.437500 0.000000 + -0.275000 0.437500 0.000000 + -0.225000 0.437500 0.000000 + -0.175000 0.437500 0.000000 + -0.125000 0.437500 0.000000 + -0.075000 0.437500 0.000000 + -0.025000 0.437500 0.000000 + 0.025000 0.437500 0.000000 + 0.075000 0.437500 0.000000 + 0.125000 0.437500 0.000000 + 0.175000 0.437500 0.000000 + 0.225000 0.437500 0.000000 + 0.275000 0.437500 0.000000 + 0.325000 0.437500 0.000000 + 0.375000 0.437500 0.000000 + 0.425000 0.437500 0.000000 + 0.475000 0.437500 0.000000 + -0.475000 0.479167 0.000000 + -0.425000 0.479167 0.000000 + -0.375000 0.479167 0.000000 + -0.325000 0.479167 0.000000 + -0.275000 0.479167 0.000000 + -0.225000 0.479167 0.000000 + -0.175000 0.479167 0.000000 + -0.125000 0.479167 0.000000 + -0.075000 0.479167 0.000000 + -0.025000 0.479167 0.000000 + 0.025000 0.479167 0.000000 + 0.075000 0.479167 0.000000 + 0.125000 0.479167 0.000000 + 0.175000 0.479167 0.000000 + 0.225000 0.479167 0.000000 + 0.275000 0.479167 0.000000 + 0.325000 0.479167 0.000000 + 0.375000 0.479167 0.000000 + 0.425000 0.479167 0.000000 + 0.475000 0.479167 0.000000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/aiida_fleur/tests/files/outxml/special/Fortran_garbage_BeTi_out.xml b/aiida_fleur/tests/files/outxml/special/Fortran_garbage_BeTi_out.xml index 8debedf3e..ae60112e6 100644 --- a/aiida_fleur/tests/files/outxml/special/Fortran_garbage_BeTi_out.xml +++ b/aiida_fleur/tests/files/outxml/special/Fortran_garbage_BeTi_out.xml @@ -2837,4 +2837,4 @@ - \ No newline at end of file + diff --git a/aiida_fleur/tests/fleur_schema/__init__.py b/aiida_fleur/tests/fleur_schema/__init__.py index 1ad75df2b..713971d59 100644 --- a/aiida_fleur/tests/fleur_schema/__init__.py +++ b/aiida_fleur/tests/fleur_schema/__init__.py @@ -3,9 +3,8 @@ AiiDA-FLEUR ''' -__copyright__ = u"Copyright (c), 2015-2017, Forschungszentrum Juelich GmbH, Germany. All rights reserved." -__license__ = "MIT license, see LICENSE.txt file." -__contributors__ = "Jens Broeder" -__paper__ = "" -__paper_short__ = "" - +__copyright__ = u'Copyright (c), 2015-2017, Forschungszentrum Juelich GmbH, Germany. All rights reserved.' +__license__ = 'MIT license, see LICENSE.txt file.' +__contributors__ = 'Jens Broeder' +__paper__ = '' +__paper_short__ = '' diff --git a/aiida_fleur/tests/local_exe/README.txt b/aiida_fleur/tests/local_exe/README.txt index 8d352846f..fa419998d 100644 --- a/aiida_fleur/tests/local_exe/README.txt +++ b/aiida_fleur/tests/local_exe/README.txt @@ -1,3 +1,9 @@ -# if you want to run tests of workflows, or real fleur calculation with the fleur code -# you have to put a local (for the machine you run the tests on) compiled executable in here of FLEUR (serial) and inpgen -# the subfolders are there to + +Executables named 'fleur' and 'inpgen' in this dir will be used for tests. +if they do not exist, dummy files will be created here (in the CI case for example), that tests can run with caches + +if you want to test therefore with a certain fleur version copy the executable here and delete all caches, or move the cache dirs + + + + diff --git a/aiida_fleur/tests/migrate_exports.py b/aiida_fleur/tests/migrate_exports.py new file mode 100644 index 000000000..72f9bda0b --- /dev/null +++ b/aiida_fleur/tests/migrate_exports.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +''' +This small dirty scripts helps to migrate aiida exports files produced by tests +prob works only under linux. cleans data_dir, workflows/caches +''' +import os +import shutil +#import subprocess + +#base = '/home/broeder/aiida/github/judft/aiida-fleur/aiida_fleur/tests/' +data_dirs = ['data_dir/', 'workflows/caches/'] + +for dirs in data_dirs: + listing = os.listdir(dirs) + for infile in listing: + print('migrating aiida export file: ' + dirs + infile) + infile_old = 'old_' + infile + shutil.move(dirs + infile, dirs + infile_old) + #subprocess.run(["", "]) + os.system('verdi export migrate {} {}'.format(dirs + infile_old, dirs + infile)) + #os.system("ls {} {}".format(dirs+infile_old, dirs+infile)) diff --git a/aiida_fleur/tests/old_todo/data/fleurinpmodifier/btest_fleurinpmodifier.py b/aiida_fleur/tests/old_todo/data/fleurinpmodifier/btest_fleurinpmodifier_py.back similarity index 97% rename from aiida_fleur/tests/old_todo/data/fleurinpmodifier/btest_fleurinpmodifier.py rename to aiida_fleur/tests/old_todo/data/fleurinpmodifier/btest_fleurinpmodifier_py.back index 8c54cded2..b06a01104 100644 --- a/aiida_fleur/tests/old_todo/data/fleurinpmodifier/btest_fleurinpmodifier.py +++ b/aiida_fleur/tests/old_todo/data/fleurinpmodifier/btest_fleurinpmodifier_py.back @@ -19,10 +19,8 @@ start_time = time.time() - # schemanameQq - path = os.getcwd() # path.realpath(__file__) print(path) filepath = path + '/inp.xml' @@ -36,7 +34,6 @@ fleurmode = FleurinpModifier(new_fleurinpData) - #fleurmode.set_switch({'dos': True}) fleurmode.set_inpchanges({}) @@ -44,8 +41,7 @@ tria = True nkpts = 800 -change_dict = {'dos': True, 'ndir': -1, 'minEnergy': -0.8, - 'maxEnergy': 0.8, 'sigma': 0.005} +change_dict = {'dos': True, 'ndir': -1, 'minEnergy': -0.8, 'maxEnergy': 0.8, 'sigma': 0.005} fleurmode.set_inpchanges(change_dict) if tria: @@ -53,7 +49,6 @@ fleurmode.set_inpchanges(change_dict) if nkpts: fleurmode.set_nkpts(count=nkpts) - ''' fleurmode.set_species('W-1', {'radius' : 3.5}) fleurmode.change_atom('forces', True, position=(0.0, 0.0, 0.0)) diff --git a/aiida_fleur/tests/old_todo/util/btest_common_fleur_wf.py b/aiida_fleur/tests/old_todo/util/btest_common_fleur_wf.py deleted file mode 100644 index b3789856e..000000000 --- a/aiida_fleur/tests/old_todo/util/btest_common_fleur_wf.py +++ /dev/null @@ -1,84 +0,0 @@ -#!/usr/bin/env python2 -# -*- coding: utf-8 -*- -""" -In here we put all things (methods) that are common to workflows -""" -from __future__ import absolute_import -from __future__ import print_function -from aiida import load_dbenv, is_dbenv_loaded -if not is_dbenv_loaded(): - load_dbenv() -from aiida.plugins import DataFactory -from aiida.orm import Code, load_node -#from aiida.tools.codespecific.fleur.queue_defaults import queue_defaults -#from aiida.work.workchain import WorkChain -#from aiida.work.workchain import while_, if_ -from aiida.engine.run import submit -#from aiida.work.workchain import ToContext -#from aiida.work.process_registry import ProcessRegistry -#from aiida.tools.codespecific.fleur.decide_ncore import decide_ncore -from aiida_fleur.calculation.fleurinputgen import FleurinputgenCalculation -from aiida_fleur.calculation.fleur import FleurCalculation - -from aiida_fleur.tools.common_fleur_wf import is_code, get_inputs_fleur, get_inputs_inpgen - -__copyright__ = (u"Copyright (c), 2016, Forschungszentrum Jülich GmbH, " - "IAS-1/PGI-1, Germany. All rights reserved.") -__license__ = "MIT license, see LICENSE.txt file" -__version__ = "0.27" -__contributors__ = "Jens Broeder" - -FleurProcess = FleurCalculation.process() -InpgenProcess = FleurinputgenCalculation.process() -# difference between local and remote codes? -codename = 'fleur_iff@local_iff' -codepk = 1 -codeuuid = 'ba86d8f3-fd47-4776-ac75-bad7009dfa67' -codeNode = load_node(1) -nocode = load_node(2254) - -print(is_code(codeNode)) -print(is_code(codename)) -print(is_code(codepk)) -#print is_code(codeuuid) -print(is_code(nocode)) -#print is_code(Code) - -# test get_inputs_inpgen - -remote = load_node(2357) -fleurinp = load_node(2351) -options = { "max_wallclock_seconds": 360, - "resources": {"num_machines": 1}, - "custom_scheduler_commands": 'bla', - "queue_name": 'th1', - #"computer": Computer, - "withmpi": True, - #"mpirun_extra_params": Any(list, tuple), - "import_sys_environment": False, - "environment_variables": {}, - "priority": 'High', - "max_memory_kb": 62, - "prepend_text": 'this is a test', - "append_text": 'this was a test'} -inp = get_inputs_fleur(codeNode, remote, fleurinp, options, serial=False) -print(inp) - -inputs = {} -options2 = {"max_wallclock_seconds": 360, - "resources": {"num_machines": 1}} -inputs = get_inputs_fleur(codeNode, remote, fleurinp, options2, serial=True) -#print inputs -#future = submit(FleurProcess, **inputs) -print('run Fleur') - - -# test get inputs_fleur -inputs = {} -structure =load_node(2469) -inpgencode = is_code(2) -options2 = {"max_wallclock_seconds": 360, - "resources": {"num_machines": 1}} -inputs = get_inputs_inpgen(structure, inpgencode, options2, params=None) -future = submit(InpgenProcess, **inputs) -print('run inpgen') diff --git a/aiida_fleur/tests/old_todo/util/btest_create_corehole.py b/aiida_fleur/tests/old_todo/util/btest_create_corehole_py.back similarity index 52% rename from aiida_fleur/tests/old_todo/util/btest_create_corehole.py rename to aiida_fleur/tests/old_todo/util/btest_create_corehole_py.back index cca5fc05b..bfec885fa 100644 --- a/aiida_fleur/tests/old_todo/util/btest_create_corehole.py +++ b/aiida_fleur/tests/old_todo/util/btest_create_corehole_py.back @@ -3,16 +3,15 @@ from __future__ import absolute_import from __future__ import print_function -__copyright__ = (u"Copyright (c), 2016, Forschungszentrum Jülich GmbH, " - "IAS-1/PGI-1, Germany. All rights reserved.") -__license__ = "MIT license, see LICENSE.txt file" -__version__ = "0.27" -__contributors__ = "Jens Broeder" +__copyright__ = (u'Copyright (c), 2016, Forschungszentrum Jülich GmbH, ' 'IAS-1/PGI-1, Germany. All rights reserved.') +__license__ = 'MIT license, see LICENSE.txt file' +__version__ = '0.27' +__contributors__ = 'Jens Broeder' from aiida import load_dbenv, is_dbenv_loaded if not is_dbenv_loaded(): load_dbenv() -import sys,os +import sys, os from aiida.orm.querybuilder import QueryBuilder from aiida_fleur_ad.util.create_corehole import create_corehole, create_corehole_fleurinp, write_change @@ -33,40 +32,45 @@ ''' #s = load_node(355) -ids = []#13924]#, 13925]#, 13926, 13927, 13928, 13929, 13930, 13931, 13932, 13933, 13934, 13935] +ids = [] #13924]#, 13925]#, 13926, 13927, 13928, 13929, 13930, 13931, 13932, 13933, 13934, 13935] #ids = [479, 480, 481, 482, 537]# O12W4, O12W4, O6W2, O6W2, O36W3Y18 -kind ='W1' -econfig = "[Kr] 5s2 4d10 4f13 | 5p6 5d5 6s2" -para1 = Dict(dict={ - 'title': 'A test calculation of Tungsten', - 'input': { - 'film': False, - 'cartesian' : True, - }, - 'atom':{ - 'element' : 'W', - 'jri' : 833, - 'rmt' : 2.3, - 'dx' : 0.015, - 'lmax' : 8, - 'lo' : '5p', - 'econfig': '[Kr] 5s2 4d10 4f14| 5p6 5d4 6s2', - }, - 'soc': {'theta': 0.0, 'phi': 0.0}, - 'comp': { - 'kmax': 3.5, - 'gmax': 2.9, - }, - 'kpt': { - 'nkpt': 200, - }}) +kind = 'W1' +econfig = '[Kr] 5s2 4d10 4f13 | 5p6 5d5 6s2' +para1 = Dict( + dict={ + 'title': 'A test calculation of Tungsten', + 'input': { + 'film': False, + 'cartesian': True, + }, + 'atom': { + 'element': 'W', + 'jri': 833, + 'rmt': 2.3, + 'dx': 0.015, + 'lmax': 8, + 'lo': '5p', + 'econfig': '[Kr] 5s2 4d10 4f14| 5p6 5d4 6s2', + }, + 'soc': { + 'theta': 0.0, + 'phi': 0.0 + }, + 'comp': { + 'kmax': 3.5, + 'gmax': 2.9, + }, + 'kpt': { + 'nkpt': 200, + } + }) #para1.store() #pprint(para1.get_dict()) for id in ids: s = load_node(id) - new_s, para = bs(s, atoms=[], site=[0,1], pos=[(0.0, 0.0, 0,0)], parameterData=para1) + new_s, para = bs(s, atoms=[], site=[0, 1], pos=[(0.0, 0.0, 0, 0)], parameterData=para1) #print new_s.sites #pprint(para.get_dict()) res = create_corehole(new_s, kind, econfig, para) @@ -74,16 +78,14 @@ #pprint(para.get_dict()) #pprint(res.get_dict()) - - # test create_corehole_fleurinp #fleurinp = load_node(14039) # W film inpxmlfile1 = '../inp_xml_files/W/inp.xml' inpxmlfile = os.path.abspath(inpxmlfile1) -fleurinp = FleurinpData(files = [inpxmlfile]) +fleurinp = FleurinpData(files=[inpxmlfile]) species = 'W-1' -stateocc = {'(5d3/2)' : (2.5, 0.0), '(4f7/2)' : (3.5 , 4.0)} +stateocc = {'(5d3/2)': (2.5, 0.0), '(4f7/2)': (3.5, 4.0)} pos = [] coreconfig = 'same' valenceconfig = 'same' @@ -93,7 +95,7 @@ print(new_inp) etree = '' -change = [(1,2)] +change = [(1, 2)] res = write_change(etree, change) #res.write('.outtree') print(res) diff --git a/aiida_fleur/tests/old_todo/util/btest_extract_corelevels2.py b/aiida_fleur/tests/old_todo/util/btest_extract_corelevels2_py.back similarity index 82% rename from aiida_fleur/tests/old_todo/util/btest_extract_corelevels2.py rename to aiida_fleur/tests/old_todo/util/btest_extract_corelevels2_py.back index 16a4a7645..3c05b4f69 100644 --- a/aiida_fleur/tests/old_todo/util/btest_extract_corelevels2.py +++ b/aiida_fleur/tests/old_todo/util/btest_extract_corelevels2_py.back @@ -1,11 +1,12 @@ #!/usr/bin/env python +# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import print_function from aiida import load_dbenv, is_dbenv_loaded from six.moves import range if not is_dbenv_loaded(): load_dbenv() -import sys,os +import sys, os from lxml import etree, objectify from lxml.etree import XMLSyntaxError, XPathEvalError from pprint import pprint @@ -40,17 +41,15 @@ pass ##### - # check if calculation pks belong to successful fleur calculations for pk in calcs_pks: calc = load_node(pk) if (not isinstance(calc, FleurCalc)): - raise ValueError("Calculation with pk {} must be a FleurCalculation".format(pk)) + raise ValueError('Calculation with pk {} must be a FleurCalculation'.format(pk)) if calc.get_state() != 'FINISHED': - raise ValueError("Calculation with pk {} must be in state FINISHED".format(pk)) - + raise ValueError('Calculation with pk {} must be in state FINISHED'.format(pk)) -parser_info = {'parser_warnings': [], 'unparsed' : []} +parser_info = {'parser_warnings': [], 'unparsed': []} def extrac_corelevels(outxml): @@ -78,18 +77,18 @@ def extrac_corelevels(outxml): parsed_data = {} outfile_broken = False parse_xml = True - parser = etree.XMLParser(recover=False)#, remove_blank_text=True) + parser = etree.XMLParser(recover=False) #, remove_blank_text=True) try: tree = etree.parse(outxmlfile, parser) except etree.XMLSyntaxError: outfile_broken = True - #print 'broken xml' + #print 'broken xml' parser_info['parser_warnings'].append('The out.xml file is broken I try to repair it.') if outfile_broken: #repair xmlfile and try to parse what is possible. - parser = etree.XMLParser(recover=True)#, remove_blank_text=True) + parser = etree.XMLParser(recover=True) #, remove_blank_text=True) try: tree = etree.parse(outxmlfile, parser) except etree.XMLSyntaxError: @@ -100,10 +99,9 @@ def extrac_corelevels(outxml): #if parse_xml: root = tree.getroot() - # 2. get all species # get element, name, coreStates - species_nodes = eval_xpath(root, '/fleurOutput/atomSpecies')#/fleurinp/ + species_nodes = eval_xpath(root, '/fleurOutput/atomSpecies') #/fleurinp/ species_atts = {} species_names = [] for species in species_nodes: @@ -113,20 +111,27 @@ def extrac_corelevels(outxml): species_element = species.get('element') species_atomicnumber = species.get('atomicNumber') species_magMom = species.get('magMom') - species_atts[species_name] = { 'name' : species_name, 'corestates' : species_corestates, 'element': species_element, 'atomgroups' : [], 'mag_mom' : species_magMom, 'atomic_number' : species_atomicnumber} + species_atts[species_name] = { + 'name': species_name, + 'corestates': species_corestates, + 'element': species_element, + 'atomgroups': [], + 'mag_mom': species_magMom, + 'atomic_number': species_atomicnumber + } species_names.append(species_name) #species_atts.append(species_att) nspecies = len(species_nodes) #3. get number of atom types and their species atomtypes = [] - atomgroup_nodes = eval_xpath(root, '/fleurOutput/atomGroups')#/fleurinp/ + atomgroup_nodes = eval_xpath(root, '/fleurOutput/atomGroups') #/fleurinp/ for atomgroup in atomgroup_nodes: types_dict = {} group_species = atomgroup.get('species') if group_species in species_names: species_atts[group_species]['atomgroups'].append(atomgroup) - types_dict = {'species' : group_species, 'coresetup': '', 'corelevels' : []} + types_dict = {'species': group_species, 'coresetup': '', 'corelevels': []} atomtypes.append(types_dict) natomgroup = len(atomgroup_nodes) @@ -159,7 +164,7 @@ def extrac_corelevels(outxml): #print 'here' #print corestatescard corelv = parse_state_card(corestatescard, iteration_to_parse) - corelevels[int(corelv['atomtype'])-1].append(corelv) + corelevels[int(corelv['atomtype']) - 1].append(corelv) #corelevels.append(corelv) print(parser_info) #pprint(corelevels) @@ -167,6 +172,7 @@ def extrac_corelevels(outxml): #corelevels[atomtypeNumber][spin]['corestates'][corestate number][attribute] return corelevels + def parse_state_card(corestateNode, iteration_node): """ Parses the ONE core state card @@ -221,15 +227,22 @@ def parse_state_card(corestateNode, iteration_node): j_state = get_xml_attribute(corestate, j_name) energy, suc = convert_to_float(get_xml_attribute(corestate, energy_name)) weight, suc = convert_to_float(get_xml_attribute(corestate, weight_name)) - state_dict = {'n' : n_state, 'l' : l_state, 'j' : j_state, 'energy' : energy, 'weight' : weight} + state_dict = {'n': n_state, 'l': l_state, 'j': j_state, 'energy': energy, 'weight': weight} states.append(state_dict) #pprint(states) - core_states = {'eigenvalue_sum' : eigenvalueSum, 'corestates': states, 'spin' : spin, 'kin_energy' : kinEnergy, 'atomtype' : atomtype} + core_states = { + 'eigenvalue_sum': eigenvalueSum, + 'corestates': states, + 'spin': spin, + 'kin_energy': kinEnergy, + 'atomtype': atomtype + } #pprint(core_states) return core_states + def eval_xpath(node, xpath): """ Tries to evalutate an xpath expression. If it fails it logs it. @@ -240,7 +253,8 @@ def eval_xpath(node, xpath): try: return_value = node.xpath(xpath) except XPathEvalError: - parser_info['parser_warnings'].append('There was a XpathEvalError on the xpath: {} \n' + parser_info['parser_warnings'].append( + 'There was a XpathEvalError on the xpath: {} \n' 'Either it does not exist, or something is wrong with the expression.'.format(xpath)) # TODO maybe raise an error again to catch in upper routine, to know where exactly return [] @@ -249,6 +263,7 @@ def eval_xpath(node, xpath): else: return return_value + def convert_to_float(value_string): """ Tries to make a float out of a string. If it can't it logs a warning @@ -268,6 +283,7 @@ def convert_to_float(value_string): return value_string, False return value, True + def get_xml_attribute(node, attributename): """ Get an attribute value from a node. @@ -282,28 +298,31 @@ def get_xml_attribute(node, attributename): return attrib_value else: parser_info['parser_warnings'].append('Tried to get attribute: "{}" from element {}.\n ' - 'I recieved "{}", maybe the attribute does not exist'.format(attributename, node, attrib_value)) + 'I recieved "{}", maybe the attribute does not exist'.format( + attributename, node, attrib_value)) return None - else: # something doesn't work here some nodes get through here - parser_info['parser_warnings'].append('Can not get attributename: "{}" from node "{}", because node is not an element of etree.'.format(attributename,node)) + else: # something doesn't work here some nodes get through here + parser_info['parser_warnings'].append( + 'Can not get attributename: "{}" from node "{}", because node is not an element of etree.'.format( + attributename, node)) return None - ### call -test_outxmlfiles = ['./out.xml', './test_outxml/outCuF.xml', './test_outxml/outFe.xml', './test_outxml/outHg.xml', './test_outxml/outO.xml'] +test_outxmlfiles = [ + './out.xml', './test_outxml/outCuF.xml', './test_outxml/outFe.xml', './test_outxml/outHg.xml', + './test_outxml/outO.xml' +] outxmlfile = test_outxmlfiles[2] corelevels = extrac_corelevels(outxmlfile) -for i in range(0,len(corelevels[0][1]['corestates'])): +for i in range(0, len(corelevels[0][1]['corestates'])): print(corelevels[0][1]['corestates'][i]['energy']) - for calc in calcs_pks: pass # get out.xml file of calculation outxml = load_node(pk).out.retrieved.folder.get_abs_path('out.xml') extrac_corelevels(outxml) - -print(("--- %s seconds ---" % (time.time() - start_time))) +print(('--- %s seconds ---' % (time.time() - start_time))) diff --git a/aiida_fleur/tests/old_todo/util/btest_extract_corelevels.py b/aiida_fleur/tests/old_todo/util/btest_extract_corelevels_py.back similarity index 82% rename from aiida_fleur/tests/old_todo/util/btest_extract_corelevels.py rename to aiida_fleur/tests/old_todo/util/btest_extract_corelevels_py.back index 4f5acb019..01de2c120 100644 --- a/aiida_fleur/tests/old_todo/util/btest_extract_corelevels.py +++ b/aiida_fleur/tests/old_todo/util/btest_extract_corelevels_py.back @@ -1,4 +1,5 @@ #!/usr/bin/env python +# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import print_function import os @@ -23,7 +24,6 @@ FleurInpCalc = CalculationFactory('fleur.inpgen') - start_time = time.time() ## @@ -48,17 +48,17 @@ for pk in calcs_pks: calc = load_node(pk) if (not isinstance(calc, FleurCalc)): - raise ValueError("Calculation with pk {} must be a FleurCalculation".format(pk)) + raise ValueError('Calculation with pk {} must be a FleurCalculation'.format(pk)) if calc.get_state() != 'FINISHED': - raise ValueError("Calculation with pk {} must be in state FINISHED".format(pk)) - + raise ValueError('Calculation with pk {} must be in state FINISHED'.format(pk)) parser_info = {'parser_warnings': [], 'unparsed': []} - # call -test_outxmlfiles = ['./test_outxml/outBeCr.xml', './test_outxml/out.xml', './test_outxml/outCuF.xml', - './test_outxml/outFe.xml', './test_outxml/outHg.xml', './test_outxml/outO.xml'] +test_outxmlfiles = [ + './test_outxml/outBeCr.xml', './test_outxml/out.xml', './test_outxml/outCuF.xml', './test_outxml/outFe.xml', + './test_outxml/outHg.xml', './test_outxml/outO.xml' +] outxmlfile = test_outxmlfiles[0] corelevels, atomtypes = extract_corelevels(outxmlfile) @@ -77,4 +77,4 @@ for i in range(0, len(corelevels[1][0]['corestates'])): # print corelevels[3][1]['corestates'][i]['energy'] print(corelevels[1][0]['corestates'][i]['energy']) -print(("--- %s seconds ---" % (time.time() - start_time))) +print(('--- %s seconds ---' % (time.time() - start_time))) diff --git a/aiida_fleur/tests/old_todo/util/btest_read_cif_folder.py b/aiida_fleur/tests/old_todo/util/btest_read_cif_folder.py index b0c3119eb..de9c75e59 100644 --- a/aiida_fleur/tests/old_todo/util/btest_read_cif_folder.py +++ b/aiida_fleur/tests/old_todo/util/btest_read_cif_folder.py @@ -1,10 +1,18 @@ #!/usr/bin/env python - +# -*- coding: utf-8 -*- +'''Implement a test for this interface''' from __future__ import absolute_import from aiida import load_dbenv, is_dbenv_loaded if not is_dbenv_loaded(): load_dbenv() from aiida_fleur.tools.read_cif_folder import read_cif_folder - -read_cif_folder(log=True, store=True, recursive=True, extras={'type' : 'bulk', 'project': 'Fusion', 'specification' : 'aiida_work', 'comment' : 'Materials for Fusion'}) +read_cif_folder(log=True, + store=True, + recursive=True, + extras={ + 'type': 'bulk', + 'project': 'Fusion', + 'specification': 'aiida_work', + 'comment': 'Materials for Fusion' + }) diff --git a/aiida_fleur/tests/parsers/__init__.py b/aiida_fleur/tests/parsers/__init__.py index 1ad75df2b..713971d59 100644 --- a/aiida_fleur/tests/parsers/__init__.py +++ b/aiida_fleur/tests/parsers/__init__.py @@ -3,9 +3,8 @@ AiiDA-FLEUR ''' -__copyright__ = u"Copyright (c), 2015-2017, Forschungszentrum Juelich GmbH, Germany. All rights reserved." -__license__ = "MIT license, see LICENSE.txt file." -__contributors__ = "Jens Broeder" -__paper__ = "" -__paper_short__ = "" - +__copyright__ = u'Copyright (c), 2015-2017, Forschungszentrum Juelich GmbH, Germany. All rights reserved.' +__license__ = 'MIT license, see LICENSE.txt file.' +__contributors__ = 'Jens Broeder' +__paper__ = '' +__paper_short__ = '' diff --git a/aiida_fleur/tests/parsers/test_fleur_parser.py b/aiida_fleur/tests/parsers/test_fleur_parser.py index 7ccbde280..b7737651e 100644 --- a/aiida_fleur/tests/parsers/test_fleur_parser.py +++ b/aiida_fleur/tests/parsers/test_fleur_parser.py @@ -1,8 +1,11 @@ -# test all routines used by the fleur parser +# -*- coding: utf-8 -*- +''' Contains tests for routines used by the fleur parser. ''' from __future__ import absolute_import import os import pytest +import math + # parse_xmlout_file def test_parse_xmlout_file(): @@ -11,57 +14,68 @@ def test_parse_xmlout_file(): with the right content """ from aiida_fleur.parsers.fleur import parse_xmlout_file - import os filename = os.path.abspath('./files/outxml/BeTi_out.xml') simple_out, complex_out, parser_info_out, successful = parse_xmlout_file(filename) - expected_simple_out_dict = {'bandgap': 0.0052350388, - 'bandgap_units': 'eV', - 'charge_den_xc_den_integral': -45.0947551412, - 'charge_density': 8.7984e-06, - 'creator_name': 'fleur 27', - 'creator_target_architecture': 'GEN', - 'creator_target_structure': ' ', - 'density_convergence_units': 'me/bohr^3', - 'energy': -23635.691764717936, - 'energy_core_electrons': -496.172547773, - 'energy_hartree': -868.5956587197, - 'energy_hartree_units': 'Htr', - 'energy_units': 'eV', - 'energy_valence_electrons': -7.1055909396, - 'fermi_energy': 0.3451127139, - 'fermi_energy_units': 'Htr', - 'force_largest': -0.0, - 'kmax': 4.5, - 'number_of_atom_types': 2, - 'number_of_atoms': 2, - 'number_of_iterations': 19, - 'number_of_iterations_total': 19, - 'number_of_kpoints': 56, - 'number_of_species': 1, - 'number_of_spin_components': 1, - 'number_of_symmetries': 48, - 'output_file_version': '0.27', - 'start_date': {'date': '2017/09/10', 'time': '07:58:10'}, - 'end_date': {'date': '2017/09/10', 'time': '07:58:34'}, - 'sum_of_eigenvalues': -503.2781387127, - 'title': 'Be-Ti, bulk compounds', - 'walltime': 24, - 'walltime_units': 'seconds', - 'warnings': {'debug': {}, 'error': {}, 'info': {}, 'warning': {}}} - - expected_parser_info_out = {'parser_info': 'AiiDA Fleur Parser v0.2beta', - 'parser_warnings': [], - 'unparsed': []} - simple_out.pop('outputfile_path', None) # otherwise test will fail on different installations + expected_simple_out_dict = { + 'bandgap': 0.0052350388, + 'bandgap_units': 'eV', + 'charge_den_xc_den_integral': -45.0947551412, + 'charge_density': 8.7984e-06, + 'creator_name': 'fleur 27', + 'creator_target_architecture': 'GEN', + 'creator_target_structure': ' ', + 'density_convergence_units': 'me/bohr^3', + 'energy': -23635.691764717936, + 'energy_core_electrons': -496.172547773, + 'energy_hartree': -868.5956587197, + 'energy_hartree_units': 'Htr', + 'energy_units': 'eV', + 'energy_valence_electrons': -7.1055909396, + 'fermi_energy': 0.3451127139, + 'fermi_energy_units': 'Htr', + 'force_largest': -0.0, + 'kmax': 4.5, + 'number_of_atom_types': 2, + 'number_of_atoms': 2, + 'number_of_iterations': 19, + 'number_of_iterations_total': 19, + 'number_of_kpoints': 56, + 'number_of_species': 1, + 'number_of_spin_components': 1, + 'number_of_symmetries': 48, + 'output_file_version': '0.27', + 'start_date': { + 'date': '2017/09/10', + 'time': '07:58:10' + }, + 'end_date': { + 'date': '2017/09/10', + 'time': '07:58:34' + }, + 'sum_of_eigenvalues': -503.2781387127, + 'title': 'Be-Ti, bulk compounds', + 'walltime': 24, + 'walltime_units': 'seconds', + 'warnings': { + 'debug': {}, + 'error': {}, + 'info': {}, + 'warning': {} + } + } + + expected_parser_info_out = {'parser_info': 'AiiDA Fleur Parser v0.3.0', 'parser_warnings': [], 'unparsed': []} + simple_out.pop('outputfile_path', None) # otherwise test will fail on different installations # also this should go away any way... - assert successful == True + assert successful assert expected_simple_out_dict == simple_out assert expected_parser_info_out == parser_info_out + # test special cases parser behavior def test_parse_xmlout_file_broken_xmlout_file(): """ @@ -70,21 +84,25 @@ def test_parse_xmlout_file_broken_xmlout_file(): (which can happen in the case of some kill, or Non regular termination of FLEUR) """ from aiida_fleur.parsers.fleur import parse_xmlout_file - import os filename = os.path.abspath('./files/outxml/special/broken_BeTi_out.xml') simple_out, complex_out, parser_info_out, successful = parse_xmlout_file(filename) expected_parser_info_out = { - 'last_iteration_parsed': 15, - 'parser_info': 'AiiDA Fleur Parser v0.2beta', - 'parser_warnings': ['The out.xml file is broken I try to repair it.', - 'Endtime was unparsed, inp.xml prob not complete, do not believe the walltime!'], - 'unparsed': []} - - assert successful == True - assert 15 == parser_info_out['last_iteration_parsed'] + 'last_iteration_parsed': + 15, + 'parser_info': + 'AiiDA Fleur Parser v0.3.0', + 'parser_warnings': [ + 'The out.xml file is broken I try to repair it.', + 'Endtime was unparsed, inp.xml prob not complete, do not believe the walltime!' + ], + 'unparsed': [] + } + + assert successful + assert parser_info_out['last_iteration_parsed'] == 15 assert expected_parser_info_out['unparsed'] == parser_info_out['unparsed'] assert expected_parser_info_out['parser_warnings'] == parser_info_out['parser_warnings'] @@ -96,51 +114,73 @@ def test_parse_xmlout_file_broken_first_xmlout_file(): (which can happen in the case of some kill, or Non regular termination of FLEUR) """ from aiida_fleur.parsers.fleur import parse_xmlout_file - import os filename = os.path.abspath('./files/outxml/special/broken_first_BeTi_out.xml') simple_out, complex_out, parser_info_out, successful = parse_xmlout_file(filename) expected_parser_info_out = { - 'last_iteration_parsed': 1, - 'parser_info': 'AiiDA Fleur Parser v0.2beta', - 'parser_warnings': ['The out.xml file is broken I try to repair it.', - 'Can not get attributename: "units" from node "[]", because node is not an element of etree.', - 'Can not get attributename: "value" from node "[]", because node is not an element of etree.', - 'Could not convert: "None" to float, TypeError', - 'Could not convert: "None" to float, TypeError', - 'Could not convert: "None" to float, TypeError', - 'Can not get attributename: "value" from node "[]", because node is not an element of etree.', - 'Could not convert: "None" to float, TypeError', - 'Can not get attributename: "value" from node "[]", because node is not an element of etree.', - 'Could not convert: "None" to float, TypeError', - 'Can not get attributename: "value" from node "[]", because node is not an element of etree.', - 'Could not convert: "None" to float, TypeError', - 'Can not get attributename: "value" from node "[]", because node is not an element of etree.', - 'Could not convert: "None" to float, TypeError', - 'Can not get attributename: "units" from node "[]", because node is not an element of etree.', - 'Can not get attributename: "value" from node "[]", because node is not an element of etree.', - 'Could not convert: "None" to float, TypeError', - 'Can not get attributename: "value" from node "[]", because node is not an element of etree.', - 'Could not convert: "None" to float, TypeError', - 'Can not get attributename: "units" from node "[]", because node is not an element of etree.', - 'Can not get attributename: "units" from node "[]", because node is not an element of etree.', - 'Can not get attributename: "distance" from node "[]", because node is not an element of etree.', - 'Could not convert: "None" to float, TypeError', - 'Endtime was unparsed, inp.xml prob not complete, do not believe the walltime!'], - 'unparsed': [{'energy_hartree': None, 'iteration': ' 1'}, - {'energy': None, 'iteration': ' 1'}, - {'iteration': ' 1', 'sum_of_eigenvalues': None}, - {'energy_core_electrons': None, 'iteration': ' 1'}, - {'energy_valence_electrons': None, 'iteration': ' 1'}, - {'charge_den_xc_den_integral': None, 'iteration': ' 1'}, - {'bandgap': None, 'iteration': ' 1'}, - {'fermi_energy': None, 'iteration': ' 1'}, - {'charge_density': None, 'iteration': ' 1'}]} - - assert successful == True - assert 1 == parser_info_out['last_iteration_parsed'] + 'last_iteration_parsed': + 1, + 'parser_info': + 'AiiDA Fleur Parser v0.3.0', + 'parser_warnings': [ + 'The out.xml file is broken I try to repair it.', + 'Can not get attributename: "units" from node "[]", because node is not an element of etree.', + 'Can not get attributename: "value" from node "[]", because node is not an element of etree.', + 'Could not convert: "None" to float, TypeError', 'Could not convert: "None" to float, TypeError', + 'Could not convert: "None" to float, TypeError', + 'Can not get attributename: "value" from node "[]", because node is not an element of etree.', + 'Could not convert: "None" to float, TypeError', + 'Can not get attributename: "value" from node "[]", because node is not an element of etree.', + 'Could not convert: "None" to float, TypeError', + 'Can not get attributename: "value" from node "[]", because node is not an element of etree.', + 'Could not convert: "None" to float, TypeError', + 'Can not get attributename: "value" from node "[]", because node is not an element of etree.', + 'Could not convert: "None" to float, TypeError', + 'Can not get attributename: "units" from node "[]", because node is not an element of etree.', + 'Can not get attributename: "value" from node "[]", because node is not an element of etree.', + 'Could not convert: "None" to float, TypeError', + 'Can not get attributename: "value" from node "[]", because node is not an element of etree.', + 'Could not convert: "None" to float, TypeError', + 'Can not get attributename: "units" from node "[]", because node is not an element of etree.', + 'Can not get attributename: "units" from node "[]", because node is not an element of etree.', + 'Can not get attributename: "distance" from node "[]", because node is not an element of etree.', + 'Could not convert: "None" to float, TypeError', + 'Endtime was unparsed, inp.xml prob not complete, do not believe the walltime!' + ], + 'unparsed': [{ + 'energy_hartree': None, + 'iteration': ' 1' + }, { + 'energy': None, + 'iteration': ' 1' + }, { + 'iteration': ' 1', + 'sum_of_eigenvalues': None + }, { + 'energy_core_electrons': None, + 'iteration': ' 1' + }, { + 'energy_valence_electrons': None, + 'iteration': ' 1' + }, { + 'charge_den_xc_den_integral': None, + 'iteration': ' 1' + }, { + 'bandgap': None, + 'iteration': ' 1' + }, { + 'fermi_energy': None, + 'iteration': ' 1' + }, { + 'charge_density': None, + 'iteration': ' 1' + }] + } + + assert successful + assert parser_info_out['last_iteration_parsed'] == 1 assert expected_parser_info_out['unparsed'] == parser_info_out['unparsed'] assert expected_parser_info_out['parser_warnings'] == parser_info_out['parser_warnings'] @@ -152,7 +192,6 @@ def test_parse_xmlout_file_fortran_garbage_in_xmlout_file(): (which can happen in the case of some kill, or Non regular termination of FLEUR) """ from aiida_fleur.parsers.fleur import parse_xmlout_file - import os filename = os.path.abspath('./files/outxml/special/Fortran_garbage_BeTi_out.xml') @@ -161,22 +200,37 @@ def test_parse_xmlout_file_fortran_garbage_in_xmlout_file(): exp_partial_simple_out_dict = { 'bandgap_units': 'eV', 'energy': float('Inf'), - 'energy_hartree': float('Inf'), + 'energy_hartree': float('Inf'), 'fermi_energy': float('NaN'), - 'warnings': {'debug': {}, 'error': {}, 'info': {}, 'warning': {}}} + 'warnings': { + 'debug': {}, + 'error': {}, + 'info': {}, + 'warning': {} + } + } expected_parser_info_out = { - 'parser_info': 'AiiDA Fleur Parser v0.2beta', - 'parser_warnings': ['Could not convert: "**" to float, ValueError', - 'Could not convert: " !#@)!(U$*(Y" to float, ValueError'], - 'unparsed': [{'bandgap': '**', 'iteration': ' 19'}, - {'charge_density': ' !#@)!(U$*(Y', 'iteration': ' 19'}]} + 'parser_info': + 'AiiDA Fleur Parser v0.3.0', + 'parser_warnings': [ + 'Could not convert: "**" to float, ValueError', + 'Could not convert: " !#@)!(U$*(Y" to float, ValueError' + ], + 'unparsed': [{ + 'bandgap': '**', + 'iteration': ' 19' + }, { + 'charge_density': ' !#@)!(U$*(Y', + 'iteration': ' 19' + }] + } #TODO maybe in the case on unpared, things should be initialized, here they are missing... def isNaN(num): - return num != num + return math.isnan(num) #num != num - assert successful == True + assert successful assert exp_partial_simple_out_dict['energy'] == simple_out['energy'] assert exp_partial_simple_out_dict['energy_hartree'] == simple_out['energy_hartree'] assert isNaN(exp_partial_simple_out_dict['fermi_energy']) == isNaN(simple_out['fermi_energy']) @@ -191,26 +245,29 @@ def test_parse_xmlout_file_empty_file(): tests the behavior of the parse_xmlout_file routine in the case of an empty file """ from aiida_fleur.parsers.fleur import parse_xmlout_file - import os filename = os.path.abspath('./files/outxml/special/empty_out.xml') simple_out, complex_out, parser_info_out, successful = parse_xmlout_file(filename) expected_parser_info_out = { - 'parser_info': 'AiiDA Fleur Parser v0.2beta', - 'parser_warnings': ['The out.xml file is broken I try to repair it.', - 'Skipping the parsing of the xml file. Repairing was not possible.'], - 'unparsed': []} - - assert successful == False + 'parser_info': + 'AiiDA Fleur Parser v0.3.0', + 'parser_warnings': [ + 'The out.xml file is broken I try to repair it.', + 'Skipping the parsing of the xml file. Repairing was not possible.' + ], + 'unparsed': [] + } + + assert not successful assert expected_parser_info_out == parser_info_out # test parser success for all out files in folder file_path1 = '../files/outxml/all_test/' outxmlfilefolder = os.path.dirname(os.path.abspath(__file__)) -outxmlfilefolder_valid = os.path.abspath(os.path.join(outxmlfilefolder, file_path1)) +outxmlfilefolder_valid = os.path.abspath(os.path.join(outxmlfilefolder, file_path1)) outxmlfilelist = [] for subdir, dirs, files in os.walk(outxmlfilefolder_valid): @@ -219,7 +276,7 @@ def test_parse_xmlout_file_empty_file(): outxmlfilelist.append(os.path.join(subdir, file)) -@pytest.mark.parametrize("xmloutfile", outxmlfilelist) +@pytest.mark.parametrize('xmloutfile', outxmlfilelist) def test_fleurparse_all_xmlout_file(xmloutfile): """ tests if the routine that parsers the outputfile, succeeds for all out files @@ -228,32 +285,31 @@ def test_fleurparse_all_xmlout_file(xmloutfile): simple_out, complex_out, parser_info_out, successful = parse_xmlout_file(xmloutfile) - assert successful == True + assert successful # parse_dos_file, test for different dos files with spin and without -def parse_dos_file(): +@pytest.mark.skip(reason='Test is not implemented') +def test_parse_dos_file(): """ test for the fleur dos file parser. test if right output, datastructures are produced without error """ from aiida_fleur.parsers.fleur import parse_dos_file - pass - # test if array data is prodcued without error + assert False # parse_bands_file +@pytest.mark.skip(reason='Test is not implemented') def test_parse_bands_file(): """ test for band file parse routine. """ from aiida_fleur.parsers.fleur import parse_bands_file - pass # test if a bandsdata object is produced - - + assert False # test the full parser itself. on all kinds of different output files. @@ -261,5 +317,3 @@ def test_parse_bands_file(): # test if the right aiida datastructures are produced for different output # also check if errors are working... # if an empty and broken file works, broken before and after first iteration - - diff --git a/aiida_fleur/tests/parsers/test_inpgen_parser.py b/aiida_fleur/tests/parsers/test_inpgen_parser.py index c967a035d..5c682871c 100644 --- a/aiida_fleur/tests/parsers/test_inpgen_parser.py +++ b/aiida_fleur/tests/parsers/test_inpgen_parser.py @@ -1,8 +1,5 @@ - - +# -*- coding: utf-8 -*- # test all routines used by inpgen parser # TODO: implement all # test the full parser itself. - - diff --git a/aiida_fleur/tests/run_all_cov.sh b/aiida_fleur/tests/run_all_cov.sh index e907007ab..5c4b43b78 100755 --- a/aiida_fleur/tests/run_all_cov.sh +++ b/aiida_fleur/tests/run_all_cov.sh @@ -12,4 +12,3 @@ pytest --cov-report=term-missing --cov=aiida_fleur # pylint (for shield create, by hand, or write script to write total into svg) # pylint ../../aiida_fleur/ > outlint - diff --git a/aiida_fleur/tests/test_entrypoints.py b/aiida_fleur/tests/test_entrypoints.py index 132daf2fe..763a7ec30 100644 --- a/aiida_fleur/tests/test_entrypoints.py +++ b/aiida_fleur/tests/test_entrypoints.py @@ -9,12 +9,12 @@ # For further information please visit http://www.flapw.de or # # http://aiida-fleur.readthedocs.io/en/develop/ # ############################################################################### - +''' Contains smoke tests for all aiida-fleur entry points ''' from __future__ import absolute_import import pytest -@pytest.mark.usefixtures("aiida_profile", "clear_database") +@pytest.mark.usefixtures('aiida_profile', 'clear_database') class TestFleurEntrypoints: """ tests all the entry points of the Fleur plugin. Therefore if the plugin is @@ -77,10 +77,17 @@ def test_fleur_dos_wc_entry_point(self): def test_fleur_band_wc_entry_point(self): from aiida.plugins import WorkflowFactory - from aiida_fleur.workflows.band import fleur_band_wc + from aiida_fleur.workflows.band import FleurBandWorkChain workflow = WorkflowFactory('fleur.band') - assert workflow == fleur_band_wc + assert workflow == FleurBandWorkChain + + def test_fleur_banddos_wc_entry_point(self): + from aiida.plugins import WorkflowFactory + from aiida_fleur.workflows.banddos import FleurBandDosWorkChain + + workflow = WorkflowFactory('fleur.banddos') + assert workflow == FleurBandDosWorkChain def test_fleur_eos_wc_entry_point(self): from aiida.plugins import WorkflowFactory diff --git a/aiida_fleur/tests/workflows/test_workflows_builder_init.py b/aiida_fleur/tests/test_workflows_builder_init.py similarity index 94% rename from aiida_fleur/tests/workflows/test_workflows_builder_init.py rename to aiida_fleur/tests/test_workflows_builder_init.py index 224b5b592..5e1cc7e46 100644 --- a/aiida_fleur/tests/workflows/test_workflows_builder_init.py +++ b/aiida_fleur/tests/test_workflows_builder_init.py @@ -9,17 +9,20 @@ # For further information please visit http://www.flapw.de or # # http://aiida-fleur.readthedocs.io/en/develop/ # ############################################################################### - -# Here we test if the interfaces of the workflows are still the same +''' +Contains smoke tests for all workchains of aiida-fleur, +checks if builderis from aiida-core gets the correct class. +''' from __future__ import absolute_import import pytest -@pytest.mark.usefixtures("aiida_profile", "clear_database") +@pytest.mark.usefixtures('aiida_profile', 'clear_database') class TestFleurWorkchainInterfaces: """ Test all aiida-fleur workflow interfaces """ + # TODO # prepare some nodes: # structure, option, fleurinp, wfparameters @@ -56,9 +59,9 @@ def test_fleur_band_wc_init(self): """ Test the interface of the band workchain """ - from aiida_fleur.workflows.scf import FleurScfWorkChain + from aiida_fleur.workflows.band import FleurBandWorkChain - builder = FleurScfWorkChain.get_builder() + builder = FleurBandWorkChain.get_builder() # def test_fleur_band2_wc_init(self): # """ diff --git a/aiida_fleur/tests/tools/test_StructureData_util.py b/aiida_fleur/tests/tools/test_StructureData_util.py index 771e2f9ca..df4197b8d 100644 --- a/aiida_fleur/tests/tools/test_StructureData_util.py +++ b/aiida_fleur/tests/tools/test_StructureData_util.py @@ -1,3 +1,15 @@ +# -*- coding: utf-8 -*- +############################################################################### +# Copyright (c), Forschungszentrum Jülich GmbH, IAS-1/PGI-1, Germany. # +# All rights reserved. # +# This file is part of the AiiDA-FLEUR package. # +# # +# The code is hosted on GitHub at https://github.com/JuDFTteam/aiida-fleur # +# For further information on the license, see the LICENSE.txt file # +# For further information please visit http://www.flapw.de or # +# http://aiida-fleur.readthedocs.io/en/develop/ # +############################################################################### +''' Contains tests for StructureData util ''' from __future__ import absolute_import import pytest import numpy as np @@ -32,8 +44,7 @@ def test_is_primitive(generate_structure): structure.clear_sites() param = 5.43 structure.append_atom(position=(0., 0., 0.), symbols='Si', name='Si') - structure.append_atom(position=(param / 2., param / 2., param / 2.), - symbols='Si', name='Si') + structure.append_atom(position=(param / 2., param / 2., param / 2.), symbols='Si', name='Si') structure.store() assert not is_primitive(structure) @@ -47,12 +58,12 @@ def test_rescale_nowf(generate_structure): rescaled = rescale_nowf(structure, 1.05) rescaled_cell = np.array(rescaled.cell) - assert (rescaled_cell == 1.05 ** (1 / 3.) * old_cell).all() + assert (rescaled_cell == 1.05**(1 / 3.) * old_cell).all() positions_old = [x.position for x in structure.sites] positions_rescaled = [x.position for x in rescaled.sites] for position in positions_old: - assert tuple(pos * 1.05 ** (1 / 3.) for pos in position) in positions_rescaled + assert tuple(pos * 1.05**(1 / 3.) for pos in position) in positions_rescaled def test_supercell(generate_structure): @@ -73,8 +84,9 @@ def test_supercell(generate_structure): positions_rescaled = [x.position for x in supercell.sites] for position in positions_old: for x, y, z in product(range(2), range(3), range(4)): - test_pos = tuple(np.array(position) + x * np.array(structure.cell[0]) + - y * np.array(structure.cell[1]) + z * np.array(structure.cell[2])) + test_pos = tuple( + np.array(position) + x * np.array(structure.cell[0]) + y * np.array(structure.cell[1]) + + z * np.array(structure.cell[2])) assert test_pos in positions_rescaled @@ -86,7 +98,7 @@ def test_abs_to_rel(generate_structure): vector = [1.3575, 1.3575, 1.3575] assert np.isclose(abs_to_rel(vector, cell), np.array([0.25, 0.25, 0.25])).all() - assert abs_to_rel([1], cell) == False + assert not abs_to_rel([1], cell) def test_abs_to_rel_f(generate_film_structure): @@ -96,9 +108,8 @@ def test_abs_to_rel_f(generate_film_structure): cell = structure.cell vector = [1.4026317387183, 1.9836207751336, 0.25] - assert np.isclose(abs_to_rel_f(vector, cell, pbc=structure.pbc), - np.array([0.5, 0.5, 0.25])).all() - assert abs_to_rel_f([1], cell, pbc=structure.pbc) == False + assert np.isclose(abs_to_rel_f(vector, cell, pbc=structure.pbc), np.array([0.5, 0.5, 0.25])).all() + assert not abs_to_rel_f([1], cell, pbc=structure.pbc) def test_rel_to_abs(generate_structure): @@ -109,7 +120,7 @@ def test_rel_to_abs(generate_structure): vector = [0.25, 0.25, 0.25] assert np.isclose(rel_to_abs(vector, cell), np.array([1.3575, 1.3575, 1.3575])).all() - assert rel_to_abs([1], cell) == False + assert not rel_to_abs([1], cell) def test_rel_to_abs_f(generate_film_structure): @@ -119,9 +130,8 @@ def test_rel_to_abs_f(generate_film_structure): cell = structure.cell vector = [0.5, 0.5, 0.25] - assert np.isclose(rel_to_abs_f(vector, cell), - np.array([1.4026317387183, 1.9836207751336, 0.25])).all() - assert rel_to_abs_f([1], cell) == False + assert np.isclose(rel_to_abs_f(vector, cell), np.array([1.4026317387183, 1.9836207751336, 0.25])).all() + assert not rel_to_abs_f([1], cell) def test_break_symmetry_wf(generate_film_structure): @@ -134,7 +144,10 @@ def test_break_symmetry_wf(generate_film_structure): structure = generate_film_structure() structure = supercell_ncf(structure, 2, 2, 1) - out = break_symmetry_wf(structure, wf_para=Dict(dict={}), ) + out = break_symmetry_wf( + structure, + wf_para=Dict(dict={}), + ) structure_broken = out['new_structure'] kind_names = [x.kind_name for x in structure_broken.sites] @@ -204,78 +217,82 @@ def test_center_film_wf(generate_film_structure, generate_structure): structure_film = move_atoms_incell(structure_film, [0.0, 0.0, 1.1242]) centered_film = center_film_wf(structure_film) - assert [x.position for x in centered_film.sites] == [ - (0.0, 0.0, -1.2286013141372), - (1.4026317387183, 1.9836207751336, -0.17403050935524), - (0.0, 0.0, 1.2286013141372)] + assert [x.position for x in centered_film.sites] == [(0.0, 0.0, -1.2286013142), + (1.4026317387, 1.9836207751, -0.1740305093), + (0.0, 0.0, 1.2286013141)] with pytest.raises(TypeError): center_film(structure_bulk) -def test_get_layer_by_number(generate_film_structure): - from aiida_fleur.tools.StructureData_util import get_layer_by_number +def test_get_layers(generate_film_structure): + from aiida_fleur.tools.StructureData_util import get_layers structure = generate_film_structure() - assert get_layer_by_number(structure, 2) == ([((0.0, 0.0, 1.4026318234924429), 'Pt')], - [-1.0545708048, 0.0, 1.4026318235], - [1, 1, 1]) + assert get_layers(structure) == ([[([0.0, 0.0, -1.054570804781922], 'Fe')], + [([1.4026317387182539, 1.9836207751336201, 0.0], 'Pt')], + [([0.0, 0.0, 1.4026318234924429], 'Pt')]], [-1.0545708048, 0.0, + 1.4026318235], [1, 1, 1]) bohr_a_0 = 0.52917721092 structure.append_atom(position=(1.0, 0., -1.99285 * bohr_a_0), symbols='Fe') - assert get_layer_by_number(structure, 0) == ([((0.0, 0.0, -1.054570804781922), 'Fe'), - ((1.0, 0.0, -1.054570804781922), 'Fe')], - [-1.0545708048, 0.0, 1.4026318235], - [2, 1, 1]) + assert get_layers(structure) == ([[([0.0, 0.0, -1.054570804781922], 'Fe'), ([1.0, 0.0, -1.054570804781922], 'Fe')], + [([1.4026317387182539, 1.9836207751336201, 0.0], 'Pt')], + [([0.0, 0.0, 1.4026318234924429], 'Pt')]], [-1.0545708048, 0.0, + 1.4026318235], [2, 1, 1]) + + +create_slab_inputs = [{ + 'lattice': 'fcc', + 'miller': None, + 'host_symbol': 'Fe', + 'latticeconstant': 4.0, + 'size': (1, 1, 3), + 'replacements': { + -1: 'Pt', + 1: 'U' + }, + 'decimals': 10, + 'pop_last_layers': 0 +}, { + 'lattice': 'fcc', + 'miller': [[-1, 1, 0], [0, 0, 1], [1, 1, 0]], + 'host_symbol': 'Fe', + 'latticeconstant': 4.0, + 'size': (1, 1, 3), + 'replacements': { + 0: 'Pt' + }, + 'decimals': 10, + 'pop_last_layers': 1 +}, { + 'lattice': 'bcc', + 'miller': None, + 'host_symbol': 'Fe', + 'latticeconstant': 4.0, + 'size': (1, 1, 3), + 'replacements': { + -3: 'Pt' + }, + 'decimals': 10, + 'pop_last_layers': 0 +}] +create_slab_chem_elements = [['Fe', 'Fe', 'U', 'U', 'Fe', 'Fe', 'Fe', 'Fe', 'Fe', 'Fe', 'Pt', 'Pt'], + ['Pt', 'Fe', 'Fe', 'Fe', 'Fe'], ['Fe', 'Fe', 'Fe', 'Pt', 'Fe', 'Fe']] -create_slab_inputs = [{'lattice': 'fcc', 'miller': None, 'host_symbol': 'Fe', - 'latticeconstant': 4.0, 'size': (1, 1, 3), - 'replacements': {-1: 'Pt', 1: 'U'}, - 'decimals': 10, 'pop_last_layers': 0}, - - {'lattice': 'fcc', 'miller': [[-1, 1, 0], [0, 0, 1], [1, 1, 0]], - 'host_symbol': 'Fe', - 'latticeconstant':4.0, 'size':(1, 1, 3), - 'replacements':{0: 'Pt'}, - 'decimals': 10, 'pop_last_layers': 1}, +create_slab_positions = [ + np.array([[0., 0., 0.], [2., 2., 0.], [2., 0., 2.], [0., 2., 2.], [0., 0., 4.], [2., 2., 4.], [2., 0., 6.], + [0., 2., 6.], [0., 0., 8.], [2., 2., 8.], [2., 0., 10.], [0., 2., 10.]]), + np.array([[0.00000000, 0., 0.00000000], [1.41421356, 2., 1.41421356], [-0.0000000, 0., 2.82842712], + [1.41421356, 2., 4.24264069], [-0.0000000, 0., 5.65685425]]), + np.array([[0., 0., 0.], [2., 2., 2.], [0., 0., 4.], [2., 2., 6.], [0., 0., 8.], [2., 2., 10.]]) +] - {'lattice': 'bcc', 'miller': None, 'host_symbol': 'Fe', - 'latticeconstant': 4.0, 'size': (1, 1, 3), - 'replacements': {-3: 'Pt'}, - 'decimals': 10, 'pop_last_layers': 0}] -create_slab_chem_elements = [['Fe', 'Fe', 'U', 'U', 'Fe', 'Fe', 'Fe', 'Fe', 'Fe', 'Fe', 'Pt', 'Pt'], - ['Pt', 'Fe', 'Fe', 'Fe', 'Fe'], - ['Fe', 'Fe', 'Fe', 'Pt', 'Fe', 'Fe']] - -create_slab_positions = [np.array([[0., 0., 0.], - [2., 2., 0.], - [2., 0., 2.], - [0., 2., 2.], - [0., 0., 4.], - [2., 2., 4.], - [2., 0., 6.], - [0., 2., 6.], - [0., 0., 8.], - [2., 2., 8.], - [2., 0., 10.], - [0., 2., 10.]]), - np.array([[0.00000000, 0., 0.00000000], - [1.41421356, 2., 1.41421356], - [-0.0000000, 0., 2.82842712], - [1.41421356, 2., 4.24264069], - [-0.0000000, 0., 5.65685425]]), - np.array([[0., 0., 0.], - [2., 2., 2.], - [0., 0., 4.], - [2., 2., 6.], - [0., 0., 8.], - [2., 2., 10.]])] - - -@pytest.mark.parametrize('inputs,symbols,positions', zip(create_slab_inputs, create_slab_chem_elements, create_slab_positions)) +@pytest.mark.parametrize('inputs,symbols,positions', + zip(create_slab_inputs, create_slab_chem_elements, create_slab_positions)) def test_create_manual_slab_ase(inputs, symbols, positions): from aiida_fleur.tools.StructureData_util import create_manual_slab_ase @@ -291,10 +308,15 @@ def test_magnetic_slab_from_relaxed(generate_film_structure): from aiida_fleur.tools.StructureData_util import create_manual_slab_ase import math - inp = {'lattice': 'fcc', 'miller': [[-1, 1, 0], [0, 0, 1], [1, 1, 0]], - 'host_symbol': 'Pt', - 'latticeconstant': 4.0, 'size': (1, 1, 1), - 'decimals': 10, 'pop_last_layers': 0} + inp = { + 'lattice': 'fcc', + 'miller': [[-1, 1, 0], [0, 0, 1], [1, 1, 0]], + 'host_symbol': 'Pt', + 'latticeconstant': 4.0, + 'size': (1, 1, 1), + 'decimals': 10, + 'pop_last_layers': 0 + } structure2 = create_manual_slab_ase(**inp) @@ -303,8 +325,62 @@ def test_magnetic_slab_from_relaxed(generate_film_structure): result = magnetic_slab_from_relaxed(relaxed_structure, structure2, 5, 2) names = ['Fe', 'Pt', 'Pt', 'Pt', 'Pt'] - z_positions = [-2.648605745990961, -1.5940349412090389, -0.1798213788090388, - 1.2343921835909613, 2.648605745990961] + z_positions = [-2.648605745990961, -1.5940349412090389, -0.1798213788090388, 1.2343921835909613, 2.648605745990961] for site, correct_name, correct_position in zip(result.sites, names, z_positions): assert site.kind_name == correct_name assert math.isclose(site.position[2], correct_position) + + +def test_request_average_bond_length(generate_film_structure): + import os + from aiida_fleur.tools.StructureData_util import request_average_bond_length + + user_api_key = os.getenv('USER_API_KEY') + if not user_api_key: + pytest.skip('No USER_API_KEY given, skip the test') + + structure = generate_film_structure() + result = request_average_bond_length(['Fe', 'Pt'], ['Fe', 'Pt'], user_api_key=user_api_key).get_dict() + assert result == { + 'Fe': { + 'Fe': 2.4651768430600254, + 'Pt': 2.633878591723135 + }, + 'Pt': { + 'Fe': 2.633878591723135, + 'Pt': 2.8120017054377606 + } + } + + +def test_adjust_film_relaxation(generate_film_structure): + import os + from aiida_fleur.tools.StructureData_util import adjust_film_relaxation + + user_api_key = os.getenv('USER_API_KEY') + if not user_api_key: + pytest.skip('No USER_API_KEY given, skip the test') + + suggestion = { + 'Fe': { + 'Fe': 2.4651768430600254, + 'Pt': 2.633878591723135 + }, + 'Pt': { + 'Fe': 2.633878591723135, + 'Pt': 2.8120017054377606 + } + } + + structure = generate_film_structure() + result = adjust_film_relaxation(structure, suggestion, hold_layers=0) + print(structure.sites) + print(result.sites) + assert result.sites[0].position[2] == -1.1957065898 + assert result.sites[1].position[2] == 0.1782640794 + assert result.sites[2].position[2] == 1.1957065898 + + result = adjust_film_relaxation(structure, suggestion, 'Pt', 2.77) + assert result.sites[0].position[2] == -1.1709859694 + assert result.sites[1].position[2] == 0.2602185234 + assert result.sites[2].position[2] == 1.1709859694 diff --git a/aiida_fleur/tests/tools/test_common_aiida.py b/aiida_fleur/tests/tools/test_common_aiida.py index 51c87a5da..b23fa745f 100644 --- a/aiida_fleur/tests/tools/test_common_aiida.py +++ b/aiida_fleur/tests/tools/test_common_aiida.py @@ -1,3 +1,6 @@ +# -*- coding: utf-8 -*- +'''Contains tests for functions in common_aiida''' + from __future__ import absolute_import import os @@ -6,14 +9,13 @@ def test_create_group(capsys): - "Test group creation" + 'Test group creation' from aiida_fleur.tools.common_aiida import create_group from aiida.orm import Group, Dict para = Dict(dict={}) para.store() - group = create_group(name='test_group', nodes=[para.pk, 'not-existent-uuid'], - description='test_description') + group = create_group(name='test_group', nodes=[para.pk, 'not-existent-uuid'], description='test_description') captured = capsys.readouterr() @@ -103,10 +105,11 @@ def test_import_extras(temp_dir, capsys): import_extras(empty_file) captured = capsys.readouterr() - assert captured.out == ('The file has to be loadable by json. i.e json format' - ' (which it is not).\n') + assert captured.out == ('The file has to be loadable by json. i.e json format' ' (which it is not).\n') +''' +# FIXME def test_delete_trash(monkeypatch): """Test removing trash nodes from the DB. Also covers delete_nodes.""" from aiida_fleur.tools.common_aiida import delete_trash @@ -128,6 +131,7 @@ def test_delete_trash(monkeypatch): pass else: assert 0 +''' def test_get_nodes_from_group(): diff --git a/aiida_fleur/tests/tools/test_common_fleur_wf.py b/aiida_fleur/tests/tools/test_common_fleur_wf.py index 7cf24c69a..a45881f8d 100644 --- a/aiida_fleur/tests/tools/test_common_fleur_wf.py +++ b/aiida_fleur/tests/tools/test_common_fleur_wf.py @@ -1,3 +1,15 @@ +# -*- coding: utf-8 -*- +############################################################################### +# Copyright (c), Forschungszentrum Jülich GmbH, IAS-1/PGI-1, Germany. # +# All rights reserved. # +# This file is part of the AiiDA-FLEUR package. # +# # +# The code is hosted on GitHub at https://github.com/JuDFTteam/aiida-fleur # +# For further information on the license, see the LICENSE.txt file # +# For further information please visit http://www.flapw.de or # +# http://aiida-fleur.readthedocs.io/en/develop/ # +############################################################################### +'''Contains tests for workfunction helpers in common_fleur_wf.py''' from __future__ import absolute_import import pytest import os @@ -29,9 +41,20 @@ def test_get_inputs_fleur(): from aiida_fleur.tools.common_fleur_wf import get_inputs_fleur from aiida.orm import Dict - inputs = {'code': 'code', 'remote': 'remote', 'fleurinp': 'fleurinp', - 'options': {'custom_scheduler_commands': 'test_command'}, 'label': 'label', - 'description': 'description', 'settings': {'test': 1}, 'serial': False} + inputs = { + 'code': 'code', + 'remote': 'remote', + 'fleurinp': 'fleurinp', + 'options': { + 'custom_scheduler_commands': 'test_command' + }, + 'label': 'label', + 'description': 'description', + 'settings': { + 'test': 1 + }, + 'serial': False + } results = get_inputs_fleur(**inputs) @@ -43,12 +66,18 @@ def test_get_inputs_fleur(): assert results['parent_folder'] == 'remote' assert results['description'] == 'description' assert results['label'] == 'label' - assert out_options == {'custom_scheduler_commands': 'test_command', - 'withmpi': True} + assert out_options == {'custom_scheduler_commands': 'test_command', 'withmpi': True} assert out_settings == {'test': 1} - inputs = {'code': 'code', 'remote': 'remote', 'fleurinp': 'fleurinp', - 'options': {'custom_scheduler_commands': 'test_command'}, 'serial': True} + inputs = { + 'code': 'code', + 'remote': 'remote', + 'fleurinp': 'fleurinp', + 'options': { + 'custom_scheduler_commands': 'test_command' + }, + 'serial': True + } results = get_inputs_fleur(**inputs) @@ -56,8 +85,14 @@ def test_get_inputs_fleur(): assert results['description'] == '' assert results['label'] == '' - assert out_options == {'custom_scheduler_commands': 'test_command', - 'withmpi': False, 'resources': {"num_machines": 1}} + assert out_options == { + 'custom_scheduler_commands': 'test_command', + 'withmpi': False, + 'resources': { + 'num_machines': 1, + 'num_mpiprocs_per_machine': 1 + } + } def test_get_inputs_inpgen(fixture_code, generate_structure): @@ -74,32 +109,60 @@ def test_get_inputs_inpgen(fixture_code, generate_structure): params = Dict(dict={'test': 1}) - inputs = {'structure': structure, 'inpgencode': code, 'options': {}, - 'label': 'label', 'description': 'description', - 'params': params} - returns = {'metadata': { - 'options': {'withmpi': False, 'resources': {'num_machines': 1}}, - 'description': 'description', 'label': 'label'}, - 'code': code, 'parameters': params, 'structure': structure + inputs = { + 'structure': structure, + 'inpgencode': code, + 'options': {}, + 'label': 'label', + 'description': 'description', + 'params': params + } + returns = { + 'metadata': { + 'options': { + 'withmpi': False, + 'resources': { + 'num_machines': 1, + 'num_mpiprocs_per_machine': 1 + } + }, + 'description': 'description', + 'label': 'label' + }, + 'code': code, + 'parameters': params, + 'structure': structure } assert get_inputs_inpgen(**inputs) == returns # repeat without a label and description - inputs = {'structure': structure, 'inpgencode': code, 'options': {}, - 'params': params} - returns = {'metadata': { - 'options': {'withmpi': False, 'resources': {'num_machines': 1}}, - 'description': '', 'label': ''}, - 'code': code, 'parameters': params, 'structure': structure} + inputs = {'structure': structure, 'inpgencode': code, 'options': {}, 'params': params} + returns = { + 'metadata': { + 'options': { + 'withmpi': False, + 'resources': { + 'num_machines': 1, + 'num_mpiprocs_per_machine': 1 + } + }, + 'description': '', + 'label': '' + }, + 'code': code, + 'parameters': params, + 'structure': structure + } assert get_inputs_inpgen(**inputs) == returns -@pytest.mark.skip(reason="Test is not implemented") +@pytest.mark.skip(reason='Test is not implemented') def test_get_scheduler_extras(): from aiida_fleur.tools.common_fleur_wf import get_scheduler_extras + # test_and_get_codenode @@ -121,15 +184,15 @@ def test_test_and_get_codenode_inpgen(fixture_code): assert isinstance(test_and_get_codenode(code, expected), Code) with pytest.raises(ValueError) as msg: test_and_get_codenode(code, nonexpected, use_exceptions=True) - assert str(msg.value) == ("Given Code node is not of expected code type.\n" - "Valid labels for a fleur.fleur executable are:\n" - "* fleur_test@localhost-test") + assert str(msg.value) == ('Given Code node is not of expected code type.\n' + 'Valid labels for a fleur.fleur executable are:\n' + '* fleur_test@localhost-test') with pytest.raises(ValueError) as msg: test_and_get_codenode(code, not_existing, use_exceptions=True) - assert str(msg.value) == ("Code not valid, and no valid codes for fleur.not_existing.\n" - "Configure at least one first using\n" - " verdi code setup") + assert str(msg.value) == ('Code not valid, and no valid codes for fleur.not_existing.\n' + 'Configure at least one first using\n' + ' verdi code setup') def test_get_kpoints_mesh_from_kdensity(generate_structure): @@ -141,73 +204,81 @@ def test_get_kpoints_mesh_from_kdensity(generate_structure): assert isinstance(b, KpointsData) -@pytest.mark.skip(reason="Test is not implemented") +@pytest.mark.skip(reason='Test is not implemented') def test_determine_favorable_reaction(): from aiida_fleur.tools.common_fleur_wf import determine_favorable_reaction + # @pytest.mark.skip(reason="There seems to be now way to add outputs to CalcJobNode") -def test_performance_extract_calcs(fixture_localhost, - generate_calc_job_node): +def test_performance_extract_calcs(fixture_localhost, generate_calc_job_node): from aiida_fleur.tools.common_fleur_wf import performance_extract_calcs from aiida.common.links import LinkType from aiida.orm import Dict - out = Dict(dict={'title': 'A Fleur input generator calculation with aiida', - 'energy': -138529.7052157, - 'bandgap': 6.0662e-06, - 'end_date': {'date': '2019/11/12', 'time': '16:12:08'}, - 'unparsed': [], - 'walltime': 43, - 'warnings': {'info': {}, 'debug': {}, 'error': {}, 'warning': {}}, - 'start_date': {'date': '2019/11/12', 'time': '16:11:25'}, - 'parser_info': 'AiiDA Fleur Parser v0.2beta', - 'CalcJob_uuid': '3dc62d43-b607-4415-920f-e0d34e805711', - 'creator_name': 'fleur 30', - 'energy_units': 'eV', - 'kmax': 4.2, - 'fermi_energy': 0.0605833326, - 'spin_density': 0.0792504665, - 'bandgap_units': 'eV', - 'force_largest': 0.0, - 'energy_hartree': -5090.8728101494, - 'walltime_units': 'seconds', - 'charge_density1': 0.0577674505, - 'charge_density2': 0.0461840944, - 'number_of_atoms': 4, - 'parser_warnings': [], - 'magnetic_moments': [3.3720063737, 3.3719345944, 3.3719329177, 3.3719329162], - 'number_of_kpoints': 8, - 'number_of_species': 1, - 'fermi_energy_units': 'Htr', - 'sum_of_eigenvalues': -2973.4129786677, - 'output_file_version': '0.27', - 'energy_hartree_units': 'Htr', - 'number_of_atom_types': 4, - 'number_of_iterations': 11, - 'number_of_symmetries': 8, - 'energy_core_electrons': -2901.8120489845, - 'magnetic_moment_units': 'muBohr', - 'overall_charge_density': 0.0682602474, - 'creator_target_structure': ' ', - 'energy_valence_electrons': -71.6009296831, - 'magnetic_spin_up_charges': [9.1494766577, - 9.1494806151, - 9.1494806833, - 9.1494806834], - 'orbital_magnetic_moments': [], - 'density_convergence_units': 'me/bohr^3', - 'number_of_spin_components': 2, - 'charge_den_xc_den_integral': -223.295208608, - 'magnetic_spin_down_charges': [5.777470284, - 5.7775460208, - 5.7775477657, - 5.7775477672], - 'number_of_iterations_total': 11, - 'creator_target_architecture': 'GEN', - 'orbital_magnetic_moment_units': 'muBohr', - 'orbital_magnetic_spin_up_charges': [], - 'orbital_magnetic_spin_down_charges': []}) + out = Dict( + dict={ + 'title': 'A Fleur input generator calculation with aiida', + 'energy': -138529.7052157, + 'bandgap': 6.0662e-06, + 'end_date': { + 'date': '2019/11/12', + 'time': '16:12:08' + }, + 'unparsed': [], + 'walltime': 43, + 'warnings': { + 'info': {}, + 'debug': {}, + 'error': {}, + 'warning': {} + }, + 'start_date': { + 'date': '2019/11/12', + 'time': '16:11:25' + }, + 'parser_info': 'AiiDA Fleur Parser v0.2beta', + 'CalcJob_uuid': '3dc62d43-b607-4415-920f-e0d34e805711', + 'creator_name': 'fleur 30', + 'energy_units': 'eV', + 'kmax': 4.2, + 'fermi_energy': 0.0605833326, + 'spin_density': 0.0792504665, + 'bandgap_units': 'eV', + 'force_largest': 0.0, + 'energy_hartree': -5090.8728101494, + 'walltime_units': 'seconds', + 'charge_density1': 0.0577674505, + 'charge_density2': 0.0461840944, + 'number_of_atoms': 4, + 'parser_warnings': [], + 'magnetic_moments': [3.3720063737, 3.3719345944, 3.3719329177, 3.3719329162], + 'number_of_kpoints': 8, + 'number_of_species': 1, + 'fermi_energy_units': 'Htr', + 'sum_of_eigenvalues': -2973.4129786677, + 'output_file_version': '0.27', + 'energy_hartree_units': 'Htr', + 'number_of_atom_types': 4, + 'number_of_iterations': 11, + 'number_of_symmetries': 8, + 'energy_core_electrons': -2901.8120489845, + 'magnetic_moment_units': 'muBohr', + 'overall_charge_density': 0.0682602474, + 'creator_target_structure': ' ', + 'energy_valence_electrons': -71.6009296831, + 'magnetic_spin_up_charges': [9.1494766577, 9.1494806151, 9.1494806833, 9.1494806834], + 'orbital_magnetic_moments': [], + 'density_convergence_units': 'me/bohr^3', + 'number_of_spin_components': 2, + 'charge_den_xc_den_integral': -223.295208608, + 'magnetic_spin_down_charges': [5.777470284, 5.7775460208, 5.7775477657, 5.7775477672], + 'number_of_iterations_total': 11, + 'creator_target_architecture': 'GEN', + 'orbital_magnetic_moment_units': 'muBohr', + 'orbital_magnetic_spin_up_charges': [], + 'orbital_magnetic_spin_down_charges': [] + }) out.store() node = generate_calc_job_node('fleur.fleur', fixture_localhost) @@ -217,54 +288,73 @@ def test_performance_extract_calcs(fixture_localhost, result = performance_extract_calcs([node.pk]) - assert result == {'n_symmetries': [8], 'n_spin_components': [2], 'n_kpoints': [8], - 'n_iterations': [11], 'walltime_sec': [43], - 'walltime_sec_per_it': [3.909090909090909], - 'n_iterations_total': [11], 'density_distance': [0.0682602474], - 'computer': ['localhost-test'], - 'n_atoms': [4], 'kmax': [4.2], 'cost': [75866.11200000001], - 'costkonstant': [147.02734883720933], 'walltime_sec_cor': [43], - 'total_cost': [834527.2320000001], 'fermi_energy': [0.0605833326], - 'bandgap': [6.0662e-06], 'energy': [-138529.7052157], - 'force_largest': [0.0], - 'ncores': [12], 'pk': [node.pk], 'uuid': [node.uuid], - 'serial': [False], - 'resources': [{'num_machines': 1, 'num_mpiprocs_per_machine': 1}]} - - -inputs_optimize = [(4, 8, 3, True, 0.5, None, 720), - (4, 8, 3, True, 2, None, 720), - (4, 8, 3, True, 100, None, 720), - (4, 8, 3, True, 100, None, 720, 0.5), - (4, 8, 3, False, 0.5, None, 720)] + assert result == { + 'n_symmetries': [8], + 'n_spin_components': [2], + 'n_kpoints': [8], + 'n_iterations': [11], + 'walltime_sec': [43], + 'walltime_sec_per_it': [3.909090909090909], + 'n_iterations_total': [11], + 'density_distance': [0.0682602474], + 'computer': ['localhost-test'], + 'n_atoms': [4], + 'kmax': [4.2], + 'cost': [75866.11200000001], + 'costkonstant': [147.02734883720933], + 'walltime_sec_cor': [43], + 'total_cost': [834527.2320000001], + 'fermi_energy': [0.0605833326], + 'bandgap': [6.0662e-06], + 'energy': [-138529.7052157], + 'force_largest': [0.0], + 'ncores': [12], + 'pk': [node.pk], + 'uuid': [node.uuid], + 'serial': [False], + 'resources': [{ + 'num_machines': 1, + 'num_mpiprocs_per_machine': 1 + }] + } + + +inputs_optimize = [(4, 8, 3, True, 0.5, None, 720), (4, 8, 3, True, 2, None, 720), (4, 8, 3, True, 100, None, 720), + (4, 8, 3, True, 100, None, 720, 0.5), (4, 8, 3, False, 0.5, None, 720)] results_optimize = [ - (4, 3, 8, 'Computational setup is perfect! Nodes: 4, MPIs per node 3, OMP per MPI 8. Number of k-points is 720'), + (4, 4, 6, 'Computational setup is perfect! Nodes: 4, MPIs per node 4, OMP per MPI 6. Number of k-points is 720'), (4, 6, 4, 'Computational setup is perfect! Nodes: 4, MPIs per node 6, OMP per MPI 4. Number of k-points is 720'), (4, 12, 2, 'Computational setup is perfect! Nodes: 4, MPIs per node 12, OMP per MPI 2. Number of k-points is 720'), (3, 24, 1, 'WARNING: Changed the number of nodes from 4 to 3'), - (4, 20, 1, 'WARNING: Changed the number of MPIs per node from 8 to 20 an OMP from 3 to 1. Changed the number of nodes from 4 to 4. Number of k-points is 720.')] + (4, 20, 1, + 'WARNING: Changed the number of MPIs per node from 8 to 20 and OMP from 3 to 1. Changed the number of nodes from 4 to 4. Number of k-points is 720.' + ) +] -@pytest.mark.parametrize('input,result_correct', zip(inputs_optimize, results_optimize)) -def test_optimize_calc_options(input, result_correct): +@pytest.mark.parametrize('inputs,result_correct', zip(inputs_optimize, results_optimize)) +def test_optimize_calc_options(inputs, result_correct): from aiida_fleur.tools.common_fleur_wf import optimize_calc_options - result = optimize_calc_options(*input) - + result = optimize_calc_options(*inputs) assert result == result_correct -def test_find_last_in_restart(fixture_localhost, - generate_calc_job_node, generate_work_chain_node): - from aiida_fleur.tools.common_fleur_wf import find_last_in_restart +def test_find_last_submitted_calcjob(fixture_localhost, generate_calc_job_node, generate_work_chain_node): + from aiida_fleur.tools.common_fleur_wf import find_last_submitted_calcjob from aiida.common.links import LinkType + from aiida.common.exceptions import NotExistent node1 = generate_calc_job_node('fleur.fleur', fixture_localhost) node2 = generate_calc_job_node('fleur.fleur', fixture_localhost) node3 = generate_calc_job_node('fleur.fleur', fixture_localhost) node_main = generate_work_chain_node('fleur.base_relax', fixture_localhost) + node_main.store() + + with pytest.raises(NotExistent): + result = find_last_submitted_calcjob(node_main) node1.add_incoming(node_main, link_type=LinkType.CALL_CALC, link_label='CALL') node2.add_incoming(node_main, link_type=LinkType.CALL_CALC, link_label='CALL') @@ -274,6 +364,31 @@ def test_find_last_in_restart(fixture_localhost, node2.store() node3.store() - result = find_last_in_restart(node_main) + result = find_last_submitted_calcjob(node_main) + + assert result == node3.uuid + + +def test_find_last_submitted_workchain(fixture_localhost, generate_work_chain_node): + from aiida_fleur.tools.common_fleur_wf import find_last_submitted_workchain + from aiida.common.links import LinkType + from aiida.common.exceptions import NotExistent + + node1 = generate_work_chain_node('fleur.base_relax', fixture_localhost) + node2 = generate_work_chain_node('fleur.base_relax', fixture_localhost) + node3 = generate_work_chain_node('fleur.base_relax', fixture_localhost) + + node_main = generate_work_chain_node('fleur.base_relax', fixture_localhost) + + node1.add_incoming(node_main, link_type=LinkType.CALL_WORK, link_label='CALL') + node2.add_incoming(node_main, link_type=LinkType.CALL_WORK, link_label='CALL') + node3.add_incoming(node_main, link_type=LinkType.CALL_WORK, link_label='CALL') + + node_main.store() + node1.store() + node2.store() + node3.store() + + result = find_last_submitted_workchain(node_main) assert result == node3.uuid diff --git a/aiida_fleur/tests/tools/test_common_fleur_wf_util.py b/aiida_fleur/tests/tools/test_common_fleur_wf_util.py index f6a156db2..797f9630a 100644 --- a/aiida_fleur/tests/tools/test_common_fleur_wf_util.py +++ b/aiida_fleur/tests/tools/test_common_fleur_wf_util.py @@ -1,3 +1,15 @@ +# -*- coding: utf-8 -*- +############################################################################### +# Copyright (c), Forschungszentrum Jülich GmbH, IAS-1/PGI-1, Germany. # +# All rights reserved. # +# This file is part of the AiiDA-FLEUR package. # +# # +# The code is hosted on GitHub at https://github.com/JuDFTteam/aiida-fleur # +# For further information on the license, see the LICENSE.txt file # +# For further information please visit http://www.flapw.de or # +# http://aiida-fleur.readthedocs.io/en/develop/ # +############################################################################### +'''Contains tests for various functions in common_fleur_wf_util.py''' from __future__ import absolute_import import pytest import numpy as np @@ -12,19 +24,21 @@ def test_convert_formula_to_formula_unit(): def test_get_natoms_element_Be2W(): from aiida_fleur.tools.common_fleur_wf_util import get_natoms_element - assert get_natoms_element('Be2W') == {'Be' : 2, 'W' : 1} + assert get_natoms_element('Be2W') == {'Be': 2, 'W': 1} + def test_ucell_to_atompr(): from aiida_fleur.tools.common_fleur_wf_util import ucell_to_atompr - correct_result = np.array([0.7947019867549668, 0.11258278145695365, 0.09271523178807947]) + correct_result = np.array([0.7947019867549668, 0.11258278145695365, 0.09271523178807947]) correct_error = np.array([0.013571924638784224, 0.01136565320488641, 0.0018444037839109243]) atompro, atompro_err = ucell_to_atompr([10, 1, 7], ['Be12Ti', 'Be17Ti2', 'Be2'], element='Be') assert (atompro == correct_result).all() - atompro, atompro_err = ucell_to_atompr([10, 1, 7], ['Be12Ti', 'Be17Ti2', 'Be2'], element='Be', - error_ratio=[0.1,0.1,0.1]) + atompro, atompro_err = ucell_to_atompr([10, 1, 7], ['Be12Ti', 'Be17Ti2', 'Be2'], + element='Be', + error_ratio=[0.1, 0.1, 0.1]) assert (atompro == correct_result).all() assert (atompro_err == correct_error).all() @@ -38,39 +52,39 @@ def test_calc_stoi(): norm_stoi, errors_stoi = calc_stoi([10, 1, 7], ['Be12Ti', 'Be17Ti2', 'Be2']) assert norm_stoi == {'Be': 12.583333333333334, 'Ti': 1.0} - assert errors_stoi == {} + assert errors_stoi == {} def test_get_atomprocent_Be24W2(): from aiida_fleur.tools.common_fleur_wf_util import get_atomprocent - assert get_atomprocent('Be24W2') == {'Be': 24./26., 'W' : 2./26.} + assert get_atomprocent('Be24W2') == {'Be': 24. / 26., 'W': 2. / 26.} -@pytest.mark.skip(reason="The function is not implemented") -def test_get_weight_procent(): - from aiida_fleur.tools.common_fleur_wf_util import get_weight_procent - pass +#@pytest.mark.skip(reason='The function is not implemented') +#def test_get_weight_procent(): +# from aiida_fleur.tools.common_fleur_wf_util import get_weight_procent +# pass def test_determine_formation_energy(): from aiida_fleur.tools.common_fleur_wf_util import determine_formation_energy - + # form energy is per atom here... form_en_exp = [-0.16666666666666666, 0.0] - form_en_dict_exp = {'BeW' : 0.0, 'Be2W': -0.16666666666666666} - form_en, form_en_dict = determine_formation_energy({'Be2W' : 2.5, 'BeW' : 2}, {'Be' : 1, 'W' : 1}) + form_en_dict_exp = {'BeW': 0.0, 'Be2W': -0.16666666666666666} + form_en, form_en_dict = determine_formation_energy({'Be2W': 2.5, 'BeW': 2}, {'Be': 1, 'W': 1}) assert form_en == form_en_exp assert form_en_dict == form_en_dict_exp -@pytest.mark.skip(reason="Test is not implemented") +@pytest.mark.skip(reason='Test is not implemented') def test_determine_convex_hull(): from aiida_fleur.tools.common_fleur_wf_util import determine_convex_hull def test_inpgen_dict_set_mesh(generate_kpoints_mesh): from aiida_fleur.tools.common_fleur_wf_util import inpgen_dict_set_mesh - + inpgendict = {'test': 'test_data'} inpgendict_new = inpgen_dict_set_mesh(inpgendict, (1, 2, 3)) expected_result = {'test': 'test_data', 'kpt': {'div1': 1, 'div2': 2, 'div3': 3}} @@ -83,7 +97,7 @@ def test_inpgen_dict_set_mesh(generate_kpoints_mesh): def test_powerset(): from aiida_fleur.tools.common_fleur_wf_util import powerset - + res = [(), ('Be',), ('W',), ('Be2W',), ('Be', 'W'), ('Be', 'Be2W'), ('W', 'Be2W'), ('Be', 'W', 'Be2W')] length = len(res) assert powerset([1, 2, 3]) == [(), (1,), (2,), (3,), (1, 2), (1, 3), (2, 3), (1, 2, 3)] @@ -94,9 +108,10 @@ def test_powerset(): def test_determine_reactions(): from aiida_fleur.tools.common_fleur_wf_util import determine_reactions - res = ['1*Be12W->1*Be12W', '1*Be12W->1*Be2W+10*Be', - '2*Be12W->1*Be2W+1*Be22W', '1*Be12W->12*Be+1*W', - '11*Be12W->5*W+6*Be22W'] + res = [ + '1*Be12W->1*Be12W', '1*Be12W->1*Be2W+10*Be', '2*Be12W->1*Be2W+1*Be22W', '1*Be12W->12*Be+1*W', + '11*Be12W->5*W+6*Be22W' + ] n_equations = len(res) assert determine_reactions('Be12W', ['Be12W', 'Be2W', 'Be', 'W', 'Be22W']) == res @@ -105,24 +120,24 @@ def test_determine_reactions(): def test_convert_eq_to_dict(): from aiida_fleur.tools.common_fleur_wf_util import convert_eq_to_dict - + res_dict = {'products': {'Be': 15, 'Be2Ti': 1}, 'educts': {'Be12Ti': 1}} assert convert_eq_to_dict('1*Be12Ti->10*Be+1*Be2Ti+5*Be') == res_dict -@pytest.mark.skip(reason="Test is not implemented") +@pytest.mark.skip(reason='Test is not implemented') def test_get_enhalpy_of_equation(): from aiida_fleur.tools.common_fleur_wf_util import get_enhalpy_of_equation -@pytest.mark.parametrize("test_input,expected", - [("C7H16+O2 -> CO2+H2O", '1*C7H16+11*O2 ->7* CO2+8*H2O'), - ("Be12W->Be2W+W+Be", None), ("Be12WO->Be2WO+W+Be+O2", None), - ("Be12W->Be22W+Be12W", None), ("Be12W->Be12W", '1*Be12W->1*Be12W')]) +@pytest.mark.parametrize('test_input,expected', [('C7H16+O2 -> CO2+H2O', '1*C7H16+11*O2 ->7* CO2+8*H2O'), + ('Be12W->Be2W+W+Be', None), ('Be12WO->Be2WO+W+Be+O2', None), + ('Be12W->Be22W+Be12W', None), ('Be12W->Be12W', '1*Be12W->1*Be12W')]) def test_balance_equation(test_input, expected): from aiida_fleur.tools.common_fleur_wf_util import balance_equation assert balance_equation(test_input) == expected -@pytest.mark.skip(reason="Test is not implemented") + +@pytest.mark.skip(reason='Test is not implemented') def test_check_eos_energies(): from aiida_fleur.tools.common_fleur_wf_util import check_eos_energies diff --git a/aiida_fleur/tests/tools/test_create_corehole.py b/aiida_fleur/tests/tools/test_create_corehole.py index 736ad34ce..f33128211 100644 --- a/aiida_fleur/tests/tools/test_create_corehole.py +++ b/aiida_fleur/tests/tools/test_create_corehole.py @@ -1,4 +1,3 @@ +# -*- coding: utf-8 -*- # create_corehole_para # test interface of corehole para, that the parameter dict that comes out is right - - diff --git a/aiida_fleur/tests/tools/test_data_handling.py b/aiida_fleur/tests/tools/test_data_handling.py index 7bca0c4a9..edd89b285 100644 --- a/aiida_fleur/tests/tools/test_data_handling.py +++ b/aiida_fleur/tests/tools/test_data_handling.py @@ -1,3 +1,15 @@ +# -*- coding: utf-8 -*- +############################################################################### +# Copyright (c), Forschungszentrum Jülich GmbH, IAS-1/PGI-1, Germany. # +# All rights reserved. # +# This file is part of the AiiDA-FLEUR package. # +# # +# The code is hosted on GitHub at https://github.com/JuDFTteam/aiida-fleur # +# For further information on the license, see the LICENSE.txt file # +# For further information please visit http://www.flapw.de or # +# http://aiida-fleur.readthedocs.io/en/develop/ # +############################################################################### +'''Contains tests for routines in data_handling. ''' import os import pytest import aiida_fleur @@ -6,8 +18,7 @@ TEST_CIF = os.path.join(aiida_path, 'tests/files/cif/AlB.cif') -def test_extract_structure_info(generate_structure, - generate_work_chain_node, +def test_extract_structure_info(clear_database_aiida_fleur, generate_structure, generate_work_chain_node, fixture_localhost): """ I do not test 'extras' here due to some kind of bug @@ -37,123 +48,125 @@ def test_extract_structure_info(generate_structure, # create CalcFunction having StructureData input calc_function = CalcFunctionNode() calc_function.set_attribute('process_label', 'test_label') - calc_function.add_incoming(structure_bulk, link_type=LinkType.INPUT_CALC, - link_label='test_calcfundtion') + calc_function.add_incoming(structure_bulk, link_type=LinkType.INPUT_CALC, link_label='test_calcfundtion') calc_function.store() # create WorkChainNode scf having StructureData input scf_wc = generate_work_chain_node(computer=fixture_localhost, entry_point_name='aiida_fleur.scf', inputs={'structure': load_node(pks[1])}) + scf_wc.store() scf_wc.set_attribute('process_label', 'fleur_scf_wc') # create a group - group = create_group(name='test_group', nodes=pks[:2], - description='test_description') + group = create_group(name='test_group', nodes=pks[:2], description='test_description') - result = extract_structure_info(keys=['uuid', 'formula', 'pk', 'symmetry', 'pbc', 'volume', - 'total_energy', 'child_nodes', 'natoms', 'group', - 'label', 'description', 'cif_file', - 'cif_number', 'cif_uuid', 'cif_ref', 'calcfunctions', - 'band', 'dos', 'eos', 'init_cls', 'corehole', 'primitive', - 'cell', 'scf']) + result = extract_structure_info(keys=[ + 'uuid', 'formula', 'pk', 'symmetry', 'pbc', 'volume', 'total_energy', 'child_nodes', 'natoms', 'group', 'label', + 'description', 'cif_file', 'cif_number', 'cif_uuid', 'cif_ref', 'calcfunctions', 'band', 'dos', 'eos', + 'init_cls', 'corehole', 'primitive', 'cell', 'scf' + ]) # print(result) # assert 0 - correct_result = [{ - 'formula': 'AlB2', - 'pk': cif_structure.pk, - 'uuid': cif_structure.uuid, - 'natoms': 3, - 'cell': '[[3.009, 0.0, 0.0], [-1.5045, 2.6058704399874, 0.0], [0.0, 0.0, 3.262]]', - 'pbc': '(True, True, True)', - 'label': '', - 'description': '', - # 'extras': "{{'_aiida_hash': {0}}}".format(cif_structure.get_hash()), - 'symmetry': 'Amm2 (38)', - 'volume': 25.57755127009385, - 'child_nodes': 0, - 'primitive': False, - 'cif_file': ['AlB.cif', cif_data.uuid], - 'group': [], - 'scf': [], - 'band': [], - 'dos': [], - 'eos': [], - 'init_cls': [], - 'corehole': [], - 'calcfunctions': [[], []], - }, { - 'formula': 'SeSi2', - 'pk': pks[2], - 'uuid': uuids[2], - 'natoms': 3, - 'cell': '[[2.715, 2.715, 0.0], [2.715, 0.0, 2.715], [0.0, 2.715, 2.715]]', - 'pbc': '(True, True, True)', - 'label': '', - 'description': '', - # 'extras': "{{'_aiida_hash': {0}}}".format(load_node(pks[2]).get_hash()), - 'symmetry': 'P1 (1)', - 'volume': 40.02575174999999, - 'child_nodes': 1, - 'primitive': False, - 'cif_file': ['', ''], - 'group': [], - 'scf': [], - 'band': [], - 'dos': [], - 'eos': [], - 'init_cls': [], - 'corehole': [], - 'calcfunctions': [[calc_function.uuid], - ['test_label']], - }, { - 'formula': 'SeSi2', - 'pk': pks[1], - 'uuid': uuids[1], - 'natoms': 3, - 'cell': '[[2.715, 2.715, 0.0], [2.715, 0.0, 2.715], [0.0, 2.715, 2.715]]', - 'pbc': '(True, True, True)', - 'label': '', - 'description': '', - # 'extras': "{{'_aiida_hash': {0}}}".format(load_node(pks[1]).get_hash()), - 'symmetry': 'P1 (1)', - 'volume': 40.02575174999999, - 'child_nodes': 1, - 'primitive': False, - 'cif_file': ['', ''], - 'group': ['test_group'], - 'scf': [scf_wc.uuid], - 'band': [], - 'dos': [], - 'eos': [], - 'init_cls': [], - 'corehole': [], - 'calcfunctions': [[], []], - }, { - 'formula': 'SeSi2', - 'pk': pks[0], - 'uuid': uuids[0], - 'natoms': 3, - 'cell': '[[2.715, 2.715, 0.0], [2.715, 0.0, 2.715], [0.0, 2.715, 2.715]]', - 'pbc': '(True, True, True)', - 'label': '', - 'description': '', - # 'extras': "{{'_aiida_hash': {0}}}".format(load_node(pks[0]).get_hash), - 'symmetry': 'Imm2 (44)', - 'volume': 40.02575174999999, - 'child_nodes': 0, - 'primitive': False, - 'cif_file': ['', ''], - 'group': ['test_group'], - 'scf': [], - 'band': [], - 'dos': [], - 'eos': [], - 'init_cls': [], - 'corehole': [], - 'calcfunctions': [[], []], - }] + correct_result = [ + sorted({ + 'formula': 'AlB2', + 'pk': cif_structure.pk, + 'uuid': cif_structure.uuid, + 'natoms': 3, + 'cell': '[[3.009, 0.0, 0.0], [-1.5045, 2.6058704399874, 0.0], [0.0, 0.0, 3.262]]', + 'pbc': '(True, True, True)', + 'label': '', + 'description': '', + # 'extras': "{{'_aiida_hash': {0}}}".format(cif_structure.get_hash()), + 'symmetry': 'Amm2 (38)', + 'volume': 25.57755127009385, + 'child_nodes': 0, + 'primitive': False, + 'cif_file': ['AlB.cif', cif_data.uuid], + 'group': [], + 'scf': [], + 'band': [], + 'dos': [], + 'eos': [], + 'init_cls': [], + 'corehole': [], + 'calcfunctions': [[], []], + }), + sorted({ + 'formula': 'SeSi2', + 'pk': pks[2], + 'uuid': uuids[2], + 'natoms': 3, + 'cell': '[[2.715, 2.715, 0.0], [2.715, 0.0, 2.715], [0.0, 2.715, 2.715]]', + 'pbc': '(True, True, True)', + 'label': '', + 'description': '', + # 'extras': "{{'_aiida_hash': {0}}}".format(load_node(pks[2]).get_hash()), + 'symmetry': 'P1 (1)', + 'volume': 40.02575174999999, + 'child_nodes': 1, + 'primitive': False, + 'cif_file': ['', ''], + 'group': [], + 'scf': [], + 'band': [], + 'dos': [], + 'eos': [], + 'init_cls': [], + 'corehole': [], + 'calcfunctions': [[calc_function.uuid], ['test_label']], + }), + sorted({ + 'formula': 'SeSi2', + 'pk': pks[1], + 'uuid': uuids[1], + 'natoms': 3, + 'cell': '[[2.715, 2.715, 0.0], [2.715, 0.0, 2.715], [0.0, 2.715, 2.715]]', + 'pbc': '(True, True, True)', + 'label': '', + 'description': '', + # 'extras': "{{'_aiida_hash': {0}}}".format(load_node(pks[1]).get_hash()), + 'symmetry': 'P1 (1)', + 'volume': 40.02575174999999, + 'child_nodes': 1, + 'primitive': False, + 'cif_file': ['', ''], + 'group': ['test_group'], + 'scf': [scf_wc.uuid], + 'band': [], + 'dos': [], + 'eos': [], + 'init_cls': [], + 'corehole': [], + 'calcfunctions': [[], []], + }), + sorted({ + 'formula': 'SeSi2', + 'pk': pks[0], + 'uuid': uuids[0], + 'natoms': 3, + 'cell': '[[2.715, 2.715, 0.0], [2.715, 0.0, 2.715], [0.0, 2.715, 2.715]]', + 'pbc': '(True, True, True)', + 'label': '', + 'description': '', + # 'extras': "{{'_aiida_hash': {0}}}".format(load_node(pks[0]).get_hash), + 'symmetry': 'Imm2 (44)', + 'volume': 40.02575174999999, + 'child_nodes': 0, + 'primitive': False, + 'cif_file': ['', ''], + 'group': ['test_group'], + 'scf': [], + 'band': [], + 'dos': [], + 'eos': [], + 'init_cls': [], + 'corehole': [], + 'calcfunctions': [[], []], + }) + ] for i in result: - assert i in correct_result + assert sorted(i) in correct_result diff --git a/aiida_fleur/tests/tools/test_dict_util.py b/aiida_fleur/tests/tools/test_dict_util.py index 3d4a6aac9..ceebbb6e1 100644 --- a/aiida_fleur/tests/tools/test_dict_util.py +++ b/aiida_fleur/tests/tools/test_dict_util.py @@ -1,19 +1,82 @@ - - -# dict_merger +# -*- coding: utf-8 -*- +############################################################################### +# Copyright (c), Forschungszentrum Jülich GmbH, IAS-1/PGI-1, Germany. # +# All rights reserved. # +# This file is part of the AiiDA-FLEUR package. # +# # +# The code is hosted on GitHub at https://github.com/JuDFTteam/aiida-fleur # +# For further information on the license, see the LICENSE.txt file # +# For further information please visit http://www.flapw.de or # +# http://aiida-fleur.readthedocs.io/en/develop/ # +############################################################################### +''' Contains tests for routines in dict_util ''' from __future__ import absolute_import import pytest -inputs = [({'a1' : {'b1' : [1]}}, {'a1' : {'b1': [2,3]}}), - ({'a1' : {'b2' : 1.0}}, {'a1' : {'b2' : 1}}), - ({'a1' : {'b3' : 'a'}}, {'a1' : {'b3' : 'b' }, 'a2': [1]}), - ({'a1' : {'b3' : 'b' }, 'a2': [1]}, {}), - ({}, {'a1' : {'b3' : 'b' }, 'a2': [1]}) ] +inputs = [({ + 'a1': { + 'b1': [1] + } +}, { + 'a1': { + 'b1': [2, 3] + } +}), ({ + 'a1': { + 'b2': 1.0 + } +}, { + 'a1': { + 'b2': 1 + } +}), ({ + 'a1': { + 'b3': 'a' + } +}, { + 'a1': { + 'b3': 'b' + }, + 'a2': [1] +}), ({ + 'a1': { + 'b3': 'b' + }, + 'a2': [1] +}, {}), ({}, { + 'a1': { + 'b3': 'b' + }, + 'a2': [1] +})] -outputs = [{'a1' : {'b1' : [1,2,3]}}, {'a1' : {'b2' : 2}}, {'a1' : {'b3' : 'ab'}, 'a2' : [1]}, - {'a1' : {'b3' : 'b' }, 'a2': [1]}, {'a1' : {'b3' : 'b' }, 'a2': [1]}] +outputs = [{ + 'a1': { + 'b1': [1, 2, 3] + } +}, { + 'a1': { + 'b2': 2 + } +}, { + 'a1': { + 'b3': 'ab' + }, + 'a2': [1] +}, { + 'a1': { + 'b3': 'b' + }, + 'a2': [1] +}, { + 'a1': { + 'b3': 'b' + }, + 'a2': [1] +}] -@pytest.mark.parametrize("test_input,expected", zip(inputs,outputs)) + +@pytest.mark.parametrize('test_input,expected', zip(inputs, outputs)) def test_dict_merger_interface_dicts_lists_str_int(test_input, expected): from aiida_fleur.tools.dict_util import dict_merger assert dict_merger(*test_input) == expected @@ -23,6 +86,5 @@ def test_dict_merger_interface_dicts_lists_str_int(test_input, expected): def test_extract_elementpara_interface_W(): from aiida_fleur.tools.dict_util import extract_elementpara - para_dict = {'a' : 1, 'atom' : {'element' : 'H', 'rmt': 1}, 'atom1' : {'element' : 'W', 'rmt' : 4}} - assert extract_elementpara(para_dict, 'W') == {'a' : 1, 'atom1' : {'element' : 'W', 'rmt' : 4}} - + para_dict = {'a': 1, 'atom': {'element': 'H', 'rmt': 1}, 'atom1': {'element': 'W', 'rmt': 4}} + assert extract_elementpara(para_dict, 'W') == {'a': 1, 'atom1': {'element': 'W', 'rmt': 4}} diff --git a/aiida_fleur/tests/tools/test_element_econfig_list.py b/aiida_fleur/tests/tools/test_element_econfig_list.py index 381c4c97e..02719834d 100644 --- a/aiida_fleur/tests/tools/test_element_econfig_list.py +++ b/aiida_fleur/tests/tools/test_element_econfig_list.py @@ -1,25 +1,30 @@ +# -*- coding: utf-8 -*- +''' Contains tests for reading and modification of econfigurations ''' +from __future__ import absolute_import -# get_econfig -from __future__ import absolute_import def test_get_econfig_W(): from aiida_fleur.tools.element_econfig_list import get_econfig assert get_econfig('W', full=False) == '[Kr] 5s2 4d10 4f14 | 5p6 6s2 5d4' assert get_econfig('W', full=True) == '1s2 2s2 2p6 3s2 3p6 3d10 4s2 4p6 5s2 4d10 4f14 | 5p6 6s2 5d4' + # get_coreconfig def test_get_coreconfig_W(): from aiida_fleur.tools.element_econfig_list import get_coreconfig - + assert get_coreconfig('W', full=False) == '[Kr] 5s2 4d10 4f14' assert get_coreconfig('W', full=True) == '1s2 2s2 2p6 3s2 3p6 3d10 4s2 4p6 5s2 4d10 4f14' + # rek_econ def test_rek_econ_interface_W(): from aiida_fleur.tools.element_econfig_list import rek_econ - assert rek_econ('[Kr] 4d10 4f14 5p6 | 5s2 6s2 5d4') == '1s2 2s2 2p6 3s2 3p6 3d10 4s2 4p6 4d10 4f14 5p6 | 5s2 6s2 5d4' + assert rek_econ( + '[Kr] 4d10 4f14 5p6 | 5s2 6s2 5d4') == '1s2 2s2 2p6 3s2 3p6 3d10 4s2 4p6 4d10 4f14 5p6 | 5s2 6s2 5d4' + # convert_fleur_config_to_econfig def test_convert_fleur_econfig_to_econfig_interface(): @@ -28,7 +33,7 @@ def test_convert_fleur_econfig_to_econfig_interface(): config1 = '[Kr] (4d3/2) (4d5/2) (4f5/2) (4f7/2)' config2 = '[Kr]' config3 = '[Kr] 4d3/2 4d5/2 4f5/2' - + res1 = '[Kr] 4d10 4f14' res1_1 = '[Kr] 4d3/2 4d5/2 4f5/2 4f7/2' res2 = '[Kr]' @@ -41,20 +46,21 @@ def test_convert_fleur_econfig_to_econfig_interface(): assert convert_fleur_config_to_econfig(config3) == res3 assert convert_fleur_config_to_econfig(config3, keep_spin=True) == res3_1 + # highest_unocc_valence -def test_rek_econ_interface_W(): +def test_highest_unocc_valence_interface_W(): from aiida_fleur.tools.element_econfig_list import highest_unocc_valence assert highest_unocc_valence('[Kr] 4d10 4f14 5p6 | 5s2 6s2 5d4') == '5d4' - assert highest_unocc_valence('1s2 | 2s2') == '2p0' + assert highest_unocc_valence('1s2 | 2s2') == '2p0' # get_spin_econfig def test_get_spin_econfig_interface(): from aiida_fleur.tools.element_econfig_list import get_spin_econfig - + # basic behavior assert get_spin_econfig('1s2 2s2 2p6') == '1s1/2 2s1/2 2p1/2 2p3/2' - + # does autocompletion work res1 = '1s1/2 2s1/2 2p1/2 2p3/2 3s1/2 3p1/2 3p3/2 3d3/2 3d5/2 4s1/2 4p1/2 4p3/2 4d3/2 4d5/2 4f5/2 4f7/2' assert get_spin_econfig('[Kr] 4d10 4f14') == res1 @@ -63,17 +69,27 @@ def test_get_spin_econfig_interface(): res2 = '1s1/2 2s1/2 2p1/2 2p3/2 3s1/2 3p1/2 3p3/2 3d3/2 3d5/2 4s1/2 4p1/2 4p3/2 4d3/2 4d5/2 4f5/2 4f7/2' assert get_spin_econfig('[Kr] 4d3/2 4d5/2 4f5/2 4f7/2') == res2 + # econfig_str_hole def test_econfig_str_hole_1s_Be(): from aiida_fleur.tools.element_econfig_list import econfigstr_hole - + assert econfigstr_hole('1s2 | 2s2', '1s2', '2p0') == '1s1 | 2s2 2p1' # get_state_occ + def test_get_state_occ_interface_half_valence_hole_W(): from aiida_fleur.tools.element_econfig_list import get_state_occ econfig = '1s2 2s2 2p6 3s2 3p6 3d10 4s2 4p6 4d10 4f13 5p6 | 5s2 6s2 5d5' - assert get_state_occ(econfig, corehole='4f 5/2', valence='5d', ch_occ=0.5)[1] == {'state' : '(4f5/2)', 'spinUp' : 3.0, 'spinDown' : 2.5} - assert get_state_occ(econfig, corehole='4f 5/2', valence='5d', ch_occ=0.5)[0] == {'state' : '(5d5/2)', 'spinUp' : 0.5, 'spinDown' : 0.0} + assert get_state_occ(econfig, corehole='4f 5/2', valence='5d', ch_occ=0.5)[1] == { + 'state': '(4f5/2)', + 'spinUp': 3.0, + 'spinDown': 2.5 + } + assert get_state_occ(econfig, corehole='4f 5/2', valence='5d', ch_occ=0.5)[0] == { + 'state': '(5d5/2)', + 'spinUp': 0.5, + 'spinDown': 0.0 + } diff --git a/aiida_fleur/tests/tools/test_extract_corelevels.py b/aiida_fleur/tests/tools/test_extract_corelevels.py index 746fdf560..7b173477d 100644 --- a/aiida_fleur/tests/tools/test_extract_corelevels.py +++ b/aiida_fleur/tests/tools/test_extract_corelevels.py @@ -1,8 +1,21 @@ +# -*- coding: utf-8 -*- +############################################################################### +# Copyright (c), Forschungszentrum Jülich GmbH, IAS-1/PGI-1, Germany. # +# All rights reserved. # +# This file is part of the AiiDA-FLEUR package. # +# # +# The code is hosted on GitHub at https://github.com/JuDFTteam/aiida-fleur # +# For further information on the license, see the LICENSE.txt file # +# For further information please visit http://www.flapw.de or # +# http://aiida-fleur.readthedocs.io/en/develop/ # +############################################################################### +'''Contains tests for routines in extract_corelevels.''' from __future__ import absolute_import import pytest #class test_extract_corelevels(): + # TODO: test in general more results outcome. def test_extract_corelevels_outfile_allfiles(): """ @@ -11,12 +24,14 @@ def test_extract_corelevels_outfile_allfiles(): from aiida_fleur.tools.extract_corelevels import extract_corelevels outxmlfiles = get_example_outxml_files() - + for outfile in outxmlfiles: corelevel, atomtypes = extract_corelevels(outfile) assert bool(corelevel) assert bool(atomtypes) + +@pytest.mark.skip(reason='Test not implemented') def test_extract_corelevels_outfile_interface(): """ Extracts corelevels and atomtype imformation from one example out.xml file @@ -24,12 +39,12 @@ def test_extract_corelevels_outfile_interface(): """ from aiida_fleur.tools.extract_corelevels import extract_corelevels - pass - #outfile = + #outfile = #corelevel, atomtypes = extract_corelevels(outfile) # assert bool(corelevel) # assert bool(atomtypes) + ''' # this is used in extrac_corelevels, but might make sense to test extra def test_parse_state_card_interface(): @@ -41,6 +56,7 @@ def test_parse_state_card_interface(): from aiida_fleur.tools.extract_corelevels import parse_state_card ''' + def test_clsshifts_to_be_interface(): """ Tests the interface of the clsshifts_to_be method. @@ -49,15 +65,14 @@ def test_clsshifts_to_be_interface(): """ from aiida_fleur.tools.extract_corelevels import clshifts_to_be - reference = {'W' : {'4f7/2' : [124],'4f5/2' : [], '3p3/2' : [], '3p5/2' : [10] }, 'Be' : {'1s': [117]}} - corelevels = {'W' : {'4f7/2' : [-0.4, 0.3],'4f5/2' : [0, 0.1]}, - 'Be' : {'1s': [0, 0.3]}, 'C' : [0.0]} - + reference = {'W': {'4f7/2': [124], '4f5/2': [], '3p3/2': [], '3p5/2': [10]}, 'Be': {'1s': [117]}} + corelevels = {'W': {'4f7/2': [-0.4, 0.3], '4f5/2': [0, 0.1]}, 'Be': {'1s': [0, 0.3]}, 'C': [0.0]} + res = clshifts_to_be(corelevels, reference) expected_results = {'Be': {'1s': [117, 117.3]}, 'W': {'4f7/2': [123.6, 124.3]}} assert res == expected_results - + # expect warning clsshifts_to_be(corelevels, reference, warn=True) #Warning: Reference for element: 'C' not given. I ignore these. #Warning: Reference corelevel '4f5/2' for element: 'W' not given. I ignore these. @@ -68,9 +83,7 @@ def get_example_outxml_files(): helper. returns all the realativ paths to the example out.xml files. """ from os import listdir - from os.path import join + from os.path import join # from top test folder folder_path = './files/outxml/' - return [join(folder_path, outfile) for outfile in listdir(folder_path) if outfile.endswith(".xml")] - - + return [join(folder_path, outfile) for outfile in listdir(folder_path) if outfile.endswith('.xml')] diff --git a/aiida_fleur/tests/tools/test_graph_fleur.py b/aiida_fleur/tests/tools/test_graph_fleur.py index cdfa6f006..fc202c169 100644 --- a/aiida_fleur/tests/tools/test_graph_fleur.py +++ b/aiida_fleur/tests/tools/test_graph_fleur.py @@ -1,7 +1,6 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- - -# test the fleur specific graph gernation routine +''' Contains test the fleur specific graph gernation routine. ''' from __future__ import absolute_import import pytest @@ -18,7 +17,7 @@ def test_draw_graph_if_produces_file(): import os from aiida_fleur.tools.graph_fleur import draw_graph from aiida.orm import Node - + # TODO store a real graph and test if it is represented right... node = Node() outfile_expected = 'None.dot' diff --git a/aiida_fleur/tests/tools/test_io_routines.py b/aiida_fleur/tests/tools/test_io_routines.py index d9bc802e8..a32527cd8 100644 --- a/aiida_fleur/tests/tools/test_io_routines.py +++ b/aiida_fleur/tests/tools/test_io_routines.py @@ -1,8 +1,10 @@ +# -*- coding: utf-8 -*- +''' Contains Tests of io routines within aiida-fleur. ''' +from __future__ import absolute_import +import pytest -# write_results_to_file -from __future__ import absolute_import def test_write_results_to_file_interface(): """ is the basic file writter wraper working as indended @@ -12,11 +14,10 @@ def test_write_results_to_file_interface(): from os import remove #import os from numpy import array - # testing some defaults inputhead = 'head\n' - data = array([[1,2],[3,4]]) + data = array([[1, 2], [3, 4]]) destination = './outputfiletest' write_results_to_file(inputhead, data, destination=destination) isfile_ = isfile(abspath('./outputfiletest')) @@ -32,67 +33,66 @@ def test_write_results_to_file_interface(): # write_xps_spectra_datafile +@pytest.mark.skip(reason='Test not implemented') def test_write_xps_spectra_datafile_interface(): """ is the xps data file writter working, is the file ok? """ from aiida_fleur.tools.io_routines import write_xps_spectra_datafile - + #TODO how to test this? # provide all sample inputs and check contents of outputfile - pass #assert 1 == 2 + assert False + def test_compress_fleuroutxml(): """ test the compress_fleuroutxml function, checks if right number of iterations is kept, or deleted. Further checks if new file is written and if eigenvalues are deleted. """ - + from os.path import abspath, isfile from os import remove from lxml import etree from aiida_fleur.tools.xml_util import eval_xpath2 from aiida_fleur.tools.io_routines import compress_fleuroutxml - + testfilepath = abspath('./files/outxml/BeTi_out.xml') - dest_path = testfilepath.replace(".xml", "_test.xml") - niter_file = 19 + dest_path = testfilepath.replace('.xml', '_test.xml') + niter_file = 19 xpath_iter = '/fleurOutput/scfLoop/iteration' xpath_eig = '/fleurOutput/scfLoop/iteration/eigenvalues' - - + def get_npath(filepath, xpath): """helper function to get amount of a certain xpath eval in file""" - + xpath_iter = '/fleurOutput/scfLoop/iteration' parser = etree.XMLParser(recover=False) tree = etree.parse(filepath, parser) return len(eval_xpath2(tree.getroot(), xpath)) - # test new file exists, and right number of iteration, eig del compress_fleuroutxml(testfilepath, dest_file_path=dest_path, iterations_to_keep=15) isfile_ = isfile(abspath(dest_path)) niter1 = get_npath(dest_path, xpath_iter) - neig = get_npath(dest_path, xpath_eig) + neig = get_npath(dest_path, xpath_eig) + + assert isfile # check outfile + assert niter1 == 15 # check if 15 iterations are kept + assert neig == 0 # check if eigenvalues del - assert isfile # check outfile - assert niter1 == 15 # check if 15 iterations are kept - assert neig==0 # check if eigenvalues del - compress_fleuroutxml(testfilepath, dest_file_path=dest_path, iterations_to_keep=-1) niter2 = get_npath(dest_path, xpath_iter) - - assert niter2 == 1 # check of only one iteration kept - + + assert niter2 == 1 # check of only one iteration kept + # test if more iteration given then in file should change nothing compress_fleuroutxml(testfilepath, dest_file_path=dest_path, iterations_to_keep=25) niter3 = get_npath(dest_path, xpath_iter) - + assert niter3 == niter_file # check if no iteration deleted - + # cleanup remove(dest_path) - diff --git a/aiida_fleur/tests/tools/test_plot_fleur.py b/aiida_fleur/tests/tools/test_plot_fleur.py new file mode 100644 index 000000000..d17043674 --- /dev/null +++ b/aiida_fleur/tests/tools/test_plot_fleur.py @@ -0,0 +1,112 @@ +# -*- coding: utf-8 -*- +############################################################################### +# Copyright (c), Forschungszentrum Jülich GmbH, IAS-1/PGI-1, Germany. # +# All rights reserved. # +# This file is part of the AiiDA-FLEUR package. # +# # +# The code is hosted on GitHub at https://github.com/JuDFTteam/aiida-fleur # +# For further information on the license, see the LICENSE.txt file # +# For further information please visit http://www.flapw.de or # +# http://aiida-fleur.readthedocs.io/en/develop/ # +############################################################################### +""" +Tests for the `plot_fleur` function. +All test are executed with show false, if some plot opens, something is not right +""" + +from __future__ import absolute_import +import pytest +import os +from aiida import orm +from aiida_fleur.tools.plot.fleur import plot_fleur +import aiida_fleur +import matplotlib as plt +plt.use('Agg') + + +def test_plot_fleur_single_wc_matplotlib(aiida_profile, read_dict_from_file): + """test if plot fleur can visualize a workchain""" + + aiida_path = os.path.dirname(aiida_fleur.__file__) + out_node_path = os.path.join(aiida_path, 'tests/files/jsons/fleur_outputpara.json') + out_node_scf_path = os.path.join(aiida_path, 'tests/files/jsons/fleur_output_scf_wc_para.json') + out_node_eos_path = os.path.join(aiida_path, 'tests/files/jsons/fleur_output_eos_wc_para.json') + + fleur_outputnode = orm.Dict(dict=read_dict_from_file(out_node_path), label='output_para') + p_calc = plot_fleur(fleur_outputnode, show=False) + + assert isinstance(p_calc, list) + assert p_calc[0] is None # isinstance(p_scf[0], plt.figure) + + scf_output = orm.Dict(dict=read_dict_from_file(out_node_scf_path), label='output_scf_wc_para') + p_scf = plot_fleur(scf_output, show=False) + + assert isinstance(p_scf, list) + # assert isinstance(p_scf[0], type(plt.axes)) # isinstance(p_scf[0], plt.figure) + + eos_output = orm.Dict(dict=read_dict_from_file(out_node_eos_path), label='output_eos_wc_para') + p_eos = plot_fleur(eos_output, show=False) + + assert isinstance(p_eos, list) + #assert isinstance(p_eos[0], type(plt.axes)) + + +def test_plot_fleur_multiple_wc_matplotlib(aiida_profile, read_dict_from_file): + """test if plot fleur can visualize a multiple workchain output node, Fleur calcjob output nodes """ + + from matplotlib.axes import Axes + + aiida_path = os.path.dirname(aiida_fleur.__file__) + out_node_path = os.path.join(aiida_path, 'tests/files/jsons/fleur_outputpara.json') + out_node_scf_path = os.path.join(aiida_path, 'tests/files/jsons/fleur_output_scf_wc_para.json') + out_node_eos_path = os.path.join(aiida_path, 'tests/files/jsons/fleur_output_eos_wc_para.json') + + fleur_outputnode = orm.Dict(dict=read_dict_from_file(out_node_path), label='output_para') + p_calc = plot_fleur([fleur_outputnode, fleur_outputnode], show=False) + + assert isinstance(p_calc, list) + assert p_calc[0] == [] # isinstance(p_scf[0], plt.figure) + + scf_output = orm.Dict(dict=read_dict_from_file(out_node_scf_path), label='output_scf_wc_para') + p_scf = plot_fleur([scf_output, scf_output], show=False) + + assert isinstance(p_scf, list) + # assert isinstance(p_scf[0][0], type(Axes)) # return 2 plots + + eos_output = orm.Dict(dict=read_dict_from_file(out_node_eos_path), label='output_eos_wc_para') + p_eos = plot_fleur([eos_output, eos_output], show=False) + + assert isinstance(p_eos, list) + #assert isinstance(p_eos[0], type(Axes)) + + +@pytest.mark.skip(reason='does work, but requires current masci-tool develop branch >0.10.3') +def test_plot_fleur_single_wc_bokeh(aiida_profile, read_dict_from_file): + """test if plot fleur can visualize a single workchain with bokeh backend""" + try: #bokeh is not a prerequisite of Aiida-Fleur, might become of masci-tools + from bokeh.layouts import column # gridplot + except ImportError: + return + + aiida_path = os.path.dirname(aiida_fleur.__file__) + out_node_path = os.path.join(aiida_path, 'tests/files/jsons/fleur_outputpara.json') + out_node_scf_path = os.path.join(aiida_path, 'tests/files/jsons/fleur_output_scf_wc_para.json') + out_node_eos_path = os.path.join(aiida_path, 'tests/files/jsons/fleur_output_eos_wc_para.json') + + fleur_outputnode = orm.Dict(dict=read_dict_from_file(out_node_path), label='output_para') + p_calc = plot_fleur(fleur_outputnode, show=False, backend='bokeh') + + assert isinstance(p_calc, list) + assert p_calc[0] is None # currently does not have a visualization + + scf_out = orm.Dict(dict=read_dict_from_file(out_node_scf_path), label='output_scf_wc_para') + p_scf = plot_fleur(scf_out, show=False, backend='bokeh') + + assert isinstance(p_scf, list) + assert isinstance(p_scf[0], type(column())) + + # eos_out = orm.Dict(dict=read_dict_from_file(out_node_eos_path), label='output_eos_wc_para') + # p_eos = plot_fleur(eos_out, show=False, backend='bokeh') + + # assert isinstance(p_eos, list) + # assert isinstance(p_eos[0], type(column())) diff --git a/aiida_fleur/tests/tools/test_read_cif_folder.py b/aiida_fleur/tests/tools/test_read_cif_folder.py index 1b581b828..2c06b2bf2 100644 --- a/aiida_fleur/tests/tools/test_read_cif_folder.py +++ b/aiida_fleur/tests/tools/test_read_cif_folder.py @@ -1,9 +1,13 @@ +# -*- coding: utf-8 -*- +'''Contains tests for read and with work cif file routines.''' + from __future__ import absolute_import from __future__ import print_function import pytest # read-cif_folder +@pytest.mark.skip(reason='Test not implemented') def test_read_cif_folder_interface(temp_dir): """ this test set reads in the cif files in the ../files/cif/ directory and subdirs @@ -19,20 +23,26 @@ def test_read_cif_folder_interface(temp_dir): out_filename = os.path.join(temp_dir, 'out.txt') #read_in - structure_data, filenames = read_cif_folder(path=os.getcwd(), recursive=True, - store=True, log=True, - comments='Test_comment', extras={'test' : 1}, + structure_data, filenames = read_cif_folder(path=os.getcwd(), + recursive=True, + store=True, + log=True, + comments='Test_comment', + extras={'test': 1}, logfile_name=out_filename) - structure_data, filenames = read_cif_folder(path=cif_folderpath, recursive=False, - store=False, log=False, - comments='', extras='') + structure_data, filenames = read_cif_folder(path=cif_folderpath, + recursive=False, + store=False, + log=False, + comments='', + extras='') #test number of structurs written #test number of cif files written #test if extras are set right #test prov #test - pass #read_in again # test if cif files are not rewritten. + assert False diff --git a/aiida_fleur/tests/tools/test_xml_util.py b/aiida_fleur/tests/tools/test_xml_util.py index 459b04fa8..c0909e9fe 100644 --- a/aiida_fleur/tests/tools/test_xml_util.py +++ b/aiida_fleur/tests/tools/test_xml_util.py @@ -1,3 +1,6 @@ +# -*- coding: utf-8 -*- +'''Contains tests for xml_utils within aiida-fleur, some test are autogenerated.''' + from __future__ import absolute_import import os import pytest @@ -94,50 +97,65 @@ def test_create_tag(inpxml_etree): create_tag(etree, '/fleurInput/cell/filmLattice/bravaisMatrix', 'TEST_TAG', create=False) assert eval_xpath3(etree, '/fleurInput/cell/filmLattice/bravaisMatrix')[0][3].tag == 'TEST_TAG' - create_tag(etree, '/fleurInput/cell/filmLattice/bravaisMatrix', 'TEST_TAG2', create=False, - place_index=1) + create_tag(etree, '/fleurInput/cell/filmLattice/bravaisMatrix', 'TEST_TAG2', create=False, place_index=1) tag_names = [x.tag for x in eval_xpath3(etree, '/fleurInput/cell/filmLattice/bravaisMatrix')[0]] assert tag_names == ['row-1', 'TEST_TAG2', 'row-2', 'row-3', 'TEST_TAG'] - create_tag(etree, '/fleurInput/cell/filmLattice/bravaisMatrix', 'TEST_TAG3', create=False, - place_index=True, tag_order=['row-1', 'TEST_TAG2', 'TEST_TAG3', 'row-2', - 'row-3', 'TEST_TAG']) + create_tag(etree, + '/fleurInput/cell/filmLattice/bravaisMatrix', + 'TEST_TAG3', + create=False, + place_index=True, + tag_order=['row-1', 'TEST_TAG2', 'TEST_TAG3', 'row-2', 'row-3', 'TEST_TAG']) tag_names = [x.tag for x in eval_xpath3(etree, '/fleurInput/cell/filmLattice/bravaisMatrix')[0]] assert tag_names == ['row-1', 'TEST_TAG2', 'TEST_TAG3', 'row-2', 'row-3', 'TEST_TAG'] - create_tag(etree, '/fleurInput/cell/filmLattice/bravaisMatrix', 'TEST_TAG4', create=False, - place_index=True, tag_order=['row-1', 'TEST_TAG2', 'TEST_TAG3', 'row-2', - 'TEST_TAG4', 'row-3', 'TEST_TAG']) + create_tag(etree, + '/fleurInput/cell/filmLattice/bravaisMatrix', + 'TEST_TAG4', + create=False, + place_index=True, + tag_order=['row-1', 'TEST_TAG2', 'TEST_TAG3', 'row-2', 'TEST_TAG4', 'row-3', 'TEST_TAG']) tag_names = [x.tag for x in eval_xpath3(etree, '/fleurInput/cell/filmLattice/bravaisMatrix')[0]] - assert tag_names == ['row-1', 'TEST_TAG2', 'TEST_TAG3', - 'row-2', 'TEST_TAG4', 'row-3', 'TEST_TAG'] - - create_tag(etree, '/fleurInput/cell/filmLattice/bravaisMatrix', 'TEST_TAG0', create=False, - place_index=True, tag_order=['TEST_TAG0', 'row-1', 'TEST_TAG2', 'TEST_TAG3', 'row-2', - 'TEST_TAG4', 'row-3', 'TEST_TAG']) + assert tag_names == ['row-1', 'TEST_TAG2', 'TEST_TAG3', 'row-2', 'TEST_TAG4', 'row-3', 'TEST_TAG'] + + create_tag(etree, + '/fleurInput/cell/filmLattice/bravaisMatrix', + 'TEST_TAG0', + create=False, + place_index=True, + tag_order=['TEST_TAG0', 'row-1', 'TEST_TAG2', 'TEST_TAG3', 'row-2', 'TEST_TAG4', 'row-3', 'TEST_TAG']) tag_names = [x.tag for x in eval_xpath3(etree, '/fleurInput/cell/filmLattice/bravaisMatrix')[0]] - assert tag_names == ['TEST_TAG0', 'row-1', 'TEST_TAG2', 'TEST_TAG3', - 'row-2', 'TEST_TAG4', 'row-3', 'TEST_TAG'] + assert tag_names == ['TEST_TAG0', 'row-1', 'TEST_TAG2', 'TEST_TAG3', 'row-2', 'TEST_TAG4', 'row-3', 'TEST_TAG'] with pytest.raises(ValueError) as excinfo: - create_tag(etree, '/fleurInput/cell/filmLattice/bravaisMatrix', 'TEST_TAG5', create=False, - place_index=True, tag_order=['TEST_TAG0', 'row-1', 'TEST_TAG3', 'TEST_TAG2', - 'TEST_TAG5', 'row-2', 'TEST_TAG4', 'row-3', 'TEST_TAG']) - assert str(excinfo.value) == "Existing order does not correspond to tag_order list" + create_tag(etree, + '/fleurInput/cell/filmLattice/bravaisMatrix', + 'TEST_TAG5', + create=False, + place_index=True, + tag_order=[ + 'TEST_TAG0', 'row-1', 'TEST_TAG3', 'TEST_TAG2', 'TEST_TAG5', 'row-2', 'TEST_TAG4', 'row-3', + 'TEST_TAG' + ]) + assert str(excinfo.value) == 'Existing order does not correspond to tag_order list' with pytest.raises(ValueError) as excinfo: - create_tag(etree, '/fleurInput/cell/filmLattice/bravaisMatrix', 'TEST_TAG5', create=False, - place_index=True, tag_order=['TEST_TAG0', 'row-1', 'TEST_TAG3', 'TEST_TAG2', - 'row-2', 'TEST_TAG4', 'row-3', 'TEST_TAG']) - assert str(excinfo.value) == "Did not find element name in the tag_order list" + create_tag( + etree, + '/fleurInput/cell/filmLattice/bravaisMatrix', + 'TEST_TAG5', + create=False, + place_index=True, + tag_order=['TEST_TAG0', 'row-1', 'TEST_TAG3', 'TEST_TAG2', 'row-2', 'TEST_TAG4', 'row-3', 'TEST_TAG']) + assert str(excinfo.value) == 'Did not find element name in the tag_order list' def test_delete_att(inpxml_etree): from aiida_fleur.tools.xml_util import delete_att, eval_xpath2 etree = inpxml_etree(TEST_INP_XML_PATH) - assert eval_xpath2( - etree, '/fleurInput/atomGroups/atomGroup/filmPos/@label')[0] == " 222" + assert eval_xpath2(etree, '/fleurInput/atomGroups/atomGroup/filmPos/@label')[0] == ' 222' delete_att(etree, '/fleurInput/atomGroups/atomGroup/filmPos', 'label') assert eval_xpath2(etree, '/fleurInput/atomGroups/atomGroup/filmPos/@label') == [] @@ -172,33 +190,43 @@ def test_get_inpgen_para_from_xml(inpxml_etree): from aiida_fleur.tools.xml_util import get_inpgen_para_from_xml etree = inpxml_etree(TEST_INP_XML_PATH) - result = {'comp': {'jspins': 2.0, - 'frcor': False, - 'ctail': True, - 'kcrel': '0', - 'gmax': 10.0, - 'gmaxxc': 8.7, - 'kmax': 4.0}, - 'atom0': {'z': 26, - 'rmt': 2.2, - 'dx': 0.016, - 'jri': 787, - 'lmax': 10, - 'lnonsph': 6, - # 'econfig': , - 'lo': '', - 'element': 'Fe'}, - 'atom1': {'z': 78, - 'rmt': 2.2, - 'dx': 0.017, - 'jri': 787, - 'lmax': 10, - 'lnonsph': 6, - # 'econfig': , - 'lo': '', - 'element': 'Pt'}, - 'title': 'A Fleur input generator calculation with aiida', - 'exco': {'xctyp': 'vwn'}} + result = { + 'comp': { + 'jspins': 2.0, + 'frcor': False, + 'ctail': True, + 'kcrel': '0', + 'gmax': 10.0, + 'gmaxxc': 8.7, + 'kmax': 4.0 + }, + 'atom0': { + 'z': 26, + 'rmt': 2.2, + 'dx': 0.016, + 'jri': 787, + 'lmax': 10, + 'lnonsph': 6, + # 'econfig': , + 'lo': '', + 'element': 'Fe' + }, + 'atom1': { + 'z': 78, + 'rmt': 2.2, + 'dx': 0.017, + 'jri': 787, + 'lmax': 10, + 'lnonsph': 6, + # 'econfig': , + 'lo': '', + 'element': 'Pt' + }, + 'title': 'A Fleur input generator calculation with aiida', + 'exco': { + 'xctyp': 'vwn' + } + } dict_result = get_inpgen_para_from_xml(etree) assert dict_result == result @@ -207,34 +235,74 @@ def test_get_inpgen_para_from_xml(inpxml_etree): class TestSetSpecies: """Tests for set_species""" - paths = ['mtSphere/@radius', - 'atomicCutoffs/@lmax', - 'energyParameters/@s', - 'electronConfig/coreConfig', - 'electronConfig/stateOccupation/@state', - 'electronConfig/stateOccupation/@state', - 'special/@socscale', - 'ldaU/@test_att', - 'lo/@test_att', - 'lo/@test_att' - ] - - attdicts = [{'mtSphere': {'radius': 3.333}}, - {'atomicCutoffs': {'lmax': 7.0}}, - {'energyParameters': {'s': 3.0}}, - {'electronConfig': {'coreConfig': 'test'}}, - {'electronConfig': {'stateOccupation': {'state': 'state'}}}, - {'electronConfig': {'stateOccupation': [{'state': 'state'}, - {'state': 'state2'}]}}, - {'special': {'socscale': 1.0}}, - {'ldaU': {'test_att': 2.0}}, - {'lo': {'test_att': 2.0}}, - {'lo': [{'test_att': 2.0}, {'test_att': 33.0}]} + paths = [ + 'mtSphere/@radius', 'atomicCutoffs/@lmax', 'energyParameters/@s', 'electronConfig/coreConfig', + 'electronConfig/stateOccupation/@state', 'electronConfig/stateOccupation/@state', 'special/@socscale', + 'ldaU/@test_att', 'ldaU/@test_att', 'lo/@test_att', 'lo/@test_att' + ] + + attdicts = [{ + 'mtSphere': { + 'radius': 3.333 + } + }, { + 'atomicCutoffs': { + 'lmax': 7.0 + } + }, { + 'energyParameters': { + 's': 3.0 + } + }, { + 'electronConfig': { + 'coreConfig': 'test' + } + }, { + 'electronConfig': { + 'stateOccupation': { + 'state': 'state' + } + } + }, { + 'electronConfig': { + 'stateOccupation': [{ + 'state': 'state' + }, { + 'state': 'state2' + }] + } + }, { + 'special': { + 'socscale': 1.0 + } + }, { + 'ldaU': { + 'test_att': 2.0 + } + }, { + 'ldaU': [{ + 'test_att': 2.0 + }, { + 'test_att': 23.0 + }] + }, { + 'lo': { + 'test_att': 2.0 + } + }, { + 'lo': [{ + 'test_att': 2.0 + }, { + 'test_att': 33.0 + }] + } # 'nocoParams': {'test_att' : 2, 'qss' : '123 123 123'}, ] - results = ['3.333', '7.0', '3.0', 'test', 'state', [ - 'state', 'state2'], '1.0', '2.0', '2.0', ['2.0', '33.0']] + results = [ + '3.333', '7.0', '3.0', 'test', 'state', ['state', 'state2'], '1.0', '2.0', ['2.0', '23.0'], '2.0', + ['2.0', '33.0'] + ] @staticmethod @pytest.mark.parametrize('attr_dict,correct_result,path', zip(attdicts, results, paths)) @@ -262,7 +330,27 @@ def test_set_species_label(inpxml_etree, attr_dict, correct_result, path): from aiida_fleur.tools.xml_util import set_species_label, eval_xpath2 etree = inpxml_etree(TEST_INP_XML_PATH) - set_species_label(etree, " 222", attributedict=attr_dict) + set_species_label(etree, ' 222', attributedict=attr_dict) + + result = eval_xpath2(etree, '/fleurInput/atomSpecies/species[@name="Fe-1"]/' + path) + + if isinstance(correct_result, str): + if 'coreConfig' in path: + assert result[0].text == correct_result + else: + assert result[0] == correct_result + elif isinstance(correct_result, (float, int)): + assert result[0] == correct_result + else: + assert correct_result == result + + @staticmethod + @pytest.mark.parametrize('attr_dict,correct_result,path', zip(attdicts, results, paths)) + def test_set_species_all_string(inpxml_etree, attr_dict, correct_result, path): + from aiida_fleur.tools.xml_util import set_species, eval_xpath2 + etree = inpxml_etree(TEST_INP_XML_PATH) + + set_species(etree, 'all-Fe', attributedict=attr_dict) result = eval_xpath2(etree, '/fleurInput/atomSpecies/species[@name="Fe-1"]/' + path) @@ -277,6 +365,7 @@ def test_set_species_label(inpxml_etree, attr_dict, correct_result, path): assert correct_result == result results_all = [[x, x] if not isinstance(x, list) else [x[0], x[1], x[0], x[1]] for x in results] + @staticmethod @pytest.mark.parametrize('attr_dict,correct_result,path', zip(attdicts, results_all, paths)) def test_set_species_all(inpxml_etree, attr_dict, correct_result, path): @@ -314,13 +403,9 @@ def test_set_species_label_all(inpxml_etree, attr_dict, correct_result, path): class TestChangeAtomgrAtt: """Tests for change_atomgr_att""" - paths = ['force/@relaxXYZ', - 'nocoParams/@beta' - ] + paths = ['force/@relaxXYZ', 'nocoParams/@beta'] - attdicts = [{'force': [('relaxXYZ', 'FFF')]}, - {'nocoParams': [('beta', 7.0)]} - ] + attdicts = [{'force': [('relaxXYZ', 'FFF')]}, {'nocoParams': [('beta', 7.0)]}] results = ['FFF', '7.0'] @@ -354,13 +439,14 @@ def test_change_atomgr_att_label(inpxml_etree, attr_dict, correct_result, path): from aiida_fleur.tools.xml_util import change_atomgr_att_label, eval_xpath2 etree = inpxml_etree(TEST_INP_XML_PATH) - change_atomgr_att_label(etree, attributedict=attr_dict, at_label=" 222") + change_atomgr_att_label(etree, attributedict=attr_dict, at_label=' 222') result = eval_xpath2(etree, '/fleurInput/atomGroups/atomGroup[@species="Fe-1"]/' + path) assert result[0] == correct_result results_all = [[x, x] for x in results] + @staticmethod @pytest.mark.parametrize('attr_dict,correct_result,path', zip(attdicts, results_all, paths)) def test_change_atomgr_att_all(inpxml_etree, attr_dict, correct_result, path): @@ -379,7 +465,7 @@ def test_change_atomgr_att_label_all(inpxml_etree, attr_dict, correct_result, pa from aiida_fleur.tools.xml_util import change_atomgr_att_label, eval_xpath2 etree = inpxml_etree(TEST_INP_XML_PATH) - change_atomgr_att_label(etree, attributedict=attr_dict, at_label="all") + change_atomgr_att_label(etree, attributedict=attr_dict, at_label='all') result = eval_xpath2(etree, '/fleurInput/atomGroups/atomGroup/' + path) @@ -391,13 +477,13 @@ def test_change_atomgr_att_fail(self, inpxml_etree): change_atomgr_att(etree, attributedict=self.attdicts[0]) - result = eval_xpath2( - etree, '/fleurInput/atomGroups/atomGroup[@species="Fe-1"]/' + self.paths[0]) + result = eval_xpath2(etree, '/fleurInput/atomGroups/atomGroup[@species="Fe-1"]/' + self.paths[0]) assert result[0] == 'TTT' class TestSetInpchanges: + """Tests group for set_inpchanges method""" from aiida_fleur.tools.xml_util import get_inpxml_file_structure xml_structure = get_inpxml_file_structure() @@ -409,11 +495,10 @@ def test_set_inpchanges(self, inpxml_etree, name, path): from aiida_fleur.tools.xml_util import set_inpchanges, eval_xpath2 etree = inpxml_etree(TEST_INP_XML_PATH) - skip_paths = ['atomSpecies', 'atomGroups', 'bzIntegration', 'kPointCount', 'bulkLattice', - 'bravaisMatrix', 'a1'] + skip_paths = ['atomSpecies', 'atomGroups', 'bzIntegration', 'kPointCount', 'bulkLattice', 'bravaisMatrix', 'a1'] if any(x in path for x in skip_paths): - pytest.skip("This attribute is not tested for FePt/inp.xml") + pytest.skip('This attribute is not tested for FePt/inp.xml') elif name in self.xml_structure[11].keys(): set_inpchanges(etree, change_dict={name: 'test'}) if name not in ['relPos', 'absPos']: @@ -501,12 +586,14 @@ def test_inpxml_to_dict(inpxml_etree): 'mix_b': '.00000000', 'qss': '0.0 0.0 0.0', }, - 'expertModes': {'eig66': False, - 'gw': 0, - 'isec1': 99, - 'lpr': 0, - 'pot8': False, - 'secvar': False}, + 'expertModes': { + 'eig66': False, + 'gw': 0, + 'isec1': 99, + 'lpr': 0, + 'pot8': False, + 'secvar': False + }, 'geometryOptimization': { 'l_f': False, 'forcealpha': 1.0, @@ -516,121 +603,191 @@ def test_inpxml_to_dict(inpxml_etree): 'epsdisp': 1e-05, 'epsforce': 1e-05, }, - 'ldaU': {'l_linMix': 'F', 'mixParam': '.050000', 'spinf': 1.0}, + 'ldaU': { + 'l_linMix': 'F', + 'mixParam': '.050000', + 'spinf': 1.0 + }, 'bzIntegration': { - 'altKPointSet': {'kPointCount': {'count': 240, - 'gamma': False}, - 'purpose': 'bands'}, + 'altKPointSet': { + 'kPointCount': { + 'count': 240, + 'gamma': False + }, + 'purpose': 'bands' + }, 'valenceElectrons': 18.0, 'mode': 'hist', 'fermiSmearingEnergy': 0.001, - 'kPointList': {'posScale': '1.00000000', 'weightScale': '1.00000000', 'count': 1, - 'kPoint': ['0.000000 0.000000 0.000000']}, + 'kPointList': { + 'posScale': '1.00000000', + 'weightScale': '1.00000000', + 'count': 1, + 'kPoint': ['0.000000 0.000000 0.000000'] + }, + }, + 'energyParameterLimits': { + 'ellow': -0.8, + 'elup': 0.5 }, - 'energyParameterLimits': {'ellow': -0.8, 'elup': 0.5}, }, 'cell': { - 'symmetryOperations': {'symOp': {'row-1': '1 0 0 .0000000000', - 'row-2': '0 -1 0 .0000000000', - 'row-3': '0 0 1 .0000000000'}}, + 'symmetryOperations': { + 'symOp': { + 'row-1': '1 0 0 .0000000000', + 'row-2': '0 -1 0 .0000000000', + 'row-3': '0 0 1 .0000000000' + } + }, 'filmLattice': { 'scale': 1.0, 'dVac': 7.35, 'latnam': 'any', 'dTilda': 10.91, - 'bravaisMatrix': {'row-1': '5.301179702900000 .000000000000000 .000000000000000', - 'row-2': '.000000000000000 7.497000033000000 .000000000000000', - 'row-3': '.000000000000000 .000000000000000 7.992850008800000'}, - 'vacuumEnergyParameters': {'vacuum': '2', - 'spinUp': '-.25000000', - 'spinDown': '-.25000000'}, - }}, - 'xcFunctional': {'name': 'vwn', 'relativisticCorrections': False}, - 'atomSpecies': {'species': [{ - 'name': 'Fe-1', - 'element': 'Fe', - 'atomicNumber': 26, - 'coreStates': 7, - 'mtSphere': {'radius': 2.2, 'gridPoints': 787, - 'logIncrement': 0.016}, - 'atomicCutoffs': {'lmax': 10, 'lnonsphr': 6}, - 'energyParameters': { - 's': 4, - 'p': 4, - 'd': 3, - 'f': 4, - }, - 'flipSpin': True, - 'magMom': 2.2, - 'prodBasis': {'lcutm': '4', - 'lcutwf': '9', - 'select': '4 0 4 2'}, - 'electronConfig': {'coreConfig': '[Ar]', - 'valenceConfig': '(4s1/2) (3d3/2) (3d5/2)', - 'stateOccupation': [{'state': '(3d3/2)', - 'spinUp': '2.00000000', - 'spinDown': '1.00000000'}, - {'state': '(3d5/2)', - 'spinUp': '3.00000000', - 'spinDown': '.00000000'}]}, - }, { - 'name': 'Pt-1', - 'element': 'Pt', - 'atomicNumber': 78, - 'coreStates': 19, - 'mtSphere': {'radius': 2.2, 'gridPoints': 787, - 'logIncrement': 0.017}, - 'atomicCutoffs': {'lmax': 10, 'lnonsphr': 6}, - 'energyParameters': { - 's': 6, - 'p': 6, - 'd': 5, - 'f': 5, - }, - 'flipSpin': True, - 'magMom': 0.0, - 'prodBasis': {'lcutm': '4', - 'lcutwf': '9', - 'select': '4 0 4 2'}, - 'electronConfig': {'coreConfig': '[Xe] (4f5/2) (4f7/2)', - 'valenceConfig': '(6s1/2) (5d3/2) (5d5/2)', - 'stateOccupation': [{'state': '(6s1/2)', - 'spinUp': '.50000000', - 'spinDown': '.50000000'}, - {'state': '(5d5/2)', - 'spinUp': '3.00000000', - 'spinDown': '2.00000000'}]}, - }]}, - 'atomGroups': {'atomGroup': [{ - 'species': 'Fe-1', - 'filmPos': ['.0000000000 .0000000000 -.9964250044'], - 'force': {'calculate': True, 'relaxXYZ': 'TTT'}, - 'nocoParams': { - 'l_relax': 'F', - 'alpha': 0.0, - 'beta': '1.570796326', - 'b_cons_x': '.00000000', - 'b_cons_y': '.00000000', - }, - }, { - 'species': 'Pt-1', - 'filmPos': ['1.000/2.000 1.000/2.000 .9964250044'], - 'force': {'calculate': True, 'relaxXYZ': 'TTT'}, - 'nocoParams': { - 'l_relax': 'F', - 'alpha': 0.0, - 'beta': '1.570796326', - 'b_cons_x': '.00000000', - 'b_cons_y': '.00000000', - }, - }]}, + 'bravaisMatrix': { + 'row-1': '5.301179702900000 .000000000000000 .000000000000000', + 'row-2': '.000000000000000 7.497000033000000 .000000000000000', + 'row-3': '.000000000000000 .000000000000000 7.992850008800000' + }, + 'vacuumEnergyParameters': { + 'vacuum': '2', + 'spinUp': '-.25000000', + 'spinDown': '-.25000000' + }, + } + }, + 'xcFunctional': { + 'name': 'vwn', + 'relativisticCorrections': False + }, + 'atomSpecies': { + 'species': [{ + 'name': 'Fe-1', + 'element': 'Fe', + 'atomicNumber': 26, + 'coreStates': 7, + 'mtSphere': { + 'radius': 2.2, + 'gridPoints': 787, + 'logIncrement': 0.016 + }, + 'atomicCutoffs': { + 'lmax': 10, + 'lnonsphr': 6 + }, + 'energyParameters': { + 's': 4, + 'p': 4, + 'd': 3, + 'f': 4, + }, + 'flipSpin': True, + 'magMom': 2.2, + 'prodBasis': { + 'lcutm': '4', + 'lcutwf': '9', + 'select': '4 0 4 2' + }, + 'electronConfig': { + 'coreConfig': + '[Ar]', + 'valenceConfig': + '(4s1/2) (3d3/2) (3d5/2)', + 'stateOccupation': [{ + 'state': '(3d3/2)', + 'spinUp': '2.00000000', + 'spinDown': '1.00000000' + }, { + 'state': '(3d5/2)', + 'spinUp': '3.00000000', + 'spinDown': '.00000000' + }] + }, + }, { + 'name': 'Pt-1', + 'element': 'Pt', + 'atomicNumber': 78, + 'coreStates': 19, + 'mtSphere': { + 'radius': 2.3, + 'gridPoints': 787, + 'logIncrement': 0.017 + }, + 'atomicCutoffs': { + 'lmax': 10, + 'lnonsphr': 6 + }, + 'energyParameters': { + 's': 6, + 'p': 6, + 'd': 5, + 'f': 5, + }, + 'flipSpin': True, + 'magMom': 0.0, + 'prodBasis': { + 'lcutm': '4', + 'lcutwf': '9', + 'select': '4 0 4 2' + }, + 'electronConfig': { + 'coreConfig': + '[Xe] (4f5/2) (4f7/2)', + 'valenceConfig': + '(6s1/2) (5d3/2) (5d5/2)', + 'stateOccupation': [{ + 'state': '(6s1/2)', + 'spinUp': '.50000000', + 'spinDown': '.50000000' + }, { + 'state': '(5d5/2)', + 'spinUp': '3.00000000', + 'spinDown': '2.00000000' + }] + }, + }] + }, + 'atomGroups': { + 'atomGroup': [{ + 'species': 'Fe-1', + 'filmPos': ['.0000000000 .0000000000 -.9964250044'], + 'force': { + 'calculate': True, + 'relaxXYZ': 'TTT' + }, + 'nocoParams': { + 'l_relax': 'F', + 'alpha': 0.0, + 'beta': '1.570796326', + 'b_cons_x': '.00000000', + 'b_cons_y': '.00000000', + }, + }, { + 'species': 'Pt-1', + 'filmPos': ['1.000/2.000 1.000/2.000 .9964250044'], + 'force': { + 'calculate': True, + 'relaxXYZ': 'TTT' + }, + 'nocoParams': { + 'l_relax': 'F', + 'alpha': 0.0, + 'beta': '1.570796326', + 'b_cons_x': '.00000000', + 'b_cons_y': '.00000000', + }, + }] + }, 'output': { 'dos': False, 'band': False, 'vacdos': False, 'slice': False, 'mcd': 'F', - 'checks': {'vchk': False, 'cdinf': False}, + 'checks': { + 'vchk': False, + 'cdinf': False + }, 'densityOfStates': { 'ndir': 0, 'minEnergy': -0.5, @@ -655,9 +812,11 @@ def test_inpxml_to_dict(inpxml_etree): 'supercellY': '1', 'supercellZ': '1', }, - 'plotting': {'iplot': 0, - 'plplot': False, - 'score': False}, + 'plotting': { + 'iplot': 0, + 'plplot': False, + 'score': False + }, 'chargeDensitySlicing': { 'numkpt': 0, 'minEigenval': 0.0, @@ -665,9 +824,14 @@ def test_inpxml_to_dict(inpxml_etree): 'nnne': 0, 'pallst': False, }, - 'specialOutput': {'eonly': False, 'bmt': False}, - 'magneticCircularDichroism': {'energyLo': '-10.00000000', - 'energyUp': '.00000000'}, + 'specialOutput': { + 'eonly': False, + 'bmt': False + }, + 'magneticCircularDichroism': { + 'energyLo': '-10.00000000', + 'energyUp': '.00000000' + }, }, } @@ -679,6 +843,7 @@ def test_inpxml_to_dict(inpxml_etree): class TestShiftValue: + """ Test group for test_shift value function """ from aiida_fleur.tools.xml_util import get_inpxml_file_structure xml_structure = get_inpxml_file_structure() @@ -695,7 +860,7 @@ def test_shift_value(self, inpxml_etree, attr_name): if not result_before: if attr_name in ['nx', 'ny', 'nz', 'scale']: - pytest.skip("This attribute is not tested for FePt/inp.xml") + pytest.skip('This attribute is not tested for FePt/inp.xml') raise BaseException('Can not find attribute that should exist in FePt/inp.xml') else: result_before = result_before[0] @@ -704,7 +869,12 @@ def test_shift_value(self, inpxml_etree, attr_name): assert float(result) - float(result_before) == 333 + shift_value(etree, {attr_name: 333}) + result = eval_xpath2(etree, path + '/@{}'.format(attr_name))[0] + assert float(result) - float(result_before) == 666 + attr_to_test_float = list(xml_structure[4]) + @pytest.mark.parametrize('attr_name', attr_to_test_float) def test_shift_value_rel(self, inpxml_etree, attr_name): import math @@ -716,7 +886,7 @@ def test_shift_value_rel(self, inpxml_etree, attr_name): if not result_before: if attr_name in ['scale']: - pytest.skip("This attribute is not tested for FePt/inp.xml") + pytest.skip('This attribute is not tested for FePt/inp.xml') raise BaseException('Can not find attribute that should exist in FePt/inp.xml') else: result_before = result_before[0] @@ -734,15 +904,15 @@ def test_shift_value_errors(self, inpxml_etree, capsys): with pytest.raises(ValueError) as excinfo: shift_value(etree, {'does_not_exist': 1.2442}) - assert "Given attribute name either does not ex" in str(excinfo.value) + assert 'Given attribute name either does not ex' in str(excinfo.value) with pytest.raises(ValueError) as excinfo: shift_value(etree, {'jspins': 3.3}) - assert "You are trying to write a float" in str(excinfo.value) + assert 'You are trying to write a float' in str(excinfo.value) with pytest.raises(ValueError) as excinfo: shift_value(etree, {'l_noco': 33}) - assert "Given attribute name either does not ex" in str(excinfo.value) + assert 'Given attribute name either does not ex' in str(excinfo.value) with pytest.raises(ValueError) as excinfo: shift_value(etree, {'jspins': 33}, mode='not_a_mode') @@ -752,10 +922,14 @@ def test_shift_value_errors(self, inpxml_etree, capsys): captured = capsys.readouterr() assert captured.out == 'Can not find nz attribute in the inp.xml, skip it\n' + class TestShiftSpeciesLabel: + """ Test group for test_shift species label function """ attr_names = ['radius', 'gridPoints', 'logIncrement', 'lmax', 'lnonsphr', 's', 'p', 'd', 'f'] - tags = ['mtSphere', 'mtSphere', 'mtSphere', 'atomicCutoffs', 'atomicCutoffs', - 'energyParameters','energyParameters', 'energyParameters', 'energyParameters'] + tags = [ + 'mtSphere', 'mtSphere', 'mtSphere', 'atomicCutoffs', 'atomicCutoffs', 'energyParameters', 'energyParameters', + 'energyParameters', 'energyParameters' + ] @pytest.mark.parametrize('att_name,tag', zip(attr_names, tags)) def test_shift_species_label(self, inpxml_etree, att_name, tag): @@ -779,14 +953,46 @@ def test_shift_species_label_rel(self, inpxml_etree, att_name, tag): import math etree = inpxml_etree(TEST_INP_XML_PATH) path = '/fleurInput/atomSpecies/species[@name = "Fe-1"]/' + tag + '/@' + att_name + untouched = '/fleurInput/atomSpecies/species[@name = "Pt-1"]/' + tag + '/@' + att_name old_result = eval_xpath2(etree, path)[0] + untouched_result = eval_xpath2(etree, untouched)[0] shift_value_species_label(etree, ' 222', att_name, 3.2, mode='rel') result = eval_xpath2(etree, path)[0] + untouched_result_new = eval_xpath2(etree, untouched)[0] + + assert math.isclose(float(result) / float(old_result), 3.2) + assert math.isclose(float(untouched_result_new) / float(untouched_result), 1.0) + + @pytest.mark.parametrize('att_name,tag', zip(attr_names, tags)) + def test_shift_species_label_all(self, inpxml_etree, att_name, tag): + from aiida_fleur.tools.xml_util import shift_value_species_label, eval_xpath2 + import numpy as np + etree = inpxml_etree(TEST_INP_XML_PATH) + path = '/fleurInput/atomSpecies/species/' + tag + '/@' + att_name + old_result = np.array(eval_xpath2(etree, path)).astype('float') + + shift_value_species_label(etree, 'all', att_name, 3, mode='abs') + result = np.array(eval_xpath2(etree, path)).astype('float') + + assert np.all(np.isclose(old_result + 3, result)) + + @pytest.mark.parametrize('att_name,tag', zip(attr_names, tags)) + def test_shift_species_label_all_rel(self, inpxml_etree, att_name, tag): + from aiida_fleur.tools.xml_util import shift_value_species_label, eval_xpath2 + import numpy as np + etree = inpxml_etree(TEST_INP_XML_PATH) + path = '/fleurInput/atomSpecies/species/' + tag + '/@' + att_name + old_result = np.array(eval_xpath2(etree, path)).astype('float') + + shift_value_species_label(etree, 'all', att_name, 2, mode='rel') + result = np.array(eval_xpath2(etree, path)).astype('float') + + assert np.all(np.isclose(old_result * 2, result)) - assert math.isclose(float(result)/float(old_result), 3.2) class TestAddNumToAtt: + """ Test group for add_num_to_att function """ from aiida_fleur.tools.xml_util import get_inpxml_file_structure xml_structure = get_inpxml_file_structure() @@ -803,7 +1009,7 @@ def test_add_num_to_att(self, inpxml_etree, attr_name): if not result_before: if attr_name in ['nx', 'ny', 'nz', 'scale']: - pytest.skip("This attribute is not tested for FePt/inp.xml") + pytest.skip('This attribute is not tested for FePt/inp.xml') raise BaseException('Can not find attribute that should exist in FePt/inp.xml') else: result_before = result_before[0] @@ -813,6 +1019,7 @@ def test_add_num_to_att(self, inpxml_etree, attr_name): assert float(result) - float(result_before) == 333 attr_to_test_float = list(xml_structure[4]) + @pytest.mark.parametrize('attr_name', attr_to_test_float) def test_ad_num_to_att_rel(self, inpxml_etree, attr_name): import math @@ -824,14 +1031,13 @@ def test_ad_num_to_att_rel(self, inpxml_etree, attr_name): if not result_before: if attr_name in ['scale']: - pytest.skip("This attribute is not tested for FePt/inp.xml") + pytest.skip('This attribute is not tested for FePt/inp.xml') raise BaseException('Can not find attribute that should exist in FePt/inp.xml') else: result_before = result_before[0] add_num_to_att(etree, path, attr_name, 1.2442, mode='rel') result = eval_xpath2(etree, path + '/@{}'.format(attr_name))[0] - if float(result_before) != 0: assert math.isclose(float(result) / float(result_before), 1.2442, rel_tol=1e-6) else: @@ -839,9 +1045,11 @@ def test_ad_num_to_att_rel(self, inpxml_etree, attr_name): # get_xml_attribute +@pytest.mark.skip(reason='Test not implemented') def test_get_xml_attribute(inpxml_etree): from aiida_fleur.tools.xml_util import get_xml_attribute - pass + return False + # get_inpxml_file_structure # IMPORTANT: Here we need thats that tell us when the plugin has to be maintained, i.e Know thing in the inp schema where changed diff --git a/aiida_fleur/tests/workflows/caches/fleur_mae_FePt.tar.gz b/aiida_fleur/tests/workflows/caches/fleur_mae_FePt.tar.gz new file mode 100644 index 000000000..7c208de5a Binary files /dev/null and b/aiida_fleur/tests/workflows/caches/fleur_mae_FePt.tar.gz differ diff --git a/aiida_fleur/tests/workflows/caches/fleur_mae_FePt_o.tar.gz b/aiida_fleur/tests/workflows/caches/fleur_mae_FePt_o.tar.gz new file mode 100644 index 000000000..18fd4fd68 Binary files /dev/null and b/aiida_fleur/tests/workflows/caches/fleur_mae_FePt_o.tar.gz differ diff --git a/aiida_fleur/tests/workflows/caches/fleur_scf_fleurinp_Si.tar.gz b/aiida_fleur/tests/workflows/caches/fleur_scf_fleurinp_Si.tar.gz new file mode 100644 index 000000000..a2dd39448 Binary files /dev/null and b/aiida_fleur/tests/workflows/caches/fleur_scf_fleurinp_Si.tar.gz differ diff --git a/aiida_fleur/tests/workflows/caches/fleur_scf_fleurinp_Si_mod.tar.gz b/aiida_fleur/tests/workflows/caches/fleur_scf_fleurinp_Si_mod.tar.gz new file mode 100644 index 000000000..77fda8232 Binary files /dev/null and b/aiida_fleur/tests/workflows/caches/fleur_scf_fleurinp_Si_mod.tar.gz differ diff --git a/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-15e765f12fcdbe12c715120ecf8625ad/JUDFT_WARN_ONLY b/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-15e765f12fcdbe12c715120ecf8625ad/JUDFT_WARN_ONLY new file mode 100644 index 000000000..65c71eb10 --- /dev/null +++ b/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-15e765f12fcdbe12c715120ecf8625ad/JUDFT_WARN_ONLY @@ -0,0 +1 @@ +/n diff --git a/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-15e765f12fcdbe12c715120ecf8625ad/_aiidasubmit.sh b/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-15e765f12fcdbe12c715120ecf8625ad/_aiidasubmit.sh new file mode 100644 index 000000000..ada17d838 --- /dev/null +++ b/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-15e765f12fcdbe12c715120ecf8625ad/_aiidasubmit.sh @@ -0,0 +1,8 @@ +#!/bin/bash +exec > _scheduler-stdout.txt +exec 2> _scheduler-stderr.txt +env --ignore-environment \ + + + +'/Users/broeder/codes/aiida/fleur/max_r4/serial/fleur' '-minimalOutput' '-wtime' '5.0' > 'shell.out' 2> 'out.error' diff --git a/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-15e765f12fcdbe12c715120ecf8625ad/_scheduler-stderr.txt b/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-15e765f12fcdbe12c715120ecf8625ad/_scheduler-stderr.txt new file mode 100644 index 000000000..e69de29bb diff --git a/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-15e765f12fcdbe12c715120ecf8625ad/_scheduler-stdout.txt b/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-15e765f12fcdbe12c715120ecf8625ad/_scheduler-stdout.txt new file mode 100644 index 000000000..e69de29bb diff --git a/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-15e765f12fcdbe12c715120ecf8625ad/cdn1 b/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-15e765f12fcdbe12c715120ecf8625ad/cdn1 new file mode 100644 index 000000000..622cc7012 Binary files /dev/null and b/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-15e765f12fcdbe12c715120ecf8625ad/cdn1 differ diff --git a/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-15e765f12fcdbe12c715120ecf8625ad/inp.xml b/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-15e765f12fcdbe12c715120ecf8625ad/inp.xml new file mode 100644 index 000000000..f381d4a4e --- /dev/null +++ b/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-15e765f12fcdbe12c715120ecf8625ad/inp.xml @@ -0,0 +1,419 @@ + + + A Fleur input generator calculation with aiida + + + + + + + + + + .0000000000 .0000000000 .0000000000 + + + + + + + 0.450000 0.450000 0.450000 + 0.350000 0.450000 0.450000 + 0.250000 0.450000 0.450000 + 0.150000 0.450000 0.450000 + 0.050000 0.450000 0.450000 + 0.050000 0.500000 0.500000 + 0.150000 0.550000 0.550000 + 0.250000 0.550000 0.550000 + 0.350000 0.550000 0.550000 + 0.450000 0.450000 0.550000 + 0.350000 0.350000 0.450000 + 0.250000 0.350000 0.450000 + 0.150000 0.350000 0.450000 + 0.100000 0.400000 0.450000 + 0.100000 0.450000 0.500000 + 0.150000 0.500000 0.600000 + 0.250000 0.550000 0.650000 + 0.350000 0.450000 0.650000 + 0.350000 0.450000 0.550000 + 0.250000 0.250000 0.450000 + 0.200000 0.300000 0.450000 + 0.200000 0.400000 0.450000 + 0.200000 0.450000 0.500000 + 0.200000 0.450000 0.600000 + 0.250000 0.500000 0.700000 + 0.250000 0.450000 0.650000 + 0.250000 0.450000 0.550000 + 0.300000 0.300000 0.450000 + 0.300000 0.400000 0.450000 + 0.300000 0.450000 0.500000 + 0.300000 0.450000 0.600000 + 0.300000 0.450000 0.700000 + 0.200000 0.500000 0.650000 + 0.150000 0.450000 0.550000 + 0.400000 0.400000 0.450000 + 0.400000 0.450000 0.500000 + 0.400000 0.450000 0.600000 + 0.300000 0.550000 0.600000 + 0.200000 0.550000 0.600000 + 0.100000 0.500000 0.550000 + 0.450000 0.500000 0.500000 + 0.400000 0.500000 0.550000 + 0.300000 0.500000 0.550000 + 0.200000 0.500000 0.550000 + 0.400000 0.400000 0.550000 + 0.300000 0.400000 0.550000 + 0.200000 0.400000 0.550000 + 0.300000 0.300000 0.550000 + 0.250000 0.350000 0.550000 + 0.350000 0.350000 0.550000 + 0.350000 0.350000 0.350000 + 0.250000 0.350000 0.350000 + 0.150000 0.350000 0.350000 + 0.050000 0.350000 0.350000 + 0.050000 0.400000 0.400000 + 0.150000 0.500000 0.500000 + 0.250000 0.600000 0.600000 + 0.350000 0.350000 0.650000 + 0.250000 0.250000 0.350000 + 0.150000 0.250000 0.350000 + 0.100000 0.300000 0.350000 + 0.100000 0.350000 0.400000 + 0.150000 0.400000 0.500000 + 0.250000 0.500000 0.600000 + 0.300000 0.400000 0.650000 + 0.200000 0.200000 0.350000 + 0.200000 0.300000 0.350000 + 0.200000 0.350000 0.400000 + 0.200000 0.350000 0.500000 + 0.250000 0.400000 0.600000 + 0.300000 0.500000 0.650000 + 0.300000 0.300000 0.350000 + 0.300000 0.350000 0.400000 + 0.300000 0.350000 0.500000 + 0.300000 0.350000 0.600000 + 0.350000 0.400000 0.700000 + 0.350000 0.400000 0.400000 + 0.350000 0.400000 0.500000 + 0.350000 0.400000 0.600000 + 0.350000 0.500000 0.500000 + 0.350000 0.500000 0.600000 + 0.400000 0.400000 0.650000 + 0.250000 0.250000 0.250000 + 0.150000 0.250000 0.250000 + 0.050000 0.250000 0.250000 + 0.050000 0.300000 0.300000 + 0.150000 0.400000 0.400000 + 0.250000 0.500000 0.500000 + 0.150000 0.150000 0.250000 + 0.100000 0.200000 0.250000 + 0.100000 0.250000 0.300000 + 0.150000 0.300000 0.400000 + 0.250000 0.400000 0.500000 + 0.200000 0.200000 0.250000 + 0.200000 0.250000 0.300000 + 0.200000 0.250000 0.400000 + 0.250000 0.300000 0.500000 + 0.250000 0.300000 0.300000 + 0.250000 0.300000 0.400000 + 0.250000 0.400000 0.400000 + 0.150000 0.150000 0.150000 + 0.050000 0.150000 0.150000 + 0.050000 0.200000 0.200000 + 0.150000 0.300000 0.300000 + 0.100000 0.100000 0.150000 + 0.100000 0.150000 0.200000 + 0.150000 0.200000 0.300000 + 0.150000 0.200000 0.200000 + 0.050000 0.050000 0.050000 + 0.050000 0.100000 0.100000 + + + + + + + + + + + 1 0 0 .0000000000 + 0 1 0 .0000000000 + 0 0 1 .0000000000 + + + 0 1 0 .0000000000 + 1 0 0 .0000000000 + 0 0 1 .0000000000 + + + -1 0 0 .0000000000 + 0 -1 0 .0000000000 + 1 1 1 .5000000000 + + + 0 -1 0 .0000000000 + -1 0 0 .0000000000 + 1 1 1 .5000000000 + + + 0 1 0 .0000000000 + 1 0 0 .0000000000 + -1 -1 -1 .5000000000 + + + 1 0 0 .0000000000 + 0 1 0 .0000000000 + -1 -1 -1 .5000000000 + + + -1 0 0 .0000000000 + 0 -1 0 .0000000000 + 0 0 -1 .0000000000 + + + 0 -1 0 .0000000000 + -1 0 0 .0000000000 + 0 0 -1 .0000000000 + + + 0 0 1 .0000000000 + 1 0 0 .0000000000 + -1 -1 -1 .5000000000 + + + 0 0 1 .0000000000 + 0 1 0 .0000000000 + -1 -1 -1 .5000000000 + + + 1 1 1 .5000000000 + 0 -1 0 .0000000000 + 0 0 -1 .0000000000 + + + 1 1 1 .5000000000 + -1 0 0 .0000000000 + 0 0 -1 .0000000000 + + + -1 0 0 .0000000000 + 1 1 1 .5000000000 + 0 0 -1 .0000000000 + + + 1 0 0 .0000000000 + 0 0 1 .0000000000 + -1 -1 -1 .5000000000 + + + 0 1 0 .0000000000 + 0 0 1 .0000000000 + -1 -1 -1 .5000000000 + + + 0 -1 0 .0000000000 + 1 1 1 .5000000000 + 0 0 -1 .0000000000 + + + -1 0 0 .0000000000 + 0 0 -1 .0000000000 + 0 -1 0 .0000000000 + + + 0 1 0 .0000000000 + -1 -1 -1 .5000000000 + 1 0 0 .0000000000 + + + 0 -1 0 .0000000000 + 0 0 -1 .0000000000 + -1 0 0 .0000000000 + + + 1 0 0 .0000000000 + -1 -1 -1 .5000000000 + 0 1 0 .0000000000 + + + 1 1 1 .5000000000 + 0 0 -1 .0000000000 + 0 -1 0 .0000000000 + + + 0 0 1 .0000000000 + -1 -1 -1 .5000000000 + 1 0 0 .0000000000 + + + 1 1 1 .5000000000 + 0 0 -1 .0000000000 + -1 0 0 .0000000000 + + + 0 0 1 .0000000000 + -1 -1 -1 .5000000000 + 0 1 0 .0000000000 + + + 0 0 -1 .0000000000 + -1 0 0 .0000000000 + 0 -1 0 .0000000000 + + + 0 0 -1 .0000000000 + 0 -1 0 .0000000000 + -1 0 0 .0000000000 + + + -1 -1 -1 .5000000000 + 0 1 0 .0000000000 + 1 0 0 .0000000000 + + + -1 -1 -1 .5000000000 + 1 0 0 .0000000000 + 0 1 0 .0000000000 + + + 0 0 1 .0000000000 + 0 1 0 .0000000000 + 1 0 0 .0000000000 + + + 1 1 1 .5000000000 + -1 0 0 .0000000000 + 0 -1 0 .0000000000 + + + 1 1 1 .5000000000 + 0 -1 0 .0000000000 + -1 0 0 .0000000000 + + + 0 0 1 .0000000000 + 1 0 0 .0000000000 + 0 1 0 .0000000000 + + + 0 0 -1 .0000000000 + 1 1 1 .5000000000 + -1 0 0 .0000000000 + + + 0 0 -1 .0000000000 + 1 1 1 .5000000000 + 0 -1 0 .0000000000 + + + -1 -1 -1 .5000000000 + 0 0 1 .0000000000 + 1 0 0 .0000000000 + + + -1 -1 -1 .5000000000 + 0 0 1 .0000000000 + 0 1 0 .0000000000 + + + -1 0 0 .0000000000 + 1 1 1 .5000000000 + 0 -1 0 .0000000000 + + + 0 1 0 .0000000000 + 0 0 1 .0000000000 + 1 0 0 .0000000000 + + + 0 -1 0 .0000000000 + 1 1 1 .5000000000 + -1 0 0 .0000000000 + + + 1 0 0 .0000000000 + 0 0 1 .0000000000 + 0 1 0 .0000000000 + + + 1 0 0 .0000000000 + -1 -1 -1 .5000000000 + 0 0 1 .0000000000 + + + 0 1 0 .0000000000 + -1 -1 -1 .5000000000 + 0 0 1 .0000000000 + + + 0 -1 0 .0000000000 + 0 0 -1 .0000000000 + 1 1 1 .5000000000 + + + -1 0 0 .0000000000 + 0 0 -1 .0000000000 + 1 1 1 .5000000000 + + + -1 -1 -1 .5000000000 + 1 0 0 .0000000000 + 0 0 1 .0000000000 + + + -1 -1 -1 .5000000000 + 0 1 0 .0000000000 + 0 0 1 .0000000000 + + + 0 0 -1 .0000000000 + 0 -1 0 .0000000000 + 1 1 1 .5000000000 + + + 0 0 -1 .0000000000 + -1 0 0 .0000000000 + 1 1 1 .5000000000 + + + + + .000000000000000 5.167355297900000 5.167355297900000 + 5.167355297900000 .000000000000000 5.167355297900000 + 5.167355297900000 5.167355297900000 .000000000000000 + + + + + + + + + + + + + + + 1.000/8.000 1.000/8.000 1.000/8.000 + -1.000/8.000 -1.000/8.000 -1.000/8.000 + + + + + + + + + + + + + + + + + + + diff --git a/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-15e765f12fcdbe12c715120ecf8625ad/juDFT_times.json b/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-15e765f12fcdbe12c715120ecf8625ad/juDFT_times.json new file mode 100644 index 000000000..4fba05bac --- /dev/null +++ b/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-15e765f12fcdbe12c715120ecf8625ad/juDFT_times.json @@ -0,0 +1,434 @@ +{ + "timername" : "Total Run", + "totaltime" : 6.00000, + "subtimers": [ + { + "timername" : "Initialization", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1, + "subtimers": [ + { + "timername" : "r_inpXML", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1 + }, + { + "timername" : "postprocessInput", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1, + "subtimers": [ + { + "timername" : "strgn", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1, + "subtimers": [ + { + "timername" : "writeStars", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1 + } + ] + }, + { + "timername" : "stepf", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1 + } + ] + } + ] + }, + { + "timername" : "generation of start-density", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1, + "subtimers": [ + { + "timername" : "qpw_to_nmt", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1 + }, + { + "timername" : "cdntot", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1, + "subtimers": [ + { + "timername" : "MT", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1 + } + ] + } + ] + }, + { + "timername" : "Qfix", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1 + }, + { + "timername" : "Open file/memory for IO of eig", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1 + }, + { + "timername" : "Iteration", + "totaltime" : 6.00000, + "mintime" : 0.0000E+00, + "maxtime" : 1.00000, + "ncalls" : 10, + "subtimers": [ + { + "timername" : "generation of potential", + "totaltime" : 2.00000, + "mintime" : 0.0000E+00, + "maxtime" : 1.00000, + "ncalls" : 10, + "subtimers": [ + { + "timername" : "psqpw", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 10 + }, + { + "timername" : "interstitial", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 10 + }, + { + "timername" : "MT-spheres", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 10 + }, + { + "timername" : "den-pot integrals", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 10 + }, + { + "timername" : "Vxc in interstitial", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 10 + }, + { + "timername" : "Vxc in MT", + "totaltime" : 2.00000, + "mintime" : 0.0000E+00, + "maxtime" : 1.00000, + "ncalls" : 10 + } + ] + }, + { + "timername" : "gen. of hamil. and diag. (tota", + "totaltime" : 2.00000, + "mintime" : 0.0000E+00, + "maxtime" : 1.00000, + "ncalls" : 10, + "subtimers": [ + { + "timername" : "eigen", + "totaltime" : 2.00000, + "mintime" : 0.0000E+00, + "maxtime" : 1.00000, + "ncalls" : 10, + "subtimers": [ + { + "timername" : "Updating energy parameters", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 10 + }, + { + "timername" : "tlmplm", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 10 + }, + { + "timername" : "Setup of H&S matrices", + "totaltime" : 1.00000, + "mintime" : 0.0000E+00, + "maxtime" : 1.00000, + "ncalls" : 1100, + "subtimers": [ + { + "timername" : "Interstitial part", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1100 + }, + { + "timername" : "MT part", + "totaltime" : 1.00000, + "mintime" : 0.0000E+00, + "maxtime" : 1.00000, + "ncalls" : 1100, + "subtimers": [ + { + "timername" : "fjgj coefficients", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1100 + }, + { + "timername" : "spherical setup", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1100 + }, + { + "timername" : "non-spherical setup", + "totaltime" : 1.00000, + "mintime" : 0.0000E+00, + "maxtime" : 1.00000, + "ncalls" : 1100 + }, + { + "timername" : "LO setup", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1100 + } + ] + }, + { + "timername" : "Matrix redistribution", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1100 + } + ] + }, + { + "timername" : "Diagonalization", + "totaltime" : 1.00000, + "mintime" : 0.0000E+00, + "maxtime" : 1.00000, + "ncalls" : 1100 + }, + { + "timername" : "EV output", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1100, + "subtimers": [ + { + "timername" : "IO (write)", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1100 + } + ] + } + ] + } + ] + }, + { + "timername" : "determination of fermi energy", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 10, + "subtimers": [ + { + "timername" : "IO (read)", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1100 + }, + { + "timername" : "IO (write)", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1100 + } + ] + }, + { + "timername" : "generation of new charge densi", + "totaltime" : 2.00000, + "mintime" : 0.0000E+00, + "maxtime" : 1.00000, + "ncalls" : 10, + "subtimers": [ + { + "timername" : "cdnval", + "totaltime" : 2.00000, + "mintime" : 0.0000E+00, + "maxtime" : 1.00000, + "ncalls" : 10, + "subtimers": [ + { + "timername" : "IO (read)", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1100 + }, + { + "timername" : "pwden", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1100 + }, + { + "timername" : "abcof", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1100 + }, + { + "timername" : "cdnval: rhomt", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1100 + }, + { + "timername" : "cdnval: rhonmt", + "totaltime" : 1.00000, + "mintime" : 0.0000E+00, + "maxtime" : 1.00000, + "ncalls" : 1100 + }, + { + "timername" : "cdnval: rho(n)mtlo", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1100 + }, + { + "timername" : "cdnmt", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 10 + } + ] + }, + { + "timername" : "cdntot", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 20, + "subtimers": [ + { + "timername" : "MT", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 20 + } + ] + }, + { + "timername" : "cdngen: cdncore", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 10, + "subtimers": [ + { + "timername" : "qpw_to_nmt", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 10 + } + ] + } + ] + }, + { + "timername" : "determination of total energy", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 10 + }, + { + "timername" : "Charge Density Mixing", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 10, + "subtimers": [ + { + "timername" : "Reading of distances", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 10 + }, + { + "timername" : "Mixing", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 10 + }, + { + "timername" : "Postprocessing", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 10 + } + ] + } + ] + } + ] +} diff --git a/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-15e765f12fcdbe12c715120ecf8625ad/mixing_history b/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-15e765f12fcdbe12c715120ecf8625ad/mixing_history new file mode 100644 index 000000000..5b854e0b2 Binary files /dev/null and b/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-15e765f12fcdbe12c715120ecf8625ad/mixing_history differ diff --git a/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-15e765f12fcdbe12c715120ecf8625ad/out.error b/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-15e765f12fcdbe12c715120ecf8625ad/out.error new file mode 100644 index 000000000..1b8eaecaf --- /dev/null +++ b/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-15e765f12fcdbe12c715120ecf8625ad/out.error @@ -0,0 +1,12 @@ +I/O warning : failed to load external entity "relax.xml" + + ***************************************** + Run finished successfully + Stop message: + all done + ***************************************** +Rank:0 used 0.699GB/ 767896 kB + % Total % Received % Xferd Average Speed Time Time Time Current + Dload Upload Total Spent Left Speed + 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 782 100 40 100 742 166 3085 --:--:-- --:--:-- --:--:-- 3091 +OK diff --git a/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-15e765f12fcdbe12c715120ecf8625ad/out.xml b/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-15e765f12fcdbe12c715120ecf8625ad/out.xml new file mode 100644 index 000000000..2d5963eb6 --- /dev/null +++ b/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-15e765f12fcdbe12c715120ecf8625ad/out.xml @@ -0,0 +1,1062 @@ + + + + + + GEN + + + + + + + + + + A Fleur input generator calculation with aiida + + + + + + + + + + .0000000000 .0000000000 .0000000000 + + + + + + + 0.450000 0.450000 0.450000 + 0.350000 0.450000 0.450000 + 0.250000 0.450000 0.450000 + 0.150000 0.450000 0.450000 + 0.050000 0.450000 0.450000 + 0.050000 0.500000 0.500000 + 0.150000 0.550000 0.550000 + 0.250000 0.550000 0.550000 + 0.350000 0.550000 0.550000 + 0.450000 0.450000 0.550000 + 0.350000 0.350000 0.450000 + 0.250000 0.350000 0.450000 + 0.150000 0.350000 0.450000 + 0.100000 0.400000 0.450000 + 0.100000 0.450000 0.500000 + 0.150000 0.500000 0.600000 + 0.250000 0.550000 0.650000 + 0.350000 0.450000 0.650000 + 0.350000 0.450000 0.550000 + 0.250000 0.250000 0.450000 + 0.200000 0.300000 0.450000 + 0.200000 0.400000 0.450000 + 0.200000 0.450000 0.500000 + 0.200000 0.450000 0.600000 + 0.250000 0.500000 0.700000 + 0.250000 0.450000 0.650000 + 0.250000 0.450000 0.550000 + 0.300000 0.300000 0.450000 + 0.300000 0.400000 0.450000 + 0.300000 0.450000 0.500000 + 0.300000 0.450000 0.600000 + 0.300000 0.450000 0.700000 + 0.200000 0.500000 0.650000 + 0.150000 0.450000 0.550000 + 0.400000 0.400000 0.450000 + 0.400000 0.450000 0.500000 + 0.400000 0.450000 0.600000 + 0.300000 0.550000 0.600000 + 0.200000 0.550000 0.600000 + 0.100000 0.500000 0.550000 + 0.450000 0.500000 0.500000 + 0.400000 0.500000 0.550000 + 0.300000 0.500000 0.550000 + 0.200000 0.500000 0.550000 + 0.400000 0.400000 0.550000 + 0.300000 0.400000 0.550000 + 0.200000 0.400000 0.550000 + 0.300000 0.300000 0.550000 + 0.250000 0.350000 0.550000 + 0.350000 0.350000 0.550000 + 0.350000 0.350000 0.350000 + 0.250000 0.350000 0.350000 + 0.150000 0.350000 0.350000 + 0.050000 0.350000 0.350000 + 0.050000 0.400000 0.400000 + 0.150000 0.500000 0.500000 + 0.250000 0.600000 0.600000 + 0.350000 0.350000 0.650000 + 0.250000 0.250000 0.350000 + 0.150000 0.250000 0.350000 + 0.100000 0.300000 0.350000 + 0.100000 0.350000 0.400000 + 0.150000 0.400000 0.500000 + 0.250000 0.500000 0.600000 + 0.300000 0.400000 0.650000 + 0.200000 0.200000 0.350000 + 0.200000 0.300000 0.350000 + 0.200000 0.350000 0.400000 + 0.200000 0.350000 0.500000 + 0.250000 0.400000 0.600000 + 0.300000 0.500000 0.650000 + 0.300000 0.300000 0.350000 + 0.300000 0.350000 0.400000 + 0.300000 0.350000 0.500000 + 0.300000 0.350000 0.600000 + 0.350000 0.400000 0.700000 + 0.350000 0.400000 0.400000 + 0.350000 0.400000 0.500000 + 0.350000 0.400000 0.600000 + 0.350000 0.500000 0.500000 + 0.350000 0.500000 0.600000 + 0.400000 0.400000 0.650000 + 0.250000 0.250000 0.250000 + 0.150000 0.250000 0.250000 + 0.050000 0.250000 0.250000 + 0.050000 0.300000 0.300000 + 0.150000 0.400000 0.400000 + 0.250000 0.500000 0.500000 + 0.150000 0.150000 0.250000 + 0.100000 0.200000 0.250000 + 0.100000 0.250000 0.300000 + 0.150000 0.300000 0.400000 + 0.250000 0.400000 0.500000 + 0.200000 0.200000 0.250000 + 0.200000 0.250000 0.300000 + 0.200000 0.250000 0.400000 + 0.250000 0.300000 0.500000 + 0.250000 0.300000 0.300000 + 0.250000 0.300000 0.400000 + 0.250000 0.400000 0.400000 + 0.150000 0.150000 0.150000 + 0.050000 0.150000 0.150000 + 0.050000 0.200000 0.200000 + 0.150000 0.300000 0.300000 + 0.100000 0.100000 0.150000 + 0.100000 0.150000 0.200000 + 0.150000 0.200000 0.300000 + 0.150000 0.200000 0.200000 + 0.050000 0.050000 0.050000 + 0.050000 0.100000 0.100000 + + + + + + + + 1 0 0 .0000000000 + 0 1 0 .0000000000 + 0 0 1 .0000000000 + + + 0 1 0 .0000000000 + 1 0 0 .0000000000 + 0 0 1 .0000000000 + + + -1 0 0 .0000000000 + 0 -1 0 .0000000000 + 1 1 1 .5000000000 + + + 0 -1 0 .0000000000 + -1 0 0 .0000000000 + 1 1 1 .5000000000 + + + 0 1 0 .0000000000 + 1 0 0 .0000000000 + -1 -1 -1 .5000000000 + + + 1 0 0 .0000000000 + 0 1 0 .0000000000 + -1 -1 -1 .5000000000 + + + -1 0 0 .0000000000 + 0 -1 0 .0000000000 + 0 0 -1 .0000000000 + + + 0 -1 0 .0000000000 + -1 0 0 .0000000000 + 0 0 -1 .0000000000 + + + 0 0 1 .0000000000 + 1 0 0 .0000000000 + -1 -1 -1 .5000000000 + + + 0 0 1 .0000000000 + 0 1 0 .0000000000 + -1 -1 -1 .5000000000 + + + 1 1 1 .5000000000 + 0 -1 0 .0000000000 + 0 0 -1 .0000000000 + + + 1 1 1 .5000000000 + -1 0 0 .0000000000 + 0 0 -1 .0000000000 + + + -1 0 0 .0000000000 + 1 1 1 .5000000000 + 0 0 -1 .0000000000 + + + 1 0 0 .0000000000 + 0 0 1 .0000000000 + -1 -1 -1 .5000000000 + + + 0 1 0 .0000000000 + 0 0 1 .0000000000 + -1 -1 -1 .5000000000 + + + 0 -1 0 .0000000000 + 1 1 1 .5000000000 + 0 0 -1 .0000000000 + + + -1 0 0 .0000000000 + 0 0 -1 .0000000000 + 0 -1 0 .0000000000 + + + 0 1 0 .0000000000 + -1 -1 -1 .5000000000 + 1 0 0 .0000000000 + + + 0 -1 0 .0000000000 + 0 0 -1 .0000000000 + -1 0 0 .0000000000 + + + 1 0 0 .0000000000 + -1 -1 -1 .5000000000 + 0 1 0 .0000000000 + + + 1 1 1 .5000000000 + 0 0 -1 .0000000000 + 0 -1 0 .0000000000 + + + 0 0 1 .0000000000 + -1 -1 -1 .5000000000 + 1 0 0 .0000000000 + + + 1 1 1 .5000000000 + 0 0 -1 .0000000000 + -1 0 0 .0000000000 + + + 0 0 1 .0000000000 + -1 -1 -1 .5000000000 + 0 1 0 .0000000000 + + + 0 0 -1 .0000000000 + -1 0 0 .0000000000 + 0 -1 0 .0000000000 + + + 0 0 -1 .0000000000 + 0 -1 0 .0000000000 + -1 0 0 .0000000000 + + + -1 -1 -1 .5000000000 + 0 1 0 .0000000000 + 1 0 0 .0000000000 + + + -1 -1 -1 .5000000000 + 1 0 0 .0000000000 + 0 1 0 .0000000000 + + + 0 0 1 .0000000000 + 0 1 0 .0000000000 + 1 0 0 .0000000000 + + + 1 1 1 .5000000000 + -1 0 0 .0000000000 + 0 -1 0 .0000000000 + + + 1 1 1 .5000000000 + 0 -1 0 .0000000000 + -1 0 0 .0000000000 + + + 0 0 1 .0000000000 + 1 0 0 .0000000000 + 0 1 0 .0000000000 + + + 0 0 -1 .0000000000 + 1 1 1 .5000000000 + -1 0 0 .0000000000 + + + 0 0 -1 .0000000000 + 1 1 1 .5000000000 + 0 -1 0 .0000000000 + + + -1 -1 -1 .5000000000 + 0 0 1 .0000000000 + 1 0 0 .0000000000 + + + -1 -1 -1 .5000000000 + 0 0 1 .0000000000 + 0 1 0 .0000000000 + + + -1 0 0 .0000000000 + 1 1 1 .5000000000 + 0 -1 0 .0000000000 + + + 0 1 0 .0000000000 + 0 0 1 .0000000000 + 1 0 0 .0000000000 + + + 0 -1 0 .0000000000 + 1 1 1 .5000000000 + -1 0 0 .0000000000 + + + 1 0 0 .0000000000 + 0 0 1 .0000000000 + 0 1 0 .0000000000 + + + 1 0 0 .0000000000 + -1 -1 -1 .5000000000 + 0 0 1 .0000000000 + + + 0 1 0 .0000000000 + -1 -1 -1 .5000000000 + 0 0 1 .0000000000 + + + 0 -1 0 .0000000000 + 0 0 -1 .0000000000 + 1 1 1 .5000000000 + + + -1 0 0 .0000000000 + 0 0 -1 .0000000000 + 1 1 1 .5000000000 + + + -1 -1 -1 .5000000000 + 1 0 0 .0000000000 + 0 0 1 .0000000000 + + + -1 -1 -1 .5000000000 + 0 1 0 .0000000000 + 0 0 1 .0000000000 + + + 0 0 -1 .0000000000 + 0 -1 0 .0000000000 + 1 1 1 .5000000000 + + + 0 0 -1 .0000000000 + -1 0 0 .0000000000 + 1 1 1 .5000000000 + + + + + .000000000000000 5.167355297900000 5.167355297900000 + 5.167355297900000 .000000000000000 5.167355297900000 + 5.167355297900000 5.167355297900000 .000000000000000 + + + + + + + + + + + + + + + 1.000/8.000 1.000/8.000 1.000/8.000 + -1.000/8.000 -1.000/8.000 -1.000/8.000 + + + + + + + + + + + + + + + + + + + + + + + + + 0.450000 0.450000 0.450000 + 0.350000 0.450000 0.450000 + 0.250000 0.450000 0.450000 + 0.150000 0.450000 0.450000 + 0.050000 0.450000 0.450000 + 0.050000 0.500000 0.500000 + 0.150000 0.550000 0.550000 + 0.250000 0.550000 0.550000 + 0.350000 0.550000 0.550000 + 0.450000 0.450000 0.550000 + 0.350000 0.350000 0.450000 + 0.250000 0.350000 0.450000 + 0.150000 0.350000 0.450000 + 0.100000 0.400000 0.450000 + 0.100000 0.450000 0.500000 + 0.150000 0.500000 0.600000 + 0.250000 0.550000 0.650000 + 0.350000 0.450000 0.650000 + 0.350000 0.450000 0.550000 + 0.250000 0.250000 0.450000 + 0.200000 0.300000 0.450000 + 0.200000 0.400000 0.450000 + 0.200000 0.450000 0.500000 + 0.200000 0.450000 0.600000 + 0.250000 0.500000 0.700000 + 0.250000 0.450000 0.650000 + 0.250000 0.450000 0.550000 + 0.300000 0.300000 0.450000 + 0.300000 0.400000 0.450000 + 0.300000 0.450000 0.500000 + 0.300000 0.450000 0.600000 + 0.300000 0.450000 0.700000 + 0.200000 0.500000 0.650000 + 0.150000 0.450000 0.550000 + 0.400000 0.400000 0.450000 + 0.400000 0.450000 0.500000 + 0.400000 0.450000 0.600000 + 0.300000 0.550000 0.600000 + 0.200000 0.550000 0.600000 + 0.100000 0.500000 0.550000 + 0.450000 0.500000 0.500000 + 0.400000 0.500000 0.550000 + 0.300000 0.500000 0.550000 + 0.200000 0.500000 0.550000 + 0.400000 0.400000 0.550000 + 0.300000 0.400000 0.550000 + 0.200000 0.400000 0.550000 + 0.300000 0.300000 0.550000 + 0.250000 0.350000 0.550000 + 0.350000 0.350000 0.550000 + 0.350000 0.350000 0.350000 + 0.250000 0.350000 0.350000 + 0.150000 0.350000 0.350000 + 0.050000 0.350000 0.350000 + 0.050000 0.400000 0.400000 + 0.150000 0.500000 0.500000 + 0.250000 0.600000 0.600000 + 0.350000 0.350000 0.650000 + 0.250000 0.250000 0.350000 + 0.150000 0.250000 0.350000 + 0.100000 0.300000 0.350000 + 0.100000 0.350000 0.400000 + 0.150000 0.400000 0.500000 + 0.250000 0.500000 0.600000 + 0.300000 0.400000 0.650000 + 0.200000 0.200000 0.350000 + 0.200000 0.300000 0.350000 + 0.200000 0.350000 0.400000 + 0.200000 0.350000 0.500000 + 0.250000 0.400000 0.600000 + 0.300000 0.500000 0.650000 + 0.300000 0.300000 0.350000 + 0.300000 0.350000 0.400000 + 0.300000 0.350000 0.500000 + 0.300000 0.350000 0.600000 + 0.350000 0.400000 0.700000 + 0.350000 0.400000 0.400000 + 0.350000 0.400000 0.500000 + 0.350000 0.400000 0.600000 + 0.350000 0.500000 0.500000 + 0.350000 0.500000 0.600000 + 0.400000 0.400000 0.650000 + 0.250000 0.250000 0.250000 + 0.150000 0.250000 0.250000 + 0.050000 0.250000 0.250000 + 0.050000 0.300000 0.300000 + 0.150000 0.400000 0.400000 + 0.250000 0.500000 0.500000 + 0.150000 0.150000 0.250000 + 0.100000 0.200000 0.250000 + 0.100000 0.250000 0.300000 + 0.150000 0.300000 0.400000 + 0.250000 0.400000 0.500000 + 0.200000 0.200000 0.250000 + 0.200000 0.250000 0.300000 + 0.200000 0.250000 0.400000 + 0.250000 0.300000 0.500000 + 0.250000 0.300000 0.300000 + 0.250000 0.300000 0.400000 + 0.250000 0.400000 0.400000 + 0.150000 0.150000 0.150000 + 0.050000 0.150000 0.150000 + 0.050000 0.200000 0.200000 + 0.150000 0.300000 0.300000 + 0.100000 0.100000 0.150000 + 0.100000 0.150000 0.200000 + 0.150000 0.200000 0.300000 + 0.150000 0.200000 0.200000 + 0.050000 0.050000 0.050000 + 0.050000 0.100000 0.100000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-15e765f12fcdbe12c715120ecf8625ad/shell.out b/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-15e765f12fcdbe12c715120ecf8625ad/shell.out new file mode 100644 index 000000000..ac895e205 --- /dev/null +++ b/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-15e765f12fcdbe12c715120ecf8625ad/shell.out @@ -0,0 +1,53 @@ + Welcome to FLEUR (www.flapw.de) + MaX-Release 4.0 (www.max-centre.eu) + stars are always ordered + -------------------------------------------------------- + Number of OMP-threads: 6 + -------------------------------------------------------- + Iteration: 1 Distance: 7.93834702980350 + Test for time of next iteration: + Time provided (min): 5 + Time used (min): 1 + Time per iter (min): 1 + Iteration: 2 Distance: 7.49881525953732 + Test for time of next iteration: + Time provided (min): 5 + Time used (min): 1 + Time per iter (min): 1 + Iteration: 3 Distance: 0.874439927483807 + Test for time of next iteration: + Time provided (min): 5 + Time used (min): 1 + Time per iter (min): 1 + Iteration: 4 Distance: 0.433043002932697 + Test for time of next iteration: + Time provided (min): 5 + Time used (min): 1 + Time per iter (min): 1 + Iteration: 5 Distance: 0.203162273592517 + Test for time of next iteration: + Time provided (min): 5 + Time used (min): 1 + Time per iter (min): 1 + Iteration: 6 Distance: 1.600068898721554E-002 + Test for time of next iteration: + Time provided (min): 5 + Time used (min): 1 + Time per iter (min): 1 + Iteration: 7 Distance: 1.199325117485824E-002 + Test for time of next iteration: + Time provided (min): 5 + Time used (min): 1 + Time per iter (min): 1 + Iteration: 8 Distance: 1.268576740314318E-003 + Test for time of next iteration: + Time provided (min): 5 + Time used (min): 1 + Time per iter (min): 1 + Iteration: 9 Distance: 3.554115091753358E-004 + Test for time of next iteration: + Time provided (min): 5 + Time used (min): 1 + Time per iter (min): 1 + Iteration: 10 Distance: 1.552064895169906E-004 + Usage data send using curl: usage.json diff --git a/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-58394cd5422cd3fc7a6d802d966c2848/JUDFT_WARN_ONLY b/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-58394cd5422cd3fc7a6d802d966c2848/JUDFT_WARN_ONLY new file mode 100644 index 000000000..65c71eb10 --- /dev/null +++ b/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-58394cd5422cd3fc7a6d802d966c2848/JUDFT_WARN_ONLY @@ -0,0 +1 @@ +/n diff --git a/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-58394cd5422cd3fc7a6d802d966c2848/_aiidasubmit.sh b/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-58394cd5422cd3fc7a6d802d966c2848/_aiidasubmit.sh new file mode 100644 index 000000000..ada17d838 --- /dev/null +++ b/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-58394cd5422cd3fc7a6d802d966c2848/_aiidasubmit.sh @@ -0,0 +1,8 @@ +#!/bin/bash +exec > _scheduler-stdout.txt +exec 2> _scheduler-stderr.txt +env --ignore-environment \ + + + +'/Users/broeder/codes/aiida/fleur/max_r4/serial/fleur' '-minimalOutput' '-wtime' '5.0' > 'shell.out' 2> 'out.error' diff --git a/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-58394cd5422cd3fc7a6d802d966c2848/_scheduler-stderr.txt b/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-58394cd5422cd3fc7a6d802d966c2848/_scheduler-stderr.txt new file mode 100644 index 000000000..e69de29bb diff --git a/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-58394cd5422cd3fc7a6d802d966c2848/_scheduler-stdout.txt b/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-58394cd5422cd3fc7a6d802d966c2848/_scheduler-stdout.txt new file mode 100644 index 000000000..e69de29bb diff --git a/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-58394cd5422cd3fc7a6d802d966c2848/cdn1 b/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-58394cd5422cd3fc7a6d802d966c2848/cdn1 new file mode 100644 index 000000000..3b36b89a6 Binary files /dev/null and b/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-58394cd5422cd3fc7a6d802d966c2848/cdn1 differ diff --git a/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-58394cd5422cd3fc7a6d802d966c2848/inp.xml b/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-58394cd5422cd3fc7a6d802d966c2848/inp.xml new file mode 100644 index 000000000..f381d4a4e --- /dev/null +++ b/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-58394cd5422cd3fc7a6d802d966c2848/inp.xml @@ -0,0 +1,419 @@ + + + A Fleur input generator calculation with aiida + + + + + + + + + + .0000000000 .0000000000 .0000000000 + + + + + + + 0.450000 0.450000 0.450000 + 0.350000 0.450000 0.450000 + 0.250000 0.450000 0.450000 + 0.150000 0.450000 0.450000 + 0.050000 0.450000 0.450000 + 0.050000 0.500000 0.500000 + 0.150000 0.550000 0.550000 + 0.250000 0.550000 0.550000 + 0.350000 0.550000 0.550000 + 0.450000 0.450000 0.550000 + 0.350000 0.350000 0.450000 + 0.250000 0.350000 0.450000 + 0.150000 0.350000 0.450000 + 0.100000 0.400000 0.450000 + 0.100000 0.450000 0.500000 + 0.150000 0.500000 0.600000 + 0.250000 0.550000 0.650000 + 0.350000 0.450000 0.650000 + 0.350000 0.450000 0.550000 + 0.250000 0.250000 0.450000 + 0.200000 0.300000 0.450000 + 0.200000 0.400000 0.450000 + 0.200000 0.450000 0.500000 + 0.200000 0.450000 0.600000 + 0.250000 0.500000 0.700000 + 0.250000 0.450000 0.650000 + 0.250000 0.450000 0.550000 + 0.300000 0.300000 0.450000 + 0.300000 0.400000 0.450000 + 0.300000 0.450000 0.500000 + 0.300000 0.450000 0.600000 + 0.300000 0.450000 0.700000 + 0.200000 0.500000 0.650000 + 0.150000 0.450000 0.550000 + 0.400000 0.400000 0.450000 + 0.400000 0.450000 0.500000 + 0.400000 0.450000 0.600000 + 0.300000 0.550000 0.600000 + 0.200000 0.550000 0.600000 + 0.100000 0.500000 0.550000 + 0.450000 0.500000 0.500000 + 0.400000 0.500000 0.550000 + 0.300000 0.500000 0.550000 + 0.200000 0.500000 0.550000 + 0.400000 0.400000 0.550000 + 0.300000 0.400000 0.550000 + 0.200000 0.400000 0.550000 + 0.300000 0.300000 0.550000 + 0.250000 0.350000 0.550000 + 0.350000 0.350000 0.550000 + 0.350000 0.350000 0.350000 + 0.250000 0.350000 0.350000 + 0.150000 0.350000 0.350000 + 0.050000 0.350000 0.350000 + 0.050000 0.400000 0.400000 + 0.150000 0.500000 0.500000 + 0.250000 0.600000 0.600000 + 0.350000 0.350000 0.650000 + 0.250000 0.250000 0.350000 + 0.150000 0.250000 0.350000 + 0.100000 0.300000 0.350000 + 0.100000 0.350000 0.400000 + 0.150000 0.400000 0.500000 + 0.250000 0.500000 0.600000 + 0.300000 0.400000 0.650000 + 0.200000 0.200000 0.350000 + 0.200000 0.300000 0.350000 + 0.200000 0.350000 0.400000 + 0.200000 0.350000 0.500000 + 0.250000 0.400000 0.600000 + 0.300000 0.500000 0.650000 + 0.300000 0.300000 0.350000 + 0.300000 0.350000 0.400000 + 0.300000 0.350000 0.500000 + 0.300000 0.350000 0.600000 + 0.350000 0.400000 0.700000 + 0.350000 0.400000 0.400000 + 0.350000 0.400000 0.500000 + 0.350000 0.400000 0.600000 + 0.350000 0.500000 0.500000 + 0.350000 0.500000 0.600000 + 0.400000 0.400000 0.650000 + 0.250000 0.250000 0.250000 + 0.150000 0.250000 0.250000 + 0.050000 0.250000 0.250000 + 0.050000 0.300000 0.300000 + 0.150000 0.400000 0.400000 + 0.250000 0.500000 0.500000 + 0.150000 0.150000 0.250000 + 0.100000 0.200000 0.250000 + 0.100000 0.250000 0.300000 + 0.150000 0.300000 0.400000 + 0.250000 0.400000 0.500000 + 0.200000 0.200000 0.250000 + 0.200000 0.250000 0.300000 + 0.200000 0.250000 0.400000 + 0.250000 0.300000 0.500000 + 0.250000 0.300000 0.300000 + 0.250000 0.300000 0.400000 + 0.250000 0.400000 0.400000 + 0.150000 0.150000 0.150000 + 0.050000 0.150000 0.150000 + 0.050000 0.200000 0.200000 + 0.150000 0.300000 0.300000 + 0.100000 0.100000 0.150000 + 0.100000 0.150000 0.200000 + 0.150000 0.200000 0.300000 + 0.150000 0.200000 0.200000 + 0.050000 0.050000 0.050000 + 0.050000 0.100000 0.100000 + + + + + + + + + + + 1 0 0 .0000000000 + 0 1 0 .0000000000 + 0 0 1 .0000000000 + + + 0 1 0 .0000000000 + 1 0 0 .0000000000 + 0 0 1 .0000000000 + + + -1 0 0 .0000000000 + 0 -1 0 .0000000000 + 1 1 1 .5000000000 + + + 0 -1 0 .0000000000 + -1 0 0 .0000000000 + 1 1 1 .5000000000 + + + 0 1 0 .0000000000 + 1 0 0 .0000000000 + -1 -1 -1 .5000000000 + + + 1 0 0 .0000000000 + 0 1 0 .0000000000 + -1 -1 -1 .5000000000 + + + -1 0 0 .0000000000 + 0 -1 0 .0000000000 + 0 0 -1 .0000000000 + + + 0 -1 0 .0000000000 + -1 0 0 .0000000000 + 0 0 -1 .0000000000 + + + 0 0 1 .0000000000 + 1 0 0 .0000000000 + -1 -1 -1 .5000000000 + + + 0 0 1 .0000000000 + 0 1 0 .0000000000 + -1 -1 -1 .5000000000 + + + 1 1 1 .5000000000 + 0 -1 0 .0000000000 + 0 0 -1 .0000000000 + + + 1 1 1 .5000000000 + -1 0 0 .0000000000 + 0 0 -1 .0000000000 + + + -1 0 0 .0000000000 + 1 1 1 .5000000000 + 0 0 -1 .0000000000 + + + 1 0 0 .0000000000 + 0 0 1 .0000000000 + -1 -1 -1 .5000000000 + + + 0 1 0 .0000000000 + 0 0 1 .0000000000 + -1 -1 -1 .5000000000 + + + 0 -1 0 .0000000000 + 1 1 1 .5000000000 + 0 0 -1 .0000000000 + + + -1 0 0 .0000000000 + 0 0 -1 .0000000000 + 0 -1 0 .0000000000 + + + 0 1 0 .0000000000 + -1 -1 -1 .5000000000 + 1 0 0 .0000000000 + + + 0 -1 0 .0000000000 + 0 0 -1 .0000000000 + -1 0 0 .0000000000 + + + 1 0 0 .0000000000 + -1 -1 -1 .5000000000 + 0 1 0 .0000000000 + + + 1 1 1 .5000000000 + 0 0 -1 .0000000000 + 0 -1 0 .0000000000 + + + 0 0 1 .0000000000 + -1 -1 -1 .5000000000 + 1 0 0 .0000000000 + + + 1 1 1 .5000000000 + 0 0 -1 .0000000000 + -1 0 0 .0000000000 + + + 0 0 1 .0000000000 + -1 -1 -1 .5000000000 + 0 1 0 .0000000000 + + + 0 0 -1 .0000000000 + -1 0 0 .0000000000 + 0 -1 0 .0000000000 + + + 0 0 -1 .0000000000 + 0 -1 0 .0000000000 + -1 0 0 .0000000000 + + + -1 -1 -1 .5000000000 + 0 1 0 .0000000000 + 1 0 0 .0000000000 + + + -1 -1 -1 .5000000000 + 1 0 0 .0000000000 + 0 1 0 .0000000000 + + + 0 0 1 .0000000000 + 0 1 0 .0000000000 + 1 0 0 .0000000000 + + + 1 1 1 .5000000000 + -1 0 0 .0000000000 + 0 -1 0 .0000000000 + + + 1 1 1 .5000000000 + 0 -1 0 .0000000000 + -1 0 0 .0000000000 + + + 0 0 1 .0000000000 + 1 0 0 .0000000000 + 0 1 0 .0000000000 + + + 0 0 -1 .0000000000 + 1 1 1 .5000000000 + -1 0 0 .0000000000 + + + 0 0 -1 .0000000000 + 1 1 1 .5000000000 + 0 -1 0 .0000000000 + + + -1 -1 -1 .5000000000 + 0 0 1 .0000000000 + 1 0 0 .0000000000 + + + -1 -1 -1 .5000000000 + 0 0 1 .0000000000 + 0 1 0 .0000000000 + + + -1 0 0 .0000000000 + 1 1 1 .5000000000 + 0 -1 0 .0000000000 + + + 0 1 0 .0000000000 + 0 0 1 .0000000000 + 1 0 0 .0000000000 + + + 0 -1 0 .0000000000 + 1 1 1 .5000000000 + -1 0 0 .0000000000 + + + 1 0 0 .0000000000 + 0 0 1 .0000000000 + 0 1 0 .0000000000 + + + 1 0 0 .0000000000 + -1 -1 -1 .5000000000 + 0 0 1 .0000000000 + + + 0 1 0 .0000000000 + -1 -1 -1 .5000000000 + 0 0 1 .0000000000 + + + 0 -1 0 .0000000000 + 0 0 -1 .0000000000 + 1 1 1 .5000000000 + + + -1 0 0 .0000000000 + 0 0 -1 .0000000000 + 1 1 1 .5000000000 + + + -1 -1 -1 .5000000000 + 1 0 0 .0000000000 + 0 0 1 .0000000000 + + + -1 -1 -1 .5000000000 + 0 1 0 .0000000000 + 0 0 1 .0000000000 + + + 0 0 -1 .0000000000 + 0 -1 0 .0000000000 + 1 1 1 .5000000000 + + + 0 0 -1 .0000000000 + -1 0 0 .0000000000 + 1 1 1 .5000000000 + + + + + .000000000000000 5.167355297900000 5.167355297900000 + 5.167355297900000 .000000000000000 5.167355297900000 + 5.167355297900000 5.167355297900000 .000000000000000 + + + + + + + + + + + + + + + 1.000/8.000 1.000/8.000 1.000/8.000 + -1.000/8.000 -1.000/8.000 -1.000/8.000 + + + + + + + + + + + + + + + + + + + diff --git a/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-58394cd5422cd3fc7a6d802d966c2848/juDFT_times.json b/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-58394cd5422cd3fc7a6d802d966c2848/juDFT_times.json new file mode 100644 index 000000000..00d8d9893 --- /dev/null +++ b/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-58394cd5422cd3fc7a6d802d966c2848/juDFT_times.json @@ -0,0 +1,420 @@ +{ + "timername" : "Total Run", + "totaltime" : 1.00000, + "subtimers": [ + { + "timername" : "Initialization", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1, + "subtimers": [ + { + "timername" : "r_inpXML", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1 + }, + { + "timername" : "postprocessInput", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1, + "subtimers": [ + { + "timername" : "strgn", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1, + "subtimers": [ + { + "timername" : "writeStars", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1 + } + ] + }, + { + "timername" : "stepf", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1 + } + ] + } + ] + }, + { + "timername" : "Qfix", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1, + "subtimers": [ + { + "timername" : "cdntot", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1, + "subtimers": [ + { + "timername" : "MT", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1 + } + ] + } + ] + }, + { + "timername" : "Open file/memory for IO of eig", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1 + }, + { + "timername" : "Iteration", + "totaltime" : 1.00000, + "mintime" : 1.00000, + "maxtime" : 1.00000, + "ncalls" : 1, + "subtimers": [ + { + "timername" : "generation of potential", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1, + "subtimers": [ + { + "timername" : "psqpw", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1 + }, + { + "timername" : "interstitial", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1 + }, + { + "timername" : "MT-spheres", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1 + }, + { + "timername" : "den-pot integrals", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1 + }, + { + "timername" : "Vxc in interstitial", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1 + }, + { + "timername" : "Vxc in MT", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1 + } + ] + }, + { + "timername" : "gen. of hamil. and diag. (tota", + "totaltime" : 1.00000, + "mintime" : 1.00000, + "maxtime" : 1.00000, + "ncalls" : 1, + "subtimers": [ + { + "timername" : "eigen", + "totaltime" : 1.00000, + "mintime" : 1.00000, + "maxtime" : 1.00000, + "ncalls" : 1, + "subtimers": [ + { + "timername" : "Updating energy parameters", + "totaltime" : 1.00000, + "mintime" : 1.00000, + "maxtime" : 1.00000, + "ncalls" : 1 + }, + { + "timername" : "tlmplm", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1 + }, + { + "timername" : "Setup of H&S matrices", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 110, + "subtimers": [ + { + "timername" : "Interstitial part", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 110 + }, + { + "timername" : "MT part", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 110, + "subtimers": [ + { + "timername" : "fjgj coefficients", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 110 + }, + { + "timername" : "spherical setup", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 110 + }, + { + "timername" : "non-spherical setup", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 110 + }, + { + "timername" : "LO setup", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 110 + } + ] + }, + { + "timername" : "Matrix redistribution", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 110 + } + ] + }, + { + "timername" : "Diagonalization", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 110 + }, + { + "timername" : "EV output", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 110, + "subtimers": [ + { + "timername" : "IO (write)", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 110 + } + ] + } + ] + } + ] + }, + { + "timername" : "determination of fermi energy", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1, + "subtimers": [ + { + "timername" : "IO (read)", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 110 + }, + { + "timername" : "IO (write)", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 110 + } + ] + }, + { + "timername" : "generation of new charge densi", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1, + "subtimers": [ + { + "timername" : "cdnval", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1, + "subtimers": [ + { + "timername" : "IO (read)", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 110 + }, + { + "timername" : "pwden", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 110 + }, + { + "timername" : "abcof", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 110 + }, + { + "timername" : "cdnval: rhomt", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 110 + }, + { + "timername" : "cdnval: rhonmt", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 110 + }, + { + "timername" : "cdnval: rho(n)mtlo", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 110 + }, + { + "timername" : "cdnmt", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1 + } + ] + }, + { + "timername" : "cdntot", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 2, + "subtimers": [ + { + "timername" : "MT", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 2 + } + ] + }, + { + "timername" : "cdngen: cdncore", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1, + "subtimers": [ + { + "timername" : "qpw_to_nmt", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1 + } + ] + } + ] + }, + { + "timername" : "determination of total energy", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1 + }, + { + "timername" : "Charge Density Mixing", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1, + "subtimers": [ + { + "timername" : "Reading of distances", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1 + }, + { + "timername" : "Mixing", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1 + }, + { + "timername" : "Postprocessing", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1 + } + ] + } + ] + } + ] +} diff --git a/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-58394cd5422cd3fc7a6d802d966c2848/mixing_history b/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-58394cd5422cd3fc7a6d802d966c2848/mixing_history new file mode 100644 index 000000000..5b854e0b2 Binary files /dev/null and b/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-58394cd5422cd3fc7a6d802d966c2848/mixing_history differ diff --git a/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-58394cd5422cd3fc7a6d802d966c2848/out.error b/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-58394cd5422cd3fc7a6d802d966c2848/out.error new file mode 100644 index 000000000..e7a718fac --- /dev/null +++ b/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-58394cd5422cd3fc7a6d802d966c2848/out.error @@ -0,0 +1,12 @@ +I/O warning : failed to load external entity "relax.xml" + + ***************************************** + Run finished successfully + Stop message: + all done + ***************************************** +Rank:0 used 0.672GB/ 704468 kB + % Total % Received % Xferd Average Speed Time Time Time Current + Dload Upload Total Spent Left Speed + 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 781 100 40 100 741 211 3915 --:--:-- --:--:-- --:--:-- 3900 +OK diff --git a/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-58394cd5422cd3fc7a6d802d966c2848/out.xml b/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-58394cd5422cd3fc7a6d802d966c2848/out.xml new file mode 100644 index 000000000..14c6141c7 --- /dev/null +++ b/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-58394cd5422cd3fc7a6d802d966c2848/out.xml @@ -0,0 +1,603 @@ + + + + + + GEN + + + + + + + + + + A Fleur input generator calculation with aiida + + + + + + + + + + .0000000000 .0000000000 .0000000000 + + + + + + + 0.450000 0.450000 0.450000 + 0.350000 0.450000 0.450000 + 0.250000 0.450000 0.450000 + 0.150000 0.450000 0.450000 + 0.050000 0.450000 0.450000 + 0.050000 0.500000 0.500000 + 0.150000 0.550000 0.550000 + 0.250000 0.550000 0.550000 + 0.350000 0.550000 0.550000 + 0.450000 0.450000 0.550000 + 0.350000 0.350000 0.450000 + 0.250000 0.350000 0.450000 + 0.150000 0.350000 0.450000 + 0.100000 0.400000 0.450000 + 0.100000 0.450000 0.500000 + 0.150000 0.500000 0.600000 + 0.250000 0.550000 0.650000 + 0.350000 0.450000 0.650000 + 0.350000 0.450000 0.550000 + 0.250000 0.250000 0.450000 + 0.200000 0.300000 0.450000 + 0.200000 0.400000 0.450000 + 0.200000 0.450000 0.500000 + 0.200000 0.450000 0.600000 + 0.250000 0.500000 0.700000 + 0.250000 0.450000 0.650000 + 0.250000 0.450000 0.550000 + 0.300000 0.300000 0.450000 + 0.300000 0.400000 0.450000 + 0.300000 0.450000 0.500000 + 0.300000 0.450000 0.600000 + 0.300000 0.450000 0.700000 + 0.200000 0.500000 0.650000 + 0.150000 0.450000 0.550000 + 0.400000 0.400000 0.450000 + 0.400000 0.450000 0.500000 + 0.400000 0.450000 0.600000 + 0.300000 0.550000 0.600000 + 0.200000 0.550000 0.600000 + 0.100000 0.500000 0.550000 + 0.450000 0.500000 0.500000 + 0.400000 0.500000 0.550000 + 0.300000 0.500000 0.550000 + 0.200000 0.500000 0.550000 + 0.400000 0.400000 0.550000 + 0.300000 0.400000 0.550000 + 0.200000 0.400000 0.550000 + 0.300000 0.300000 0.550000 + 0.250000 0.350000 0.550000 + 0.350000 0.350000 0.550000 + 0.350000 0.350000 0.350000 + 0.250000 0.350000 0.350000 + 0.150000 0.350000 0.350000 + 0.050000 0.350000 0.350000 + 0.050000 0.400000 0.400000 + 0.150000 0.500000 0.500000 + 0.250000 0.600000 0.600000 + 0.350000 0.350000 0.650000 + 0.250000 0.250000 0.350000 + 0.150000 0.250000 0.350000 + 0.100000 0.300000 0.350000 + 0.100000 0.350000 0.400000 + 0.150000 0.400000 0.500000 + 0.250000 0.500000 0.600000 + 0.300000 0.400000 0.650000 + 0.200000 0.200000 0.350000 + 0.200000 0.300000 0.350000 + 0.200000 0.350000 0.400000 + 0.200000 0.350000 0.500000 + 0.250000 0.400000 0.600000 + 0.300000 0.500000 0.650000 + 0.300000 0.300000 0.350000 + 0.300000 0.350000 0.400000 + 0.300000 0.350000 0.500000 + 0.300000 0.350000 0.600000 + 0.350000 0.400000 0.700000 + 0.350000 0.400000 0.400000 + 0.350000 0.400000 0.500000 + 0.350000 0.400000 0.600000 + 0.350000 0.500000 0.500000 + 0.350000 0.500000 0.600000 + 0.400000 0.400000 0.650000 + 0.250000 0.250000 0.250000 + 0.150000 0.250000 0.250000 + 0.050000 0.250000 0.250000 + 0.050000 0.300000 0.300000 + 0.150000 0.400000 0.400000 + 0.250000 0.500000 0.500000 + 0.150000 0.150000 0.250000 + 0.100000 0.200000 0.250000 + 0.100000 0.250000 0.300000 + 0.150000 0.300000 0.400000 + 0.250000 0.400000 0.500000 + 0.200000 0.200000 0.250000 + 0.200000 0.250000 0.300000 + 0.200000 0.250000 0.400000 + 0.250000 0.300000 0.500000 + 0.250000 0.300000 0.300000 + 0.250000 0.300000 0.400000 + 0.250000 0.400000 0.400000 + 0.150000 0.150000 0.150000 + 0.050000 0.150000 0.150000 + 0.050000 0.200000 0.200000 + 0.150000 0.300000 0.300000 + 0.100000 0.100000 0.150000 + 0.100000 0.150000 0.200000 + 0.150000 0.200000 0.300000 + 0.150000 0.200000 0.200000 + 0.050000 0.050000 0.050000 + 0.050000 0.100000 0.100000 + + + + + + + + 1 0 0 .0000000000 + 0 1 0 .0000000000 + 0 0 1 .0000000000 + + + 0 1 0 .0000000000 + 1 0 0 .0000000000 + 0 0 1 .0000000000 + + + -1 0 0 .0000000000 + 0 -1 0 .0000000000 + 1 1 1 .5000000000 + + + 0 -1 0 .0000000000 + -1 0 0 .0000000000 + 1 1 1 .5000000000 + + + 0 1 0 .0000000000 + 1 0 0 .0000000000 + -1 -1 -1 .5000000000 + + + 1 0 0 .0000000000 + 0 1 0 .0000000000 + -1 -1 -1 .5000000000 + + + -1 0 0 .0000000000 + 0 -1 0 .0000000000 + 0 0 -1 .0000000000 + + + 0 -1 0 .0000000000 + -1 0 0 .0000000000 + 0 0 -1 .0000000000 + + + 0 0 1 .0000000000 + 1 0 0 .0000000000 + -1 -1 -1 .5000000000 + + + 0 0 1 .0000000000 + 0 1 0 .0000000000 + -1 -1 -1 .5000000000 + + + 1 1 1 .5000000000 + 0 -1 0 .0000000000 + 0 0 -1 .0000000000 + + + 1 1 1 .5000000000 + -1 0 0 .0000000000 + 0 0 -1 .0000000000 + + + -1 0 0 .0000000000 + 1 1 1 .5000000000 + 0 0 -1 .0000000000 + + + 1 0 0 .0000000000 + 0 0 1 .0000000000 + -1 -1 -1 .5000000000 + + + 0 1 0 .0000000000 + 0 0 1 .0000000000 + -1 -1 -1 .5000000000 + + + 0 -1 0 .0000000000 + 1 1 1 .5000000000 + 0 0 -1 .0000000000 + + + -1 0 0 .0000000000 + 0 0 -1 .0000000000 + 0 -1 0 .0000000000 + + + 0 1 0 .0000000000 + -1 -1 -1 .5000000000 + 1 0 0 .0000000000 + + + 0 -1 0 .0000000000 + 0 0 -1 .0000000000 + -1 0 0 .0000000000 + + + 1 0 0 .0000000000 + -1 -1 -1 .5000000000 + 0 1 0 .0000000000 + + + 1 1 1 .5000000000 + 0 0 -1 .0000000000 + 0 -1 0 .0000000000 + + + 0 0 1 .0000000000 + -1 -1 -1 .5000000000 + 1 0 0 .0000000000 + + + 1 1 1 .5000000000 + 0 0 -1 .0000000000 + -1 0 0 .0000000000 + + + 0 0 1 .0000000000 + -1 -1 -1 .5000000000 + 0 1 0 .0000000000 + + + 0 0 -1 .0000000000 + -1 0 0 .0000000000 + 0 -1 0 .0000000000 + + + 0 0 -1 .0000000000 + 0 -1 0 .0000000000 + -1 0 0 .0000000000 + + + -1 -1 -1 .5000000000 + 0 1 0 .0000000000 + 1 0 0 .0000000000 + + + -1 -1 -1 .5000000000 + 1 0 0 .0000000000 + 0 1 0 .0000000000 + + + 0 0 1 .0000000000 + 0 1 0 .0000000000 + 1 0 0 .0000000000 + + + 1 1 1 .5000000000 + -1 0 0 .0000000000 + 0 -1 0 .0000000000 + + + 1 1 1 .5000000000 + 0 -1 0 .0000000000 + -1 0 0 .0000000000 + + + 0 0 1 .0000000000 + 1 0 0 .0000000000 + 0 1 0 .0000000000 + + + 0 0 -1 .0000000000 + 1 1 1 .5000000000 + -1 0 0 .0000000000 + + + 0 0 -1 .0000000000 + 1 1 1 .5000000000 + 0 -1 0 .0000000000 + + + -1 -1 -1 .5000000000 + 0 0 1 .0000000000 + 1 0 0 .0000000000 + + + -1 -1 -1 .5000000000 + 0 0 1 .0000000000 + 0 1 0 .0000000000 + + + -1 0 0 .0000000000 + 1 1 1 .5000000000 + 0 -1 0 .0000000000 + + + 0 1 0 .0000000000 + 0 0 1 .0000000000 + 1 0 0 .0000000000 + + + 0 -1 0 .0000000000 + 1 1 1 .5000000000 + -1 0 0 .0000000000 + + + 1 0 0 .0000000000 + 0 0 1 .0000000000 + 0 1 0 .0000000000 + + + 1 0 0 .0000000000 + -1 -1 -1 .5000000000 + 0 0 1 .0000000000 + + + 0 1 0 .0000000000 + -1 -1 -1 .5000000000 + 0 0 1 .0000000000 + + + 0 -1 0 .0000000000 + 0 0 -1 .0000000000 + 1 1 1 .5000000000 + + + -1 0 0 .0000000000 + 0 0 -1 .0000000000 + 1 1 1 .5000000000 + + + -1 -1 -1 .5000000000 + 1 0 0 .0000000000 + 0 0 1 .0000000000 + + + -1 -1 -1 .5000000000 + 0 1 0 .0000000000 + 0 0 1 .0000000000 + + + 0 0 -1 .0000000000 + 0 -1 0 .0000000000 + 1 1 1 .5000000000 + + + 0 0 -1 .0000000000 + -1 0 0 .0000000000 + 1 1 1 .5000000000 + + + + + .000000000000000 5.167355297900000 5.167355297900000 + 5.167355297900000 .000000000000000 5.167355297900000 + 5.167355297900000 5.167355297900000 .000000000000000 + + + + + + + + + + + + + + + 1.000/8.000 1.000/8.000 1.000/8.000 + -1.000/8.000 -1.000/8.000 -1.000/8.000 + + + + + + + + + + + + + + + + + + + + + + + + + 0.450000 0.450000 0.450000 + 0.350000 0.450000 0.450000 + 0.250000 0.450000 0.450000 + 0.150000 0.450000 0.450000 + 0.050000 0.450000 0.450000 + 0.050000 0.500000 0.500000 + 0.150000 0.550000 0.550000 + 0.250000 0.550000 0.550000 + 0.350000 0.550000 0.550000 + 0.450000 0.450000 0.550000 + 0.350000 0.350000 0.450000 + 0.250000 0.350000 0.450000 + 0.150000 0.350000 0.450000 + 0.100000 0.400000 0.450000 + 0.100000 0.450000 0.500000 + 0.150000 0.500000 0.600000 + 0.250000 0.550000 0.650000 + 0.350000 0.450000 0.650000 + 0.350000 0.450000 0.550000 + 0.250000 0.250000 0.450000 + 0.200000 0.300000 0.450000 + 0.200000 0.400000 0.450000 + 0.200000 0.450000 0.500000 + 0.200000 0.450000 0.600000 + 0.250000 0.500000 0.700000 + 0.250000 0.450000 0.650000 + 0.250000 0.450000 0.550000 + 0.300000 0.300000 0.450000 + 0.300000 0.400000 0.450000 + 0.300000 0.450000 0.500000 + 0.300000 0.450000 0.600000 + 0.300000 0.450000 0.700000 + 0.200000 0.500000 0.650000 + 0.150000 0.450000 0.550000 + 0.400000 0.400000 0.450000 + 0.400000 0.450000 0.500000 + 0.400000 0.450000 0.600000 + 0.300000 0.550000 0.600000 + 0.200000 0.550000 0.600000 + 0.100000 0.500000 0.550000 + 0.450000 0.500000 0.500000 + 0.400000 0.500000 0.550000 + 0.300000 0.500000 0.550000 + 0.200000 0.500000 0.550000 + 0.400000 0.400000 0.550000 + 0.300000 0.400000 0.550000 + 0.200000 0.400000 0.550000 + 0.300000 0.300000 0.550000 + 0.250000 0.350000 0.550000 + 0.350000 0.350000 0.550000 + 0.350000 0.350000 0.350000 + 0.250000 0.350000 0.350000 + 0.150000 0.350000 0.350000 + 0.050000 0.350000 0.350000 + 0.050000 0.400000 0.400000 + 0.150000 0.500000 0.500000 + 0.250000 0.600000 0.600000 + 0.350000 0.350000 0.650000 + 0.250000 0.250000 0.350000 + 0.150000 0.250000 0.350000 + 0.100000 0.300000 0.350000 + 0.100000 0.350000 0.400000 + 0.150000 0.400000 0.500000 + 0.250000 0.500000 0.600000 + 0.300000 0.400000 0.650000 + 0.200000 0.200000 0.350000 + 0.200000 0.300000 0.350000 + 0.200000 0.350000 0.400000 + 0.200000 0.350000 0.500000 + 0.250000 0.400000 0.600000 + 0.300000 0.500000 0.650000 + 0.300000 0.300000 0.350000 + 0.300000 0.350000 0.400000 + 0.300000 0.350000 0.500000 + 0.300000 0.350000 0.600000 + 0.350000 0.400000 0.700000 + 0.350000 0.400000 0.400000 + 0.350000 0.400000 0.500000 + 0.350000 0.400000 0.600000 + 0.350000 0.500000 0.500000 + 0.350000 0.500000 0.600000 + 0.400000 0.400000 0.650000 + 0.250000 0.250000 0.250000 + 0.150000 0.250000 0.250000 + 0.050000 0.250000 0.250000 + 0.050000 0.300000 0.300000 + 0.150000 0.400000 0.400000 + 0.250000 0.500000 0.500000 + 0.150000 0.150000 0.250000 + 0.100000 0.200000 0.250000 + 0.100000 0.250000 0.300000 + 0.150000 0.300000 0.400000 + 0.250000 0.400000 0.500000 + 0.200000 0.200000 0.250000 + 0.200000 0.250000 0.300000 + 0.200000 0.250000 0.400000 + 0.250000 0.300000 0.500000 + 0.250000 0.300000 0.300000 + 0.250000 0.300000 0.400000 + 0.250000 0.400000 0.400000 + 0.150000 0.150000 0.150000 + 0.050000 0.150000 0.150000 + 0.050000 0.200000 0.200000 + 0.150000 0.300000 0.300000 + 0.100000 0.100000 0.150000 + 0.100000 0.150000 0.200000 + 0.150000 0.200000 0.300000 + 0.150000 0.200000 0.200000 + 0.050000 0.050000 0.050000 + 0.050000 0.100000 0.100000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-58394cd5422cd3fc7a6d802d966c2848/shell.out b/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-58394cd5422cd3fc7a6d802d966c2848/shell.out new file mode 100644 index 000000000..415ec7f8c --- /dev/null +++ b/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-58394cd5422cd3fc7a6d802d966c2848/shell.out @@ -0,0 +1,8 @@ + Welcome to FLEUR (www.flapw.de) + MaX-Release 4.0 (www.max-centre.eu) + stars are always ordered + -------------------------------------------------------- + Number of OMP-threads: 6 + -------------------------------------------------------- + Iteration: 1 Distance: 6.340901440083457E-006 + Usage data send using curl: usage.json diff --git a/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-975c74ec7de669539066ba4d43b91cc7/JUDFT_WARN_ONLY b/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-975c74ec7de669539066ba4d43b91cc7/JUDFT_WARN_ONLY new file mode 100644 index 000000000..65c71eb10 --- /dev/null +++ b/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-975c74ec7de669539066ba4d43b91cc7/JUDFT_WARN_ONLY @@ -0,0 +1 @@ +/n diff --git a/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-975c74ec7de669539066ba4d43b91cc7/_scheduler-stderr.txt b/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-975c74ec7de669539066ba4d43b91cc7/_scheduler-stderr.txt new file mode 100644 index 000000000..e69de29bb diff --git a/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-975c74ec7de669539066ba4d43b91cc7/_scheduler-stdout.txt b/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-975c74ec7de669539066ba4d43b91cc7/_scheduler-stdout.txt new file mode 100644 index 000000000..e69de29bb diff --git a/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-975c74ec7de669539066ba4d43b91cc7/cdn1 b/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-975c74ec7de669539066ba4d43b91cc7/cdn1 new file mode 100644 index 000000000..31162884d Binary files /dev/null and b/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-975c74ec7de669539066ba4d43b91cc7/cdn1 differ diff --git a/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-975c74ec7de669539066ba4d43b91cc7/inp.xml b/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-975c74ec7de669539066ba4d43b91cc7/inp.xml new file mode 100644 index 000000000..908635f11 --- /dev/null +++ b/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-975c74ec7de669539066ba4d43b91cc7/inp.xml @@ -0,0 +1,369 @@ + + + Si, alpha silicon, bulk, delta project + + + + + + + + + + .0000000000 .0000000000 .0000000000 + + + + + + + 0.437500 0.437500 0.437500 + 0.312500 0.437500 0.437500 + 0.187500 0.437500 0.437500 + 0.062500 0.437500 0.437500 + 0.062500 0.500000 0.500000 + 0.187500 0.562500 0.562500 + 0.312500 0.562500 0.562500 + 0.437500 0.437500 0.562500 + 0.312500 0.312500 0.437500 + 0.187500 0.312500 0.437500 + 0.125000 0.375000 0.437500 + 0.125000 0.437500 0.500000 + 0.187500 0.500000 0.625000 + 0.312500 0.437500 0.687500 + 0.312500 0.437500 0.562500 + 0.250000 0.250000 0.437500 + 0.250000 0.375000 0.437500 + 0.250000 0.437500 0.500000 + 0.250000 0.437500 0.625000 + 0.250000 0.500000 0.687500 + 0.187500 0.437500 0.562500 + 0.375000 0.375000 0.437500 + 0.375000 0.437500 0.500000 + 0.375000 0.437500 0.625000 + 0.250000 0.562500 0.625000 + 0.125000 0.500000 0.562500 + 0.437500 0.500000 0.500000 + 0.375000 0.500000 0.562500 + 0.250000 0.500000 0.562500 + 0.375000 0.375000 0.562500 + 0.250000 0.375000 0.562500 + 0.312500 0.312500 0.562500 + 0.312500 0.312500 0.312500 + 0.187500 0.312500 0.312500 + 0.062500 0.312500 0.312500 + 0.062500 0.375000 0.375000 + 0.187500 0.500000 0.500000 + 0.375000 0.375000 0.687500 + 0.187500 0.187500 0.312500 + 0.125000 0.250000 0.312500 + 0.125000 0.312500 0.375000 + 0.187500 0.375000 0.500000 + 0.312500 0.500000 0.625000 + 0.250000 0.250000 0.312500 + 0.250000 0.312500 0.375000 + 0.250000 0.312500 0.500000 + 0.312500 0.375000 0.625000 + 0.312500 0.375000 0.375000 + 0.312500 0.375000 0.500000 + 0.312500 0.500000 0.500000 + 0.187500 0.187500 0.187500 + 0.062500 0.187500 0.187500 + 0.062500 0.250000 0.250000 + 0.187500 0.375000 0.375000 + 0.125000 0.125000 0.187500 + 0.125000 0.187500 0.250000 + 0.187500 0.250000 0.375000 + 0.187500 0.250000 0.250000 + 0.062500 0.062500 0.062500 + 0.062500 0.125000 0.125000 + + + + + + + + + + + 1 0 0 .0000000000 + 0 1 0 .0000000000 + 0 0 1 .0000000000 + + + 0 1 0 .0000000000 + 1 0 0 .0000000000 + 0 0 1 .0000000000 + + + -1 0 0 .0000000000 + 0 -1 0 .0000000000 + 1 1 1 .5000000000 + + + 0 -1 0 .0000000000 + -1 0 0 .0000000000 + 1 1 1 .5000000000 + + + 0 1 0 .0000000000 + 1 0 0 .0000000000 + -1 -1 -1 .5000000000 + + + 1 0 0 .0000000000 + 0 1 0 .0000000000 + -1 -1 -1 .5000000000 + + + -1 0 0 .0000000000 + 0 -1 0 .0000000000 + 0 0 -1 .0000000000 + + + 0 -1 0 .0000000000 + -1 0 0 .0000000000 + 0 0 -1 .0000000000 + + + 0 0 1 .0000000000 + 1 0 0 .0000000000 + -1 -1 -1 .5000000000 + + + 0 0 1 .0000000000 + 0 1 0 .0000000000 + -1 -1 -1 .5000000000 + + + 1 1 1 .5000000000 + 0 -1 0 .0000000000 + 0 0 -1 .0000000000 + + + 1 1 1 .5000000000 + -1 0 0 .0000000000 + 0 0 -1 .0000000000 + + + -1 0 0 .0000000000 + 1 1 1 .5000000000 + 0 0 -1 .0000000000 + + + 1 0 0 .0000000000 + 0 0 1 .0000000000 + -1 -1 -1 .5000000000 + + + 0 1 0 .0000000000 + 0 0 1 .0000000000 + -1 -1 -1 .5000000000 + + + 0 -1 0 .0000000000 + 1 1 1 .5000000000 + 0 0 -1 .0000000000 + + + -1 0 0 .0000000000 + 0 0 -1 .0000000000 + 0 -1 0 .0000000000 + + + 0 1 0 .0000000000 + -1 -1 -1 .5000000000 + 1 0 0 .0000000000 + + + 0 -1 0 .0000000000 + 0 0 -1 .0000000000 + -1 0 0 .0000000000 + + + 1 0 0 .0000000000 + -1 -1 -1 .5000000000 + 0 1 0 .0000000000 + + + 1 1 1 .5000000000 + 0 0 -1 .0000000000 + 0 -1 0 .0000000000 + + + 0 0 1 .0000000000 + -1 -1 -1 .5000000000 + 1 0 0 .0000000000 + + + 1 1 1 .5000000000 + 0 0 -1 .0000000000 + -1 0 0 .0000000000 + + + 0 0 1 .0000000000 + -1 -1 -1 .5000000000 + 0 1 0 .0000000000 + + + 0 0 -1 .0000000000 + -1 0 0 .0000000000 + 0 -1 0 .0000000000 + + + 0 0 -1 .0000000000 + 0 -1 0 .0000000000 + -1 0 0 .0000000000 + + + -1 -1 -1 .5000000000 + 0 1 0 .0000000000 + 1 0 0 .0000000000 + + + -1 -1 -1 .5000000000 + 1 0 0 .0000000000 + 0 1 0 .0000000000 + + + 0 0 1 .0000000000 + 0 1 0 .0000000000 + 1 0 0 .0000000000 + + + 1 1 1 .5000000000 + -1 0 0 .0000000000 + 0 -1 0 .0000000000 + + + 1 1 1 .5000000000 + 0 -1 0 .0000000000 + -1 0 0 .0000000000 + + + 0 0 1 .0000000000 + 1 0 0 .0000000000 + 0 1 0 .0000000000 + + + 0 0 -1 .0000000000 + 1 1 1 .5000000000 + -1 0 0 .0000000000 + + + 0 0 -1 .0000000000 + 1 1 1 .5000000000 + 0 -1 0 .0000000000 + + + -1 -1 -1 .5000000000 + 0 0 1 .0000000000 + 1 0 0 .0000000000 + + + -1 -1 -1 .5000000000 + 0 0 1 .0000000000 + 0 1 0 .0000000000 + + + -1 0 0 .0000000000 + 1 1 1 .5000000000 + 0 -1 0 .0000000000 + + + 0 1 0 .0000000000 + 0 0 1 .0000000000 + 1 0 0 .0000000000 + + + 0 -1 0 .0000000000 + 1 1 1 .5000000000 + -1 0 0 .0000000000 + + + 1 0 0 .0000000000 + 0 0 1 .0000000000 + 0 1 0 .0000000000 + + + 1 0 0 .0000000000 + -1 -1 -1 .5000000000 + 0 0 1 .0000000000 + + + 0 1 0 .0000000000 + -1 -1 -1 .5000000000 + 0 0 1 .0000000000 + + + 0 -1 0 .0000000000 + 0 0 -1 .0000000000 + 1 1 1 .5000000000 + + + -1 0 0 .0000000000 + 0 0 -1 .0000000000 + 1 1 1 .5000000000 + + + -1 -1 -1 .5000000000 + 1 0 0 .0000000000 + 0 0 1 .0000000000 + + + -1 -1 -1 .5000000000 + 0 1 0 .0000000000 + 0 0 1 .0000000000 + + + 0 0 -1 .0000000000 + 0 -1 0 .0000000000 + 1 1 1 .5000000000 + + + 0 0 -1 .0000000000 + -1 0 0 .0000000000 + 1 1 1 .5000000000 + + + + + .000000000000000 5.167355275200000 5.167355275200000 + 5.167355275200000 .000000000000000 5.167355275200000 + 5.167355275200000 5.167355275200000 .000000000000000 + + + + + + + + + + + + + + + 1.000/8.000 1.000/8.000 1.000/8.000 + -1.000/8.000 -1.000/8.000 -1.000/8.000 + + + + + + + + + + + + + + + + + + + diff --git a/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-975c74ec7de669539066ba4d43b91cc7/juDFT_times.json b/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-975c74ec7de669539066ba4d43b91cc7/juDFT_times.json new file mode 100644 index 000000000..a87777db2 --- /dev/null +++ b/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-975c74ec7de669539066ba4d43b91cc7/juDFT_times.json @@ -0,0 +1,434 @@ +{ + "timername" : "Total Run", + "totaltime" : 4.00000, + "subtimers": [ + { + "timername" : "Initialization", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1, + "subtimers": [ + { + "timername" : "r_inpXML", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1 + }, + { + "timername" : "postprocessInput", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1, + "subtimers": [ + { + "timername" : "strgn", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1, + "subtimers": [ + { + "timername" : "writeStars", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1 + } + ] + }, + { + "timername" : "stepf", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1 + } + ] + } + ] + }, + { + "timername" : "generation of start-density", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1, + "subtimers": [ + { + "timername" : "qpw_to_nmt", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1 + }, + { + "timername" : "cdntot", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1, + "subtimers": [ + { + "timername" : "MT", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1 + } + ] + } + ] + }, + { + "timername" : "Qfix", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1 + }, + { + "timername" : "Open file/memory for IO of eig", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1 + }, + { + "timername" : "Iteration", + "totaltime" : 4.00000, + "mintime" : 0.0000E+00, + "maxtime" : 1.00000, + "ncalls" : 10, + "subtimers": [ + { + "timername" : "generation of potential", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 10, + "subtimers": [ + { + "timername" : "psqpw", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 10 + }, + { + "timername" : "interstitial", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 10 + }, + { + "timername" : "MT-spheres", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 10 + }, + { + "timername" : "den-pot integrals", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 10 + }, + { + "timername" : "Vxc in interstitial", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 10 + }, + { + "timername" : "Vxc in MT", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 10 + } + ] + }, + { + "timername" : "gen. of hamil. and diag. (tota", + "totaltime" : 2.00000, + "mintime" : 0.0000E+00, + "maxtime" : 1.00000, + "ncalls" : 10, + "subtimers": [ + { + "timername" : "eigen", + "totaltime" : 2.00000, + "mintime" : 0.0000E+00, + "maxtime" : 1.00000, + "ncalls" : 10, + "subtimers": [ + { + "timername" : "Updating energy parameters", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 10 + }, + { + "timername" : "tlmplm", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 10 + }, + { + "timername" : "Setup of H&S matrices", + "totaltime" : 1.00000, + "mintime" : 0.0000E+00, + "maxtime" : 1.00000, + "ncalls" : 600, + "subtimers": [ + { + "timername" : "Interstitial part", + "totaltime" : 1.00000, + "mintime" : 0.0000E+00, + "maxtime" : 1.00000, + "ncalls" : 600 + }, + { + "timername" : "MT part", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 600, + "subtimers": [ + { + "timername" : "fjgj coefficients", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 600 + }, + { + "timername" : "spherical setup", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 600 + }, + { + "timername" : "non-spherical setup", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 600 + }, + { + "timername" : "LO setup", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 600 + } + ] + }, + { + "timername" : "Matrix redistribution", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 600 + } + ] + }, + { + "timername" : "Diagonalization", + "totaltime" : 1.00000, + "mintime" : 0.0000E+00, + "maxtime" : 1.00000, + "ncalls" : 600 + }, + { + "timername" : "EV output", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 600, + "subtimers": [ + { + "timername" : "IO (write)", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 600 + } + ] + } + ] + } + ] + }, + { + "timername" : "determination of fermi energy", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 10, + "subtimers": [ + { + "timername" : "IO (read)", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 600 + }, + { + "timername" : "IO (write)", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 600 + } + ] + }, + { + "timername" : "generation of new charge densi", + "totaltime" : 2.00000, + "mintime" : 0.0000E+00, + "maxtime" : 1.00000, + "ncalls" : 10, + "subtimers": [ + { + "timername" : "cdnval", + "totaltime" : 2.00000, + "mintime" : 0.0000E+00, + "maxtime" : 1.00000, + "ncalls" : 10, + "subtimers": [ + { + "timername" : "IO (read)", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 600 + }, + { + "timername" : "pwden", + "totaltime" : 1.00000, + "mintime" : 0.0000E+00, + "maxtime" : 1.00000, + "ncalls" : 600 + }, + { + "timername" : "abcof", + "totaltime" : 1.00000, + "mintime" : 0.0000E+00, + "maxtime" : 1.00000, + "ncalls" : 600 + }, + { + "timername" : "cdnval: rhomt", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 600 + }, + { + "timername" : "cdnval: rhonmt", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 600 + }, + { + "timername" : "cdnval: rho(n)mtlo", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 600 + }, + { + "timername" : "cdnmt", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 10 + } + ] + }, + { + "timername" : "cdntot", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 20, + "subtimers": [ + { + "timername" : "MT", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 20 + } + ] + }, + { + "timername" : "cdngen: cdncore", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 10, + "subtimers": [ + { + "timername" : "qpw_to_nmt", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 10 + } + ] + } + ] + }, + { + "timername" : "determination of total energy", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 10 + }, + { + "timername" : "Charge Density Mixing", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 10, + "subtimers": [ + { + "timername" : "Reading of distances", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 10 + }, + { + "timername" : "Mixing", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 10 + }, + { + "timername" : "Postprocessing", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 10 + } + ] + } + ] + } + ] +} diff --git a/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-975c74ec7de669539066ba4d43b91cc7/out.error b/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-975c74ec7de669539066ba4d43b91cc7/out.error new file mode 100644 index 000000000..c4b9522e5 --- /dev/null +++ b/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-975c74ec7de669539066ba4d43b91cc7/out.error @@ -0,0 +1,12 @@ +I/O warning : failed to load external entity "relax.xml" + + ***************************************** + Run finished successfully + Stop message: + all done + ***************************************** +Rank:0 used 0.667GB/ 708072 kB + % Total % Received % Xferd Average Speed Time Time Time Current + Dload Upload Total Spent Left Speed + 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 780 100 40 100 740 195 3613 --:--:-- --:--:-- --:--:-- 3609 +OK diff --git a/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-975c74ec7de669539066ba4d43b91cc7/out.xml b/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-975c74ec7de669539066ba4d43b91cc7/out.xml new file mode 100644 index 000000000..d5ae164dc --- /dev/null +++ b/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-975c74ec7de669539066ba4d43b91cc7/out.xml @@ -0,0 +1,962 @@ + + + + + + GEN + + + + + + + + + + Si, alpha silicon, bulk, delta project + + + + + + + + + + .0000000000 .0000000000 .0000000000 + + + + + + + 0.437500 0.437500 0.437500 + 0.312500 0.437500 0.437500 + 0.187500 0.437500 0.437500 + 0.062500 0.437500 0.437500 + 0.062500 0.500000 0.500000 + 0.187500 0.562500 0.562500 + 0.312500 0.562500 0.562500 + 0.437500 0.437500 0.562500 + 0.312500 0.312500 0.437500 + 0.187500 0.312500 0.437500 + 0.125000 0.375000 0.437500 + 0.125000 0.437500 0.500000 + 0.187500 0.500000 0.625000 + 0.312500 0.437500 0.687500 + 0.312500 0.437500 0.562500 + 0.250000 0.250000 0.437500 + 0.250000 0.375000 0.437500 + 0.250000 0.437500 0.500000 + 0.250000 0.437500 0.625000 + 0.250000 0.500000 0.687500 + 0.187500 0.437500 0.562500 + 0.375000 0.375000 0.437500 + 0.375000 0.437500 0.500000 + 0.375000 0.437500 0.625000 + 0.250000 0.562500 0.625000 + 0.125000 0.500000 0.562500 + 0.437500 0.500000 0.500000 + 0.375000 0.500000 0.562500 + 0.250000 0.500000 0.562500 + 0.375000 0.375000 0.562500 + 0.250000 0.375000 0.562500 + 0.312500 0.312500 0.562500 + 0.312500 0.312500 0.312500 + 0.187500 0.312500 0.312500 + 0.062500 0.312500 0.312500 + 0.062500 0.375000 0.375000 + 0.187500 0.500000 0.500000 + 0.375000 0.375000 0.687500 + 0.187500 0.187500 0.312500 + 0.125000 0.250000 0.312500 + 0.125000 0.312500 0.375000 + 0.187500 0.375000 0.500000 + 0.312500 0.500000 0.625000 + 0.250000 0.250000 0.312500 + 0.250000 0.312500 0.375000 + 0.250000 0.312500 0.500000 + 0.312500 0.375000 0.625000 + 0.312500 0.375000 0.375000 + 0.312500 0.375000 0.500000 + 0.312500 0.500000 0.500000 + 0.187500 0.187500 0.187500 + 0.062500 0.187500 0.187500 + 0.062500 0.250000 0.250000 + 0.187500 0.375000 0.375000 + 0.125000 0.125000 0.187500 + 0.125000 0.187500 0.250000 + 0.187500 0.250000 0.375000 + 0.187500 0.250000 0.250000 + 0.062500 0.062500 0.062500 + 0.062500 0.125000 0.125000 + + + + + + + + 1 0 0 .0000000000 + 0 1 0 .0000000000 + 0 0 1 .0000000000 + + + 0 1 0 .0000000000 + 1 0 0 .0000000000 + 0 0 1 .0000000000 + + + -1 0 0 .0000000000 + 0 -1 0 .0000000000 + 1 1 1 .5000000000 + + + 0 -1 0 .0000000000 + -1 0 0 .0000000000 + 1 1 1 .5000000000 + + + 0 1 0 .0000000000 + 1 0 0 .0000000000 + -1 -1 -1 .5000000000 + + + 1 0 0 .0000000000 + 0 1 0 .0000000000 + -1 -1 -1 .5000000000 + + + -1 0 0 .0000000000 + 0 -1 0 .0000000000 + 0 0 -1 .0000000000 + + + 0 -1 0 .0000000000 + -1 0 0 .0000000000 + 0 0 -1 .0000000000 + + + 0 0 1 .0000000000 + 1 0 0 .0000000000 + -1 -1 -1 .5000000000 + + + 0 0 1 .0000000000 + 0 1 0 .0000000000 + -1 -1 -1 .5000000000 + + + 1 1 1 .5000000000 + 0 -1 0 .0000000000 + 0 0 -1 .0000000000 + + + 1 1 1 .5000000000 + -1 0 0 .0000000000 + 0 0 -1 .0000000000 + + + -1 0 0 .0000000000 + 1 1 1 .5000000000 + 0 0 -1 .0000000000 + + + 1 0 0 .0000000000 + 0 0 1 .0000000000 + -1 -1 -1 .5000000000 + + + 0 1 0 .0000000000 + 0 0 1 .0000000000 + -1 -1 -1 .5000000000 + + + 0 -1 0 .0000000000 + 1 1 1 .5000000000 + 0 0 -1 .0000000000 + + + -1 0 0 .0000000000 + 0 0 -1 .0000000000 + 0 -1 0 .0000000000 + + + 0 1 0 .0000000000 + -1 -1 -1 .5000000000 + 1 0 0 .0000000000 + + + 0 -1 0 .0000000000 + 0 0 -1 .0000000000 + -1 0 0 .0000000000 + + + 1 0 0 .0000000000 + -1 -1 -1 .5000000000 + 0 1 0 .0000000000 + + + 1 1 1 .5000000000 + 0 0 -1 .0000000000 + 0 -1 0 .0000000000 + + + 0 0 1 .0000000000 + -1 -1 -1 .5000000000 + 1 0 0 .0000000000 + + + 1 1 1 .5000000000 + 0 0 -1 .0000000000 + -1 0 0 .0000000000 + + + 0 0 1 .0000000000 + -1 -1 -1 .5000000000 + 0 1 0 .0000000000 + + + 0 0 -1 .0000000000 + -1 0 0 .0000000000 + 0 -1 0 .0000000000 + + + 0 0 -1 .0000000000 + 0 -1 0 .0000000000 + -1 0 0 .0000000000 + + + -1 -1 -1 .5000000000 + 0 1 0 .0000000000 + 1 0 0 .0000000000 + + + -1 -1 -1 .5000000000 + 1 0 0 .0000000000 + 0 1 0 .0000000000 + + + 0 0 1 .0000000000 + 0 1 0 .0000000000 + 1 0 0 .0000000000 + + + 1 1 1 .5000000000 + -1 0 0 .0000000000 + 0 -1 0 .0000000000 + + + 1 1 1 .5000000000 + 0 -1 0 .0000000000 + -1 0 0 .0000000000 + + + 0 0 1 .0000000000 + 1 0 0 .0000000000 + 0 1 0 .0000000000 + + + 0 0 -1 .0000000000 + 1 1 1 .5000000000 + -1 0 0 .0000000000 + + + 0 0 -1 .0000000000 + 1 1 1 .5000000000 + 0 -1 0 .0000000000 + + + -1 -1 -1 .5000000000 + 0 0 1 .0000000000 + 1 0 0 .0000000000 + + + -1 -1 -1 .5000000000 + 0 0 1 .0000000000 + 0 1 0 .0000000000 + + + -1 0 0 .0000000000 + 1 1 1 .5000000000 + 0 -1 0 .0000000000 + + + 0 1 0 .0000000000 + 0 0 1 .0000000000 + 1 0 0 .0000000000 + + + 0 -1 0 .0000000000 + 1 1 1 .5000000000 + -1 0 0 .0000000000 + + + 1 0 0 .0000000000 + 0 0 1 .0000000000 + 0 1 0 .0000000000 + + + 1 0 0 .0000000000 + -1 -1 -1 .5000000000 + 0 0 1 .0000000000 + + + 0 1 0 .0000000000 + -1 -1 -1 .5000000000 + 0 0 1 .0000000000 + + + 0 -1 0 .0000000000 + 0 0 -1 .0000000000 + 1 1 1 .5000000000 + + + -1 0 0 .0000000000 + 0 0 -1 .0000000000 + 1 1 1 .5000000000 + + + -1 -1 -1 .5000000000 + 1 0 0 .0000000000 + 0 0 1 .0000000000 + + + -1 -1 -1 .5000000000 + 0 1 0 .0000000000 + 0 0 1 .0000000000 + + + 0 0 -1 .0000000000 + 0 -1 0 .0000000000 + 1 1 1 .5000000000 + + + 0 0 -1 .0000000000 + -1 0 0 .0000000000 + 1 1 1 .5000000000 + + + + + .000000000000000 5.167355275200000 5.167355275200000 + 5.167355275200000 .000000000000000 5.167355275200000 + 5.167355275200000 5.167355275200000 .000000000000000 + + + + + + + + + + + + + + + 1.000/8.000 1.000/8.000 1.000/8.000 + -1.000/8.000 -1.000/8.000 -1.000/8.000 + + + + + + + + + + + + + + + + + + + + + + + + + 0.437500 0.437500 0.437500 + 0.312500 0.437500 0.437500 + 0.187500 0.437500 0.437500 + 0.062500 0.437500 0.437500 + 0.062500 0.500000 0.500000 + 0.187500 0.562500 0.562500 + 0.312500 0.562500 0.562500 + 0.437500 0.437500 0.562500 + 0.312500 0.312500 0.437500 + 0.187500 0.312500 0.437500 + 0.125000 0.375000 0.437500 + 0.125000 0.437500 0.500000 + 0.187500 0.500000 0.625000 + 0.312500 0.437500 0.687500 + 0.312500 0.437500 0.562500 + 0.250000 0.250000 0.437500 + 0.250000 0.375000 0.437500 + 0.250000 0.437500 0.500000 + 0.250000 0.437500 0.625000 + 0.250000 0.500000 0.687500 + 0.187500 0.437500 0.562500 + 0.375000 0.375000 0.437500 + 0.375000 0.437500 0.500000 + 0.375000 0.437500 0.625000 + 0.250000 0.562500 0.625000 + 0.125000 0.500000 0.562500 + 0.437500 0.500000 0.500000 + 0.375000 0.500000 0.562500 + 0.250000 0.500000 0.562500 + 0.375000 0.375000 0.562500 + 0.250000 0.375000 0.562500 + 0.312500 0.312500 0.562500 + 0.312500 0.312500 0.312500 + 0.187500 0.312500 0.312500 + 0.062500 0.312500 0.312500 + 0.062500 0.375000 0.375000 + 0.187500 0.500000 0.500000 + 0.375000 0.375000 0.687500 + 0.187500 0.187500 0.312500 + 0.125000 0.250000 0.312500 + 0.125000 0.312500 0.375000 + 0.187500 0.375000 0.500000 + 0.312500 0.500000 0.625000 + 0.250000 0.250000 0.312500 + 0.250000 0.312500 0.375000 + 0.250000 0.312500 0.500000 + 0.312500 0.375000 0.625000 + 0.312500 0.375000 0.375000 + 0.312500 0.375000 0.500000 + 0.312500 0.500000 0.500000 + 0.187500 0.187500 0.187500 + 0.062500 0.187500 0.187500 + 0.062500 0.250000 0.250000 + 0.187500 0.375000 0.375000 + 0.125000 0.125000 0.187500 + 0.125000 0.187500 0.250000 + 0.187500 0.250000 0.375000 + 0.187500 0.250000 0.250000 + 0.062500 0.062500 0.062500 + 0.062500 0.125000 0.125000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-975c74ec7de669539066ba4d43b91cc7/shell.out b/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-975c74ec7de669539066ba4d43b91cc7/shell.out new file mode 100644 index 000000000..ff623d55f --- /dev/null +++ b/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-975c74ec7de669539066ba4d43b91cc7/shell.out @@ -0,0 +1,53 @@ + Welcome to FLEUR (www.flapw.de) + MaX-Release 4.0 (www.max-centre.eu) + stars are always ordered + -------------------------------------------------------- + Number of OMP-threads: 6 + -------------------------------------------------------- + Iteration: 1 Distance: 8.14285781957964 + Test for time of next iteration: + Time provided (min): 5 + Time used (min): 1 + Time per iter (min): 1 + Iteration: 2 Distance: 7.69272567254270 + Test for time of next iteration: + Time provided (min): 5 + Time used (min): 1 + Time per iter (min): 1 + Iteration: 3 Distance: 0.857440182319491 + Test for time of next iteration: + Time provided (min): 5 + Time used (min): 1 + Time per iter (min): 1 + Iteration: 4 Distance: 0.503262574761058 + Test for time of next iteration: + Time provided (min): 5 + Time used (min): 1 + Time per iter (min): 1 + Iteration: 5 Distance: 0.205396212552065 + Test for time of next iteration: + Time provided (min): 5 + Time used (min): 1 + Time per iter (min): 1 + Iteration: 6 Distance: 1.842382353475831E-002 + Test for time of next iteration: + Time provided (min): 5 + Time used (min): 1 + Time per iter (min): 1 + Iteration: 7 Distance: 1.290131128597136E-002 + Test for time of next iteration: + Time provided (min): 5 + Time used (min): 1 + Time per iter (min): 1 + Iteration: 8 Distance: 1.296767210044465E-003 + Test for time of next iteration: + Time provided (min): 5 + Time used (min): 1 + Time per iter (min): 1 + Iteration: 9 Distance: 1.303053513264277E-003 + Test for time of next iteration: + Time provided (min): 5 + Time used (min): 1 + Time per iter (min): 1 + Iteration: 10 Distance: 1.714546800383610E-004 + Usage data send using curl: usage.json diff --git a/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-c0b675692ebba855c3312ee873cf5e47/JUDFT_WARN_ONLY b/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-c0b675692ebba855c3312ee873cf5e47/JUDFT_WARN_ONLY new file mode 100644 index 000000000..65c71eb10 --- /dev/null +++ b/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-c0b675692ebba855c3312ee873cf5e47/JUDFT_WARN_ONLY @@ -0,0 +1 @@ +/n diff --git a/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-c0b675692ebba855c3312ee873cf5e47/_scheduler-stderr.txt b/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-c0b675692ebba855c3312ee873cf5e47/_scheduler-stderr.txt new file mode 100644 index 000000000..e69de29bb diff --git a/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-c0b675692ebba855c3312ee873cf5e47/_scheduler-stdout.txt b/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-c0b675692ebba855c3312ee873cf5e47/_scheduler-stdout.txt new file mode 100644 index 000000000..e69de29bb diff --git a/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-c0b675692ebba855c3312ee873cf5e47/cdn1 b/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-c0b675692ebba855c3312ee873cf5e47/cdn1 new file mode 100644 index 000000000..28f7a23bb Binary files /dev/null and b/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-c0b675692ebba855c3312ee873cf5e47/cdn1 differ diff --git a/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-c0b675692ebba855c3312ee873cf5e47/inp.xml b/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-c0b675692ebba855c3312ee873cf5e47/inp.xml new file mode 100644 index 000000000..d5ba01f47 --- /dev/null +++ b/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-c0b675692ebba855c3312ee873cf5e47/inp.xml @@ -0,0 +1,369 @@ + + + Si, alpha silicon, bulk, delta project + + + + + + + + + + .0000000000 .0000000000 .0000000000 + + + + + + + 0.437500 0.437500 0.437500 + 0.312500 0.437500 0.437500 + 0.187500 0.437500 0.437500 + 0.062500 0.437500 0.437500 + 0.062500 0.500000 0.500000 + 0.187500 0.562500 0.562500 + 0.312500 0.562500 0.562500 + 0.437500 0.437500 0.562500 + 0.312500 0.312500 0.437500 + 0.187500 0.312500 0.437500 + 0.125000 0.375000 0.437500 + 0.125000 0.437500 0.500000 + 0.187500 0.500000 0.625000 + 0.312500 0.437500 0.687500 + 0.312500 0.437500 0.562500 + 0.250000 0.250000 0.437500 + 0.250000 0.375000 0.437500 + 0.250000 0.437500 0.500000 + 0.250000 0.437500 0.625000 + 0.250000 0.500000 0.687500 + 0.187500 0.437500 0.562500 + 0.375000 0.375000 0.437500 + 0.375000 0.437500 0.500000 + 0.375000 0.437500 0.625000 + 0.250000 0.562500 0.625000 + 0.125000 0.500000 0.562500 + 0.437500 0.500000 0.500000 + 0.375000 0.500000 0.562500 + 0.250000 0.500000 0.562500 + 0.375000 0.375000 0.562500 + 0.250000 0.375000 0.562500 + 0.312500 0.312500 0.562500 + 0.312500 0.312500 0.312500 + 0.187500 0.312500 0.312500 + 0.062500 0.312500 0.312500 + 0.062500 0.375000 0.375000 + 0.187500 0.500000 0.500000 + 0.375000 0.375000 0.687500 + 0.187500 0.187500 0.312500 + 0.125000 0.250000 0.312500 + 0.125000 0.312500 0.375000 + 0.187500 0.375000 0.500000 + 0.312500 0.500000 0.625000 + 0.250000 0.250000 0.312500 + 0.250000 0.312500 0.375000 + 0.250000 0.312500 0.500000 + 0.312500 0.375000 0.625000 + 0.312500 0.375000 0.375000 + 0.312500 0.375000 0.500000 + 0.312500 0.500000 0.500000 + 0.187500 0.187500 0.187500 + 0.062500 0.187500 0.187500 + 0.062500 0.250000 0.250000 + 0.187500 0.375000 0.375000 + 0.125000 0.125000 0.187500 + 0.125000 0.187500 0.250000 + 0.187500 0.250000 0.375000 + 0.187500 0.250000 0.250000 + 0.062500 0.062500 0.062500 + 0.062500 0.125000 0.125000 + + + + + + + + + + + 1 0 0 .0000000000 + 0 1 0 .0000000000 + 0 0 1 .0000000000 + + + 0 1 0 .0000000000 + 1 0 0 .0000000000 + 0 0 1 .0000000000 + + + -1 0 0 .0000000000 + 0 -1 0 .0000000000 + 1 1 1 .5000000000 + + + 0 -1 0 .0000000000 + -1 0 0 .0000000000 + 1 1 1 .5000000000 + + + 0 1 0 .0000000000 + 1 0 0 .0000000000 + -1 -1 -1 .5000000000 + + + 1 0 0 .0000000000 + 0 1 0 .0000000000 + -1 -1 -1 .5000000000 + + + -1 0 0 .0000000000 + 0 -1 0 .0000000000 + 0 0 -1 .0000000000 + + + 0 -1 0 .0000000000 + -1 0 0 .0000000000 + 0 0 -1 .0000000000 + + + 0 0 1 .0000000000 + 1 0 0 .0000000000 + -1 -1 -1 .5000000000 + + + 0 0 1 .0000000000 + 0 1 0 .0000000000 + -1 -1 -1 .5000000000 + + + 1 1 1 .5000000000 + 0 -1 0 .0000000000 + 0 0 -1 .0000000000 + + + 1 1 1 .5000000000 + -1 0 0 .0000000000 + 0 0 -1 .0000000000 + + + -1 0 0 .0000000000 + 1 1 1 .5000000000 + 0 0 -1 .0000000000 + + + 1 0 0 .0000000000 + 0 0 1 .0000000000 + -1 -1 -1 .5000000000 + + + 0 1 0 .0000000000 + 0 0 1 .0000000000 + -1 -1 -1 .5000000000 + + + 0 -1 0 .0000000000 + 1 1 1 .5000000000 + 0 0 -1 .0000000000 + + + -1 0 0 .0000000000 + 0 0 -1 .0000000000 + 0 -1 0 .0000000000 + + + 0 1 0 .0000000000 + -1 -1 -1 .5000000000 + 1 0 0 .0000000000 + + + 0 -1 0 .0000000000 + 0 0 -1 .0000000000 + -1 0 0 .0000000000 + + + 1 0 0 .0000000000 + -1 -1 -1 .5000000000 + 0 1 0 .0000000000 + + + 1 1 1 .5000000000 + 0 0 -1 .0000000000 + 0 -1 0 .0000000000 + + + 0 0 1 .0000000000 + -1 -1 -1 .5000000000 + 1 0 0 .0000000000 + + + 1 1 1 .5000000000 + 0 0 -1 .0000000000 + -1 0 0 .0000000000 + + + 0 0 1 .0000000000 + -1 -1 -1 .5000000000 + 0 1 0 .0000000000 + + + 0 0 -1 .0000000000 + -1 0 0 .0000000000 + 0 -1 0 .0000000000 + + + 0 0 -1 .0000000000 + 0 -1 0 .0000000000 + -1 0 0 .0000000000 + + + -1 -1 -1 .5000000000 + 0 1 0 .0000000000 + 1 0 0 .0000000000 + + + -1 -1 -1 .5000000000 + 1 0 0 .0000000000 + 0 1 0 .0000000000 + + + 0 0 1 .0000000000 + 0 1 0 .0000000000 + 1 0 0 .0000000000 + + + 1 1 1 .5000000000 + -1 0 0 .0000000000 + 0 -1 0 .0000000000 + + + 1 1 1 .5000000000 + 0 -1 0 .0000000000 + -1 0 0 .0000000000 + + + 0 0 1 .0000000000 + 1 0 0 .0000000000 + 0 1 0 .0000000000 + + + 0 0 -1 .0000000000 + 1 1 1 .5000000000 + -1 0 0 .0000000000 + + + 0 0 -1 .0000000000 + 1 1 1 .5000000000 + 0 -1 0 .0000000000 + + + -1 -1 -1 .5000000000 + 0 0 1 .0000000000 + 1 0 0 .0000000000 + + + -1 -1 -1 .5000000000 + 0 0 1 .0000000000 + 0 1 0 .0000000000 + + + -1 0 0 .0000000000 + 1 1 1 .5000000000 + 0 -1 0 .0000000000 + + + 0 1 0 .0000000000 + 0 0 1 .0000000000 + 1 0 0 .0000000000 + + + 0 -1 0 .0000000000 + 1 1 1 .5000000000 + -1 0 0 .0000000000 + + + 1 0 0 .0000000000 + 0 0 1 .0000000000 + 0 1 0 .0000000000 + + + 1 0 0 .0000000000 + -1 -1 -1 .5000000000 + 0 0 1 .0000000000 + + + 0 1 0 .0000000000 + -1 -1 -1 .5000000000 + 0 0 1 .0000000000 + + + 0 -1 0 .0000000000 + 0 0 -1 .0000000000 + 1 1 1 .5000000000 + + + -1 0 0 .0000000000 + 0 0 -1 .0000000000 + 1 1 1 .5000000000 + + + -1 -1 -1 .5000000000 + 1 0 0 .0000000000 + 0 0 1 .0000000000 + + + -1 -1 -1 .5000000000 + 0 1 0 .0000000000 + 0 0 1 .0000000000 + + + 0 0 -1 .0000000000 + 0 -1 0 .0000000000 + 1 1 1 .5000000000 + + + 0 0 -1 .0000000000 + -1 0 0 .0000000000 + 1 1 1 .5000000000 + + + + + .000000000000000 5.167355275200000 5.167355275200000 + 5.167355275200000 .000000000000000 5.167355275200000 + 5.167355275200000 5.167355275200000 .000000000000000 + + + + + + + + + + + + + + + 1.000/8.000 1.000/8.000 1.000/8.000 + -1.000/8.000 -1.000/8.000 -1.000/8.000 + + + + + + + + + + + + + + + + + + + diff --git a/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-c0b675692ebba855c3312ee873cf5e47/juDFT_times.json b/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-c0b675692ebba855c3312ee873cf5e47/juDFT_times.json new file mode 100644 index 000000000..d5c0aecbd --- /dev/null +++ b/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-c0b675692ebba855c3312ee873cf5e47/juDFT_times.json @@ -0,0 +1,434 @@ +{ + "timername" : "Total Run", + "totaltime" : 4.00000, + "subtimers": [ + { + "timername" : "Initialization", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1, + "subtimers": [ + { + "timername" : "r_inpXML", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1 + }, + { + "timername" : "postprocessInput", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1, + "subtimers": [ + { + "timername" : "strgn", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1, + "subtimers": [ + { + "timername" : "writeStars", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1 + } + ] + }, + { + "timername" : "stepf", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1 + } + ] + } + ] + }, + { + "timername" : "generation of start-density", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1, + "subtimers": [ + { + "timername" : "qpw_to_nmt", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1 + }, + { + "timername" : "cdntot", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1, + "subtimers": [ + { + "timername" : "MT", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1 + } + ] + } + ] + }, + { + "timername" : "Qfix", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1 + }, + { + "timername" : "Open file/memory for IO of eig", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 1 + }, + { + "timername" : "Iteration", + "totaltime" : 4.00000, + "mintime" : 0.0000E+00, + "maxtime" : 1.00000, + "ncalls" : 12, + "subtimers": [ + { + "timername" : "generation of potential", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 12, + "subtimers": [ + { + "timername" : "psqpw", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 12 + }, + { + "timername" : "interstitial", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 12 + }, + { + "timername" : "MT-spheres", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 12 + }, + { + "timername" : "den-pot integrals", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 12 + }, + { + "timername" : "Vxc in interstitial", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 12 + }, + { + "timername" : "Vxc in MT", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 12 + } + ] + }, + { + "timername" : "gen. of hamil. and diag. (tota", + "totaltime" : 2.00000, + "mintime" : 0.0000E+00, + "maxtime" : 1.00000, + "ncalls" : 12, + "subtimers": [ + { + "timername" : "eigen", + "totaltime" : 2.00000, + "mintime" : 0.0000E+00, + "maxtime" : 1.00000, + "ncalls" : 12, + "subtimers": [ + { + "timername" : "Updating energy parameters", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 12 + }, + { + "timername" : "tlmplm", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 12 + }, + { + "timername" : "Setup of H&S matrices", + "totaltime" : 1.00000, + "mintime" : 0.0000E+00, + "maxtime" : 1.00000, + "ncalls" : 720, + "subtimers": [ + { + "timername" : "Interstitial part", + "totaltime" : 1.00000, + "mintime" : 0.0000E+00, + "maxtime" : 1.00000, + "ncalls" : 720 + }, + { + "timername" : "MT part", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 720, + "subtimers": [ + { + "timername" : "fjgj coefficients", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 720 + }, + { + "timername" : "spherical setup", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 720 + }, + { + "timername" : "non-spherical setup", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 720 + }, + { + "timername" : "LO setup", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 720 + } + ] + }, + { + "timername" : "Matrix redistribution", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 720 + } + ] + }, + { + "timername" : "Diagonalization", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 720 + }, + { + "timername" : "EV output", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 720, + "subtimers": [ + { + "timername" : "IO (write)", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 720 + } + ] + } + ] + } + ] + }, + { + "timername" : "determination of fermi energy", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 12, + "subtimers": [ + { + "timername" : "IO (read)", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 720 + }, + { + "timername" : "IO (write)", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 720 + } + ] + }, + { + "timername" : "generation of new charge densi", + "totaltime" : 2.00000, + "mintime" : 0.0000E+00, + "maxtime" : 1.00000, + "ncalls" : 12, + "subtimers": [ + { + "timername" : "cdnval", + "totaltime" : 2.00000, + "mintime" : 0.0000E+00, + "maxtime" : 1.00000, + "ncalls" : 12, + "subtimers": [ + { + "timername" : "IO (read)", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 720 + }, + { + "timername" : "pwden", + "totaltime" : 2.00000, + "mintime" : 0.0000E+00, + "maxtime" : 1.00000, + "ncalls" : 720 + }, + { + "timername" : "abcof", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 720 + }, + { + "timername" : "cdnval: rhomt", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 720 + }, + { + "timername" : "cdnval: rhonmt", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 720 + }, + { + "timername" : "cdnval: rho(n)mtlo", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 720 + }, + { + "timername" : "cdnmt", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 12 + } + ] + }, + { + "timername" : "cdntot", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 24, + "subtimers": [ + { + "timername" : "MT", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 24 + } + ] + }, + { + "timername" : "cdngen: cdncore", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 12, + "subtimers": [ + { + "timername" : "qpw_to_nmt", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 12 + } + ] + } + ] + }, + { + "timername" : "determination of total energy", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 12 + }, + { + "timername" : "Charge Density Mixing", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 12, + "subtimers": [ + { + "timername" : "Reading of distances", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 12 + }, + { + "timername" : "Mixing", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 12 + }, + { + "timername" : "Postprocessing", + "totaltime" : 0.0000E+00, + "mintime" : 0.0000E+00, + "maxtime" : 0.0000E+00, + "ncalls" : 12 + } + ] + } + ] + } + ] +} diff --git a/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-c0b675692ebba855c3312ee873cf5e47/out.error b/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-c0b675692ebba855c3312ee873cf5e47/out.error new file mode 100644 index 000000000..1598add06 --- /dev/null +++ b/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-c0b675692ebba855c3312ee873cf5e47/out.error @@ -0,0 +1,12 @@ +I/O warning : failed to load external entity "relax.xml" + + ***************************************** + Run finished successfully + Stop message: + all done + ***************************************** +Rank:0 used 0.671GB/ 704052 kB + % Total % Received % Xferd Average Speed Time Time Time Current + Dload Upload Total Spent Left Speed + 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 780 100 40 100 740 178 3310 --:--:-- --:--:-- --:--:-- 3318 +OK diff --git a/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-c0b675692ebba855c3312ee873cf5e47/out.xml b/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-c0b675692ebba855c3312ee873cf5e47/out.xml new file mode 100644 index 000000000..a9de17fa4 --- /dev/null +++ b/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-c0b675692ebba855c3312ee873cf5e47/out.xml @@ -0,0 +1,1064 @@ + + + + + + GEN + + + + + + + + + + Si, alpha silicon, bulk, delta project + + + + + + + + + + .0000000000 .0000000000 .0000000000 + + + + + + + 0.437500 0.437500 0.437500 + 0.312500 0.437500 0.437500 + 0.187500 0.437500 0.437500 + 0.062500 0.437500 0.437500 + 0.062500 0.500000 0.500000 + 0.187500 0.562500 0.562500 + 0.312500 0.562500 0.562500 + 0.437500 0.437500 0.562500 + 0.312500 0.312500 0.437500 + 0.187500 0.312500 0.437500 + 0.125000 0.375000 0.437500 + 0.125000 0.437500 0.500000 + 0.187500 0.500000 0.625000 + 0.312500 0.437500 0.687500 + 0.312500 0.437500 0.562500 + 0.250000 0.250000 0.437500 + 0.250000 0.375000 0.437500 + 0.250000 0.437500 0.500000 + 0.250000 0.437500 0.625000 + 0.250000 0.500000 0.687500 + 0.187500 0.437500 0.562500 + 0.375000 0.375000 0.437500 + 0.375000 0.437500 0.500000 + 0.375000 0.437500 0.625000 + 0.250000 0.562500 0.625000 + 0.125000 0.500000 0.562500 + 0.437500 0.500000 0.500000 + 0.375000 0.500000 0.562500 + 0.250000 0.500000 0.562500 + 0.375000 0.375000 0.562500 + 0.250000 0.375000 0.562500 + 0.312500 0.312500 0.562500 + 0.312500 0.312500 0.312500 + 0.187500 0.312500 0.312500 + 0.062500 0.312500 0.312500 + 0.062500 0.375000 0.375000 + 0.187500 0.500000 0.500000 + 0.375000 0.375000 0.687500 + 0.187500 0.187500 0.312500 + 0.125000 0.250000 0.312500 + 0.125000 0.312500 0.375000 + 0.187500 0.375000 0.500000 + 0.312500 0.500000 0.625000 + 0.250000 0.250000 0.312500 + 0.250000 0.312500 0.375000 + 0.250000 0.312500 0.500000 + 0.312500 0.375000 0.625000 + 0.312500 0.375000 0.375000 + 0.312500 0.375000 0.500000 + 0.312500 0.500000 0.500000 + 0.187500 0.187500 0.187500 + 0.062500 0.187500 0.187500 + 0.062500 0.250000 0.250000 + 0.187500 0.375000 0.375000 + 0.125000 0.125000 0.187500 + 0.125000 0.187500 0.250000 + 0.187500 0.250000 0.375000 + 0.187500 0.250000 0.250000 + 0.062500 0.062500 0.062500 + 0.062500 0.125000 0.125000 + + + + + + + + 1 0 0 .0000000000 + 0 1 0 .0000000000 + 0 0 1 .0000000000 + + + 0 1 0 .0000000000 + 1 0 0 .0000000000 + 0 0 1 .0000000000 + + + -1 0 0 .0000000000 + 0 -1 0 .0000000000 + 1 1 1 .5000000000 + + + 0 -1 0 .0000000000 + -1 0 0 .0000000000 + 1 1 1 .5000000000 + + + 0 1 0 .0000000000 + 1 0 0 .0000000000 + -1 -1 -1 .5000000000 + + + 1 0 0 .0000000000 + 0 1 0 .0000000000 + -1 -1 -1 .5000000000 + + + -1 0 0 .0000000000 + 0 -1 0 .0000000000 + 0 0 -1 .0000000000 + + + 0 -1 0 .0000000000 + -1 0 0 .0000000000 + 0 0 -1 .0000000000 + + + 0 0 1 .0000000000 + 1 0 0 .0000000000 + -1 -1 -1 .5000000000 + + + 0 0 1 .0000000000 + 0 1 0 .0000000000 + -1 -1 -1 .5000000000 + + + 1 1 1 .5000000000 + 0 -1 0 .0000000000 + 0 0 -1 .0000000000 + + + 1 1 1 .5000000000 + -1 0 0 .0000000000 + 0 0 -1 .0000000000 + + + -1 0 0 .0000000000 + 1 1 1 .5000000000 + 0 0 -1 .0000000000 + + + 1 0 0 .0000000000 + 0 0 1 .0000000000 + -1 -1 -1 .5000000000 + + + 0 1 0 .0000000000 + 0 0 1 .0000000000 + -1 -1 -1 .5000000000 + + + 0 -1 0 .0000000000 + 1 1 1 .5000000000 + 0 0 -1 .0000000000 + + + -1 0 0 .0000000000 + 0 0 -1 .0000000000 + 0 -1 0 .0000000000 + + + 0 1 0 .0000000000 + -1 -1 -1 .5000000000 + 1 0 0 .0000000000 + + + 0 -1 0 .0000000000 + 0 0 -1 .0000000000 + -1 0 0 .0000000000 + + + 1 0 0 .0000000000 + -1 -1 -1 .5000000000 + 0 1 0 .0000000000 + + + 1 1 1 .5000000000 + 0 0 -1 .0000000000 + 0 -1 0 .0000000000 + + + 0 0 1 .0000000000 + -1 -1 -1 .5000000000 + 1 0 0 .0000000000 + + + 1 1 1 .5000000000 + 0 0 -1 .0000000000 + -1 0 0 .0000000000 + + + 0 0 1 .0000000000 + -1 -1 -1 .5000000000 + 0 1 0 .0000000000 + + + 0 0 -1 .0000000000 + -1 0 0 .0000000000 + 0 -1 0 .0000000000 + + + 0 0 -1 .0000000000 + 0 -1 0 .0000000000 + -1 0 0 .0000000000 + + + -1 -1 -1 .5000000000 + 0 1 0 .0000000000 + 1 0 0 .0000000000 + + + -1 -1 -1 .5000000000 + 1 0 0 .0000000000 + 0 1 0 .0000000000 + + + 0 0 1 .0000000000 + 0 1 0 .0000000000 + 1 0 0 .0000000000 + + + 1 1 1 .5000000000 + -1 0 0 .0000000000 + 0 -1 0 .0000000000 + + + 1 1 1 .5000000000 + 0 -1 0 .0000000000 + -1 0 0 .0000000000 + + + 0 0 1 .0000000000 + 1 0 0 .0000000000 + 0 1 0 .0000000000 + + + 0 0 -1 .0000000000 + 1 1 1 .5000000000 + -1 0 0 .0000000000 + + + 0 0 -1 .0000000000 + 1 1 1 .5000000000 + 0 -1 0 .0000000000 + + + -1 -1 -1 .5000000000 + 0 0 1 .0000000000 + 1 0 0 .0000000000 + + + -1 -1 -1 .5000000000 + 0 0 1 .0000000000 + 0 1 0 .0000000000 + + + -1 0 0 .0000000000 + 1 1 1 .5000000000 + 0 -1 0 .0000000000 + + + 0 1 0 .0000000000 + 0 0 1 .0000000000 + 1 0 0 .0000000000 + + + 0 -1 0 .0000000000 + 1 1 1 .5000000000 + -1 0 0 .0000000000 + + + 1 0 0 .0000000000 + 0 0 1 .0000000000 + 0 1 0 .0000000000 + + + 1 0 0 .0000000000 + -1 -1 -1 .5000000000 + 0 0 1 .0000000000 + + + 0 1 0 .0000000000 + -1 -1 -1 .5000000000 + 0 0 1 .0000000000 + + + 0 -1 0 .0000000000 + 0 0 -1 .0000000000 + 1 1 1 .5000000000 + + + -1 0 0 .0000000000 + 0 0 -1 .0000000000 + 1 1 1 .5000000000 + + + -1 -1 -1 .5000000000 + 1 0 0 .0000000000 + 0 0 1 .0000000000 + + + -1 -1 -1 .5000000000 + 0 1 0 .0000000000 + 0 0 1 .0000000000 + + + 0 0 -1 .0000000000 + 0 -1 0 .0000000000 + 1 1 1 .5000000000 + + + 0 0 -1 .0000000000 + -1 0 0 .0000000000 + 1 1 1 .5000000000 + + + + + .000000000000000 5.167355275200000 5.167355275200000 + 5.167355275200000 .000000000000000 5.167355275200000 + 5.167355275200000 5.167355275200000 .000000000000000 + + + + + + + + + + + + + + + 1.000/8.000 1.000/8.000 1.000/8.000 + -1.000/8.000 -1.000/8.000 -1.000/8.000 + + + + + + + + + + + + + + + + + + + + + + + + + 0.437500 0.437500 0.437500 + 0.312500 0.437500 0.437500 + 0.187500 0.437500 0.437500 + 0.062500 0.437500 0.437500 + 0.062500 0.500000 0.500000 + 0.187500 0.562500 0.562500 + 0.312500 0.562500 0.562500 + 0.437500 0.437500 0.562500 + 0.312500 0.312500 0.437500 + 0.187500 0.312500 0.437500 + 0.125000 0.375000 0.437500 + 0.125000 0.437500 0.500000 + 0.187500 0.500000 0.625000 + 0.312500 0.437500 0.687500 + 0.312500 0.437500 0.562500 + 0.250000 0.250000 0.437500 + 0.250000 0.375000 0.437500 + 0.250000 0.437500 0.500000 + 0.250000 0.437500 0.625000 + 0.250000 0.500000 0.687500 + 0.187500 0.437500 0.562500 + 0.375000 0.375000 0.437500 + 0.375000 0.437500 0.500000 + 0.375000 0.437500 0.625000 + 0.250000 0.562500 0.625000 + 0.125000 0.500000 0.562500 + 0.437500 0.500000 0.500000 + 0.375000 0.500000 0.562500 + 0.250000 0.500000 0.562500 + 0.375000 0.375000 0.562500 + 0.250000 0.375000 0.562500 + 0.312500 0.312500 0.562500 + 0.312500 0.312500 0.312500 + 0.187500 0.312500 0.312500 + 0.062500 0.312500 0.312500 + 0.062500 0.375000 0.375000 + 0.187500 0.500000 0.500000 + 0.375000 0.375000 0.687500 + 0.187500 0.187500 0.312500 + 0.125000 0.250000 0.312500 + 0.125000 0.312500 0.375000 + 0.187500 0.375000 0.500000 + 0.312500 0.500000 0.625000 + 0.250000 0.250000 0.312500 + 0.250000 0.312500 0.375000 + 0.250000 0.312500 0.500000 + 0.312500 0.375000 0.625000 + 0.312500 0.375000 0.375000 + 0.312500 0.375000 0.500000 + 0.312500 0.500000 0.500000 + 0.187500 0.187500 0.187500 + 0.062500 0.187500 0.187500 + 0.062500 0.250000 0.250000 + 0.187500 0.375000 0.375000 + 0.125000 0.125000 0.187500 + 0.125000 0.187500 0.250000 + 0.187500 0.250000 0.375000 + 0.187500 0.250000 0.250000 + 0.062500 0.062500 0.062500 + 0.062500 0.125000 0.125000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-c0b675692ebba855c3312ee873cf5e47/shell.out b/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-c0b675692ebba855c3312ee873cf5e47/shell.out new file mode 100644 index 000000000..d8463487c --- /dev/null +++ b/aiida_fleur/tests/workflows/calc_data_dir/mock-fleur-c0b675692ebba855c3312ee873cf5e47/shell.out @@ -0,0 +1,63 @@ + Welcome to FLEUR (www.flapw.de) + MaX-Release 4.0 (www.max-centre.eu) + stars are always ordered + -------------------------------------------------------- + Number of OMP-threads: 6 + -------------------------------------------------------- + Iteration: 1 Distance: 8.14211820818847 + Test for time of next iteration: + Time provided (min): 5 + Time used (min): 1 + Time per iter (min): 1 + Iteration: 2 Distance: 7.69204733499301 + Test for time of next iteration: + Time provided (min): 5 + Time used (min): 1 + Time per iter (min): 1 + Iteration: 3 Distance: 0.856944507775782 + Test for time of next iteration: + Time provided (min): 5 + Time used (min): 1 + Time per iter (min): 1 + Iteration: 4 Distance: 0.501438298327703 + Test for time of next iteration: + Time provided (min): 5 + Time used (min): 1 + Time per iter (min): 1 + Iteration: 5 Distance: 0.205605182841977 + Test for time of next iteration: + Time provided (min): 5 + Time used (min): 1 + Time per iter (min): 1 + Iteration: 6 Distance: 1.852288792218942E-002 + Test for time of next iteration: + Time provided (min): 5 + Time used (min): 1 + Time per iter (min): 1 + Iteration: 7 Distance: 1.291466956352475E-002 + Test for time of next iteration: + Time provided (min): 5 + Time used (min): 1 + Time per iter (min): 1 + Iteration: 8 Distance: 1.303177336752010E-003 + Test for time of next iteration: + Time provided (min): 5 + Time used (min): 1 + Time per iter (min): 1 + Iteration: 9 Distance: 1.207654054929908E-003 + Test for time of next iteration: + Time provided (min): 5 + Time used (min): 1 + Time per iter (min): 1 + Iteration: 10 Distance: 1.741120559732238E-004 + Test for time of next iteration: + Time provided (min): 5 + Time used (min): 1 + Time per iter (min): 1 + Iteration: 11 Distance: 3.295363004932020E-005 + Test for time of next iteration: + Time provided (min): 5 + Time used (min): 1 + Time per iter (min): 1 + Iteration: 12 Distance: 9.899258251670823E-006 + Usage data send using curl: usage.json diff --git a/aiida_fleur/tests/workflows/calc_data_dir/mock-inpgen-4476cada582e637fef7432a68c19d42a/_scheduler-stderr.txt b/aiida_fleur/tests/workflows/calc_data_dir/mock-inpgen-4476cada582e637fef7432a68c19d42a/_scheduler-stderr.txt new file mode 100644 index 000000000..e69de29bb diff --git a/aiida_fleur/tests/workflows/calc_data_dir/mock-inpgen-4476cada582e637fef7432a68c19d42a/_scheduler-stdout.txt b/aiida_fleur/tests/workflows/calc_data_dir/mock-inpgen-4476cada582e637fef7432a68c19d42a/_scheduler-stdout.txt new file mode 100644 index 000000000..e69de29bb diff --git a/aiida_fleur/tests/workflows/calc_data_dir/mock-inpgen-4476cada582e637fef7432a68c19d42a/aiida.in b/aiida_fleur/tests/workflows/calc_data_dir/mock-inpgen-4476cada582e637fef7432a68c19d42a/aiida.in new file mode 100644 index 000000000..53301dfae --- /dev/null +++ b/aiida_fleur/tests/workflows/calc_data_dir/mock-inpgen-4476cada582e637fef7432a68c19d42a/aiida.in @@ -0,0 +1,17 @@ +A Fleur input generator calculation with aiida +&input cartesian=F / + 0.0000000000 5.1673552979 5.1673552979 + 5.1673552979 0.0000000000 5.1673552979 + 5.1673552979 5.1673552979 0.0000000000 + 1.0000000000 + 1.0000000000 1.0000000000 1.0000000000 + + 2 + 14 0.1250000000 0.1250000000 0.1250000000 + 14 -0.1250000000 -0.1250000000 -0.1250000000 +&atom + element="Si" jri=981 lmax=12 lnonsph=6 rmt=2.1 / +&comp + kmax=3.2 / +&kpt + div1=10 div2=10 div3=10 tkb=0.0005 / diff --git a/aiida_fleur/tests/workflows/calc_data_dir/mock-inpgen-4476cada582e637fef7432a68c19d42a/inp.xml b/aiida_fleur/tests/workflows/calc_data_dir/mock-inpgen-4476cada582e637fef7432a68c19d42a/inp.xml new file mode 100644 index 000000000..5e48f776a --- /dev/null +++ b/aiida_fleur/tests/workflows/calc_data_dir/mock-inpgen-4476cada582e637fef7432a68c19d42a/inp.xml @@ -0,0 +1,418 @@ + + + + A Fleur input generator calculation with aiida + + + + + + + + + + .0000000000 .0000000000 .0000000000 + + + + + + + 0.450000 0.450000 0.450000 + 0.350000 0.450000 0.450000 + 0.250000 0.450000 0.450000 + 0.150000 0.450000 0.450000 + 0.050000 0.450000 0.450000 + 0.050000 0.500000 0.500000 + 0.150000 0.550000 0.550000 + 0.250000 0.550000 0.550000 + 0.350000 0.550000 0.550000 + 0.450000 0.450000 0.550000 + 0.350000 0.350000 0.450000 + 0.250000 0.350000 0.450000 + 0.150000 0.350000 0.450000 + 0.100000 0.400000 0.450000 + 0.100000 0.450000 0.500000 + 0.150000 0.500000 0.600000 + 0.250000 0.550000 0.650000 + 0.350000 0.450000 0.650000 + 0.350000 0.450000 0.550000 + 0.250000 0.250000 0.450000 + 0.200000 0.300000 0.450000 + 0.200000 0.400000 0.450000 + 0.200000 0.450000 0.500000 + 0.200000 0.450000 0.600000 + 0.250000 0.500000 0.700000 + 0.250000 0.450000 0.650000 + 0.250000 0.450000 0.550000 + 0.300000 0.300000 0.450000 + 0.300000 0.400000 0.450000 + 0.300000 0.450000 0.500000 + 0.300000 0.450000 0.600000 + 0.300000 0.450000 0.700000 + 0.200000 0.500000 0.650000 + 0.150000 0.450000 0.550000 + 0.400000 0.400000 0.450000 + 0.400000 0.450000 0.500000 + 0.400000 0.450000 0.600000 + 0.300000 0.550000 0.600000 + 0.200000 0.550000 0.600000 + 0.100000 0.500000 0.550000 + 0.450000 0.500000 0.500000 + 0.400000 0.500000 0.550000 + 0.300000 0.500000 0.550000 + 0.200000 0.500000 0.550000 + 0.400000 0.400000 0.550000 + 0.300000 0.400000 0.550000 + 0.200000 0.400000 0.550000 + 0.300000 0.300000 0.550000 + 0.250000 0.350000 0.550000 + 0.350000 0.350000 0.550000 + 0.350000 0.350000 0.350000 + 0.250000 0.350000 0.350000 + 0.150000 0.350000 0.350000 + 0.050000 0.350000 0.350000 + 0.050000 0.400000 0.400000 + 0.150000 0.500000 0.500000 + 0.250000 0.600000 0.600000 + 0.350000 0.350000 0.650000 + 0.250000 0.250000 0.350000 + 0.150000 0.250000 0.350000 + 0.100000 0.300000 0.350000 + 0.100000 0.350000 0.400000 + 0.150000 0.400000 0.500000 + 0.250000 0.500000 0.600000 + 0.300000 0.400000 0.650000 + 0.200000 0.200000 0.350000 + 0.200000 0.300000 0.350000 + 0.200000 0.350000 0.400000 + 0.200000 0.350000 0.500000 + 0.250000 0.400000 0.600000 + 0.300000 0.500000 0.650000 + 0.300000 0.300000 0.350000 + 0.300000 0.350000 0.400000 + 0.300000 0.350000 0.500000 + 0.300000 0.350000 0.600000 + 0.350000 0.400000 0.700000 + 0.350000 0.400000 0.400000 + 0.350000 0.400000 0.500000 + 0.350000 0.400000 0.600000 + 0.350000 0.500000 0.500000 + 0.350000 0.500000 0.600000 + 0.400000 0.400000 0.650000 + 0.250000 0.250000 0.250000 + 0.150000 0.250000 0.250000 + 0.050000 0.250000 0.250000 + 0.050000 0.300000 0.300000 + 0.150000 0.400000 0.400000 + 0.250000 0.500000 0.500000 + 0.150000 0.150000 0.250000 + 0.100000 0.200000 0.250000 + 0.100000 0.250000 0.300000 + 0.150000 0.300000 0.400000 + 0.250000 0.400000 0.500000 + 0.200000 0.200000 0.250000 + 0.200000 0.250000 0.300000 + 0.200000 0.250000 0.400000 + 0.250000 0.300000 0.500000 + 0.250000 0.300000 0.300000 + 0.250000 0.300000 0.400000 + 0.250000 0.400000 0.400000 + 0.150000 0.150000 0.150000 + 0.050000 0.150000 0.150000 + 0.050000 0.200000 0.200000 + 0.150000 0.300000 0.300000 + 0.100000 0.100000 0.150000 + 0.100000 0.150000 0.200000 + 0.150000 0.200000 0.300000 + 0.150000 0.200000 0.200000 + 0.050000 0.050000 0.050000 + 0.050000 0.100000 0.100000 + + + + + + + + + + + 1 0 0 .0000000000 + 0 1 0 .0000000000 + 0 0 1 .0000000000 + + + 0 1 0 .0000000000 + 1 0 0 .0000000000 + 0 0 1 .0000000000 + + + -1 0 0 .0000000000 + 0 -1 0 .0000000000 + 1 1 1 .5000000000 + + + 0 -1 0 .0000000000 + -1 0 0 .0000000000 + 1 1 1 .5000000000 + + + 0 1 0 .0000000000 + 1 0 0 .0000000000 + -1 -1 -1 .5000000000 + + + 1 0 0 .0000000000 + 0 1 0 .0000000000 + -1 -1 -1 .5000000000 + + + -1 0 0 .0000000000 + 0 -1 0 .0000000000 + 0 0 -1 .0000000000 + + + 0 -1 0 .0000000000 + -1 0 0 .0000000000 + 0 0 -1 .0000000000 + + + 0 0 1 .0000000000 + 1 0 0 .0000000000 + -1 -1 -1 .5000000000 + + + 0 0 1 .0000000000 + 0 1 0 .0000000000 + -1 -1 -1 .5000000000 + + + 1 1 1 .5000000000 + 0 -1 0 .0000000000 + 0 0 -1 .0000000000 + + + 1 1 1 .5000000000 + -1 0 0 .0000000000 + 0 0 -1 .0000000000 + + + -1 0 0 .0000000000 + 1 1 1 .5000000000 + 0 0 -1 .0000000000 + + + 1 0 0 .0000000000 + 0 0 1 .0000000000 + -1 -1 -1 .5000000000 + + + 0 1 0 .0000000000 + 0 0 1 .0000000000 + -1 -1 -1 .5000000000 + + + 0 -1 0 .0000000000 + 1 1 1 .5000000000 + 0 0 -1 .0000000000 + + + -1 0 0 .0000000000 + 0 0 -1 .0000000000 + 0 -1 0 .0000000000 + + + 0 1 0 .0000000000 + -1 -1 -1 .5000000000 + 1 0 0 .0000000000 + + + 0 -1 0 .0000000000 + 0 0 -1 .0000000000 + -1 0 0 .0000000000 + + + 1 0 0 .0000000000 + -1 -1 -1 .5000000000 + 0 1 0 .0000000000 + + + 1 1 1 .5000000000 + 0 0 -1 .0000000000 + 0 -1 0 .0000000000 + + + 0 0 1 .0000000000 + -1 -1 -1 .5000000000 + 1 0 0 .0000000000 + + + 1 1 1 .5000000000 + 0 0 -1 .0000000000 + -1 0 0 .0000000000 + + + 0 0 1 .0000000000 + -1 -1 -1 .5000000000 + 0 1 0 .0000000000 + + + 0 0 -1 .0000000000 + -1 0 0 .0000000000 + 0 -1 0 .0000000000 + + + 0 0 -1 .0000000000 + 0 -1 0 .0000000000 + -1 0 0 .0000000000 + + + -1 -1 -1 .5000000000 + 0 1 0 .0000000000 + 1 0 0 .0000000000 + + + -1 -1 -1 .5000000000 + 1 0 0 .0000000000 + 0 1 0 .0000000000 + + + 0 0 1 .0000000000 + 0 1 0 .0000000000 + 1 0 0 .0000000000 + + + 1 1 1 .5000000000 + -1 0 0 .0000000000 + 0 -1 0 .0000000000 + + + 1 1 1 .5000000000 + 0 -1 0 .0000000000 + -1 0 0 .0000000000 + + + 0 0 1 .0000000000 + 1 0 0 .0000000000 + 0 1 0 .0000000000 + + + 0 0 -1 .0000000000 + 1 1 1 .5000000000 + -1 0 0 .0000000000 + + + 0 0 -1 .0000000000 + 1 1 1 .5000000000 + 0 -1 0 .0000000000 + + + -1 -1 -1 .5000000000 + 0 0 1 .0000000000 + 1 0 0 .0000000000 + + + -1 -1 -1 .5000000000 + 0 0 1 .0000000000 + 0 1 0 .0000000000 + + + -1 0 0 .0000000000 + 1 1 1 .5000000000 + 0 -1 0 .0000000000 + + + 0 1 0 .0000000000 + 0 0 1 .0000000000 + 1 0 0 .0000000000 + + + 0 -1 0 .0000000000 + 1 1 1 .5000000000 + -1 0 0 .0000000000 + + + 1 0 0 .0000000000 + 0 0 1 .0000000000 + 0 1 0 .0000000000 + + + 1 0 0 .0000000000 + -1 -1 -1 .5000000000 + 0 0 1 .0000000000 + + + 0 1 0 .0000000000 + -1 -1 -1 .5000000000 + 0 0 1 .0000000000 + + + 0 -1 0 .0000000000 + 0 0 -1 .0000000000 + 1 1 1 .5000000000 + + + -1 0 0 .0000000000 + 0 0 -1 .0000000000 + 1 1 1 .5000000000 + + + -1 -1 -1 .5000000000 + 1 0 0 .0000000000 + 0 0 1 .0000000000 + + + -1 -1 -1 .5000000000 + 0 1 0 .0000000000 + 0 0 1 .0000000000 + + + 0 0 -1 .0000000000 + 0 -1 0 .0000000000 + 1 1 1 .5000000000 + + + 0 0 -1 .0000000000 + -1 0 0 .0000000000 + 1 1 1 .5000000000 + + + + + .000000000000000 5.167355297900000 5.167355297900000 + 5.167355297900000 .000000000000000 5.167355297900000 + 5.167355297900000 5.167355297900000 .000000000000000 + + + + + + + + + + + + + + + 1.000/8.000 1.000/8.000 1.000/8.000 + -1.000/8.000 -1.000/8.000 -1.000/8.000 + + + + + + + + + + + + + + + + + diff --git a/aiida_fleur/tests/workflows/calc_data_dir/mock-inpgen-4476cada582e637fef7432a68c19d42a/out b/aiida_fleur/tests/workflows/calc_data_dir/mock-inpgen-4476cada582e637fef7432a68c19d42a/out new file mode 100644 index 000000000..33647251c --- /dev/null +++ b/aiida_fleur/tests/workflows/calc_data_dir/mock-inpgen-4476cada582e637fef7432a68c19d42a/out @@ -0,0 +1,683 @@ +line: 1>A Fleur input generator calculation with aiida +line: 2>&input cartesian=F / +line: 3>0.0000000000 5.1673552979 5.1673552979 +line: 4>5.1673552979 0.0000000000 5.1673552979 +line: 5>5.1673552979 5.1673552979 0.0000000000 +line: 6>1.0000000000 +line: 7>1.0000000000 1.0000000000 1.0000000000 +line: 8> +line: 9>2 +line: 10>14 0.1250000000 0.1250000000 0.1250000000 +line: 11>14 -0.1250000000 -0.1250000000 -0.1250000000 +line: 12>&atom +line: 13>element="Si" jri=981 lmax=12 lnonsph=6 rmt=2.1 / + + A Fleur input generator calculation with aiida + + film= F cartesian= F + checkinp= F symor= F + +a1 = 0.00000 5.16736 5.16736 +a2 = 5.16736 0.00000 5.16736 +a3 = 5.16736 5.16736 0.00000 + +dvac= 0.00000 aa = 1.00000 +scale = 1.00000 1.00000 1.00000 + +natin= 2 Z = 14 14 + positions: + 0.12500 0.12500 0.12500 + -0.12500 -0.12500 -0.12500 + + generators: 0 (excluding identity) + + + Lattice information: + -------------------- + + overall lattice constant a0 = 1.000000 bohr + + real-space primitive lattice vectors in units of a_{x,y,z} + a_1: 0.000000 5.167355 5.167355 + a_2: 5.167355 0.000000 5.167355 + a_3: 5.167355 5.167355 0.000000 + + lattice constants a_x, a_y, a_z = 1.000000 1.000000 1.000000 + volume of unit cell (a.u.^3) = 275.952903 + +dbg: lattice matrices + 275.952903063054 +dbg: as : + 0.000000 5.167355 5.167355 + 5.167355 0.000000 5.167355 + 5.167355 5.167355 0.000000 +dbg: bs : + -0.096761 0.096761 0.096761 + 0.096761 -0.096761 0.096761 + 0.096761 0.096761 -0.096761 +dbg: amat : + 0.000000 5.167355 5.167355 + 5.167355 0.000000 5.167355 + 5.167355 5.167355 0.000000 +dbg: bmat : + -0.303985 0.303985 0.303985 + 0.303985 -0.303985 0.303985 + 0.303985 0.303985 -0.303985 +dbg: amatinv : + -0.096761 0.096761 0.096761 + 0.096761 -0.096761 0.096761 + 0.096761 0.096761 -0.096761 +dbg: aamat : + 53.403122 26.701561 26.701561 + 26.701561 53.403122 26.701561 + 26.701561 26.701561 53.403122 +dbg: bbmat : + 0.277220 -0.092407 -0.092407 + -0.092407 0.277220 -0.092407 + -0.092407 -0.092407 0.277220 + +dbg: lattice vectors : +vector 1 : 0.00000 5.16736 5.16736 length : 7.30774 +vector 2 : 5.16736 0.00000 5.16736 length : 7.30774 +vector 3 : 5.16736 5.16736 0.00000 length : 7.30774 +angle between vectors (1,2) = 60.00000 +angle between vectors (1,3) = 60.00000 +angle between vectors (2,3) = 60.00000 + +dbg: reciprocal lattice vectors : +vector 1 : -0.30398 0.30398 0.30398 length : 0.52652 +vector 2 : 0.30398 -0.30398 0.30398 length : 0.52652 +vector 3 : 0.30398 0.30398 -0.30398 length : 0.52652 +angle between vectors (1,2) =109.47122 +angle between vectors (1,3) =109.47122 +angle between vectors (2,3) =109.47122 + + + Point group of the Bravais lattice has 48 operations + + DBG: symor,zorth,oldfleur : F F F + DBG: optype : 1 -2 2 -2 2 -2 -1 2 -4 3 2 -3 2 3 -4 -3 2 -4 -3 3 -2 2 4 -4 -3 2 3 -4 -2 4 -3 3 -2 4 -4 2 -3 3 4 -2 -2 3 4 -3 3 -2 -3 4 + DBG: invsym,invs,zrfs,invs2 : T T F F + DBG: (before reorder) invsop,zrfsop,invs2op : 7 0 0 + + Space group information: + ------------------------ + 48 operations + space group is nonsymmorphic + has inversion symmetry + + + Operations: (in International notation) + --------------------------------------- + lattice coordinates (scaled) Cartesian coordinates + + operation 1: 1 (inverse = 1) + ( 1 0 0 ) ( 0.000 ) ( 1.00000 0.00000 -0.00000 ) ( 0.000 ) + ( 0 1 0 ) ( 0.000 ) ( 0.00000 1.00000 -0.00000 ) ( 0.000 ) + ( 0 0 1 ) ( 0.000 ) ( 0.00000 -0.00000 1.00000 ) ( 0.000 ) + _ + operation 2: 2 (inverse = 2) + ( 0 1 0 ) ( 0.000 ) ( 0.00000 1.00000 -0.00000 ) ( 0.000 ) + ( 1 0 0 ) ( 0.000 ) ( 1.00000 0.00000 -0.00000 ) ( 0.000 ) + ( 0 0 1 ) ( 0.000 ) ( -0.00000 0.00000 1.00000 ) ( 0.000 ) + + operation 3: 2 (inverse = 3) + ( -1 0 0 ) ( 0.000 ) ( 0.00000 1.00000 0.00000 ) ( 2.584 ) + ( 0 -1 0 ) ( 0.000 ) ( 1.00000 0.00000 0.00000 ) ( 2.584 ) + ( 1 1 1 ) ( 0.500 ) ( -0.00000 0.00000 -1.00000 ) ( 0.000 ) + _ + operation 4: 2 (inverse = 4) + ( 0 -1 0 ) ( 0.000 ) ( 1.00000 0.00000 0.00000 ) ( 2.584 ) + ( -1 0 0 ) ( 0.000 ) ( 0.00000 1.00000 0.00000 ) ( 2.584 ) + ( 1 1 1 ) ( 0.500 ) ( 0.00000 -0.00000 -1.00000 ) ( 0.000 ) + + operation 5: 2 (inverse = 5) + ( 0 1 0 ) ( 0.000 ) ( -1.00000 -0.00000 -0.00000 ) ( 2.584 ) + ( 1 0 0 ) ( 0.000 ) ( -0.00000 -1.00000 -0.00000 ) ( 2.584 ) + ( -1 -1 -1 ) ( 0.500 ) ( -0.00000 0.00000 1.00000 ) ( 0.000 ) + _ + operation 6: 2 (inverse = 6) + ( 1 0 0 ) ( 0.000 ) ( -0.00000 -1.00000 -0.00000 ) ( 2.584 ) + ( 0 1 0 ) ( 0.000 ) ( -1.00000 -0.00000 -0.00000 ) ( 2.584 ) + ( -1 -1 -1 ) ( 0.500 ) ( 0.00000 -0.00000 1.00000 ) ( 0.000 ) + _ + operation 7: 1 (inverse = 7) + ( -1 0 0 ) ( 0.000 ) ( -1.00000 -0.00000 0.00000 ) ( 0.000 ) + ( 0 -1 0 ) ( 0.000 ) ( -0.00000 -1.00000 0.00000 ) ( 0.000 ) + ( 0 0 -1 ) ( 0.000 ) ( -0.00000 0.00000 -1.00000 ) ( 0.000 ) + + operation 8: 2 (inverse = 8) + ( 0 -1 0 ) ( 0.000 ) ( -0.00000 -1.00000 0.00000 ) ( 0.000 ) + ( -1 0 0 ) ( 0.000 ) ( -1.00000 -0.00000 0.00000 ) ( 0.000 ) + ( 0 0 -1 ) ( 0.000 ) ( 0.00000 -0.00000 -1.00000 ) ( 0.000 ) + _ + operation 9: 4 (inverse = 18) + ( 0 0 1 ) ( 0.000 ) ( -1.00000 -0.00000 -0.00000 ) ( 2.584 ) + ( 1 0 0 ) ( 0.000 ) ( -0.00000 -0.00000 -1.00000 ) ( 2.584 ) + ( -1 -1 -1 ) ( 0.500 ) ( -0.00000 1.00000 0.00000 ) ( 0.000 ) + + operation 10: 3 (inverse = 27) + ( 0 0 1 ) ( 0.000 ) ( -0.00000 -1.00000 -0.00000 ) ( 2.584 ) + ( 0 1 0 ) ( 0.000 ) ( -0.00000 -0.00000 -1.00000 ) ( 2.584 ) + ( -1 -1 -1 ) ( 0.500 ) ( 1.00000 -0.00000 0.00000 ) ( 0.000 ) + + operation 11: 2 (inverse = 11) + ( 1 1 1 ) ( 0.500 ) ( -1.00000 -0.00000 0.00000 ) ( 0.000 ) + ( 0 -1 0 ) ( 0.000 ) ( -0.00000 -0.00000 1.00000 ) ( 2.584 ) + ( 0 0 -1 ) ( 0.000 ) ( -0.00000 1.00000 -0.00000 ) ( 2.584 ) + _ + operation 12: 3 (inverse = 16) + ( 1 1 1 ) ( 0.500 ) ( -0.00000 -1.00000 0.00000 ) ( 0.000 ) + ( -1 0 0 ) ( 0.000 ) ( -0.00000 -0.00000 1.00000 ) ( 2.584 ) + ( 0 0 -1 ) ( 0.000 ) ( 1.00000 -0.00000 -0.00000 ) ( 2.584 ) + + operation 13: 2 (inverse = 13) + ( -1 0 0 ) ( 0.000 ) ( -0.00000 -0.00000 1.00000 ) ( 2.584 ) + ( 1 1 1 ) ( 0.500 ) ( -0.00000 -1.00000 0.00000 ) ( 0.000 ) + ( 0 0 -1 ) ( 0.000 ) ( 1.00000 0.00000 0.00000 ) ( 2.584 ) + + operation 14: 3 (inverse = 20) + ( 1 0 0 ) ( 0.000 ) ( -0.00000 -0.00000 -1.00000 ) ( 2.584 ) + ( 0 0 1 ) ( 0.000 ) ( -1.00000 -0.00000 -0.00000 ) ( 2.584 ) + ( -1 -1 -1 ) ( 0.500 ) ( 0.00000 1.00000 -0.00000 ) ( 0.000 ) + _ + operation 15: 4 (inverse = 28) + ( 0 1 0 ) ( 0.000 ) ( -0.00000 -0.00000 -1.00000 ) ( 2.584 ) + ( 0 0 1 ) ( 0.000 ) ( -0.00000 -1.00000 -0.00000 ) ( 2.584 ) + ( -1 -1 -1 ) ( 0.500 ) ( 1.00000 0.00000 -0.00000 ) ( 0.000 ) + _ + operation 16: 3 (inverse = 12) + ( 0 -1 0 ) ( 0.000 ) ( -0.00000 -0.00000 1.00000 ) ( 2.584 ) + ( 1 1 1 ) ( 0.500 ) ( -1.00000 -0.00000 0.00000 ) ( 0.000 ) + ( 0 0 -1 ) ( 0.000 ) ( 0.00000 1.00000 0.00000 ) ( 2.584 ) + + operation 17: 2 (inverse = 17) + ( -1 0 0 ) ( 0.000 ) ( -1.00000 0.00000 -0.00000 ) ( 0.000 ) + ( 0 0 -1 ) ( 0.000 ) ( -0.00000 0.00000 -1.00000 ) ( 0.000 ) + ( 0 -1 0 ) ( 0.000 ) ( -0.00000 -1.00000 0.00000 ) ( 0.000 ) + _ + operation 18: 4 (inverse = 9) + ( 0 1 0 ) ( 0.000 ) ( -1.00000 0.00000 0.00000 ) ( 2.584 ) + ( -1 -1 -1 ) ( 0.500 ) ( -0.00000 0.00000 1.00000 ) ( 0.000 ) + ( 1 0 0 ) ( 0.000 ) ( -0.00000 -1.00000 -0.00000 ) ( 2.584 ) + _ + operation 19: 3 (inverse = 25) + ( 0 -1 0 ) ( 0.000 ) ( 0.00000 -1.00000 -0.00000 ) ( 0.000 ) + ( 0 0 -1 ) ( 0.000 ) ( 0.00000 -0.00000 -1.00000 ) ( 0.000 ) + ( -1 0 0 ) ( 0.000 ) ( -1.00000 -0.00000 0.00000 ) ( 0.000 ) + + operation 20: 3 (inverse = 14) + ( 1 0 0 ) ( 0.000 ) ( 0.00000 -1.00000 0.00000 ) ( 2.584 ) + ( -1 -1 -1 ) ( 0.500 ) ( 0.00000 -0.00000 1.00000 ) ( 0.000 ) + ( 0 1 0 ) ( 0.000 ) ( -1.00000 -0.00000 -0.00000 ) ( 2.584 ) + _ + operation 21: 2 (inverse = 21) + ( 1 1 1 ) ( 0.500 ) ( -1.00000 0.00000 -0.00000 ) ( 0.000 ) + ( 0 0 -1 ) ( 0.000 ) ( -0.00000 1.00000 -0.00000 ) ( 2.584 ) + ( 0 -1 0 ) ( 0.000 ) ( -0.00000 -0.00000 1.00000 ) ( 2.584 ) + + operation 22: 2 (inverse = 22) + ( 0 0 1 ) ( 0.000 ) ( -1.00000 0.00000 0.00000 ) ( 2.584 ) + ( -1 -1 -1 ) ( 0.500 ) ( -0.00000 1.00000 0.00000 ) ( 0.000 ) + ( 1 0 0 ) ( 0.000 ) ( -0.00000 -0.00000 -1.00000 ) ( 2.584 ) + + operation 23: 4 (inverse = 34) + ( 1 1 1 ) ( 0.500 ) ( 0.00000 -1.00000 -0.00000 ) ( 0.000 ) + ( 0 0 -1 ) ( 0.000 ) ( 1.00000 -0.00000 -0.00000 ) ( 2.584 ) + ( -1 0 0 ) ( 0.000 ) ( -0.00000 -0.00000 1.00000 ) ( 2.584 ) + _ + operation 24: 4 (inverse = 35) + ( 0 0 1 ) ( 0.000 ) ( 0.00000 -1.00000 0.00000 ) ( 2.584 ) + ( -1 -1 -1 ) ( 0.500 ) ( 1.00000 -0.00000 0.00000 ) ( 0.000 ) + ( 0 1 0 ) ( 0.000 ) ( -0.00000 -0.00000 -1.00000 ) ( 2.584 ) + _ + operation 25: 3 (inverse = 19) + ( 0 0 -1 ) ( 0.000 ) ( -0.00000 0.00000 -1.00000 ) ( 0.000 ) + ( -1 0 0 ) ( 0.000 ) ( -1.00000 0.00000 -0.00000 ) ( 0.000 ) + ( 0 -1 0 ) ( 0.000 ) ( 0.00000 -1.00000 -0.00000 ) ( 0.000 ) + + operation 26: 2 (inverse = 26) + ( 0 0 -1 ) ( 0.000 ) ( 0.00000 -0.00000 -1.00000 ) ( 0.000 ) + ( 0 -1 0 ) ( 0.000 ) ( 0.00000 -1.00000 -0.00000 ) ( 0.000 ) + ( -1 0 0 ) ( 0.000 ) ( -1.00000 0.00000 -0.00000 ) ( 0.000 ) + + operation 27: 3 (inverse = 10) + ( -1 -1 -1 ) ( 0.500 ) ( -0.00000 0.00000 1.00000 ) ( 0.000 ) + ( 0 1 0 ) ( 0.000 ) ( -1.00000 0.00000 0.00000 ) ( 2.584 ) + ( 1 0 0 ) ( 0.000 ) ( 0.00000 -1.00000 0.00000 ) ( 2.584 ) + _ + operation 28: 4 (inverse = 15) + ( -1 -1 -1 ) ( 0.500 ) ( 0.00000 -0.00000 1.00000 ) ( 0.000 ) + ( 1 0 0 ) ( 0.000 ) ( 0.00000 -1.00000 0.00000 ) ( 2.584 ) + ( 0 1 0 ) ( 0.000 ) ( -1.00000 0.00000 0.00000 ) ( 2.584 ) + _ + operation 29: 2 (inverse = 29) + ( 0 0 1 ) ( 0.000 ) ( -0.00000 0.00000 1.00000 ) ( 0.000 ) + ( 0 1 0 ) ( 0.000 ) ( -0.00000 1.00000 0.00000 ) ( 0.000 ) + ( 1 0 0 ) ( 0.000 ) ( 1.00000 -0.00000 0.00000 ) ( 0.000 ) + + operation 30: 4 (inverse = 43) + ( 1 1 1 ) ( 0.500 ) ( -0.00000 0.00000 -1.00000 ) ( 0.000 ) + ( -1 0 0 ) ( 0.000 ) ( -0.00000 1.00000 -0.00000 ) ( 2.584 ) + ( 0 -1 0 ) ( 0.000 ) ( 1.00000 -0.00000 -0.00000 ) ( 2.584 ) + _ + operation 31: 3 (inverse = 47) + ( 1 1 1 ) ( 0.500 ) ( 0.00000 -0.00000 -1.00000 ) ( 0.000 ) + ( 0 -1 0 ) ( 0.000 ) ( 1.00000 -0.00000 -0.00000 ) ( 2.584 ) + ( -1 0 0 ) ( 0.000 ) ( -0.00000 1.00000 -0.00000 ) ( 2.584 ) + + operation 32: 3 (inverse = 38) + ( 0 0 1 ) ( 0.000 ) ( 0.00000 -0.00000 1.00000 ) ( 0.000 ) + ( 1 0 0 ) ( 0.000 ) ( 1.00000 -0.00000 0.00000 ) ( 0.000 ) + ( 0 1 0 ) ( 0.000 ) ( -0.00000 1.00000 0.00000 ) ( 0.000 ) + _ + operation 33: 2 (inverse = 33) + ( 0 0 -1 ) ( 0.000 ) ( 1.00000 -0.00000 -0.00000 ) ( 2.584 ) + ( 1 1 1 ) ( 0.500 ) ( 0.00000 -1.00000 -0.00000 ) ( 0.000 ) + ( -1 0 0 ) ( 0.000 ) ( 0.00000 0.00000 1.00000 ) ( 2.584 ) + + operation 34: 4 (inverse = 23) + ( 0 0 -1 ) ( 0.000 ) ( -0.00000 1.00000 -0.00000 ) ( 2.584 ) + ( 1 1 1 ) ( 0.500 ) ( -1.00000 0.00000 -0.00000 ) ( 0.000 ) + ( 0 -1 0 ) ( 0.000 ) ( 0.00000 0.00000 1.00000 ) ( 2.584 ) + _ + operation 35: 4 (inverse = 24) + ( -1 -1 -1 ) ( 0.500 ) ( -0.00000 1.00000 0.00000 ) ( 0.000 ) + ( 0 0 1 ) ( 0.000 ) ( -1.00000 0.00000 0.00000 ) ( 2.584 ) + ( 1 0 0 ) ( 0.000 ) ( 0.00000 0.00000 -1.00000 ) ( 2.584 ) + + operation 36: 2 (inverse = 36) + ( -1 -1 -1 ) ( 0.500 ) ( 1.00000 -0.00000 0.00000 ) ( 0.000 ) + ( 0 0 1 ) ( 0.000 ) ( 0.00000 -1.00000 0.00000 ) ( 2.584 ) + ( 0 1 0 ) ( 0.000 ) ( 0.00000 0.00000 -1.00000 ) ( 2.584 ) + _ + operation 37: 3 (inverse = 44) + ( -1 0 0 ) ( 0.000 ) ( -0.00000 1.00000 -0.00000 ) ( 2.584 ) + ( 1 1 1 ) ( 0.500 ) ( -0.00000 0.00000 -1.00000 ) ( 0.000 ) + ( 0 -1 0 ) ( 0.000 ) ( 1.00000 0.00000 0.00000 ) ( 2.584 ) + + operation 38: 3 (inverse = 32) + ( 0 1 0 ) ( 0.000 ) ( -0.00000 1.00000 0.00000 ) ( 0.000 ) + ( 0 0 1 ) ( 0.000 ) ( -0.00000 0.00000 1.00000 ) ( 0.000 ) + ( 1 0 0 ) ( 0.000 ) ( 1.00000 0.00000 -0.00000 ) ( 0.000 ) + + operation 39: 4 (inverse = 48) + ( 0 -1 0 ) ( 0.000 ) ( 1.00000 -0.00000 -0.00000 ) ( 2.584 ) + ( 1 1 1 ) ( 0.500 ) ( 0.00000 -0.00000 -1.00000 ) ( 0.000 ) + ( -1 0 0 ) ( 0.000 ) ( 0.00000 1.00000 0.00000 ) ( 2.584 ) + _ + operation 40: 2 (inverse = 40) + ( 1 0 0 ) ( 0.000 ) ( 1.00000 -0.00000 0.00000 ) ( 0.000 ) + ( 0 0 1 ) ( 0.000 ) ( 0.00000 -0.00000 1.00000 ) ( 0.000 ) + ( 0 1 0 ) ( 0.000 ) ( 0.00000 1.00000 -0.00000 ) ( 0.000 ) + _ + operation 41: 2 (inverse = 41) + ( 1 0 0 ) ( 0.000 ) ( 0.00000 0.00000 -1.00000 ) ( 2.584 ) + ( -1 -1 -1 ) ( 0.500 ) ( 0.00000 1.00000 -0.00000 ) ( 0.000 ) + ( 0 0 1 ) ( 0.000 ) ( -1.00000 -0.00000 -0.00000 ) ( 2.584 ) + + operation 42: 3 (inverse = 45) + ( 0 1 0 ) ( 0.000 ) ( 0.00000 0.00000 -1.00000 ) ( 2.584 ) + ( -1 -1 -1 ) ( 0.500 ) ( 1.00000 0.00000 -0.00000 ) ( 0.000 ) + ( 0 0 1 ) ( 0.000 ) ( -0.00000 -1.00000 -0.00000 ) ( 2.584 ) + + operation 43: 4 (inverse = 30) + ( 0 -1 0 ) ( 0.000 ) ( 0.00000 0.00000 1.00000 ) ( 2.584 ) + ( 0 0 -1 ) ( 0.000 ) ( 0.00000 1.00000 0.00000 ) ( 2.584 ) + ( 1 1 1 ) ( 0.500 ) ( -1.00000 -0.00000 0.00000 ) ( 0.000 ) + _ + operation 44: 3 (inverse = 37) + ( -1 0 0 ) ( 0.000 ) ( 0.00000 0.00000 1.00000 ) ( 2.584 ) + ( 0 0 -1 ) ( 0.000 ) ( 1.00000 0.00000 0.00000 ) ( 2.584 ) + ( 1 1 1 ) ( 0.500 ) ( -0.00000 -1.00000 0.00000 ) ( 0.000 ) + + operation 45: 3 (inverse = 42) + ( -1 -1 -1 ) ( 0.500 ) ( 0.00000 1.00000 -0.00000 ) ( 0.000 ) + ( 1 0 0 ) ( 0.000 ) ( 0.00000 0.00000 -1.00000 ) ( 2.584 ) + ( 0 0 1 ) ( 0.000 ) ( -1.00000 0.00000 0.00000 ) ( 2.584 ) + _ + operation 46: 2 (inverse = 46) + ( -1 -1 -1 ) ( 0.500 ) ( 1.00000 0.00000 -0.00000 ) ( 0.000 ) + ( 0 1 0 ) ( 0.000 ) ( 0.00000 0.00000 -1.00000 ) ( 2.584 ) + ( 0 0 1 ) ( 0.000 ) ( 0.00000 -1.00000 0.00000 ) ( 2.584 ) + _ + operation 47: 3 (inverse = 31) + ( 0 0 -1 ) ( 0.000 ) ( 0.00000 1.00000 0.00000 ) ( 2.584 ) + ( 0 -1 0 ) ( 0.000 ) ( 0.00000 0.00000 1.00000 ) ( 2.584 ) + ( 1 1 1 ) ( 0.500 ) ( -1.00000 0.00000 -0.00000 ) ( 0.000 ) + + operation 48: 4 (inverse = 39) + ( 0 0 -1 ) ( 0.000 ) ( 1.00000 0.00000 0.00000 ) ( 2.584 ) + ( -1 0 0 ) ( 0.000 ) ( 0.00000 0.00000 1.00000 ) ( 2.584 ) + ( 1 1 1 ) ( 0.500 ) ( 0.00000 -1.00000 -0.00000 ) ( 0.000 ) + + Multiplcation table: {R_j|t_j}{R_i|t_i} + operation j= 1 : 1 2 3 4 5 6 7 8 9 10 11 12 + 13 14 15 16 17 18 19 20 21 22 23 24 + 25 26 27 28 29 30 31 32 33 34 35 36 + 37 38 39 40 41 42 43 44 45 46 47 48 + operation j= 2 : 2 1 4 3 6 5 8 7 14 15 16 13 + 12 9 10 11 25 27 26 28 34 35 33 36 + 17 19 18 20 38 37 39 40 23 21 22 24 + 30 29 31 32 45 46 47 48 41 42 43 44 + operation j= 3 : 3 4 1 2 8 7 6 5 25 26 27 28 + 20 17 19 18 14 16 15 13 35 34 36 33 + 9 10 11 12 47 45 46 48 24 22 21 23 + 41 43 42 44 37 39 38 40 30 31 29 32 + operation j= 4 : 4 3 2 1 7 8 5 6 17 19 18 20 + 28 25 26 27 9 11 10 12 22 21 24 23 + 14 15 16 13 43 41 42 44 36 35 34 33 + 45 47 46 48 30 31 29 32 37 39 38 40 + operation j= 5 : 5 6 8 7 1 2 4 3 40 38 39 37 + 30 32 29 31 48 46 47 45 33 36 34 35 + 44 43 42 41 15 13 16 14 21 23 24 22 + 12 10 11 9 28 27 26 25 20 18 19 17 + operation j= 6 : 6 5 7 8 2 1 3 4 32 29 31 30 + 37 40 38 39 44 42 43 41 23 24 21 22 + 48 47 46 45 10 12 11 9 34 33 36 35 + 13 15 16 14 20 18 19 17 28 27 26 25 + operation j= 7 : 7 8 6 5 4 3 1 2 48 47 46 45 + 41 44 43 42 40 39 38 37 36 33 35 34 + 32 29 31 30 26 28 27 25 22 24 23 21 + 20 19 18 17 13 16 15 14 12 11 10 9 + operation j= 8 : 8 7 5 6 3 4 2 1 44 43 42 41 + 45 48 47 46 32 31 29 30 24 23 22 21 + 40 38 39 37 19 20 18 17 35 36 33 34 + 28 26 27 25 12 11 10 9 13 16 15 14 + operation j= 9 : 9 10 12 11 46 45 48 47 36 35 33 34 + 25 28 27 26 4 1 3 2 39 40 37 38 + 43 44 41 42 14 16 13 15 17 19 20 18 + 8 6 7 5 32 29 31 30 24 22 23 21 + operation j=10 : 10 9 11 12 45 46 47 48 28 27 26 25 + 34 36 35 33 43 41 44 42 19 20 17 18 + 4 3 1 2 6 8 7 5 37 39 40 38 + 16 14 13 15 24 22 23 21 32 29 31 30 + operation j=11 : 11 12 10 9 48 47 46 45 4 3 1 2 + 42 43 44 41 36 33 35 34 40 39 38 37 + 28 27 26 25 31 32 29 30 18 20 19 17 + 24 23 22 21 16 13 14 15 8 7 6 5 + operation j=12 : 12 11 9 10 47 48 45 46 43 44 41 42 + 2 4 3 1 28 26 27 25 20 19 18 17 + 36 35 33 34 23 24 22 21 38 40 39 37 + 32 31 29 30 8 7 6 5 16 13 14 15 + operation j=13 : 13 16 14 15 43 44 41 42 47 48 45 46 + 1 3 4 2 20 19 18 17 28 26 27 25 + 24 22 23 21 33 36 35 34 29 32 31 30 + 40 39 38 37 7 8 5 6 11 12 9 10 + operation j=14 : 14 15 13 16 42 41 44 43 24 22 23 21 + 17 20 18 19 3 2 4 1 31 32 30 29 + 47 48 45 46 9 11 12 10 25 26 28 27 + 7 5 8 6 40 38 39 37 36 35 33 34 + operation j=15 : 15 14 16 13 41 42 43 44 20 18 19 17 + 21 24 22 23 47 45 48 46 26 28 25 27 + 3 4 2 1 5 7 8 6 30 31 32 29 + 11 9 12 10 36 35 33 34 40 38 39 37 + operation j=16 : 16 13 15 14 44 43 42 41 3 4 2 1 + 46 47 48 45 24 23 22 21 32 31 29 30 + 20 18 19 17 39 40 38 37 27 28 26 25 + 36 33 35 34 11 12 9 10 7 8 5 6 + operation j=17 : 17 19 20 18 39 37 40 38 33 34 36 35 + 14 13 16 15 1 4 2 3 46 48 45 47 + 29 32 30 31 25 27 28 26 9 10 12 11 + 6 8 5 7 44 43 42 41 23 21 24 22 + operation j=18 : 18 20 19 17 40 38 39 37 1 2 4 3 + 31 29 32 30 33 36 34 35 48 46 47 45 + 13 16 15 14 42 44 43 41 11 12 10 9 + 23 24 21 22 27 28 25 26 6 5 8 7 + operation j=19 : 19 17 18 20 37 39 38 40 13 16 15 14 + 35 33 34 36 29 30 32 31 10 12 9 11 + 1 2 4 3 8 6 5 7 45 46 48 47 + 27 25 28 26 23 21 24 22 44 43 42 41 + operation j=20 : 20 18 17 19 38 40 37 39 29 32 30 31 + 3 1 2 4 13 15 16 14 12 10 11 9 + 33 34 36 35 24 23 21 22 47 48 46 45 + 44 42 43 41 6 5 8 7 27 28 25 26 + operation j=21 : 21 23 24 22 33 34 36 35 39 37 40 38 + 15 16 13 14 46 48 45 47 1 4 2 3 + 27 28 25 26 30 29 32 31 5 6 8 7 + 10 12 9 11 43 44 41 42 19 17 20 18 + operation j=22 : 22 24 23 21 36 35 33 34 46 45 48 47 + 26 27 28 25 39 40 37 38 4 1 3 2 + 16 13 14 15 41 43 44 42 7 8 6 5 + 19 20 17 18 29 32 30 31 10 9 12 11 + operation j=23 : 23 21 22 24 34 33 35 36 16 13 14 15 + 38 39 37 40 27 25 28 26 6 8 5 7 + 46 45 48 47 12 10 9 11 2 1 4 3 + 29 30 32 31 19 17 20 18 43 44 41 42 + operation j=24 : 24 22 21 23 35 36 34 33 27 28 25 26 + 47 46 45 48 16 14 13 15 8 6 7 5 + 39 37 40 38 20 19 17 18 3 4 1 2 + 43 41 44 42 10 9 12 11 29 32 30 31 + operation j=25 : 25 26 28 27 31 30 32 29 23 21 24 22 + 9 12 11 10 2 3 1 4 42 44 41 43 + 38 40 37 39 17 18 20 19 14 15 13 16 + 5 7 6 8 48 47 46 45 33 34 36 35 + operation j=26 : 26 25 27 28 30 31 29 32 12 11 10 9 + 22 23 21 24 38 37 40 39 15 13 14 16 + 2 1 3 4 7 5 6 8 41 42 44 43 + 18 17 20 19 33 34 36 35 48 47 46 45 + operation j=27 : 27 28 26 25 32 29 31 30 2 1 3 4 + 39 38 40 37 23 24 21 22 44 42 43 41 + 12 11 10 9 46 48 47 45 16 13 15 14 + 33 36 34 35 18 20 17 19 5 6 7 8 + operation j=28 : 28 27 25 26 29 32 30 31 38 40 37 39 + 4 2 1 3 12 10 11 9 13 15 16 14 + 23 21 24 22 36 33 34 35 43 44 42 41 + 48 46 47 45 5 6 7 8 18 20 17 19 + operation j=29 : 29 32 31 30 28 27 26 25 45 46 47 48 + 33 35 36 34 19 20 17 18 43 41 44 42 + 8 7 6 5 1 4 3 2 13 16 14 15 + 39 40 37 38 22 24 21 23 9 10 11 12 + operation j=30 : 30 31 32 29 26 25 28 27 19 17 20 18 + 5 8 7 6 45 47 46 48 41 43 42 44 + 35 36 34 33 21 22 24 23 15 14 16 13 + 9 11 10 12 4 3 1 2 39 37 40 38 + operation j=31 : 31 30 29 32 25 26 27 28 8 7 6 5 + 18 19 17 20 35 34 36 33 14 16 15 13 + 45 46 47 48 11 9 10 12 42 41 43 44 + 22 21 24 23 39 37 40 38 4 3 1 2 + operation j=32 : 32 29 30 31 27 28 25 26 35 36 34 33 + 48 45 46 47 8 6 7 5 16 14 13 15 + 19 17 20 18 40 39 37 38 44 43 41 42 + 4 1 3 2 9 10 11 12 22 24 21 23 + operation j=33 : 33 34 35 36 21 23 22 24 11 12 9 10 + 29 31 30 32 18 17 20 19 5 7 6 8 + 42 41 44 43 13 15 14 16 1 2 3 4 + 38 37 40 39 26 25 28 27 47 48 45 46 + operation j=34 : 34 33 36 35 23 21 24 22 31 30 32 29 + 10 11 12 9 42 44 41 43 2 3 1 4 + 18 20 17 19 37 38 40 39 6 5 7 8 + 15 13 14 16 47 48 45 46 26 25 28 27 + operation j=35 : 35 36 33 34 24 22 23 21 42 41 44 43 + 19 18 20 17 31 32 30 29 3 2 4 1 + 11 12 9 10 45 47 48 46 8 7 5 6 + 26 28 25 27 38 40 37 39 15 14 13 16 + operation j=36 : 36 35 34 33 22 24 21 23 18 20 17 19 + 43 42 41 44 11 9 12 10 7 5 8 6 + 31 30 32 29 28 26 25 27 4 3 2 1 + 47 45 48 46 15 14 13 16 38 40 37 39 + operation j=37 : 37 39 40 38 19 17 20 18 26 25 28 27 + 6 7 8 5 41 43 42 44 45 47 46 48 + 22 24 21 23 34 35 36 33 10 9 11 12 + 14 16 15 13 3 4 2 1 31 30 32 29 + operation j=38 : 38 40 39 37 20 18 19 17 41 42 43 44 + 23 22 24 21 26 28 25 27 47 45 48 46 + 7 8 5 6 2 3 4 1 12 11 9 10 + 31 32 30 29 35 36 34 33 14 15 16 13 + operation j=39 : 39 37 38 40 17 19 18 20 7 8 5 6 + 27 26 25 28 22 21 24 23 9 11 10 12 + 41 42 43 44 16 14 15 13 46 45 47 48 + 35 34 36 33 31 30 32 29 3 4 2 1 + operation j=40 : 40 38 37 39 18 20 17 19 22 24 21 23 + 44 41 42 43 7 5 8 6 11 9 12 10 + 26 25 28 27 32 31 30 29 48 47 45 46 + 3 2 4 1 14 15 16 13 35 36 34 33 + operation j=41 : 41 42 44 43 15 14 13 16 10 9 12 11 + 7 6 5 8 37 38 39 40 30 29 31 32 + 34 33 35 36 22 21 23 24 26 25 27 28 + 17 18 19 20 1 2 4 3 46 45 48 47 + operation j=42 : 42 41 43 44 14 15 16 13 6 5 8 7 + 11 10 9 12 34 35 33 36 25 27 26 28 + 37 39 38 40 18 17 19 20 31 30 29 32 + 21 22 23 24 46 45 48 47 1 2 4 3 + operation j=43 : 43 44 42 41 13 16 15 14 37 39 38 40 + 36 34 33 35 10 12 9 11 29 30 32 31 + 6 5 8 7 4 1 2 3 28 27 25 26 + 46 48 45 47 21 23 22 24 17 19 18 20 + operation j=44 : 44 43 41 42 16 13 14 15 34 33 35 36 + 40 37 39 38 6 8 5 7 27 25 28 26 + 10 9 12 11 48 46 45 47 32 29 30 31 + 1 4 2 3 17 19 18 20 21 23 22 24 + operation j=45 : 45 46 48 47 10 9 12 11 15 14 13 16 + 8 5 6 7 30 29 31 32 37 38 39 40 + 21 23 22 24 35 34 33 36 19 17 18 20 + 25 27 26 28 2 1 3 4 42 41 44 43 + operation j=46 : 46 45 47 48 9 10 11 12 5 6 7 8 + 16 15 14 13 21 22 23 24 17 18 19 20 + 30 31 29 32 27 25 26 28 39 37 38 40 + 34 35 33 36 42 41 44 43 2 1 3 4 + operation j=47 : 47 48 46 45 12 11 10 9 30 31 29 32 + 24 21 23 22 15 13 14 16 38 37 40 39 + 5 6 7 8 3 2 1 4 20 18 17 19 + 42 44 41 43 34 33 35 36 25 26 27 28 + operation j=48 : 48 47 45 46 11 12 9 10 21 23 22 24 + 32 30 31 29 5 7 6 8 18 17 20 19 + 15 14 13 16 44 42 41 43 40 38 37 39 + 2 3 1 4 25 26 27 28 34 33 35 36 + + + Space group can be generated using 5 generators: 7 10 36 5 2 + + generators (in lattice coordinates): + +&gen 5 + + -1 0 0 0.00000 + 0 -1 0 0.00000 + 0 0 -1 0.00000 + + 0 0 1 0.00000 + 0 1 0 0.00000 + -1 -1 -1 0.50000 + + -1 -1 -1 0.50000 + 0 0 1 0.00000 + 0 1 0 0.00000 + + 0 1 0 0.00000 + 1 0 0 0.00000 + -1 -1 -1 0.50000 + + 0 1 0 0.00000 + 1 0 0 0.00000 + 0 0 1 0.00000 + +/ ! end generators + + + + Atomic positions: + ----------------- + atom types = 1 + total = 2 + + lattice coordinates (scaled) Cartesian coordinates atom + + atom type 1: atomic identification number = 14.0 representative = 1 + 0.125000 0.125000 0.125000 1.291839 1.291839 1.291839 1 + -0.125000 -0.125000 -0.125000 -1.291839 -1.291839 -1.291839 2 + +atoms% 1 atoms 2 + Z( 1)= 14 atoms 2 + 0.125000 0.125000 0.125000 1 + -0.125000 -0.125000 -0.125000 2 + ---------------------------------------------------- + Suggested values for input: + + Atom Z lmax jri rmt dx +Si 14 8 721 2.181592 0.015958 +k_max = 3.66705 +G_max =11.00114 + + =============================================== + === modifying atomic input for &(all)atom === + =============================================== + +for atom 1 (Si) changed rmt to 2.100000 +for atom 1 (Si) changed jri to 981 +for atom 1 (Si) changed lmax to 12 +for atom 1 (Si) changed lnonsph to 6 +line: 14>&comp +line: 15>kmax=3.2 / +Valence Electrons = 8 + ---------------------------------------------------- + Suggested values for input: + + Atom Z lmax jri rmt dx +Si 14 8 721 2.181592 0.015958 +k_max = 3.66705 +G_max =11.00114 +line: 16>&kpt +line: 17>div1=10 div2=10 div3=10 tkb=0.0005 / + 7.30774394389065 7.30774394389065 7.30774394389065 + 0.500000000000000 0.500000000000000 0.500000000000000 + face centered cubic + values accepted unchanged + 10 10 10 nmop(i),i=1,3 + orientation of boundary faces + 1 -1 -0.5026658 ifac,iside,orient for xvec + 2 -1 -0.4120666 ifac,iside,orient for xvec + 3 -1 -0.0324508 ifac,iside,orient for xvec + 4 -1 -0.0335191 ifac,iside,orient for xvec + 5 -1 -0.0183084 ifac,iside,orient for xvec +Bravais lattice vectors + 0.000000 5.167355 5.167355 + 5.167355 0.000000 5.167355 + 5.167355 5.167355 0.000000 +reciprocal lattice vectors + -0.607969 0.607969 0.607969 + 0.607969 -0.607969 0.607969 + 0.607969 0.607969 -0.607969 + 10 10 10 Monkhorst-Pack-parameters + 0 nreg; k-points in irreducible wedge of BZ + Monkhorst-Pack-fractions + 0 nbound; no k-points on boundary of BZ + 1 idim + -0.4500000 + -0.3500000 + -0.2500000 + -0.1500000 + -0.0500000 + 0.0500000 + 0.1500000 + 0.2500000 + 0.3500000 + 0.4500000 + 2 idim + -0.4500000 + -0.3500000 + -0.2500000 + -0.1500000 + -0.0500000 + 0.0500000 + 0.1500000 + 0.2500000 + 0.3500000 + 0.4500000 + 3 idim + -0.4500000 + -0.3500000 + -0.2500000 + -0.1500000 + -0.0500000 + 0.0500000 + 0.1500000 + 0.2500000 + 0.3500000 + 0.4500000 + +k-point count: 110 + +k-point mesh: 10 10 10 +k-point density: 9.496374 9.496374 9.496374 + diff --git a/aiida_fleur/tests/workflows/calc_data_dir/mock-inpgen-4476cada582e637fef7432a68c19d42a/out.error b/aiida_fleur/tests/workflows/calc_data_dir/mock-inpgen-4476cada582e637fef7432a68c19d42a/out.error new file mode 100644 index 000000000..e69de29bb diff --git a/aiida_fleur/tests/workflows/calc_data_dir/mock-inpgen-4476cada582e637fef7432a68c19d42a/shell.out b/aiida_fleur/tests/workflows/calc_data_dir/mock-inpgen-4476cada582e637fef7432a68c19d42a/shell.out new file mode 100644 index 000000000..91cd3bb77 --- /dev/null +++ b/aiida_fleur/tests/workflows/calc_data_dir/mock-inpgen-4476cada582e637fef7432a68c19d42a/shell.out @@ -0,0 +1,2 @@ + Welcome to FLEUR - inpgen (www.flapw.de) + MaX-Release 4.0 (www.max-centre.eu) diff --git a/aiida_fleur/tests/workflows/calc_data_dir/mock-inpgen-4476cada582e637fef7432a68c19d42a/struct.xsf b/aiida_fleur/tests/workflows/calc_data_dir/mock-inpgen-4476cada582e637fef7432a68c19d42a/struct.xsf new file mode 100644 index 000000000..98c36f72d --- /dev/null +++ b/aiida_fleur/tests/workflows/calc_data_dir/mock-inpgen-4476cada582e637fef7432a68c19d42a/struct.xsf @@ -0,0 +1,10 @@ + CRYSTAL + PRIMVEC +.0000000 2.7344467 2.7344467 +2.7344467 .0000000 2.7344467 +2.7344467 2.7344467 .0000000 + PRIMCOORD + 2 1 + 14 .6836117 .6836117 .6836117 + 14 -.6836117 -.6836117 -.6836117 + diff --git a/aiida_fleur/tests/workflows/test_banddos_workchain.py b/aiida_fleur/tests/workflows/test_banddos_workchain.py new file mode 100644 index 000000000..67f2fe1b0 --- /dev/null +++ b/aiida_fleur/tests/workflows/test_banddos_workchain.py @@ -0,0 +1,115 @@ +# -*- coding: utf-8 -*- +############################################################################### +# Copyright (c), Forschungszentrum Jülich GmbH, IAS-1/PGI-1, Germany. # +# All rights reserved. # +# This file is part of the AiiDA-FLEUR package. # +# # +# The code is hosted on GitHub at https://github.com/JuDFTteam/aiida-fleur # +# For further information on the license, see the LICENSE.txt file # +# For further information please visit http://www.flapw.de or # +# http://aiida-fleur.readthedocs.io/en/develop/ # +############################################################################### +''' Contains tests for the FleurBandDosWorkChain ''' +from __future__ import absolute_import +from __future__ import print_function + +import pytest +import aiida_fleur +import os + +aiida_path = os.path.dirname(aiida_fleur.__file__) +TEST_INP_XML_PATH = os.path.join(aiida_path, 'tests/files/inpxml/Si/inp.xml') +CALC_ENTRY_POINT = 'fleur.fleur' + + +# tests +@pytest.mark.usefixtures('aiida_profile', 'clear_database') +class Test_BandDosWorkChain(): + """ + Regression tests for the FleurBandDosWorkChain + """ + + @pytest.mark.skip(reason='Test is not implemented') + @pytest.mark.timeout(500, method='thread') + def test_fleur_band_converged_Si(self, run_with_cache, mock_code_factory, create_remote_fleur): + """ + full example using the band dos workchain with just a fleurinp data as input. + Calls scf, Several fleur runs needed till convergence + """ + from aiida.orm import Code, load_node, Dict, StructureData + from numpy import array + from aiida_fleur.workflows.banddos import FleurBandDosWorkChain + + options = { + 'resources': { + 'num_machines': 1 + }, + 'max_wallclock_seconds': 5 * 60, + 'withmpi': False, + 'custom_scheduler_commands': '' + } + + FleurCode = mock_code = mock_code_factory( + label='fleur', + data_dir_abspath=os.path.join(os.path.dirname(os.path.abspath(__file__)), 'data_dir_calcs/'), + entry_point=CALC_ENTRY_POINT, + ignore_files=['_aiidasubmit.sh', 'cdnc', 'out', 'FleurInputSchema.xsd', 'cdn.hdf', 'usage.json', 'cdn??']) + # create process builder to set parameters + builder = FleurBandDosWorkChain.get_builder() + builder.metadata.description = 'Simple Fleur Band Dos calculation ontop converged fleur calc' + builder.metadata.label = 'FleurBandDos_test' + #builder.fleurinp = create_fleurinp(TEST_INP_XML_PATH) + builder.remote = create_remote_fleur() + builder.options = Dict(dict=options) + builder.fleur = FleurCode + + # now run calculation + out, node = run_with_cache(builder) + + # check output + # check if BandDos file was parsed. success and all output nodes there. + + @pytest.mark.skip(reason='Test is not implemented') + @pytest.mark.timeout(500, method='thread') + def test_fleur_band_fleurinp_Si(self, run_with_cache, mock_code_factory, create_fleurinp): + """ + full example using the band dos workchain with just a fleurinp data as input. + Calls scf, Several fleur runs needed till convergence + """ + + assert False + + @pytest.mark.skip(reason='Test is not implemented') + @pytest.mark.timeout(500, method='thread') + def test_fleur_band_structure_Si(self, run_with_cache, mock_code_factory): + """ + Full regression test of the band dos workchain starting with a crystal structure and parameters + """ + assert False + + @pytest.mark.skip(reason='Test is not implemented') + @pytest.mark.timeout(500, method='thread') + def test_fleur_band_validation_wrong_inputs(self, run_with_cache, mock_code_factory): + """ + Test the validation behavior of band dos workchain if wrong input is provided it should throw + an exitcode and not start a Fleur run or crash + """ + assert False + + # needed? + + @pytest.mark.skip(reason='Test is not implemented') + @pytest.mark.timeout(500, method='thread') + def test_fleur_band_seekpath(self, run_with_cache, mock_code_factory): + """ + Tests if the band dos workchain is capable of running without a specified path + """ + assert False + + @pytest.mark.skip(reason='Test is not implemented') + @pytest.mark.timeout(500, method='thread') + def test_fleur_band_no_seekpath(self, run_with_cache, mock_code_factory): + """ + Tests if the band dos workchain is capable of running with a specified path + """ + assert False diff --git a/aiida_fleur/tests/workflows/test_base_fleur_workchain.py b/aiida_fleur/tests/workflows/test_base_fleur_workchain.py new file mode 100644 index 000000000..abb927601 --- /dev/null +++ b/aiida_fleur/tests/workflows/test_base_fleur_workchain.py @@ -0,0 +1,96 @@ +# -*- coding: utf-8 -*- +############################################################################### +# Copyright (c), Forschungszentrum Jülich GmbH, IAS-1/PGI-1, Germany. # +# All rights reserved. # +# This file is part of the AiiDA-FLEUR package. # +# # +# The code is hosted on GitHub at https://github.com/JuDFTteam/aiida-fleur # +# For further information on the license, see the LICENSE.txt file # +# For further information please visit http://www.flapw.de or # +# http://aiida-fleur.readthedocs.io/en/develop/ # +############################################################################### +'''Contains tests for the FleurBaseWorkChain''' +# Here we test if the interfaces of the workflows are still the same +from __future__ import absolute_import +from __future__ import print_function + +import pytest +import aiida_fleur +import os + +aiida_path = os.path.dirname(aiida_fleur.__file__) +TEST_INP_XML_PATH = os.path.join(aiida_path, 'tests/files/inpxml/Si/inp.xml') +CALC_ENTRY_POINT = 'fleur.fleur' + + +# tests +@pytest.mark.usefixtures('aiida_profile', 'clear_database') +class Test_FleurBaseWorkChain(): + """ + Regression tests for the FleurBaseWorkChain + """ + + @pytest.mark.skip(reason='Test is not implemented') + @pytest.mark.timeout(500, method='thread') + def test_fleur_base_fleurinp_Si(self, run_with_cache, mock_code_factory, create_fleurinp): + """ + full example using FleurBaseWorkChain with just a fleurinp data as input. + Several fleur runs needed till convergence + """ + from aiida.orm import Code, load_node, Dict, StructureData + from numpy import array + from aiida_fleur.workflows.base_fleur import FleurBaseWorkChain + + options = { + 'resources': { + 'num_machines': 1 + }, + 'max_wallclock_seconds': 5 * 60, + 'withmpi': False, + 'custom_scheduler_commands': '' + } + + FleurCode = mock_code = mock_code_factory( + label='fleur', + data_dir_abspath=os.path.join(os.path.dirname(os.path.abspath(__file__)), 'data_dir/'), + entry_point=CALC_ENTRY_POINT, + ignore_files=['_aiidasubmit.sh', 'cdnc', 'out', 'FleurInputSchema.xsd', 'cdn.hdf', 'usage.json', 'cdn??']) + # create process builder to set parameters + builder = FleurBaseWorkChain.get_builder() + builder.metadata.description = 'Simple Fleur SCF test for Si bulk with fleurinp data given' + builder.metadata.label = 'FleurSCF_test_Si_bulk' + builder.fleurinp = create_fleurinp(TEST_INP_XML_PATH) + builder.options = Dict(dict=options) + builder.fleur = FleurCode + + # now run calculation + out, node = run_with_cache(builder) + + # check output + + #assert abs(n.get('starting_fermi_energy') - 0.409241) < 10**-14 + + @pytest.mark.skip(reason='Test is not implemented') + @pytest.mark.timeout(500, method='thread') + def test_fleur_base_structure_Si(self, run_with_cache, mock_code_factory): + """ + Full regression test of FleurBaseWorkChain starting with a crystal structure and parameters + """ + assert False + + @pytest.mark.skip(reason='Test is not implemented') + @pytest.mark.timeout(500, method='thread') + def test_fleur_base_continue_from_x(self, run_with_cache, mock_code_factory): + """ + Full regression test of FleurBaseWorkChain while encountering x, handling it and restart + """ + assert False + + @pytest.mark.skip(reason='Test is not implemented') + @pytest.mark.timeout(500, method='thread') + def test_fleur_base_validation_wrong_inputs(self, run_with_cache, mock_code_factory): + """ + Test the validation behavior of FleurBaseWorkChain if wrong input is provided it should throw + an exitcode and not start a Fleur run or crash + """ + assert False diff --git a/aiida_fleur/tests/workflows/test_corehole_workchain.py b/aiida_fleur/tests/workflows/test_corehole_workchain.py new file mode 100644 index 000000000..b1b6454a8 --- /dev/null +++ b/aiida_fleur/tests/workflows/test_corehole_workchain.py @@ -0,0 +1,158 @@ +# -*- coding: utf-8 -*- +############################################################################### +# Copyright (c), Forschungszentrum Jülich GmbH, IAS-1/PGI-1, Germany. # +# All rights reserved. # +# This file is part of the AiiDA-FLEUR package. # +# # +# The code is hosted on GitHub at https://github.com/JuDFTteam/aiida-fleur # +# For further information on the license, see the LICENSE.txt file # +# For further information please visit http://www.flapw.de or # +# http://aiida-fleur.readthedocs.io/en/develop/ # +############################################################################### +'''Contains tests for the Fleur_corehole_wc''' +from __future__ import absolute_import +from __future__ import print_function + +import pytest +import aiida_fleur +import os +from aiida.orm import Code, load_node, Dict, StructureData +from aiida_fleur.workflows.corehole import fleur_corehole_wc +from aiida_fleur.workflows.base_fleur import FleurBaseWorkChain +from aiida_fleur.workflows.scf import FleurScfWorkChain + + +# tests +@pytest.mark.usefixtures('aiida_profile', 'clear_database') +class Test_fleur_corehole_wc(): + """ + Regression tests for the fleur_corehole_wc + """ + + @pytest.mark.skip(reason='aiida-testing buggy, todo check, aiida-fleur fixture') + @pytest.mark.timeout(5000, method='thread') + def test_fleur_corehole_W( + self, #run_with_cache, + inpgen_local_code, + fleur_local_code, + generate_structure_W): #, clear_spec): + """ + full example using fleur_corehole_wc on W. + Several fleur runs needed, calculation of all only certain coreholes + """ + from aiida.engine import run_get_node + options = Dict( + dict={ + 'resources': { + 'num_machines': 1, + 'num_mpiprocs_per_machine': 1 + }, + 'max_wallclock_seconds': 60 * 60, + 'queue_name': '' + }) + #'withmpi': False, 'custom_scheduler_commands': ''} + options.store() + + parameters = Dict( + dict={ + 'atom': { + 'element': 'W', + 'jri': 833, + 'rmt': 2.3, + 'dx': 0.015, + 'lmax': 8, + 'lo': '5p', + 'econfig': '[Kr] 5s2 4d10 4f14| 5p6 5d4 6s2', + }, + 'comp': { + 'kmax': 3.0, + }, + 'kpt': { + 'nkpt': 100, + } + }) + parameters.store() + + #structure = generate_structure_W() + # W bcc structure + bohr_a_0 = 0.52917721092 # A + a = 3.013812049196 * bohr_a_0 + cell = [[-a, a, a], [a, -a, a], [a, a, -a]] + structure = StructureData(cell=cell) + structure.append_atom(position=(0., 0., 0.), symbols='W') + + structure.store() + wf_para = Dict( + dict={ + 'method': 'valence', + 'hole_charge': 0.5, + 'atoms': ['all'], + 'corelevel': ['W,4f', 'W,4p'], #['W,all'],# + 'supercell_size': [2, 1, 1], + 'magnetic': True + }) + + FleurCode = fleur_local_code + InpgenCode = inpgen_local_code + + # create process builder to set parameters + inputs = { + #'metadata' : { + # 'description' : 'Simple fleur_corehole_wc test with W bulk', + # 'label' : 'fleur_corehole_wc_test_W_bulk'}, + 'options': options, + 'fleur': FleurCode, + 'inpgen': InpgenCode, + 'wf_parameters': wf_para, + 'calc_parameters': parameters, + 'structure': structure + } + + # now run calculation + #out, node = run_with_cache(inputs, process_class=fleur_corehole_wc) + out, node = run_get_node(fleur_corehole_wc, **inputs) + + # check general run + assert node.is_finished_ok + + # check output + # corelevel shift should be zero + outn = out.get('output_corehole_wc_para', None) + assert outn is not None + outd = outn.get_dict() + + assert outd.get('successful') + assert outd.get('warnings') == [] + + assert outd.get('weighted_binding_energy') == [ + 470.54883993999, 402.52235778002, 32.112260220107, 29.829247920075 + ] + + assert outd.get('binding_energy') == [235.27441997, 201.26117889001, 16.056130110053, 14.914623960038] + + @pytest.mark.skip(reason='Test is not implemented') + @pytest.mark.timeout(500, method='thread') + def test_fleur_corehole_structure_Si_one(self, run_with_cache, mock_code_factory): + """ + Full regression test of fleur_corehole_wc starting with a crystal structure and parameters, + one corehole + """ + assert False + + @pytest.mark.skip(reason='Test is not implemented') + @pytest.mark.timeout(500, method='thread') + def test_fleur_corehole_structure_Si_all(self, run_with_cache, mock_code_factory): + """ + Full regression test of fleur_corehole_wc starting from a structure, calculating all possible + coreholes + """ + assert False + + @pytest.mark.skip(reason='Test is not implemented') + @pytest.mark.timeout(500, method='thread') + def test_fleur_corehole_validation_wrong_inputs(self, run_with_cache, mock_code_factory): + """ + Test the validation behavior of fleur_corehole_wc if wrong input is provided it should throw + an exitcode and not start a Fleur run or crash + """ + assert False diff --git a/aiida_fleur/tests/workflows/test_create_magnetic_workchain.py b/aiida_fleur/tests/workflows/test_create_magnetic_workchain.py new file mode 100644 index 000000000..5a395d640 --- /dev/null +++ b/aiida_fleur/tests/workflows/test_create_magnetic_workchain.py @@ -0,0 +1,276 @@ +# -*- coding: utf-8 -*- +############################################################################### +# Copyright (c), Forschungszentrum Jülich GmbH, IAS-1/PGI-1, Germany. # +# All rights reserved. # +# This file is part of the AiiDA-FLEUR package. # +# # +# The code is hosted on GitHub at https://github.com/JuDFTteam/aiida-fleur # +# For further information on the license, see the LICENSE.txt file # +# For further information please visit http://www.flapw.de or # +# http://aiida-fleur.readthedocs.io/en/develop/ # +############################################################################### +''' Contains tests for the FleurCreateMagneticWorkChain ''' +from __future__ import absolute_import +from __future__ import print_function + +import pytest +import aiida_fleur +import os +from aiida.orm import Int +from aiida.engine import run_get_node +from aiida_fleur.workflows.create_magnetic_film import FleurCreateMagneticWorkChain + +aiida_path = os.path.dirname(aiida_fleur.__file__) +TEST_INP_XML_PATH = os.path.join(aiida_path, 'tests/files/inpxml/Si/inp.xml') +CALC_ENTRY_POINT = 'fleur.fleur' +CALC2_ENTRY_POINT = 'fleur.inpgen' + + +# tests +@pytest.mark.skip +@pytest.mark.usefixtures('aiida_profile', 'clear_database') +class Test_FleurCreateMagneticWorkChain: + """ + Regression tests for the FleurCreateMagneticWorkChain + """ + + @pytest.mark.timeout(500, method='thread') + def test_fleur_create_mag_FePt(self, run_with_cache, fleur_local_code, inpgen_local_code, clear_spec): + """ + full example using scf workflow with just a fleurinp data as input. + Several fleur runs needed till convergence + """ + from aiida.orm import Code, load_node, Dict, StructureData + + # input from examples, just with less computations + + fleur_inp = fleur_local_code + inpgen_inp = inpgen_local_code + + ### + wf_para = { + 'lattice': 'fcc', + 'miller': [[-1, 1, 0], [0, 0, 1], [1, 1, 0]], + 'host_symbol': 'Pt', + 'latticeconstant': 4.0, + 'size': (1, 1, 5), + 'replacements': { + 0: 'Fe', + -1: 'Fe' + }, + 'decimals': 10, + 'pop_last_layers': 1, + 'total_number_layers': 8, + 'num_relaxed_layers': 3 + } + + wf_para = Dict(dict=wf_para) + + wf_eos = {'points': 9, 'step': 0.015, 'guess': 1.00} + + wf_eos_scf = { + 'fleur_runmax': 4, + 'density_converged': 0.0002, + 'serial': False, + 'itmax_per_run': 50, + 'inpxml_changes': [] + } + + wf_eos_scf = Dict(dict=wf_eos_scf) + + wf_eos = Dict(dict=wf_eos) + + calc_eos = { + 'comp': { + 'kmax': 3.8, + }, + 'kpt': { + 'div1': 4, + 'div2': 4, + 'div3': 4 + } + } + + calc_eos = Dict(dict=calc_eos) + + options_eos = { + 'resources': { + 'num_machines': 1, + 'num_mpiprocs_per_machine': 1, + 'num_cores_per_mpiproc': 1 + }, + 'queue_name': '', + 'custom_scheduler_commands': '', + 'max_wallclock_seconds': 1 * 60 * 60 + } + + options_eos = Dict(dict=options_eos) + + wf_relax = {'film_distance_relaxation': False, 'force_criterion': 0.049} #, 'use_relax_xml': True} + + wf_relax_scf = { + 'fleur_runmax': 5, + 'serial': False, + 'itmax_per_run': 50, + #'alpha_mix': 0.015, + #'relax_iter': 25, + 'force_converged': 0.001, + 'force_dict': { + 'qfix': 2, + 'forcealpha': 0.75, + 'forcemix': 'straight' + }, + 'inpxml_changes': [] + } + + wf_relax = Dict(dict=wf_relax) + wf_relax_scf = Dict(dict=wf_relax_scf) + + calc_relax = { + 'comp': { + 'kmax': 4.0, + }, + 'kpt': { + 'div1': 24, + 'div2': 20, + 'div3': 1 + }, + 'atom': { + 'element': 'Pt', + 'rmt': 2.2, + 'lmax': 10, + 'lnonsph': 6, + 'econfig': '[Kr] 5s2 4d10 4f14 5p6| 5d9 6s1', + }, + 'atom2': { + 'element': 'Fe', + 'rmt': 2.1, + 'lmax': 10, + 'lnonsph': 6, + 'econfig': '[Ne] 3s2 3p6| 3d6 4s2', + }, + } + + calc_relax = Dict(dict=calc_relax) + + options_relax = { + 'resources': { + 'num_machines': 1, + 'num_mpiprocs_per_machine': 1, + 'num_cores_per_mpiproc': 1 + }, + 'queue_name': '', + 'custom_scheduler_commands': '', + 'max_wallclock_seconds': 1 * 60 * 60 + } + + options_relax = Dict(dict=options_relax) + + settings = Dict(dict={}) + + inputs = { + 'eos': { + 'scf': { + 'wf_parameters': wf_eos_scf, + 'calc_parameters': calc_eos, + 'options': options_eos, + 'inpgen': inpgen_inp, + 'fleur': fleur_inp + }, + 'wf_parameters': wf_eos + }, + 'relax': { + 'scf': { + 'wf_parameters': wf_relax_scf, + 'calc_parameters': calc_relax, + 'options': options_relax, + 'inpgen': inpgen_inp, + 'fleur': fleur_inp + }, + 'wf_parameters': wf_relax, + 'label': 'relaxation', + 'description': 'describtion', + 'max_iterations': Int(5) + }, + 'wf_parameters': wf_para + } + + # now run calculation + out, node = run_with_cache(inputs, process_class=FleurCreateMagneticWorkChain) + + print(out) + print(node) + + outpara = out.get('output_eos_wc_para', None) + assert outpara is not None + outpara = outpara.get_dict() + print(outpara) + + outstruc = out.get('output_eos_wc_structure', None) + assert outstruc is not None + + assert node.is_finished_ok + assert False + # check output + #distance, bulk modulus, optimal structure, opt scaling + #assert abs(outpara.get('scaling_gs') - 0.99268546558578) < 10**14 + #assert outpara.get('warnings') == ['Groundstate volume was not in the scaling range.'] + #assert outpara.get('info') == ['Consider rerunning around point 0.9926854655857787'] + + @pytest.mark.skip + @pytest.mark.timeout(500, method='thread') + def test_fleur_create_mag_validation_wrong_inputs(self, run_with_cache, mock_code_factory, generate_structure2): + """ + Test the validation behavior of FleurCreateMagneticWorkChain if wrong input is provided it should throw + an exitcode and not start a Fleur run or crash + """ + from aiida.orm import Dict + + # prepare input nodes and dicts + options = { + 'resources': { + 'num_machines': 1, + 'num_mpiprocs_per_machine': 1 + }, + 'max_wallclock_seconds': 5 * 60, + 'withmpi': False, + 'custom_scheduler_commands': '' + } + options = Dict(dict=options).store() + + FleurCode = mock_code_factory( + label='fleur', + data_dir_abspath=os.path.join(os.path.dirname(os.path.abspath(__file__)), 'calc_data_dir/'), + entry_point=CALC_ENTRY_POINT, + ignore_files=['cdnc', 'out', 'FleurInputSchema.xsd', 'cdn.hdf', 'usage.json', 'cdn??']) + InpgenCode = mock_code_factory(label='inpgen', + data_dir_abspath=os.path.join(os.path.dirname(os.path.abspath(__file__)), + 'calc_data_dir/'), + entry_point=CALC2_ENTRY_POINT, + ignore_files=['_aiidasubmit.sh', 'FleurInputSchema.xsd']) + + wf_parameters = Dict(dict={'points': 9, 'step': 0.002, 'guess': 1.00, 'wrong_key': None}) + wf_parameters.store() + structure = generate_structure2() + structure.store() + + ################ + # Create builders + # interface of exposed scf is tested elsewhere + + # 1. create builder with wrong wf parameters + builder_additionalkeys = FleurCreateMagneticWorkChain.get_builder() + builder_additionalkeys.structure = structure + builder_additionalkeys.wf_parameters = wf_parameters + builder_additionalkeys.scf.fleur = FleurCode + builder_additionalkeys.scf.inpgen = InpgenCode + + ################### + # now run the builders all should fail early with exit codes + + # 1. structure and fleurinp given + out, node = run_get_node(builder_additionalkeys) + assert out == {} + assert node.is_finished + assert not node.is_finished_ok + assert node.exit_status == 230 diff --git a/aiida_fleur/tests/workflows/test_eos_workchain.py b/aiida_fleur/tests/workflows/test_eos_workchain.py new file mode 100644 index 000000000..6b6a40fcb --- /dev/null +++ b/aiida_fleur/tests/workflows/test_eos_workchain.py @@ -0,0 +1,202 @@ +# -*- coding: utf-8 -*- +############################################################################### +# Copyright (c), Forschungszentrum Jülich GmbH, IAS-1/PGI-1, Germany. # +# All rights reserved. # +# This file is part of the AiiDA-FLEUR package. # +# # +# The code is hosted on GitHub at https://github.com/JuDFTteam/aiida-fleur # +# For further information on the license, see the LICENSE.txt file # +# For further information please visit http://www.flapw.de or # +# http://aiida-fleur.readthedocs.io/en/develop/ # +############################################################################### +''' Contains test for the eos workchain, short, interface and regression ''' +from __future__ import absolute_import +from __future__ import print_function + +import pytest +import aiida_fleur +import os +from aiida.engine import run_get_node +from aiida_fleur.workflows.eos import FleurEosWorkChain + +aiida_path = os.path.dirname(aiida_fleur.__file__) +TEST_INP_XML_PATH = os.path.join(aiida_path, 'tests/files/inpxml/Si/inp.xml') +CALC_ENTRY_POINT = 'fleur.fleur' +CALC2_ENTRY_POINT = 'fleur.inpgen' + + +# tests +@pytest.mark.skip +@pytest.mark.usefixtures('aiida_profile', 'clear_database') +class Test_FleurEosWorkChain: + """ + Regression tests for the FleurEosWorkChain + """ + + @pytest.mark.timeout(500, method='thread') + def test_fleur_eos_structure_Si(self, run_with_cache, fleur_local_code, inpgen_local_code, generate_structure2, + clear_spec): + """ + full example using scf workflow with just a fleurinp data as input. + Several fleur runs needed till convergence + """ + from aiida.orm import Code, load_node, Dict, StructureData + + options = { + 'resources': { + 'num_machines': 1, + 'num_mpiprocs_per_machine': 1 + }, + 'max_wallclock_seconds': 10 * 60, + 'withmpi': False, + 'custom_scheduler_commands': '' + } + wf_param = {'points': 7, 'step': 0.002, 'guess': 1.00} + + calc_parameters = { + 'atom': { + 'element': 'Si', + 'rmt': 2.1, + 'jri': 981, + 'lmax': 8, + 'lnonsph': 6 + }, + 'comp': { + 'kmax': 3.4 + }, + 'kpt': { + 'div1': 10, + 'div2': 10, + 'div3': 10, + 'tkb': 0.0005 + } + } + + # Fe fcc structure + bohr_a_0 = 0.52917721092 # A + a = 3.4100000000 * 2**(0.5) + cell = [[a, 0, 0], [0, a, 0], [0, 0, a]] + structure = StructureData(cell=cell) + structure.append_atom(position=(0., 0., 0.), symbols='Fe', name='Fe1') + structure.append_atom(position=(0.5 * a, 0.5 * a, 0.0 * a), symbols='Fe', name='Fe2') + structure.append_atom(position=(0.5 * a, 0.0 * a, 0.5 * a), symbols='Fe', name='Fe31') + structure.append_atom(position=(0.0 * a, 0.5 * a, 0.5 * a), symbols='Fe', name='Fe43') + calc_parameters = { + 'comp': { + 'kmax': 3.4, + }, + 'atom': { + 'element': 'Fe', + 'bmu': 2.5, + 'rmt': 2.15 + }, + 'kpt': { + 'div1': 4, + 'div2': 4, + 'div3': 4 + } + } + + wf_para_scf = { + 'fleur_runmax': 2, + 'itmax_per_run': 120, + 'density_converged': 0.2, + 'serial': True, + 'mode': 'density' + } + + FleurCode = fleur_local_code + InpgenCode = inpgen_local_code + + # create process builder to set parameters + builder = FleurEosWorkChain.get_builder() + builder.metadata.description = 'Simple Fleur FleurEosWorkChain test for Si bulk' + builder.metadata.label = 'FleurEosWorkChain_test_Si_bulk' + builder.structure = structure.store() #generate_structure2().store() + builder.wf_parameters = Dict(dict=wf_param).store() + builder.scf = { + 'fleur': FleurCode, + 'inpgen': InpgenCode, + 'options': Dict(dict=options).store(), + 'wf_parameters': Dict(dict=wf_para_scf).store(), + 'calc_parameters': Dict(dict=calc_parameters).store() + } + print(builder) + # now run calculation + out, node = run_with_cache(builder) + + print(out) + print(node) + + outpara = out.get('output_eos_wc_para', None) + assert outpara is not None + outpara = outpara.get_dict() + print(outpara) + + outstruc = out.get('output_eos_wc_structure', None) + assert outstruc is not None + + assert node.is_finished_ok + + # check output + #distance, bulk modulus, optimal structure, opt scaling + assert abs(outpara.get('scaling_gs') - 0.99268546558578) < 10**14 + assert outpara.get('warnings') == ['Groundstate volume was not in the scaling range.'] + assert outpara.get('info') == ['Consider rerunning around point 0.9926854655857787'] + + @pytest.mark.timeout(500, method='thread') + def test_fleur_eos_validation_wrong_inputs(self, run_with_cache, mock_code_factory, generate_structure2): + """ + Test the validation behavior of FleurEosWorkChain if wrong input is provided it should throw + an exitcode and not start a Fleur run or crash + """ + from aiida.orm import Dict + + # prepare input nodes and dicts + options = { + 'resources': { + 'num_machines': 1, + 'num_mpiprocs_per_machine': 1 + }, + 'max_wallclock_seconds': 5 * 60, + 'withmpi': False, + 'custom_scheduler_commands': '' + } + options = Dict(dict=options).store() + + FleurCode = mock_code_factory( + label='fleur', + data_dir_abspath=os.path.join(os.path.dirname(os.path.abspath(__file__)), 'calc_data_dir/'), + entry_point=CALC_ENTRY_POINT, + ignore_files=['cdnc', 'out', 'FleurInputSchema.xsd', 'cdn.hdf', 'usage.json', 'cdn??']) + InpgenCode = mock_code_factory(label='inpgen', + data_dir_abspath=os.path.join(os.path.dirname(os.path.abspath(__file__)), + 'calc_data_dir/'), + entry_point=CALC2_ENTRY_POINT, + ignore_files=['_aiidasubmit.sh', 'FleurInputSchema.xsd']) + + wf_parameters = Dict(dict={'points': 9, 'step': 0.002, 'guess': 1.00, 'wrong_key': None}) + wf_parameters.store() + structure = generate_structure2() + structure.store() + + ################ + # Create builders + # interface of exposed scf is tested elsewhere + + # 1. create builder with wrong wf parameters + builder_additionalkeys = FleurEosWorkChain.get_builder() + builder_additionalkeys.structure = structure + builder_additionalkeys.wf_parameters = wf_parameters + builder_additionalkeys.scf.fleur = FleurCode + builder_additionalkeys.scf.inpgen = InpgenCode + + ################### + # now run the builders all should fail early with exit codes + + # 1. structure and fleurinp given + out, node = run_get_node(builder_additionalkeys) + assert out == {} + assert node.is_finished + assert not node.is_finished_ok + assert node.exit_status == 230 diff --git a/aiida_fleur/tests/workflows/test_initial_cls_workchain.py b/aiida_fleur/tests/workflows/test_initial_cls_workchain.py new file mode 100644 index 000000000..15db13e73 --- /dev/null +++ b/aiida_fleur/tests/workflows/test_initial_cls_workchain.py @@ -0,0 +1,137 @@ +# -*- coding: utf-8 -*- +############################################################################### +# Copyright (c), Forschungszentrum Jülich GmbH, IAS-1/PGI-1, Germany. # +# All rights reserved. # +# This file is part of the AiiDA-FLEUR package. # +# # +# The code is hosted on GitHub at https://github.com/JuDFTteam/aiida-fleur # +# For further information on the license, see the LICENSE.txt file # +# For further information please visit http://www.flapw.de or # +# http://aiida-fleur.readthedocs.io/en/develop/ # +############################################################################### +''' Contains tests for the fleur_initial_cls_wc. ''' + +from __future__ import absolute_import +from __future__ import print_function + +import pytest +import aiida_fleur +import os +from aiida.orm import load_node +from aiida.engine import run_get_node +from aiida_fleur.workflows.initial_cls import fleur_initial_cls_wc + + +# tests +@pytest.mark.skip +@pytest.mark.usefixtures('aiida_profile', 'clear_database') +class Test_fleur_initial_cls_wc(): + """ + Regression tests for the fleur_initial_cls_wc + """ + + @pytest.mark.timeout(500, method='thread') + def test_fleur_initial_cls_W(self, run_with_cache, inpgen_local_code, fleur_local_code, generate_structure_W, + export_cache, load_cache, clear_spec): + """ + full example using fleur_initial_cls_wc with just elemental W as input + (W, onw atoms per unit cell) + uses the same structure as reference. + """ + from aiida.orm import Code, Dict, StructureData + + options = { + 'resources': { + 'num_machines': 1, + 'num_mpiprocs_per_machine': 1 + }, + 'max_wallclock_seconds': 5 * 60, + 'withmpi': False, + 'custom_scheduler_commands': '' + } + + # Since we parse uuid in input caching does not work if we recreate the nodes so we have to + # import them + ''' + parameters = Dict(dict={ + 'atom':{ + 'element' : 'W', + 'jri' : 833, + 'rmt' : 2.3, + 'dx' : 0.015, + 'lmax' : 8, + 'lo' : '5p', + 'econfig': '[Kr] 5s2 4d10 4f14| 5p6 5d4 6s2', + }, + 'comp': { + 'kmax': 3.0, + }, + 'kpt': { + 'nkpt': 100, + }}).store() + + structure = generate_structure_W().store() + export_cache([structure, parameters], 'W_structure_para.tar.gz') + ''' + load_cache('data_dir/W_structure_para.tar.gz') + + #print(structure.uuid, structure.pk) + #print(parameters.uuid, parameters.pk) + structure = load_node('6c7addb7-f688-4afd-8492-7c64861efd70') + parameters = load_node('b5275b1a-bff7-4cdc-8efc-36c5ddd67f28') + + wf_para = Dict(dict={'references': {'W': [structure.uuid, parameters.uuid]}}) + + FleurCode = fleur_local_code + InpgenCode = inpgen_local_code + + # create process builder to set parameters + inputs = { + 'metadata': { + 'description': 'Simple fleur_initial_cls_wc test with W bulk', + 'label': 'fleur_initial_cls_wc_test_W_bulk' + }, + 'options': Dict(dict=options), + 'fleur': FleurCode, + 'inpgen': InpgenCode, + 'wf_parameters': wf_para, + 'calc_parameters': parameters, + 'structure': structure + } + + # now run calculation + out, node = run_with_cache(inputs, process_class=fleur_initial_cls_wc) + + # check general run + assert node.is_finished_ok + + # check output + # corelevel shift should be zero + outn = out.get('output_initial_cls_wc_para', None) + assert outn is not None + outd = outn.get_dict() + + assert outd.get('successful') + assert outd.get('warnings') == [] + assert outd.get('corelevelshifts') == { + 'W': [[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]] + } + + assert outd.get('formation_energy') == [0.0] + + @pytest.mark.skip(reason='Test is not implemented') + @pytest.mark.timeout(500, method='thread') + def test_fleur_initial_cls_wc_binary_with_given_ref(self, run_with_cache, mock_code_factory): + """ + Full regression test of fleur_initial_cls_wc starting with a crystal structure and parameters + """ + assert False + + @pytest.mark.skip(reason='Test is not implemented') + @pytest.mark.timeout(500, method='thread') + def test_fleur_initial_cls_wc_validation_wrong_inputs(self, run_with_cache, mock_code_factory): + """ + Test the validation behavior of fleur_initial_cls_wc if wrong input is provided it should throw + an exitcode and not start a Fleur run or crash + """ + assert False diff --git a/aiida_fleur/tests/workflows/test_mae_workchain.py b/aiida_fleur/tests/workflows/test_mae_workchain.py new file mode 100644 index 000000000..99dd4eaf3 --- /dev/null +++ b/aiida_fleur/tests/workflows/test_mae_workchain.py @@ -0,0 +1,184 @@ +# -*- coding: utf-8 -*- +############################################################################### +# Copyright (c), Forschungszentrum Jülich GmbH, IAS-1/PGI-1, Germany. # +# All rights reserved. # +# This file is part of the AiiDA-FLEUR package. # +# # +# The code is hosted on GitHub at https://github.com/JuDFTteam/aiida-fleur # +# For further information on the license, see the LICENSE.txt file # +# For further information please visit http://www.flapw.de or # +# http://aiida-fleur.readthedocs.io/en/develop/ # +############################################################################### +''' Various tests for the FleurMaeWorkChain. ''' +from __future__ import absolute_import +from __future__ import print_function + +import pytest +import aiida_fleur +import os +from aiida.engine import run_get_node +from aiida_fleur.workflows.mae import FleurMaeWorkChain + + +# tests +@pytest.mark.usefixtures('aiida_profile', 'clear_database') +class Test_FleurMaeWorkChain: + """ + Regression tests for the FleurEosWorkChain + """ + + @pytest.mark.skip(reason='aiida-testing buggy, todo check, aiida-fleur fixture') + @pytest.mark.timeout(500, method='thread') + def test_fleur_mae_FePt_film(self, run_with_cache, fleur_local_code, inpgen_local_code): + """ + full example using mae workflow with FePt film structure as input. + """ + from aiida.orm import Code, load_node, Dict, StructureData + + options = Dict( + dict={ + 'resources': { + 'num_machines': 1, + 'num_mpiprocs_per_machine': 1 + }, + 'max_wallclock_seconds': 60 * 60, + 'queue_name': '', + 'custom_scheduler_commands': '' + }) + + wf_para_scf = { + 'fleur_runmax': 2, + 'itmax_per_run': 120, + 'density_converged': 0.4, + 'serial': False, + 'mode': 'density' + } + + wf_para_scf = Dict(dict=wf_para_scf) + + wf_para = Dict( + dict={ + 'sqa_ref': [0.7, 0.7], + 'use_soc_ref': False, + 'sqas_theta': [0.0, 1.57079, 1.57079], + 'sqas_phi': [0.0, 0.0, 1.57079], + 'serial': False, + 'soc_off': [], + 'inpxml_changes': [], + }) + + bohr_a_0 = 0.52917721092 # A + a = 7.497 * bohr_a_0 + cell = [[0.7071068 * a, 0.0, 0.0], [0.0, 1.0 * a, 0.0], [0.0, 0.0, 0.7071068 * a]] + structure = StructureData(cell=cell) + structure.append_atom(position=(0.0, 0.0, -1.99285 * bohr_a_0), symbols='Fe', name='Fe123') + structure.append_atom(position=(0.5 * 0.7071068 * a, 0.5 * a, 0.0), symbols='Pt') + structure.append_atom(position=(0., 0., 2.65059 * bohr_a_0), symbols='Pt') + structure.pbc = (True, True, False) + + parameters = Dict( + dict={ + 'atom': { + 'element': 'Pt', + 'lmax': 6 + }, + 'atom2': { + 'element': 'Fe', + 'lmax': 6, + }, + 'comp': { + 'kmax': 3.2, + }, + 'kpt': { + 'div1': 8, #20, + 'div2': 12, #24, + 'div3': 1 + } + }) + + FleurCode = fleur_local_code + InpgenCode = inpgen_local_code + + inputs = { + 'scf': { + 'wf_parameters': wf_para_scf, + 'structure': structure, + 'calc_parameters': parameters, + 'options': options, + 'inpgen': InpgenCode, + 'fleur': FleurCode + }, + 'wf_parameters': wf_para, + 'fleur': FleurCode, + 'options': options + } + + # now run calculation + out, node = run_with_cache(inputs, process_class=FleurMaeWorkChain) + + print(out) + print(node) + + assert node.is_finished_ok + + outpara = out.get('out', None) + assert outpara is not None + outpara = outpara.get_dict() + print(outpara) + + # check output + assert outpara.get('warnings') == [] + assert outpara.get('phi') == [0.0, 0.0, 1.57079] + assert outpara.get('theta') == [0.1, 1.57079, 1.57079] + assert outpara.get('is_it_force_theorem') + assert outpara.get('maes') == [0.0039456509729923, 0.0026014085035566, 0.0] + + @pytest.mark.skip + @pytest.mark.timeout(500, method='thread') + def test_fleur_mae_validation_wrong_inputs(self, fleur_local_code, inpgen_local_code): + """ + Test the validation behavior of FleurMaeWorkChain if wrong input is provided it should throw + an exitcode and not start a Fleur run or crash + """ + from aiida.orm import Dict + + # prepare input nodes and dicts + options = { + 'resources': { + 'num_machines': 1, + 'num_mpiprocs_per_machine': 1 + }, + 'max_wallclock_seconds': 5 * 60, + 'custom_scheduler_commands': '' + } + options = Dict(dict=options).store() + + FleurCode = fleur_local_code + InpgenCode = inpgen_local_code + + ################ + # Create builders + # interface of exposed scf is tested elsewhere + + #spec.exit_code(230, 'ERROR_INVALID_INPUT_PARAM', + # message="Invalid workchain parameters.") + #spec.exit_code(231, 'ERROR_INVALID_INPUT_CONFIG', + # message="Invalid input configuration.") + #spec.exit_code(233, 'ERROR_INVALID_CODE_PROVIDED', + # message="Invalid code node specified, check inpgen and fleur code nodes.") + + # 1. create inputs with wrong wf parameters + inputs1 = {} + + # 2. create inputs with wrong code + # 3. create inputs with invalid input config + + ################### + # now run the builders all should fail early with exit codes + + # 1. structure and fleurinp given + out, node = run_get_node(FleurMaeWorkChain, **inputs1) + assert out == {} + assert node.is_finished + assert not node.is_finished_ok + assert node.exit_status == 230 diff --git a/aiida_fleur/tests/workflows/test_mae_workchain2.py b/aiida_fleur/tests/workflows/test_mae_workchain2.py new file mode 100644 index 000000000..bdf381a44 --- /dev/null +++ b/aiida_fleur/tests/workflows/test_mae_workchain2.py @@ -0,0 +1,192 @@ +# -*- coding: utf-8 -*- +############################################################################### +# Copyright (c), Forschungszentrum Jülich GmbH, IAS-1/PGI-1, Germany. # +# All rights reserved. # +# This file is part of the AiiDA-FLEUR package. # +# # +# The code is hosted on GitHub at https://github.com/JuDFTteam/aiida-fleur # +# For further information on the license, see the LICENSE.txt file # +# For further information please visit http://www.flapw.de or # +# http://aiida-fleur.readthedocs.io/en/develop/ # +############################################################################### +''' Various tests for the FleurMaeWorkChain, different groupping ''' +# Here we test if the interfaces of the workflows are still the same +from __future__ import absolute_import +from __future__ import print_function + +import pytest +import aiida_fleur +import os +from aiida.engine import run_get_node +from aiida_fleur.workflows.mae import FleurMaeWorkChain + +aiida_path = os.path.dirname(aiida_fleur.__file__) + + +# tests +#@pytest.mark.usefixtures("aiida_profile", "clear_database") +@pytest.mark.skip(reason='aiida-testing buggy, todo check, aiida-fleur fixture') +@pytest.mark.timeout(500, method='thread') +def test_fleur_mae_FePt_film( + clear_database, + with_export_cache, #run_with_cache, + fleur_local_code, + inpgen_local_code): + """ + full example using mae workflow with FePt film structure as input. + """ + from aiida.orm import Code, load_node, Dict, StructureData + from aiida.manage.caching import enable_caching + + options = Dict( + dict={ + 'resources': { + 'num_machines': 1, + 'num_mpiprocs_per_machine': 1 + }, + 'max_wallclock_seconds': 60 * 60, + 'queue_name': '', + 'custom_scheduler_commands': '' + }) + + wf_para_scf = { + 'fleur_runmax': 2, + 'itmax_per_run': 120, + 'density_converged': 0.3, + 'serial': False, + 'mode': 'density' + } + + wf_para_scf = Dict(dict=wf_para_scf) + + wf_para = Dict( + dict={ + 'sqa_ref': [0.7, 0.7], + 'use_soc_ref': False, + 'sqas_theta': [0.0, 1.57079, 1.57079], + 'sqas_phi': [0.0, 0.0, 1.57079], + 'serial': False, + 'soc_off': [], + 'inpxml_changes': [], + }) + + bohr_a_0 = 0.52917721092 # A + a = 7.497 * bohr_a_0 + cell = [[0.7071068 * a, 0.0, 0.0], [0.0, 1.0 * a, 0.0], [0.0, 0.0, 0.7071068 * a]] + structure = StructureData(cell=cell) + structure.append_atom(position=(0.0, 0.0, -1.99285 * bohr_a_0), symbols='Fe', name='Fe123') + structure.append_atom(position=(0.5 * 0.7071068 * a, 0.5 * a, 0.0), symbols='Pt') + structure.append_atom(position=(0., 0., 2.65059 * bohr_a_0), symbols='Pt') + structure.pbc = (True, True, False) + + parameters = Dict( + dict={ + 'atom': { + 'element': 'Pt', + 'lmax': 6 + }, + 'atom2': { + 'element': 'Fe', + 'lmax': 6, + }, + 'comp': { + 'kmax': 3.2, + }, + 'kpt': { + 'div1': 8, #20, + 'div2': 12, #24, + 'div3': 1 + } + }) + + FleurCode = fleur_local_code + InpgenCode = inpgen_local_code + + inputs = { + 'scf': { + 'wf_parameters': wf_para_scf, + 'structure': structure, + 'calc_parameters': parameters, + 'options': options, + 'inpgen': InpgenCode, + 'fleur': FleurCode + }, + 'wf_parameters': wf_para, + 'fleur': FleurCode, + 'options': options + } + + # now run calculation + data_dir_path = os.path.join(aiida_path, 'tests/workflows/caches/fleur_mae_FePt.tar.gz') + + #out, node = run_with_cache(inputs, process_class=FleurMaeWorkChain) + #with enable_caching(): + with with_export_cache(data_dir_abspath=data_dir_path): + out, node = run_get_node(FleurMaeWorkChain, **inputs) + print(out) + print(node) + + assert node.is_finished_ok + + outpara = out.get('output_mae_wc_para', None) + assert outpara is not None + outpara = outpara.get_dict() + print(outpara) + + # check output + assert outpara.get('warnings') == [] + assert outpara.get('phi') == [0.0, 0.0, 1.57079] + assert outpara.get('theta') == [0.0, 1.57079, 1.57079] + assert outpara.get('is_it_force_theorem') + assert outpara.get('maes') == [0.0039456509729923, 0.0026014085035566, 0.0] + + +@pytest.mark.skip +@pytest.mark.timeout(5000, method='thread') +def test_fleur_mae_validation_wrong_inputs(fleur_local_code, inpgen_local_code): + """ + Test the validation behavior of FleurMaeWorkChain if wrong input is provided it should throw + an exitcode and not start a Fleur run or crash + """ + from aiida.orm import Dict + + # prepare input nodes and dicts + options = { + 'resources': { + 'num_machines': 1, + 'num_mpiprocs_per_machine': 1 + }, + 'max_wallclock_seconds': 60 * 60, + 'custom_scheduler_commands': '' + } + options = Dict(dict=options).store() + + FleurCode = fleur_local_code + InpgenCode = inpgen_local_code + + ################ + # Create builders + # interface of exposed scf is tested elsewhere + + #spec.exit_code(230, 'ERROR_INVALID_INPUT_PARAM', + # message="Invalid workchain parameters.") + #spec.exit_code(231, 'ERROR_INVALID_INPUT_CONFIG', + # message="Invalid input configuration.") + #spec.exit_code(233, 'ERROR_INVALID_CODE_PROVIDED', + # message="Invalid code node specified, check inpgen and fleur code nodes.") + + # 1. create inputs with wrong wf parameters + inputs1 = {} + + # 2. create inputs with wrong code + # 3. create inputs with invalid input config + + ################### + # now run the builders all should fail early with exit codes + + # 1. structure and fleurinp given + out, node = run_get_node(FleurMaeWorkChain, **inputs1) + assert out == {} + assert node.is_finished + assert not node.is_finished_ok + assert node.exit_status == 230 diff --git a/aiida_fleur/tests/workflows/test_relax_workchain.py b/aiida_fleur/tests/workflows/test_relax_workchain.py new file mode 100644 index 000000000..f0276eb14 --- /dev/null +++ b/aiida_fleur/tests/workflows/test_relax_workchain.py @@ -0,0 +1,160 @@ +# -*- coding: utf-8 -*- +############################################################################### +# Copyright (c), Forschungszentrum Jülich GmbH, IAS-1/PGI-1, Germany. # +# All rights reserved. # +# This file is part of the AiiDA-FLEUR package. # +# # +# The code is hosted on GitHub at https://github.com/JuDFTteam/aiida-fleur # +# For further information on the license, see the LICENSE.txt file # +# For further information please visit http://www.flapw.de or # +# http://aiida-fleur.readthedocs.io/en/develop/ # +############################################################################### +''' Contains tests for the FleurRelaxWorkChain. ''' +from __future__ import absolute_import +from __future__ import print_function + +import pytest +import aiida_fleur +import os +from aiida.engine import run_get_node +from aiida_fleur.workflows.relax import FleurRelaxWorkChain + +aiida_path = os.path.dirname(aiida_fleur.__file__) +TEST_INP_XML_PATH = os.path.join(aiida_path, 'tests/files/inpxml/Si/inp.xml') +CALC_ENTRY_POINT = 'fleur.fleur' +CALC2_ENTRY_POINT = 'fleur.inpgen' + + +# tests +@pytest.mark.usefixtures('aiida_profile', 'clear_database') +class Test_FleurRelaxWorkChain(): + """ + Regression tests for the FleurRelaxWorkChain + """ + + @pytest.mark.skip(reason='Test is not implemented') + @pytest.mark.timeout(500, method='thread') + def test_fleur_relax_fleurinp_Si_bulk(self, run_with_cache, mock_code_factory, create_fleurinp): + """ + full example using FleurRelaxWorkChain with just a fleurinp data as input. + Several fleur runs needed till convergence + """ + from aiida.orm import Code, load_node, Dict, StructureData + from numpy import array + + options = { + 'resources': { + 'num_machines': 1 + }, + 'max_wallclock_seconds': 5 * 60, + 'withmpi': False, + 'custom_scheduler_commands': '' + } + + FleurCode = mock_code = mock_code_factory( + label='fleur', + data_dir_abspath=os.path.join(os.path.dirname(os.path.abspath(__file__)), 'data_dir/'), + entry_point=CALC_ENTRY_POINT, + ignore_files=['_aiidasubmit.sh', 'cdnc', 'out', 'FleurInputSchema.xsd', 'cdn.hdf', 'usage.json', 'cdn??']) + # create process builder to set parameters + builder = FleurRelaxWorkChain.get_builder() + builder.metadata.description = 'Simple Fleur relax test for Si bulk with fleurinp data given' + builder.metadata.label = 'Fleurrelax_test_Si_bulk' + builder.fleurinp = create_fleurinp(TEST_INP_XML_PATH) + builder.options = Dict(dict=options) + builder.fleur = FleurCode + + # now run calculation + out, node = run_with_cache(builder) + + # check output + + @pytest.mark.skip(reason='Test is not implemented') + @pytest.mark.timeout(500, method='thread') + def test_fleur_relax_structure_Si(self, run_with_cache, mock_code_factory): + """ + Full regression test of FleurRelaxWorkChain starting with a crystal structure and parameters + """ + assert False + + @pytest.mark.skip(reason='Test is not implemented') + @pytest.mark.timeout(500, method='thread') + def test_fleur_relax_structure_Si_film(self, run_with_cache, mock_code_factory): + """ + Full regression test of FleurRelaxWorkChain starting with a fleurinp data of a film structure + """ + assert False + + @pytest.mark.skip(reason='Test is not implemented') + @pytest.mark.timeout(500, method='thread') + def test_fleur_relax_continue_converged(self, run_with_cache, mock_code_factory): + """ + Full regression test of FleurRelaxWorkChain starting from an already converged relaxed structure + """ + assert False + + @pytest.mark.timeout(500, method='thread') + def test_fleur_relax_validation_wrong_inputs(self, run_with_cache, mock_code_factory, generate_structure2): + """ + Test the validation behavior of FleurRelaxWorkChain if wrong input is provided it should throw + an exitcode and not start a Fleur run or crash + """ + from aiida.orm import Dict + + # prepare input nodes and dicts + options = { + 'resources': { + 'num_machines': 1, + 'num_mpiprocs_per_machine': 1 + }, + 'max_wallclock_seconds': 5 * 60, + 'withmpi': False, + 'custom_scheduler_commands': '' + } + options = Dict(dict=options).store() + + FleurCode = mock_code_factory( + label='fleur', + data_dir_abspath=os.path.join(os.path.dirname(os.path.abspath(__file__)), 'calc_data_dir/'), + entry_point=CALC_ENTRY_POINT, + ignore_files=['cdnc', 'out', 'FleurInputSchema.xsd', 'cdn.hdf', 'usage.json', 'cdn??']) + InpgenCode = mock_code_factory(label='inpgen', + data_dir_abspath=os.path.join(os.path.dirname(os.path.abspath(__file__)), + 'calc_data_dir/'), + entry_point=CALC2_ENTRY_POINT, + ignore_files=['_aiidasubmit.sh', 'FleurInputSchema.xsd']) + + wf_parameters = Dict(dict={ + 'relax_iter': 5, + 'film_distance_relaxation': False, + 'force_criterion': 0.001, + 'wrong_key': None + }) + wf_parameters.store() + structure = generate_structure2() + structure.store() + + ################ + # Create builders + # interface of exposed scf is tested elsewhere + + # 1. create builder with wrong wf parameters + builder_additionalkeys = FleurRelaxWorkChain.get_builder() + builder_additionalkeys.scf.structure = structure + builder_additionalkeys.wf_parameters = wf_parameters + builder_additionalkeys.scf.fleur = FleurCode + builder_additionalkeys.scf.inpgen = InpgenCode + + ################### + # now run the builders all should fail early with exit codes + + # 1. structure and fleurinp given + out, node = run_get_node(builder_additionalkeys) + assert out == {} + assert node.is_finished + assert not node.is_finished_ok + assert node.exit_status == 230 + + +# maybe validate common interface of code acknostic worklfows and builders, to make sure it can take +# the protocol. diff --git a/aiida_fleur/tests/workflows/test_scf_workchain.py b/aiida_fleur/tests/workflows/test_scf_workchain.py new file mode 100644 index 000000000..82dec4536 --- /dev/null +++ b/aiida_fleur/tests/workflows/test_scf_workchain.py @@ -0,0 +1,427 @@ +# -*- coding: utf-8 -*- +############################################################################### +# Copyright (c), Forschungszentrum Jülich GmbH, IAS-1/PGI-1, Germany. # +# All rights reserved. # +# This file is part of the AiiDA-FLEUR package. # +# # +# The code is hosted on GitHub at https://github.com/JuDFTteam/aiida-fleur # +# For further information on the license, see the LICENSE.txt file # +# For further information please visit http://www.flapw.de or # +# http://aiida-fleur.readthedocs.io/en/develop/ # +############################################################################### +''' Contains various tests for the scf workchain ''' +from __future__ import absolute_import +from __future__ import print_function + +import pytest +import os +import aiida_fleur +from aiida.orm import Code, load_node, Dict, StructureData +from aiida.engine import run_get_node +from aiida_fleur.workflows.scf import FleurScfWorkChain +from aiida_fleur.workflows.base_fleur import FleurBaseWorkChain + +aiida_path = os.path.dirname(aiida_fleur.__file__) +TEST_INP_XML_PATH = os.path.join(aiida_path, 'tests/files/inpxml/Si/inp.xml') +CALC_ENTRY_POINT = 'fleur.fleur' +CALC2_ENTRY_POINT = 'fleur.inpgen' + + +# tests +#@pytest.mark.skip(reason='fleur executable fails here, test prob works') +@pytest.mark.skip(reason='aiida-testing buggy, todo check, aiida-fleur fixture') +@pytest.mark.timeout(500, method='thread') +def test_fleur_scf_fleurinp_Si( + #run_with_cache, + with_export_cache, + fleur_local_code, + create_fleurinp, + clear_database, + clear_spec): + """ + full example using scf workflow with just a fleurinp data as input. + Several fleur runs needed till convergence + """ + options = { + 'resources': { + 'num_machines': 1, + 'num_mpiprocs_per_machine': 1 + }, + 'max_wallclock_seconds': 5 * 60, + 'withmpi': False, + 'custom_scheduler_commands': '' + } + + FleurCode = fleur_local_code + + # create process builder to set parameters + builder = FleurScfWorkChain.get_builder() + builder.metadata.description = 'Simple Fleur SCF test for Si bulk with fleurinp data given' + builder.metadata.label = 'FleurSCF_test_Si_bulk' + builder.fleurinp = create_fleurinp(TEST_INP_XML_PATH).store() + builder.options = Dict(dict=options).store() + builder.fleur = FleurCode + #print(builder) + + # now run calculation + #run_with_cache(builder) + data_dir_path = os.path.join(aiida_path, 'tests/workflows/caches/fleur_scf_fleurinp_Si.tar.gz') + with with_export_cache(data_dir_abspath=data_dir_path): + out, node = run_get_node(builder) + #print(out) + #print(node) + + assert node.is_finished_ok + # check output + n = out['output_scf_wc_para'] + n = n.get_dict() + #print(n) + assert abs(n.get('distance_charge') - 9.8993e-06) < 10**-9 + assert n.get('errors') == [] + #assert abs(n.get('starting_fermi_energy') - 0.409241) < 10**-14 + + +@pytest.mark.skip(reason='aiida-testing buggy, todo check, aiida-fleur fixture') +@pytest.mark.timeout(500, method='thread') +def test_fleur_scf_structure_Si(run_with_cache, clear_database, fleur_local_code, inpgen_local_code, + generate_structure2, clear_spec): + """ + Full regression test of FleurScfWorkchain starting with a crystal structure and parameters + Check if calc parameters are given through, check if wf default parameters are updated + """ + # prepare input nodes and dicts + options = { + 'resources': { + 'num_machines': 1, + 'num_mpiprocs_per_machine': 1 + }, + 'max_wallclock_seconds': 5 * 60, + 'withmpi': False, + 'custom_scheduler_commands': '' + } + FleurCode = fleur_local_code + InpgenCode = inpgen_local_code + + wf_parameters = {'serial': True, 'itmax_per_run': 30} + + calc_parameters = { + 'atom': { + 'element': 'Si', + 'rmt': 2.1, + 'jri': 981, + 'lmax': 8, + 'lnonsph': 6 + }, + 'comp': { + 'kmax': 3.4 + }, + 'kpt': { + 'div1': 10, + 'div2': 10, + 'div3': 10, + 'tkb': 0.0005 + } + } + + #calc_parameters = {'atom': {'element': "W", 'rmt': 2.3, 'jri': 981, 'lmax': 10, + # 'lnonsph': 6, 'econfig': '[Kr] 4d10 4f14 | 5s2 5p6 6s2 5d4', 'lo': '5s 5p'}, + # 'comp': {'kmax': 3.5}, + # 'kpt': {'div1': 15, 'div2': 15, 'div3': 15, 'tkb': 0.0005}} + + # create process builder to set parameters + builder = FleurScfWorkChain.get_builder() + builder.metadata.description = 'Simple Fleur SCF test for Si bulk with structure, calc para and wf para given' + builder.metadata.label = 'FleurSCF_test_Si_bulk' + builder.structure = generate_structure2().store() + builder.options = Dict(dict=options).store() + builder.calc_parameters = Dict(dict=calc_parameters).store() + builder.wf_parameters = Dict(dict=wf_parameters).store() + builder.fleur = FleurCode.store() + builder.inpgen = InpgenCode.store() + print(builder) + + # now run scf with cache fixture + out, node = run_with_cache(builder) + #out, node = run_get_node(builder) + print(out) + print(node) + + assert node.is_finished_ok + # check output + n = out['output_scf_wc_para'] + n = n.get_dict() + print(n) + assert abs(n.get('distance_charge') - 8.0987e-06) < 10**-9 + assert n.get('errors') == [] + + +@pytest.mark.skip(reason='aiida-testing buggy, todo check, aiida-fleur fixture') +@pytest.mark.timeout(500, method='thread') +def test_fleur_scf_non_convergence(run_with_cache, clear_database, fleur_local_code, inpgen_local_code, + generate_structure2, clear_spec): + """ + Full regression test of FleurScfWorkchain starting with a crystal structure and parameters + Check if calc parameters are given through, check if wf default parameters are updated + """ + # prepare input nodes and dicts + options = { + 'resources': { + 'num_machines': 1, + 'num_mpiprocs_per_machine': 1 + }, + 'max_wallclock_seconds': 5 * 60, + 'withmpi': False, + 'custom_scheduler_commands': '' + } + FleurCode = fleur_local_code + InpgenCode = inpgen_local_code + + wf_parameters = {'serial': True, 'itmax_per_run': 3} + + calc_parameters = { + 'atom': { + 'element': 'Si', + 'rmt': 2.1, + 'jri': 981, + 'lmax': 8, + 'lnonsph': 6 + }, + 'comp': { + 'kmax': 3.4 + }, + 'kpt': { + 'div1': 10, + 'div2': 10, + 'div3': 10, + 'tkb': 0.0005 + } + } + + # create process builder to set parameters + builder = FleurScfWorkChain.get_builder() + builder.metadata.description = 'Simple Fleur SCF test for Si bulk which does not converge' + builder.metadata.label = 'FleurSCF_test_Si_bulk' + builder.structure = generate_structure2().store() + builder.options = Dict(dict=options).store() + builder.calc_parameters = Dict(dict=calc_parameters).store() + builder.wf_parameters = Dict(dict=wf_parameters).store() + builder.fleur = FleurCode.store() + builder.inpgen = InpgenCode.store() + print(builder) + + # now run scf with cache fixture + out, node = run_with_cache(builder) + print(out) + print(node) + assert not node.is_finished_ok + assert node.exit_status == 362 + + +@pytest.mark.skip(reason='aiida-testing buggy, todo check, aiida-fleur fixture') +@pytest.mark.timeout(500, method='thread') +def test_fleur_scf_fleurinp_Si_modifications( + #run_with_cache, + with_export_cache, + #mock_code_factory, + #aiida_local_code_factory, + fleur_local_code, + create_fleurinp, + clear_database, + clear_spec): + """ + Full regression test of FleurScfWorkchain starting with a fleurinp data, + but adjusting the Fleur input file before the fleur run. + """ + + wf_parameters = { + 'fleur_runmax': 4, + 'density_converged': 0.0002, + 'energy_converged': 0.002, + 'force_converged': 0.002, + 'mode': 'density', # 'density', 'energy' or 'force' + 'serial': True, + 'itmax_per_run': 30, + 'force_dict': { + 'qfix': 2, + 'forcealpha': 0.5, + 'forcemix': 'BFGS' + }, + 'inpxml_changes': [('set_inpchanges', { + 'change_dict': { + 'Kmax': 3.8 + } + })], + } + + options = { + 'resources': { + 'num_machines': 1, + 'num_mpiprocs_per_machine': 1 + }, + 'max_wallclock_seconds': 5 * 60, + 'withmpi': False, + 'custom_scheduler_commands': '' + } + + FleurCode = fleur_local_code + + # create process builder to set parameters + builder = FleurScfWorkChain.get_builder() + builder.metadata.description = 'Simple Fleur SCF test for Si bulk with fleurinp data given and mod request' + builder.metadata.label = 'FleurSCF_test_Si_bulk_mod' + builder.fleurinp = create_fleurinp(TEST_INP_XML_PATH).store() + builder.options = Dict(dict=options).store() + builder.wf_parameters = Dict(dict=wf_parameters).store() + builder.fleur = FleurCode + #print(builder) + + # now run calculation + #run_with_cache(builder) + data_dir_path = os.path.join(aiida_path, 'tests/workflows/caches/fleur_scf_fleurinp_Si_mod.tar.gz') + + with with_export_cache(data_dir_abspath=data_dir_path): + out, node = run_get_node(builder) + print(out) + #print(node) + assert node.is_finished_ok + # check output + n = out['output_scf_wc_para'] + n = n.get_dict() + lasto = out['last_fleur_calc_output'] + calc = lasto.get_incoming().all()[0].node + print(calc) + print(calc.get_cache_source()) + lasto = lasto.get_dict() + + print(n) + #get kmax and minDistance + assert abs(n.get('distance_charge') - 0.0001671267) < 10**-9 + assert n.get('errors') == [] + assert lasto['kmax'] == 3.8 + + +@pytest.mark.skip(reason='Test is not implemented') +@pytest.mark.timeout(500, method='thread') +def test_fleur_scf_continue_converged(run_with_cache, mock_code_factory): + """ + Full regression test of FleurScfWorkchain starting from an already converged fleur calculation, + remote data + """ + assert False + + +@pytest.mark.timeout(500, method='thread') +def test_fleur_scf_validation_wrong_inputs(run_with_cache, mock_code_factory, create_fleurinp, generate_structure2, + clear_spec, clear_database): + """ + Test the validation behavior of FleurScfWorkchain if wrong input is provided it should throw + an exitcode and not start a Fleur run or crash + """ + #from aiida.engine import run_get_node + + #clear_spec() + + # prepare input nodes and dicts + options = { + 'resources': { + 'num_machines': 1, + 'num_mpiprocs_per_machine': 1 + }, + 'max_wallclock_seconds': 5 * 60, + 'withmpi': False, + 'custom_scheduler_commands': '' + } + options = Dict(dict=options).store() + + FleurCode = mock_code_factory( + label='fleur', + data_dir_abspath=os.path.join(os.path.dirname(os.path.abspath(__file__)), 'calc_data_dir/'), + entry_point=CALC_ENTRY_POINT, + ignore_files=['cdnc', 'out', 'FleurInputSchema.xsd', 'cdn.hdf', 'usage.json', 'cdn??']) + InpgenCode = mock_code_factory(label='inpgen', + data_dir_abspath=os.path.join(os.path.dirname(os.path.abspath(__file__)), + 'calc_data_dir/'), + entry_point=CALC2_ENTRY_POINT, + ignore_files=['_aiidasubmit.sh', 'FleurInputSchema.xsd']) + + calc_parameters = Dict(dict={}) + calc_parameters.store() + structure = generate_structure2() + structure.store() + fleurinp = create_fleurinp(TEST_INP_XML_PATH) + fleurinp.store() + + ################ + # Create builders + + # 1. create builder structure and fleurinp + builder_struc_fleurinp = FleurScfWorkChain.get_builder() + builder_struc_fleurinp.structure = structure + builder_struc_fleurinp.fleurinp = fleurinp + builder_struc_fleurinp.options = options + builder_struc_fleurinp.fleur = FleurCode + builder_struc_fleurinp.inpgen = InpgenCode + + # 2. create builder structure no inpgen given + builder_no_inpgen = FleurScfWorkChain.get_builder() + builder_no_inpgen.structure = structure + builder_no_inpgen.options = options + builder_no_inpgen.fleur = FleurCode + + # 3. create builder no fleurcode given + builder_no_fleur = FleurScfWorkChain.get_builder() + builder_no_fleur.structure = structure + builder_no_fleur.options = options + builder_no_fleur.inpgen = InpgenCode + + # 4. wrong code given (here we swap) + builder_wrong_code = FleurScfWorkChain.get_builder() + builder_wrong_code.structure = structure + builder_wrong_code.options = options + builder_wrong_code.inpgen = FleurCode + builder_wrong_code.fleur = InpgenCode + + # 5. create builder fleurinp and calc_parameter given + + builder_calc_para_fleurinp = FleurScfWorkChain.get_builder() + builder_calc_para_fleurinp.calc_parameters = calc_parameters + builder_calc_para_fleurinp.fleurinp = fleurinp + builder_calc_para_fleurinp.options = options + builder_calc_para_fleurinp.fleur = FleurCode + builder_calc_para_fleurinp.inpgen = InpgenCode + + ################### + # now run the buidlers all should fail early with exit codes + + # 1. structure and fleurinp given + out, node = run_get_node(builder_struc_fleurinp) + assert out == {} + assert node.is_finished + assert not node.is_finished_ok + assert node.exit_status == 231 + + # 2. structure and no inpgen given + out, node = run_get_node(builder_no_inpgen) + assert out == {} + assert node.is_finished + assert not node.is_finished_ok + assert node.exit_status == 231 + + # 3. no fleur code given, since not optional input, + # caught by aiida during creation + with pytest.raises(ValueError) as e_info: + out, node = run_get_node(builder_no_fleur) + + # 4. wrong code type given + out, node = run_get_node(builder_wrong_code) + assert out == {} + assert node.is_finished + assert not node.is_finished_ok + assert node.exit_status == 233 + + # 5. calc_parameter and fleurinp given + out, node = run_get_node(builder_calc_para_fleurinp) + assert out == {} + assert node.is_finished + assert not node.is_finished_ok + assert node.exit_status == 231 diff --git a/aiida_fleur/tools/StructureData_util.py b/aiida_fleur/tools/StructureData_util.py index 184ac72a6..4129ed27e 100644 --- a/aiida_fleur/tools/StructureData_util.py +++ b/aiida_fleur/tools/StructureData_util.py @@ -9,7 +9,6 @@ # For further information please visit http://www.flapw.de or # # http://aiida-fleur.readthedocs.io/en/develop/ # ############################################################################### - """ Collection of utility routines dealing with StructureData objects """ @@ -21,8 +20,6 @@ # from ase.lattice.surface import * # from ase.io import * import six -from six.moves import range -from six.moves import zip from pymatgen.core.surface import generate_all_slabs, get_symmetrically_distinct_miller_indices from pymatgen.core.surface import SlabGenerator @@ -38,8 +35,8 @@ def is_structure(structure): """ Test if the given input is a StructureData node, by object, id, or pk - if yes returns a StructureData node in all cases - if no returns None + :param structure: AiiDA StructureData + :return: if yes returns a StructureData node in all cases, if no returns None """ from aiida.common import NotExistent @@ -62,7 +59,8 @@ def is_structure(structure): def is_primitive(structure): """ Checks if a structure is primitive or not, - returns True if the structure can not be anymore refined. + :param structure: AiiDA StructureData + :return: True if the structure can not be anymore refined. prints False if the structure can be futher refined. """ refined_cell = find_primitive_cell(structure) @@ -80,10 +78,10 @@ def rescale(inp_structure, scale): therefore the absolute postions change. Keeps the provenance in the database. - :param inp_structure, a StructureData node (pk, or uuid) - :param scale, float scaling factor for the cell + :param inp_structure: a StructureData node (pk, or uuid) + :param scale: float scaling factor for the cell - :returns: New StructureData node with rescalled structure, which is linked to input Structure + :return: New StructureData node with rescalled structure, which is linked to input Structure and None if inp_structure was not a StructureData """ @@ -96,10 +94,10 @@ def rescale_nowf(inp_structure, scale): therefore the absolute postions change. DOES NOT keep the provenance in the database. - :param inp_structure, a StructureData node (pk, or uuid) - :param scale, float scaling factor for the cell + :param inp_structure: a StructureData node (pk, or uuid) + :param scale: float scaling factor for the cell - :returns: New StructureData node with rescalled structure, which is linked to input Structure + :return: New StructureData node with rescalled structure, which is linked to input Structure and None if inp_structure was not a StructureData """ @@ -111,23 +109,14 @@ def rescale_nowf(inp_structure, scale): the_ase = structure.get_ase() new_ase = the_ase.copy() - new_ase.set_cell(the_ase.get_cell() * - np.power(float(scale), 1.0/3), scale_atoms=True) + new_ase.set_cell(the_ase.get_cell() * np.power(float(scale), 1.0 / 3), scale_atoms=True) rescaled_structure = DataFactory('structure')(ase=new_ase) - rescaled_structure.label = '{} rescaled {}'.format(scale, structure.uuid) + rescaled_structure.label = '{} rescaled'.format(scale) #, structure.uuid) + #uuids in node labels are bad for caching rescaled_structure.pbc = structure.pbc return rescaled_structure -# @cf - - -def rescale_xyz(inp_structure, scalevec): - """ - rescales a structure a certain way... - """ - pass - @cf def supercell(inp_structure, n_a1, n_a2, n_a3): @@ -139,7 +128,7 @@ def supercell(inp_structure, n_a1, n_a2, n_a3): :param scale: tuple of 3 AiiDA integers, number of cells in a1, a2, a3, or if cart =True in x,y,z - :returns StructureData, Node with supercell + :return: StructureData Node with supercell """ superc = supercell_ncf(inp_structure, n_a1, n_a2, n_a3) @@ -155,9 +144,9 @@ def supercell_ncf(inp_structure, n_a1, n_a2, n_a3): :param StructureData: a StructureData node (pk, or uuid) :param scale: tuple of 3 AiiDA integers, number of cells in a1, a2, a3, or if cart=True in x,y,z - :returns StructureData, Node with supercell + :return: StructureData Node with supercell """ - #print('in create supercell') + # print('in create supercell') # test if structure: structure = is_structure(inp_structure) if not structure: @@ -175,9 +164,9 @@ def supercell_ncf(inp_structure, n_a1, n_a2, n_a3): na3 = int(n_a3) # new cell - new_a1 = [i*na1 for i in old_a1] - new_a2 = [i*na2 for i in old_a2] - new_a3 = [i*na3 for i in old_a3] + new_a1 = [i * na1 for i in old_a1] + new_a2 = [i * na2 for i in old_a2] + new_a3 = [i * na3 for i in old_a3] new_cell = [new_a1, new_a2, new_a3] new_structure = DataFactory('structure')(cell=new_cell, pbc=old_pbc) @@ -218,8 +207,7 @@ def supercell_ncf(inp_structure, n_a1, n_a2, n_a3): formula = inp_structure.get_formula() new_structure.label = 'supercell of {}'.format(formula) - new_structure.description = '{}x{}x{} supercell of {}'.format( - n_a1, n_a2, n_a3, formula) + new_structure.description = '{}x{}x{} supercell of {}'.format(n_a1, n_a2, n_a3, formula) return new_structure @@ -228,6 +216,10 @@ def supercell_ncf(inp_structure, n_a1, n_a2, n_a3): def abs_to_rel(vector, cell): """ Converts a position vector in absolute coordinates to relative coordinates. + + :param vector: list or np.array of length 3, vector to be converted + :param cell: Bravais matrix of a crystal 3x3 Array, List of list or np.array + :return: list of legth 3 of scaled vector, or False if vector was not length 3 """ if len(vector) == 3: @@ -236,7 +228,7 @@ def abs_to_rel(vector, cell): postionR = np.array(vector) # np.matmul(inv_cell_np, postionR)# new_rel_post = np.matmul(postionR, inv_cell_np) - new_rel_pos = [i for i in new_rel_post] + new_rel_pos = list(new_rel_post) return new_rel_pos else: return False @@ -246,6 +238,11 @@ def abs_to_rel_f(vector, cell, pbc): """ Converts a position vector in absolute coordinates to relative coordinates for a film system. + + :param vector: list or np.array of length 3, vector to be converted + :param cell: Bravais matrix of a crystal 3x3 Array, List of list or np.array + :param pb: Boundary conditions, List or Tuple of 3 Boolean + :return: list of legth 3 of scaled vector, or False if vector was not length 3 """ # TODO this currently only works if the z-coordinate is the one with no pbc # Therefore if a structure with x non pbc is given this should also work. @@ -260,7 +257,7 @@ def abs_to_rel_f(vector, cell, pbc): cell_np = np.array(cell_np[0:2, 0:2]) inv_cell_np = np.linalg.inv(cell_np) # np.matmul(inv_cell_np, postionR_f)] - new_xy = [i for i in np.matmul(postionR_f, inv_cell_np)] + new_xy = np.matmul(postionR_f, inv_cell_np) new_rel_pos_f = [new_xy[0], new_xy[1], postionR[2]] return new_rel_pos_f else: @@ -273,15 +270,17 @@ def rel_to_abs(vector, cell): """ Converts a position vector in internal coordinates to absolute coordinates in Angstrom. + + :param vector: list or np.array of length 3, vector to be converted + :param cell: Bravais matrix of a crystal 3x3 Array, List of list or np.array + :return: list of legth 3 of scaled vector, or False if vector was not lenth 3 """ if len(vector) == 3: cell_np = np.array(cell) postionR = np.array(vector) new_abs_post = np.matmul(postionR, cell_np) - new_abs_pos = [i for i in new_abs_post] - + new_abs_pos = list(new_abs_post) return new_abs_pos - else: return False @@ -299,7 +298,7 @@ def rel_to_abs_f(vector, cell): postionR_f = np.array(postionR[:2]) cell_np = np.array(cell) cell_np = np.array(cell_np[0:2, 0:2]) - new_xy = [i for i in np.matmul(postionR_f, cell_np)] + new_xy = np.matmul(postionR_f, cell_np) new_abs_pos_f = [new_xy[0], new_xy[1], postionR[2]] return new_abs_pos_f else: @@ -307,15 +306,15 @@ def rel_to_abs_f(vector, cell): @cf -def break_symmetry_wf(structure, wf_para, parameterData=None): +def break_symmetry_wf(structure, wf_para, parameterdata=None): """ This is the calcfunction of the routine break_symmetry, which introduces different 'kind objects' in a structure and names them that inpgen will make different species/atomgroups out of them. If nothing specified breaks ALL symmetry (i.e. every atom gets their own kind) - :params: StructureData - :params wf_para: ParameterData which contains the keys atoms, sites, pos (see below) + :param structure: StructureData + :param wf_para: ParameterData which contains the keys atoms, sites, pos (see below) 'atoms': python list of symbols, exp: ['W', 'Be']. This would make for @@ -331,43 +330,45 @@ def break_symmetry_wf(structure, wf_para, parameterData=None): Be carefull the number given has to match EXACTLY the position in the structure. - :params parameterData: AiiDa ParameterData + :param parameterdata: AiiDa ParameterData :return: StructureData, a AiiDA crystal structure with new kind specification. """ Dict = DataFactory('dict') - if parameterData is None: - parameterData = Dict(dict={}) + if parameterdata is None: + parameterdata = Dict(dict={}) wf_dict = wf_para.get_dict() atoms = wf_dict.get('atoms', ['all']) sites = wf_dict.get('site', []) pos = wf_dict.get('pos', []) new_kinds_names = wf_dict.get('new_kinds_names', {}) - new_structure, para_new = break_symmetry( - structure, atoms=atoms, site=sites, pos=pos, - new_kinds_names=new_kinds_names, parameterData=parameterData) + new_structure, para_new = break_symmetry(structure, + atoms=atoms, + site=sites, + pos=pos, + new_kinds_names=new_kinds_names, + parameterdata=parameterdata) return {'new_structure': new_structure, 'new_parameters': para_new} # TODO: Bug: parameter data production not right...to many atoms list if break sym of everything -def break_symmetry(structure, atoms=None, site=None, pos=None, - new_kinds_names=None, parameterData=None): +def break_symmetry(structure, atoms=None, site=None, pos=None, new_kinds_names=None, parameterdata=None): """ This routine introduces different 'kind objects' in a structure and names them that inpgen will make different species/atomgroups out of them. If nothing specified breaks ALL symmetry (i.e. every atom gets their own kind) - :params: StructureData - :params atoms: python list of symbols, exp: ['W', 'Be']. This would make for + :param structure: StructureData + :param atoms: python list of symbols, exp: ['W', 'Be']. This would make for all Be and W atoms their own kinds. - :params site: python list of integers, exp: [1, 4, 8]. This would create for + :param site: python list of integers, exp: [1, 4, 8]. This would create for atom 1, 4 and 8 their own kinds. - :params pos: python list of tuples of 3, exp [(0.0, 0.0, -1.837927), ...]. + :param pos: python list of tuples of 3, exp [(0.0, 0.0, -1.837927), ...]. This will create a new kind for the atom at that position. Be carefull the number given has to match EXACTLY the position in the structure. - return: StructureData, a AiiDA crystal structure with new kind specification. + :return: StructureData, a AiiDA crystal structure with new kind specification. """ if atoms is None: atoms = ['all'] @@ -384,14 +385,13 @@ def break_symmetry(structure, atoms=None, site=None, pos=None, from aiida.common.constants import elements as PeriodicTableElements from aiida.orm import Dict - _atomic_numbers = {data['symbol']: num for num, - data in six.iteritems(PeriodicTableElements)} + _atomic_numbers = {data['symbol']: num for num, data in six.iteritems(PeriodicTableElements)} # get all atoms, get the symbol of the atom # if wanted make individual kind for that atom # kind names will be atomsymbol+number # create new structure with new kinds and atoms - #Param = DataFactory('dict') + # Param = DataFactory('dict') symbol_count = {} # Counts the atom symbol occurrence to set id's and kind names right replace = [] # all atoms symbols ('W') to be replaced replace_siteN = [] # all site integers to be replaced @@ -405,7 +405,7 @@ def break_symmetry(structure, atoms=None, site=None, pos=None, cell = struc.cell pbc = struc.pbc sites = struc.sites - #natoms = len(sites) + # natoms = len(sites) new_structure = DataFactory('structure')(cell=cell, pbc=pbc) for sym in atoms: @@ -415,15 +415,15 @@ def break_symmetry(structure, atoms=None, site=None, pos=None, for atom in site: replace_siteN.append(atom) - if parameterData: - para = parameterData.get_dict() + if parameterdata: + para = parameterdata.get_dict() new_parameterd = dict(para) else: new_parameterd = {} - for i, site in enumerate(sites): - kind_name = site.kind_name - pos = site.position + for i, site_c in enumerate(sites): + kind_name = site_c.kind_name + pos = site_c.position kind = struc.get_kind(kind_name) symbol = kind.symbol replace_kind = False @@ -441,21 +441,21 @@ def break_symmetry(structure, atoms=None, site=None, pos=None, symbol_new_kinds_names = new_kinds_names.get(symbol, []) # print(symbol_new_kinds_names) if symbol_new_kinds_names and ((len(symbol_new_kinds_names)) == symbol_count[symbol]): - newkindname = symbol_new_kinds_names[symbol_count[symbol]-1] + newkindname = symbol_new_kinds_names[symbol_count[symbol] - 1] else: newkindname = '{}{}'.format(symbol, symbol_count[symbol]) else: symbol_count[symbol] = 1 symbol_new_kinds_names = new_kinds_names.get(symbol, []) if symbol_new_kinds_names and ((len(symbol_new_kinds_names)) == symbol_count[symbol]): - newkindname = symbol_new_kinds_names[symbol_count[symbol]-1] + newkindname = symbol_new_kinds_names[symbol_count[symbol] - 1] else: newkindname = '{}{}'.format(symbol, symbol_count[symbol]) new_kind = Kind(name=newkindname, symbols=symbol) new_structure.append_kind(new_kind) # now we have to add an atom list to parameterData with the corresponding id. - if parameterData: + if parameterdata: # '{}.{}'.format(charge, symbol_count[symbol]) id_a = symbol_count[symbol] for key, val in six.iteritems(para): @@ -464,27 +464,24 @@ def break_symmetry(structure, atoms=None, site=None, pos=None, if id_a and id_a == val.get('id', None): break # we assume the user is smart and provides a para node, # which incorporates the symmetry breaking already - elif id_a: # != 1: # copy parameter of symbol and add id + if id_a: # != 1: # copy parameter of symbol and add id val_new = dict(val) # getting the charge over element might be risky - charge = _atomic_numbers.get( - (val.get('element'))) - idp = '{}.{}'.format( - charge, symbol_count[symbol]) - idp = float("{0:.2f}".format(float(idp))) + charge = _atomic_numbers.get((val.get('element'))) + idp = '{}.{}'.format(charge, symbol_count[symbol]) + idp = float('{0:.2f}'.format(float(idp))) # dot cannot be stored in AiiDA dict... val_new.update({u'id': idp}) atomlistname = 'atom{}'.format(id_a) i = 0 while new_parameterd.get(atomlistname, {}): - i = i+1 - atomlistname = 'atom{}'.format(id_a+i) + i = i + 1 + atomlistname = 'atom{}'.format(id_a + i) - symbol_new_kinds_names = new_kinds_names.get( - symbol, []) + symbol_new_kinds_names = new_kinds_names.get(symbol, []) # print(symbol_new_kinds_names) if symbol_new_kinds_names and ((len(symbol_new_kinds_names)) == symbol_count[symbol]): - species_name = symbol_new_kinds_names[symbol_count[symbol]-1] + species_name = symbol_new_kinds_names[symbol_count[symbol] - 1] val_new.update({u'name': species_name}) new_parameterd[atomlistname] = val_new @@ -497,7 +494,7 @@ def break_symmetry(structure, atoms=None, site=None, pos=None, new_structure.append_kind(kind) new_structure.append_site(Site(kind_name=newkindname, position=pos)) - if parameterData: + if parameterdata: para_new = Dict(dict=new_parameterd) else: para_new = None @@ -513,11 +510,11 @@ def find_equi_atoms(structure): # , sitenumber=0, position=None): This routine uses spglib and ASE to provide informations of all equivivalent atoms in the cell. - params: AiiDA StructureData + :param structure: AiiDA StructureData - returns: equi_info_symbol : list of lists ['element': site_indexlist, ...] - len(equi_info_symbol) = number of symmetryatomtypes - returns: n_equi_info_symbol: dict {'element': numberequiatomstypes} + :return: equi_info_symbol, list of lists ['element': site_indexlist, ...] + len(equi_info_symbol) = number of symmetryatomtypes + and n_equi_info_symbol, dict {'element': numberequiatomstypes} """ import spglib @@ -551,7 +548,8 @@ def find_equi_atoms(structure): # , sitenumber=0, position=None): def get_spacegroup(structure): """ - returns the spacegorup of a given AiiDA structure + :param structure: AiiDA StructureData + :return: the spacegroup (spglib class) of a given AiiDA structure """ import spglib s_ase = structure.get_ase() @@ -565,12 +563,11 @@ def move_atoms_incell_wf(structure, wf_para): """ moves all atoms in a unit cell by a given vector - para: AiiDA structure - para: vector: tuple of 3, or array - (currently 3 AiiDA Floats to make it a wf, - In the future maybe a list or vector if AiiDa basetype exists) - - returns: AiiDA stucture + :param structure: AiiDA structure + :param wf_para: AiiDA Dict node with vector: tuple of 3, or array + (currently 3 AiiDA Floats to make it a wf, + In the future maybe a list or vector if AiiDa basetype exists) + :return: AiiDA stucture """ wf_para_dict = wf_para.get_dict() vector = wf_para_dict.get('vector', [0.0, 0.0, 0.0]) @@ -584,10 +581,9 @@ def move_atoms_incell(structure, vector): """ moves all atoms in a unit cell by a given vector - para: AiiDA structure - para: vector: tuple of 3, or array - - returns: AiiDA structure + :param structure: AiiDA structure + :param vector: tuple of 3, or array + :return: AiiDA structure """ StructureData = DataFactory('structure') @@ -599,7 +595,7 @@ def move_atoms_incell(structure, vector): for site in sites: pos = site.position - new_pos = np.array(pos) + np.array(vector) + new_pos = np.around(np.array(pos) + np.array(vector), decimals=10) new_site = Site(kind_name=site.kind_name, position=new_pos) new_structure.append_site(new_site) new_structure.label = structure.label @@ -612,9 +608,9 @@ def move_atoms_incell(structure, vector): def find_primitive_cell(structure): """ uses spglib find_primitive to find the primitive cell - params: AiiDa structure data - returns: list of new AiiDa structure data + :param sructure: AiiDA structure data + :return: list of new AiiDA structure data """ # TODO: if refinced structure is the same as given structure # return the given structure (Is this good practise for prov?) @@ -623,14 +619,12 @@ def find_primitive_cell(structure): StructureData = DataFactory('structure') symprec = 1e-7 - #print('old {}'.format(len(structure.sites))) + # print('old {}'.format(len(structure.sites))) ase_structure = structure.get_ase() - lattice, scaled_positions, numbers = find_primitive( - ase_structure, symprec=symprec) - new_structure_ase = Atoms( - numbers, scaled_positions=scaled_positions, cell=lattice, pbc=True) + lattice, scaled_positions, numbers = find_primitive(ase_structure, symprec=symprec) + new_structure_ase = Atoms(numbers, scaled_positions=scaled_positions, cell=lattice, pbc=True) new_structure = StructureData(ase=new_structure_ase) - #print('new {}'.format(len(new_structure.sites))) + # print('new {}'.format(len(new_structure.sites))) new_structure.label = structure.label + ' primitive' new_structure.description = structure.description + ' primitive cell' @@ -641,9 +635,9 @@ def find_primitive_cell(structure): def find_primitive_cell_wf(structure): """ uses spglib find_primitive to find the primitive cell - params: AiiDa structure data + :param structure: AiiDa structure data - returns: list of new AiiDa structure data + :return: list of new AiiDa structure data """ return {'primitive_cell': find_primitive_cell(structure)} @@ -652,9 +646,9 @@ def find_primitive_cell_wf(structure): def find_primitive_cells(uuid_list): """ uses spglib find_primitive to find the primitive cell - params: list of structureData uuids, or pks + :param uuid_list: list of structureData uuids, or pks - returns: list of new AiiDa structure datas + :return: list of new AiiDa structure datas """ new_structures = [] @@ -672,22 +666,38 @@ def get_all_miller_indices(structure, highestindex): return get_symmetrically_distinct_miller_indices(structure.get_pymatgen_structure(), highestindex) -def create_all_slabs_buggy(initial_structure, miller_index, min_slab_size_ang, min_vacuum_size=0, - bonds=None, tol=1e-3, max_broken_bonds=0, - lll_reduce=False, center_slab=False, primitive=False, - max_normal_search=None, symmetrize=False): # , reorient_lattice=True): +def create_all_slabs_buggy(initial_structure, + miller_index, + min_slab_size_ang, + min_vacuum_size=0, + bonds=None, + tol=1e-3, + max_broken_bonds=0, + lll_reduce=False, + center_slab=False, + primitive=False, + max_normal_search=None, + symmetrize=False): # , reorient_lattice=True): """ wraps the pymatgen function generate_all_slabs with some useful extras - returns a dictionary of structures + :return: a dictionary of structures """ StructureData = DataFactory('structure') aiida_strucs = {} pymat_struc = initial_structure.get_pymatgen_structure() # currently the pymatgen method is buggy... no coordinates in x,y.... - all_slabs = generate_all_slabs(pymat_struc, miller_index, min_slab_size_ang, min_vacuum_size, - bonds=bonds, tol=tol, max_broken_bonds=max_broken_bonds, - lll_reduce=lll_reduce, center_slab=center_slab, primitive=primitive, - max_normal_search=max_normal_search, symmetrize=symmetrize) # , reorient_lattice=reorient_lattice) + all_slabs = generate_all_slabs(pymat_struc, + miller_index, + min_slab_size_ang, + min_vacuum_size, + bonds=bonds, + tol=tol, + max_broken_bonds=max_broken_bonds, + lll_reduce=lll_reduce, + center_slab=center_slab, + primitive=primitive, + max_normal_search=max_normal_search, + symmetrize=symmetrize) # , reorient_lattice=reorient_lattice) for slab in all_slabs: # print(slab) # slab2 = #slab.get_orthogonal_c_slab() @@ -697,20 +707,27 @@ def create_all_slabs_buggy(initial_structure, miller_index, min_slab_size_ang, m return aiida_strucs -def create_all_slabs(initial_structure, miller_index, min_slab_size_ang, min_vacuum_size=0, - bonds=None, tol=1e-3, max_broken_bonds=0, - lll_reduce=False, center_slab=False, primitive=False, - max_normal_search=1, symmetrize=False): # , reorient_lattice=True): +def create_all_slabs(initial_structure, + miller_index, + min_slab_size_ang, + min_vacuum_size=0, + bonds=None, + tol=1e-3, + max_broken_bonds=0, + lll_reduce=False, + center_slab=False, + primitive=False, + max_normal_search=1, + symmetrize=False): # , reorient_lattice=True): """ - returns a dictionary of structures + :return: a dictionary of structures """ StructureData = DataFactory('structure') aiida_strucs = {} - #pymat_struc = initial_structure.get_pymatgen_structure() + # pymat_struc = initial_structure.get_pymatgen_structure() indices = get_all_miller_indices(initial_structure, miller_index) for index in indices: - slab = create_slap(initial_structure, index, - min_slab_size_ang, min_vacuum_size, min_slab_size_ang) + slab = create_slap(initial_structure, index, min_slab_size_ang, min_vacuum_size, min_slab_size_ang) film_struc = StructureData(pymatgen_structure=slab) film_struc.pbc = (True, True, False) aiida_strucs[slab.miller_index] = film_struc @@ -718,19 +735,31 @@ def create_all_slabs(initial_structure, miller_index, min_slab_size_ang, min_vac return aiida_strucs -def create_slap(initial_structure, miller_index, min_slab_size, min_vacuum_size=0, lll_reduce=False, - center_slab=False, primitive=False, max_normal_search=1, reorient_lattice=True): +def create_slap(initial_structure, + miller_index, + min_slab_size, + min_vacuum_size=0, + lll_reduce=False, + center_slab=False, + primitive=False, + max_normal_search=1, + reorient_lattice=True): """ wraps the pymatgen slab generator """ # minimum slab size is in Angstrom!!! StructureData = DataFactory('structure') pymat_struc = initial_structure.get_pymatgen_structure() - slabg = SlabGenerator(pymat_struc, miller_index, min_slab_size, min_vacuum_size, - lll_reduce=lll_reduce, center_slab=center_slab, primitive=primitive, + slabg = SlabGenerator(pymat_struc, + miller_index, + min_slab_size, + min_vacuum_size, + lll_reduce=lll_reduce, + center_slab=center_slab, + primitive=primitive, max_normal_search=max_normal_search) slab = slabg.get_slab() - #slab2 = slab.get_orthogonal_c_slab() + # slab2 = slab.get_orthogonal_c_slab() film_struc = StructureData(pymatgen_structure=slab) film_struc.pbc = (True, True, False) @@ -746,10 +775,9 @@ def center_film_wf(structure): """ Centers a film at z=0, keeps the provenance in the database - Args: - structure: AiiDA structure + :param structure: AiiDA structure - returns: AiiDA structure + :return: AiiDA structure """ return center_film(structure) @@ -758,16 +786,15 @@ def center_film(structure): """ Centers a film at z=0 - Args: - structure: AiiDA structure + :param structure: AiiDA structure - returns: AiiDA structure + :return: AiiDA structure """ if structure.pbc != (True, True, False): raise TypeError('Only film structures having surface normal to z are supported') sorted_struc = sort_atoms_z_value(structure) sites = sorted_struc.sites - shift = [0, 0, -(sites[0].position[2]+sites[-1].position[2])/2.0] + shift = [0, 0, -(sites[0].position[2] + sites[-1].position[2]) / 2.0] return move_atoms_incell(sorted_struc, shift) @@ -776,10 +803,8 @@ def sort_atoms_z_value(structure): """ Resorts the atoms in a structure by there Z-value - Args: - structure: AiiDA structure - - returns: AiiDA structure + :param structure: AiiDA structure + :return: AiiDA structure """ StructureData = DataFactory('structure') new_structure = StructureData(cell=structure.cell) @@ -798,9 +823,15 @@ def sort_atoms_z_value(structure): return new_structure -def create_manual_slab_ase(lattice='fcc', miller=None, host_symbol='Fe', - latticeconstant=4.0, size=(1, 1, 5), replacements=None, decimals=10, - pop_last_layers=0): +def create_manual_slab_ase(lattice='fcc', + miller=None, + host_symbol='Fe', + latticeconstant=4.0, + size=(1, 1, 5), + replacements=None, + decimals=10, + pop_last_layers=0, + inverse=False): """ Wraps ase.lattice lattices generators to create a slab having given lattice vectors directions. @@ -818,9 +849,7 @@ def create_manual_slab_ase(lattice='fcc', miller=None, host_symbol='Fe', """ if miller is None: - miller = [[1, 0, 0], - [0, 1, 0], - [0, 0, 1]] + miller = [[1, 0, 0], [0, 1, 0], [0, 0, 1]] if lattice == 'fcc': from ase.lattice.cubic import FaceCenteredCubic @@ -829,18 +858,21 @@ def create_manual_slab_ase(lattice='fcc', miller=None, host_symbol='Fe', from ase.lattice.cubic import BodyCenteredCubic structure_factory = BodyCenteredCubic else: - raise ValueError( - 'The given lattice {} is not supported'.format(lattice)) + raise ValueError('The given lattice {} is not supported'.format(lattice)) - structure = structure_factory(miller=miller, symbol=host_symbol, pbc=(1, 1, 0), - latticeconstant=latticeconstant, size=size) + structure = structure_factory(miller=miller, + symbol=host_symbol, + pbc=(1, 1, 0), + latticeconstant=latticeconstant, + size=size) - * _, layer_occupancies = get_layer_by_number(structure, 0) + *_, layer_occupancies = get_layers(structure) if replacements is not None: keys = six.viewkeys(replacements) if max((abs(int(x)) for x in keys)) >= len(layer_occupancies): - raise ValueError('"replacements" has to contain numbers less than number of layers') + raise ValueError('"replacements" has to contain numbers less than number of layers:' + ' {}'.format(len(layer_occupancies))) else: replacements = {} @@ -850,25 +882,32 @@ def create_manual_slab_ase(lattice='fcc', miller=None, host_symbol='Fe', structure.pop() current_symbols = structure.get_chemical_symbols() + *_, layer_occupancies = get_layers(structure) + layer_occupancies.insert(0, 0) for i, at_type in six.iteritems(replacements): if isinstance(i, str): i = int(i) - layer, layer_z, layer_occupancies = get_layer_by_number(structure, i) - layer_occupancies.insert(0, 0) if i < 0: i = i - 1 atoms_to_skip = np.cumsum(np.array(layer_occupancies))[i] for k in range(layer_occupancies[i + 1]): - current_symbols[k+atoms_to_skip] = at_type + current_symbols[k + atoms_to_skip] = at_type structure.set_chemical_symbols(current_symbols) - structure.positions = np.around(structure.positions, decimals=decimals) + if inverse: + structure.positions[:, 2] = -structure.positions[:, 2] + structure.positions = np.around(structure.positions, decimals=decimals) + else: + structure.positions = np.around(structure.positions, decimals=decimals) return structure -def magnetic_slab_from_relaxed(relaxed_structure, orig_structure, total_number_layers, - num_relaxed_layers, tolerance_decimals=10): +def magnetic_slab_from_relaxed(relaxed_structure, + orig_structure, + total_number_layers, + num_relaxed_layers, + tolerance_decimals=10): """ Transforms a structure that was used for interlayer distance relaxation to a structure that can be further used for magnetic calculations. @@ -906,8 +945,12 @@ def magnetic_slab_from_relaxed(relaxed_structure, orig_structure, total_number_l num_layers = len(layers) max_layers_to_extract = num_layers // 2 + num_layers % 2 - num_layers_org = len({np.around(x[2], decimals=tolerance_decimals) - for x in orig_structure.positions}) + if isinstance(orig_structure, StructureData): + positions = orig_structure.get_ase().positions + else: + positions = orig_structure.positions + + num_layers_org = len({np.around(x[2], decimals=tolerance_decimals) for x in positions}) if num_layers_org > num_layers: raise ValueError('Your original structure contains more layers than given in relaxed ' @@ -929,17 +972,18 @@ def magnetic_slab_from_relaxed(relaxed_structure, orig_structure, total_number_l done_layers = 0 while True: if done_layers < num_relaxed_layers: - layer, *_ = get_layer_by_number(sorted_struc, done_layers) - for atom in layer: + layer, *_ = get_layers(sorted_struc) + for atom in layer[done_layers]: a = Site(kind_name=atom[1], position=atom[0]) magn_structure.append_site(a) done_layers = done_layers + 1 elif done_layers < total_number_layers: k = done_layers % num_layers_org - layer, pos_z, _ = get_layer_by_number(orig_structure, k) - for atom in layer: - add_distance = abs(pos_z[k]-pos_z[k-1]) - atom[0][2] = magn_structure.sites[-1].position[2] + add_distance + layer, pos_z, _ = get_layers(orig_structure) + add_distance = abs(pos_z[k] - pos_z[k - 1]) + prev_layer_z = magn_structure.sites[-1].position[2] + for atom in layer[k]: + atom[0][2] = prev_layer_z + add_distance a = Site(kind_name=atom[1], position=atom[0]) magn_structure.append_site(a) done_layers = done_layers + 1 @@ -950,7 +994,7 @@ def magnetic_slab_from_relaxed(relaxed_structure, orig_structure, total_number_l return magn_structure -def get_layer_by_number(structure, number, decimals=10): +def get_layers(structure, decimals=10): """ Extracts atom positions and their types belonging to the same layer @@ -970,11 +1014,9 @@ def get_layer_by_number(structure, number, decimals=10): structure = copy.deepcopy(structure) if isinstance(structure, StructureData): - reformat = [(x.position, x.kind_name) - for x in sorted(structure.sites, key=lambda x: x.position[2])] + reformat = [(list(x.position), x.kind_name) for x in sorted(structure.sites, key=lambda x: x.position[2])] elif isinstance(structure, Lattice): - reformat = list( - zip(structure.positions, structure.get_chemical_symbols())) + reformat = list(zip(structure.positions, structure.get_chemical_symbols())) else: raise ValueError('Structure has to be ase lattice or StructureData') @@ -987,12 +1029,241 @@ def get_layer_by_number(structure, number, decimals=10): layers.append(layer_content) layer_occupancies.append(len(layer_content)) - return layers[number], layer_z_positions, layer_occupancies + return layers, layer_z_positions, layer_occupancies + + +def adjust_film_relaxation(structure, suggestion, scale_as=None, bond_length=None, hold_layers=3): + """ + Tries to optimize interlayer distances. Can be used before RelaxWC to improve its behaviour. + This function only works if USER_API_KEY was set. + + For now only binary structures are analysed to ensure the closest contact between two + elements of the interest. In case of trinary systems (like ABC) I can not not guarantee that + A and C will be the nearest neighbours. + + The same is true for interlayer distances of the same element. To ensure the nearest-neighbour + condition I use unary compounds. + + .. warning: + + This should work ony for metallic bonding since bond length can drastically + depend on the atom hybridisation. + + :param structure: ase film structure which will be adjusted + :param suggestion: dictionary containing average bond length between different elements, + is is basically the result of + :py:func:`~aiida_fleur.tools.StructureData_util.request_average_bond_length()` + :param scale_as: an element name, for which the El-El bond length will be enforced. It is + can be helpful to enforce the same interlayer distance in the substrate, + i.e. adjust deposited film interlayer distances only. + :param bond_length: a float that sets the bond length for scale_as element + :param hold_layers: this parameters sets the number of layers that will be marked via the + certain label. The label is reserved for future use in the relaxation WC: + all the atoms marked with the label will not be relaxed. + """ + from aiida.orm import StructureData + from copy import deepcopy + from itertools import product + + if scale_as and not bond_length: + raise ValueError('bond_length is required when scale_as was provided') + + structure = sort_atoms_z_value(structure) + layers, z_positions, occupancies = get_layers(structure) + + suggestion = deepcopy(suggestion) + if scale_as: + norm = suggestion[scale_as][scale_as] + for sym1, sym2 in product(suggestion.keys(), suggestion.keys()): + try: + suggestion[sym1][sym2] = suggestion[sym1][sym2] / norm + except KeyError: + pass # do nothing, happens for magnetic-magnetic or substrate-substrate combinations + + def suggest_distance_to_previous(num_layer): + z_distances = [] + for atom_prev in layers[num_layer - 1]: + pos_prev = np.array(atom_prev[0])[0:2] + for atom_this in layers[num_layer]: + pos_this = np.array(atom_this[0])[0:2] + xy_dist_sq = np.linalg.norm(pos_prev - pos_this)**2 + if scale_as: + bond_length_sq = suggestion[atom_prev[1]][atom_this[1]]**2 * bond_length**2 + else: + bond_length_sq = suggestion[atom_prev[1]][atom_this[1]]**2 + if xy_dist_sq > bond_length_sq: + pass + else: + z_distances.append((bond_length_sq - xy_dist_sq)**(0.5)) + + # find suggestion for distance to 2nd layer back + z_distances2 = [] + if num_layer != 1: + for atom_prev in layers[num_layer - 2]: + pos_prev = np.array(atom_prev[0])[0:2] + for atom_this in layers[num_layer]: + pos_this = np.array(atom_this[0])[0:2] + xy_dist_sq = np.linalg.norm(pos_prev - pos_this)**2 + if scale_as: + bond_length_sq = suggestion[atom_prev[1]][atom_this[1]]**2 * bond_length**2 + else: + bond_length_sq = suggestion[atom_prev[1]][atom_this[1]]**2 + if xy_dist_sq > bond_length_sq: + pass + else: + z_distances2.append((bond_length_sq - xy_dist_sq)**(0.5)) + + if not z_distances: + z_distances = [0] + + if not z_distances2: + z_distances2 = [0] + + return max(z_distances), max(z_distances2) + + # take relaxed interlayers + rebuilt_structure = StructureData(cell=structure.cell) + rebuilt_structure.pbc = (True, True, False) + # for kind in structure.kinds: + # rebuilt_structure.append_kind(kind) + + for atom in layers[0]: + # a = Site(kind_name=atom[1], position=atom[0]) + # minus because I build from bottom (inversed structure) + if hold_layers < 1: + rebuilt_structure.append_atom(symbols=atom[1], position=(atom[0][0], atom[0][1], -atom[0][2]), name=atom[1]) + else: + rebuilt_structure.append_atom(symbols=atom[1], + position=(atom[0][0], atom[0][1], -atom[0][2]), + name=atom[1] + '49') + + prev_distance = 0 + for i, layer in enumerate(layers[1:]): + add_distance1, add_distance2 = suggest_distance_to_previous(i + 1) + add_distance2 = add_distance2 - prev_distance + if add_distance1 <= 0 and add_distance2 <= 0: + raise ValueError('error not implemented') + prev_distance = max(add_distance1, add_distance2) + if i == len(layers) - 2: + prev_distance = prev_distance * 0.85 # last layer should be closer + + layer_copy = deepcopy(layer) + prev_layer_z = rebuilt_structure.sites[-1].position[2] + for atom in layer_copy: + atom[0][2] = prev_layer_z - prev_distance # minus because I build from bottom (inverse) + # a = Site(kind_name=atom[1], position=atom[0]) + # rebuilt_structure.append_site(a) + if i < hold_layers - 1: + rebuilt_structure.append_atom(position=atom[0], symbols=atom[1], name=atom[1] + '49') + else: + rebuilt_structure.append_atom(position=atom[0], symbols=atom[1], name=atom[1]) + + rebuilt_structure = center_film(rebuilt_structure) + return rebuilt_structure + + +def request_average_bond_length_store(main_elements, sub_elements, user_api_key): + """ + Requests MaterialsProject to estimate thermal average bond length between given elements. + Also requests information about lattice constants of fcc and bcc structures. + Stores the result in the Database. Notice that this is not a calcfunction! + Therefore, the inputs are not stored and the result node is unconnected. + + :param main_elements: element list to calculate the average bond length + only combinations of AB, AA and BB are calculated, where + A belongs to main_elements, B belongs to sub_elements. + :param sub_elements: element list, see main_elements + :return: bond_data, a dict containing obtained lattice constants. + """ + result = request_average_bond_length(main_elements, sub_elements, user_api_key) + result.store() + return result + + +def request_average_bond_length(main_elements, sub_elements, user_api_key): + """ + Requests MaterialsProject to estimate thermal average bond length between given elements. + Also requests information about lattice constants of fcc and bcc structures. + + :param main_elements: element list to calculate the average bond length + only combinations of AB, AA and BB are calculated, where + A belongs to main_elements, B belongs to sub_elements. + :param sub_elements: element list, see main_elements + :return: bond_data, a dict containing obtained lattice constants. + """ + from itertools import product, combinations + from math import exp + from aiida.orm import Dict + from pymatgen.ext.matproj import MPRester + from collections import defaultdict + from copy import deepcopy + + bond_data = defaultdict(lambda: defaultdict(lambda: 0.0)) + symbols = main_elements + sub_elements + + for sym in symbols: + distance = 0 + partition_function = 0 + with MPRester(user_api_key) as mat_project: + mp_entries = mat_project.get_entries_in_chemsys([sym]) + fcc_structure = None + bcc_structure = None + for entry in mp_entries: + if sym != entry.name: + continue + with MPRester(user_api_key) as mat_project: + structure_analyse = mat_project.get_structure_by_material_id(entry.entry_id) + en_per_atom = mat_project.query(entry.entry_id, ['energy_per_atom'])[0]['energy_per_atom'] + structure_analyse.make_supercell([2, 2, 2]) + factor = exp(-(en_per_atom / 0.0259)) + partition_function = partition_function + factor + indices1 = structure_analyse.indices_from_symbol(sym) + distances = (structure_analyse.get_distance(x, y) for x, y in combinations(indices1, 2)) + min_distance = min(distances) + distance = distance + min_distance * factor + # save distance for particular cases of fcc and bcc + if structure_analyse.get_space_group_info()[1] == 225: # fcc + bond_data['fcc'][sym] = min_distance + elif structure_analyse.get_space_group_info()[1] == 229: # bcc + bond_data['bcc'][sym] = min_distance + + distance = distance / partition_function + bond_data[sym][sym] = distance + print('Request completed for {symst} {symst} pair'.format(symst=sym)) + + for sym1, sym2 in product(main_elements, sub_elements): + distance = 0 + partition_function = 0 + with MPRester(user_api_key) as mat_project: + mp_entries = mat_project.get_entries_in_chemsys([sym1, sym2]) + for entry in mp_entries: + name = ''.join([i for i in entry.name if not i.isdigit()]) + if name not in (sym1 + sym2, sym2 + sym1): + continue + with MPRester(user_api_key) as mat_project: + structure_analyse = mat_project.get_structure_by_material_id(entry.entry_id) + en_per_atom = mat_project.query(entry.entry_id, ['energy_per_atom'])[0]['energy_per_atom'] + structure_analyse.make_supercell([2, 2, 2]) + factor = exp(-(en_per_atom / 0.0259)) + partition_function = partition_function + factor + indices1 = structure_analyse.indices_from_symbol(sym1) + indices2 = structure_analyse.indices_from_symbol(sym2) + distances = (structure_analyse.get_distance(x, y) for x, y in product(indices1, indices2)) + distance = distance + min(distances) * factor + if partition_function == 0: + distance = (bond_data[sym1][sym1] + bond_data[sym2][sym2]) / 2 + else: + distance = distance / partition_function + bond_data[sym1][sym2] = distance + bond_data[sym2][sym1] = distance + print('Request completed for {} {} pair'.format(sym1, sym2)) + + return Dict(dict=bond_data) def estimate_mt_radii(structure, stepsize=0.05): """ - #TODO implement + # TODO implement This method returns for every atom type (group/kind) in the structure a range of possible muffin tin radii (min, max). Or maybe just the maximal muffin tin radii (or sets of maximal muffin tin radii) @@ -1007,26 +1278,26 @@ def estimate_mt_radii(structure, stepsize=0.05): # check what algo fleur uses here # Max radius easy increase all spheres until they touch. # How to get the minimal muffin tin radii? - pass + return None def common_mt(max_muffin_tins): """ - #TODO implement + # TODO implement From a list of dictionary given return smallest common set. - + Could be read from the econfig file within AiiDA fleur. [[{Be: 1.7, W:2.4}, {Be:1.8, W:2.3}], [{Be : 1.75}], [{W:2.5}] should return [{Be:1.7, W:2.4}] """ - pass + return None def find_common_mt(structures): """ - #TODO implement + # TODO implement (in some phd notebook of Broeder this is implement) From a given list of structures, estimate the muffin tin radii and return the smallest common set. (therefore a choice for rmt that would work for every structure given) """ - pass + return None diff --git a/aiida_fleur/tools/__init__.py b/aiida_fleur/tools/__init__.py index 5255fe6c3..026bb6106 100644 --- a/aiida_fleur/tools/__init__.py +++ b/aiida_fleur/tools/__init__.py @@ -9,8 +9,6 @@ # For further information please visit http://www.flapw.de or # # http://aiida-fleur.readthedocs.io/en/develop/ # ############################################################################### - ''' FLEUR plug-in ''' - diff --git a/aiida_fleur/tools/check_existence.py b/aiida_fleur/tools/check_existence.py index 2d156fa35..9af938de1 100644 --- a/aiida_fleur/tools/check_existence.py +++ b/aiida_fleur/tools/check_existence.py @@ -10,24 +10,21 @@ # For further information please visit http://www.flapw.de or # # http://aiida-fleur.readthedocs.io/en/develop/ # ############################################################################### - """ -DO NOT USE, this is crab so far. The development was stoped because this is done +DO NOT USE, this is crab so far. The development was stoped because this is done with AiiDA 'caching' now. Here are methods to check the existence of something in the database example if a (successful) SCF with the same inputs exists -Since cashing is not there for data yet, and below are some basic querries I +Since cashing is not there for data yet, and below are some basic querries I leave the code here for now. """ from __future__ import absolute_import from aiida.plugins import DataFactory from aiida.orm import QueryBuilder -from aiida.engine.calculation.job import CalcJob +from aiida.engine import CalcJob from aiida.orm import Node - - ''' def check_existence_calc(input_nodes, successful=True): """ @@ -47,7 +44,7 @@ def check_existence_calc(input_nodes, successful=True): filters={'state' : {'==':'FINISHED'}}) for idx, uuid in enumerate(inputnodesuuid): - qb.append(Node, input_of='calc', filters={'uuid':uuid}, + qb.append(Node, input_of='calc', filters={'uuid':uuid}, tag='input_{}'.format(idx)) qb.order_by({JobCalculation:'ctime'}) diff --git a/aiida_fleur/tools/common_aiida.py b/aiida_fleur/tools/common_aiida.py index a9c94d531..25549bb71 100644 --- a/aiida_fleur/tools/common_aiida.py +++ b/aiida_fleur/tools/common_aiida.py @@ -9,7 +9,6 @@ # For further information please visit http://www.flapw.de or # # http://aiida-fleur.readthedocs.io/en/develop/ # ############################################################################### - """ In here we put all things util (methods, code snipets) that are often useful, but not yet in AiiDA itself. @@ -17,8 +16,8 @@ export_extras import_extras -delete_nodes -delete_trash +delete_nodes (FIXME) +delete_trash (FIXME) create_group """ @@ -27,7 +26,7 @@ from __future__ import print_function import json import six -from six.moves import input +from six.moves import input as input_six from aiida.orm import load_node from aiida.orm.querybuilder import QueryBuilder @@ -55,15 +54,14 @@ def export_extras(nodes, filename='node_extras.txt'): outdict = {} for node in nodes: - if not isinstance(node, Node): # pk or uuid + if not isinstance(node, Node): # pk or uuid node = load_node(node) uuid = node.uuid extras_dict = node.extras outdict[uuid] = extras_dict - json.dump(outdict, open(filename, 'w'), sort_keys=True, - indent=4, separators=(',', ': ')) + json.dump(outdict, open(filename, 'w'), sort_keys=True, indent=4, separators=(',', ': ')) def import_extras(filename): @@ -81,11 +79,11 @@ def import_extras(filename): """ all_extras = {} - - try: - all_extras = json.load(open(filename)) - except json.JSONDecodeError: - print('The file has to be loadable by json. i.e json format (which it is not).') + with open(filename, mode='r') as file1: + try: + all_extras = json.load(file1) + except json.JSONDecodeError: + print('The file has to be loadable by json. i.e json format (which it is not).') for uuid, extras in six.iteritems(all_extras): @@ -101,10 +99,11 @@ def import_extras(filename): else: print('node is not instance of an AiiDA node') #print(extras) - return - +''' +# uncommented this, since it is for sure out of date and dangerous to use +# for current version see aiida-core docs def delete_nodes(pks_to_delete): """ Delete a set of nodes. (From AiiDA cockbook) @@ -130,13 +129,13 @@ def delete_nodes(pks_to_delete): # all children nodes. all_pks_to_delete = set(pks_to_delete) for pk in pks_to_delete: - all_pks_to_delete.update(models.DbNode.objects.filter( - input_links__in=pks_to_delete).values_list('pk', flat=True)) + all_pks_to_delete.update( + models.DbNode.objects.filter(input_links__in=pks_to_delete).values_list('pk', flat=True)) - print(("I am going to delete {} nodes, including ALL THE CHILDREN" - "of the nodes you specified. Do you want to continue? [y/N]" - "".format(len(all_pks_to_delete)))) - answer = input() + print(('I am going to delete {} nodes, including ALL THE CHILDREN' + 'of the nodes you specified. Do you want to continue? [y/N]' + ''.format(len(all_pks_to_delete)))) + answer = input_six() if answer.strip().lower() == 'y': # Recover the list of folders to delete before actually deleting @@ -149,9 +148,7 @@ def delete_nodes(pks_to_delete): with transaction.atomic(): # Delete all links pointing to or from a given node - models.DbLink.objects.filter( - Q(input__in=all_pks_to_delete) | - Q(output__in=all_pks_to_delete)).delete() + models.DbLink.objects.filter(Q(input__in=all_pks_to_delete) | Q(output__in=all_pks_to_delete)).delete() # now delete nodes models.DbNode.objects.filter(pk__in=all_pks_to_delete).delete() @@ -162,6 +159,7 @@ def delete_nodes(pks_to_delete): # for f in folders: # f.erase() + def delete_trash(): """ This method deletes all AiiDA nodes in the DB, which have a extra trash=True @@ -174,7 +172,7 @@ def delete_trash(): q = QueryBuilder() nodes_to_delete_pks = [] - q.append(Node, filters = {'extras.trash': {'==' : True}}) + q.append(Node, filters={'extras.trash': {'==': True}}) res = q.all() for node in res: @@ -187,6 +185,8 @@ def delete_trash(): delete_nodes(nodes_to_delete_pks) return +''' + def create_group(name, nodes, description=None, add_if_exist=False): """ @@ -210,14 +210,13 @@ def create_group(name, nodes, description=None, add_if_exist=False): description='delta structures added by hand. from Gustavs inpgen files') """ - from aiida.common import NotExistent + #from aiida.common import NotExistent group, created = Group.objects.get_or_create(label=name) if created: print(('Group created with PK={} and name {}'.format(group.pk, group.label))) else: - print(('Group with name {} and pk {} already exists.' - ''.format(group.label, group.pk))) + print(('Group with name {} and pk {} already exists.' ''.format(group.label, group.pk))) if add_if_exist: print('Adding nodes to the existing group {}'.format(group.label)) @@ -252,8 +251,8 @@ def get_nodes_from_group(group, return_format='uuid'): """ if return_format == 'uuid': - return [x.uuid for x in group.nodes] + return [x.uuid for x in group.nodes] if return_format == 'pk': - return [x.pk for x in group.nodes] + return [x.pk for x in group.nodes] else: raise ValueError("return_format should be 'uuid' or 'pk'.") diff --git a/aiida_fleur/tools/common_fleur_wf.py b/aiida_fleur/tools/common_fleur_wf.py index af64c667a..af8ea5606 100644 --- a/aiida_fleur/tools/common_fleur_wf.py +++ b/aiida_fleur/tools/common_fleur_wf.py @@ -9,7 +9,6 @@ # For further information please visit http://www.flapw.de or # # http://aiida-fleur.readthedocs.io/en/develop/ # ############################################################################### - """ In here we put all things (methods) that are common to workflows AND depend on AiiDA classes, therefore can only be used if the dbenv is loaded. @@ -61,8 +60,7 @@ def is_code(code): return None -def get_inputs_fleur(code, remote, fleurinp, options, label='', description='', settings=None, - serial=False): +def get_inputs_fleur(code, remote, fleurinp, options, label='', description='', settings=None, serial=False): ''' Assembles the input dictionary for Fleur Calculation. Does not check if a user gave correct input types, it is the work of FleurCalculation to check it. @@ -109,7 +107,7 @@ def get_inputs_fleur(code, remote, fleurinp, options, label='', description='', # TODO not every machine/scheduler type takes number of machines # lsf takes number of total_mpi_procs,slurm and psb take num_machines,\ # also a full will run here mpi on that node... also not what we want.ß - options['resources'] = {"num_machines": 1} + options['resources'] = {'num_machines': 1, 'num_mpiprocs_per_machine': 1} else: options['withmpi'] = True @@ -125,8 +123,7 @@ def get_inputs_fleur(code, remote, fleurinp, options, label='', description='', return inputs -def get_inputs_inpgen(structure, inpgencode, options, label='', description='', - params=None, **kwargs): +def get_inputs_inpgen(structure, inpgencode, options, label='', description='', params=None, **kwargs): ''' Assembles the input dictionary for Fleur Calculation. @@ -169,7 +166,7 @@ def get_inputs_inpgen(structure, inpgencode, options, label='', description='', options = {} # inpgen run always serial options['withmpi'] = False - options['resources'] = {"num_machines": 1} + options['resources'] = {'num_machines': 1, 'num_mpiprocs_per_machine': 1} if options: inputs.metadata.options = options @@ -195,13 +192,15 @@ def get_scheduler_extras(code, resources, extras=None, project='jara0172'): # TODO memory has to be done better... mem_per_node = 120000 # max recommend 126000 MB on claix jara-clx nodes - mem_per_process = mem_per_node/24 + mem_per_process = mem_per_node / 24 if not extras: # use defaults # TODO add other things, span, pinnning... openmp - extras = {'lsf': ('#BSUB -P {} \n#BSUB -M {} \n' - '#BSUB -a intelmpi'.format(project, mem_per_process)), - 'torque': '', - 'direct': ''} + extras = { + 'lsf': ('#BSUB -P {} \n#BSUB -M {} \n' + '#BSUB -a intelmpi'.format(project, mem_per_process)), + 'torque': '', + 'direct': '' + } # get the scheduler type from the computer the code is run on. com = code.computer @@ -211,7 +210,7 @@ def get_scheduler_extras(code, resources, extras=None, project='jara0172'): default_per_machine = com.get_default_mpiprocs_per_machine() if not default_per_machine: default_per_machine = 24 # claix, lsf does can not have default mpiprocs... #TODO this better - tot_num_mpiprocs = resources.get('tot_num_mpiprocs', default_per_machine*nnodes) + tot_num_mpiprocs = resources.get('tot_num_mpiprocs', default_per_machine * nnodes) if scheduler_type == 'lsf': new_resources = {'tot_num_mpiprocs': tot_num_mpiprocs} # only this needs to be given @@ -241,6 +240,7 @@ def get_scheduler_extras(code, resources, extras=None, project='jara0172'): # print(get_scheduler_extras(code2, {'num_machines' : 2})) # print(get_scheduler_extras(code4, {'num_machines' : 1})) + def test_and_get_codenode(codenode, expected_code_type, use_exceptions=False): """ Pass a code node and an expected code (plugin) type. Check that the @@ -267,18 +267,14 @@ def test_and_get_codenode(codenode, expected_code_type, use_exceptions=False): except ValueError: from aiida.orm.querybuilder import QueryBuilder qb = QueryBuilder() - qb.append(Code, - filters={'attributes.input_plugin': - {'==': expected_code_type}}, - project='*') + qb.append(Code, filters={'attributes.input_plugin': {'==': expected_code_type}}, project='*') - valid_code_labels = ["{}@{}".format(c.label, c.computer.name) - for [c] in qb.all()] + valid_code_labels = ['{}@{}'.format(c.label, c.computer.name) for [c] in qb.all()] if valid_code_labels: - msg = ("Given Code node is not of expected code type.\n" - "Valid labels for a {} executable are:\n".format(expected_code_type)) - msg += "\n".join("* {}".format(l) for l in valid_code_labels) + msg = ('Given Code node is not of expected code type.\n' + 'Valid labels for a {} executable are:\n'.format(expected_code_type)) + msg += '\n'.join('* {}'.format(l) for l in valid_code_labels) if use_exceptions: raise ValueError(msg) @@ -286,9 +282,9 @@ def test_and_get_codenode(codenode, expected_code_type, use_exceptions=False): print(msg) # , file=sys.stderr) sys.exit(1) else: - msg = ("Code not valid, and no valid codes for {}.\n" - "Configure at least one first using\n" - " verdi code setup".format(expected_code_type)) + msg = ('Code not valid, and no valid codes for {}.\n' + 'Configure at least one first using\n' + ' verdi code setup'.format(expected_code_type)) if use_exceptions: raise ValueError(msg) else: @@ -314,6 +310,7 @@ def get_kpoints_mesh_from_kdensity(structure, kpoint_density): mesh = kp.get_kpoints_mesh() return mesh, kp + # test # print(get_kpoints_mesh_from_kdensity(load_node(structure(120)), 0.1)) # (([33, 33, 18], [0.0, 0.0, 0.0]), ) @@ -341,7 +338,7 @@ def determine_favorable_reaction(reaction_list, workchain_dict): return dictionary that ranks the reactions after their enthalpy """ - from aiida.orm.calculation.work import WorkCalculation + from aiida.engine import WorkChain from aiida_fleur.tools.common_fleur_wf_util import get_enhalpy_of_equation # for each reaction get the total energy sum # make sure to use the right multipliers... @@ -360,7 +357,7 @@ def determine_favorable_reaction(reaction_list, workchain_dict): except KeyError: formenergy = None if not formenergy: # test if 0 case ok - if isinstance(n, WorkCalculation): + if isinstance(n, WorkChain): # TODO: untested for aiida > 1.0 plabel = n.get_attr('_process_label') if plabel == 'fleur_initial_cls_wc': try: @@ -368,7 +365,7 @@ def determine_favorable_reaction(reaction_list, workchain_dict): except AttributeError: try: ouputnode = n.out.output_inital_cls_wc_para.get_dict() - except: + except (AttributeError, KeyError, ValueError): # TODO: Check this ouputnode = None formenergy = None print(('WARNING: ouput node of {} not found. I skip'.format(n))) @@ -421,19 +418,32 @@ def performance_extract_calcs(calcs): Note: Is not the fastest for many calculations > 1000. """ - data_dict = {u'n_symmetries': [], u'n_spin_components': [], - u'n_kpoints': [], u'n_iterations': [], - u'walltime_sec': [], u'walltime_sec_per_it': [], - u'n_iterations_total': [], - u'density_distance': [], u'computer': [], - u'n_atoms': [], u'kmax': [], - u'cost': [], u'costkonstant': [], - u'walltime_sec_cor': [], u'total_cost': [], - u'fermi_energy': [], u'bandgap': [], - u'energy': [], u'force_largest': [], - u'ncores': [], u'pk': [], - u'uuid': [], u'serial': [], - u'resources': []} + data_dict = { + u'n_symmetries': [], + u'n_spin_components': [], + u'n_kpoints': [], + u'n_iterations': [], + u'walltime_sec': [], + u'walltime_sec_per_it': [], + u'n_iterations_total': [], + u'density_distance': [], + u'computer': [], + u'n_atoms': [], + u'kmax': [], + u'cost': [], + u'costkonstant': [], + u'walltime_sec_cor': [], + u'total_cost': [], + u'fermi_energy': [], + u'bandgap': [], + u'energy': [], + u'force_largest': [], + u'ncores': [], + u'pk': [], + u'uuid': [], + u'serial': [], + u'resources': [] + } count = 0 for calc in calcs: if not isinstance(calc, Node): @@ -447,15 +457,14 @@ def performance_extract_calcs(calcs): efermi = res.fermi_energy except AttributeError: print(('skipping {}, {}'.format(pk, calc.uuid))) - continue # we skip these entries efermi = -10000 - + continue # we skip these entries try: gap = res.bandgap except AttributeError: gap = -10000 - continue print(('skipping 2 {}, {}'.format(pk, calc.uuid))) + continue try: energy = res.energy @@ -491,7 +500,7 @@ def performance_extract_calcs(calcs): else: walltime_new = walltime - walltime_periteration = walltime_new/niter + walltime_periteration = walltime_new / niter data_dict['walltime_sec'].append(walltime) data_dict['walltime_sec_cor'].append(walltime_new) @@ -537,7 +546,7 @@ def get_mpi_proc(resources): total_proc = resources.get('tot_num_mpiprocs', 0) if not total_proc: if nmachines: - total_proc = nmachines*resources.get('default_mpiprocs_per_machine', 12) + total_proc = nmachines * resources.get('default_mpiprocs_per_machine', 12) else: total_proc = resources.get('tot_num_mpiprocs', 24) @@ -555,12 +564,18 @@ def calc_time_cost_function_total(natom, nkpt, kmax, niter, nspins=1): def cost_ratio(total_costs, walltime_sec, ncores): - ratio = total_costs/(walltime_sec*ncores) + ratio = total_costs / (walltime_sec * ncores) return ratio -def optimize_calc_options(nodes, mpi_per_node, omp_per_mpi, use_omp, - mpi_omp_ratio, fleurinpData=None, kpts=None, sacrifice_level=0.9): +def optimize_calc_options(nodes, + mpi_per_node, + omp_per_mpi, + use_omp, + mpi_omp_ratio, + fleurinpData=None, + kpts=None, + sacrifice_level=0.9): """ Makes a suggestion on parallelisation setup for a particular fleurinpData. Only the total number of k-points is analysed: the function suggests ideal k-point @@ -590,15 +605,23 @@ def optimize_calc_options(nodes, mpi_per_node, omp_per_mpi, use_omp, cpus_per_node = mpi_per_node * omp_per_mpi if fleurinpData: - kpts = fleurinpData.get_tag('/fleurInput/calculationSetup/bzIntegration/kPointList/@count') - kpts = int(kpts[0]) + modes = fleurinpData.get_fleur_modes() + kpts = fleurinpData.attributes['inp_dict']['calculationSetup']['bzIntegration'] + if modes['band'] or modes['gw']: + kpts = kpts['altKPointSet']['count'] + else: + if 'kPointList' in kpts: + kpts = kpts['kPointList']['count'] + else: + kpts = kpts['kPointCount']['count'] + kpts = int(kpts) elif not kpts: raise ValueError('You must specify either kpts of fleurinpData') divisors_kpts = divisors(kpts) possible_nodes = [x for x in divisors_kpts if x <= nodes] suggestions = [] for n_n in possible_nodes: - advise_cpus = [x for x in divisors(kpts//n_n) if x <= cpus_per_node] + advise_cpus = [x for x in divisors(kpts // n_n) if x <= cpus_per_node] for advised_cpu_per_node in advise_cpus: suggestions.append((n_n, advised_cpu_per_node)) @@ -622,46 +645,69 @@ def add_omp(suggestions): top_suggestions = suggestions[np.prod(suggestions, axis=1) > sacrifice_level * best_resources] def best_criterion(suggestion): + ''' + also implements hard preference of even numper of MPIs over odd + ''' if use_omp: - return -abs(suggestion[1] / suggestion[2] - mpi_omp_ratio) - return (suggestion[0]*suggestion[1], -suggestion[0]) + return (abs(suggestion[1] % 2 - 1), -abs(suggestion[1] / suggestion[2] - mpi_omp_ratio)) + return (suggestion[0] * suggestion[1], abs(suggestion[1] % 2 - 1), -suggestion[0]) best_suggestion = max(top_suggestions, key=best_criterion) message = '' - if float(best_suggestion[1] * best_suggestion[2])/cpus_per_node < 0.6: + if float(best_suggestion[1] * best_suggestion[2]) / cpus_per_node < 0.6: message = ('WARNING: Changed the number of MPIs per node from {} to {} and OMP per MPI ' 'from {} to {}.' 'Changed the number of nodes from {} to {}. ' 'Computational setup, needed for a given number k-points ({})' ' provides less then 60% of node load.' - ''.format(mpi_per_node, best_suggestion[1], omp_per_mpi, best_suggestion[2], - nodes, best_suggestion[0], kpts)) + ''.format(mpi_per_node, best_suggestion[1], omp_per_mpi, best_suggestion[2], nodes, + best_suggestion[0], kpts)) raise ValueError(message) elif best_suggestion[1] * best_suggestion[2] == cpus_per_node: if best_suggestion[0] != nodes: - message = ('WARNING: Changed the number of nodes from {} to {}' - ''.format(nodes, best_suggestion[0])) + message = ('WARNING: Changed the number of nodes from {} to {}' ''.format(nodes, best_suggestion[0])) else: message = ('Computational setup is perfect! Nodes: {}, MPIs per node {}, OMP per MPI ' - '{}. Number of k-points is {}'.format(best_suggestion[0], best_suggestion[1], - best_suggestion[2], kpts)) + '{}. Number of k-points is {}'.format(best_suggestion[0], best_suggestion[1], best_suggestion[2], + kpts)) else: - message = ('WARNING: Changed the number of MPIs per node from {} to {} an OMP from {} to {}' + message = ('WARNING: Changed the number of MPIs per node from {} to {} and OMP from {} to {}' '. Changed the number of nodes from {} to {}. Number of k-points is {}.' - ''.format(mpi_per_node, best_suggestion[1], omp_per_mpi, best_suggestion[2], - nodes, best_suggestion[0], kpts)) + ''.format(mpi_per_node, best_suggestion[1], omp_per_mpi, best_suggestion[2], nodes, + best_suggestion[0], kpts)) - return best_suggestion[0], best_suggestion[1], best_suggestion[2], message + return int(best_suggestion[0]), int(best_suggestion[1]), int(best_suggestion[2]), message -def find_last_in_restart(restart_wc): +def find_last_submitted_calcjob(restart_wc): """ - Finds the last CalcJob submitted in a restart_wc + Finds the last CalcJob submitted in a higher-level workchain and returns it's uuid """ + from aiida.common.exceptions import NotExistent + from aiida.orm import CalcJobNode + links = restart_wc.get_outgoing().all() + calls = list([x for x in links if isinstance(x.node, CalcJobNode)]) + if calls: + calls = sorted(calls, key=lambda x: x.node.pk) + return calls[-1].node.uuid + else: + raise NotExistent + + +def find_last_submitted_workchain(restart_wc): + """ + Finds the last CalcJob submitted in a higher-level workchain + and returns it's uuid + """ + from aiida.common.exceptions import NotExistent + from aiida.orm import WorkChainNode links = restart_wc.get_outgoing().all() - calls = list([x for x in links if x.link_label == 'CALL']) - calls = sorted(calls, key=lambda x: x.node.pk) - return calls[-1].node.uuid + calls = list([x for x in links if isinstance(x.node, WorkChainNode)]) + if calls: + calls = sorted(calls, key=lambda x: x.node.pk) + return calls[-1].node.uuid + else: + raise NotExistent diff --git a/aiida_fleur/tools/common_fleur_wf_util.py b/aiida_fleur/tools/common_fleur_wf_util.py index 43dbde8ac..4599728d9 100644 --- a/aiida_fleur/tools/common_fleur_wf_util.py +++ b/aiida_fleur/tools/common_fleur_wf_util.py @@ -9,7 +9,6 @@ # For further information please visit http://www.flapw.de or # # http://aiida-fleur.readthedocs.io/en/develop/ # ############################################################################### - """ In here we put all things (methods) that are common to workflows AND DO NOT depend on AiiDA classes, therefore can be used without loading the dbenv. @@ -20,11 +19,10 @@ from __future__ import print_function from math import gcd import six -from six.moves import range -from six.moves import zip from sympy import Symbol + def convert_formula_to_formula_unit(formula): """ Converts a formula to the smallest chemical formula unit @@ -43,7 +41,7 @@ def convert_formula_to_formula_unit(formula): formula_unit_string = '' for key, val in six.iteritems(element_count_dict): - new_val = int(val/g) + new_val = int(val / g) if new_val == 1: new_val = '' formula_unit_string = formula_unit_string + '{}{}'.format(key, new_val) @@ -62,20 +60,45 @@ def get_natoms_element(formula): #re.split('(\D+)', formula) for i, elm in enumerate(elements): - elem_count = re.findall(r'\d+|\D+', elm) + elem_count = re.findall(r'\D+|\d+\.\d+|\d+', elm) #print(elem_count) if len(elem_count) == 1: elem_count_dict[elem_count[0]] = 1 else: elem_count_dict[elem_count[0]] = float(elem_count[1]) - return elem_count_dict + # test #get_natoms_element('BeW') #get_natoms_element('Be2W') + +def convert_frac_formula(formula, max_digits=3): + """ + Converts a formula with fractions to a formula with integer factors only + + Be0.5W0.5 -> BeW + + :param formula: str, crystal formula i.e. Be2W, Be0.2W0.7 + :param max_digits: int default=3, number of digits after which fractions will be cut off + :returns: string + """ + form_dict = get_natoms_element(formula) + formula_int = '' + for key, val in form_dict.items(): + formula_int = formula_int + key + str(int(val * 10**max_digits)) + + return convert_formula_to_formula_unit(formula_int) + + +#test +#convert_frac_formula('Be0.3W0.7') -> Be3W7 +#convert_frac_formula('Be0.5W0.5') -> BeW +#convert_frac_formula('Be3W7') -> Be3W7 + + def ucell_to_atompr(ratio, formulas, element, error_ratio=None): """ Converts unit cell ratios into atom ratios. @@ -98,14 +121,14 @@ def ucell_to_atompr(ratio, formulas, element, error_ratio=None): res = get_natoms_element(formula) n_atoms_formula.append(res.get(element, 0)) - atompro = np.array(ratio)*np.array(n_atoms_formula) + atompro = np.array(ratio) * np.array(n_atoms_formula) total = sum(atompro) - atompro = atompro/total + atompro = atompro / total if len(error_ratio): - atompro_err_t = np.array(error_ratio)*np.array(n_atoms_formula) + atompro_err_t = np.array(error_ratio) * np.array(n_atoms_formula) e_sum = np.sqrt(sum(atompro_err_t**2)) - atompro_err = 1/total*(np.sqrt(atompro_err_t**2 + (atompro*e_sum)**2)) + atompro_err = 1 / total * (np.sqrt(atompro_err_t**2 + (atompro * e_sum)**2)) return atompro, atompro_err @@ -134,10 +157,10 @@ def calc_stoi(unitcellratios, formulas, error_ratio=None): res = get_natoms_element(formula) for element, val in six.iteritems(res): stoi_elm = stoi.get(element, 0) - stoi[element] = stoi_elm + val*unitcellratios[i] + stoi[element] = stoi_elm + val * unitcellratios[i] if len(error_ratio): errors = errors_stoi.get(element, 0) - errors_stoi[element] = errors + val*val*error_ratio[i]*error_ratio[i] + errors_stoi[element] = errors + val * val * error_ratio[i] * error_ratio[i] # make smallest number always one. vals = list(stoi.values()) @@ -145,9 +168,10 @@ def calc_stoi(unitcellratios, formulas, error_ratio=None): keymin = list(stoi.keys())[vals.index(minv)] norm_stoi = {} for key, val in six.iteritems(stoi): - norm_stoi[key] = stoi[key]/minv + norm_stoi[key] = stoi[key] / minv if len(error_ratio): - errors_stoi[key] = 1/stoi[keymin]*np.sqrt((errors_stoi[key]**2 + (stoi[key]/stoi[keymin]*errors_stoi[keymin])**2)) + errors_stoi[key] = 1 / stoi[keymin] * np.sqrt( + (errors_stoi[key]**2 + (stoi[key] / stoi[keymin] * errors_stoi[keymin])**2)) return norm_stoi, errors_stoi @@ -164,13 +188,13 @@ def get_atomprocent(formula): form_dict = get_natoms_element(formula) ntotal = sum(form_dict.values()) for key, val in six.iteritems(form_dict): - val_new = float(val)/ntotal + val_new = float(val) / ntotal form_dict_new[key] = val_new return form_dict_new -# test - +# test +''' def get_weight_procent(formula): """ This converts a formula to a dictionary with element : weightprocent @@ -182,11 +206,12 @@ def get_weight_procent(formula): """ pass - +''' #def norm_total_energy_peratom(totalenergy, formula) #def norm_total_energy_perunitcell(totalenergy, ) + def determine_formation_energy(struc_te_dict, ref_struc_te_dict): """ This method determines the formation energy. @@ -200,7 +225,7 @@ def determine_formation_energy(struc_te_dict, ref_struc_te_dict): #eform_list = [] eform_dict = {} #ref_el = ref_struc_te_dict.keys() - ref_struc_te_dict_norm = ref_struc_te_dict#{} + ref_struc_te_dict_norm = ref_struc_te_dict #{} # assume reference to be normalized # normalize reference @@ -213,24 +238,26 @@ def determine_formation_energy(struc_te_dict, ref_struc_te_dict): elements_count = get_natoms_element(formula) ntotal = float(sum(elements_count.values())) print(ntotal) - eform = tE#abs(tE) + eform = tE #abs(tE) for elem, count in six.iteritems(elements_count): if elem in ref_el_norm: - eform = eform - count * ref_struc_te_dict_norm.get(elem)#abs(ref_struc_te_dict.get(elem)) + eform = eform - count * ref_struc_te_dict_norm.get(elem) #abs(ref_struc_te_dict.get(elem)) else: print(('Reference energy missing for element {}. ' 'You need to provide reference energies for all elements in you compound.' ''.format(elem))) - eform_dict[formula] = eform/ntotal + eform_dict[formula] = eform / ntotal #eform_list.append(eform/ntotal) return list(eform_dict.values()), eform_dict + # test #determine_formation_energy({'BeW' : 2, 'Be2W' : 2.5}, {'Be' : 1, 'W' : 1}) + def determine_convex_hull(formation_en_grid): """ - Wraps the scipy.spatial ConvexHull algo for our purposes. + Wraps the pyhull packge implementing the qhull algo for our purposes. For now only for 2D phase diagrams Adds the points [1.0, 0.0] and [0.0, 1.0], because in material science these are always there. @@ -239,7 +266,8 @@ def determine_convex_hull(formation_en_grid): :returns: a hul datatype """ import numpy as np - from scipy.spatial import ConvexHull + #from scipy.spatial import ConvexHull # Buggy in python 3... some ugly segfault + from pyhull.convex_hull import ConvexHull # TODO multi d # check if endpoints are in @@ -275,9 +303,11 @@ def inpgen_dict_set_mesh(inpgendict, mesh): return inpgendict_new + # test #inpgen_dict_set_mesh(Be_para.get_dict(), mesh) + def powerset(L): """ Constructs the power set, 'potenz Menge' of a given list. @@ -291,11 +321,13 @@ def powerset(L): pset.append(sset) return pset + #a = powerset([1, 2, 3, 4]) #a = powerset(['Be', 'Be2W', 'Be12W', 'Be22W', 'W']) #print(a) #print(len(a)) + def determine_reactions(formula, available_data): """ Determines and balances theoretical possible reaction. @@ -311,7 +343,7 @@ def determine_reactions(formula, available_data): # 3. for each compound with each two other compounds ... till other compounds reactions = [] constructed_products = [] - pset_available_data = powerset(available_data) # if len available_data to large cut off? + pset_available_data = powerset(available_data) # if len available_data to large cut off? for i, dataset in enumerate(pset_available_data): productstring = '' if len(dataset) < 1: @@ -331,12 +363,12 @@ def determine_reactions(formula, available_data): continue return reactions -# test reac = determine_reactions('Be12W', ['Be12W', 'Be2W', 'Be', 'W', 'Be22W']) + +# test +# reac = determine_reactions('Be12W', ['Be12W', 'Be2W', 'Be', 'W', 'Be22W']) #print(reac ['1*Be12W->1*Be12W', '1*Be12W->1*Be2W+10*Be', '2*Be12W->1*Be2W+1*Be22W', # '1*Be12W->12*Be+1*W', '11*Be12W->5*W+6*Be22W']) - -#reac = determine_reactions('Be12Ti', ['Be12Ti', 'Be17Ti2', 'BeTi', 'Ti', 'Be', -# 'Be2Ti', 'Be8Ti4']) +#reac = determine_reactions('Be12Ti', ['Be12Ti', 'Be17Ti2', 'BeTi', 'Ti', 'Be', 'Be2Ti', 'Be8Ti4']) #print(reac ['1*Be12Ti->1*Be12Ti', '2*Be12Ti->1*Be17Ti2+7*Be', '1*Be12Ti->1*BeTi+11*Be', # '1*Be12Ti->1*Ti+12*Be', '1*Be12Ti->10*Be+1*Be2Ti', '4*Be12Ti->40*Be+1*Be8Ti4']) @@ -347,7 +379,7 @@ def convert_eq_to_dict(equationstring): convert_eq_to_dict('1*Be12Ti->10*Be+1*Be2Ti+5*Be') -> {'products': {'Be': 15, 'Be2Ti': 1}, 'educts': {'Be12Ti': 1}} """ - eq_dict = {'products': {}, 'educts' : {}} + eq_dict = {'products': {}, 'educts': {}} product_dict = {} educt_dict = {} @@ -366,8 +398,9 @@ def convert_eq_to_dict(equationstring): eq_dict['educts'] = educt_dict return eq_dict + # test convert_eq_to_dict('1*Be12Ti->10*Be+1*Be2Ti+5*Be') - # {'products': {'Be': 15, 'Be2Ti': 1}, 'educts': {'Be12Ti': 1}} +# {'products': {'Be': 15, 'Be2Ti': 1}, 'educts': {'Be12Ti': 1}} def get_enhalpy_of_equation(reaction, formenergydict): @@ -386,27 +419,27 @@ def get_enhalpy_of_equation(reaction, formenergydict): for compound, factor in six.iteritems(reac_dict.get('educts', {})): compound_e = 0 try: - compound_e = formenergydict.get(compound) + compound_e = formenergydict.get(compound, 0) except KeyError: - print(('Formation energy of compound {} not given in {}.' - 'I abort...'.format(compound, formenergydict))) + print(('Formation energy of compound {} not given in {}.' 'I abort...'.format(compound, formenergydict))) compound_e = 0 - return None - educt_energy = educt_energy + factor*compound_e + # can be that educt side is not a real 'compound' but just a stoichiometry + # so we give it 0 + #return None + educt_energy = educt_energy + factor * compound_e for compound, factor in six.iteritems(reac_dict.get('products', {})): try: compound_e = formenergydict.get(compound) except KeyError: - print(('Formation energy of compound {} not given in {}.' - 'I abort...'.format(compound, formenergydict))) + print(('Formation energy of compound {} not given in {}.' 'I abort...'.format(compound, formenergydict))) compound_e = 0 return None - product_energy = product_energy + factor*compound_e - + product_energy = product_energy + factor * compound_e return educt_energy - product_energy + def balance_equation(equation_string, allow_negativ=False, allow_zero=False, eval_linear=True): """ Method that balances a chemical equation. @@ -420,6 +453,8 @@ def balance_equation(equation_string, allow_negativ=False, allow_zero=False, eva balance_equation("Be12W->Be22W+Be12W") balance_equation("Be12W->Be12W") + have to be intergers everywhere in the equation, factors and formulas + 1*C7H16+11*O2 ->7* CO2+8*H2O None 1*Be12W->1*Be12W @@ -430,9 +465,10 @@ def balance_equation(equation_string, allow_negativ=False, allow_zero=False, eva code adapted from stack exchange (the messy part): https://codegolf.stackexchange.com/questions/8728/balance-chemical-equations """ - - import sys, re + import sys + import re from sympy.solvers import solve + from sympy.core.numbers import Rational, Integer from collections import defaultdict letters = 'abcdefghijklmnopqrstuvwxyz' Ls = list(letters) @@ -444,42 +480,72 @@ def balance_equation(equation_string, allow_negativ=False, allow_zero=False, eva for e, m in re.findall('([A-Z][a-z]?)([0-9]*)', k): m = 1 if m == '' else int(m) a *= m - d = [c[0], c[1]*m*i] + d = [c[0], c[1] * m * i] Ss[e][:0], Es[:0] = [d], [[e, d]] i = -1 - Ys = dict((s, eval('Symbol("'+s+'")')) for s in Os if s not in Ls) - Qs = [eval('+'.join('%d*%s'%(c[1], c[0]) for c in Ss[s]), {}, Ys) for s in Ss]+[Ys['a']-a] + Ys = {} # dict((s, eval('Symbol("' + s + '")')) for s in Os if s not in Ls) + for s in Os: + if s not in Ls: + Ys[s] = Symbol(str(s)) + #a = '+'.join('%d*%s' % (c[1], c[0]) for c in Ss[s]) + #print(a) + Qs = [ + eval( # pylint: disable=eval-used + '+'.join('%d*%s' % (c[1], c[0]) for c in Ss[s]), {}, Ys) for s in Ss + ] + [Ys['a'] - a] + # FIXME + #Qs = [] + #for s in Ss: + # res1 = '' + # for c in s: + # prod = '%d*%s' % (c[1], c[0]) + # res1 = res1 + '+' + prod + # Qs.append(res1) + #Qs + [Ys['a'] - a] + k = solve(Qs, *Ys) - if k:# if a solution is found multiply by gcd + if k: # if a solution is found multiply by gcd # TODO? check if solution has linear dependence: and evaluate #for c in k.values(): # for char in list(letters): # if char in str(c): # pass - N = []#[k[Ys[s]]for s in sorted(Ys)] + N = [] #[k[Ys[s]]for s in sorted(Ys)] + rescale_N = False + denom_list = [] for s in sorted(Ys): n = k[Ys[s]] # idea: check if char in n, then linear depended, then - try: # since solver gives also a linear depended solution if correct, but code fails then - if n < 0 and not allow_negativ: # We allow for 0 but might be an other case to think about + try: # since solver gives also a linear depended solution if correct, but code fails then + if n < 0 and not allow_negativ: # We allow for 0 but might be an other case to think about return None except TypeError: - return None # TODO Maybe other return value... maybe list of some values for + return None # TODO Maybe other return value... maybe list of some values for # linear dependencies, d,e,....? also choose them that the value is positive...? if n == 0 and not allow_zero: return None N.append(n) + + # Rationals are a problem in gcd, so we have to get rid of them + if isinstance(n, Rational): + rescale_N = True + denom_list.append(n.as_numer_denom()[1]) + if rescale_N: + multiplier = 1 + for denom in denom_list: + multiplier = multiplier * int(denom) + N = [int(n * multiplier) for n in N] g = N[0] for a1, a2 in zip(N[0::2], N[0::2]): - g=gcd(g, a2) - N = [i/g for i in N] - pM = lambda c: str(c)+'*'# if c!=1 else '' - return '->'.join('+'.join(pM(N.pop(0))+str(t) for t in p.split('+')) for p in eq.split('->')) + g = gcd(g, a2) + N = [int(i / g) for i in N] + pM = lambda c: str(c) + '*' # if c!=1 else '' + res = '->'.join('+'.join(pM(N.pop(0)) + str(t) for t in p.split('+')) for p in eq.split('->')) + return res else: return None - def check_eos_energies(energylist): """ Checks if there is an abnormality in the total energies from the Equation of states. @@ -503,6 +569,7 @@ def check_eos_energies(energylist): return abnormality, abnormalityindexlist + #total_energy = [ -1, -2, -3 ,-2,-4,-3,-2,-1] #check_eos_energies(total_energy) #(True, [3]) diff --git a/aiida_fleur/tools/create_corehole.py b/aiida_fleur/tools/create_corehole.py index 94a1e5b57..b81cc5617 100644 --- a/aiida_fleur/tools/create_corehole.py +++ b/aiida_fleur/tools/create_corehole.py @@ -9,17 +9,20 @@ # For further information please visit http://www.flapw.de or # # http://aiida-fleur.readthedocs.io/en/develop/ # ############################################################################### - +''' +Contains helper functions to create core-holes in +Fleur input files from AiiDA data nodes. +''' from __future__ import absolute_import from __future__ import print_function from aiida.plugins import DataFactory import six - # TODO maybe merge these methods into fleurinp or structure util? or create a parameterData utils #355 -def create_corehole_para(structure, kind, econfig, species_name='corehole', parameterData=None): + +def create_corehole_para(structure, kind, econfig, species_name='corehole', parameterdata=None): """ This methods sets of electron configurations for a kind or position given, make sure to break the symmetry for this position/kind @@ -30,13 +33,12 @@ def create_corehole_para(structure, kind, econfig, species_name='corehole', para param: econfig, string, e.g. econfig = "[Kr] 5s2 4d10 4f13 | 5p6 5d5 6s2" ! THis is the new econfig therefore - returns a parameterData node + returns a Dict node """ from aiida.common.constants import elements as PeriodicTableElements - _atomic_numbers = {data['symbol']: num for num, - data in six.iteritems(PeriodicTableElements)} + _atomic_numbers = {data['symbol']: num for num, data in six.iteritems(PeriodicTableElements)} #from aiida_fleur.tools.merge_parameter import merge_parameter kindo = structure.get_kind(kind) @@ -44,44 +46,44 @@ def create_corehole_para(structure, kind, econfig, species_name='corehole', para head = kindo.name.rstrip('01223456789') #print(kindo) charge = _atomic_numbers[kindo.symbol] - id = float("{}.{}".format(charge, kindo.name[len(head):])) - #print('id {}'.format(id)) + a_id = float('{}.{}'.format(charge, kindo.name[len(head):])) + #print('a_id {}'.format(a_id)) # get kind symbol, get kind name, #&atom element="W" jri=921 lmax=8 rmt=2.52 dx=0.014 lo="5p" econfig="[Kr] 5s2 4d10 4f13 | 5p6 5d4 6s2" / #count = 0 - if parameterData: - new_parameterd = parameterData.get_dict() # dict()otherwise parameterData is changed + if parameterdata: + new_parameterd = parameterdata.get_dict() # dict()otherwise parameterdata is changed for key, val in six.iteritems(new_parameterd): if 'atom' in key: if val.get('element', None) == symbol: - # remember id is atomic number.some int - if (id and float(id) == float(val.get('id', -1))): - val.update({'econfig' : econfig}) + # remember atomic id is atomic number.some int + if (a_id and float(a_id) == float(val.get('id', -1))): + val.update({'econfig': econfig}) break - elif not id: - val.update({'econfig' : econfig}) + if not a_id: + val.update({'econfig': econfig}) else: pass else: - if id: + if a_id: if species_name: - new_parameterd = {'atom': {'element' : symbol, 'econfig' : econfig, 'id' : id, 'name' : species_name}} + new_parameterd = {'atom': {'element': symbol, 'econfig': econfig, 'id': a_id, 'name': species_name}} else: - new_parameterd = {'atom': {'element' : symbol, 'econfig' : econfig, 'id' : id}} + new_parameterd = {'atom': {'element': symbol, 'econfig': econfig, 'id': a_id}} else: - new_parameterd = {'atom': {'element' : symbol, 'econfig' : econfig}} + new_parameterd = {'atom': {'element': symbol, 'econfig': econfig}} from aiida.orm import Dict - new_parameter= Dict(dict=new_parameterd) - #if parameterData: - # new_parameter = merge_parameter(parameterData, new_parameter) - return new_parameter#structure + new_parameter = Dict(dict=new_parameterd) + #if parameterdata: + # new_parameter = merge_parameter(parameterdata, new_parameter) + return new_parameter #structure # Move to fleurinpmod? fleurinp->self # This method is fully implemented yet since it turned out to better go over inpgen -def create_corehole_fleurinp(fleurinp, species, stateocc, pos=[], coreconfig='same', valenceconfig='same'): +def create_corehole_fleurinp(fleurinp, species, stateocc, pos=None, coreconfig='same', valenceconfig='same'): """ Removes an electron from the core and adds it to the valence band of the kind given econfig as in inp.xml:: @@ -89,7 +91,7 @@ def create_corehole_fleurinp(fleurinp, species, stateocc, pos=[], coreconfig='sa [Kr] (5s1/2) (4d3/2) (4d5/2) (4f5/2) (4f7/2) if position(pos) is given the electronConfig for the specified position will be set. - (or todo? econfig, either:: + (or todo? econfig, either:: [Kr] 5s2 4d10 4f13 | 5p6 5d4 6s2 @@ -122,7 +124,7 @@ def create_corehole_fleurinp(fleurinp, species, stateocc, pos=[], coreconfig='sa FleurinpData = DataFactory('fleur.fleurinp') ########### all xpath maintain ########### ? needed? - electronConfig_xpath = '/fleurInput/atomSpecies/species/electronConfig' + electronConfig_xpath = '/fleurInput/atomSpecies/species/electronConfig' species_xpath = '/fleurInput/atomSpecies/species' ##################### @@ -139,14 +141,15 @@ def create_corehole_fleurinp(fleurinp, species, stateocc, pos=[], coreconfig='sa # test input. if not isinstance(fleurinp, FleurinpData): print('No fleurinp Data given to "create_valence_corehole"') - return None # TODO throw error? + return None # TODO throw error? if coreconfig != 'same': new_core = True if valenceconfig != 'same': new_valence = True - + if pos is None: + pos = [] species_tags = fleurinp.get_tag(species_xpath) for speci in species_tags: if get_xml_attribute(speci, 'name') == species: @@ -169,20 +172,16 @@ def create_corehole_fleurinp(fleurinp, species, stateocc, pos=[], coreconfig='sa if not added: pass - #st_inpchanges(change_dict) - #alternative - change_dict = {'coreConfig' : '', 'valenceConfig': ''} - change_dict2 = {'state' : '', 'spinUp' : '', 'spinDown' : ''} - change_dict3 = {'valenceElectrons' : ''} - + change_dict = {'coreConfig': '', 'valenceConfig': ''} + change_dict2 = {'state': '', 'spinUp': '', 'spinDown': ''} + change_dict3 = {'valenceElectrons': ''} return fleurinp - def write_change(xmltree, changelist_xpath): """ applies the changes from the changelist to the xml tree @@ -192,5 +191,3 @@ def write_change(xmltree, changelist_xpath): xpath = element[0] value = element[1] return xmltree_new - - diff --git a/aiida_fleur/tools/data_handling.py b/aiida_fleur/tools/data_handling.py index 70a83243b..16ba72a02 100644 --- a/aiida_fleur/tools/data_handling.py +++ b/aiida_fleur/tools/data_handling.py @@ -9,7 +9,6 @@ # For further information please visit http://www.flapw.de or # # http://aiida-fleur.readthedocs.io/en/develop/ # ############################################################################### - """ This module contains useful function to extract data from nodes, specific to aiida-fleur. Any useful code snipets for handling large number of @@ -235,6 +234,8 @@ def get_cif_file(node): break return [cif_filename, cif_uuid] + + # wf_struc_from_cif process_label # cif.filename # cif.uuid diff --git a/aiida_fleur/tools/decide_ncore.py b/aiida_fleur/tools/decide_ncore.py index a71b1b65b..0ae5a0b7b 100644 --- a/aiida_fleur/tools/decide_ncore.py +++ b/aiida_fleur/tools/decide_ncore.py @@ -9,9 +9,11 @@ # For further information please visit http://www.flapw.de or # # http://aiida-fleur.readthedocs.io/en/develop/ # ############################################################################### - +''' +Contains helper functions to decide on the paralellization to use for a given system. +''' from __future__ import absolute_import -from six.moves import range + def gcd(x, y): """ @@ -21,12 +23,13 @@ def gcd(x, y): (x, y) = (y, x % y) return x + def decide_ncore(nkpoints, ncore): """ For kpoint para the number of cores used must be devidebale """ ncore_new = gcd(nkpoints, ncore) - ncore_list = list(range(ncore_new, ncore+1)) + ncore_list = list(range(ncore_new, ncore + 1)) #print ncore_list for noc in ncore_list: remain = nkpoints % noc diff --git a/aiida_fleur/tools/dict_util.py b/aiida_fleur/tools/dict_util.py index dfbe9ff45..b6f3bc345 100644 --- a/aiida_fleur/tools/dict_util.py +++ b/aiida_fleur/tools/dict_util.py @@ -9,7 +9,6 @@ # For further information please visit http://www.flapw.de or # # http://aiida-fleur.readthedocs.io/en/develop/ # ############################################################################### - """ This contains code snippets and utility useful for dealing with parameter data nodes commonly used by the fleur plugin and workflows @@ -18,6 +17,7 @@ from __future__ import absolute_import import six + def extract_elementpara(parameter_dict, element): """ :param parameter_dict: python dict, parameter node for inpgen diff --git a/aiida_fleur/tools/element_econfig_list.py b/aiida_fleur/tools/element_econfig_list.py index bc7fbb432..df05373d7 100644 --- a/aiida_fleur/tools/element_econfig_list.py +++ b/aiida_fleur/tools/element_econfig_list.py @@ -9,7 +9,6 @@ # For further information please visit http://www.flapw.de or # # http://aiida-fleur.readthedocs.io/en/develop/ # ############################################################################### - """ You find the usual binding_energy for all elements in the periodic table. """ @@ -18,7 +17,7 @@ from aiida.common.constants import elements as PeriodicTableElements import six import json -atomic_numbers = {data['symbol'] : num for num, data in six.iteritems(PeriodicTableElements)} +atomic_numbers = {data['symbol']: num for num, data in six.iteritems(PeriodicTableElements)} # TODO # FLEUR econfig=[core states|valence states] @@ -28,137 +27,1319 @@ # because the starting point matters, especially in the magnetic case. econfiguration = { - 1: {'mass': 1.00794, 'name': 'Hydrogen', 'symbol': 'H', 'econfig': '1s1' , 'fleur_default_econfig' : '| 1s1', 'lo' : '', 'rmt' : 0.65, 'lmax' : '', 'jri' : 981, 'soc' : False, 'mag' : False}, - 2: {'mass': 4.002602, 'name': 'Helium', 'symbol': 'He', 'econfig': '1s2', 'fleur_default_econfig' : '| 1s2', 'lo' : '', 'rmt' : 1.2, 'lmax' : '', 'jri' : 981}, - 3: {'mass': 6.941, 'name': 'Lithium', 'symbol': 'Li', 'econfig': '1s2 | 2s1', 'fleur_default_econfig' : '1s2 | 2s1', 'lo' : '', 'rmt' : 2.13, 'lmax' : '', 'jri' : 981}, - 4: {'mass': 9.012182, 'name': 'Beryllium', 'symbol': 'Be', 'econfig': '1s2 | 2s2', 'fleur_default_econfig' : '1s2 | 2s2', 'lo' : '', 'rmt' : 1.87, 'lmax' : '', 'jri' : 981}, - 5: {'mass': 10.811, 'name': 'Boron', 'symbol': 'B', 'econfig': '1s2 | 2s2 2p1', 'fleur_default_econfig' : '1s2 | 2s2 2p1', 'lo' : '', 'rmt': 1.4, 'lmax' : '', 'jri' : 981}, - 6: {'mass': 12.0107, 'name': 'Carbon', 'symbol': 'C', 'econfig': '[He] 2s2 | 2p2', 'fleur_default_econfig' : '[He] 2s2 | 2p2', 'lo' : '', 'rmt' : 1.2, 'lmax' : '', 'jri' : 981}, - 7: {'mass': 14.0067, 'name': 'Nitrogen', 'symbol': 'N', 'econfig': '[He] 2s2 | 2p3', 'fleur_default_econfig' : '[He] 2s2 | 2p3', 'lo' : '', 'rmt' : 1.0, 'lmax' : '', 'jri' : 981}, - 8: {'mass': 15.9994, 'name': 'Oxygen', 'symbol': 'O', 'econfig': '[He] 2s2 | 2p4', 'fleur_default_econfig' : '[He] 2s2 | 2p4', 'lo' : '', 'rmt' : 1.1, 'lmax' : '', 'jri' : 981}, - 9: {'mass': 18.9984032, 'name': 'Fluorine', 'symbol': 'F', 'econfig': '[He] 2s2 | 2p5', 'fleur_default_econfig' : '[He] 2s2 | 2p5', 'lo' : '', 'rmt' : 1.2, 'lmax' : '', 'jri' : 981}, - 10: {'mass': 20.1797, 'name': 'Neon', 'symbol': 'Ne', 'econfig': '[He] 2s2 | 2p6', 'fleur_default_econfig' : '[He] 2s2 | 2p6', 'lo' : '', 'rmt' : 2.1, 'lmax' : '', 'jri' : 981}, - 11: {'mass': 22.98977, 'name': 'Sodium', 'symbol': 'Na', 'econfig': '[He] 2s2 | 2p6 3s1', 'fleur_default_econfig' : '[He] | 2s2 2p6 3s1', 'lo' : '2s 2p', 'rmt' : 2.1, 'lmax' : '', 'jri' : 981}, - 12: {'mass': 24.305, 'name': 'Magnesium', 'symbol': 'Mg', 'econfig': '[He] 2s2 | 2p6 3s2', 'fleur_default_econfig' : '[He] 2s2 | 2p6 3s2', 'lo' : '2p', 'rmt' : 2.3, 'lmax' : '', 'jri' : 981}, - 13: {'mass': 26.981538, 'name': 'Aluminium', 'symbol': 'Al', 'econfig': '[He] 2s2 2p6 | 3s2 3p1', 'fleur_default_econfig' : '[He] 2s2 2p6 | 3s2 3p1', 'lo' : '', 'rmt' : 2.1, 'lmax' : '', 'jri' : 981}, - 14: {'mass': 28.0855, 'name': 'Silicon', 'symbol': 'Si', 'econfig': '[He] 2s2 2p6 | 3s2 3p2', 'fleur_default_econfig' : '[He] 2s2 2p6 | 3s2 3p2', 'lo' : '', 'rmt' : 2.0, 'lmax' : '', 'jri' : 981}, - 15: {'mass': 30.973761, 'name': 'Phosphorus', 'symbol': 'P', 'econfig': '[He] 2s2 2p6 | 3s2 3p3', 'fleur_default_econfig' : '[He] 2s2 2p6 | 3s2 3p3', 'lo' : '', 'rmt' : 1.9, 'lmax' : '', 'jri' : 981}, - 16: {'mass': 32.065, 'name': 'Sulfur', 'symbol': 'S', 'econfig': '[He] 2s2 2p6 | 3s2 3p4', 'fleur_default_econfig' : '[He] 2s2 2p6 | 3s2 3p4', 'lo' : '', 'rmt' : 1.7, 'lmax' : '', 'jri' : 981}, - 17: {'mass': 35.453, 'name': 'Chlorine', 'symbol': 'Cl', 'econfig': '[He] 2s2 2p6 | 3s2 3p5', 'fleur_default_econfig' : '[He] 2s2 2p6 | 3s2 3p5', 'lo' : '', 'rmt' : 1.7, 'lmax' : '', 'jri' : 981}, - 18: {'mass': 39.948, 'name': 'Argon', 'symbol': 'Ar', 'econfig': '[He] 2s2 2p6 | 3s2 3p6', 'fleur_default_econfig' : '[He] 2s2 2p6 | 3s2 3p6', 'lo' : '', 'rmt' : 1.8, 'lmax' : '', 'jri' : 981}, - 19: {'mass': 39.0983, 'name': 'Potassium', 'symbol': 'K', 'econfig': '[Ne] 3s2 | 3p6 4s1', 'fleur_default_econfig' : '[Ne] | 3s2 3p6 4s1', 'lo' : '3s 3p', 'rmt' : 2.0, 'lmax' : '', 'jri' : 981}, - 20: {'mass': 40.078, 'name': 'Calcium', 'symbol': 'Ca', 'econfig': '[Ne] 3s2 | 3p6 4s2', 'fleur_default_econfig' : '[Ne] | 3s2 3p6 4s2', 'lo' : '3s 3p', 'rmt' : 2.3, 'lmax' : '', 'jri' : 981}, - 21: {'mass': 44.955912, 'name': 'Scandium', 'symbol': 'Sc', 'econfig': '[Ne] 3s2 3p6 | 4s2 3d1', 'fleur_default_econfig' : '[Ne] | 3s2 3p6 4s2 3d1', 'lo' : '3s 3p', 'rmt' : 2.2, 'lmax' : '', 'jri' : 981}, - 22: {'mass': 47.867, 'name': 'Titanium', 'symbol': 'Ti', 'econfig': '[Ne] | 3s2 3p6 4s2 3d2', 'fleur_default_econfig' : '[Ne] | 3s2 3p6 4s2 3d2', 'lo' : '3s 3p', 'rmt' : 2.1, 'lmax' : '', 'jri' : 981}, - 23: {'mass': 50.9415, 'name': 'Vanadium', 'symbol': 'V', 'econfig': '[Ne] 3s2 3p6 | 4s2 3d3', 'fleur_default_econfig' : '[Ne] | 3s2 3p6 4s2 3d3', 'lo' : '3s 3p', 'rmt' : 1.9, 'lmax' : '', 'jri' : 981}, - 24: {'mass': 51.9961, 'name': 'Chromium', 'symbol': 'Cr', 'econfig': '[Ne] 3s2 3p6 | 4s1 3d5', 'fleur_default_econfig' : '[Ne] | 3s2 3p6 4s1 3d5', 'lo' : '3s 3p', 'rmt' : 1.8, 'lmax' : '', 'jri' : 981}, - 25: {'mass': 54.938045, 'name': 'Manganese', 'symbol': 'Mn', 'econfig': '[Ne] 3s2 3p6 | 4s2 3d5', 'fleur_default_econfig' : '[Ne] | 3s2 3p6 4s2 3d5', 'lo' : '3s 3p', 'rmt' : 2.0, 'lmax' : '', 'jri' : 981}, - 26: {'mass': 55.845, 'name': 'Iron', 'symbol': 'Fe', 'econfig': '[Ne] 3s2 3p6 | 4s2 3d6', 'fleur_default_econfig' : '[Ne] | 3s2 3p6 4s2 3d6', 'lo' : '3s 3p', 'rmt' : 2.00, 'lmax' : '', 'jri' : 981}, - 27: {'mass': 58.933195, 'name': 'Cobalt', 'symbol': 'Co', 'econfig': '[Ne] 3s2 3p6 | 4s2 3d7', 'fleur_default_econfig' : '[Ne] 3s2 | 3p6 4s2 3d7', 'lo' : '3p', 'rmt' : 1.9, 'lmax' : '', 'jri' : 981}, - 28: {'mass': 58.6934, 'name': 'Nickel', 'symbol': 'Ni', 'econfig': '[Ne] 3s2 3p6 | 4s2 3d8', 'fleur_default_econfig' : '[Ne] 3s2 | 3p6 4s2 3d8', 'lo' : '3p', 'rmt' : 1.9, 'lmax' : '', 'jri' : 981}, - 29: {'mass': 63.546, 'name': 'Copper', 'symbol': 'Cu', 'econfig': '[Ne] 3s2 3p6 |4s1 3d10', 'fleur_default_econfig' : '[Ne] 3s2 | 3p6 4s1 3d10', 'lo' : '3p', 'rmt' : 2.1, 'lmax' : '', 'jri' : 981}, - 30: {'mass': 65.38, 'name': 'Zinc', 'symbol': 'Zn', 'econfig': '[Ne] 3s2 3p6 | 3d10 4s2', 'fleur_default_econfig' : '[Ne] 3s2 3p6 | 3d10 4s2', 'lo' : '3d', 'rmt' : 2.2, 'lmax' : '', 'jri' : 981}, - 31: {'mass': 69.723, 'name': 'Gallium', 'symbol': 'Ga', 'econfig': '[Ne] 3s2 3p6 | 3d10 4s2 4p1', 'fleur_default_econfig' : '[Ne] 3s2 3p6 | 3d10 4s2 4p1', 'lo' : '3d', 'rmt' : 2.1, 'lmax' : '', 'jri' : 981}, - 32: {'mass': 72.64, 'name': 'Germanium', 'symbol': 'Ge', 'econfig': '[Ne] 3s2 3p6 | 3d10 4s2 4p2', 'fleur_default_econfig' : '[Ne] 3s2 3p6 | 3d10 4s2 4p2', 'lo' : '3d', 'rmt' : 2.1, 'lmax' : '', 'jri' : 981}, - 33: {'mass': 74.9216, 'name': 'Arsenic', 'symbol': 'As', 'econfig': '[Ne] 3s2 3p6 | 3d10 4s2 4p3', 'fleur_default_econfig' : '[Ne] 3s2 3p6 | 3d10 4s2 4p3', 'lo' : '3d', 'rmt' : 2.0, 'lmax' : '', 'jri' : 981}, - 34: {'mass': 78.96, 'name': 'Selenium', 'symbol': 'Se', 'econfig': '[Ne] 3s2 3p6 | 3d10 4s2 4p4', 'fleur_default_econfig' : '[Ne] 3s2 3p6 | 3d10 4s2 4p4', 'lo' : '3d', 'rmt' : 2.0, 'lmax' : '', 'jri' : 981}, - 35: {'mass': 79.904, 'name': 'Bromine', 'symbol': 'Br', 'econfig': '[Ne] 3s2 3p6 | 3d10 4s2 4p5', 'fleur_default_econfig' : '[Ne] 3s2 3p6 | 3d10 4s2 4p5', 'lo' : '3d', 'rmt' : 2.1, 'lmax' : '', 'jri' : 981}, - 36: {'mass': 83.798, 'name': 'Krypton', 'symbol': 'Kr', 'econfig': '[Ne] 3s2 3p6 | 3d10 4s2 4p6', 'fleur_default_econfig' : '[Ne] 3s2 3p6 | 3d10 4s2 4p6', 'lo' : '3d', 'rmt' : 2.2, 'lmax' : '', 'jri' : 981}, - 37: {'mass': 85.4678, 'name': 'Rubidium', 'symbol': 'Rb', 'econfig': '[Ar] 3d10 4s2 | 4p6 5s1', 'fleur_default_econfig' : '[Ar] 3d10 | 4s2 4p6 5s1', 'lo' : '4s 4p', 'rmt' : 2.4, 'lmax' : '', 'jri' : 981}, - 38: {'mass': 87.62, 'name': 'Strontium', 'symbol': 'Sr', 'econfig': '[Ar] 3d10 4s2 | 4p6 5s2', 'fleur_default_econfig' : '[Ar] 3d10 | 4s2 4p6 5s2', 'lo' : '4s 4p', 'rmt' : 2.4, 'lmax' : '', 'jri' : 981}, - 39: {'mass': 88.90585, 'name': 'Yttrium', 'symbol': 'Y', 'econfig': '[Ar] 4s2 3d10 4p6 | 5s2 4d1', 'fleur_default_econfig' : '[Ar] 3d10 | 4s2 4p6 5s2 4d1', 'lo' : '4s 4p', 'rmt' : 2.4, 'lmax' : '', 'jri' : 981}, - 40: {'mass': 91.224, 'name': 'Zirconium', 'symbol': 'Zr', 'econfig': '[Ar] 4s2 3d10 4p6 | 5s2 4d2', 'fleur_default_econfig' : '[Ar] 3d10 | 4s2 4p6 5s2 4d2', 'lo' : '4s 4p', 'rmt' : 2.3, 'lmax' : '', 'jri' : 981}, - 41: {'mass': 92.90638, 'name': 'Niobium', 'symbol': 'Nb', 'econfig': '[Ar] 4s2 3d10 4p6 | 5s1 4d4', 'fleur_default_econfig' : '[Ar] 3d10 | 4s2 4p6 5s1 4d4', 'lo' : '4s 4p', 'rmt' : 2.1, 'lmax' : '', 'jri' : 981}, - 42: {'mass': 95.96, 'name': 'Molybdenum', 'symbol': 'Mo', 'econfig': '[Ar] 4s2 3d10 4p6 | 5s1 4d5', 'fleur_default_econfig' : '[Ar] 3d10 | 4s2 4p6 5s1 4d5', 'lo' : '4s 4p', 'rmt' : 2.0, 'lmax' : '', 'jri' : 981}, - 43: {'mass': 98.0, 'name': 'Technetium', 'symbol': 'Tc', 'econfig': '[Ar] 4s2 3d10 4p6 | 5s2 4d5', 'fleur_default_econfig' : '[Ar] 3d10 | 4s2 4p6 5s2 4d5', 'lo' : '4s 4p', 'rmt' : 2.1, 'lmax' : '', 'jri' : 981}, - 44: {'mass': 101.07, 'name': 'Ruthenium', 'symbol': 'Ru', 'econfig': '[Ar] 4s2 3d10 4p6 | 5s1 4d7', 'fleur_default_econfig' : '[Ar] 4s2 3d10 | 4p6 5s1 4d7', 'lo' : '4p', 'rmt' : 2.1, 'lmax' : '', 'jri' : 981}, - 45: {'mass': 102.9055, 'name': 'Rhodium', 'symbol': 'Rh', 'econfig': '[Ar] 4s2 3d10 4p6 | 5s1 4d8', 'fleur_default_econfig' : '[Ar] 4s2 3d10 | 4p6 5s1 4d8', 'lo' : '4p', 'rmt' : 2.1, 'lmax' : '', 'jri' : 981}, - 46: {'mass': 106.42, 'name': 'Palladium', 'symbol': 'Pd', 'econfig': '[Ar] 4s2 3d10 4p6 | 4d10', 'fleur_default_econfig' : '[Ar] 4s2 3d10 | 4p6 4d10', 'lo' : '4p', 'rmt' : 2.1, 'lmax' : '', 'jri' : 981}, - 47: {'mass': 107.8682, 'name': 'Silver', 'symbol': 'Ag', 'econfig': '[Ar] 4s2 3d10 4p6 | 5s1 4d10', 'fleur_default_econfig' : '[Ar] 3d10 | 4s2 4p6 5s1 4d10', 'lo' : '4s 4p', 'rmt' : 2.3, 'lmax' : '', 'jri' : 981}, - 48: {'mass': 112.411, 'name': 'Cadmium', 'symbol': 'Cd', 'econfig': '[Ar] 4s2 3d10 4p6 | 4d10 5s2', 'fleur_default_econfig' : '[Ar] 4s2 3d10 4p6 | 4d10 5s2', 'lo' : '4d', 'rmt' : 2.4, 'lmax' : '', 'jri' : 981}, - 49: {'mass': 114.818, 'name': 'Indium', 'symbol': 'In', 'econfig': '[Ar] 4s2 3d10 4p6 | 4d10 5s2 5p1', 'fleur_default_econfig' : '[Ar] 4s2 3d10 4p6 | 4d10 5s2 5p1', 'lo' : '4d', 'rmt' : 2.2, 'lmax' : '', 'jri' : 981}, - 50: {'mass': 118.71, 'name': 'Tin', 'symbol': 'Sn', 'econfig': '[Kr] 4d10 | 5s2 5p2', 'fleur_default_econfig' : '[Kr] | 4d10 5s2 5p2', 'lo' : '4d', 'rmt' : 2.3, 'lmax' : '', 'jri' : 981}, - 51: {'mass': 121.76, 'name': 'Antimony', 'symbol': 'Sb', 'econfig': '[Kr] 4d10 | 5s2 5p3', 'fleur_default_econfig' : '[Kr] | 4d10 5s2 5p3', 'lo' : '4d', 'rmt' : 2.3, 'lmax' : '', 'jri' : 981}, - 52: {'mass': 127.6, 'name': 'Tellurium', 'symbol': 'Te', 'econfig': '[Kr] 4d10 | 5s2 5p4', 'fleur_default_econfig' : '[Kr] | 4d10 5s2 5p4', 'lo' : '4d', 'rmt' : 2.3, 'lmax' : '', 'jri' : 981}, - 53: {'mass': 126.90447, 'name': 'Iodine', 'symbol': 'I', 'econfig': '[Kr] 4d10 | 5s2 5p5', 'fleur_default_econfig' : '[Kr] | 4d10 5s2 5p5', 'lo' : '4d', 'rmt' : 2.2, 'lmax' : '', 'jri' : 981}, - 54: {'mass': 131.293, 'name': 'Xenon', 'symbol': 'Xe', 'econfig': '[Kr] 4d10 | 5s2 5p6', 'fleur_default_econfig' : '[Kr] | 4d10 5s2 5p6', 'lo' : '4d', 'rmt' : 2.2, 'lmax' : '', 'jri' : 981}, - 55: {'mass': 132.9054519, 'name': 'Caesium', 'symbol': 'Cs', 'econfig': '[Kr] 4d10 5s2 | 5p6 6s1', 'fleur_default_econfig' : '[Kr] 4d10 | 5s2 5p6 6s1', 'lo' : '5s 5p', 'rmt' : 2.4, 'lmax' : '', 'jri' : 981}, - 56: {'mass': 137.327, 'name': 'Barium', 'symbol': 'Ba', 'econfig': '[Kr] 4d10 5s2 | 5p6 6s2', 'fleur_default_econfig' : '[Kr] 4d10 | 5s2 5p6 6s2', 'lo' : '5s 5p', 'rmt' : 2.4, 'lmax' : '', 'jri' : 981}, - 57: {'mass': 138.90547, 'name': 'Lanthanum', 'symbol': 'La', 'econfig': '[Kr] 4d10 5s2 | 5p6 6s2 5d1', 'fleur_default_econfig' : '[Kr] 4d10 | 5s2 5p6 6s2 5d1', 'lo' : '5s 5p', 'rmt' : 2.2, 'lmax' : '', 'jri' : 981}, - 58: {'mass': 140.116, 'name': 'Cerium', 'symbol': 'Ce', 'econfig': '[Kr] 4d10 5s2 5p6 | 6s2 4f1 5d1', 'fleur_default_econfig' : '[Kr] 4d10 | 5s2 5p6 6s2 4f1 5d1', 'lo' : '5s 5p', 'rmt' : 2.2, 'lmax' : '', 'jri' : 981}, - 59: {'mass': 140.90765, 'name': 'Praseodymium', 'symbol': 'Pr', 'econfig': '[Kr] 4d10 5s2 5p6 | 6s2 4f3', 'fleur_default_econfig' : '[Kr] 4d10 | 5s2 5p6 6s2 4f3', 'lo' : '5s 5p', 'rmt' : 2.4, 'lmax' : '', 'jri' : 981}, - 60: {'mass': 144.242, 'name': 'Neodymium', 'symbol': 'Nd', 'econfig': '[Kr] 4d10 5s2 5p6 | 6s2 4f4', 'fleur_default_econfig' : '[Kr] 4d10 | 5s2 5p6 6s2 4f4', 'lo' : '5s 5p', 'rmt' : 2.1, 'lmax' : '', 'jri' : 981}, - 61: {'mass': 145.0, 'name': 'Promethium', 'symbol': 'Pm', 'econfig': '[Kr] 4d10 5s2 5p6 | 6s2 4f5', 'fleur_default_econfig' : '[Kr] 4d10 | 5s2 5p6 6s2 4f5', 'lo' : '5s 5p', 'rmt' : 2.4, 'lmax' : '', 'jri' : 981}, - 62: {'mass': 150.36, 'name': 'Samarium', 'symbol': 'Sm', 'econfig': '[Kr] 4d10 5s2 5p6 | 6s2 4f6', 'fleur_default_econfig' : '[Kr] 4d10 | 5s2 5p6 6s2 4f6', 'lo' : '5s 5p', 'rmt' : 2.1, 'lmax' : '', 'jri' : 981}, - 63: {'mass': 151.964, 'name': 'Europium', 'symbol': 'Eu', 'econfig' : '[Kr] 4d10 | 4f7 5s2 5p6 6s2', 'fleur_default_econfig' : '[Kr] 4d10 | 5s2 5p6 4f7 6s2', 'lo' : '5s 5p', 'rmt' : 2.4, 'lmax' : '', 'jri' : 981}, - 64: {'mass': 157.25, 'name': 'Gadolinium', 'symbol': 'Gd', 'econfig': '[Kr] 4d10 5s2 5p6 | 6s2 4f7 5d1', 'fleur_default_econfig' : '[Kr] 4d10 | 5s2 5p6 6s2 4f7 5d1', 'lo' : '5s 5p', 'rmt' : 2.2, 'lmax' : '', 'jri' : 981}, - 65: {'mass': 158.92535, 'name': 'Terbium', 'symbol': 'Tb', 'econfig': '[Kr] 4d10 5s2 5p6 | 6s2 4f9', 'fleur_default_econfig' : '[Kr] 4d10 | 5s2 5p6 6s2 4f8 5d1', 'lo' : '5s 5p', 'rmt' : 2.1, 'lmax' : '', 'jri' : 981}, - 66: {'mass': 162.5, 'name': 'Dysprosium', 'symbol': 'Dy', 'econfig': '[Kr] 4d10 5s2 5p6 | 6s2 4f10', 'fleur_default_econfig' : '[Kr] 4d10 | 5s2 5p6 6s2 4f9 5d1', 'lo' : '5s 5p', 'rmt' : 2.4, 'lmax' : '', 'jri' : 981}, - 67: {'mass': 164.93032, 'name': 'Holmium', 'symbol': 'Ho', 'econfig': '[Kr] 4d10 5s2 5p6 | 6s2 4f11', 'fleur_default_econfig' : '[Kr] 4d10 | 5s2 5p6 6s2 4f10 5d1', 'lo' : '5s 5p', 'rmt' : 2.4, 'lmax' : '', 'jri' : 981}, - 68: {'mass': 167.259, 'name': 'Erbium', 'symbol': 'Er', 'econfig': '[Kr] 4d10 5s2 5p6 | 6s2 4f12', 'fleur_default_econfig' : '[Kr] 4d10 | 5s2 5p6 6s2 4f11 5d1', 'lo' : '5s 5p', 'rmt' : 2.5, 'lmax' : '', 'jri' : 981}, - 69: {'mass': 168.93421, 'name': 'Thulium', 'symbol': 'Tm', 'econfig': '[Kr] 4d10 5s2 5p6 | 6s2 4f13', 'fleur_default_econfig' : '[Kr] 4d10 | 5s2 5p6 6s2 4f12 5d1', 'lo' : '5s 5p', 'rmt' : 2.4, 'lmax' : '', 'jri' : 981}, - 70: {'mass': 173.054, 'name': 'Ytterbium', 'symbol': 'Yb', 'econfig': '[Kr] 4d10 5s2 5p6 | 6s2 4f14', 'fleur_default_econfig' : '[Kr] 4d10 | 5s2 5p6 6s2 4f13 5d1', 'lo' : '5s 5p', 'rmt' : 2.6, 'lmax' : '', 'jri' : 981}, - 71: {'mass': 174.9668, 'name': 'Lutetium', 'symbol': 'Lu', 'econfig': '[Kr] 4d10 | 4f14 5s2 5p6 5d1 6s2', 'fleur_default_econfig' : '[Kr] 4d10 | 5s2 5p6 4f14 6s2 5d1', 'lo' : '5s 5p', 'rmt' : 2.5, 'lmax' : '', 'jri' : 981}, - 72: {'mass': 178.49, 'name': 'Hafnium', 'symbol': 'Hf', 'econfig': '[Kr] 4d10 | 4f14 5s2 5p6 5d2 6s2', 'fleur_default_econfig' : '[Kr] 4d10 4f14 | 5s2 5p6 6s2 5d2', 'lo' : '5s 5p', 'rmt' : 2.3, 'lmax' : '', 'jri' : 981}, - 73: {'mass': 180.94788, 'name': 'Tantalum', 'symbol': 'Ta', 'econfig': '[Kr] 4d10 4f14 | 5s2 5p6 5d3 6s2', 'fleur_default_econfig' : '[Kr] 4d10 4f14 | 5s2 5p6 6s2 5d3', 'lo' : '5s 5p', 'rmt' : 2.2, 'lmax' : '', 'jri' : 981}, - 74: {'mass': 183.84, 'name': 'Tungsten', 'symbol': 'W', 'econfig' : '[Kr] 5s2 4d10 4f14 | 5p6 6s2 5d4', 'fleur_default_econfig' : '[Kr] 4d10 4f14 | 5s2 5p6 6s2 5d4', 'lo' : '5s 5p', 'rmt' : 2.1, 'lmax' : '', 'jri' : 981}, - 75: {'mass': 186.207, 'name': 'Rhenium', 'symbol': 'Re', 'econfig': '[Kr] 4d10 4f14 5p6 | 5s2 6s2 5d5', 'fleur_default_econfig' : '[Kr] 4d10 4f14 | 5s2 5p6 6s2 5d5', 'lo' : '5s 5p', 'rmt' : 2.1, 'lmax' : '', 'jri' : 981}, - 76: {'mass': 190.23, 'name': 'Osmium', 'symbol': 'Os', 'econfig': '[Kr] 4d10 4f14 5p6 | 5s2 6s2 5d6', 'fleur_default_econfig' : '[Kr] 5s2 4d10 4f14 | 5p6 6s2 5d6', 'lo' : '5p', 'rmt' : 2.1, 'lmax' : '', 'jri' : 981}, - 77: {'mass': 192.217, 'name': 'Iridium', 'symbol': 'Ir', 'econfig': '[Kr] 4d10 4f14 5p6 | 5s2 6s2 5d7', 'fleur_default_econfig' : '[Kr] 5s2 4d10 4f14 | 5p6 6s2 5d7', 'lo' : '5p', 'rmt' : 2.1, 'lmax' : '', 'jri' : 981}, - 78: {'mass': 195.084, 'name': 'Platinum', 'symbol': 'Pt', 'econfig': '[Kr] 4d10 4f14 5p6 | 5s2 6s2 5d8', 'fleur_default_econfig' : '[Kr] 5s2 4d10 4f14 | 5p6 6s2 5d8', 'lo' : '5p', 'rmt' : 2.1, 'lmax' : '', 'jri' : 981}, - 79: {'mass': 196.966569, 'name': 'Gold', 'symbol': 'Au', 'econfig': '[Kr] 4d10 4f14 5p6 | 5s2 6s2 5d9', 'fleur_default_econfig' : '[Kr] 4d10 4f14 | 5s2 5p6 6s2 5d9', 'lo' : '5s 5p', 'rmt' : 2.2, 'lmax' : '', 'jri' : 981}, - 80: {'mass': 200.59, 'name': 'Mercury', 'symbol': 'Hg', 'econfig': '[Kr] 5s2 4d10 4f14 | 5p6 5d10 6s2', 'fleur_default_econfig' : '[Kr] 5s2 4d10 4f14 5p6 | 5d10 6s2', 'lo' : '5d', 'rmt' : 2.4, 'lmax' : '', 'jri' : 981}, - 81: {'mass': 204.3833, 'name': 'Thallium', 'symbol': 'Tl', 'econfig': '[Xe] 4f14 | 5d10 6s2 6p1', 'fleur_default_econfig' : '[Xe] 4f14 | 5d10 6s2 6p1', 'lo' : '5d', 'rmt' : 2.4, 'lmax' : '', 'jri' : 981}, - 82: {'mass': 207.2, 'name': 'Lead', 'symbol': 'Pb', 'econfig': '[Xe] 4f14 | 5d10 6s2 6p2', 'fleur_default_econfig' : '[Xe] 4f14 | 5d10 6s2 6p2', 'lo' : '5d', 'rmt' : 2.4, 'lmax' : '', 'jri' : 981}, - 83: {'mass': 208.9804, 'name': 'Bismuth', 'symbol': 'Bi', 'econfig': '[Xe] 4f14 | 5d10 6s2 6p3', 'fleur_default_econfig' : '[Xe] 4f14 | 5d10 6s2 6p3', 'lo' : '5d', 'rmt' : 2.4, 'lmax' : '', 'jri' : 981}, - 84: {'mass': 209.0, 'name': 'Polonium', 'symbol': 'Po', 'econfig': '[Xe] 4f14 | 5d10 6s2 6p4', 'fleur_default_econfig' : '[Xe] 4f14 | 5d10 6s2 6p4', 'lo' : '5d', 'rmt' : 2.2, 'lmax' : '', 'jri' : 981}, - 85: {'mass': 210.0, 'name': 'Astatine', 'symbol': 'At', 'econfig': '[Xe] 4f14 | 5d10 6s2 6p5', 'fleur_default_econfig' : '[Xe] 4f14 | 5d10 6s2 6p5', 'lo' : '5d', 'rmt' : 2.2, 'lmax' : '', 'jri' : 981}, - 86: {'mass': 222.0, 'name': 'Radon', 'symbol': 'Rn', 'econfig': '[Xe] 4f14 | 5d10 6s2 6p6', 'fleur_default_econfig' : '[Xe] 4f14 | 5d10 6s2 6p6', 'lo' : '5d', 'rmt' : 2.2, 'lmax' : '', 'jri' : 981}, # TODO: after wards not rigth - 87: {'mass': 223.0, 'name': 'Francium', 'symbol': 'Fr', 'econfig': '[Xe] 4f14 5d10 6s2 | 6p6 7s1', 'fleur_default_econfig' : '[Xe] 4f14 5d10 | 6s2 6p6 7s1', 'lo' : '6s 6p', 'rmt' : 2.2, 'lmax' : '', 'jri' : 981}, - 88: {'mass': 226.0, 'name': 'Radium', 'symbol': 'Ra', 'econfig': '[Xe] 4f14 5d10 6s2 | 6p6 7s2', 'fleur_default_econfig' : '[Xe] 4f14 5d10 | 6s2 6p6 7s2', 'lo' : '6s 6p', 'rmt' : 2.2, 'lmax' : '', 'jri' : 981}, - 89: {'mass': 227.0, 'name': 'Actinium', 'symbol': 'Ac', 'econfig': '[Xe] 4f14 5d10 6s2 | 6p6 7s2 6d1', 'fleur_default_econfig' : '[Xe] 4f14 5d10 | 6s2 6p6 7s2 6d1', 'lo' : '6s 6p', 'rmt' : 2.2, 'lmax' : '', 'jri' : 981}, - 90: {'mass': 232.03806, 'name': 'Thorium', 'symbol': 'Th', 'econfig': '[Xe] 4f14 5d10 6s2 | 6p6 7s2 6d1 5f1', 'fleur_default_econfig' : '[Xe] 4f14 5d10 | 6s2 6p6 7s2 6d1 5f1', 'lo' : '6s 6p', 'rmt' : 2.2, 'lmax' : '', 'jri' : 981}, - 91: {'mass': 231.03588, 'name': 'Protactinium', 'symbol': 'Pa', 'econfig': '[Xe] 4f14 5d10 6s2 | 6p6 7s2 6d1 5f2', 'fleur_default_econfig' : '[Xe] 4f14 5d10 | 6s2 6p6 7s2 6d1 5f2', 'lo' : '6s 6p', 'rmt' : 2.2, 'lmax' : '', 'jri' : 981}, - 92: {'mass': 238.02891, 'name': 'Uranium', 'symbol': 'U', 'econfig': '[Xe] 4f14 5d10 6s2 6p6| 7s2 5f4', 'fleur_default_econfig' : '[Xe] 4f14 5d10 | 6s2 6p6 7s2 5f4', 'lo' : '6s 6p', 'rmt' : 2.3, 'lmax' : '', 'jri' : 981}, - 93: {'mass': 237.0, 'name': 'Neptunium', 'symbol': 'Np', 'econfig': '[Xe] 4f14 5d10 6s2 6p6 | 7s2 5f5', 'fleur_default_econfig' : '[Xe] 4f14 5d10 | 6s2 6p6 7s2 5f5', 'lo' : '6s 6p', 'rmt' : 2.1, 'lmax' : '', 'jri' : 981}, - 94: {'mass': 244.0, 'name': 'Plutonium', 'symbol': 'Pu', 'econfig': '[Xe] 4f14 5d10 6s2 6p6 | 7s2 5f6', 'fleur_default_econfig' : '[Xe] 4f14 5d10 | 6s2 6p6 7s2 5f6', 'lo' : '6s 6p', 'rmt' : 2.2, 'lmax' : '', 'jri' : 981}, - 95: {'mass': 243.0, 'name': 'Americium', 'symbol': 'Am', 'econfig': '[Xe] 4f14 5d10 6s2 6p6 | 7s2 5f7', 'fleur_default_econfig' : '[Xe] 4f14 5d10 | 6s2 6p6 7s2 5f7', 'lo' : '6s 6p', 'rmt' : 2.4, 'lmax' : '', 'jri' : 981}, - 96: {'mass': 247.0, 'name': 'Curium', 'symbol': 'Cm', 'econfig': '[Xe] 4f14 5d10 6s2 6p6 | 7s2 5f8', 'fleur_default_econfig' : '[Xe] 4f14 5d10 | 6s2 6p6 7s2 5f8', 'lo' : '6s 6p', 'rmt' : 2.4, 'lmax' : '', 'jri' : 981}, - 97: {'mass': 247.0, 'name': 'Berkelium', 'symbol': 'Bk', 'econfig': '[Xe] 4f14 5d10 6s2 6p6 | 7s2 5f9', 'fleur_default_econfig' : '[Xe] 4f14 5d10 | 6s2 6p6 7s2 5f9', 'lo' : '6s 6p', 'rmt' : 2.4, 'lmax' : '', 'jri' : 981}, - 98: {'mass': 251.0, 'name': 'Californium', 'symbol': 'Cf', 'econfig': '[Xe] 4f14 5d10 6s2 6p6 | 7s2 5f10', 'fleur_default_econfig' : '[Xe] 4f14 5d10 | 6s2 6p6 7s2 5f10', 'lo' : '6s 6p', 'rmt' : 2.4, 'lmax' : '', 'jri' : 981}, - 99: {'mass': 252.0, 'name': 'Einsteinium', 'symbol': 'Es', 'econfig': '[Xe] 4f14 5d10 6s2 6p6 | 7s2 5f11', 'fleur_default_econfig' : '[Xe] 4f14 5d10 | 6s2 6p6 7s2 5f11', 'lo' : '6s 6p', 'rmt' : 2.4, 'lmax' : '', 'jri' : 981}, - 100: {'mass': 257.0, 'name': 'Fermium', 'symbol': 'Fm', 'econfig': '[Xe] 4f14 5d10 6s2 6p6 | 7s2 5f12', 'fleur_default_econfig' : '[Xe] 4f14 5d10 | 6s2 6p6 7s2 5f12', 'lo' : '6s 6p', 'rmt' : 2.4, 'lmax' : '', 'jri' : 981}, - 101: {'mass': 258.0, 'name': 'Mendelevium', 'symbol': 'Md', 'econfig': '[Xe] 4f14 5d10 6s2 6p6 | 7s2 5f13', 'fleur_default_econfig' : '[Xe] 4f14 5d10 | 6s2 6p6 7s2 5f13', 'lo' : '6s 6p', 'rmt' : 2.4, 'lmax' : '', 'jri' : 981}, - 102: {'mass': 259.0, 'name': 'Nobelium', 'symbol': 'No', 'econfig': '[Xe] 4f14 5d10 6s2 6p6 | 7s2 5f14', 'fleur_default_econfig' : '[Xe] 4f14 5d10 | 6s2 6p6 7s2 5f14', 'lo' : '6s 6p', 'rmt' : 2.4, 'lmax' : '', 'jri' : 981}, - 103: {'mass': 262.0, 'name': 'Lawrencium', 'symbol': 'Lr', 'econfig': '[Xe] 4f14 5d10 6s2 6p6 | 7s2 5f14 6d1', 'fleur_default_econfig' : '[Xe] 4f14 5d10 | 6s2 6p6 7s2 5f14 6d1', 'lo' : '6s 6p 5f', 'rmt' : 2.4, 'lmax' : '', 'jri' : 981}, - 104: {'mass': 267.0, 'name': 'Rutherfordium', 'symbol': 'Rf', 'econfig': '[Xe] 4f14 5d10 6s2 6p6 | 7s2 5f14 6d2', 'fleur_default_econfig' : '[Xe] 4f14 5d10 6s2 6p6 | 7s2 5f14 6d2', 'lo' : '6p 5f', 'rmt' : 2.4, 'lmax' : '', 'jri' : 981}, - 105: {'mass': 268.0, 'name': 'Dubnium', 'symbol': 'Db', 'econfig': '[Xe] 4f14 5d10 6s2 6p6 | 7s2 5f14 6d3', 'fleur_default_econfig' : '[Xe] 4f14 5d10 6s2 | 6p6 7s2 5f14 6d3', 'lo' : '6p 5f', 'rmt' : 2.4, 'lmax' : '', 'jri' : 981}, - 106: {'mass': 271.0, 'name': 'Seaborgium', 'symbol': 'Sg', 'econfig': '[Xe] 4f14 5d10 6s2 6p6 | 7s2 5f14 6d4', 'fleur_default_econfig' : '[Xe] 4f14 5d10 6s2 | 6p6 7s2 5f14 6d4', 'lo' : '6p 5f', 'rmt' : 2.4, 'lmax' : '', 'jri' : 981}, - 107: {'mass': 272.0, 'name': 'Bohrium', 'symbol': 'Bh', 'econfig': '[Rn] 7s2 5f14 | 6d5', 'fleur_default_econfig' : '[Xe] 4f14 5d10 6s2 6p6 5f14 | 7s2 6d5', 'lo' : '', 'rmt' : 2.4, 'lmax' : '', 'jri' : 981}, - 108: {'mass': 270.0, 'name': 'Hassium', 'symbol': 'Hs', 'econfig': '[Rn] 7s2 5f14 | 6d6', 'fleur_default_econfig' : '[Rn] 5f14 | 7s2 6d6', 'lo' : '', 'rmt' : 2.4, 'lmax' : '', 'jri' : 981}, - 109: {'mass': 276.0, 'name': 'Meitnerium', 'symbol': 'Mt', 'econfig': '[Rn] 7s2 5f14 | 6d7', 'fleur_default_econfig' : '[Rn] 5f14 | 7s2 6d7', 'lo' : '', 'rmt' : 2.4, 'lmax' : '', 'jri' : 981}, - 110: {'mass': 281.0, 'name': 'Darmstadtium', 'symbol': 'Ds', 'econfig': '[Rn] 7s2 5f14 | 6d8', 'fleur_default_econfig' : '[Rn] 5f14 | 7s2 6d8', 'lo' : '', 'rmt' : 2.4, 'lmax' : '', 'jri' : 981}, - 111: {'mass': 280.0, 'name': 'Roentgenium', 'symbol': 'Rg', 'econfig': '[Rn] 7s2 5f14 | 6d9', 'fleur_default_econfig' : '[Rn] 5f14 | 7s2 6d9', 'lo' : '', 'rmt' : 2.4, 'lmax' : '', 'jri' : 981}, - 112: {'mass': 285.0, 'name': 'Copernicium', 'symbol': 'Cn', 'econfig': '[Rn] 7s2 5f14 | 6d10', 'fleur_default_econfig' : '[Rn] 5f14 | 7s2 6d10', 'lo' : '6d', 'rmt' : 2.4, 'lmax' : '', 'jri' : 981}, - 113: {'mass': 285.0, 'name': 'Nihomium', 'symbol': 'Nh', 'econfig': '[Rn] 7s2 5f14 | 6d10 7p1', 'fleur_default_econfig' : '[Rn] 7s2 5f14 | 6d10 7p1', 'lo' : '6d', 'rmt' : 2.4, 'lmax' : '', 'jri' : 981}, - 114: {'mass': 289.0, 'name': 'Flerovium', 'symbol': 'Fl', 'econfig': '[Rn] 7s2 5f14 | 6d10 7p2', 'fleur_default_econfig' : '[Rn] 7s2 5f14 | 6d10 7p2', 'lo' : '6d', 'rmt' : 2.4, 'lmax' : '', 'jri' : 981}, - 115: {'mass': 0.0, 'name': 'Mascovium', 'symbol': 'Mc', 'econfig': '[Rn] 7s2 5f14 | 6d10 7p3', 'fleur_default_econfig' : '[Rn] 7s2 5f14 | 6d10 7p3', 'lo' : '6d', 'rmt' : 2.4, 'lmax' : '', 'jri' : 981}, - 116: {'mass': 293.0, 'name': 'Livermorium', 'symbol': 'Lv', 'econfig': '[Rn] 7s2 5f14 | 6d10 7p4', 'fleur_default_econfig' : '[Rn] 7s2 5f14 | 6d10 7p4', 'lo' : '6d', 'rmt' : 2.4, 'lmax' : '', 'jri' : 981}, - 117: {'mass': 0.0, 'name': 'Tennessine', 'symbol': 'Ts', 'econfig': '[Rn] 7s2 5f14 | 6d10 7p5', 'fleur_default_econfig' : '[Rn] 7s2 5f14 | 6d10 7p5', 'lo' : '6d', 'rmt' : 2.4, 'lmax' : '', 'jri' : 981}, - 118: {'mass': 0.0, 'name': 'Oganesson', 'symbol': 'Og', 'econfig': '[Rn] 7s2 5f14 | 6d10 7p6', 'fleur_default_econfig' : '[Rn] 7s2 5f14 | 6d10 7p6', 'lo' : '6d', 'rmt' : 2.4, 'lmax' : '', 'jri' : 981} + 1: { + 'mass': 1.00794, + 'name': 'Hydrogen', + 'symbol': 'H', + 'econfig': '1s1', + 'fleur_default_econfig': '| 1s1', + 'lo': '', + 'rmt': 0.65, + 'lmax': '', + 'jri': 981, + 'soc': False, + 'mag': False + }, + 2: { + 'mass': 4.002602, + 'name': 'Helium', + 'symbol': 'He', + 'econfig': '1s2', + 'fleur_default_econfig': '| 1s2', + 'lo': '', + 'rmt': 1.2, + 'lmax': '', + 'jri': 981 + }, + 3: { + 'mass': 6.941, + 'name': 'Lithium', + 'symbol': 'Li', + 'econfig': '1s2 | 2s1', + 'fleur_default_econfig': '1s2 | 2s1', + 'lo': '', + 'rmt': 2.13, + 'lmax': '', + 'jri': 981 + }, + 4: { + 'mass': 9.012182, + 'name': 'Beryllium', + 'symbol': 'Be', + 'econfig': '1s2 | 2s2', + 'fleur_default_econfig': '1s2 | 2s2', + 'lo': '', + 'rmt': 1.87, + 'lmax': '', + 'jri': 981 + }, + 5: { + 'mass': 10.811, + 'name': 'Boron', + 'symbol': 'B', + 'econfig': '1s2 | 2s2 2p1', + 'fleur_default_econfig': '1s2 | 2s2 2p1', + 'lo': '', + 'rmt': 1.4, + 'lmax': '', + 'jri': 981 + }, + 6: { + 'mass': 12.0107, + 'name': 'Carbon', + 'symbol': 'C', + 'econfig': '[He] 2s2 | 2p2', + 'fleur_default_econfig': '[He] 2s2 | 2p2', + 'lo': '', + 'rmt': 1.2, + 'lmax': '', + 'jri': 981 + }, + 7: { + 'mass': 14.0067, + 'name': 'Nitrogen', + 'symbol': 'N', + 'econfig': '[He] 2s2 | 2p3', + 'fleur_default_econfig': '[He] 2s2 | 2p3', + 'lo': '', + 'rmt': 1.0, + 'lmax': '', + 'jri': 981 + }, + 8: { + 'mass': 15.9994, + 'name': 'Oxygen', + 'symbol': 'O', + 'econfig': '[He] 2s2 | 2p4', + 'fleur_default_econfig': '[He] 2s2 | 2p4', + 'lo': '', + 'rmt': 1.1, + 'lmax': '', + 'jri': 981 + }, + 9: { + 'mass': 18.9984032, + 'name': 'Fluorine', + 'symbol': 'F', + 'econfig': '[He] 2s2 | 2p5', + 'fleur_default_econfig': '[He] 2s2 | 2p5', + 'lo': '', + 'rmt': 1.2, + 'lmax': '', + 'jri': 981 + }, + 10: { + 'mass': 20.1797, + 'name': 'Neon', + 'symbol': 'Ne', + 'econfig': '[He] 2s2 | 2p6', + 'fleur_default_econfig': '[He] 2s2 | 2p6', + 'lo': '', + 'rmt': 2.1, + 'lmax': '', + 'jri': 981 + }, + 11: { + 'mass': 22.98977, + 'name': 'Sodium', + 'symbol': 'Na', + 'econfig': '[He] 2s2 | 2p6 3s1', + 'fleur_default_econfig': '[He] | 2s2 2p6 3s1', + 'lo': '2s 2p', + 'rmt': 2.1, + 'lmax': '', + 'jri': 981 + }, + 12: { + 'mass': 24.305, + 'name': 'Magnesium', + 'symbol': 'Mg', + 'econfig': '[He] 2s2 | 2p6 3s2', + 'fleur_default_econfig': '[He] 2s2 | 2p6 3s2', + 'lo': '2p', + 'rmt': 2.3, + 'lmax': '', + 'jri': 981 + }, + 13: { + 'mass': 26.981538, + 'name': 'Aluminium', + 'symbol': 'Al', + 'econfig': '[He] 2s2 2p6 | 3s2 3p1', + 'fleur_default_econfig': '[He] 2s2 2p6 | 3s2 3p1', + 'lo': '', + 'rmt': 2.1, + 'lmax': '', + 'jri': 981 + }, + 14: { + 'mass': 28.0855, + 'name': 'Silicon', + 'symbol': 'Si', + 'econfig': '[He] 2s2 2p6 | 3s2 3p2', + 'fleur_default_econfig': '[He] 2s2 2p6 | 3s2 3p2', + 'lo': '', + 'rmt': 2.0, + 'lmax': '', + 'jri': 981 + }, + 15: { + 'mass': 30.973761, + 'name': 'Phosphorus', + 'symbol': 'P', + 'econfig': '[He] 2s2 2p6 | 3s2 3p3', + 'fleur_default_econfig': '[He] 2s2 2p6 | 3s2 3p3', + 'lo': '', + 'rmt': 1.9, + 'lmax': '', + 'jri': 981 + }, + 16: { + 'mass': 32.065, + 'name': 'Sulfur', + 'symbol': 'S', + 'econfig': '[He] 2s2 2p6 | 3s2 3p4', + 'fleur_default_econfig': '[He] 2s2 2p6 | 3s2 3p4', + 'lo': '', + 'rmt': 1.7, + 'lmax': '', + 'jri': 981 + }, + 17: { + 'mass': 35.453, + 'name': 'Chlorine', + 'symbol': 'Cl', + 'econfig': '[He] 2s2 2p6 | 3s2 3p5', + 'fleur_default_econfig': '[He] 2s2 2p6 | 3s2 3p5', + 'lo': '', + 'rmt': 1.7, + 'lmax': '', + 'jri': 981 + }, + 18: { + 'mass': 39.948, + 'name': 'Argon', + 'symbol': 'Ar', + 'econfig': '[He] 2s2 2p6 | 3s2 3p6', + 'fleur_default_econfig': '[He] 2s2 2p6 | 3s2 3p6', + 'lo': '', + 'rmt': 1.8, + 'lmax': '', + 'jri': 981 + }, + 19: { + 'mass': 39.0983, + 'name': 'Potassium', + 'symbol': 'K', + 'econfig': '[Ne] 3s2 | 3p6 4s1', + 'fleur_default_econfig': '[Ne] | 3s2 3p6 4s1', + 'lo': '3s 3p', + 'rmt': 2.0, + 'lmax': '', + 'jri': 981 + }, + 20: { + 'mass': 40.078, + 'name': 'Calcium', + 'symbol': 'Ca', + 'econfig': '[Ne] 3s2 | 3p6 4s2', + 'fleur_default_econfig': '[Ne] | 3s2 3p6 4s2', + 'lo': '3s 3p', + 'rmt': 2.3, + 'lmax': '', + 'jri': 981 + }, + 21: { + 'mass': 44.955912, + 'name': 'Scandium', + 'symbol': 'Sc', + 'econfig': '[Ne] 3s2 3p6 | 4s2 3d1', + 'fleur_default_econfig': '[Ne] | 3s2 3p6 4s2 3d1', + 'lo': '3s 3p', + 'rmt': 2.2, + 'lmax': '', + 'jri': 981 + }, + 22: { + 'mass': 47.867, + 'name': 'Titanium', + 'symbol': 'Ti', + 'econfig': '[Ne] | 3s2 3p6 4s2 3d2', + 'fleur_default_econfig': '[Ne] | 3s2 3p6 4s2 3d2', + 'lo': '3s 3p', + 'rmt': 2.1, + 'lmax': '', + 'jri': 981 + }, + 23: { + 'mass': 50.9415, + 'name': 'Vanadium', + 'symbol': 'V', + 'econfig': '[Ne] 3s2 3p6 | 4s2 3d3', + 'fleur_default_econfig': '[Ne] | 3s2 3p6 4s2 3d3', + 'lo': '3s 3p', + 'rmt': 1.9, + 'lmax': '', + 'jri': 981 + }, + 24: { + 'mass': 51.9961, + 'name': 'Chromium', + 'symbol': 'Cr', + 'econfig': '[Ne] 3s2 3p6 | 4s1 3d5', + 'fleur_default_econfig': '[Ne] | 3s2 3p6 4s1 3d5', + 'lo': '3s 3p', + 'rmt': 1.8, + 'lmax': '', + 'jri': 981 + }, + 25: { + 'mass': 54.938045, + 'name': 'Manganese', + 'symbol': 'Mn', + 'econfig': '[Ne] 3s2 3p6 | 4s2 3d5', + 'fleur_default_econfig': '[Ne] | 3s2 3p6 4s2 3d5', + 'lo': '3s 3p', + 'rmt': 2.0, + 'lmax': '', + 'jri': 981 + }, + 26: { + 'mass': 55.845, + 'name': 'Iron', + 'symbol': 'Fe', + 'econfig': '[Ne] 3s2 3p6 | 4s2 3d6', + 'fleur_default_econfig': '[Ne] | 3s2 3p6 4s2 3d6', + 'lo': '3s 3p', + 'rmt': 2.00, + 'lmax': '', + 'jri': 981 + }, + 27: { + 'mass': 58.933195, + 'name': 'Cobalt', + 'symbol': 'Co', + 'econfig': '[Ne] 3s2 3p6 | 4s2 3d7', + 'fleur_default_econfig': '[Ne] 3s2 | 3p6 4s2 3d7', + 'lo': '3p', + 'rmt': 1.9, + 'lmax': '', + 'jri': 981 + }, + 28: { + 'mass': 58.6934, + 'name': 'Nickel', + 'symbol': 'Ni', + 'econfig': '[Ne] 3s2 3p6 | 4s2 3d8', + 'fleur_default_econfig': '[Ne] 3s2 | 3p6 4s2 3d8', + 'lo': '3p', + 'rmt': 1.9, + 'lmax': '', + 'jri': 981 + }, + 29: { + 'mass': 63.546, + 'name': 'Copper', + 'symbol': 'Cu', + 'econfig': '[Ne] 3s2 3p6 |4s1 3d10', + 'fleur_default_econfig': '[Ne] 3s2 | 3p6 4s1 3d10', + 'lo': '3p', + 'rmt': 2.1, + 'lmax': '', + 'jri': 981 + }, + 30: { + 'mass': 65.38, + 'name': 'Zinc', + 'symbol': 'Zn', + 'econfig': '[Ne] 3s2 3p6 | 3d10 4s2', + 'fleur_default_econfig': '[Ne] 3s2 3p6 | 3d10 4s2', + 'lo': '3d', + 'rmt': 2.2, + 'lmax': '', + 'jri': 981 + }, + 31: { + 'mass': 69.723, + 'name': 'Gallium', + 'symbol': 'Ga', + 'econfig': '[Ne] 3s2 3p6 | 3d10 4s2 4p1', + 'fleur_default_econfig': '[Ne] 3s2 3p6 | 3d10 4s2 4p1', + 'lo': '3d', + 'rmt': 2.1, + 'lmax': '', + 'jri': 981 + }, + 32: { + 'mass': 72.64, + 'name': 'Germanium', + 'symbol': 'Ge', + 'econfig': '[Ne] 3s2 3p6 | 3d10 4s2 4p2', + 'fleur_default_econfig': '[Ne] 3s2 3p6 | 3d10 4s2 4p2', + 'lo': '3d', + 'rmt': 2.1, + 'lmax': '', + 'jri': 981 + }, + 33: { + 'mass': 74.9216, + 'name': 'Arsenic', + 'symbol': 'As', + 'econfig': '[Ne] 3s2 3p6 | 3d10 4s2 4p3', + 'fleur_default_econfig': '[Ne] 3s2 3p6 | 3d10 4s2 4p3', + 'lo': '3d', + 'rmt': 2.0, + 'lmax': '', + 'jri': 981 + }, + 34: { + 'mass': 78.96, + 'name': 'Selenium', + 'symbol': 'Se', + 'econfig': '[Ne] 3s2 3p6 | 3d10 4s2 4p4', + 'fleur_default_econfig': '[Ne] 3s2 3p6 | 3d10 4s2 4p4', + 'lo': '3d', + 'rmt': 2.0, + 'lmax': '', + 'jri': 981 + }, + 35: { + 'mass': 79.904, + 'name': 'Bromine', + 'symbol': 'Br', + 'econfig': '[Ne] 3s2 3p6 | 3d10 4s2 4p5', + 'fleur_default_econfig': '[Ne] 3s2 3p6 | 3d10 4s2 4p5', + 'lo': '3d', + 'rmt': 2.1, + 'lmax': '', + 'jri': 981 + }, + 36: { + 'mass': 83.798, + 'name': 'Krypton', + 'symbol': 'Kr', + 'econfig': '[Ne] 3s2 3p6 | 3d10 4s2 4p6', + 'fleur_default_econfig': '[Ne] 3s2 3p6 | 3d10 4s2 4p6', + 'lo': '3d', + 'rmt': 2.2, + 'lmax': '', + 'jri': 981 + }, + 37: { + 'mass': 85.4678, + 'name': 'Rubidium', + 'symbol': 'Rb', + 'econfig': '[Ar] 3d10 4s2 | 4p6 5s1', + 'fleur_default_econfig': '[Ar] 3d10 | 4s2 4p6 5s1', + 'lo': '4s 4p', + 'rmt': 2.4, + 'lmax': '', + 'jri': 981 + }, + 38: { + 'mass': 87.62, + 'name': 'Strontium', + 'symbol': 'Sr', + 'econfig': '[Ar] 3d10 4s2 | 4p6 5s2', + 'fleur_default_econfig': '[Ar] 3d10 | 4s2 4p6 5s2', + 'lo': '4s 4p', + 'rmt': 2.4, + 'lmax': '', + 'jri': 981 + }, + 39: { + 'mass': 88.90585, + 'name': 'Yttrium', + 'symbol': 'Y', + 'econfig': '[Ar] 4s2 3d10 4p6 | 5s2 4d1', + 'fleur_default_econfig': '[Ar] 3d10 | 4s2 4p6 5s2 4d1', + 'lo': '4s 4p', + 'rmt': 2.4, + 'lmax': '', + 'jri': 981 + }, + 40: { + 'mass': 91.224, + 'name': 'Zirconium', + 'symbol': 'Zr', + 'econfig': '[Ar] 4s2 3d10 4p6 | 5s2 4d2', + 'fleur_default_econfig': '[Ar] 3d10 | 4s2 4p6 5s2 4d2', + 'lo': '4s 4p', + 'rmt': 2.3, + 'lmax': '', + 'jri': 981 + }, + 41: { + 'mass': 92.90638, + 'name': 'Niobium', + 'symbol': 'Nb', + 'econfig': '[Ar] 4s2 3d10 4p6 | 5s1 4d4', + 'fleur_default_econfig': '[Ar] 3d10 | 4s2 4p6 5s1 4d4', + 'lo': '4s 4p', + 'rmt': 2.1, + 'lmax': '', + 'jri': 981 + }, + 42: { + 'mass': 95.96, + 'name': 'Molybdenum', + 'symbol': 'Mo', + 'econfig': '[Ar] 4s2 3d10 4p6 | 5s1 4d5', + 'fleur_default_econfig': '[Ar] 3d10 | 4s2 4p6 5s1 4d5', + 'lo': '4s 4p', + 'rmt': 2.0, + 'lmax': '', + 'jri': 981 + }, + 43: { + 'mass': 98.0, + 'name': 'Technetium', + 'symbol': 'Tc', + 'econfig': '[Ar] 4s2 3d10 4p6 | 5s2 4d5', + 'fleur_default_econfig': '[Ar] 3d10 | 4s2 4p6 5s2 4d5', + 'lo': '4s 4p', + 'rmt': 2.1, + 'lmax': '', + 'jri': 981 + }, + 44: { + 'mass': 101.07, + 'name': 'Ruthenium', + 'symbol': 'Ru', + 'econfig': '[Ar] 4s2 3d10 4p6 | 5s1 4d7', + 'fleur_default_econfig': '[Ar] 4s2 3d10 | 4p6 5s1 4d7', + 'lo': '4p', + 'rmt': 2.1, + 'lmax': '', + 'jri': 981 + }, + 45: { + 'mass': 102.9055, + 'name': 'Rhodium', + 'symbol': 'Rh', + 'econfig': '[Ar] 4s2 3d10 4p6 | 5s1 4d8', + 'fleur_default_econfig': '[Ar] 4s2 3d10 | 4p6 5s1 4d8', + 'lo': '4p', + 'rmt': 2.1, + 'lmax': '', + 'jri': 981 + }, + 46: { + 'mass': 106.42, + 'name': 'Palladium', + 'symbol': 'Pd', + 'econfig': '[Ar] 4s2 3d10 4p6 | 4d10', + 'fleur_default_econfig': '[Ar] 4s2 3d10 | 4p6 4d10', + 'lo': '4p', + 'rmt': 2.1, + 'lmax': '', + 'jri': 981 + }, + 47: { + 'mass': 107.8682, + 'name': 'Silver', + 'symbol': 'Ag', + 'econfig': '[Ar] 4s2 3d10 4p6 | 5s1 4d10', + 'fleur_default_econfig': '[Ar] 3d10 | 4s2 4p6 5s1 4d10', + 'lo': '4s 4p', + 'rmt': 2.3, + 'lmax': '', + 'jri': 981 + }, + 48: { + 'mass': 112.411, + 'name': 'Cadmium', + 'symbol': 'Cd', + 'econfig': '[Ar] 4s2 3d10 4p6 | 4d10 5s2', + 'fleur_default_econfig': '[Ar] 4s2 3d10 4p6 | 4d10 5s2', + 'lo': '4d', + 'rmt': 2.4, + 'lmax': '', + 'jri': 981 + }, + 49: { + 'mass': 114.818, + 'name': 'Indium', + 'symbol': 'In', + 'econfig': '[Ar] 4s2 3d10 4p6 | 4d10 5s2 5p1', + 'fleur_default_econfig': '[Ar] 4s2 3d10 4p6 | 4d10 5s2 5p1', + 'lo': '4d', + 'rmt': 2.2, + 'lmax': '', + 'jri': 981 + }, + 50: { + 'mass': 118.71, + 'name': 'Tin', + 'symbol': 'Sn', + 'econfig': '[Kr] 4d10 | 5s2 5p2', + 'fleur_default_econfig': '[Kr] | 4d10 5s2 5p2', + 'lo': '4d', + 'rmt': 2.3, + 'lmax': '', + 'jri': 981 + }, + 51: { + 'mass': 121.76, + 'name': 'Antimony', + 'symbol': 'Sb', + 'econfig': '[Kr] 4d10 | 5s2 5p3', + 'fleur_default_econfig': '[Kr] | 4d10 5s2 5p3', + 'lo': '4d', + 'rmt': 2.3, + 'lmax': '', + 'jri': 981 + }, + 52: { + 'mass': 127.6, + 'name': 'Tellurium', + 'symbol': 'Te', + 'econfig': '[Kr] 4d10 | 5s2 5p4', + 'fleur_default_econfig': '[Kr] | 4d10 5s2 5p4', + 'lo': '4d', + 'rmt': 2.3, + 'lmax': '', + 'jri': 981 + }, + 53: { + 'mass': 126.90447, + 'name': 'Iodine', + 'symbol': 'I', + 'econfig': '[Kr] 4d10 | 5s2 5p5', + 'fleur_default_econfig': '[Kr] | 4d10 5s2 5p5', + 'lo': '4d', + 'rmt': 2.2, + 'lmax': '', + 'jri': 981 + }, + 54: { + 'mass': 131.293, + 'name': 'Xenon', + 'symbol': 'Xe', + 'econfig': '[Kr] 4d10 | 5s2 5p6', + 'fleur_default_econfig': '[Kr] | 4d10 5s2 5p6', + 'lo': '4d', + 'rmt': 2.2, + 'lmax': '', + 'jri': 981 + }, + 55: { + 'mass': 132.9054519, + 'name': 'Caesium', + 'symbol': 'Cs', + 'econfig': '[Kr] 4d10 5s2 | 5p6 6s1', + 'fleur_default_econfig': '[Kr] 4d10 | 5s2 5p6 6s1', + 'lo': '5s 5p', + 'rmt': 2.4, + 'lmax': '', + 'jri': 981 + }, + 56: { + 'mass': 137.327, + 'name': 'Barium', + 'symbol': 'Ba', + 'econfig': '[Kr] 4d10 5s2 | 5p6 6s2', + 'fleur_default_econfig': '[Kr] 4d10 | 5s2 5p6 6s2', + 'lo': '5s 5p', + 'rmt': 2.4, + 'lmax': '', + 'jri': 981 + }, + 57: { + 'mass': 138.90547, + 'name': 'Lanthanum', + 'symbol': 'La', + 'econfig': '[Kr] 4d10 5s2 | 5p6 6s2 5d1', + 'fleur_default_econfig': '[Kr] 4d10 | 5s2 5p6 6s2 5d1', + 'lo': '5s 5p', + 'rmt': 2.2, + 'lmax': '', + 'jri': 981 + }, + 58: { + 'mass': 140.116, + 'name': 'Cerium', + 'symbol': 'Ce', + 'econfig': '[Kr] 4d10 5s2 5p6 | 6s2 4f1 5d1', + 'fleur_default_econfig': '[Kr] 4d10 | 5s2 5p6 6s2 4f1 5d1', + 'lo': '5s 5p', + 'rmt': 2.2, + 'lmax': '', + 'jri': 981 + }, + 59: { + 'mass': 140.90765, + 'name': 'Praseodymium', + 'symbol': 'Pr', + 'econfig': '[Kr] 4d10 5s2 5p6 | 6s2 4f3', + 'fleur_default_econfig': '[Kr] 4d10 | 5s2 5p6 6s2 4f3', + 'lo': '5s 5p', + 'rmt': 2.4, + 'lmax': '', + 'jri': 981 + }, + 60: { + 'mass': 144.242, + 'name': 'Neodymium', + 'symbol': 'Nd', + 'econfig': '[Kr] 4d10 5s2 5p6 | 6s2 4f4', + 'fleur_default_econfig': '[Kr] 4d10 | 5s2 5p6 6s2 4f4', + 'lo': '5s 5p', + 'rmt': 2.1, + 'lmax': '', + 'jri': 981 + }, + 61: { + 'mass': 145.0, + 'name': 'Promethium', + 'symbol': 'Pm', + 'econfig': '[Kr] 4d10 5s2 5p6 | 6s2 4f5', + 'fleur_default_econfig': '[Kr] 4d10 | 5s2 5p6 6s2 4f5', + 'lo': '5s 5p', + 'rmt': 2.4, + 'lmax': '', + 'jri': 981 + }, + 62: { + 'mass': 150.36, + 'name': 'Samarium', + 'symbol': 'Sm', + 'econfig': '[Kr] 4d10 5s2 5p6 | 6s2 4f6', + 'fleur_default_econfig': '[Kr] 4d10 | 5s2 5p6 6s2 4f6', + 'lo': '5s 5p', + 'rmt': 2.1, + 'lmax': '', + 'jri': 981 + }, + 63: { + 'mass': 151.964, + 'name': 'Europium', + 'symbol': 'Eu', + 'econfig': '[Kr] 4d10 | 4f7 5s2 5p6 6s2', + 'fleur_default_econfig': '[Kr] 4d10 | 5s2 5p6 4f7 6s2', + 'lo': '5s 5p', + 'rmt': 2.4, + 'lmax': '', + 'jri': 981 + }, + 64: { + 'mass': 157.25, + 'name': 'Gadolinium', + 'symbol': 'Gd', + 'econfig': '[Kr] 4d10 5s2 5p6 | 6s2 4f7 5d1', + 'fleur_default_econfig': '[Kr] 4d10 | 5s2 5p6 6s2 4f7 5d1', + 'lo': '5s 5p', + 'rmt': 2.2, + 'lmax': '', + 'jri': 981 + }, + 65: { + 'mass': 158.92535, + 'name': 'Terbium', + 'symbol': 'Tb', + 'econfig': '[Kr] 4d10 5s2 5p6 | 6s2 4f9', + 'fleur_default_econfig': '[Kr] 4d10 | 5s2 5p6 6s2 4f8 5d1', + 'lo': '5s 5p', + 'rmt': 2.1, + 'lmax': '', + 'jri': 981 + }, + 66: { + 'mass': 162.5, + 'name': 'Dysprosium', + 'symbol': 'Dy', + 'econfig': '[Kr] 4d10 5s2 5p6 | 6s2 4f10', + 'fleur_default_econfig': '[Kr] 4d10 | 5s2 5p6 6s2 4f9 5d1', + 'lo': '5s 5p', + 'rmt': 2.4, + 'lmax': '', + 'jri': 981 + }, + 67: { + 'mass': 164.93032, + 'name': 'Holmium', + 'symbol': 'Ho', + 'econfig': '[Kr] 4d10 5s2 5p6 | 6s2 4f11', + 'fleur_default_econfig': '[Kr] 4d10 | 5s2 5p6 6s2 4f10 5d1', + 'lo': '5s 5p', + 'rmt': 2.4, + 'lmax': '', + 'jri': 981 + }, + 68: { + 'mass': 167.259, + 'name': 'Erbium', + 'symbol': 'Er', + 'econfig': '[Kr] 4d10 5s2 5p6 | 6s2 4f12', + 'fleur_default_econfig': '[Kr] 4d10 | 5s2 5p6 6s2 4f11 5d1', + 'lo': '5s 5p', + 'rmt': 2.5, + 'lmax': '', + 'jri': 981 + }, + 69: { + 'mass': 168.93421, + 'name': 'Thulium', + 'symbol': 'Tm', + 'econfig': '[Kr] 4d10 5s2 5p6 | 6s2 4f13', + 'fleur_default_econfig': '[Kr] 4d10 | 5s2 5p6 6s2 4f12 5d1', + 'lo': '5s 5p', + 'rmt': 2.4, + 'lmax': '', + 'jri': 981 + }, + 70: { + 'mass': 173.054, + 'name': 'Ytterbium', + 'symbol': 'Yb', + 'econfig': '[Kr] 4d10 5s2 5p6 | 6s2 4f14', + 'fleur_default_econfig': '[Kr] 4d10 | 5s2 5p6 6s2 4f13 5d1', + 'lo': '5s 5p', + 'rmt': 2.6, + 'lmax': '', + 'jri': 981 + }, + 71: { + 'mass': 174.9668, + 'name': 'Lutetium', + 'symbol': 'Lu', + 'econfig': '[Kr] 4d10 | 4f14 5s2 5p6 5d1 6s2', + 'fleur_default_econfig': '[Kr] 4d10 | 5s2 5p6 4f14 6s2 5d1', + 'lo': '5s 5p', + 'rmt': 2.5, + 'lmax': '', + 'jri': 981 + }, + 72: { + 'mass': 178.49, + 'name': 'Hafnium', + 'symbol': 'Hf', + 'econfig': '[Kr] 4d10 | 4f14 5s2 5p6 5d2 6s2', + 'fleur_default_econfig': '[Kr] 4d10 4f14 | 5s2 5p6 6s2 5d2', + 'lo': '5s 5p', + 'rmt': 2.3, + 'lmax': '', + 'jri': 981 + }, + 73: { + 'mass': 180.94788, + 'name': 'Tantalum', + 'symbol': 'Ta', + 'econfig': '[Kr] 4d10 4f14 | 5s2 5p6 5d3 6s2', + 'fleur_default_econfig': '[Kr] 4d10 4f14 | 5s2 5p6 6s2 5d3', + 'lo': '5s 5p', + 'rmt': 2.2, + 'lmax': '', + 'jri': 981 + }, + 74: { + 'mass': 183.84, + 'name': 'Tungsten', + 'symbol': 'W', + 'econfig': '[Kr] 5s2 4d10 4f14 | 5p6 6s2 5d4', + 'fleur_default_econfig': '[Kr] 4d10 4f14 | 5s2 5p6 6s2 5d4', + 'lo': '5s 5p', + 'rmt': 2.1, + 'lmax': '', + 'jri': 981 + }, + 75: { + 'mass': 186.207, + 'name': 'Rhenium', + 'symbol': 'Re', + 'econfig': '[Kr] 4d10 4f14 5p6 | 5s2 6s2 5d5', + 'fleur_default_econfig': '[Kr] 4d10 4f14 | 5s2 5p6 6s2 5d5', + 'lo': '5s 5p', + 'rmt': 2.1, + 'lmax': '', + 'jri': 981 + }, + 76: { + 'mass': 190.23, + 'name': 'Osmium', + 'symbol': 'Os', + 'econfig': '[Kr] 4d10 4f14 5p6 | 5s2 6s2 5d6', + 'fleur_default_econfig': '[Kr] 5s2 4d10 4f14 | 5p6 6s2 5d6', + 'lo': '5p', + 'rmt': 2.1, + 'lmax': '', + 'jri': 981 + }, + 77: { + 'mass': 192.217, + 'name': 'Iridium', + 'symbol': 'Ir', + 'econfig': '[Kr] 4d10 4f14 5p6 | 5s2 6s2 5d7', + 'fleur_default_econfig': '[Kr] 5s2 4d10 4f14 | 5p6 6s2 5d7', + 'lo': '5p', + 'rmt': 2.1, + 'lmax': '', + 'jri': 981 + }, + 78: { + 'mass': 195.084, + 'name': 'Platinum', + 'symbol': 'Pt', + 'econfig': '[Kr] 4d10 4f14 5p6 | 5s2 6s2 5d8', + 'fleur_default_econfig': '[Kr] 5s2 4d10 4f14 | 5p6 6s2 5d8', + 'lo': '5p', + 'rmt': 2.1, + 'lmax': '', + 'jri': 981 + }, + 79: { + 'mass': 196.966569, + 'name': 'Gold', + 'symbol': 'Au', + 'econfig': '[Kr] 4d10 4f14 5p6 | 5s2 6s2 5d9', + 'fleur_default_econfig': '[Kr] 4d10 4f14 | 5s2 5p6 6s2 5d9', + 'lo': '5s 5p', + 'rmt': 2.2, + 'lmax': '', + 'jri': 981 + }, + 80: { + 'mass': 200.59, + 'name': 'Mercury', + 'symbol': 'Hg', + 'econfig': '[Kr] 5s2 4d10 4f14 | 5p6 5d10 6s2', + 'fleur_default_econfig': '[Kr] 5s2 4d10 4f14 5p6 | 5d10 6s2', + 'lo': '5d', + 'rmt': 2.4, + 'lmax': '', + 'jri': 981 + }, + 81: { + 'mass': 204.3833, + 'name': 'Thallium', + 'symbol': 'Tl', + 'econfig': '[Xe] 4f14 | 5d10 6s2 6p1', + 'fleur_default_econfig': '[Xe] 4f14 | 5d10 6s2 6p1', + 'lo': '5d', + 'rmt': 2.4, + 'lmax': '', + 'jri': 981 + }, + 82: { + 'mass': 207.2, + 'name': 'Lead', + 'symbol': 'Pb', + 'econfig': '[Xe] 4f14 | 5d10 6s2 6p2', + 'fleur_default_econfig': '[Xe] 4f14 | 5d10 6s2 6p2', + 'lo': '5d', + 'rmt': 2.4, + 'lmax': '', + 'jri': 981 + }, + 83: { + 'mass': 208.9804, + 'name': 'Bismuth', + 'symbol': 'Bi', + 'econfig': '[Xe] 4f14 | 5d10 6s2 6p3', + 'fleur_default_econfig': '[Xe] 4f14 | 5d10 6s2 6p3', + 'lo': '5d', + 'rmt': 2.4, + 'lmax': '', + 'jri': 981 + }, + 84: { + 'mass': 209.0, + 'name': 'Polonium', + 'symbol': 'Po', + 'econfig': '[Xe] 4f14 | 5d10 6s2 6p4', + 'fleur_default_econfig': '[Xe] 4f14 | 5d10 6s2 6p4', + 'lo': '5d', + 'rmt': 2.2, + 'lmax': '', + 'jri': 981 + }, + 85: { + 'mass': 210.0, + 'name': 'Astatine', + 'symbol': 'At', + 'econfig': '[Xe] 4f14 | 5d10 6s2 6p5', + 'fleur_default_econfig': '[Xe] 4f14 | 5d10 6s2 6p5', + 'lo': '5d', + 'rmt': 2.2, + 'lmax': '', + 'jri': 981 + }, + 86: { + 'mass': 222.0, + 'name': 'Radon', + 'symbol': 'Rn', + 'econfig': '[Xe] 4f14 | 5d10 6s2 6p6', + 'fleur_default_econfig': '[Xe] 4f14 | 5d10 6s2 6p6', + 'lo': '5d', + 'rmt': 2.2, + 'lmax': '', + 'jri': 981 + }, # TODO: after wards not rigth + 87: { + 'mass': 223.0, + 'name': 'Francium', + 'symbol': 'Fr', + 'econfig': '[Xe] 4f14 5d10 6s2 | 6p6 7s1', + 'fleur_default_econfig': '[Xe] 4f14 5d10 | 6s2 6p6 7s1', + 'lo': '6s 6p', + 'rmt': 2.2, + 'lmax': '', + 'jri': 981 + }, + 88: { + 'mass': 226.0, + 'name': 'Radium', + 'symbol': 'Ra', + 'econfig': '[Xe] 4f14 5d10 6s2 | 6p6 7s2', + 'fleur_default_econfig': '[Xe] 4f14 5d10 | 6s2 6p6 7s2', + 'lo': '6s 6p', + 'rmt': 2.2, + 'lmax': '', + 'jri': 981 + }, + 89: { + 'mass': 227.0, + 'name': 'Actinium', + 'symbol': 'Ac', + 'econfig': '[Xe] 4f14 5d10 6s2 | 6p6 7s2 6d1', + 'fleur_default_econfig': '[Xe] 4f14 5d10 | 6s2 6p6 7s2 6d1', + 'lo': '6s 6p', + 'rmt': 2.2, + 'lmax': '', + 'jri': 981 + }, + 90: { + 'mass': 232.03806, + 'name': 'Thorium', + 'symbol': 'Th', + 'econfig': '[Xe] 4f14 5d10 6s2 | 6p6 7s2 6d1 5f1', + 'fleur_default_econfig': '[Xe] 4f14 5d10 | 6s2 6p6 7s2 6d1 5f1', + 'lo': '6s 6p', + 'rmt': 2.2, + 'lmax': '', + 'jri': 981 + }, + 91: { + 'mass': 231.03588, + 'name': 'Protactinium', + 'symbol': 'Pa', + 'econfig': '[Xe] 4f14 5d10 6s2 | 6p6 7s2 6d1 5f2', + 'fleur_default_econfig': '[Xe] 4f14 5d10 | 6s2 6p6 7s2 6d1 5f2', + 'lo': '6s 6p', + 'rmt': 2.2, + 'lmax': '', + 'jri': 981 + }, + 92: { + 'mass': 238.02891, + 'name': 'Uranium', + 'symbol': 'U', + 'econfig': '[Xe] 4f14 5d10 6s2 6p6| 7s2 5f4', + 'fleur_default_econfig': '[Xe] 4f14 5d10 | 6s2 6p6 7s2 5f4', + 'lo': '6s 6p', + 'rmt': 2.3, + 'lmax': '', + 'jri': 981 + }, + 93: { + 'mass': 237.0, + 'name': 'Neptunium', + 'symbol': 'Np', + 'econfig': '[Xe] 4f14 5d10 6s2 6p6 | 7s2 5f5', + 'fleur_default_econfig': '[Xe] 4f14 5d10 | 6s2 6p6 7s2 5f5', + 'lo': '6s 6p', + 'rmt': 2.1, + 'lmax': '', + 'jri': 981 + }, + 94: { + 'mass': 244.0, + 'name': 'Plutonium', + 'symbol': 'Pu', + 'econfig': '[Xe] 4f14 5d10 6s2 6p6 | 7s2 5f6', + 'fleur_default_econfig': '[Xe] 4f14 5d10 | 6s2 6p6 7s2 5f6', + 'lo': '6s 6p', + 'rmt': 2.2, + 'lmax': '', + 'jri': 981 + }, + 95: { + 'mass': 243.0, + 'name': 'Americium', + 'symbol': 'Am', + 'econfig': '[Xe] 4f14 5d10 6s2 6p6 | 7s2 5f7', + 'fleur_default_econfig': '[Xe] 4f14 5d10 | 6s2 6p6 7s2 5f7', + 'lo': '6s 6p', + 'rmt': 2.4, + 'lmax': '', + 'jri': 981 + }, + 96: { + 'mass': 247.0, + 'name': 'Curium', + 'symbol': 'Cm', + 'econfig': '[Xe] 4f14 5d10 6s2 6p6 | 7s2 5f8', + 'fleur_default_econfig': '[Xe] 4f14 5d10 | 6s2 6p6 7s2 5f8', + 'lo': '6s 6p', + 'rmt': 2.4, + 'lmax': '', + 'jri': 981 + }, + 97: { + 'mass': 247.0, + 'name': 'Berkelium', + 'symbol': 'Bk', + 'econfig': '[Xe] 4f14 5d10 6s2 6p6 | 7s2 5f9', + 'fleur_default_econfig': '[Xe] 4f14 5d10 | 6s2 6p6 7s2 5f9', + 'lo': '6s 6p', + 'rmt': 2.4, + 'lmax': '', + 'jri': 981 + }, + 98: { + 'mass': 251.0, + 'name': 'Californium', + 'symbol': 'Cf', + 'econfig': '[Xe] 4f14 5d10 6s2 6p6 | 7s2 5f10', + 'fleur_default_econfig': '[Xe] 4f14 5d10 | 6s2 6p6 7s2 5f10', + 'lo': '6s 6p', + 'rmt': 2.4, + 'lmax': '', + 'jri': 981 + }, + 99: { + 'mass': 252.0, + 'name': 'Einsteinium', + 'symbol': 'Es', + 'econfig': '[Xe] 4f14 5d10 6s2 6p6 | 7s2 5f11', + 'fleur_default_econfig': '[Xe] 4f14 5d10 | 6s2 6p6 7s2 5f11', + 'lo': '6s 6p', + 'rmt': 2.4, + 'lmax': '', + 'jri': 981 + }, + 100: { + 'mass': 257.0, + 'name': 'Fermium', + 'symbol': 'Fm', + 'econfig': '[Xe] 4f14 5d10 6s2 6p6 | 7s2 5f12', + 'fleur_default_econfig': '[Xe] 4f14 5d10 | 6s2 6p6 7s2 5f12', + 'lo': '6s 6p', + 'rmt': 2.4, + 'lmax': '', + 'jri': 981 + }, + 101: { + 'mass': 258.0, + 'name': 'Mendelevium', + 'symbol': 'Md', + 'econfig': '[Xe] 4f14 5d10 6s2 6p6 | 7s2 5f13', + 'fleur_default_econfig': '[Xe] 4f14 5d10 | 6s2 6p6 7s2 5f13', + 'lo': '6s 6p', + 'rmt': 2.4, + 'lmax': '', + 'jri': 981 + }, + 102: { + 'mass': 259.0, + 'name': 'Nobelium', + 'symbol': 'No', + 'econfig': '[Xe] 4f14 5d10 6s2 6p6 | 7s2 5f14', + 'fleur_default_econfig': '[Xe] 4f14 5d10 | 6s2 6p6 7s2 5f14', + 'lo': '6s 6p', + 'rmt': 2.4, + 'lmax': '', + 'jri': 981 + }, + 103: { + 'mass': 262.0, + 'name': 'Lawrencium', + 'symbol': 'Lr', + 'econfig': '[Xe] 4f14 5d10 6s2 6p6 | 7s2 5f14 6d1', + 'fleur_default_econfig': '[Xe] 4f14 5d10 | 6s2 6p6 7s2 5f14 6d1', + 'lo': '6s 6p 5f', + 'rmt': 2.4, + 'lmax': '', + 'jri': 981 + }, + 104: { + 'mass': 267.0, + 'name': 'Rutherfordium', + 'symbol': 'Rf', + 'econfig': '[Xe] 4f14 5d10 6s2 6p6 | 7s2 5f14 6d2', + 'fleur_default_econfig': '[Xe] 4f14 5d10 6s2 6p6 | 7s2 5f14 6d2', + 'lo': '6p 5f', + 'rmt': 2.4, + 'lmax': '', + 'jri': 981 + }, + 105: { + 'mass': 268.0, + 'name': 'Dubnium', + 'symbol': 'Db', + 'econfig': '[Xe] 4f14 5d10 6s2 6p6 | 7s2 5f14 6d3', + 'fleur_default_econfig': '[Xe] 4f14 5d10 6s2 | 6p6 7s2 5f14 6d3', + 'lo': '6p 5f', + 'rmt': 2.4, + 'lmax': '', + 'jri': 981 + }, + 106: { + 'mass': 271.0, + 'name': 'Seaborgium', + 'symbol': 'Sg', + 'econfig': '[Xe] 4f14 5d10 6s2 6p6 | 7s2 5f14 6d4', + 'fleur_default_econfig': '[Xe] 4f14 5d10 6s2 | 6p6 7s2 5f14 6d4', + 'lo': '6p 5f', + 'rmt': 2.4, + 'lmax': '', + 'jri': 981 + }, + 107: { + 'mass': 272.0, + 'name': 'Bohrium', + 'symbol': 'Bh', + 'econfig': '[Rn] 7s2 5f14 | 6d5', + 'fleur_default_econfig': '[Xe] 4f14 5d10 6s2 6p6 5f14 | 7s2 6d5', + 'lo': '', + 'rmt': 2.4, + 'lmax': '', + 'jri': 981 + }, + 108: { + 'mass': 270.0, + 'name': 'Hassium', + 'symbol': 'Hs', + 'econfig': '[Rn] 7s2 5f14 | 6d6', + 'fleur_default_econfig': '[Rn] 5f14 | 7s2 6d6', + 'lo': '', + 'rmt': 2.4, + 'lmax': '', + 'jri': 981 + }, + 109: { + 'mass': 276.0, + 'name': 'Meitnerium', + 'symbol': 'Mt', + 'econfig': '[Rn] 7s2 5f14 | 6d7', + 'fleur_default_econfig': '[Rn] 5f14 | 7s2 6d7', + 'lo': '', + 'rmt': 2.4, + 'lmax': '', + 'jri': 981 + }, + 110: { + 'mass': 281.0, + 'name': 'Darmstadtium', + 'symbol': 'Ds', + 'econfig': '[Rn] 7s2 5f14 | 6d8', + 'fleur_default_econfig': '[Rn] 5f14 | 7s2 6d8', + 'lo': '', + 'rmt': 2.4, + 'lmax': '', + 'jri': 981 + }, + 111: { + 'mass': 280.0, + 'name': 'Roentgenium', + 'symbol': 'Rg', + 'econfig': '[Rn] 7s2 5f14 | 6d9', + 'fleur_default_econfig': '[Rn] 5f14 | 7s2 6d9', + 'lo': '', + 'rmt': 2.4, + 'lmax': '', + 'jri': 981 + }, + 112: { + 'mass': 285.0, + 'name': 'Copernicium', + 'symbol': 'Cn', + 'econfig': '[Rn] 7s2 5f14 | 6d10', + 'fleur_default_econfig': '[Rn] 5f14 | 7s2 6d10', + 'lo': '6d', + 'rmt': 2.4, + 'lmax': '', + 'jri': 981 + }, + 113: { + 'mass': 285.0, + 'name': 'Nihomium', + 'symbol': 'Nh', + 'econfig': '[Rn] 7s2 5f14 | 6d10 7p1', + 'fleur_default_econfig': '[Rn] 7s2 5f14 | 6d10 7p1', + 'lo': '6d', + 'rmt': 2.4, + 'lmax': '', + 'jri': 981 + }, + 114: { + 'mass': 289.0, + 'name': 'Flerovium', + 'symbol': 'Fl', + 'econfig': '[Rn] 7s2 5f14 | 6d10 7p2', + 'fleur_default_econfig': '[Rn] 7s2 5f14 | 6d10 7p2', + 'lo': '6d', + 'rmt': 2.4, + 'lmax': '', + 'jri': 981 + }, + 115: { + 'mass': 0.0, + 'name': 'Mascovium', + 'symbol': 'Mc', + 'econfig': '[Rn] 7s2 5f14 | 6d10 7p3', + 'fleur_default_econfig': '[Rn] 7s2 5f14 | 6d10 7p3', + 'lo': '6d', + 'rmt': 2.4, + 'lmax': '', + 'jri': 981 + }, + 116: { + 'mass': 293.0, + 'name': 'Livermorium', + 'symbol': 'Lv', + 'econfig': '[Rn] 7s2 5f14 | 6d10 7p4', + 'fleur_default_econfig': '[Rn] 7s2 5f14 | 6d10 7p4', + 'lo': '6d', + 'rmt': 2.4, + 'lmax': '', + 'jri': 981 + }, + 117: { + 'mass': 0.0, + 'name': 'Tennessine', + 'symbol': 'Ts', + 'econfig': '[Rn] 7s2 5f14 | 6d10 7p5', + 'fleur_default_econfig': '[Rn] 7s2 5f14 | 6d10 7p5', + 'lo': '6d', + 'rmt': 2.4, + 'lmax': '', + 'jri': 981 + }, + 118: { + 'mass': 0.0, + 'name': 'Oganesson', + 'symbol': 'Og', + 'econfig': '[Rn] 7s2 5f14 | 6d10 7p6', + 'fleur_default_econfig': '[Rn] 7s2 5f14 | 6d10 7p6', + 'lo': '6d', + 'rmt': 2.4, + 'lmax': '', + 'jri': 981 } +} +all_econfig = [ + '1s2', '2s2', '2p6', '3s2', '3p6', '4s2', '3d10', '4p6', '5s2', '4d10', '5p6', '6s2', '4f14', '5d10', '6p6', '7s2', + '5f14', '6d10', '7p6', '8s2', '6f14' +] +states_spin = {'s': ['1/2'], 'p': ['1/2', '3/2'], 'd': ['3/2', '5/2'], 'f': ['5/2', '7/2']} +max_state_occ = {'s': 2., 'p': 6., 'd': 10., 'f': 14.} +max_state_occ_spin = {'1/2': 2., '3/2': 4., '5/2': 6., '7/2': 8.} +shell_map = {0: 's', 1: 'p', 2: 'd', 3: 'f'} +element_delta_defaults = {} # for workflow purposes - -all_econfig = ['1s2', '2s2', '2p6', '3s2', '3p6', '4s2', '3d10', '4p6', '5s2', '4d10', '5p6', '6s2', '4f14', '5d10', '6p6', '7s2', '5f14', '6d10', '7p6', '8s2', '6f14'] -states_spin = {'s': ['1/2'], 'p' : ['1/2', '3/2'], 'd' : ['3/2', '5/2'], 'f' : ['5/2', '7/2']} -max_state_occ = {'s': 2., 'p' : 6., 'd' : 10., 'f' : 14.} -max_state_occ_spin = {'1/2' : 2., '3/2' : 4., '5/2' : 6., '7/2' : 8.} -shell_map = {0 : 's', 1 : 'p', 2 : 'd', 3 : 'f'} -element_delta_defaults = {} # for workflow purposes - -element_max_para = {} # for workflow purposes - +element_max_para = {} # for workflow purposes def get_econfig(element, full=False): @@ -176,9 +1357,8 @@ def get_econfig(element, full=False): return econ else: return econ - elif isinstance(element, six.string_types):# str): - atomic_names = {data['symbol']: num for num, - data in six.iteritems(econfiguration)} + elif isinstance(element, six.string_types): # str): + atomic_names = {data['symbol']: num for num, data in six.iteritems(econfiguration)} element_num = atomic_names.get(element, None) econ = econfiguration.get(element_num, {}).get('econfig', None) if full: @@ -190,6 +1370,7 @@ def get_econfig(element, full=False): print('INPUTERROR: element has to be and int or string') return None + def get_coreconfig(element, full=False): """ returns the econfiguration as a string of an element. @@ -207,8 +1388,7 @@ def get_coreconfig(element, full=False): else: return econ.split('|')[0].rstrip() elif isinstance(element, str): - atomic_names = {data['symbol']: num for num, - data in six.iteritems(econfiguration)} + atomic_names = {data['symbol']: num for num, data in six.iteritems(econfiguration)} element_num = atomic_names.get(element, None) econ = econfiguration.get(element_num, {}).get('econfig', None) if full: @@ -220,6 +1400,7 @@ def get_coreconfig(element, full=False): print('INPUTERROR: element has to be and int or string') return None + def rek_econ(econfigstr): """ recursive routine to return a full econfig @@ -235,7 +1416,7 @@ def rek_econ(econfigstr): econfig = get_econfig(elem) econ = econfig.replace(' |', '') econfigstr = rek_econ(econ + rest) - return econfigstr# for now + return econfigstr # for now def convert_fleur_config_to_econfig(fleurconf_str, keep_spin=False): @@ -262,19 +1443,22 @@ def convert_fleur_config_to_econfig(fleurconf_str, keep_spin=False): econfstring_new = '{}{}{} '.format(econfstring_new, base, int(occ)) else: max_occ = max_state_occ.get(base[1]) - econfstring_new = econfstring_new.split(base)[0] + '{}{} '.format(base, int(max_occ)) + econfstring_new = econfstring_new.split(base)[0] + '{}{} '.format(base, int(max_occ)) # we assume here that the two states come behind each other, ... rather bad #econfstring_new.replace('{}'.format(base) else: - econfstring_new = econfstring_new + state + ' ' + econfstring_new = econfstring_new + state + ' ' econfstring = econfstring_new return econfstring.strip() + + #test convert_fleur_config_to_econfig(config, keep_spin+true/False) #config = '[Kr] (4d3/2) (4d5/2) (4f5/2) (4f7/2)' #config = '[Kr]' #config = '[Kr] 4d3/2 4d5/2 4f5/2'# 4f7/2' + def highest_unocc_valence(econfigstr): """ returns the highest not full valence orbital. If all are full, it returns '' @@ -297,11 +1481,12 @@ def highest_unocc_valence(econfigstr): #print hightest_orb index = all_econfig.index(hightest_orb) if index: - next_orb_full = all_econfig[all_econfig.index(hightest_orb)+1] + next_orb_full = all_econfig[all_econfig.index(hightest_orb) + 1] next_orb_empty = next_orb_full[0:2] + '0' - return next_orb_empty # '' # everythin is full + return next_orb_empty # '' # everythin is full else: - return val_orb#None + return val_orb #None + def get_spin_econfig(fulleconfigstr): """ @@ -329,6 +1514,8 @@ def get_spin_econfig(fulleconfigstr): spin_econfig_string = spin_econfig_string + '{}{} '.format(state[:2], spin) return spin_econfig_string.rstrip() + + # test get_spin_econfig('1s2 2s2 2p6'), '1s1/2 2s1/2 2p1/2 2p3/2' # test get_spin_econfig('[Kr] 4d10 4f14') '1s1/2 2s1/2 2p1/2 2p3/2 3s1/2 3p1/2 3p3/2 3d3/2 3d5/2 4s1/2 4p1/2 4p3/2 4d3/2 4d5/2 4f5/2 4f7/2' @@ -350,8 +1537,8 @@ def econfigstr_hole(econfigstr, corelevel, highesunoccp, htype='valence'): hoc = int(highesunoccp[2:]) if htype == 'valence': new_highocc = str(hoc + 1) - else:# charged corehole, removed from system, keep occ - if hoc == 0: # do not add orbital to econfig + else: # charged corehole, removed from system, keep occ + if hoc == 0: # do not add orbital to econfig highesunoccp = '' new_highocc = '' else: @@ -373,7 +1560,6 @@ def econfigstr_hole(econfigstr, corelevel, highesunoccp, htype='valence'): return new_econfig.rstrip(' ') - def get_state_occ(econfigstr, corehole='', valence='', ch_occ=1.0): """ finds out all not full occupied states and returns a dictionary of them @@ -387,9 +1573,9 @@ def get_state_occ(econfigstr, corehole='', valence='', ch_occ=1.0): # get how are are filled spin up down state_occ_dict_list = [] - corehole1 = corehole.replace(" ", "")# get rid of spaces - corehole_blank = corehole1[:2] + corehole1[-3:] # get rid of occupation - econ = econfigstr.replace("| ", "") + corehole1 = corehole.replace(' ', '') # get rid of spaces + corehole_blank = corehole1[:2] + corehole1[-3:] # get rid of occupation + econ = econfigstr.replace('| ', '') econ_list = econ.split() for state in econ_list[::-1]: state_l = state[1] @@ -402,10 +1588,7 @@ def get_state_occ(econfigstr, corehole='', valence='', ch_occ=1.0): spinupocc = 0 spindownocc = 0 occ_spin = occ - if statename == valence: - is_valence = True - else: - is_valence = False + is_valence = bool(statename == valence) for i, spins in enumerate(spinstates): spin_mac_occ = max_state_occ_spin[spins] occ_spin = occ_spin - spin_mac_occ @@ -415,34 +1598,33 @@ def get_state_occ(econfigstr, corehole='', valence='', ch_occ=1.0): # use this state # assume it is without the corehole fully filled. nelec = spin_mac_occ - max_spin_up_occ = spin_mac_occ/2. + max_spin_up_occ = spin_mac_occ / 2. spinupocc = max_spin_up_occ spindownocc = max_spin_up_occ - ch_occ fleur_name = '(' + name + ')' - state_dict = {'state' : fleur_name, 'spinUp' : spinupocc, 'spinDown' : spindownocc} + state_dict = {'state': fleur_name, 'spinUp': spinupocc, 'spinDown': spindownocc} state_occ_dict_list.append(state_dict) - occ_spin = occ_spin + 1 # because the electron left here and not in the other state + occ_spin = occ_spin + 1 # because the electron left here and not in the other state continue - if occ_spin < 0: # this one state is not full + if occ_spin < 0: # this one state is not full if is_valence: #print('is_valence') - nelec = occ_spin + spin_mac_occ -1 + ch_occ + nelec = occ_spin + spin_mac_occ - 1 + ch_occ else: nelec = occ_spin + spin_mac_occ - max_spin_up_occ = spin_mac_occ/2. + max_spin_up_occ = spin_mac_occ / 2. if 0 <= nelec <= max_spin_up_occ: spinupocc = nelec spindownocc = 0.00000 - elif 0 <= nelec: + elif nelec >= 0: spinupocc = max_spin_up_occ spindownocc = nelec - max_spin_up_occ - else:# do not append + else: # do not append continue fleur_name = '(' + name + ')' - state_dict = {'state' : fleur_name, 'spinUp' : spinupocc, 'spinDown' : spindownocc} + state_dict = {'state': fleur_name, 'spinUp': spinupocc, 'spinDown': spindownocc} state_occ_dict_list.append(state_dict) - return state_occ_dict_list diff --git a/aiida_fleur/tools/exp_bindingenergies.json b/aiida_fleur/tools/exp_bindingenergies.json index bf604c9bf..73df541a0 100644 --- a/aiida_fleur/tools/exp_bindingenergies.json +++ b/aiida_fleur/tools/exp_bindingenergies.json @@ -1 +1 @@ -{"1": {"binding_energy": {"1s1/2": []}, "name": "Hydrogen", "symbol": "H", "binding_energy_standard_deviation": {"1s1/2": []}}, "2": {"binding_energy": {"1s1/2": []}, "name": "Helium", "symbol": "He", "binding_energy_standard_deviation": {"1s1/2": []}}, "3": {"binding_energy": {"1s1/2": [56], "2s1/2": []}, "name": "Lithium", "symbol": "Li", "binding_energy_standard_deviation": {"1s1/2": [], "2s1/2": []}}, "4": {"binding_energy": {"1s1/2": [111.82], "2s1/2": []}, "name": "Beryllium", "symbol": "Be", "binding_energy_standard_deviation": {"1s1/2": [], "2s1/2": []}}, "5": {"binding_energy": {"1s1/2": [189], "2p1/2": [], "2p3/2": [], "2s1/2": []}, "name": "Boron", "symbol": "B", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": []}}, "6": {"binding_energy": {"1s1/2": [284.4], "2p1/2": [], "2p3/2": [], "2s1/2": []}, "name": "Carbon", "symbol": "C", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": []}}, "7": {"binding_energy": {"1s1/2": [398], "2p1/2": [], "2p3/2": [], "2s1/2": []}, "name": "Nitrogen", "symbol": "N", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": []}}, "8": {"binding_energy": {"1s1/2": [531], "2p1/2": [], "2p3/2": [], "2s1/2": []}, "name": "Oxygen", "symbol": "O", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": []}}, "9": {"binding_energy": {"1s1/2": [685], "2p1/2": [], "2p3/2": [], "2s1/2": []}, "name": "Fluorine", "symbol": "F", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": []}}, "10": {"binding_energy": {"1s1/2": [863], "2p1/2": [], "2p3/2": [], "2s1/2": []}, "name": "Neon", "symbol": "Ne", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": []}}, "11": {"binding_energy": {"1s1/2": [1072], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3s1/2": []}, "name": "Sodium", "symbol": "Na", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3s1/2": []}}, "12": {"binding_energy": {"1s1/2": [], "2p1/2": [50], "2p3/2": [49.76], "2s1/2": [], "3s1/2": []}, "name": "Magnesium", "symbol": "Mg", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3s1/2": []}}, "13": {"binding_energy": {"1s1/2": [], "2p1/2": [73], "2p3/2": [72.84], "2s1/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": []}, "name": "Aluminium", "symbol": "Al", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": []}}, "14": {"binding_energy": {"1s1/2": [], "2p1/2": [99], "2p3/2": [99.31], "2s1/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": []}, "name": "Silicon", "symbol": "Si", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": []}}, "15": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [129.98], "2s1/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": []}, "name": "Phosphorus", "symbol": "P", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": []}}, "16": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [164], "2s1/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": []}, "name": "Sulfur", "symbol": "S", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": []}}, "17": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [199], "2s1/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": []}, "name": "Chlorine", "symbol": "Cl", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": []}}, "18": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [242], "2s1/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": []}, "name": "Argon", "symbol": "Ar", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": []}}, "19": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4s1/2": []}, "name": "Potassium", "symbol": "K", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4s1/2": []}}, "20": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [346.57], "2s1/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4s1/2": []}, "name": "Calcium", "symbol": "Ca", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4s1/2": []}}, "21": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [398.49], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4s1/2": []}, "name": "Scandium", "symbol": "Sc", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4s1/2": []}}, "22": {"binding_energy": {"1s1/2": [], "2p1/2": [460.0], "2p3/2": [453.94], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4s1/2": []}, "name": "Titanium", "symbol": "Ti", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4s1/2": []}}, "23": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [512.16], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4s1/2": []}, "name": "Vanadium", "symbol": "V", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4s1/2": []}}, "24": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [574.31], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4s1/2": []}, "name": "Chromium", "symbol": "Cr", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4s1/2": []}}, "25": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [638.85], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4s1/2": []}, "name": "Manganese", "symbol": "Mn", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4s1/2": []}}, "26": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [706.81], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4s1/2": []}, "name": "Iron", "symbol": "Fe", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4s1/2": []}}, "27": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [778.3], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4s1/2": []}, "name": "Cobalt", "symbol": "Co", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4s1/2": []}}, "28": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [852.68], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4s1/2": []}, "name": "Nickel", "symbol": "Ni", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4s1/2": []}}, "29": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [932.62], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [75.14], "3s1/2": []}, "name": "Copper", "symbol": "Cu", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": []}}, "30": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [1021.76], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4s1/2": []}, "name": "Zinc", "symbol": "Zn", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4s1/2": []}}, "31": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": []}, "name": "Gallium", "symbol": "Ga", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": []}}, "32": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [29.36], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": []}, "name": "Germanium", "symbol": "Ge", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": []}}, "33": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [41.62], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": []}, "name": "Arsenic", "symbol": "As", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": []}}, "34": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": []}, "name": "Selenium", "symbol": "Se", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": []}}, "35": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": []}, "name": "Bromine", "symbol": "Br", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": []}}, "36": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": []}, "name": "Krypton", "symbol": "Kr", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": []}}, "37": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5s1/2": []}, "name": "Rubidium", "symbol": "Rb", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5s1/2": []}}, "38": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5s1/2": []}, "name": "Strontium", "symbol": "Sr", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5s1/2": []}}, "39": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [155.87], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5s1/2": []}, "name": "Yttrium", "symbol": "Y", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5s1/2": []}}, "40": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [178.75], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5s1/2": []}, "name": "Zirconium", "symbol": "Zr", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5s1/2": []}}, "41": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [202.31], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5s1/2": []}, "name": "Niobium", "symbol": "Nb", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5s1/2": []}}, "42": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [227.92], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5s1/2": []}, "name": "Molybdenum", "symbol": "Mo", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5s1/2": []}}, "43": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5s1/2": []}, "name": "Technetium", "symbol": "Tc", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5s1/2": []}}, "44": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [280.04], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5s1/2": []}, "name": "Ruthenium", "symbol": "Ru", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5s1/2": []}}, "45": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [307.16], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5s1/2": []}, "name": "Rhodium", "symbol": "Rh", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5s1/2": []}}, "46": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [335.08], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": []}, "name": "Palladium", "symbol": "Pd", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": []}}, "47": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [368.22], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5s1/2": []}, "name": "Silver", "symbol": "Ag", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5s1/2": []}}, "48": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [405.11], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5s1/2": []}, "name": "Cadmium", "symbol": "Cd", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5s1/2": []}}, "49": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [443.84], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": []}, "name": "Indium", "symbol": "In", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": []}}, "50": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [484.94], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": []}, "name": "Tin", "symbol": "Sn", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": []}}, "51": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [528.21], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": []}, "name": "Antimony", "symbol": "Sb", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": []}}, "52": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [572.99], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": []}, "name": "Tellurium", "symbol": "Te", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": []}}, "53": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": []}, "name": "Iodine", "symbol": "I", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": []}}, "54": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": []}, "name": "Xenon", "symbol": "Xe", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": []}}, "55": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}, "name": "Caesium", "symbol": "Cs", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}}, "56": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}, "name": "Barium", "symbol": "Ba", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}}, "57": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}, "name": "Lanthanum", "symbol": "La", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}}, "58": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}, "name": "Cerium", "symbol": "Ce", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}}, "59": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [931.84], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}, "name": "Praseodymium", "symbol": "Pr", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}}, "60": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [980.85], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}, "name": "Neodymium", "symbol": "Nd", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}}, "61": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}, "name": "Promethium", "symbol": "Pm", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}}, "62": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}, "name": "Samarium", "symbol": "Sm", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}}, "63": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [128.16], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}, "name": "Europium", "symbol": "Eu", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}}, "64": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [140.34], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}, "name": "Gadolinium", "symbol": "Gd", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}}, "65": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [145.98], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}, "name": "Terbium", "symbol": "Tb", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}}, "66": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [152.32], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}, "name": "Dysprosium", "symbol": "Dy", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}}, "67": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [159.56], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}, "name": "Holmium", "symbol": "Ho", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}}, "68": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [167.25], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}, "name": "Erbium", "symbol": "Er", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}}, "69": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [175.36], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}, "name": "Thulium", "symbol": "Tm", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}}, "70": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [182.37], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}, "name": "Ytterbium", "symbol": "Yb", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}}, "71": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [7.16], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}, "name": "Lutetium", "symbol": "Lu", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}}, "72": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [14.28], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}, "name": "Hafnium", "symbol": "Hf", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}}, "73": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [226.3], "4f5/2": [23.7], "4f7/2": [21.8], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}, "name": "Tantalum", "symbol": "Ta", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}}, "74": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [1806.9], "3p1/2": [2571.1], "3p3/2": [2278.4], "3s1/2": [], "4d3/2": [260.4], "4d5/2": [246.5], "4f5/2": [33.6], "4f7/2": [31.34], "4p1/2": [], "4p3/2": [423.7], "4s1/2": [594.3], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [37.2], "5s1/2": [75.5], "6s1/2": []}, "name": "Tungsten", "symbol": "W", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}}, "75": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [40.31], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}, "name": "Rhenium", "symbol": "Re", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}}, "76": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [50.66], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}, "name": "Osmium", "symbol": "Os", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}}, "77": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [60.81], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}, "name": "Iridium", "symbol": "Ir", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}}, "78": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [71.09], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}, "name": "Platinum", "symbol": "Pt", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}}, "79": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [83.95], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}, "name": "Gold", "symbol": "Au", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}}, "80": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [99.82], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}, "name": "Mercury", "symbol": "Hg", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}}, "81": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [117.7], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": []}, "name": "Thallium", "symbol": "Tl", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": []}}, "82": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [136.82], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": []}, "name": "Lead", "symbol": "Pb", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": []}}, "83": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [156.93], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": []}, "name": "Bismuth", "symbol": "Bi", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": []}}, "84": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": []}, "name": "Polonium", "symbol": "Po", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": []}}, "85": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": []}, "name": "Astatine", "symbol": "At", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": []}}, "86": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": []}, "name": "Radon", "symbol": "Rn", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": []}}, "87": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}, "name": "Francium", "symbol": "Fr", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}}, "88": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}, "name": "Radium", "symbol": "Ra", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}}, "89": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}, "name": "Actinium", "symbol": "Ac", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}}, "90": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}, "name": "Thorium", "symbol": "Th", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}}, "91": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}, "name": "Protactinium", "symbol": "Pa", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}}, "92": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}, "name": "Uranium", "symbol": "U", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}}, "93": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}, "name": "Neptunium", "symbol": "Np", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}}, "94": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}, "name": "Plutonium", "symbol": "Pu", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}}, "95": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}, "name": "Americium", "symbol": "Am", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}}, "96": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}, "name": "Curium", "symbol": "Cm", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}}, "97": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}, "name": "Berkelium", "symbol": "Bk", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}}, "98": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}, "name": "Californium", "symbol": "Cf", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}}, "99": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}, "name": "Einsteinium", "symbol": "Es", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}}, "100": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}, "name": "Fermium", "symbol": "Fm", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}}, "101": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}, "name": "Mendelevium", "symbol": "Md", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}}, "102": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}, "name": "Nobelium", "symbol": "No", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}}, "103": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}, "name": "Lawrencium", "symbol": "Lr", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}}, "104": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6d3/2": [], "6d5/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}, "name": "Rutherfordium", "symbol": "Rf", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6d3/2": [], "6d5/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}}, "105": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6d3/2": [], "6d5/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}, "name": "Dubnium", "symbol": "Db", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6d3/2": [], "6d5/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}}, "106": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6d3/2": [], "6d5/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}, "name": "Seaborgium", "symbol": "Sg", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6d3/2": [], "6d5/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}}, "107": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6d3/2": [], "6d5/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}, "name": "Bohrium", "symbol": "Bh", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6d3/2": [], "6d5/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}}, "108": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6d3/2": [], "6d5/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}, "name": "Hassium", "symbol": "Hs", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6d3/2": [], "6d5/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}}, "109": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6d3/2": [], "6d5/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}, "name": "Meitnerium", "symbol": "Mt", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6d3/2": [], "6d5/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}}, "110": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6d3/2": [], "6d5/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}, "name": "Darmstadtium", "symbol": "Ds", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6d3/2": [], "6d5/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}}, "111": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6d3/2": [], "6d5/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}, "name": "Roentgenium", "symbol": "Rg", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6d3/2": [], "6d5/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}}, "112": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6d3/2": [], "6d5/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}, "name": "Copernicium", "symbol": "Cn", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6d3/2": [], "6d5/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}}, "114": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6d3/2": [], "6d5/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}, "name": "Flerovium", "symbol": "Fl", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6d3/2": [], "6d5/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}}, "116": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6d3/2": [], "6d5/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7p1/2": [], "7p3/2": [], "7s1/2": []}, "name": "Livermorium", "symbol": "Lv", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6d3/2": [], "6d5/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7p1/2": [], "7p3/2": [], "7s1/2": []}}} \ No newline at end of file +{"1": {"binding_energy": {"1s1/2": []}, "name": "Hydrogen", "symbol": "H", "binding_energy_standard_deviation": {"1s1/2": []}}, "2": {"binding_energy": {"1s1/2": []}, "name": "Helium", "symbol": "He", "binding_energy_standard_deviation": {"1s1/2": []}}, "3": {"binding_energy": {"1s1/2": [56], "2s1/2": []}, "name": "Lithium", "symbol": "Li", "binding_energy_standard_deviation": {"1s1/2": [], "2s1/2": []}}, "4": {"binding_energy": {"1s1/2": [111.82], "2s1/2": []}, "name": "Beryllium", "symbol": "Be", "binding_energy_standard_deviation": {"1s1/2": [], "2s1/2": []}}, "5": {"binding_energy": {"1s1/2": [189], "2p1/2": [], "2p3/2": [], "2s1/2": []}, "name": "Boron", "symbol": "B", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": []}}, "6": {"binding_energy": {"1s1/2": [284.4], "2p1/2": [], "2p3/2": [], "2s1/2": []}, "name": "Carbon", "symbol": "C", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": []}}, "7": {"binding_energy": {"1s1/2": [398], "2p1/2": [], "2p3/2": [], "2s1/2": []}, "name": "Nitrogen", "symbol": "N", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": []}}, "8": {"binding_energy": {"1s1/2": [531], "2p1/2": [], "2p3/2": [], "2s1/2": []}, "name": "Oxygen", "symbol": "O", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": []}}, "9": {"binding_energy": {"1s1/2": [685], "2p1/2": [], "2p3/2": [], "2s1/2": []}, "name": "Fluorine", "symbol": "F", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": []}}, "10": {"binding_energy": {"1s1/2": [863], "2p1/2": [], "2p3/2": [], "2s1/2": []}, "name": "Neon", "symbol": "Ne", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": []}}, "11": {"binding_energy": {"1s1/2": [1072], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3s1/2": []}, "name": "Sodium", "symbol": "Na", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3s1/2": []}}, "12": {"binding_energy": {"1s1/2": [], "2p1/2": [50], "2p3/2": [49.76], "2s1/2": [], "3s1/2": []}, "name": "Magnesium", "symbol": "Mg", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3s1/2": []}}, "13": {"binding_energy": {"1s1/2": [], "2p1/2": [73], "2p3/2": [72.84], "2s1/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": []}, "name": "Aluminium", "symbol": "Al", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": []}}, "14": {"binding_energy": {"1s1/2": [], "2p1/2": [99], "2p3/2": [99.31], "2s1/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": []}, "name": "Silicon", "symbol": "Si", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": []}}, "15": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [129.98], "2s1/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": []}, "name": "Phosphorus", "symbol": "P", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": []}}, "16": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [164], "2s1/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": []}, "name": "Sulfur", "symbol": "S", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": []}}, "17": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [199], "2s1/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": []}, "name": "Chlorine", "symbol": "Cl", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": []}}, "18": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [242], "2s1/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": []}, "name": "Argon", "symbol": "Ar", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": []}}, "19": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4s1/2": []}, "name": "Potassium", "symbol": "K", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4s1/2": []}}, "20": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [346.57], "2s1/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4s1/2": []}, "name": "Calcium", "symbol": "Ca", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4s1/2": []}}, "21": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [398.49], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4s1/2": []}, "name": "Scandium", "symbol": "Sc", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4s1/2": []}}, "22": {"binding_energy": {"1s1/2": [], "2p1/2": [460.0], "2p3/2": [453.94], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4s1/2": []}, "name": "Titanium", "symbol": "Ti", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4s1/2": []}}, "23": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [512.16], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4s1/2": []}, "name": "Vanadium", "symbol": "V", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4s1/2": []}}, "24": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [574.31], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4s1/2": []}, "name": "Chromium", "symbol": "Cr", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4s1/2": []}}, "25": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [638.85], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4s1/2": []}, "name": "Manganese", "symbol": "Mn", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4s1/2": []}}, "26": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [706.81], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4s1/2": []}, "name": "Iron", "symbol": "Fe", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4s1/2": []}}, "27": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [778.3], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4s1/2": []}, "name": "Cobalt", "symbol": "Co", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4s1/2": []}}, "28": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [852.68], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4s1/2": []}, "name": "Nickel", "symbol": "Ni", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4s1/2": []}}, "29": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [932.62], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [75.14], "3s1/2": []}, "name": "Copper", "symbol": "Cu", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": []}}, "30": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [1021.76], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4s1/2": []}, "name": "Zinc", "symbol": "Zn", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4s1/2": []}}, "31": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": []}, "name": "Gallium", "symbol": "Ga", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": []}}, "32": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [29.36], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": []}, "name": "Germanium", "symbol": "Ge", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": []}}, "33": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [41.62], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": []}, "name": "Arsenic", "symbol": "As", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": []}}, "34": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": []}, "name": "Selenium", "symbol": "Se", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": []}}, "35": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": []}, "name": "Bromine", "symbol": "Br", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": []}}, "36": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": []}, "name": "Krypton", "symbol": "Kr", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": []}}, "37": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5s1/2": []}, "name": "Rubidium", "symbol": "Rb", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5s1/2": []}}, "38": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5s1/2": []}, "name": "Strontium", "symbol": "Sr", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5s1/2": []}}, "39": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [155.87], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5s1/2": []}, "name": "Yttrium", "symbol": "Y", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5s1/2": []}}, "40": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [178.75], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5s1/2": []}, "name": "Zirconium", "symbol": "Zr", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5s1/2": []}}, "41": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [202.31], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5s1/2": []}, "name": "Niobium", "symbol": "Nb", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5s1/2": []}}, "42": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [227.92], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5s1/2": []}, "name": "Molybdenum", "symbol": "Mo", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5s1/2": []}}, "43": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5s1/2": []}, "name": "Technetium", "symbol": "Tc", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5s1/2": []}}, "44": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [280.04], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5s1/2": []}, "name": "Ruthenium", "symbol": "Ru", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5s1/2": []}}, "45": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [307.16], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5s1/2": []}, "name": "Rhodium", "symbol": "Rh", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5s1/2": []}}, "46": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [335.08], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": []}, "name": "Palladium", "symbol": "Pd", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": []}}, "47": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [368.22], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5s1/2": []}, "name": "Silver", "symbol": "Ag", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5s1/2": []}}, "48": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [405.11], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5s1/2": []}, "name": "Cadmium", "symbol": "Cd", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5s1/2": []}}, "49": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [443.84], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": []}, "name": "Indium", "symbol": "In", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": []}}, "50": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [484.94], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": []}, "name": "Tin", "symbol": "Sn", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": []}}, "51": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [528.21], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": []}, "name": "Antimony", "symbol": "Sb", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": []}}, "52": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [572.99], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": []}, "name": "Tellurium", "symbol": "Te", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": []}}, "53": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": []}, "name": "Iodine", "symbol": "I", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": []}}, "54": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": []}, "name": "Xenon", "symbol": "Xe", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": []}}, "55": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}, "name": "Caesium", "symbol": "Cs", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}}, "56": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}, "name": "Barium", "symbol": "Ba", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}}, "57": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}, "name": "Lanthanum", "symbol": "La", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}}, "58": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}, "name": "Cerium", "symbol": "Ce", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}}, "59": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [931.84], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}, "name": "Praseodymium", "symbol": "Pr", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}}, "60": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [980.85], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}, "name": "Neodymium", "symbol": "Nd", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}}, "61": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}, "name": "Promethium", "symbol": "Pm", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}}, "62": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}, "name": "Samarium", "symbol": "Sm", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}}, "63": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [128.16], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}, "name": "Europium", "symbol": "Eu", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}}, "64": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [140.34], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}, "name": "Gadolinium", "symbol": "Gd", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}}, "65": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [145.98], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}, "name": "Terbium", "symbol": "Tb", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}}, "66": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [152.32], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}, "name": "Dysprosium", "symbol": "Dy", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}}, "67": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [159.56], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}, "name": "Holmium", "symbol": "Ho", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}}, "68": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [167.25], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}, "name": "Erbium", "symbol": "Er", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}}, "69": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [175.36], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}, "name": "Thulium", "symbol": "Tm", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}}, "70": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [182.37], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}, "name": "Ytterbium", "symbol": "Yb", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}}, "71": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [7.16], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}, "name": "Lutetium", "symbol": "Lu", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}}, "72": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [14.28], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}, "name": "Hafnium", "symbol": "Hf", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}}, "73": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [226.3], "4f5/2": [23.7], "4f7/2": [21.8], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}, "name": "Tantalum", "symbol": "Ta", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}}, "74": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [1806.9], "3p1/2": [2571.1], "3p3/2": [2278.4], "3s1/2": [], "4d3/2": [260.4], "4d5/2": [246.5], "4f5/2": [33.6], "4f7/2": [31.34], "4p1/2": [], "4p3/2": [423.7], "4s1/2": [594.3], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [37.2], "5s1/2": [75.5], "6s1/2": []}, "name": "Tungsten", "symbol": "W", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}}, "75": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [40.31], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}, "name": "Rhenium", "symbol": "Re", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}}, "76": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [50.66], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}, "name": "Osmium", "symbol": "Os", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}}, "77": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [60.81], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}, "name": "Iridium", "symbol": "Ir", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}}, "78": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [71.09], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}, "name": "Platinum", "symbol": "Pt", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}}, "79": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [83.95], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}, "name": "Gold", "symbol": "Au", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}}, "80": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [99.82], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}, "name": "Mercury", "symbol": "Hg", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6s1/2": []}}, "81": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [117.7], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": []}, "name": "Thallium", "symbol": "Tl", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": []}}, "82": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [136.82], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": []}, "name": "Lead", "symbol": "Pb", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": []}}, "83": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [156.93], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": []}, "name": "Bismuth", "symbol": "Bi", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": []}}, "84": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": []}, "name": "Polonium", "symbol": "Po", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": []}}, "85": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": []}, "name": "Astatine", "symbol": "At", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": []}}, "86": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": []}, "name": "Radon", "symbol": "Rn", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": []}}, "87": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}, "name": "Francium", "symbol": "Fr", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}}, "88": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}, "name": "Radium", "symbol": "Ra", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}}, "89": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}, "name": "Actinium", "symbol": "Ac", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}}, "90": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}, "name": "Thorium", "symbol": "Th", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}}, "91": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}, "name": "Protactinium", "symbol": "Pa", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}}, "92": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}, "name": "Uranium", "symbol": "U", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}}, "93": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}, "name": "Neptunium", "symbol": "Np", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}}, "94": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}, "name": "Plutonium", "symbol": "Pu", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}}, "95": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}, "name": "Americium", "symbol": "Am", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}}, "96": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}, "name": "Curium", "symbol": "Cm", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}}, "97": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}, "name": "Berkelium", "symbol": "Bk", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}}, "98": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}, "name": "Californium", "symbol": "Cf", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}}, "99": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}, "name": "Einsteinium", "symbol": "Es", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}}, "100": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}, "name": "Fermium", "symbol": "Fm", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}}, "101": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}, "name": "Mendelevium", "symbol": "Md", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}}, "102": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}, "name": "Nobelium", "symbol": "No", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}}, "103": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}, "name": "Lawrencium", "symbol": "Lr", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}}, "104": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6d3/2": [], "6d5/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}, "name": "Rutherfordium", "symbol": "Rf", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6d3/2": [], "6d5/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}}, "105": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6d3/2": [], "6d5/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}, "name": "Dubnium", "symbol": "Db", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6d3/2": [], "6d5/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}}, "106": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6d3/2": [], "6d5/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}, "name": "Seaborgium", "symbol": "Sg", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6d3/2": [], "6d5/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}}, "107": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6d3/2": [], "6d5/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}, "name": "Bohrium", "symbol": "Bh", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6d3/2": [], "6d5/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}}, "108": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6d3/2": [], "6d5/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}, "name": "Hassium", "symbol": "Hs", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6d3/2": [], "6d5/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}}, "109": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6d3/2": [], "6d5/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}, "name": "Meitnerium", "symbol": "Mt", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6d3/2": [], "6d5/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}}, "110": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6d3/2": [], "6d5/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}, "name": "Darmstadtium", "symbol": "Ds", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6d3/2": [], "6d5/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}}, "111": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6d3/2": [], "6d5/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}, "name": "Roentgenium", "symbol": "Rg", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6d3/2": [], "6d5/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}}, "112": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6d3/2": [], "6d5/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}, "name": "Copernicium", "symbol": "Cn", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6d3/2": [], "6d5/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}}, "114": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6d3/2": [], "6d5/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}, "name": "Flerovium", "symbol": "Fl", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6d3/2": [], "6d5/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7s1/2": []}}, "116": {"binding_energy": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6d3/2": [], "6d5/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7p1/2": [], "7p3/2": [], "7s1/2": []}, "name": "Livermorium", "symbol": "Lv", "binding_energy_standard_deviation": {"1s1/2": [], "2p1/2": [], "2p3/2": [], "2s1/2": [], "3d3/2": [], "3d5/2": [], "3p1/2": [], "3p3/2": [], "3s1/2": [], "4d3/2": [], "4d5/2": [], "4f5/2": [], "4f7/2": [], "4p1/2": [], "4p3/2": [], "4s1/2": [], "5d3/2": [], "5d5/2": [], "5f5/2": [], "5f7/2": [], "5p1/2": [], "5p3/2": [], "5s1/2": [], "6d3/2": [], "6d5/2": [], "6p1/2": [], "6p3/2": [], "6s1/2": [], "7p1/2": [], "7p3/2": [], "7s1/2": []}}} diff --git a/aiida_fleur/tools/extract_corelevels.py b/aiida_fleur/tools/extract_corelevels.py index 6c161d71d..a527caddc 100644 --- a/aiida_fleur/tools/extract_corelevels.py +++ b/aiida_fleur/tools/extract_corelevels.py @@ -9,7 +9,6 @@ # For further information please visit http://www.flapw.de or # # http://aiida-fleur.readthedocs.io/en/develop/ # ############################################################################### - """ In this module you find methods to parse/extract corelevel shifts from an out.xml file of FLEUR. @@ -21,12 +20,11 @@ from __future__ import absolute_import from __future__ import print_function import six -from lxml import etree#, objectify +from lxml import etree #, objectify from aiida_fleur.tools.xml_util import get_xml_attribute, eval_xpath, eval_xpath2 #convert_to_float - #import time #start_time = time.time() @@ -45,7 +43,6 @@ # except: # pass ##### - ''' # check if calculation pks belong to successful fleur calculations for pk in calcs_pks: @@ -55,12 +52,13 @@ if calc.get_state() != 'FINISHED': raise ValueError("Calculation with pk {} must be in state FINISHED".format(pk)) ''' + + def extract_lo_energies(outxmlfile, options=None): pass #TODO: how? out of DOS? - def extract_corelevels(outxmlfile, options=None): """ Extracts corelevels out of out.xml files @@ -133,25 +131,24 @@ def extract_corelevels(outxmlfile, options=None): #TODO all the attribute names... ###################### - #1. read out.xml in etree # TODO this should be common, moved somewhere else and importet parsed_data = {} outfile_broken = False parse_xml = True - parser = etree.XMLParser(recover=False)#, remove_blank_text=True) - parser_info = {'parser_warnings': [], 'unparsed' : []} + parser = etree.XMLParser(recover=False) #, remove_blank_text=True) + parser_info = {'parser_warnings': [], 'unparsed': []} try: tree = etree.parse(outxmlfile, parser) except etree.XMLSyntaxError: outfile_broken = True - #print 'broken xml' + #print 'broken xml' parser_info['parser_warnings'].append('The out.xml file is broken I try to repair it.') if outfile_broken: #repair xmlfile and try to parse what is possible. - parser = etree.XMLParser(recover=True)#, remove_blank_text=True) + parser = etree.XMLParser(recover=True) #, remove_blank_text=True) try: tree = etree.parse(outxmlfile, parser) except etree.XMLSyntaxError: @@ -161,7 +158,6 @@ def extract_corelevels(outxmlfile, options=None): #if parse_xml: root = tree.getroot() - # 2. get all species from input # get element, name, coreStates # TODO why can this not be eval_xpath2? @@ -176,32 +172,33 @@ def extract_corelevels(outxmlfile, options=None): species_magMom = species.get('magMom') #TODO sometimes not in inp.xml... what if it is not there coreconfig = eval_xpath(species, coreconfig_xpath, parser_info) - valenceconfig = eval_xpath(species, valenceconfig_xpath , parser_info) + valenceconfig = eval_xpath(species, valenceconfig_xpath, parser_info) state_occ = eval_xpath2(species, state_occ_xpath, parser_info) #parse state occ state_results = [] - for tag in state_occ:#always a list? + for tag in state_occ: #always a list? state = tag.get('state') spinUp = tag.get('spinUp') spinDown = tag.get('spinDown') - state_results.append({state : [spinUp, spinDown]}) - - - species_atts[species_name] = {'name' : species_name, - 'corestates' : species_corestates, - 'element': species_element, - 'atomgroups' : [], - 'mag_mom' : species_magMom, - 'atomic_number' : species_atomicnumber, - 'coreconfig' : coreconfig, - 'valenceconfig' : valenceconfig, - 'stateOccupation' : state_results} + state_results.append({state: [spinUp, spinDown]}) + + species_atts[species_name] = { + 'name': species_name, + 'corestates': species_corestates, + 'element': species_element, + 'atomgroups': [], + 'mag_mom': species_magMom, + 'atomic_number': species_atomicnumber, + 'coreconfig': coreconfig, + 'valenceconfig': valenceconfig, + 'stateOccupation': state_results + } species_names.append(species_name) #3. get number of atom types and their species from input atomtypes = [] - atomgroup_nodes = eval_xpath(root, atomgroup_xpath, parser_info)#/fleurinp/ + atomgroup_nodes = eval_xpath(root, atomgroup_xpath, parser_info) #/fleurinp/ # always a list? for atomgroup in atomgroup_nodes: types_dict = {} @@ -213,13 +210,19 @@ def extract_corelevels(outxmlfile, options=None): coreconf = species_atts[group_species]['coreconfig'] valenceconf = species_atts[group_species]['valenceconfig'] stateocc = species_atts[group_species]['stateOccupation'] - a = eval_xpath2(atomgroup, relpos_xpath, parser_info) + eval_xpath2(atomgroup, abspos_xpath, parser_info) + eval_xpath2(atomgroup, filmpos_xpath, parser_info)# always list + a = eval_xpath2(atomgroup, relpos_xpath, + parser_info) + eval_xpath2(atomgroup, abspos_xpath, parser_info) + eval_xpath2( + atomgroup, filmpos_xpath, parser_info) # always list natoms = len(a) - types_dict = {'species' : group_species, 'element' : element, - 'atomic_number' : atomicnumber, 'coreconfig': coreconf, - 'valenceconfig' : valenceconf, - 'stateOccupation' : stateocc, - 'natoms' : natoms} + types_dict = { + 'species': group_species, + 'element': element, + 'atomic_number': atomicnumber, + 'coreconfig': coreconf, + 'valenceconfig': valenceconf, + 'stateOccupation': stateocc, + 'natoms': natoms + } atomtypes.append(types_dict) #natomgroup = len(atomgroup_nodes) @@ -233,16 +236,16 @@ def extract_corelevels(outxmlfile, options=None): iteration_nodes = eval_xpath2(root, iteration_xpath, parser_info) nIteration = len(iteration_nodes) if nIteration >= 1: - iteration_to_parse = iteration_nodes[-1]#TODO:Optional all or other + iteration_to_parse = iteration_nodes[-1] #TODO:Optional all or other #print iteration_to_parse corestatescards = eval_xpath2(iteration_to_parse, relcoreStates_xpath, parser_info) # maybe does not return a list... - for type in atomtypes: # spin=2 is already in there + for atype in atomtypes: # spin=2 is already in there corelevels.append([]) for corestatescard in corestatescards: corelv = parse_state_card(corestatescard, iteration_to_parse, parser_info) - corelevels[int(corelv['atomtype'])-1].append(corelv)# is corelv['atomtype'] always an integer? + corelevels[int(corelv['atomtype']) - 1].append(corelv) # is corelv['atomtype'] always an integer? #print parser_info #pprint(corelevels[0][1]['corestates'][2]['energy']) @@ -250,7 +253,7 @@ def extract_corelevels(outxmlfile, options=None): return corelevels, atomtypes -def parse_state_card(corestateNode, iteration_node, parser_info={'parser_warnings' : []}): +def parse_state_card(corestateNode, iteration_node, parser_info=None): """ Parses the ONE core state card @@ -288,6 +291,8 @@ def parse_state_card(corestateNode, iteration_node, parser_info={'parser_warning lostElectrons_name = 'lostElectrons' atomtype_name = 'atomType' ####### + if parser_info is None: + parser_info = {'parser_warnings': []} atomtype = get_xml_attribute(corestateNode, atomtype_name, parser_info) @@ -308,24 +313,30 @@ def parse_state_card(corestateNode, iteration_node, parser_info={'parser_warning # some only the first interation, then get all state tags of the corestate tag (atom depended) # parse each core state #Attention to spin states = [] - corestates = eval_xpath2(corestateNode, state_xpath)#, parser_info) + corestates = eval_xpath2(corestateNode, state_xpath) #, parser_info) - for corestate in corestates:# be careful that corestates is a list + for corestate in corestates: # be careful that corestates is a list state_dict = {} n_state = get_xml_attribute(corestate, n_name, parser_info) l_state = get_xml_attribute(corestate, l_name, parser_info) j_state = get_xml_attribute(corestate, j_name, parser_info) energy, suc = convert_to_float(get_xml_attribute(corestate, energy_name, parser_info), parser_info) weight, suc = convert_to_float(get_xml_attribute(corestate, weight_name, parser_info), parser_info) - state_dict = {'n' : n_state, 'l' : l_state, 'j' : j_state, 'energy' : energy, 'weight' : weight} + state_dict = {'n': n_state, 'l': l_state, 'j': j_state, 'energy': energy, 'weight': weight} states.append(state_dict) - core_states = {'eigenvalue_sum' : eigenvalueSum, 'corestates': states, 'spin' : spin, 'kin_energy' : kinEnergy, 'atomtype' : atomtype} + core_states = { + 'eigenvalue_sum': eigenvalueSum, + 'corestates': states, + 'spin': spin, + 'kin_energy': kinEnergy, + 'atomtype': atomtype + } return core_states # TODO should be used from somewhere else, probably double -def convert_to_float(value_string, parser_info={'parser_warnings':[]}): +def convert_to_float(value_string, parser_info=None): """ Tries to make a float out of a string. If it can't it logs a warning and returns True or False if convertion worked or not. @@ -334,6 +345,9 @@ def convert_to_float(value_string, parser_info={'parser_warnings':[]}): :returns value: the new float or value_string: the string given :retruns: True or False """ + if parser_info is None: + parser_info = {'parser_warnings': []} + try: value = float(value_string) except TypeError: @@ -344,6 +358,7 @@ def convert_to_float(value_string, parser_info={'parser_warnings':[]}): return value_string, False return value, True + ''' ### call test_outxmlfiles = ['./out.xml', './test_outxml/outCuF.xml', './test_outxml/outFe.xml', './test_outxml/outHg.xml', './test_outxml/outO.xml'] @@ -399,19 +414,18 @@ def clshifts_to_be(coreleveldict, reference_dict, warn=False): for elem, corelevel_dict in six.iteritems(coreleveldict): ref_el = reference_dict.get(elem, {}) - if not ref_el: # no refernce for that element given + if not ref_el: # no refernce for that element given if warn: - print(("WARNING: Reference for element: '{}' not given. " - "I ignore these.".format(elem))) + print(("WARNING: Reference for element: '{}' not given. " 'I ignore these.'.format(elem))) continue return_corelevel_dict[elem] = {} for corelevel_name, corelevel_list in six.iteritems(corelevel_dict): ref_cl = ref_el.get(corelevel_name, []) - if not ref_cl: # no reference corelevel given for that element + if not ref_cl: # no reference corelevel given for that element if warn: - print(("WARNING: Reference corelevel '{}' for element: '{}' " - "not given. I ignore these.".format(corelevel_name, elem))) + print(("WARNING: Reference corelevel '{}' for element: '{}' " + 'not given. I ignore these.'.format(corelevel_name, elem))) continue be_all = [] nref = len(ref_cl) @@ -426,5 +440,4 @@ def clshifts_to_be(coreleveldict, reference_dict, warn=False): be_all.append(be) return_corelevel_dict[elem][corelevel_name] = be_all - return return_corelevel_dict diff --git a/aiida_fleur/tools/graph_fleur.py b/aiida_fleur/tools/graph_fleur.py deleted file mode 100644 index 05ff3761e..000000000 --- a/aiida_fleur/tools/graph_fleur.py +++ /dev/null @@ -1,221 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################### -# Copyright (c), Forschungszentrum Jülich GmbH, IAS-1/PGI-1, Germany. # -# All rights reserved. # -# This file is part of the AiiDA-FLEUR package. # -# # -# The code is hosted on GitHub at https://github.com/JuDFTteam/aiida-fleur # -# For further information on the license, see the LICENSE.txt file # -# For further information please visit http://www.flapw.de or # -# http://aiida-fleur.readthedocs.io/en/develop/ # -############################################################################### -""" -This code extents the original draw_graph method from https://github.com/aiidateam/aiida_core -It uses common colors to visualize the aiida-fleur nodes -""" -from __future__ import absolute_import -import os -import tempfile -import six - -from aiida.orm import load_node - -def draw_graph(origin_node, ancestor_depth=None, descendant_depth=None, format='dot', - include_calculation_inputs=False, include_calculation_outputs=False): - """ - The algorithm starts from the original node and goes both input-ward and output-ward via - a breadth-first algorithm. - - :param origin_node: An Aiida node, the starting point for drawing the graph - :param int ancestor_depth: The maximum depth of the ancestors drawn. If left to None, we - recurse until the graph is fully explored - :param int descendant_depth: The maximum depth of the descendants drawn. If left to None, - we recurse until the graph is fully explored - :param str format: The format, by default dot - - :returns: The exit_status of the os.system call that produced the valid file - :returns: The file name of the final output - - ..note:: - If an invalid format is provided graphviz prints a helpful message, so this doesn't need - to be implemented here. - - """ - # - # until the connected part of the graph that contains the root_pk is fully explored. - # TODO this command deserves to be improved, with options and further subcommands - - from aiida.orm import CalculationNode as Calculation - from aiida.orm import Code - from aiida.orm import Node - from aiida.common.links import LinkType - from aiida.orm.querybuilder import QueryBuilder - from aiida.plugins import DataFactory - - Dict = DataFactory('dict') - StructureData = DataFactory('structure') - - origin_node = load_node(origin_node) - - def draw_node_settings(node, **kwargs): - """ - Returns a string with all infos needed in a .dot file to define a node of a graph. - :param node: - :param kwargs: Additional key-value pairs to be added to the returned string - :return: a string - """ - if kwargs: - additional_params = ",{}".format( - ",".join('{}="{}"'.format(k, v) for k, v in six.iteritems(kwargs))) - else: - additional_params = "" - - if isinstance(node, Calculation): - shape = "shape=polygon,sides=4" - additional_params = additional_params + ', style="filled", fillcolor="sandybrown"' - elif isinstance(node, Code): - shape = "shape=diamond" - additional_params = additional_params + ', style="filled", fillcolor="seagreen3"' - else: - shape = "shape=ellipse" - if isinstance(node, StructureData): - additional_params = additional_params + ', style="filled", fillcolor="skyblue"' - if isinstance(node, Dict): - additional_params = additional_params + ', style="filled", fillcolor="#fcd975"' - - if node.label: - label_string = "\n'{}'".format(node.label) - additional_string = "" - else: - additional_string = "\n {}".format(node.description) - label_string = "" - labelstring = 'label=<{} ({})
{}{}
>'.format( - node.__class__.__name__, node.pk, label_string, - additional_string) - return "N{} [{},{}{}];".format(node.pk, shape, labelstring, - additional_params) - - def draw_link_settings(inp_id, out_id, link_label, link_type): - if link_type in (LinkType.CREATE.value, LinkType.INPUT_CALC.value, LinkType.INPUT_WORK.value): - style = 'solid' # Solid lines and black colors - color = "0.0 0.0 0.0" # for CREATE and INPUT (The provenance graph) - elif link_type == LinkType.RETURN.value: - style = 'dotted' # Dotted lines of - color = "0.0 0.0 0.0" # black color for Returns - elif link_type in (LinkType.CALL_CALC.value, LinkType.CALL_WORK.value): - style = 'bold' # Bold lines and - color = "0.0 1.0 1.0" # Bright red for calls - else: - style = 'solid' # Solid and - color = "0.0 0.0 0.5" #grey lines for unspecified links! - return (' {} -> {} [label=<{}>, color="{}", style="{}", penwidth=3];' - ''.format("N{}".format(inp_id), "N{}".format(out_id), link_label, color, style)) - - # Breadth-first search of all ancestors and descendant nodes of a given node - links = {} # Accumulate links here , penwidth=5 - nodes = {origin_node.pk: draw_node_settings(origin_node, style='filled', fillcolor='lightblue', penwidth=3)} #Accumulate nodes specs here - # Additional nodes (the ones added with either one of include_calculation_inputs or include_calculation_outputs - # is set to true. I have to put them in a different dictionary because nodes is the one used for the recursion, - # whereas these should not be used for the recursion: - additional_nodes = {} - - last_nodes = [origin_node] # Put the nodes whose links have not been scanned yet - - # Go through the graph on-ward (i.e. look at inputs) - depth = 0 - while last_nodes: - # I augment depth every time I get through a new iteration - depth += 1 - # I check whether I should stop here: - if ancestor_depth is not None and depth > ancestor_depth: - break - # I continue by adding new nodes here! - new_nodes = [] - for node in last_nodes: - # This query gives me all the inputs of this node, and link labels and types! - input_query = QueryBuilder() - input_query.append(Node, filters={'id':node.pk}, tag='n') - input_query.append(Node, with_outgoing='n', edge_project=('id', 'label', 'type'), project='*', tag='inp') - for inp, link_id, link_label, link_type in input_query.iterall(): - # I removed this check, to me there is no way that this link was already referred to! - # if link_id not in links: - links[link_id] = draw_link_settings(inp.pk, node.pk, link_label, link_type) - # For the nodes I need to check, maybe this same node is referred to multiple times. - if inp.pk not in nodes: - nodes[inp.pk] = draw_node_settings(inp, penwidth=3) - new_nodes.append(inp) - - # Checking whether I also should include all the outputs of a calculation into the drawing: - if include_calculation_outputs and isinstance(node, Calculation): - # Query for the outputs, giving me also link labels and types: - output_query = QueryBuilder() - output_query.append(Node, filters={'id':node.pk}, tag='n') - output_query.append(Node, with_incoming='n', edge_project=('id', 'label', 'type'), project='*', tag='out') - # Iterate through results - for out, link_id, link_label, link_type in output_query.iterall(): - # This link might have been drawn already, because the output is maybe - # already drawn. - # To check: Maybe it's more efficient not to check this, since - # the dictionaries are large and contain many keys... - # I.e. just always draw, also when overwriting an existing (identical) entry. - if link_id not in links: - links[link_id] = draw_link_settings(node.pk, out.pk, link_label, link_type) - if out.pk not in nodes and out.pk not in additional_nodes: - additional_nodes[out.pk] = draw_node_settings(out, penwidth=3) - - last_nodes = new_nodes - - - # Go through the graph down-ward (i.e. look at outputs) - last_nodes = [origin_node] - depth = 0 - while last_nodes: - depth += 1 - # Also here, checking of maximum descendant depth is set and applies. - if descendant_depth is not None and depth > descendant_depth: - break - new_nodes = [] - - for node in last_nodes: - # Query for the outputs: - output_query = QueryBuilder() - output_query.append(Node, filters={'id':node.pk}, tag='n') - output_query.append(Node, with_incoming='n', edge_project=('id', 'label', 'type'), project='*', tag='out') - - for out, link_id, link_label, link_type in output_query.iterall(): - # Draw the link - links[link_id] = draw_link_settings(node.pk, out.pk, link_label, link_type) - if out.pk not in nodes: - nodes[out.pk] = draw_node_settings(out, penwidth=3) - new_nodes.append(out) - - if include_calculation_inputs and isinstance(node, Calculation): - input_query = QueryBuilder() - input_query.append(Node, filters={'id':node.pk}, tag='n') - input_query.append(Node, with_outgoing='n', edge_project=('id', 'label', 'type'), project='*', tag='inp') - for inp, link_id, link_label, link_type in input_query.iterall(): - # Also here, maybe it's just better not to check? - if link_id not in links: - links[link_id] = draw_link_settings(inp.pk, node.pk, link_label, link_type) - if inp.pk not in nodes and inp.pk not in additional_nodes: - additional_nodes[inp.pk] = draw_node_settings(inp, penwidth=3) - last_nodes = new_nodes - - # Writing the graph to a temporary file - fd, fname = tempfile.mkstemp(suffix='.dot') - with open(fname, 'w') as fout: - fout.write("digraph G {\n") - for l_name, l_values in six.iteritems(links): - fout.write(' {}\n'.format(l_values)) - for n_name, n_values in six.iteritems(nodes): - fout.write(" {}\n".format(n_values)) - for n_name, n_values in six.iteritems(additional_nodes): - fout.write(" {}\n".format(n_values)) - fout.write("}\n") - - # Now I am producing the output file - output_file_name = "{0}.{format}".format(origin_node.pk, format=format) - exit_status = os.system('dot -T{format} {0} -o {1}'.format(fname, output_file_name, format=format)) - # cleaning up by removing the temporary file - os.remove(fname) - return exit_status, output_file_name diff --git a/aiida_fleur/tools/io_routines.py b/aiida_fleur/tools/io_routines.py index a26e91f36..e824fa7dd 100644 --- a/aiida_fleur/tools/io_routines.py +++ b/aiida_fleur/tools/io_routines.py @@ -9,7 +9,6 @@ # For further information please visit http://www.flapw.de or # # http://aiida-fleur.readthedocs.io/en/develop/ # ############################################################################### - """ Here we collect IO routines and their utility, for writting certain things to files, or post process files. For example collection of data or database evaluations, for other people. @@ -19,8 +18,8 @@ from __future__ import print_function import six -def write_results_to_file(headerstring, data, destination='./outputfile', seperator=' ', - transpose=True): + +def write_results_to_file(headerstring, data, destination='./outputfile', seperator=' ', transpose=True): """ Writes data to a file @@ -28,30 +27,38 @@ def write_results_to_file(headerstring, data, destination='./outputfile', sepera param data: 2D array (numpy,scipy) with data [colum1 colum2, ...] """ - thefile = open(destination, 'w') - thefile.write(headerstring) - datastring = '' - seperator = seperator# '\t' - if transpose: - datat = data.transpose() - else: - datat = data - for item in datat: - itemstring = '' - for value in item: - if isinstance(value, str) or isinstance(value, six.string_types): - itemstring = itemstring + '{}{}'.format(value, seperator) - else: - itemstring = itemstring + '{0:0.8f}{1:s}'.format(float(value), seperator) - datastring = datastring + itemstring.strip() + '\n' - thefile.write(datastring) - thefile.close() - - - -def write_xps_spectra_datafile(nodes, factors, natomtypes_dict, bindingenergies, - bindingenergies_ref, xdata_spec, ydata_spec, ydata_single_all, - xdata_all, ydata_all, compound_info, xdatalabel, + with open(destination, 'w') as thefile: + thefile.write(headerstring) + datastring = '' + #seperator = seperator # '\t' + if transpose: + datat = data.transpose() + else: + datat = data + for item in datat: + itemstring = '' + for value in item: + if isinstance(value, (six.string_types, str)): + itemstring = itemstring + '{}{}'.format(value, seperator) + else: + itemstring = itemstring + '{0:0.8f}{1:s}'.format(float(value), seperator) + datastring = datastring + itemstring.strip() + '\n' + thefile.write(datastring) + #thefile.close() + + +def write_xps_spectra_datafile(nodes, + factors, + natomtypes_dict, + bindingenergies, + bindingenergies_ref, + xdata_spec, + ydata_spec, + ydata_single_all, + xdata_all, + ydata_all, + compound_info, + xdatalabel, destination='./outputfile'): ''' special file write routine. Writes theoretical spectra data from plot spectra to file @@ -61,7 +68,7 @@ def write_xps_spectra_datafile(nodes, factors, natomtypes_dict, bindingenergies, import numpy as np dataprep = [xdata_spec, ydata_spec] + ydata_single_all - data = np.array(dataprep)#, ydata_single_all]) + data = np.array(dataprep) #, ydata_single_all]) formulastring = compound_info, factors nodesinvolvedstring = nodes @@ -69,21 +76,25 @@ def write_xps_spectra_datafile(nodes, factors, natomtypes_dict, bindingenergies, be_string = bindingenergies reference_be_string = bindingenergies_ref - headstring = ('# Theoretical Data provided as is without warranty. Copyright 2017-2018 Forschungszentrum Juelich GmbH\n' - '# produced at PGI-1 with the FLEUR code within the AiiDA framework (with aiida-fleur), MIT License, please cite: \n' - '################# Data meta information #############\n') - tempst = ('# System: {}\n# Nodes: {}\n# Elements and natomtypes: {}\n# Bindingenergies [eV], pos: {}\n# Reference Energies [eV] pos: {}\n' - ''.format(formulastring, nodesinvolvedstring, atomtypesstring, be_string, reference_be_string)) + headstring = ( + '# Theoretical Data provided as is without warranty. Copyright 2017-2018 Forschungszentrum Juelich GmbH\n' + '# produced at PGI-1 with the FLEUR code within the AiiDA framework (with aiida-fleur), MIT License, please cite: \n' + '################# Data meta information #############\n') + tempst = ( + '# System: {}\n# Nodes: {}\n# Elements and natomtypes: {}\n# Bindingenergies [eV], pos: {}\n# Reference Energies [eV] pos: {}\n' + ''.format(formulastring, nodesinvolvedstring, atomtypesstring, be_string, reference_be_string)) tempst1 = '' for label in xdatalabel: tempst1 = tempst1 + ' | ' + label - tempst2 = ('##################### Data ######################\n# Energy [eV] | Total intensity {}\n'.format(tempst1)) + tempst2 = ( + '##################### Data ######################\n# Energy [eV] | Total intensity {}\n'.format(tempst1)) headstring = headstring + tempst + tempst2 print(('Writting theoretical XPS data to file: {}'.format(destination))) write_results_to_file(headstring, data, destination=destination, seperator=' ') + # example/test #from plot_methods.plot_fleur_aiida import plot_spectra #import plot_methods @@ -95,18 +106,18 @@ def write_xps_spectra_datafile(nodes, factors, natomtypes_dict, bindingenergies, def compress_fleuroutxml(outxmlfilepath, dest_file_path=None, delete_eig=True, iterations_to_keep=None): """ - Compresses a fleur out.xml file by deleting certain things + Compresses a fleur out.xml file by deleting certain things like eigenvalues tags and/or iterations from it - + :param outxmlfilepath: (absolut) file path :type outxmlfilepath: str :param dest_file_path: (absolut) for the compressed file to be saved, if no desitination file path is given the file is overriden in place (default)! :type dest_file_path: str, optional :param delete_eig: if eigenvalues are deleted from file default is True - :type delete_eig: boolean, optional - :param iterations_to_keep: index of 'till' whihc iterations to be keep, i.e '-2' means only last two, '15' default (None) is keep all + :type delete_eig: boolean, optional + :param iterations_to_keep: index of 'till' whihc iterations to be keep, i.e '-2' means only last two, '15' default (None) is keep all :type iterations_to_keep: int - + ### usage example: outxmldes = '/Users/broeder/test/FePt_out_test.xml' @@ -114,14 +125,14 @@ def compress_fleuroutxml(outxmlfilepath, dest_file_path=None, delete_eig=True, i compress_fleuroutxml(outxmlsrc, dest_file_path=outxmldes, iterations_to_keep=14) compress_fleuroutxml(outxmlsrc, dest_file_path=outxmldes, iterations_to_keep=-1) - + """ from aiida_fleur.tools.xml_util import delete_tag, eval_xpath2 from lxml import etree - + xpath_eig = '/fleurOutput/scfLoop/iteration/eigenvalues' xpath_iter = '/fleurOutput/scfLoop/iteration' - + tree = None parser = etree.XMLParser(recover=False) outfile_broken = False try: @@ -129,20 +140,26 @@ def compress_fleuroutxml(outxmlfilepath, dest_file_path=None, delete_eig=True, i except etree.XMLSyntaxError: outfile_broken = True print('broken') - + if outfile_broken: # repair xmlfile and try to parse what is possible. parser = etree.XMLParser(recover=True) try: - tree = etree.parse(outxmlfile, parser) + tree = etree.parse(outxmlfilepath, parser) except etree.XMLSyntaxError: parse_xml = False successful = False - - # delete eigenvalues (all) + print('failed to parse broken file, I abort.') + return + + if tree is None: + print('xml tree is None, should not happen, ...') + return + + # delete eigenvalues (all) if delete_eig: new_etree = delete_tag(tree, xpath_eig) - + # delete certain iterations if iterations_to_keep is not None: root = new_etree.getroot() @@ -152,9 +169,9 @@ def compress_fleuroutxml(outxmlfilepath, dest_file_path=None, delete_eig=True, i if iterations_to_keep < 0: # the first element has 1 (not 0) in xpath expresions position_keep = n_iters + iterations_to_keep + 1 - delete_xpath = xpath_iter +"[position()<{}]".format(int(position_keep)) + delete_xpath = xpath_iter + '[position()<{}]'.format(int(position_keep)) else: - delete_xpath = xpath_iter +"[position()>{}]".format(int(iterations_to_keep)) + delete_xpath = xpath_iter + '[position()>{}]'.format(int(iterations_to_keep)) if abs(iterations_to_keep) > n_iters: print('Warning: iterations_to_keep is larger then the number of iterations' @@ -162,12 +179,16 @@ def compress_fleuroutxml(outxmlfilepath, dest_file_path=None, delete_eig=True, i else: print(delete_xpath) new_etree = delete_tag(new_etree, delete_xpath) - + if dest_file_path is None: - dest_file_path = outxmlfilepath # overwrite file - new_etree.write(dest_file_path) - + dest_file_path = outxmlfilepath # overwrite file + if new_etree.getroot() is not None: #otherwise write fails + new_etree.write(dest_file_path) + else: + print('new_etree has no root..., I cannot write to proper xml, skipping this now') return + + # usage example #outxml15 = '/Users/broeder/test/FePt_out_test.xml' #outxml14 = '/Users/broeder/test/FePt_out.xml' diff --git a/aiida_fleur/tools/merge_parameter.py b/aiida_fleur/tools/merge_parameter.py index b7b0d1166..75a9ce382 100644 --- a/aiida_fleur/tools/merge_parameter.py +++ b/aiida_fleur/tools/merge_parameter.py @@ -9,7 +9,6 @@ # For further information please visit http://www.flapw.de or # # http://aiida-fleur.readthedocs.io/en/develop/ # ############################################################################### - """ This module, contains a method to merge Dict nodes used by the FLEUR inpgen. This might also be of interest for other all-electron codes @@ -23,8 +22,9 @@ from __future__ import print_function from aiida.plugins import DataFactory -from aiida.orm import Bool +from aiida.orm import Bool, Dict from aiida.engine import calcfunction as cf +#Dict = DataFactory('dict') def merge_parameter(Dict1, Dict2, overwrite=True): @@ -44,7 +44,7 @@ def merge_parameter(Dict1, Dict2, overwrite=True): """ from aiida.common.exceptions import InputValidationError - Dict = DataFactory('dict') + #Dict = DataFactory('dict') # layout: # check input @@ -56,11 +56,9 @@ def merge_parameter(Dict1, Dict2, overwrite=True): atoms_dict = {} atomlist = [] if not isinstance(Dict1, Dict): - raise InputValidationError("Dict1, must be of " - "type Dict") + raise InputValidationError('Dict1, must be of ' 'type Dict') if not isinstance(Dict2, Dict): - raise InputValidationError("Dict2, must be of " - "type Dict") + raise InputValidationError('Dict2, must be of ' 'type Dict') dict1 = Dict1.get_dict() dict2 = Dict2.get_dict() @@ -74,7 +72,6 @@ def merge_parameter(Dict1, Dict2, overwrite=True): val = dict2.pop(key) atomlist.append(val) - # TODO do something on atom list, # we do not want doubles, check element and Id? Keep first ones? @@ -97,7 +94,6 @@ def merge_parameter(Dict1, Dict2, overwrite=True): # be carefull with atom namelist - return Dict(dict=new_dict) @@ -105,8 +101,8 @@ def merge_parameters(DictList, overwrite=True): """ Merge together all parameter nodes in the given list. """ - Dict = DataFactory('dict') - paremeter_data_new = Dict(dict= {}) + #Dict = DataFactory('dict') + paremeter_data_new = Dict(dict={}) for i, parameter in enumerate(DictList): if isinstance(parameter, Dict): @@ -117,6 +113,7 @@ def merge_parameters(DictList, overwrite=True): return paremeter_data_new + @cf def merge_parameter_cf(Dict1, Dict2, overwrite=None): """ @@ -128,6 +125,7 @@ def merge_parameter_cf(Dict1, Dict2, overwrite=None): return paremeter_data_new + ''' # TODO how to deal with a list? *args, prob is not the best, also it is not working here. # makeing a methods m(self, *args, **kwargs) and setting some fallbacks, does not work, because self, cannot be parsed @@ -144,16 +142,17 @@ def merge_parameters_wf(*Dicts, overwrite=Bool(True)): return paremeter_data_new ''' -if __name__ == "__main__": +if __name__ == '__main__': import argparse - Dict = DataFactory('dict') + #Dict = DataFactory('dict') parser = argparse.ArgumentParser(description='Merge a Dict node.') - parser.add_argument('--para1', type=Dict, dest='para1', - help='The first Dict node', required=True) - parser.add_argument('--para2', type=Dict, dest='para2', - help='The second Dict node', required=True) - parser.add_argument('--overwrite', type=bool, dest='overwrite', - help='Shall values given in Dict2 overwrite the values from the first Dict?', required=False) + parser.add_argument('--para1', type=Dict, dest='para1', help='The first Dict node', required=True) + parser.add_argument('--para2', type=Dict, dest='para2', help='The second Dict node', required=True) + parser.add_argument('--overwrite', + type=bool, + dest='overwrite', + help='Shall values given in Dict2 overwrite the values from the first Dict?', + required=False) args = parser.parse_args() merge_parameter(Dict1=args.para1, Dict2=args.para1, overwrite=args.overwrite) diff --git a/aiida_fleur/tools/plot/fleur.py b/aiida_fleur/tools/plot/fleur.py index 7181ec6cc..3b9cd8d52 100644 --- a/aiida_fleur/tools/plot/fleur.py +++ b/aiida_fleur/tools/plot/fleur.py @@ -9,24 +9,20 @@ # For further information please visit http://www.flapw.de or # # http://aiida-fleur.readthedocs.io/en/develop/ # ############################################################################### - """ -In this module are plot routines collected to create default plots out of certain -AiiDA output nodes from certain workflows with matplot lib. - -Comment: This makes plot_methods shorter to use for a Fleur, AiiDA user. -Be aware that requirements are the aiida-fleur plugin and aiida-fleur-based -Since we have a dependence to AiiDA here, it might be better to make a separate repo, -if this evolves. +In this module is the plot_fleur method and its logic. The methods allows for the visualization on +every database node specifc to aiida-fleur. It depends on plot more general plot routines from +masci-tools which use matplotlib or bokeh as backend. """ # TODO but allow to optional parse information for saving and title, # (that user can put pks or structure formulas in there) +# INFO: AiiDAlab has implemented an extendable viewer class for data structures, +# which might be some point moved to aiida-core and extensible over entrypoints. from __future__ import absolute_import from __future__ import print_function from pprint import pprint import six -from six.moves import range import numpy as np #import matplotlib.pyplot as pp #from masci_tools.vis.plot_methods import * @@ -35,24 +31,29 @@ from aiida.orm import WorkChainNode from aiida.orm import Node - ########################### ## general plot routine ## ########################### + def plot_fleur(*args, **kwargs): """ This methods takes any amount of AiiDA node and starts the standard visualisation either as single or together visualisation. (if they are provided as list) - i.e plot_fleur(123, [124,125], uuid, save=False) + i.e plot_fleur(123, [124,125], uuid, save=False, backend='bokeh') Some general parameters of plot methods can be given as keyword arguments. - example: save: should the plots be saved automatically + reservedd keywords are: - """ + save: bool, should the plots be saved automatically + backend: str, 'bokeh' or else matplotlib + show_dict: bool, print the output dictionaries of the given nodes + returns a list of plot objects for further modification or handling + this might be used for a quick dashboard build. + """ ''' def set_plot_defaults(title_fontsize = 16, linewidth = 2.0, @@ -69,48 +70,65 @@ def set_plot_defaults(title_fontsize = 16, save = False show_dict = False + show = True + backend = 'matplotlib' for key, val in six.iteritems(kwargs): if key == 'save': - save=val + save = val if key == 'show_dict': show_dict = val + if key == 'backend': + backend = val + if key == 'show': + show = val # # the rest we ignore for know #Just call set plot defaults # TODO, or rather parse it onto plot functions...? set_plot_defaults(**kwargs) + all_plots = [] for arg in args: if isinstance(arg, list): # try plot together - plot_fleur_mn(arg, save=save) + p1 = plot_fleur_mn(arg, save=save, show=show, backend=backend) else: #print(arg) # plot alone - plot_fleur_sn(arg, show_dict=show_dict, save=save) + p1 = plot_fleur_sn(arg, show_dict=show_dict, show=show, save=save, backend=backend) + all_plots.append(p1) + return all_plots -def plot_fleur_sn(node, show_dict=False, save=False): + +def plot_fleur_sn(node, show_dict=False, save=False, show=True, backend='bokeh'): """ This methods takes any single AiiDA node and starts the standard visualisation for if it finds one """ #show_dic = show_dic ParameterData = DataFactory('dict') - if isinstance(node, int):#pk + if isinstance(node, int): #pk node = load_node(node) - if isinstance(node, (str, six.text_type)): #uuid - node = load_node(node) #try + if isinstance(node, (str, six.text_type)): #uuid + node = load_node(node) #try if isinstance(node, Node): if isinstance(node, WorkChainNode): output_list = node.get_outgoing().all() + found = False for out_link in output_list: if 'output_' in out_link.link_label: if 'wc' in out_link.link_label or 'wf' in out_link.link_label: - if 'para' in out_link.link_label:# We are just looking for parameter + if 'para' in out_link.link_label: # We are just looking for parameter #nodes, structures, bands, dos and so on we tread different - node = out_link.node# we only visualize last output node + node = out_link.node # we only visualize last output node + found = True + if not found: + print('Sorry, I do not know how to visualize this WorkChainNode {}, which contains' + ' the following outgoing links {}. Maybe it is not (yet) finished successful.' + ''.format(node, [link.link_label for link in output_list])) + return if isinstance(node, ParameterData): p_dict = node.get_dict() workflow_name = p_dict.get('workflow_name', None) @@ -122,7 +140,7 @@ def plot_fleur_sn(node, show_dict=False, save=False): if show_dict: pprint(p_dict) return - plotf(node) + p1 = plotf(node, save=save, show=show, backend=backend) else: print('I do not know how to visualize this node: {}, type {}'.format(node, type(node))) else: @@ -133,9 +151,10 @@ def plot_fleur_sn(node, show_dict=False, save=False): #if parameterData, output node check if workflow name tag # if routine known plot, #else say I do not know + return p1 -def plot_fleur_mn(nodelist, save=False): +def plot_fleur_mn(nodelist, save=False, show=True, backend='bokeh'): """ This methods takes any amount of AiiDA node as a list and starts the standard visualisation for it, if it finds one. @@ -153,17 +172,16 @@ def plot_fleur_mn(nodelist, save=False): ParameterData = DataFactory('dict') if not isinstance(nodelist, list): - print(('The nodelist provided: {}, type {} is not a list. ' - 'I abort'.format(nodelist, type(nodelist)))) + print(('The nodelist provided: {}, type {} is not a list. ' 'I abort'.format(nodelist, type(nodelist)))) return None node_labels = [] for node in nodelist: # first find out what we have then how to visualize - if isinstance(node, int):#pk + if isinstance(node, int): #pk node = load_node(node) - if isinstance(node, (str, six.text_type)): #uuid - node = load_node(node) #try + if isinstance(node, (str, six.text_type)): #uuid + node = load_node(node) #try if isinstance(node, Node): node_labels.append(node.label) @@ -172,9 +190,9 @@ def plot_fleur_mn(nodelist, save=False): for out_link in output_list: if 'output_' in out_link.link_label: if 'wc' in out_link.link_label or 'wf' in out_link.link_label: - if 'para' in out_link.link_label:# We are just looking for parameter + if 'para' in out_link.link_label: # We are just looking for parameter #nodes, structures, bands, dos and so on we tread different - node = out_link.node# we only visualize last output node + node = out_link.node # we only visualize last output node if isinstance(node, ParameterData): p_dict = node.get_dict() workflow_name = p_dict.get('workflow_name', None) @@ -183,33 +201,39 @@ def plot_fleur_mn(nodelist, save=False): all_nodes[workflow_name] = cur_list else: print(('I do not know how to visualize this node: {}, ' - 'type {} from the nodelist {}'.format(node, type(node), nodelist))) + 'type {} from the nodelist length {}'.format(node, type(node), len(nodelist)))) else: - print(('The node provided: {} of type {} in the nodelist {}' - ' is not an AiiDA object'.format(node, type(node), nodelist))) + print(('The node provided: {} of type {} in the nodelist length {}' + ' is not an AiiDA object'.format(node, type(node), len(nodelist)))) #print(all_nodes) - for node_key, nodelist in six.iteritems(all_nodes): + all_plot_res = [] + for node_key, nodelist1 in six.iteritems(all_nodes): try: plotf = FUNCTIONS_DICT[node_key] except KeyError: print(('Sorry, I do not know how to visualize' - ' these nodes (multiplot): {} {}'.format(node_key, nodelist))) + ' these nodes (multiplot): {} {}'.format(node_key, nodelist1))) continue - plot_res = plotf(nodelist, labels=node_labels) - + plot_res = plotf(nodelist1, labels=node_labels, save=save, show=show, backend=backend) + all_plot_res.append(plot_res) + return all_plot_res ########################### ## general plot routine ## ########################### -def plot_fleur_scf_wc(nodes, labels=None): + +def plot_fleur_scf_wc(nodes, labels=None, save=False, show=True, backend='bokeh'): """ This methods takes an AiiDA output parameter node or a list from a scf workchain and plots number of iteration over distance and total energy """ - from masci_tools.vis.plot_methods import plot_convergence_results_m + if backend == 'bokeh': + from masci_tools.vis.bokeh_plots import plot_convergence_results_m + else: + from masci_tools.vis.plot_methods import plot_convergence_results_m if labels is None: labels = [] @@ -221,35 +245,66 @@ def plot_fleur_scf_wc(nodes, labels=None): else: nodes = [nodes[0]] else: - nodes = [nodes]#[0]] + nodes = [nodes] #[0]] #scf_wf = load_node(6513) iterations = [] distance_all_n = [] total_energy_n = [] modes = [] + nodes_pk = [] for node in nodes: iteration = [] output_d = node.get_dict() total_energy = output_d.get('total_energy_all') + if not total_energy: + print('No total energy data found, skip this node: {}'.format(node)) + continue distance_all = output_d.get('distance_charge_all') iteration_total = output_d.get('iterations_total') + if not distance_all: + print('No distance_charge_all data found, skip this node: {}'.format(node)) + continue + if not iteration_total: + print('No iteration_total data found, skip this node: {}'.format(node)) + continue + mode = output_d.get('conv_mode') - for i in range(1, len(total_energy)+1): + nodes_pk.append(node.pk) + for i in range(1, len(total_energy) + 1): iteration.append(iteration_total - len(total_energy) + i) + + if len(distance_all) == 2 * len(total_energy): # not sure if this is best solution + # magnetic calculation, we plot only spin 1 for now. + distance_all = [distance_all[j] for j in range(0, len(distance_all), 2)] + iterations.append(iteration) distance_all_n.append(distance_all) total_energy_n.append(total_energy) modes.append(mode) + #plot_convergence_results(distance_all, total_energy, iteration) if labels: - plot_convergence_results_m(distance_all_n, total_energy_n, iterations, - plot_labels=labels, modes=modes) + plt = plot_convergence_results_m(distance_all_n, + total_energy_n, + iterations, + plot_labels=labels, + nodes=nodes_pk, + modes=modes, + show=show) else: - plot_convergence_results_m(distance_all_n, total_energy_n, iterations, modes=modes) + plt = plot_convergence_results_m(distance_all_n, + total_energy_n, + iterations, + nodes=nodes_pk, + modes=modes, + show=show) + + return plt -def plot_fleur_dos_wc(node, labels=None): + +def plot_fleur_dos_wc(node, labels=None, save=False, show=True, **kwargs): """ This methods takes an AiiDA output parameter node from a density of states workchain and plots a simple density of states @@ -261,7 +316,7 @@ def plot_fleur_dos_wc(node, labels=None): if isinstance(node, list): if len(node) > 2: - return # TODO + return # TODO else: node = node[0] @@ -269,11 +324,15 @@ def plot_fleur_dos_wc(node, labels=None): path_to_dosfile = output_d.get('dosfile', None) print(path_to_dosfile) if path_to_dosfile: - plot_dos(path_to_dosfile, only_total=False) + plot_dos(path_to_dosfile, only_total=False, show=show) + p1 = None # FIXME masci-tools should return something else: print('Could not retrieve dos file path from output node') -def plot_fleur_eos_wc(node, labels=None): + return p1 + + +def plot_fleur_eos_wc(node, labels=None, save=False, show=True, **kwargs): """ This methods takes an AiiDA output parameter node from a density of states workchain and plots a simple density of states @@ -297,15 +356,13 @@ def plot_fleur_eos_wc(node, labels=None): total_e_norm = np.array(total_e) - total_e[0] Total_energy.append(total_e_norm) scaling.append(outpara.get('scaling')) - plotlables.append((r'gs_vol: {:.3} A^3, gs_scale {:.3}, data {}' - ''.format(volume_gs, scale_gs, i))) + plotlables.append((r'gs_vol: {:.3} A^3, gs_scale {:.3}, data {}' ''.format(volume_gs, scale_gs, i))) plotlables.append(r'fit results {}'.format(i)) - plot_lattice_constant(Total_energy, scaling, multi=True, plotlables=plotlables) - return # TODO + plot_lattice_constant(Total_energy, scaling, multi=True, plotlables=plotlables, show=show) + return # TODO else: node = node[0] - outpara = node.get_dict() Total_energy = outpara.get('total_energy') scaling = outpara.get('scaling') @@ -317,10 +374,11 @@ def plot_fleur_eos_wc(node, labels=None): #fit_y = [] #fit_y = [parabola(scale2, fit[0], fit[1], fit[2]) for scale2 in scaling] - plot_lattice_constant(Total_energy, scaling)#, fit_y) - return + p1 = plot_lattice_constant(Total_energy, scaling, show=show) #, fit_y) + return p1 + -def plot_fleur_band_wc(node, labels=None): +def plot_fleur_band_wc(node, labels=None, save=False, show=True, **kwargs): """ This methods takes an AiiDA output parameter node from a band structure workchain and plots a simple band structure @@ -332,14 +390,14 @@ def plot_fleur_band_wc(node, labels=None): if isinstance(node, list): if len(node) > 2: - return # TODO + return # TODO else: node = node[0] output_d = node.get_dict() path_to_bands_file = output_d.get('bandfile', None) print(path_to_bands_file) - kpath = output_d.get('kpath', {})#r"$\Gamma$": 0.00000, r"$H$" : 1.04590, + kpath = output_d.get('kpath', {}) #r"$\Gamma$": 0.00000, r"$H$" : 1.04590, # r"$N$" : 1.78546, r"$P$": 2.30841, r"$\Gamma1$" : 3.21419, r"$N1$" : 3.95375} ) if path_to_bands_file: @@ -347,7 +405,8 @@ def plot_fleur_band_wc(node, labels=None): else: print('Could not retrieve dos file path from output node') -def plot_fleur_relax_wc(node, labels=None): + +def plot_fleur_relax_wc(node, labels=None, save=False, show=True, **kwargs): """ This methods takes an AiiDA output parameter node from a relaxation workchain and plots some information about atom movements and forces @@ -355,11 +414,11 @@ def plot_fleur_relax_wc(node, labels=None): if labels is None: labels = [] - pass - + # TODO: implement #plot_relaxation_results -def plot_fleur_corehole_wc(nodes, labels=None): + +def plot_fleur_corehole_wc(nodes, labels=None, save=False, show=True, **kwargs): """ This methods takes AiiDA output parameter nodes from a corehole workchain and plots some information about Binding energies @@ -368,9 +427,10 @@ def plot_fleur_corehole_wc(nodes, labels=None): if labels is None: labels = [] - pass + # TODO: implement + -def plot_fleur_initial_cls_wc(nodes, labels=None): +def plot_fleur_initial_cls_wc(nodes, labels=None, save=False, show=True, **kwargs): """ This methods takes AiiDA output parameter nodes from a initial_cls workchain and plots some information about corelevel shifts. @@ -379,17 +439,21 @@ def plot_fleur_initial_cls_wc(nodes, labels=None): if labels is None: labels = [] - pass + # TODO: implement FUNCTIONS_DICT = { - 'FleurScfWorkChain' : plot_fleur_scf_wc, - 'FleurEosWorkChain' : plot_fleur_eos_wc, - 'fleur_dos_wc' : plot_fleur_dos_wc, - 'fleur_band_wc' : plot_fleur_band_wc, - #'fleur_corehole_wc' : plot_fleur_corehole_wc, - #'fleur_initial_cls_wc' : plot_fleur_initial_cls_wc - } + 'fleur_scf_wc': plot_fleur_scf_wc, #support of < 1.0 release + 'fleur_eos_wc': plot_fleur_eos_wc, #support of < 1.0 release + 'FleurScfWorkChain': plot_fleur_scf_wc, + 'FleurEosWorkChain': plot_fleur_eos_wc, + 'fleur_dos_wc': plot_fleur_dos_wc, + 'fleur_band_wc': plot_fleur_band_wc, + 'FleurBandWorkChain': plot_fleur_band_wc, + #'fleur_corehole_wc' : plot_fleur_corehole_wc, + #'fleur_initial_cls_wc' : plot_fleur_initial_cls_wc +} + def clear_dict_empty_lists(to_clear_dict): """ diff --git a/aiida_fleur/tools/queue_defaults.py b/aiida_fleur/tools/queue_defaults.py index 4b03dfe09..6cf5beaac 100644 --- a/aiida_fleur/tools/queue_defaults.py +++ b/aiida_fleur/tools/queue_defaults.py @@ -9,7 +9,6 @@ # For further information please visit http://www.flapw.de or # # http://aiida-fleur.readthedocs.io/en/develop/ # ############################################################################### - """ In this file/module, YOU, the user can specify some default resource values for queues of different computers @@ -21,6 +20,8 @@ # TODO find AiiDA solution for this from __future__ import print_function + + def queue_defaults(queue_name, computer=None): """ In this class you specify defaults methods which you can use for workflows @@ -35,31 +36,45 @@ def queue_defaults(queue_name, computer=None): queue_resources = None print(queue_name) computers = { - 'iff003': - {'th1' : {'resources' : {"num_machines": 1, "num_mpiprocs_per_machine" : 12}, - 'walltime_sec' : 30 * 60}, - 'th1_small' : {'resources' : {"num_machines": 1, "num_mpiprocs_per_machine" : 12}, - 'walltime_sec' : 20 * 60}}} + 'iff003': { + 'th1': { + 'resources': { + 'num_machines': 1, + 'num_mpiprocs_per_machine': 12 + }, + 'walltime_sec': 30 * 60 + }, + 'th1_small': { + 'resources': { + 'num_machines': 1, + 'num_mpiprocs_per_machine': 12 + }, + 'walltime_sec': 20 * 60 + } + } + } if computer: #print 'computer' c_name = computer queue = computers.get(c_name, {}).get(queue_name, {}) res = queue.get('resources', None) - wt = queue.get('walltime_sec', None) + wtime = queue.get('walltime_sec', None) else: #print 'no computer' c_name = None res = None - wt = None - for comp in computers.keys(): - queue = computers.get(comp, {}).get(queue_name, {}) - #print 'queue {}'.format(queue) + wtime = None + for comp, queues in computers.items(): + queue = queues.get(queue_name, {}) + # queues might not be unique to certain computers overall + # but this is the users responsibility + # print 'queue {}'.format(queue) if queue: res = queue.get('resources', None) - wt = queue.get('walltime_sec', None) + wtime = queue.get('walltime_sec', None) - queue_resources = {'resources' : res, 'walltime_sec' : wt} + queue_resources = {'resources': res, 'walltime_sec': wtime} #print queue_resources return queue_resources diff --git a/aiida_fleur/tools/read_cif_folder.py b/aiida_fleur/tools/read_cif_folder.py index ff0f6a5f4..6401eb8f8 100644 --- a/aiida_fleur/tools/read_cif_folder.py +++ b/aiida_fleur/tools/read_cif_folder.py @@ -9,7 +9,6 @@ # For further information please visit http://www.flapw.de or # # http://aiida-fleur.readthedocs.io/en/develop/ # ############################################################################### - """ In this module you find a method (read_cif_folder) to read in all .cif files from a folder and store the structures in the database. @@ -23,15 +22,18 @@ from __future__ import absolute_import from __future__ import print_function import os -from six.moves import range from aiida.plugins import DataFactory from aiida.engine import calcfunction as cf -def read_cif_folder(path=os.getcwd(), recursive=True, - store=False, log=False, - comments='', extras='', logfile_name='read_cif_folder_logfile'): +def read_cif_folder(path=os.getcwd(), + recursive=True, + store=False, + log=False, + comments='', + extras='', + logfile_name='read_cif_folder_logfile'): """ Method to read in cif files from a folder and its subfolders. It can convert them into AiiDA structures and store them. @@ -50,31 +52,30 @@ def read_cif_folder(path=os.getcwd(), recursive=True, cifdata = DataFactory('cif') ############ parameters for the user to set ######## - parent_cif_folder = path # folder path - store_db = store # True # store stuff in database? - write_log = log # write a logfiles on what was saved - comment = comments # comments and extras to add to the structure nodes. - extra = extras # helpfull for finding them again in the db - rek = recursive # search also in subfolders or only given folder + parent_cif_folder = path # folder path + store_db = store # True # store stuff in database? + write_log = log # write a logfiles on what was saved + comment = comments # comments and extras to add to the structure nodes. + extra = extras # helpfull for finding them again in the db + rek = recursive # search also in subfolders or only given folder ##################### filenames = [] filepaths = [] - infofilestring = ('Structure Formula, Structuredata pk, Structure Data uuid,' - ' cif-file-path, comment, extras \n') + infofilestring = ('Structure Formula, Structuredata pk, Structure Data uuid, cif-file-path, comment, extras \n') #1. get all the files if rek: for root, dirs, files in os.walk(parent_cif_folder): for file1 in files: - if file1.endswith(".cif"): + if file1.endswith('.cif'): filenames.append(file1) filepath = os.path.join(root, file1) filepaths.append(filepath) else: dir_list = os.listdir(parent_cif_folder) for filename in dir_list: - if filename.endswith(".cif"): + if filename.endswith('.cif'): filenames.append(filename) filepath = os.path.join(parent_cif_folder, filename) filepaths.append(filepath) @@ -92,7 +93,7 @@ def read_cif_folder(path=os.getcwd(), recursive=True, for i in range(nfiles): try: new_cif = cifdata.get_or_create(filepaths[i], store_cif=True) - except Exception as emessage: + except (ValueError, AttributeError, ImportError) as emessage: print(('invalid cif file: {}, the error message was {} '.format(filepaths[i], emessage))) continue #print new_cif @@ -115,7 +116,7 @@ def read_cif_folder(path=os.getcwd(), recursive=True, # add comment or extras, only possible after storing if comment: - user = struc.user # we are the creator + user = struc.user # we are the creator struc.add_comment(comment, user) if extra: if isinstance(extra, type(dict())): @@ -135,8 +136,7 @@ def read_cif_folder(path=os.getcwd(), recursive=True, # TODO? if not stored write not stored if store_db: infofilestring = infofilestring + '{} {} {} {} {} {} \n'.format( - formula, struc.pk, struc.uuid, - filepaths[i], struc.get_comments(), struc.extras) + formula, struc.pk, struc.uuid, filepaths[i], struc.get_comments(), struc.extras) else: infofilestring = (infofilestring + '{} notstored notstored {}' 'notstored notstored \n' @@ -144,7 +144,7 @@ def read_cif_folder(path=os.getcwd(), recursive=True, # write a logfile if write_log: - file1 = os.open(logfile_name, os.O_RDWR|os.O_CREAT) + file1 = os.open(logfile_name, os.O_RDWR | os.O_CREAT) os.write(file1, bytes(infofilestring, 'UTF8')) os.close(file1) print('{} cif-files and {} structures were saved in the database'.format(saved_count_cif, saved_count)) @@ -158,50 +158,57 @@ def wf_struc_from_cif(cif): struc = DataFactory('structure')(ase=asecell) return struc + def struc_from_cif(cif): asecell = cif.get_ase() struc = DataFactory('structure')(ase=asecell) return struc -if __name__ == "__main__": + +if __name__ == '__main__': import argparse import json # maybe change names? parser = argparse.ArgumentParser(description="Read '.cif' files from the current" - " folder and store in AiiDA database. If no" - " arguements are given, read_cif_folder is" - " using default arguments") - - parser.add_argument('-p', metavar='path', type=str, required=False, + ' folder and store in AiiDA database. If no' + ' arguements are given, read_cif_folder is' + ' using default arguments') + + parser.add_argument('-p', + metavar='path', + type=str, + required=False, action='store', help='specify path as string, if not current folder') - parser.add_argument('-r', required=False, + parser.add_argument('-r', + required=False, action='store_true', help='if given, search also in subfolders for .cif files. (os.walk subfolders') - parser.add_argument('-s', required=False, - action='store_true', - help='if given, store all structures in database.') + parser.add_argument('-s', required=False, action='store_true', help='if given, store all structures in database.') - parser.add_argument('-l', required=False, - action='store_true', - help='if given, write a logfile') + parser.add_argument('-l', required=False, action='store_true', help='if given, write a logfile') - parser.add_argument('-c', metavar='comments', type=str, required=False, default='', + parser.add_argument('-c', + metavar='comments', + type=str, + required=False, + default='', action='store', help='string, add a comment to the node(s) if stored. ' - 'exp: -c crystal data for my project') + 'exp: -c crystal data for my project') - parser.add_argument('-e', metavar='extras', required=False, type=json.loads, + parser.add_argument('-e', + metavar='extras', + required=False, + type=json.loads, action='store', help='string, or dictionary to add to the node(s) extras' - ' if stored. exp: -e {"project" : "myproject", "type" : "simple metal"}') + ' if stored. exp: -e {"project" : "myproject", "type" : "simple metal"}') args = parser.parse_args() if args.p: - read_cif_folder(path=args.p, recursive=args.r, store=args.s, log=args.l, - comments=args.c, extras=args.e) + read_cif_folder(path=args.p, recursive=args.r, store=args.s, log=args.l, comments=args.c, extras=args.e) else: - read_cif_folder(recursive=args.r, store=args.s, log=args.l, - comments=args.c, extras=args.e) + read_cif_folder(recursive=args.r, store=args.s, log=args.l, comments=args.c, extras=args.e) diff --git a/aiida_fleur/tools/xml_util.py b/aiida_fleur/tools/xml_util.py index ec9b055d8..67b6f0427 100644 --- a/aiida_fleur/tools/xml_util.py +++ b/aiida_fleur/tools/xml_util.py @@ -9,7 +9,6 @@ # For further information please visit http://www.flapw.de or # # http://aiida-fleur.readthedocs.io/en/develop/ # ############################################################################### - """ In this module contains useful methods for handling xml trees and files which are used by the Fleur code and the fleur plugin. @@ -23,7 +22,6 @@ from __future__ import print_function from lxml import etree import six -from six.moves import range from aiida.common.exceptions import InputValidationError @@ -34,12 +32,17 @@ def is_sequence(arg): """ if isinstance(arg, str): return False - return (not hasattr(arg, "strip") and - hasattr(arg, "__getitem__") or - hasattr(arg, "__iter__")) + elif hasattr(arg, '__iter__'): + return True + elif not hasattr(arg, 'strip') and hasattr(arg, '__getitem__'): + return True + else: + return False + ##### CONVERTERS ############ + def convert_to_float(value_string, parser_info_out=None, suc_return=True): """ Tries to make a float out of a string. If it can't it logs a warning @@ -54,16 +57,14 @@ def convert_to_float(value_string, parser_info_out=None, suc_return=True): try: value = float(value_string) except TypeError: - parser_info_out['parser_warnings'].append('Could not convert: "{}" to float, TypeError' - ''.format(value_string)) + parser_info_out['parser_warnings'].append('Could not convert: "{}" to float, TypeError' ''.format(value_string)) if suc_return: return value_string, False else: return value_string except ValueError: - parser_info_out['parser_warnings'].append( - 'Could not convert: "{}" to float, ValueError' - ''.format(value_string)) + parser_info_out['parser_warnings'].append('Could not convert: "{}" to float, ValueError' + ''.format(value_string)) if suc_return: return value_string, False else: @@ -88,17 +89,13 @@ def convert_to_int(value_string, parser_info_out=None, suc_return=True): try: value = int(value_string) except TypeError: - parser_info_out['parser_warnings'].append( - 'Could not convert: "{}" to int, TypeError' - ''.format(value_string)) + parser_info_out['parser_warnings'].append('Could not convert: "{}" to int, TypeError' ''.format(value_string)) if suc_return: return value_string, False else: return value_string except ValueError: - parser_info_out['parser_warnings'].append( - 'Could not convert: "{}" to int, ValueError' - ''.format(value_string)) + parser_info_out['parser_warnings'].append('Could not convert: "{}" to int, ValueError' ''.format(value_string)) if suc_return: return value_string, False else: @@ -155,14 +152,12 @@ def convert_from_fortran_bool(stringbool): if stringbool in true_items: return True else: - raise InputValidationError( - "A string: {} for a boolean was given, which is not 'True'," - " 'False', 't', 'T', 'F' or 'f'".format(stringbool)) + raise InputValidationError("A string: {} for a boolean was given, which is not 'True'," + " 'False', 't', 'T', 'F' or 'f'".format(stringbool)) elif isinstance(stringbool, bool): return stringbool # no convertion needed... else: - raise TypeError("convert_to_fortran_bool accepts only a string or " - "bool as argument") + raise TypeError('convert_to_fortran_bool accepts only a string or ' 'bool as argument') def convert_to_fortran_bool(boolean): @@ -182,19 +177,18 @@ def convert_to_fortran_bool(boolean): new_string = 'F' return new_string elif isinstance(boolean, str): # basestring): - if boolean == 'True' or boolean == 't' or boolean == 'T': + if boolean in ('True', 't', 'T'): new_string = 'T' return new_string - elif boolean == 'False' or boolean == 'f' or boolean == 'F': + elif boolean in ('False', 'f', 'F'): new_string = 'F' return new_string else: - raise InputValidationError( - "A string: {} for a boolean was given, which is not 'True'," - "'False', 't', 'T', 'F' or 'f'".format(boolean)) + raise InputValidationError("A string: {} for a boolean was given, which is not 'True'," + "'False', 't', 'T', 'F' or 'f'".format(boolean)) else: - raise TypeError("convert_to_fortran_bool accepts only a string or " - "bool as argument, given {} ".format(boolean)) + raise TypeError('convert_to_fortran_bool accepts only a string or ' + 'bool as argument, given {} '.format(boolean)) def convert_to_fortran_string(string): @@ -239,6 +233,7 @@ def set_dict_or_not(para_dict, key, value): para_dict[key] = value return para_dict + ####### XML SETTERS GENERAL ############## @@ -323,9 +318,7 @@ def xml_set_all_attribv(xmltree, xpathn, attributename, attribv, create=False): nodes = eval_xpath3(root, xpathn, create=create) if is_sequence(attribv): for i, node in enumerate(nodes): - if not isinstance(attribv[i], str): # type(attribv) != type(''): - attribv[i] = str(attribv[i]) - node.set(attributename, attribv[i]) + node.set(attributename, str(attribv[i])) else: if not isinstance(attribv, str): # type(attribv) != type(''): attribv = str(attribv) @@ -420,8 +413,7 @@ def create_tag(xmlnode, xpath, newelement, create=False, place_index=None, tag_o try: newelement = etree.Element(newelement) except ValueError as v: - raise ValueError('{}. If this is a species, are you sure this species exists ' - 'in your inp.xml?'.format(v)) + raise ValueError('{}. If this is a species, are you sure this species exists ' 'in your inp.xml?'.format(v)) nodes = eval_xpath3(xmlnode, xpath, create=create) if nodes: for node_1 in nodes: @@ -444,8 +436,7 @@ def create_tag(xmlnode, xpath, newelement, create=False, place_index=None, tag_o try: current = tag_order.index(name) except ValueError: - raise ValueError('Did not find existing tag name in the tag_order list' - ': {}'.format(name)) + raise ValueError('Did not find existing tag name in the tag_order list' ': {}'.format(name)) if current > prev: prev = current else: @@ -516,6 +507,9 @@ def delete_tag(xmltree, xpath): :param xpathn: a path to the tag to be deleted """ root = xmltree.getroot() + if root is None: # eval will fail in this case + return xmltree + nodes = eval_xpath3(root, xpath) if nodes: for node in nodes: @@ -636,19 +630,13 @@ def get_inpgen_para_from_xml(inpxmlfile): # &comp # attrib = get_xml_attribute( comp_dict = {} - comp_dict = set_dict_or_not(comp_dict, 'jspins', - convert_to_float(eval_xpath(root, jspins_xpath), suc_return=False)) - comp_dict = set_dict_or_not(comp_dict, 'frcor', - convert_from_fortran_bool(eval_xpath(root, frcor_xpath))) - comp_dict = set_dict_or_not(comp_dict, 'ctail', - convert_from_fortran_bool(eval_xpath(root, ctail_xpath))) + comp_dict = set_dict_or_not(comp_dict, 'jspins', convert_to_float(eval_xpath(root, jspins_xpath), suc_return=False)) + comp_dict = set_dict_or_not(comp_dict, 'frcor', convert_from_fortran_bool(eval_xpath(root, frcor_xpath))) + comp_dict = set_dict_or_not(comp_dict, 'ctail', convert_from_fortran_bool(eval_xpath(root, ctail_xpath))) comp_dict = set_dict_or_not(comp_dict, 'kcrel', eval_xpath(root, kcrel_xpath)) - comp_dict = set_dict_or_not(comp_dict, 'gmax', - convert_to_float(eval_xpath(root, gmax_xpath), suc_return=False)) - comp_dict = set_dict_or_not(comp_dict, 'gmaxxc', - convert_to_float(eval_xpath(root, gmaxxc_xpath), suc_return=False)) - comp_dict = set_dict_or_not(comp_dict, 'kmax', - convert_to_float(eval_xpath(root, kmax_xpath), suc_return=False)) + comp_dict = set_dict_or_not(comp_dict, 'gmax', convert_to_float(eval_xpath(root, gmax_xpath), suc_return=False)) + comp_dict = set_dict_or_not(comp_dict, 'gmaxxc', convert_to_float(eval_xpath(root, gmaxxc_xpath), suc_return=False)) + comp_dict = set_dict_or_not(comp_dict, 'kmax', convert_to_float(eval_xpath(root, kmax_xpath), suc_return=False)) new_parameters['comp'] = comp_dict # &atoms @@ -722,15 +710,17 @@ def get_inpgen_para_from_xml(inpxmlfile): return new_parameters + ####### XML SETTERS SPECIAL ######## + def set_species_label(fleurinp_tree_copy, at_label, attributedict, create=False): """ This method calls :func:`~aiida_fleur.tools.xml_util.set_species()` method for a certain atom specie that corresponds to an atom with a given label :param fleurinp_tree_copy: xml etree of the inp.xml - :param at_label: string, a label of the atom which specie will be changed + :param at_label: string, a label of the atom which specie will be changed. 'all' to change all the species :param attributedict: a python dict specifying what you want to change. :param create: bool, if species does not exist create it and all subtags? """ @@ -740,9 +730,12 @@ def set_species_label(fleurinp_tree_copy, at_label, attributedict, create=False) return fleurinp_tree_copy specie = '' - at_label = "{: >20}".format(at_label) + at_label = '{: >20}'.format(at_label) all_groups = eval_xpath2(fleurinp_tree_copy, '/fleurInput/atomGroups/atomGroup') + species_to_set = [] + + # set all species, where given label is present for group in all_groups: positions = eval_xpath2(group, 'filmPos') if not positions: @@ -750,9 +743,12 @@ def set_species_label(fleurinp_tree_copy, at_label, attributedict, create=False) for atom in positions: atom_label = get_xml_attribute(atom, 'label') if atom_label == at_label: - specie = get_xml_attribute(group, 'species') + species_to_set.append(get_xml_attribute(group, 'species')) - fleurinp_tree_copy = set_species(fleurinp_tree_copy, specie, attributedict, create) + species_to_set = list(set(species_to_set)) + + for specie in species_to_set: + fleurinp_tree_copy = set_species(fleurinp_tree_copy, specie, attributedict, create) return fleurinp_tree_copy @@ -791,6 +787,8 @@ def set_species(fleurinp_tree_copy, species_name, attributedict, create=False): # number, other parameters if species_name == 'all': xpath_species = '/fleurInput/atomSpecies/species' + elif species_name[:4] == 'all-': #format all- + xpath_species = '/fleurInput/atomSpecies/species[contains(@name,"{}")]'.format(species_name[4:]) else: xpath_species = '/fleurInput/atomSpecies/species[@name = "{}"]'.format(species_name) @@ -805,16 +803,9 @@ def set_species(fleurinp_tree_copy, species_name, attributedict, create=False): # can we get this out of schema file? species_seq = [ - 'mtSphere', - 'atomicCutoffs', - 'energyParameters', - 'prodBasis', - 'special', - 'force', - 'electronConfig', - 'nocoParams', - 'ldaU', - 'lo'] + 'mtSphere', 'atomicCutoffs', 'energyParameters', 'prodBasis', 'special', 'force', 'electronConfig', + 'nocoParams', 'ldaU', 'lo' + ] for key, val in six.iteritems(attributedict): if key == 'mtSphere': # always in inp.xml @@ -835,12 +826,11 @@ def set_species(fleurinp_tree_copy, species_name, attributedict, create=False): # there can be multible LO tags, so I expect either one or a list if isinstance(val, dict): - create_tag( - fleurinp_tree_copy, - xpath_species, - 'lo', - place_index=species_seq.index('lo'), - tag_order=species_seq) + create_tag(fleurinp_tree_copy, + xpath_species, + 'lo', + place_index=species_seq.index('lo'), + tag_order=species_seq) for attrib, value in six.iteritems(val): xml_set_all_attribv(fleurinp_tree_copy, xpath_lo, attrib, value, create=True) else: # I expect a list of dicts @@ -849,27 +839,25 @@ def set_species(fleurinp_tree_copy, species_name, attributedict, create=False): # ggf create more lo tags of needed los_need = len(val) # - nlonodes for j in range(0, los_need): - create_tag( - fleurinp_tree_copy, - xpath_species, - 'lo', - place_index=species_seq.index('lo'), - tag_order=species_seq) + create_tag(fleurinp_tree_copy, + xpath_species, + 'lo', + place_index=species_seq.index('lo'), + tag_order=species_seq) for i, lodict in enumerate(val): for attrib, value in six.iteritems(lodict): sets = [] - for k in range(len(eval_xpath2(fleurinp_tree_copy, xpath_species + '/lo'))//los_need): + for k in range(len(eval_xpath2(fleurinp_tree_copy, xpath_species + '/lo')) // los_need): sets.append(k * los_need + i) xml_set_attribv_occ(fleurinp_tree_copy, xpath_lo, attrib, value, occ=sets) elif key == 'electronConfig': # eval electronConfig and ggf create tag at right place. - eval_xpath3( - fleurinp_tree_copy, - xpath_electron_config, - create=True, - place_index=species_seq.index('electronConfig'), - tag_order=species_seq) + eval_xpath3(fleurinp_tree_copy, + xpath_electron_config, + create=True, + place_index=species_seq.index('electronConfig'), + tag_order=species_seq) for tag in ['coreConfig', 'valenceConfig', 'stateOccupation']: for etag, edictlist in six.iteritems(val): @@ -884,36 +872,57 @@ def set_species(fleurinp_tree_copy, species_name, attributedict, create=False): parent.remove(occ) if isinstance(edictlist, dict): for attrib, value in six.iteritems(edictlist): - xml_set_all_attribv( - fleurinp_tree_copy, xpath_core_occ, attrib, value, create=True) + xml_set_all_attribv(fleurinp_tree_copy, xpath_core_occ, attrib, value, create=True) else: # I expect a list of dicts nodes_need = len(edictlist) for j in range(0, nodes_need): - create_tag( - fleurinp_tree_copy, - xpath_electron_config, - 'stateOccupation', - create=True) + create_tag(fleurinp_tree_copy, xpath_electron_config, 'stateOccupation', create=True) for i, occdict in enumerate(edictlist): # override them one after one sets = [] - for k in range(len(eval_xpath2(fleurinp_tree_copy, xpath_core_occ))//nodes_need): + for k in range(len(eval_xpath2(fleurinp_tree_copy, xpath_core_occ)) // nodes_need): sets.append(k * nodes_need + i) for attrib, value in six.iteritems(occdict): - xml_set_attribv_occ( - fleurinp_tree_copy, xpath_core_occ, attrib, value, occ=sets) + xml_set_attribv_occ(fleurinp_tree_copy, xpath_core_occ, attrib, value, occ=sets) else: xpathconfig = xpath_electron_config + '/{}'.format(etag) - xml_set_all_text( - fleurinp_tree_copy, - xpathconfig, - edictlist, - create=create, - tag_order=['coreConfig', 'valenceConfig', 'stateOccupation']) + xml_set_all_text(fleurinp_tree_copy, + xpathconfig, + edictlist, + create=create, + tag_order=['coreConfig', 'valenceConfig', 'stateOccupation']) elif key == 'ldaU': - for attrib, value in six.iteritems(val): - xml_set_all_attribv(fleurinp_tree_copy, xpath_lda_u, attrib, value, create=True) + #Same policy as los: delete existing ldaU and add the ldaU specified + existingldaus = eval_xpath3(fleurinp_tree_copy, xpath_lda_u) + for ldau in existingldaus: + parent = ldau.getparent() + parent.remove(ldau) + + if isinstance(val, dict): + create_tag(fleurinp_tree_copy, + xpath_species, + 'ldaU', + place_index=species_seq.index('ldaU'), + tag_order=species_seq) + for attrib, value in six.iteritems(val): + xml_set_all_attribv(fleurinp_tree_copy, xpath_lda_u, attrib, value, create=True) + else: #list of dicts + + ldaus_needed = len(val) + for j in range(0, ldaus_needed): + create_tag(fleurinp_tree_copy, + xpath_species, + 'ldaU', + place_index=species_seq.index('ldaU'), + tag_order=species_seq) + for i, ldaudict in enumerate(val): + for attrib, value in six.iteritems(ldaudict): + sets = [] + for k in range(len(eval_xpath2(fleurinp_tree_copy, xpath_species + '/ldaU')) // ldaus_needed): + sets.append(k * ldaus_needed + i) + xml_set_attribv_occ(fleurinp_tree_copy, xpath_lda_u, attrib, value, occ=sets) + elif key == 'special': eval_xpath3(fleurinp_tree_copy, xpath_soc_scale, @@ -921,12 +930,7 @@ def set_species(fleurinp_tree_copy, species_name, attributedict, create=False): place_index=species_seq.index('special'), tag_order=species_seq) for attrib, value in six.iteritems(val): - xml_set_all_attribv( - fleurinp_tree_copy, - xpath_soc_scale, - attrib, - value, - create=create) + xml_set_all_attribv(fleurinp_tree_copy, xpath_soc_scale, attrib, value, create=create) else: xml_set_all_attribv(fleurinp_tree_copy, xpath_species, attrib, value) @@ -936,55 +940,71 @@ def set_species(fleurinp_tree_copy, species_name, attributedict, create=False): def shift_value_species_label(fleurinp_tree_copy, at_label, attr_name, value_given, mode='abs'): """ Shifts value of a specie by label + if at_label contains 'all' then applies to all species + + :param fleurinp_tree_copy: xml etree of the inp.xml + :param at_label: string, a label of the atom which specie will be changed. 'all' if set up all species + :param attr_name: name of the attribute to change + :param value_given: value to add or to multiply by + :param mode: 'rel' for multiplication or 'abs' for addition """ + import numpy as np specie = '' - at_label = "{: >20}".format(at_label) + if at_label != 'all': + at_label = '{: >20}'.format(at_label) all_groups = eval_xpath2(fleurinp_tree_copy, '/fleurInput/atomGroups/atomGroup') + species_to_set = [] + for group in all_groups: positions = eval_xpath2(group, 'filmPos') if not positions: positions = eval_xpath2(group, 'relPos') for atom in positions: atom_label = get_xml_attribute(atom, 'label') - if atom_label == at_label: - specie = get_xml_attribute(group, 'species') + if at_label in ['all', atom_label]: + species_to_set.append(get_xml_attribute(group, 'species')) - xpath_species = '/fleurInput/atomSpecies/species[@name = "{}"]'.format(specie) - xpath_mt = '{}/mtSphere'.format(xpath_species) - xpath_atomic_cutoffs = '{}/atomicCutoffs'.format(xpath_species) - xpath_energy_parameters = '{}/energyParameters'.format(xpath_species) - xpath_final = 'initialise' + species_to_set = list(set(species_to_set)) - if attr_name in ['radius', 'gridPoints', 'logIncrement']: - xpath_final = xpath_mt - elif attr_name in ['lmax', 'lnonsphr']: - xpath_final = xpath_atomic_cutoffs - elif attr_name in ['s', 'p', 'd', 'f']: - xpath_final = xpath_energy_parameters + for specie in species_to_set: - old_val = eval_xpath2(fleurinp_tree_copy, '/@'.join([xpath_final, attr_name])) + xpath_species = '/fleurInput/atomSpecies/species[@name = "{}"]'.format(specie) - if not old_val: - print('Can not find {} attribute in the inp.xml, skip it'.format(attr_name)) - else: - old_val = float(old_val[0]) + xpath_mt = '{}/mtSphere'.format(xpath_species) + xpath_atomic_cutoffs = '{}/atomicCutoffs'.format(xpath_species) + xpath_energy_parameters = '{}/energyParameters'.format(xpath_species) + xpath_final = 'initialise' - if mode == 'rel': - value = value_given * old_val - elif mode == 'abs': - value = value_given + old_val - else: - raise ValueError("Mode should be 'res' or 'abs' only") + if attr_name in ['radius', 'gridPoints', 'logIncrement']: + xpath_final = xpath_mt + elif attr_name in ['lmax', 'lnonsphr']: + xpath_final = xpath_atomic_cutoffs + elif attr_name in ['s', 'p', 'd', 'f']: + xpath_final = xpath_energy_parameters - if attr_name in ['radius', 'logIncrement']: - value_to_write = value - else: - if not value.is_integer(): - raise ValueError('You are trying to write a float to an integer attribute') - value_to_write = int(value) + old_val = np.array(eval_xpath2(fleurinp_tree_copy, '/@'.join([xpath_final, attr_name]))) - xml_set_first_attribv(fleurinp_tree_copy, xpath_final, attr_name,value_to_write) + if old_val.size == 0: + print('Can not find {} attribute in the inp.xml, skip it'.format(attr_name)) + else: + old_val = old_val.astype('float') + + if mode == 'rel': + value = value_given * old_val + elif mode == 'abs': + value = value_given + old_val + else: + raise ValueError("Mode should be 'res' or 'abs' only") + + if attr_name in ['radius', 'logIncrement']: + value_to_write = value + else: + if not np.all(value == value.astype('int')): + raise ValueError('You are trying to write a float to an integer attribute') + value_to_write = value.astype('int') + + xml_set_all_attribv(fleurinp_tree_copy, xpath_final, attr_name, value_to_write) return fleurinp_tree_copy @@ -993,17 +1013,33 @@ def change_atomgr_att_label(fleurinp_tree_copy, attributedict, at_label): """ This method calls :func:`~aiida_fleur.tools.xml_util.change_atomgr_att()` method for a certain atom specie that corresponds to an atom with a given label. + + :param fleurinp_tree_copy: xml etree of the inp.xml + :param at_label: string, a label of the atom which specie will be changed. 'all' to change all the species + :param attributedict: a python dict specifying what you want to change. + + :return fleurinp_tree_copy: xml etree of the new inp.xml + + **attributedict** is a python dictionary containing dictionaries that specify attributes + to be set inside the certain specie. For example, if one wants to set a beta noco parameter it + can be done via:: + + 'attributedict': {'nocoParams': [('beta', val)]} + + ``force`` and ``nocoParams`` keys are supported. + To find possible keys of the inner dictionary please refer to the FLEUR documentation flapw.de """ if at_label == 'all': - fleurinp_tree_copy = change_atomgr_att(fleurinp_tree_copy, attributedict, position=None, - species='all') + fleurinp_tree_copy = change_atomgr_att(fleurinp_tree_copy, attributedict, position=None, species='all') return fleurinp_tree_copy specie = '' - at_label = "{: >20}".format(at_label) + at_label = '{: >20}'.format(at_label) all_groups = eval_xpath2(fleurinp_tree_copy, '/fleurInput/atomGroups/atomGroup') + species_to_set = [] + for group in all_groups: positions = eval_xpath2(group, 'filmPos') if not positions: @@ -1011,13 +1047,16 @@ def change_atomgr_att_label(fleurinp_tree_copy, attributedict, at_label): for atom in positions: atom_label = get_xml_attribute(atom, 'label') if atom_label == at_label: - specie = get_xml_attribute(group, 'species') + species_to_set.append(get_xml_attribute(group, 'species')) + + species_to_set = list(set(species_to_set)) - fleurinp_tree_copy = change_atomgr_att(fleurinp_tree_copy, attributedict, position=None, - species=specie) + for specie in species_to_set: + fleurinp_tree_copy = change_atomgr_att(fleurinp_tree_copy, attributedict, position=None, species=specie) return fleurinp_tree_copy + def change_atomgr_att(fleurinp_tree_copy, attributedict, position=None, species=None): """ Method to set parameters of an atom group of the fleur inp.xml file. @@ -1069,6 +1108,7 @@ def change_atomgr_att(fleurinp_tree_copy, attributedict, position=None, species= return fleurinp_tree_copy + def set_inpchanges(fleurinp_tree_copy, change_dict): """ Makes given changes directly in the inp.xml file. Afterwards @@ -1224,6 +1264,7 @@ def set_inpchanges(fleurinp_tree_copy, change_dict): return new_tree + def shift_value(fleurinp_tree_copy, change_dict, mode='abs'): """ Shifts numertical values of some tags directly in the inp.xml file. @@ -1256,8 +1297,8 @@ def shift_value(fleurinp_tree_copy, change_dict, mode='abs'): if not old_val: print('Can not find {} attribute in the inp.xml, skip it'.format(key)) continue - else: - old_val = float(old_val[0]) + + old_val = float(old_val[0]) if mode == 'rel': value = value_given * old_val @@ -1276,6 +1317,7 @@ def shift_value(fleurinp_tree_copy, change_dict, mode='abs'): new_tree = set_inpchanges(fleurinp_tree_copy, change_to_write) return new_tree + def add_num_to_att(xmltree, xpathn, attributename, set_val, mode='abs', occ=None): """ Routine adds something to the value of an attribute in the xml file (should be a number here) @@ -1319,6 +1361,7 @@ def add_num_to_att(xmltree, xpathn, attributename, set_val, mode='abs', occ=None # something was wrong, ... return xmltree + def set_nkpts(fleurinp_tree_copy, count, gamma): """ Sets a k-point mesh directly into inp.xml @@ -1335,10 +1378,35 @@ def set_nkpts(fleurinp_tree_copy, count, gamma): #kpoint_xpath = '/fleurInput/calculationSetup/bzIntegration/kPoint*' tree = fleurinp_tree_copy - new_kpo = etree.Element( - 'kPointCount', - count="{}".format(count), - gamma="{}".format(gamma)) + new_kpo = etree.Element('kPointCount', count='{}'.format(count), gamma='{}'.format(gamma)) + new_tree = replace_tag(tree, kpointlist_xpath, new_kpo) + + return new_tree + + +def set_kpath(fleurinp_tree_copy, kpath, count, gamma): + """ + Sets a k-path directly into inp.xml + + :param fleurinp_tree_copy: a lxml tree that represents inp.xml + :param kpath: a dictionary with kpoint name as key and k point coordinate as value + :param count: number of k-points + :param gamma: a fortran-type boolean that controls if the gamma-point should be included + in the k-point mesh + + :returns new_tree: a lxml tree with applied changes + """ + + kpointlist_xpath = '/fleurInput/calculationSetup/bzIntegration/altKPointSet/kPointCount' + #kpoint_xpath = '/fleurInput/calculationSetup/bzIntegration/kPoint*' + + tree = fleurinp_tree_copy + new_kpo = etree.Element('kPointCount', count='{}'.format(count), gamma='{}'.format(gamma)) + for key in kpath: + new_k = etree.Element('specialPoint', name='{}'.format(key)) + new_k.text = '{} {} {}'.format(kpath[key][0], kpath[key][1], kpath[key][2]) + new_kpo.append(new_k) + new_tree = replace_tag(tree, kpointlist_xpath, new_kpo) return new_tree @@ -1404,22 +1472,20 @@ def eval_xpath3(node, xpath, create=False, place_index=None, tag_order=None): try: return_value = node.xpath(xpath) except etree.XPathEvalError: - message = ( - 'There was a XpathEvalError on the xpath: {} \n Either it does ' - 'not exist, or something is wrong with the expression.' - ''.format(xpath)) + message = ('There was a XpathEvalError on the xpath: {} \n Either it does ' + 'not exist, or something is wrong with the expression.' + ''.format(xpath)) raise etree.XPathEvalError(message) if return_value == []: if create: - x_pieces = [e for e in xpath.split('/') if e != ""] + x_pieces = [e for e in xpath.split('/') if e != ''] #x_pieces = xpath.split('/') xpathn = '' for piece in x_pieces[:-1]: xpathn = xpathn + '/' + piece # this is REKURSIV! since create tag calls eval_xpath3 - create_tag(node, xpathn, x_pieces[-1], create=create, - place_index=place_index, tag_order=tag_order) + create_tag(node, xpathn, x_pieces[-1], create=create, place_index=place_index, tag_order=tag_order) return_value = node.xpath(xpath) return return_value else: @@ -1445,22 +1511,19 @@ def get_xml_attribute(node, attributename, parser_info_out=None): return attrib_value else: if parser_info_out: - parser_info_out['parser_warnings'].append( - 'Tried to get attribute: "{}" from element {}.\n ' - 'I recieved "{}", maybe the attribute does not exist' - ''.format(attributename, node, attrib_value)) + parser_info_out['parser_warnings'].append('Tried to get attribute: "{}" from element {}.\n ' + 'I recieved "{}", maybe the attribute does not exist' + ''.format(attributename, node, attrib_value)) else: - print(( - 'Can not get attributename: "{}" from node "{}", ' - 'because node is not an element of etree.' - ''.format(attributename, node))) + print(('Can not get attributename: "{}" from node "{}", ' + 'because node is not an element of etree.' + ''.format(attributename, node))) return None else: # something doesn't work here, some nodes get through here if parser_info_out: - parser_info_out['parser_warnings'].append( - 'Can not get attributename: "{}" from node "{}", ' - 'because node is not an element of etree.' - ''.format(attributename, node)) + parser_info_out['parser_warnings'].append('Can not get attributename: "{}" from node "{}", ' + 'because node is not an element of etree.' + ''.format(attributename, node)) else: print(('Can not get attributename: "{}" from node "{}", ' 'because node is not an element of etree.' @@ -1521,9 +1584,8 @@ def write_new_fleur_xmlinp_file(inp_file_xmltree, fleur_change_dic, xmlinpstruct xpath_set = pos_xpaths[key] xml_set_text(xmltree_new, xpath_set, fleur_change_dic[key]) else: - raise InputValidationError( - "You try to set the key:'{}' to : '{}', but the key is unknown" - " to the fleur plug-in".format(key, fleur_change_dic[key])) + raise InputValidationError("You try to set the key:'{}' to : '{}', but the key is unknown" + ' to the fleur plug-in'.format(key, fleur_change_dic[key])) return xmltree_new @@ -1659,60 +1721,56 @@ def get_inpxml_file_structure(): # All attributes (allowed to change?) # switches can be 'T' ot 'F' # TODO: alphabetical sorting - all_switches_once = ( - 'dos', 'band', 'secvar', 'ctail', 'frcor', 'l_noco', - 'ctail', 'swsp', 'lflip', 'off', 'spav', 'l_soc', 'soc66', 'pot8', - 'eig66', 'gamma', 'gauss', 'tria', 'invs', 'invs2', 'zrfs', 'vchk', 'cdinf', - 'disp', 'vacdos', 'integ', 'star', 'score', 'plplot', 'slice', - 'pallst', 'form66', 'eonly', 'bmt', 'relativisticCorrections', 'l_J', 'l_f', 'l_ss') + all_switches_once = ('dos', 'band', 'secvar', 'ctail', 'frcor', 'l_noco', 'ctail', 'swsp', 'lflip', 'off', 'spav', + 'l_soc', 'soc66', 'pot8', 'eig66', 'gamma', 'gauss', 'tria', 'invs', 'invs2', 'zrfs', 'vchk', + 'cdinf', 'disp', 'vacdos', 'integ', 'star', 'score', 'plplot', 'slice', 'pallst', 'form66', + 'eonly', 'bmt', 'relativisticCorrections', 'l_J', 'l_f', 'l_ss') all_switches_several = ('calculate', 'flipSpin') - int_attributes_once = ('numbands', 'itmax', 'maxIterBroyd', 'kcrel', 'jspins', - 'gw', 'isec1', 'nx', 'ny', 'nz', 'ndir', 'layers', - 'nstars', 'nstm', 'iplot', 'numkpt', 'nnne', 'lpr', 'count', 'qfix') + int_attributes_once = ('numbands', 'itmax', 'maxIterBroyd', 'kcrel', 'jspins', 'gw', 'isec1', 'nx', 'ny', 'nz', + 'ndir', 'layers', 'nstars', 'nstm', 'iplot', 'numkpt', 'nnne', 'lpr', 'count', 'qfix') - float_attributes_once = ('Kmax', 'Gmax', 'GmaxXC', 'alpha', 'spinf', 'minDistance', 'theta', - 'phi', 'epsdisp', 'epsforce', - 'valenceElectrons', 'fermiSmearingEnergy', 'ellow', - 'elup', 'scale', 'dTilda', 'dVac', 'minEnergy', - 'maxEnergy', 'sigma', 'locx1', 'locy1', 'locx2', - 'locy2', 'tworkf', 'minEigenval', 'maxEigenval', - 'forcealpha', 'force_converged') + float_attributes_once = ('Kmax', 'Gmax', 'GmaxXC', 'alpha', 'spinf', 'minDistance', 'theta', 'phi', 'epsdisp', + 'epsforce', 'valenceElectrons', 'fermiSmearingEnergy', 'ellow', 'elup', 'scale', 'dTilda', + 'dVac', 'minEnergy', 'maxEnergy', 'sigma', 'locx1', 'locy1', 'locx2', 'locy2', 'tworkf', + 'minEigenval', 'maxEigenval', 'forcealpha', 'force_converged') - string_attributes_once = ('imix', 'mode', 'filename', 'latnam', 'spgrp', - 'xcFunctional', 'fleurInputVersion', 'species', 'forcemix') + string_attributes_once = ('imix', 'mode', 'filename', 'latnam', 'spgrp', 'xcFunctional', 'fleurInputVersion', + 'species', 'forcemix') other_attributes_once = tuple( - list(int_attributes_once) + - list(float_attributes_once) + - list(string_attributes_once)) - other_attributes_once1 = ( - 'isec1', 'Kmax', 'Gmax', 'GmaxXC', 'numbands', 'itmax', 'maxIterBroyd', - 'imix', 'alpha', 'spinf', 'minDistance', - 'kcrel', 'jspins', 'theta', 'phi', 'gw', 'lpr', - 'epsdisp', 'epsforce', 'valenceElectrons', 'mode', - 'gauss', 'fermiSmearingEnergy', 'nx', 'ny', 'nz', 'ellow', 'elup', - 'filename', 'scale', 'dTilda', 'dVac', 'ndir', 'minEnergy', 'maxEnergy', - 'sigma', 'layers', 'nstars', 'locx1', 'locy1', 'locx2', 'locy2', 'nstm', - 'tworkf', 'numkpt', 'minEigenval', 'maxEigenval', 'nnne') - - int_attributes_several = ('atomicNumber', 'gridPoints', 'lmax', 'lnonsphr', - 's', 'p', 'd', 'f', 'l', 'n', 'eDeriv', 'coreStates') + list(int_attributes_once) + list(float_attributes_once) + list(string_attributes_once)) + other_attributes_once1 = ('isec1', 'Kmax', 'Gmax', 'GmaxXC', 'numbands', 'itmax', 'maxIterBroyd', 'imix', 'alpha', + 'spinf', 'minDistance', 'kcrel', 'jspins', 'theta', 'phi', 'gw', 'lpr', 'epsdisp', + 'epsforce', 'valenceElectrons', 'mode', 'gauss', 'fermiSmearingEnergy', 'nx', 'ny', 'nz', + 'ellow', 'elup', 'filename', 'scale', 'dTilda', 'dVac', 'ndir', 'minEnergy', 'maxEnergy', + 'sigma', 'layers', 'nstars', 'locx1', 'locy1', 'locx2', 'locy2', 'nstm', 'tworkf', + 'numkpt', 'minEigenval', 'maxEigenval', 'nnne') + + int_attributes_several = ('atomicNumber', 'gridPoints', 'lmax', 'lnonsphr', 's', 'p', 'd', 'f', 'l', 'n', 'eDeriv', + 'coreStates') float_attributes_several = ('value', 'magMom', 'radius', 'logIncrement') string_attributes_several = ('name', 'element', 'coreStates', 'type', 'relaxXYZ') - other_attributes_several = ( - 'name', 'value', 'element', 'atomicNumber', 'coreStates', 'magMom', - 'radius', 'gridPoints', 'logIncrement', 'lmax', 'lnonsphr', 's', 'p', - 'd', 'f', 'species', 'type', 'coreStates', 'l', 'n', 'eDeriv', 'relaxXYZ') + other_attributes_several = ('name', 'value', 'element', 'atomicNumber', 'coreStates', 'magMom', 'radius', + 'gridPoints', 'logIncrement', 'lmax', 'lnonsphr', 's', 'p', 'd', 'f', 'species', 'type', + 'coreStates', 'l', 'n', 'eDeriv', 'relaxXYZ') # when parsing the xml file to a dict, these tags should become # list(sets, or tuples) instead of dictionaries. - tags_several = ('atomGroup', 'relPos', 'absPos', 'filmPos', - 'species', 'kPoint', 'lo', 'stateOccupation') - - all_text = {'comment': 1, 'relPos': 3, 'filmPos': 3, 'absPos': 3, - 'row-1': 3, 'row-2': 3, 'row-3': 3, 'a1': 1, 'qss': 3} + tags_several = ('atomGroup', 'relPos', 'absPos', 'filmPos', 'species', 'kPoint', 'lo', 'stateOccupation') + + all_text = { + 'comment': 1, + 'relPos': 3, + 'filmPos': 3, + 'absPos': 3, + 'row-1': 3, + 'row-2': 3, + 'row-3': 3, + 'a1': 1, + 'qss': 3 + } # TODO all these (without comment) are floats, or float tuples. # Should be converted to this in the databas # changing the Bravais matrix should rather not be allowed I guess @@ -1846,58 +1904,32 @@ def get_inpxml_file_structure(): 'relaxXYZ': '/fleurInput/atomGroups/atomGroup/force' } - all_tag_xpaths = ( - '/fleurInput/constantDefinitions', - '/fleurInput/calculationSetup', - '/fleurInput/calculationSetup/cutoffs', - '/fleurInput/calculationSetup/scfLoop', - '/fleurInput/calculationSetup/coreElectrons', - '/fleurInput/calculationSetup/magnetism', - '/fleurInput/calculationSetup/soc', - '/fleurInput/calculationSetup/expertModes', - '/fleurInput/calculationSetup/geometryOptimization', - '/fleurInput/calculationSetup/bzIntegration', - '/fleurInput/calculationSetup/kPointMesh', - '/fleurInput/cell/symmetry', - '/fleurInput/cell/bravaisMatrix', - '/fleurInput/calculationSetup/nocoParams', - '/fleurInput/xcFunctional', - '/fleurInput/xcFunctional/xcParams', - '/fleurInput/atomSpecies/species', - '/fleurInput/atomSpecies/species/mtSphere', - '/fleurInput/atomSpecies/species/atomicCutoffs', - '/fleurInput/atomSpecies/species/energyParameters', - '/fleurInput/atomSpecies/species/coreConfig', - '/fleurInput/atomSpecies/species/coreOccupation', - '/fleurInput/atomGroups/atomGroup', - '/fleurInput/atomGroups/atomGroup/relPos', - '/fleurInput/atomGroups/atomGroup/absPos', - '/fleurInput/atomGroups/atomGroup/filmPos', - '/fleurInput/output/checks', - '/fleurInput/output/densityOfStates', - '/fleurInput/output/vacuumDOS', - '/fleurInput/output/plotting', - '/fleurInput/output/chargeDensitySlicing', - '/fleurInput/output/specialOutput' - ) + all_tag_xpaths = ('/fleurInput/constantDefinitions', '/fleurInput/calculationSetup', + '/fleurInput/calculationSetup/cutoffs', '/fleurInput/calculationSetup/scfLoop', + '/fleurInput/calculationSetup/coreElectrons', '/fleurInput/calculationSetup/magnetism', + '/fleurInput/calculationSetup/soc', '/fleurInput/calculationSetup/expertModes', + '/fleurInput/calculationSetup/geometryOptimization', '/fleurInput/calculationSetup/bzIntegration', + '/fleurInput/calculationSetup/kPointMesh', '/fleurInput/cell/symmetry', + '/fleurInput/cell/bravaisMatrix', '/fleurInput/calculationSetup/nocoParams', + '/fleurInput/xcFunctional', '/fleurInput/xcFunctional/xcParams', + '/fleurInput/atomSpecies/species', '/fleurInput/atomSpecies/species/mtSphere', + '/fleurInput/atomSpecies/species/atomicCutoffs', + '/fleurInput/atomSpecies/species/energyParameters', '/fleurInput/atomSpecies/species/coreConfig', + '/fleurInput/atomSpecies/species/coreOccupation', '/fleurInput/atomGroups/atomGroup', + '/fleurInput/atomGroups/atomGroup/relPos', '/fleurInput/atomGroups/atomGroup/absPos', + '/fleurInput/atomGroups/atomGroup/filmPos', '/fleurInput/output/checks', + '/fleurInput/output/densityOfStates', '/fleurInput/output/vacuumDOS', + '/fleurInput/output/plotting', '/fleurInput/output/chargeDensitySlicing', + '/fleurInput/output/specialOutput') expertkey = 'other' - returnlist = (all_switches_once, - all_switches_several, - other_attributes_once, - int_attributes_once, - float_attributes_once, - string_attributes_once, - other_attributes_several, - int_attributes_several, - float_attributes_several, - string_attributes_several, - tags_several, - all_text, - all_attrib_xpath, + returnlist = (all_switches_once, all_switches_several, other_attributes_once, int_attributes_once, + float_attributes_once, string_attributes_once, other_attributes_several, int_attributes_several, + float_attributes_several, string_attributes_several, tags_several, all_text, all_attrib_xpath, expertkey) return returnlist + def clear_xml(tree): """ Removes comments and executes xinclude tags of an @@ -1913,6 +1945,13 @@ def clear_xml(tree): # replace XInclude parts to validate against schema cleared_tree.xinclude() + # get rid of xml:base attribute in the relaxation part + relax = eval_xpath(cleared_tree, '/fleurInput/relaxation') + if relax != []: + for attribute in relax.keys(): + if 'base' in attribute: + cleared_tree = delete_att(cleared_tree, '/fleurInput/relaxation', attribute) + # remove comments from inp.xml comments = cleared_tree.xpath('//comment()') for comment in comments: diff --git a/aiida_fleur/workflows/band.py b/aiida_fleur/workflows/band.py index 20348e052..98733db44 100644 --- a/aiida_fleur/workflows/band.py +++ b/aiida_fleur/workflows/band.py @@ -9,7 +9,6 @@ # For further information please visit http://www.flapw.de or # # http://aiida-fleur.readthedocs.io/en/develop/ # ############################################################################### - """ This is the worklfow 'band' for the Fleur code, which calculates a electron bandstructure. @@ -19,19 +18,25 @@ from __future__ import absolute_import from __future__ import print_function import os.path +import copy +import six + from aiida.plugins import DataFactory from aiida.orm import Code, StructureData, Dict, RemoteData -from aiida.engine import WorkChain, ToContext +from aiida.engine import WorkChain, ToContext, if_ +from aiida.engine import calcfunction as cf +from aiida.common.exceptions import NotExistent +from aiida.common import AttributeDict -from aiida_fleur.calculation.fleur import FleurCalculation +from aiida_fleur.workflows.scf import FleurScfWorkChain +from aiida_fleur.workflows.base_fleur import FleurBaseWorkChain from aiida_fleur.data.fleurinpmodifier import FleurinpModifier from aiida_fleur.tools.common_fleur_wf import get_inputs_fleur -import six - +from aiida_fleur.tools.common_fleur_wf import test_and_get_codenode, is_code from aiida_fleur.data.fleurinp import FleurinpData -class fleur_band_wc(WorkChain): +class FleurBandWorkChain(WorkChain): ''' This workflow calculated a bandstructure from a Fleur calculation @@ -41,38 +46,55 @@ class fleur_band_wc(WorkChain): # wf_parameters: { 'tria', 'nkpts', 'sigma', 'emin', 'emax'} # defaults : tria = True, nkpts = 800, sigma=0.005, emin= , emax = - _workflowversion = "0.3.3" - - _default_options = {'resources': {"num_machines": 1}, - 'max_wallclock_seconds': 60*60, - 'queue_name': '', - 'custom_scheduler_commands' : '', - #'max_memory_kb' : None, - 'import_sys_environment' : False, - 'environment_variables' : {}} - _default_wf_para = {'kpath' : 'auto', - 'nkpts' : 800, - 'sigma' : 0.005, - 'emin' : -0.50, - 'emax' : 0.90} + _workflowversion = '0.3.4' + + _default_options = { + 'resources': { + 'num_machines': 1, + 'num_mpiprocs_per_machine': 1 + }, + 'max_wallclock_seconds': 60 * 60, + 'queue_name': '', + 'custom_scheduler_commands': '', + 'import_sys_environment': False, + 'environment_variables': {} + } + _wf_default = { + 'fleur_runmax': 4, + 'kpath': 'auto', + # 'nkpts' : 800, + 'sigma': 0.005, + 'emin': -0.50, + 'emax': 0.90 + } @classmethod def define(cls, spec): - super(fleur_band_wc, cls).define(spec) - spec.input("wf_parameters", valid_type=Dict, required=False, - default=Dict(dict=cls._default_wf_para)) - spec.input("options", valid_type=Dict, required=False, - default=Dict(dict=cls._default_wf_para)) - spec.input("remote_data", valid_type=RemoteData, required=True)#TODO ggf run convergence first - spec.input("fleurinp", valid_type=FleurinpData, required=True) - spec.input("fleur", valid_type=Code, required=True) + super(FleurBandWorkChain, cls).define(spec) + # spec.expose_inputs(FleurScfWorkChain, namespace='scf') + spec.input('wf_parameters', valid_type=Dict, required=False) + spec.input('fleur', valid_type=Code, required=True) + spec.input('remote', valid_type=RemoteData, required=False) + spec.input('fleurinp', valid_type=FleurinpData, required=False) + spec.input('options', valid_type=Dict, required=False) + spec.outline( cls.start, - cls.create_new_fleurinp, - cls.run_fleur, - cls.return_results - ) - + if_(cls.scf_needed)( + cls.converge_scf, + cls.create_new_fleurinp, + cls.run_fleur, + ).else_( + cls.create_new_fleurinp, + cls.run_fleur, + ), cls.return_results) + + spec.output('output_band_wc_para', valid_type=Dict) + + spec.exit_code(233, + 'ERROR_INVALID_CODE_PROVIDED', + message='Invalid code node specified, check inpgen and fleur code nodes.') + spec.exit_code(231, 'ERROR_INVALID_INPUT_CONFIG', message='Invalid input configuration.') def start(self): ''' @@ -83,36 +105,73 @@ def start(self): # check if fleuinp corresponds to fleur_calc self.report('started bands workflow version {}'.format(self._workflowversion)) #print("Workchain node identifiers: ")#'{}' - #"".format(ProcessRegistry().current_calc_node)) + #"".format(ProcessRegistry().current_calc_node)) - self.ctx.fleurinp1 = "" + self.ctx.fleurinp_band = '' self.ctx.last_calc = None self.ctx.successful = False + self.ctx.info = [] self.ctx.warnings = [] + self.ctx.errors = [] + self.ctx.calcs = [] inputs = self.inputs - wf_dict = inputs.wf_parameters.get_dict() + wf_default = copy.deepcopy(self._wf_default) + if 'wf_parameters' in inputs: + wf_dict = inputs.wf_parameters.get_dict() + else: + wf_dict = wf_default + for key, val in six.iteritems(wf_default): + wf_dict[key] = wf_dict.get(key, val) + self.ctx.wf_dict = wf_dict # if MPI in code name, execute parallel - self.ctx.serial = wf_dict.get('serial', False) - - # set values, or defaults - self.ctx.max_number_runs = wf_dict.get('fleur_runmax', 4) - #self.ctx.resources = wf_dict.get('resources', {"num_machines": 1}) - #self.ctx.walltime_sec = wf_dict.get('walltime_sec', 10*30) - #self.ctx.queue = wf_dict.get('queue_name', None) + self.ctx.serial = self.ctx.wf_dict.get('serial', False) + defaultoptions = self._default_options if 'options' in inputs: - self.ctx.options = inputs.options.get_dict() + options = inputs.options.get_dict() + else: + options = defaultoptions + + # extend options given by user using defaults + for key, val in six.iteritems(defaultoptions): + options[key] = options.get(key, val) + self.ctx.options = options + + # set values, or defaults + self.ctx.max_number_runs = self.ctx.wf_dict.get('fleur_runmax', 4) + + # Check if user gave valid fleur executable + # if 'fleur' in inputs.scf: + # try: + # test_and_get_codenode(inputs.scf.fleur, 'fleur.fleur', use_exceptions=True) + # except ValueError: + # error = ("The code you provided for FLEUR does not use the plugin fleur.fleur") + # self.control_end_wc(error) + # return self.exit_codes.ERROR_INVALID_CODE_PROVIDED + + if 'scf' in inputs: + self.ctx.scf_needed = True + if 'remote' in inputs: + error = 'ERROR: you gave SCF input + remote for the FT' + self.control_end_wc(error) + return self.exit_codes.ERROR_INVALID_INPUT_CONFIG + elif 'remote' not in inputs: + error = 'ERROR: you gave neither SCF input nor remote for the FT' + self.control_end_wc(error) + return self.exit_codes.ERROR_INVALID_INPUT_CONFIG + else: + self.ctx.scf_needed = False def create_new_fleurinp(self): """ create a new fleurinp from the old with certain parameters """ # TODO allow change of kpoint mesh?, tria? - wf_dict = self.inputs.wf_parameters.get_dict() - nkpts = wf_dict.get('nkpts', 500) + wf_dict = self.ctx.wf_dict + # nkpts = wf_dict.get('nkpts', 500) # how can the user say he want to use the given kpoint mesh, ZZ nkpts : False/0 sigma = wf_dict.get('sigma', 0.005) emin = wf_dict.get('emin', -0.30) @@ -120,38 +179,58 @@ def create_new_fleurinp(self): fleurmode = FleurinpModifier(self.inputs.fleurinp) - #change_dict = {'band': True, 'ndir' : -1, 'minEnergy' : self.inputs.wf_parameters.get_dict().get('minEnergy', -0.30000000), - #'maxEnergy' : self.inputs.wf_parameters.get_dict().get('manEnergy','0.80000000'), - #'sigma' : self.inputs.wf_parameters.get_dict().get('sigma', '0.00500000')} - change_dict = {'band': True, 'ndir' : 0, 'minEnergy' : emin, - 'maxEnergy' : emax, 'sigma' : sigma} #'ndir' : 1, 'pot8' : True + change_dict = {'band': True, 'ndir': 0, 'minEnergy': emin, 'maxEnergy': emax, 'sigma': sigma} #'ndir' : 1, fleurmode.set_inpchanges(change_dict) - if nkpts: - fleurmode.set_nkpts(count=nkpts) - #fleurinp_new.replace_tag() + # if nkpts: + # fleurmode.set_nkpts(count=nkpts) + #fleurinp_new.replace_tag() - fleurmode.show(validate=True, display=False) # needed? + fleurmode.show(validate=True, display=False) # needed? fleurinp_new = fleurmode.freeze() - self.ctx.fleurinp1 = fleurinp_new + self.ctx.fleurinp_band = fleurinp_new + + def scf_needed(self): + """ + Returns True if SCF WC is needed. + """ + return self.ctx.scf_needed + + def converge_scf(self): + """ + Converge charge density. + """ + return 0 def run_fleur(self): """ run a FLEUR calculation """ - fleurin = self.ctx.fleurinp1 - remote = self.inputs.remote_data + self.report('INFO: run FLEUR') + # inputs = self.get_inputs_scf() + fleurin = self.ctx.fleurinp_band + remote = self.inputs.remote code = self.inputs.fleur - options = self.ctx.options + options = self.ctx.options.copy() + label = 'bansdtructure_calculation' + description = 'Bandstructure is calculated for the given structure' + inputs = get_inputs_fleur(code, remote, fleurin, options, label, description, serial=self.ctx.serial) + future = self.submit(FleurBaseWorkChain, **inputs) + self.ctx.calcs.append(future) - inputs = get_inputs_fleur(code, remote, fleurin, options, serial=self.ctx.serial) - future = self.submit(FleurCalculation, **inputs) - - return ToContext(last_calc=future) #calcs.append(future), + return ToContext(last_calc=future) + def get_inputs_scf(self): + """ + Initialize inputs for scf workflow: + wf_param, options, calculation parameters, codes, structure + """ + input_scf = AttributeDict(self.exposed_inputs(FleurScfWorkChain, namespace='scf')) + input_scf.fleurinp = self.ctx.fleurinp_band + return input_scf def return_results(self): ''' @@ -160,53 +239,108 @@ def return_results(self): # TODO more here self.report('Band workflow Done') self.report('A bandstructure was calculated for fleurinpdata {} and is found under pk={}, ' - 'calculation {}'.format(self.inputs.fleurinp, self.ctx.last_calc.pk, self.ctx.last_calc)) + 'calculation {}'.format(self.inputs.fleurinp, self.ctx.last_calc.pk, self.ctx.last_calc)) + + from aiida_fleur.tools.common_fleur_wf import find_last_submitted_calcjob + if self.ctx.last_calc: + try: + last_calc_uuid = find_last_submitted_calcjob(self.ctx.last_calc) + except NotExistent: + last_calc_uuid = None + else: + last_calc_uuid = None + + try: # if something failed, we still might be able to retrieve something + last_calc_out = self.ctx.last_calc.outputs.output_parameters + retrieved = self.ctx.last_calc.outputs.retrieved + last_calc_out_dict = last_calc_out.get_dict() + except (NotExistent, AttributeError): + last_calc_out = None + last_calc_out_dict = {} + retrieved = None #check if band file exists: if not succesful = False #TODO be careful with general bands.X - - bandfilename = 'bands.1' # ['bands.1', 'bands.2', ...] - # TODO this should be easier... - last_calc_retrieved = self.ctx.last_calc.get_outputs_dict()['retrieved'].folder.get_subfolder('path').get_abs_path('') - bandfilepath = self.ctx.last_calc.get_outputs_dict()['retrieved'].folder.get_subfolder('path').get_abs_path(bandfilename) - print(bandfilepath) - #bandfilepath = "path to bandfile" # Array? - if os.path.isfile(bandfilepath): - self.ctx.successful = True - else: - bandfilepath = None - self.report('!NO bandstructure file was found, something went wrong!') - #TODO corret efermi: - # get efermi from last calculation - efermi1 = self.inputs.remote_data.get_inputs()[-1].res.fermi_energy - #get efermi from this caclulation - efermi2 = self.ctx.last_calc.res.fermi_energy - diff_efermi = efermi1 - efermi2 - # store difference in output node - # adjust difference in band.gnu - #filename = 'gnutest2' + # bandfilename = 'bands.1' # ['bands.1', 'bands.2', ...] + + # last_calc_retrieved = self.ctx.last_calc.get_outputs_dict()['retrieved'].folder.get_subfolder('path').get_abs_path('') + # bandfilepath = self.ctx.last_calc.get_outputs_dict()['retrieved'].folder.get_subfolder('path').get_abs_path(bandfilename) + # print(bandfilepath) + # #bandfilepath = "path to bandfile" # Array? + # if os.path.isfile(bandfilepath): + # self.ctx.successful = True + # else: + # bandfilepath = None + # self.report('!NO bandstructure file was found, something went wrong!') + + # #TODO corret efermi: + # # get efermi from last calculation + scf_results = self.inputs.remote_data.get_incoming().all()[-1].node.res + efermi_scf = scf_results.fermi_energy + bandgap_scf = scf_results.bandgap + # efermi_band = last_calc_out_dict['fermi_energy'] + # bandgap_band = last_calc_out_dict['bandgap'] + + # diff_efermi = efermi_scf - efermi_band + # diff_bandgap = bandgap_scf - bandgap_band outputnode_dict = {} outputnode_dict['workflow_name'] = self.__class__.__name__ outputnode_dict['Warnings'] = self.ctx.warnings outputnode_dict['successful'] = self.ctx.successful - outputnode_dict['diff_efermi'] = diff_efermi - #outputnode_dict['last_calc_pk'] = self.ctx.last_calc.pk - #outputnode_dict['last_calc_uuid'] = self.ctx.last_calc.uuid - outputnode_dict['bandfile'] = bandfilepath - outputnode_dict['last_calc_uuid'] = self.ctx.last_calc.uuid - outputnode_dict['last_calc_retrieved'] = last_calc_retrieved - #print outputnode_dict - outputnode = Dict(dict=outputnode_dict) - outdict = {} + # outputnode_dict['last_calc_uuid'] = last_calc_uuid + # outputnode_dict['last_calc_pk'] = self.ctx.last_calc.pk + # outputnode_dict['remote_dir'] = self.ctx.last_calc.get_remote_workdir() + # outputnode_dict['fermi_energy_band'] = efermi_band + # outputnode_dict['bandgap_band'] = bandgap_band + outputnode_dict['fermi_energy_scf'] = efermi_scf + outputnode_dict['bandgap_scf'] = bandgap_scf + # outputnode_dict['diff_efermi'] = diff_efermi + # outputnode_dict['diff_bandgap'] = diff_bandgap + + # outputnode_dict['diff_efermi'] = diff_efermi + # outputnode_dict['bandfile'] = bandfilepath + + outputnode_t = Dict(dict=outputnode_dict) + if last_calc_out: + outdict = create_band_result_node(outpara=outputnode_t, + last_calc_out=last_calc_out, + last_calc_retrieved=retrieved) + else: + outdict = create_band_result_node(outpara=outputnode_t) + #TODO parse Bandstructure - #bandstructurenode = '' - #outdict['output_band'] = bandstructurenode - #or if spin =2 - #outdict['output_band1'] = bandstructurenode1 - #outdict['output_band2'] = bandstructurenode1 - outdict['output_band_wc_para'] = outputnode - #print outdict - for key, val in six.iteritems(outdict): - self.out(key, val) + for link_name, node in six.iteritems(outdict): + self.out(link_name, node) + + def control_end_wc(self, errormsg): + """ + Controlled way to shutdown the workchain. will initialize the output nodes + The shutdown of the workchain will has to be done afterwards + """ + self.report(errormsg) # because return_results still fails somewhen + self.ctx.errors.append(errormsg) + self.return_results() + + +@cf +def create_band_result_node(**kwargs): + """ + This is a pseudo wf, to create the right graph structure of AiiDA. + This wokfunction will create the output node in the database. + It also connects the output_node to all nodes the information commes from. + So far it is just also parsed in as argument, because so far we are to lazy + to put most of the code overworked from return_results in here. + """ + for key, val in six.iteritems(kwargs): + if key == 'outpara': # should be always there + outpara = val + outdict = {} + outputnode = outpara.clone() + outputnode.label = 'output_band_wc_para' + outputnode.description = ('Contains band calculation results') + + outdict['output_band_wc_para'] = outputnode + + return outdict diff --git a/aiida_fleur/workflows/band2.py.legacy b/aiida_fleur/workflows/band2.py.legacy index ed4cb1468..b50d92b51 100644 --- a/aiida_fleur/workflows/band2.py.legacy +++ b/aiida_fleur/workflows/band2.py.legacy @@ -268,4 +268,3 @@ def seekpath_structure(structure): } return result - diff --git a/aiida_fleur/workflows/banddos.py b/aiida_fleur/workflows/banddos.py new file mode 100644 index 000000000..50189f727 --- /dev/null +++ b/aiida_fleur/workflows/banddos.py @@ -0,0 +1,368 @@ +# -*- coding: utf-8 -*- +############################################################################### +# Copyright (c), Forschungszentrum Jülich GmbH, IAS-1/PGI-1, Germany. # +# All rights reserved. # +# This file is part of the AiiDA-FLEUR package. # +# # +# The code is hosted on GitHub at https://github.com/JuDFTteam/aiida-fleur # +# For further information on the license, see the LICENSE.txt file # +# For further information please visit http://www.flapw.de or # +# http://aiida-fleur.readthedocs.io/en/develop/ # +############################################################################### +""" +This is the worklfow 'band' for the Fleur code, which calculates a +electron bandstructure. +""" +# TODO alow certain kpoint path, or kpoint node, so far auto +# TODO alternative parse a structure and run scf +from __future__ import absolute_import +from __future__ import print_function +import os.path +import copy +import six + +from aiida.plugins import DataFactory +from aiida.orm import Code, StructureData, Dict, RemoteData +from aiida.orm import load_node, CalcJobNode +from aiida.engine import WorkChain, ToContext, if_ +from aiida.engine import calcfunction as cf +from aiida.common.exceptions import NotExistent +from aiida.common import AttributeDict + +from aiida_fleur.workflows.scf import FleurScfWorkChain +from aiida_fleur.workflows.base_fleur import FleurBaseWorkChain +from aiida_fleur.data.fleurinpmodifier import FleurinpModifier +from aiida_fleur.tools.common_fleur_wf import get_inputs_fleur +from aiida_fleur.tools.common_fleur_wf import test_and_get_codenode, is_code +from aiida_fleur.data.fleurinp import FleurinpData + + +class FleurBandDosWorkChain(WorkChain): + ''' + This workflow calculated a bandstructure from a Fleur calculation + + :Params: a Fleurcalculation node + :returns: Success, last result node, list with convergence behavior + ''' + # wf_parameters: { 'tria', 'nkpts', 'sigma', 'emin', 'emax'} + # defaults : tria = True, nkpts = 800, sigma=0.005, emin= , emax = + + _workflowversion = '0.3.5' + + _default_options = { + 'resources': { + 'num_machines': 1, + 'num_mpiprocs_per_machine': 1 + }, + 'max_wallclock_seconds': 60 * 60, + 'queue_name': '', + 'custom_scheduler_commands': '', + 'import_sys_environment': False, + 'environment_variables': {} + } + _wf_default = { + 'fleur_runmax': 4, + 'kpath': 'auto', + # 'nkpts' : 800, + 'sigma': 0.005, + 'emin': -0.50, + 'emax': 0.90 + } + + @classmethod + def define(cls, spec): + super(FleurBandDosWorkChain, cls).define(spec) + # spec.expose_inputs(FleurScfWorkChain, namespace='scf') + spec.input('wf_parameters', valid_type=Dict, required=False) + spec.input('fleur', valid_type=Code, required=True) + spec.input('remote', valid_type=RemoteData, required=True) + spec.input('fleurinp', valid_type=FleurinpData, required=False) + spec.input('options', valid_type=Dict, required=False) + + spec.outline( + cls.start, + if_(cls.scf_needed)( + cls.converge_scf, + cls.create_new_fleurinp, + cls.run_fleur, + ).else_( + cls.create_new_fleurinp, + cls.run_fleur, + ), cls.return_results) + + spec.output('output_banddos_wc_para', valid_type=Dict) + + spec.exit_code(233, + 'ERROR_INVALID_CODE_PROVIDED', + message='Invalid code node specified, check inpgen and fleur code nodes.') + spec.exit_code(231, 'ERROR_INVALID_INPUT_CONFIG', message='Invalid input configuration.') + + def start(self): + ''' + check parameters, what condictions? complete? + check input nodes + ''' + ### input check ### ? or done automaticly, how optional? + # check if fleuinp corresponds to fleur_calc + self.report('started bandsdos workflow version {}'.format(self._workflowversion)) + #print("Workchain node identifiers: ")#'{}' + #"".format(ProcessRegistry().current_calc_node)) + + self.ctx.fleurinp_scf = None + self.ctx.scf_needed = False + self.ctx.fleurinp_banddos = None + self.ctx.last_calc = None + self.ctx.successful = False + self.ctx.info = [] + self.ctx.warnings = [] + self.ctx.errors = [] + self.ctx.calcs = [] + + inputs = self.inputs + + wf_default = copy.deepcopy(self._wf_default) + if 'wf_parameters' in inputs: + wf_dict = inputs.wf_parameters.get_dict() + else: + wf_dict = wf_default + + for key, val in six.iteritems(wf_default): + wf_dict[key] = wf_dict.get(key, val) + self.ctx.wf_dict = wf_dict + # if MPI in code name, execute parallel + self.ctx.serial = self.ctx.wf_dict.get('serial', False) + + defaultoptions = self._default_options + if 'options' in inputs: + options = inputs.options.get_dict() + else: + options = defaultoptions + + # extend options given by user using defaults + for key, val in six.iteritems(defaultoptions): + options[key] = options.get(key, val) + self.ctx.options = options + + # set values, or defaults + self.ctx.max_number_runs = self.ctx.wf_dict.get('fleur_runmax', 4) + + # if 'scf' in self.inputs: + # self.ctx.scf_needed = True + # if 'remote' in self.inputs.scf: + # error = "ERROR: you gave SCF input + remote" + # self.control_end_wc(error) + # return self.exit_codes.ERROR_INVALID_INPUT_CONFIG + # if 'structure' and 'fleurinp' in self.inputs.scf: + # error = "ERROR: you gave SCF input structure and fleurinp" + # self.control_end_wc(error) + # return self.exit_codes.ERROR_INVALID_INPUT_CONFIG + # if 'structure' in self.inputs.scf: + # if 'inpgen' not in self.inputs: + # error = "ERROR: you gave SCF input structure and not inpgen" + # self.control_end_wc(error) + # return self.exit_codes.ERROR_INVALID_INPUT_CONFIG + # elif 'remote' not in self.inputs: + # error = "ERROR: you gave neither SCF input nor remote" + # self.control_end_wc(error) + # return self.exit_codes.ERROR_INVALID_INPUT_CONFIG + # else: + # self.ctx.scf_needed = False + + def create_new_fleurinp(self): + """ + create a new fleurinp from the old with certain parameters + """ + # TODO allow change of kpoint mesh?, tria? + wf_dict = self.ctx.wf_dict + + if 'fleurinp' not in self.inputs: + for i in self.inputs.remote.get_incoming(): + if isinstance(i.node, CalcJobNode): + self.ctx.fleurinp_scf = load_node(i.node.pk).get_incoming().get_node_by_label('fleurinpdata') + else: + self.ctx.fleurinp_scf = self.inputs.fleurinp + + # how can the user say he want to use the given kpoint mesh, ZZ nkpts : False/0 + fleurmode = FleurinpModifier(self.ctx.fleurinp_scf) + + nkpts = wf_dict.get('nkpts', 500) + sigma = wf_dict.get('sigma', 0.005) + emin = wf_dict.get('emin', -0.30) + emax = wf_dict.get('emax', 0.80) + + if wf_dict.get('mode') == 'dos': + change_dict = {'dos': True, 'ndir': -1, 'minEnergy': emin, 'maxEnergy': emax, 'sigma': sigma} + else: + change_dict = {'band': True, 'ndir': 0, 'minEnergy': emin, 'maxEnergy': emax, 'sigma': sigma} + + fleurmode.set_inpchanges(change_dict) + + if wf_dict.get('kpath') != 'auto': + fleurmode.set_kpath(wf_dict.get('kpath'), nkpts) + + # if nkpts: + # fleurmode.set_nkpts(count=nkpts) + #fleurinp_new.replace_tag() + + fleurmode.show(validate=True, display=False) # needed? + fleurinp_new = fleurmode.freeze() + self.ctx.fleurinp_banddos = fleurinp_new + + def scf_needed(self): + """ + Returns True if SCF WC is needed. + """ + return self.ctx.scf_needed + + def converge_scf(self): + """ + Converge charge density. + """ + # TODO: implement + return 0 + + def run_fleur(self): + """ + run a FLEUR calculation + """ + self.report('INFO: run FLEUR') + # inputs = self.get_inputs_scf() + fleurin = self.ctx.fleurinp_banddos + remote = self.inputs.remote + code = self.inputs.fleur + options = self.ctx.options.copy() + + label = 'bansddos_calculation' + description = 'Bandstructure or DOS is calculated for the given structure' + + inputs = get_inputs_fleur(code, remote, fleurin, options, label, description, serial=self.ctx.serial) + future = self.submit(FleurBaseWorkChain, **inputs) + self.ctx.calcs.append(future) + + return ToContext(last_calc=future) + + def get_inputs_scf(self): + """ + Initialize inputs for scf workflow: + wf_param, options, calculation parameters, codes, structure + """ + input_scf = AttributeDict(self.exposed_inputs(FleurScfWorkChain, namespace='scf')) + input_scf.fleurinp = self.ctx.fleurinp_banddos + + return input_scf + + def return_results(self): + ''' + return the results of the calculations + ''' + # TODO more here + self.report('Band workflow Done') + self.report('A bandstructure was calculated for fleurinpdata {} and is found under pk={}, ' + 'calculation {}'.format(self.ctx.fleurinp_scf, self.ctx.last_calc.pk, self.ctx.last_calc)) + + from aiida_fleur.tools.common_fleur_wf import find_last_submitted_calcjob + if self.ctx.last_calc: + try: + last_calc_uuid = find_last_submitted_calcjob(self.ctx.last_calc) + except NotExistent: + last_calc_uuid = None + else: + last_calc_uuid = None + + try: # if something failed, we still might be able to retrieve something + last_calc_out = self.ctx.last_calc.outputs.output_parameters + retrieved = self.ctx.last_calc.outputs.retrieved + last_calc_out_dict = last_calc_out.get_dict() + except (NotExistent, AttributeError): + last_calc_out = None + last_calc_out_dict = {} + retrieved = None + + #check if band file exists: if not succesful = False + #TODO be careful with general bands.X + # bandfilename = 'bands.1' # ['bands.1', 'bands.2', ...] + + # bandfile =retrieved.open(bandfilename).name + + # if os.path.isfile(bandfile): + # self.ctx.successful = True + # else: + # bandfile = None + # self.report('!NO bandstructure file was found, something went wrong!') + + # # get efermi from last calculation + scf_results = None + efermi_scf = 0 + bandgap_scf = 0 + if 'remote' in self.inputs: + for w in self.inputs.remote.get_incoming().all(): + if isinstance(w.node, CalcJobNode): + scf_results = load_node(w.node.pk).res + efermi_scf = scf_results.fermi_energy + bandgap_scf = scf_results.bandgap + + efermi_band = last_calc_out_dict['fermi_energy'] + bandgap_band = last_calc_out_dict['bandgap'] + + diff_efermi = efermi_scf - efermi_band + diff_bandgap = bandgap_scf - bandgap_band + + outputnode_dict = {} + + outputnode_dict['workflow_name'] = self.__class__.__name__ + outputnode_dict['Warnings'] = self.ctx.warnings + outputnode_dict['successful'] = self.ctx.successful + outputnode_dict['last_calc_uuid'] = last_calc_uuid + outputnode_dict['last_calc_pk'] = self.ctx.last_calc.pk + outputnode_dict['fermi_energy_band'] = efermi_band + outputnode_dict['bandgap_band'] = bandgap_band + outputnode_dict['fermi_energy_scf'] = efermi_scf + outputnode_dict['bandgap_scf'] = bandgap_scf + outputnode_dict['diff_efermi'] = diff_efermi + outputnode_dict['diff_bandgap'] = diff_bandgap + outputnode_dict['bandgap_units'] = 'eV' + outputnode_dict['fermi_energy_units'] = 'Htr' + # outputnode_dict['bandfile'] = bandfile + + outputnode_t = Dict(dict=outputnode_dict) + if last_calc_out: + outdict = create_band_result_node(outpara=outputnode_t, + last_calc_out=last_calc_out, + last_calc_retrieved=retrieved) + else: + outdict = create_band_result_node(outpara=outputnode_t) + + #TODO parse Bandstructure + for link_name, node in six.iteritems(outdict): + self.out(link_name, node) + + def control_end_wc(self, errormsg): + """ + Controlled way to shutdown the workchain. will initialize the output nodes + The shutdown of the workchain will has to be done afterwards + """ + self.report(errormsg) # because return_results still fails somewhen + self.ctx.errors.append(errormsg) + self.return_results() + + +@cf +def create_band_result_node(**kwargs): + """ + This is a pseudo wf, to create the right graph structure of AiiDA. + This wokfunction will create the output node in the database. + It also connects the output_node to all nodes the information commes from. + So far it is just also parsed in as argument, because so far we are to lazy + to put most of the code overworked from return_results in here. + """ + for key, val in six.iteritems(kwargs): + if key == 'outpara': # should be always there + outpara = val + outdict = {} + outputnode = outpara.clone() + outputnode.label = 'output_banddos_wc_para' + outputnode.description = ('Contains band calculation results') + + outdict['output_banddos_wc_para'] = outputnode + + return outdict diff --git a/aiida_fleur/workflows/base_fleur.py b/aiida_fleur/workflows/base_fleur.py index 897f60715..b015f39f8 100644 --- a/aiida_fleur/workflows/base_fleur.py +++ b/aiida_fleur/workflows/base_fleur.py @@ -17,7 +17,6 @@ automatic way if an expected failure occurred. """ from __future__ import absolute_import -from aiida_fleur.data.fleurinp import FleurinpData import six from aiida import orm @@ -27,13 +26,13 @@ from aiida_fleur.common.workchain.base.restart import BaseRestartWorkChain from aiida_fleur.tools.common_fleur_wf import optimize_calc_options from aiida_fleur.common.workchain.utils import register_error_handler, ErrorHandlerReport - from aiida_fleur.calculation.fleur import FleurCalculation as FleurProcess +from aiida_fleur.data.fleurinp import FleurinpData class FleurBaseWorkChain(BaseRestartWorkChain): """Workchain to run a FLEUR calculation with automated error handling and restarts""" - _workflowversion = "0.1.1" + _workflowversion = '0.1.1' _calculation_class = FleurProcess # _error_handler_entry_point = 'aiida_fleur.workflow_error_handlers.pw.base' @@ -42,20 +41,24 @@ class FleurBaseWorkChain(BaseRestartWorkChain): def define(cls, spec): super(FleurBaseWorkChain, cls).define(spec) spec.input('code', valid_type=orm.Code, help='The FLEUR code.') - spec.input('parent_folder', valid_type=orm.RemoteData, required=False, + spec.input('parent_folder', + valid_type=orm.RemoteData, + required=False, help='An optional working directory of a previously completed calculation to ' 'restart from.') - spec.input('settings', valid_type=orm.Dict, required=False, + spec.input('settings', + valid_type=orm.Dict, + required=False, help='Optional parameters to affect the way the calculation job and the parsing' ' are performed.') - spec.input('options', valid_type=orm.Dict, - help='Optional parameters to set up computational details.') - spec.input('fleurinpdata', valid_type=FleurinpData, - help='Optional parameter set up a ready-to-use fleurinp.') - spec.input('description', valid_type=six.string_types, required=False, non_db=True, + spec.input('options', valid_type=orm.Dict, help='Optional parameters to set up computational details.') + spec.input('fleurinpdata', valid_type=FleurinpData, help='Optional parameter set up a ready-to-use fleurinp.') + spec.input('description', + valid_type=six.string_types, + required=False, + non_db=True, help='Calculation description.') - spec.input('label', valid_type=six.string_types, required=False, non_db=True, - help='Calculation label.') + spec.input('label', valid_type=six.string_types, required=False, non_db=True, help='Calculation label.') spec.outline( cls.setup, @@ -74,18 +77,17 @@ def define(cls, spec): spec.output('remote_folder', valid_type=orm.RemoteData, required=False) spec.output('final_calc_uuid', valid_type=orm.Str, required=False) - spec.exit_code(311, 'ERROR_VACUUM_SPILL_RELAX', + spec.exit_code(311, + 'ERROR_VACUUM_SPILL_RELAX', message='FLEUR calculation failed because an atom spilled to the' - 'vacuum during relaxation') - spec.exit_code(313, 'ERROR_MT_RADII_RELAX', - message='Overlapping MT-spheres during relaxation.') - spec.exit_code(389, 'ERROR_MEMORY_ISSUE_NO_SOLUTION', - message="Computational resources are not optimal.") - spec.exit_code(390, 'ERROR_NOT_OPTIMAL_RESOURCES', - message="Computational resources are not optimal.") - spec.exit_code(399, 'ERROR_SOMETHING_WENT_WRONG', + 'vacuum during relaxation') + spec.exit_code(313, 'ERROR_MT_RADII_RELAX', message='Overlapping MT-spheres during relaxation.') + spec.exit_code(389, 'ERROR_MEMORY_ISSUE_NO_SOLUTION', message='Computational resources are not optimal.') + spec.exit_code(390, 'ERROR_NOT_OPTIMAL_RESOURCES', message='Computational resources are not optimal.') + spec.exit_code(399, + 'ERROR_SOMETHING_WENT_WRONG', message='FleurCalculation failed and FleurBaseWorkChain has no strategy ' - 'to resolve this') + 'to resolve this') def validate_inputs(self): """ @@ -166,13 +168,13 @@ def check_kpts(self): self.ctx.inputs.metadata.options['resources']['num_mpiprocs_per_machine'] = adv_mpi_tasks if self.ctx.use_omp: self.ctx.inputs.metadata.options['resources']['num_cores_per_mpiproc'] = adv_omp_per_mpi - if self.ctx.inputs.metadata.options['environment_variables']: - self.ctx.inputs.metadata.options['environment_variables']['OMP_NUM_THREADS'] = str( - adv_omp_per_mpi) - else: - self.ctx.inputs.metadata.options['environment_variables'] = {} - self.ctx.inputs.metadata.options['environment_variables']['OMP_NUM_THREADS'] = str( - adv_omp_per_mpi) + # if self.ctx.inputs.metadata.options['environment_variables']: + # self.ctx.inputs.metadata.options['environment_variables']['OMP_NUM_THREADS'] = str( + # adv_omp_per_mpi) + # else: + # self.ctx.inputs.metadata.options['environment_variables'] = {} + # self.ctx.inputs.metadata.options['environment_variables']['OMP_NUM_THREADS'] = str( + # adv_omp_per_mpi) @register_error_handler(FleurBaseWorkChain, 1) @@ -180,13 +182,10 @@ def _handle_general_error(self, calculation): """ Calculation failed for unknown reason. """ - if calculation.exit_status in FleurProcess.get_exit_statuses(['ERROR_FLEUR_CALC_FAILED', - 'ERROR_MT_RADII', - 'ERROR_NO_RETRIEVED_FOLDER', - 'ERROR_OPENING_OUTPUTS', - 'ERROR_NO_OUTXML', - 'ERROR_XMLOUT_PARSING_FAILED', - 'ERROR_RELAX_PARSING_FAILED']): + if calculation.exit_status in FleurProcess.get_exit_statuses([ + 'ERROR_FLEUR_CALC_FAILED', 'ERROR_MT_RADII', 'ERROR_NO_RETRIEVED_FOLDER', 'ERROR_OPENING_OUTPUTS', + 'ERROR_NO_OUTXML', 'ERROR_XMLOUT_PARSING_FAILED', 'ERROR_RELAX_PARSING_FAILED' + ]): self.ctx.restart_calc = calculation self.ctx.is_finished = True self.report('Calculation failed for a reason that can not be resolved automatically') @@ -197,6 +196,36 @@ def _handle_general_error(self, calculation): 'corresponding exit code in this error handler') +@register_error_handler(FleurBaseWorkChain, 48) +def _handle_dirac_equation(self, calculation): + """ + Calculation failed due to lack of memory. + Probably works for JURECA only, has to be tested for other systems. + """ + + if calculation.exit_status in FleurProcess.get_exit_statuses(['ERROR_DROP_CDN']): + + # try to drop remote folder and see if it helps + is_fleurinp_from_relax = False + if 'fleurinpdata' in self.ctx.inputs: + if 'relax.xml' in self.ctx.inputs.fleurinpdata.files: + is_fleurinp_from_relax = True + + if 'parent_folder' in self.ctx.inputs and is_fleurinp_from_relax: + del self.ctx.inputs.parent_folder + self.ctx.restart_calc = None + self.ctx.is_finished = False + self.report('Calculation seems to fail due to corrupted charge density (can happen' + 'during relaxation). I drop cdn from previous step') + return ErrorHandlerReport(True, True) + + self.ctx.restart_calc = calculation + self.ctx.is_finished = True + self.report('Can not drop charge density. If I drop the remote folder, there will be' 'no inp.xml') + self.results() + return ErrorHandlerReport(True, True, self.exit_codes.ERROR_SOMETHING_WENT_WRONG) + + @register_error_handler(FleurBaseWorkChain, 52) def _handle_vacuum_spill_error(self, calculation): """ @@ -219,8 +248,7 @@ def _handle_mt_relax_error(self, calculation): if calculation.exit_status in FleurProcess.get_exit_statuses(['ERROR_MT_RADII_RELAX']): self.ctx.restart_calc = calculation self.ctx.is_finished = True - self.report('FLEUR calculation failed due to MT overlap.' - ' Can be fixed via RelaxBaseWorkChain') + self.report('FLEUR calculation failed due to MT overlap.' ' Can be fixed via RelaxBaseWorkChain') self.results() return ErrorHandlerReport(True, True, self.exit_codes.ERROR_MT_RADII_RELAX) @@ -246,14 +274,13 @@ def _handle_not_enough_memory(self, calculation): self.ctx.inputs.settings = {} else: self.ctx.inputs.settings = self.inputs.settings.get_dict() - self.ctx.inputs.settings.setdefault( - 'remove_from_remotecopy_list', []).append('mixing_history*') + self.ctx.inputs.settings.setdefault('remove_from_remotecopy_list', []).append('mixing_history*') return ErrorHandlerReport(True, True) else: self.ctx.restart_calc = calculation self.ctx.is_finished = True - self.report('FLEUR calculation failed due to MT overlap.' - ' Can be fixed via RelaxBaseWorkChain') + self.report('I am not allowed to optimize your settings. Consider providing at least' + 'num_machines and num_mpiprocs_per_machine') self.results() return ErrorHandlerReport(True, True, self.exit_codes.ERROR_MEMORY_ISSUE_NO_SOLUTION) diff --git a/aiida_fleur/workflows/base_relax.py b/aiida_fleur/workflows/base_relax.py index 5fe60f697..922812d0d 100644 --- a/aiida_fleur/workflows/base_relax.py +++ b/aiida_fleur/workflows/base_relax.py @@ -34,7 +34,7 @@ class FleurBaseRelaxWorkChain(BaseRestartWorkChain): """Workchain to run Relax WorkChain with automated error handling and restarts""" - _workflowversion = "0.1.0" + _workflowversion = '0.1.0' _calculation_class = RelaxProcess # _error_handler_entry_point = 'aiida_fleur.workflow_error_handlers.pw.base' @@ -43,10 +43,12 @@ class FleurBaseRelaxWorkChain(BaseRestartWorkChain): def define(cls, spec): super(FleurBaseRelaxWorkChain, cls).define(spec) spec.expose_inputs(RelaxProcess) - spec.input('description', valid_type=six.string_types, required=False, non_db=True, + spec.input('description', + valid_type=six.string_types, + required=False, + non_db=True, help='Calculation description.') - spec.input('label', valid_type=six.string_types, required=False, non_db=True, - help='Calculation label.') + spec.input('label', valid_type=six.string_types, required=False, non_db=True, help='Calculation label.') spec.outline( cls.setup, @@ -54,15 +56,17 @@ def define(cls, spec): while_(cls.should_run_calculation)( cls.run_calculation, cls.inspect_calculation, + cls.pop_non_stacking_inpxml_changes, ), cls.results, ) spec.expose_outputs(RelaxProcess) - spec.exit_code(399, 'ERROR_SOMETHING_WENT_WRONG', + spec.exit_code(399, + 'ERROR_SOMETHING_WENT_WRONG', message='FleurRelaxWorkChain failed and FleurBaseRelaxWorkChain has no' - ' strategy to resolve this') + ' strategy to resolve this') def validate_inputs(self): """ @@ -81,6 +85,24 @@ def validate_inputs(self): else: self.ctx.inputs.metadata.label = '' + def pop_non_stacking_inpxml_changes(self): + """ + pops some inpxml_changes that do not stack, for example shift_value. + """ + wf_param = self.ctx.inputs.scf.wf_parameters.get_dict() + if 'inpxml_changes' not in wf_param: + return + + self.report('Removing shift_value methods from subsequent Relax submissions') + + old_changes = wf_param['inpxml_changes'] + new_changes = [] + for change in old_changes: + if 'shift_value' not in change[0]: + new_changes.append(change) + wf_param['inpxml_changes'] = new_changes + self.ctx.inputs.scf.wf_parameters = Dict(dict=wf_param) + @register_error_handler(FleurBaseRelaxWorkChain, 50) def _handle_not_conv_error(self, calculation): @@ -106,15 +128,43 @@ def _handle_not_conv_error(self, calculation): return ErrorHandlerReport(True, True) +@register_error_handler(FleurBaseRelaxWorkChain, 49) +def _handle_switch_to_bfgs(self, calculation): + """ + SCF can be switched to BFGS. For now cdn and relax.xml are kept because the current progress is + treated as successful. + """ + if calculation.exit_status in RelaxProcess.get_exit_statuses(['ERROR_SWITCH_BFGS']): + self.ctx.is_finished = False + self.report('It is time to switch from straight to BFGS relaxation') + last_scf_calc = load_node(calculation.outputs.out.get_dict()['last_scf_wc_uuid']) + last_fleur_calc = last_scf_calc.outputs.output_scf_wc_para.get_dict()['last_calc_uuid'] + last_fleur_calc = load_node(last_fleur_calc) + remote = last_fleur_calc.get_outgoing().get_node_by_label('remote_folder') + + self.ctx.inputs.scf.remote_data = remote + + scf_para = self.ctx.inputs.scf.wf_parameters.get_dict() + scf_para['force_dict']['forcemix'] = 'BFGS' + self.ctx.inputs.scf.wf_parameters = Dict(dict=scf_para) + + if 'structure' in self.ctx.inputs.scf: + del self.ctx.inputs.scf.structure + if 'inpgen' in self.ctx.inputs.scf: + del self.ctx.inputs.scf.inpgen + if 'calc_parameters' in self.ctx.inputs.scf: + del self.ctx.inputs.scf.calc_parameters + + return ErrorHandlerReport(True, True) + + @register_error_handler(FleurBaseRelaxWorkChain, 1) def _handle_general_error(self, calculation): """ Calculation failed for a reason that can not be fixed automatically. """ - if calculation.exit_status in RelaxProcess.get_exit_statuses(['ERROR_INVALID_INPUT_PARAM', - 'ERROR_SCF_FAILED', - 'ERROR_NO_RELAX_OUTPUT', - 'ERROR_NO_SCF_OUTPUT']): + if calculation.exit_status in RelaxProcess.get_exit_statuses( + ['ERROR_INVALID_INPUT_PARAM', 'ERROR_SCF_FAILED', 'ERROR_NO_RELAX_OUTPUT', 'ERROR_NO_SCF_OUTPUT']): self.ctx.restart_calc = calculation self.ctx.is_finished = True self.report('Calculation failed for a reason that can not be fixed automatically') @@ -128,16 +178,25 @@ def _handle_general_error(self, calculation): @register_error_handler(FleurBaseRelaxWorkChain, 100) def _handle_vacuum_spill(self, calculation): """ - Calculation failed for unknown reason. + Calculation failed because atom spilled to the vacuum region. """ if calculation.exit_status in RelaxProcess.get_exit_statuses(['ERROR_VACUUM_SPILL_RELAX']): + if 'remote_data' in self.ctx.inputs.scf: + inputs = find_inputs_relax(self.ctx.inputs.scf.remote_data) + del self.ctx.inputs.scf.remote_data + if isinstance(inputs, FleurinpData): + self.ctx.inputs.scf.fleurinp = inputs + else: + self.ctx.inputs.scf.structure = inputs[0] + self.ctx.inputs.scf.inpgen = inputs[1] + if len(inputs) == 3: + self.ctx.inputs.scf.calc_parameters = inputs[2] + self.ctx.is_finished = False - self.report('Relax WC failed because atom was spilled to the vacuum, I change the vacuum ' - 'parameter') + self.report('Relax WC failed because atom was spilled to the vacuum, I change the vacuum ' 'parameter') wf_para_dict = self.ctx.inputs.scf.wf_parameters.get_dict() inpxml_changes = wf_para_dict.get('inpxml_changes', []) - inpxml_changes.append(('shift_value', - {'change_dict': {'dTilda': 0.2, 'dVac': 0.2}})) + inpxml_changes.append(('shift_value', {'change_dict': {'dTilda': 0.2, 'dVac': 0.2}})) wf_para_dict['inpxml_changes'] = inpxml_changes self.ctx.inputs.scf.wf_parameters = Dict(dict=wf_para_dict) return ErrorHandlerReport(True, True) @@ -146,27 +205,87 @@ def _handle_vacuum_spill(self, calculation): @register_error_handler(FleurBaseRelaxWorkChain, 101) def _handle_mt_overlap(self, calculation): """ - Calculation failed for unknown reason. + Calculation failed because MT overlapped during calculation. """ if calculation.exit_status in RelaxProcess.get_exit_statuses(['ERROR_MT_RADII_RELAX']): + if 'remote_data' in self.ctx.inputs.scf: + inputs = find_inputs_relax(self.ctx.inputs.scf.remote_data) + del self.ctx.inputs.scf.remote_data + if isinstance(inputs, FleurinpData): + self.ctx.inputs.scf.fleurinp = inputs + else: + self.ctx.inputs.scf.structure = inputs[0] + self.ctx.inputs.scf.inpgen = inputs[1] + if len(inputs) == 3: + self.ctx.inputs.scf.calc_parameters = inputs[2] + last_scf_wc_uuid = calculation.outputs.out.get_dict()['last_scf_wc_uuid'] last_scf = load_node(last_scf_wc_uuid) last_fleur = load_node(last_scf.outputs.output_scf_wc_para.get_dict()['last_calc_uuid']) error_params = last_fleur.outputs.error_params.get_dict() - label1 = error_params['overlapped_indices'][0] - label2 = error_params['overlapped_indices'][1] - value = -(float(error_params['overlaping_value'])+0.01)/2 + label1 = int(error_params['overlapped_indices'][0]) + label2 = int(error_params['overlapped_indices'][1]) + value = -(float(error_params['overlaping_value']) + 0.01) / 2 self.ctx.is_finished = False - self.report('Relax WC failed because MT overlapped during relaxation. I reduce mt radii') + self.report('Relax WC failed because MT overlapped during relaxation. Try to fix this') wf_para_dict = self.ctx.inputs.scf.wf_parameters.get_dict() - inpxml_changes = wf_para_dict.get('inpxml_changes', []) - inpxml_changes.append(('shift_value_species_label', - {'label': "{: >20}".format(label1), - 'att_name': 'radius', 'value': value, 'mode': 'abs'})) - inpxml_changes.append(('shift_value_species_label', - {'label': "{: >20}".format(label2), - 'att_name': 'radius', 'value': value, 'mode': 'abs'})) - wf_para_dict['inpxml_changes'] = inpxml_changes + + if value < -0.2 and error_params['iteration_number'] >= 3: + wf_para_dict['force_dict']['forcealpha'] = wf_para_dict['force_dict']['forcealpha'] * 1.5 + wf_para_dict['force_dict']['forcemix'] = 'straight' + + self_wf_para = self.ctx.inputs.wf_parameters.get_dict() + self_wf_para['change_mixing_criterion'] = self_wf_para['change_mixing_criterion'] / 1.25 + self.ctx.inputs.wf_parameters = Dict(dict=self_wf_para) + self.report('Seems it is too early for BFGS. I switch back to straight mixing' + ' and reduce change_mixing_criterion by a factor of 1.25') + elif value < -0.1 and error_params['iteration_number'] == 2: + wf_para_dict['force_dict']['forcealpha'] = wf_para_dict['force_dict']['forcealpha'] / 2 + self.report('forcealpha might be too large.') + else: # reduce MT radii + self.report('MT radii might be too large.') + inpxml_changes = wf_para_dict.get('inpxml_changes', []) + inpxml_changes.append(('shift_value_species_label', { + 'label': '{: >20}'.format(label1), + 'att_name': 'radius', + 'value': value, + 'mode': 'abs' + })) + inpxml_changes.append(('shift_value_species_label', { + 'label': '{: >20}'.format(label2), + 'att_name': 'radius', + 'value': value, + 'mode': 'abs' + })) + wf_para_dict['inpxml_changes'] = inpxml_changes + self.ctx.inputs.scf.wf_parameters = Dict(dict=wf_para_dict) return ErrorHandlerReport(True, True) + + +def find_inputs_relax(remote_node): + """ + Finds the original inputs of the relaxation workchain which can be either + FleurinpData or structure+inpgen+calc_param. + """ + from aiida.orm import WorkChainNode + inc_nodes = remote_node.get_incoming().all() + for link in inc_nodes: + if isinstance(link.node, WorkChainNode): + base_wc = link.node + break + + scf_wc_node = base_wc.get_incoming().get_node_by_label('CALL') + + if 'remote_data' in scf_wc_node.inputs: + return find_inputs_relax(scf_wc_node.inputs.remote_data) + + if 'structure' in scf_wc_node.inputs: + if 'calc_parameters' in scf_wc_node.inputs: + return scf_wc_node.inputs.structure, scf_wc_node.inputs.inpgen, scf_wc_node.inputs.calc_parameters + return scf_wc_node.inputs.structure, scf_wc_node.inputs.inpgen + elif 'fleurinp' in scf_wc_node.inputs: + return scf_wc_node.inputs.fleurinp + + raise ValueError('Did not find original inputs for Relax WC') diff --git a/aiida_fleur/workflows/corehole.py b/aiida_fleur/workflows/corehole.py index 77cbdcf16..d2d5e0d04 100644 --- a/aiida_fleur/workflows/corehole.py +++ b/aiida_fleur/workflows/corehole.py @@ -9,7 +9,6 @@ # For further information please visit http://www.flapw.de or # # http://aiida-fleur.readthedocs.io/en/develop/ # ############################################################################### - """ This is the worklfow 'corehole' using the Fleur code, which calculates Binding energies and corelevel shifts with different methods. @@ -25,11 +24,12 @@ #import os.path from __future__ import absolute_import from __future__ import print_function +import six import re import numpy as np from pprint import pprint from aiida.plugins import DataFactory -from aiida.orm import Code, load_node +from aiida.orm import Code, load_node, CalcJobNode from aiida.orm import Int, StructureData, Dict, RemoteData from aiida.engine import WorkChain, if_, ToContext from aiida.engine import submit @@ -38,7 +38,7 @@ from aiida_fleur.calculation.fleur import FleurCalculation from aiida_fleur.workflows.scf import FleurScfWorkChain from aiida_fleur.tools.StructureData_util import supercell -from aiida_fleur.tools.create_corehole import create_corehole_para#, create_corehole_fleurinp +from aiida_fleur.tools.create_corehole import create_corehole_para #, create_corehole_fleurinp from aiida_fleur.tools.extract_corelevels import extract_corelevels from aiida_fleur.tools.StructureData_util import break_symmetry from aiida_fleur.tools.StructureData_util import find_equi_atoms @@ -46,8 +46,6 @@ from aiida_fleur.tools.element_econfig_list import econfigstr_hole, states_spin from aiida_fleur.tools.element_econfig_list import get_state_occ, highest_unocc_valence from aiida_fleur.tools.dict_util import dict_merger, extract_elementpara -import six - from aiida_fleur.data.fleurinp import FleurinpData @@ -116,83 +114,110 @@ class fleur_corehole_wc(WorkChain): # Hints: # 1. This workflow does not work with local codes! - _workflowversion = "0.3.2" + _workflowversion = '0.4.0' _default_options = { - 'resources' : {"num_machines": 1}, - 'max_wallclock_seconds' : 6*60*60, - 'queue_name' : '', - 'custom_scheduler_commands' : '', - 'import_sys_environment' : False, - 'environment_variables' : {}} - + 'resources': { + 'num_machines': 1, + 'num_mpiprocs_per_machine': 1, + }, + 'max_wallclock_seconds': 6 * 60 * 60, + 'queue_name': '', + #'custom_scheduler_commands': '', + #'import_sys_environment': False, + #'environment_variables': {} + } @classmethod def define(cls, spec): super(fleur_corehole_wc, cls).define(spec) - spec.input("wf_parameters", valid_type=Dict, required=False, - default=Dict(dict={ - 'method' : 'valence', # what method to use, default for valence to highest open shell - 'hole_charge' : 1.0, # what is the charge of the corehole? 0<1.0 - 'atoms' : ['all'], # coreholes on what atoms, positions or index for list, or element ['Be', (0.0, 0.5, 0.334), 3] - 'corelevel': ['all'], # coreholes on which corelevels [ 'Be1s', 'W4f', 'Oall'...] - 'supercell_size' : [2, 1, 1], # size of the supercell [nx,ny,nz] - 'para_group' : None, # use parameter nodes from a parameter group - #'references' : 'calculate',# at some point aiida will have fast forwarding - #'relax' : False, # relax the unit cell first? - #'relax_mode': 'Fleur', # what releaxation do you want - #'relax_para' : 'default', # parameter dict for the relaxation - 'scf_para' : 'default', # wf parameter dict for the scfs - 'same_para' : True, # enforce the same atom parameter/cutoffs on the corehole calc and ref - 'serial' : True, # run fleur in serial, or parallel? - #'job_limit' : 100 # enforce the workflow not to spawn more scfs wcs then this number(which is roughly the number of fleur jobs) - 'magnetic' : True})) - spec.input("fleurinp", valid_type=FleurinpData, required=False) - spec.input("fleur", valid_type=Code, required=True) - spec.input("inpgen", valid_type=Code, required=True) - spec.input("structure", valid_type=StructureData, required=False) - spec.input("calc_parameters", valid_type=Dict, required=False) - spec.input("options", valid_type=Dict, required=False, - default=Dict(dict={ - 'resources': {"num_machines": 1}, - 'max_wallclock_seconds': 60*60, - 'queue_name': '', - 'custom_scheduler_commands' : '', - 'import_sys_environment' : False, - 'environment_variables' : {}})) + spec.input( + 'wf_parameters', + valid_type=Dict, + required=False, + #default=Dict( + # dict={ + # 'method': + # 'valence', # what method to use, default for valence to highest open shell + # 'hole_charge': 1.0, # what is the charge of the corehole? 0<1.0 + # 'atoms': [ + # 'all' + # ], # coreholes on what atoms, positions or index for list, or element ['Be', (0.0, 0.5, 0.334), 3] + # 'corelevel': ['all' + # ], # coreholes on which corelevels [ 'Be1s', 'W4f', 'Oall'...] + # 'supercell_size': [2, 1, 1], # size of the supercell [nx,ny,nz] + # 'para_group': None, # use parameter nodes from a parameter group + # #'references' : 'calculate',# at some point aiida will have fast forwarding + # #'relax' : False, # relax the unit cell first? + # #'relax_mode': 'Fleur', # what releaxation do you want + # #'relax_para' : 'default', # parameter dict for the relaxation + # 'scf_para': 'default', # wf parameter dict for the scfs + # 'same_para': + # True, # enforce the same atom parameter/cutoffs on the corehole calc and ref + # 'serial': True, # run fleur in serial, or parallel? + # #'job_limit' : 100 # enforce the workflow not to spawn more scfs wcs then this number(which is roughly the number of fleur jobs) + # 'magnetic': True + # } + #) + ) + spec.input('fleurinp', valid_type=FleurinpData, required=False) + spec.input('fleur', valid_type=Code, required=True) + spec.input('inpgen', valid_type=Code, required=True) + spec.input('structure', valid_type=StructureData, required=False) + spec.input('calc_parameters', valid_type=Dict, required=False) + spec.input( + 'options', + valid_type=Dict, + required=False #, + #default=Dict( + # dict={ + # 'resources': { + # "num_machines": 1, "num_mpiprocs_per_machine": 1, + # }, + # 'max_wallclock_seconds': 60 * 60, + # 'queue_name': '', + # 'custom_scheduler_commands': '', + # 'import_sys_environment': False, + # 'environment_variables': {} + # } + #) + ) spec.outline( - cls.check_input, # first check if input is consistent + cls.check_input, # first check if input is consistent if_(cls.relaxation_needed)( # ggf relax the given cell cls.relax), - if_(cls.supercell_needed)( # create a supercell from the given/relaxed cell + if_(cls.supercell_needed)( # create a supercell from the given/relaxed cell cls.create_supercell), cls.create_coreholes, - cls.run_ref_scf, # calculate the reference supercell + cls.run_ref_scf, # calculate the reference supercell first cls.check_scf, - cls.run_scfs, + cls.run_scfs, # calculate all other corehole calculations cls.check_scf, - cls.return_results - ) - - spec.exit_code(1, 'ERROR_INVALID_INPUT_RESOURCES', - message="The input resources are invalid.") - spec.exit_code(2, 'ERROR_INVALID_INPUT_RESOURCES_UNDERSPECIFIED', - message="Input resources are missing.") - spec.exit_code(3, 'ERROR_INVALID_CODE_PROVIDED', - message="The code provided is invalid, or not of the right kind.") - spec.exit_code(4, 'ERROR_INPGEN_CALCULATION_FAILED', - message="Inpgen calculation FAILED, check output") - spec.exit_code(5, 'ERROR_CHANGING_FLEURINPUT_FAILED', - message="Changing of the FLEURINP data went wrong, check log.") - spec.exit_code(6, 'ERROR_CALCULATION_INVALID_INPUT_FILE', - message="The FLEUR input file for the calculation did not validate.") - spec.exit_code(7, 'ERROR_FLEUR_CALCULATION_FAiLED', - message="At least one FLEUR calculation FAILED, check the output and log.") - spec.exit_code(8, 'ERROR_CONVERGENCE_NOT_ARCHIVED', - message=("At least one FLEUR calculation did not/could not reach the" - "desired convergece Criteria, with the current parameters.")) - spec.exit_code(9, 'ERROR_IN_REFERENCE_CREATION', - message=("Something went wrong in the determiation what coreholes to " - "calculate, probably the input format was not correct. Check log.")) + cls.return_results) + spec.output('output_corehole_wc_para', valid_type=Dict) + + spec.exit_code(1, 'ERROR_INVALID_INPUT_RESOURCES', message='The input resources are invalid.') + spec.exit_code(2, 'ERROR_INVALID_INPUT_RESOURCES_UNDERSPECIFIED', message='Input resources are missing.') + spec.exit_code(3, + 'ERROR_INVALID_CODE_PROVIDED', + message='The code provided is invalid, or not of the right kind.') + spec.exit_code(4, 'ERROR_INPGEN_CALCULATION_FAILED', message='Inpgen calculation FAILED, check output') + spec.exit_code(5, + 'ERROR_CHANGING_FLEURINPUT_FAILED', + message='Changing of the FLEURINP data went wrong, check log.') + spec.exit_code(6, + 'ERROR_CALCULATION_INVALID_INPUT_FILE', + message='The FLEUR input file for the calculation did not validate.') + spec.exit_code(7, + 'ERROR_FLEUR_CALCULATION_FAiLED', + message='At least one FLEUR calculation FAILED, check the output and log.') + spec.exit_code(8, + 'ERROR_CONVERGENCE_NOT_ARCHIVED', + message=('At least one FLEUR calculation did not/could not reach the' + 'desired convergece Criteria, with the current parameters.')) + spec.exit_code(9, + 'ERROR_IN_REFERENCE_CREATION', + message=('Something went wrong in the determiation what coreholes to ' + 'calculate, probably the input format was not correct. Check log.')) def check_input(self): """ @@ -200,9 +225,9 @@ def check_input(self): Do some input checks. Further input checks are done in further workflow steps """ # TODO: document parameters - self.report("started fleur_corehole_wc version {} " - "Workchain node identifiers: "#{}" - "".format(self._workflowversion))#, ProcessRegistry().current_calc_node)) + self.report('started fleur_corehole_wc version {} ' + 'Workchain node identifiers: ' #{}" + ''.format(self._workflowversion)) #, ProcessRegistry().current_calc_node)) ### init ctx ### @@ -219,7 +244,6 @@ def check_input(self): else: self.ctx.ref_para = None - wf_dict = inputs.wf_parameters.get_dict() self.ctx.method = wf_dict.get('method', 'valence') self.ctx.joblimit = wf_dict.get('joblimit') @@ -228,9 +252,9 @@ def check_input(self): self.ctx.scf_para = wf_dict.get('scf_para', {}) self.ctx.be_to_calc = wf_dict.get('corelevel') self.ctx.atoms_to_calc = wf_dict.get('atoms') - self.ctx.base_structure = inputs.get('structure') # ggf get from fleurinp + self.ctx.base_structure = inputs.get('structure') # ggf get from fleurinp self.ctx.relax = False - self.ctx.supercell_size = wf_dict.get('supercell_size', [2, 1, 1]) # 2x2x2 or smaller? + self.ctx.supercell_size = wf_dict.get('supercell_size', [2, 1, 1]) # 2x2x2 or smaller? self.ctx.hole_charge = wf_dict.get('hole_charge', 1.0) self.ctx.magnetic = wf_dict.get('magnetic', True) @@ -268,9 +292,7 @@ def check_input(self): self.ctx.ref_total_energies = [] self.ctx.wbindingenergies = [] ### input check ### - - - ''' + """ #ususal fleur stuff check if fleurinp.get structure self.ctx.inputs.base_structure @@ -280,7 +302,7 @@ def check_input(self): errormsg = 'You need to specify unter 'corelevel' in the wf_para node on what corelevel you want to have a corehole calculated. (Default is 'all')' self.abort_nowait(errormsg) - ''' + """ def supercell_needed(self): """ @@ -296,26 +318,27 @@ def supercell_needed(self): # TODO, otherwise in the new system if something else is returned this might fail...? return needed - def create_supercell(self): """ create the needed supercell """ supercell_base = self.ctx.supercell_size - description=(u'WF, Creates a supercell of a crystal structure x({},{},{}).' - ''.format(supercell_base[0], supercell_base[0], supercell_base[2])) - - supercell_s = supercell( - self.ctx.base_structure_relax, - Int(supercell_base[0]), - Int(supercell_base[1]), - Int(supercell_base[2]), - label=u'supercell_wf', - description=description) + description = (u'WF, Creates a supercell of a crystal structure x({},{},{}).' + ''.format(supercell_base[0], supercell_base[0], supercell_base[2])) + + supercell_s = supercell(self.ctx.base_structure_relax, + Int(supercell_base[0]), + Int(supercell_base[1]), + Int(supercell_base[2]), + metadata={ + 'label': u'supercell_wf', + 'description': description + }) # overwrite label and description of new structure - supercell_s.label = '{}x{}x{} of {}'.format(supercell_base[0], supercell_base[1], supercell_base[2], self.ctx.base_structure_relax.uuid) + supercell_s.label = '{}x{}x{} of {}'.format(supercell_base[0], supercell_base[1], supercell_base[2], + self.ctx.base_structure_relax.uuid) supercell_s.description = supercell_s.description + ' created in a fleur_corehole_wc' self.ctx.ref_supercell = supercell_s calc_para = self.ctx.ref_para @@ -324,7 +347,6 @@ def create_supercell(self): else: new_calc = [supercell_s, calc_para] self.ctx.calcs_ref_torun.append(new_calc) - return def create_coreholes(self): """ @@ -345,24 +367,23 @@ def create_coreholes(self): # TODO if this becomes to long split """ - self.report('INFO: In create_coreholes of fleur_corehole_wc. ' - 'Preparing everything for calculation launches.') + self.report('INFO: In create_coreholes of fleur_corehole_wc. ' 'Preparing everything for calculation launches.') ########### init variables ############## - base_struc = self.ctx.base_structure_relax # one unit cell (given cell) + base_struc = self.ctx.base_structure_relax # one unit cell (given cell) base_atoms_sites = base_struc.sites # list of AiiDA Site types of cell - base_kinds = base_struc.kinds # list of AiiDA Kind types of cell - valid_elements = list(base_struc.get_composition().keys())# elements in structure - base_supercell = self.ctx.ref_supercell # supercell of base cell - base_k_symbols = {} #map kind names to elements + base_kinds = base_struc.kinds # list of AiiDA Kind types of cell + valid_elements = list(base_struc.get_composition().keys()) # elements in structure + base_supercell = self.ctx.ref_supercell # supercell of base cell + base_k_symbols = {} #map kind names to elements for kind in base_kinds: base_k_symbols[kind.name] = kind.symbol # we have to find the atoms we want a corelevel on and make them a new kind, # also we have to figure out what electron config to set - atoms_toc = self.ctx.atoms_to_calc #['Be', (0.0, 0.5, 0.334)/ 3(index)/ 'all'] + atoms_toc = self.ctx.atoms_to_calc #['Be', (0.0, 0.5, 0.334)/ 3(index)/ 'all'] if self.ctx.be_to_calc[0] == 'all': corelevels_toc_new = [] for element in valid_elements: @@ -370,10 +391,10 @@ def create_coreholes(self): else: corelevels_toc_new = self.ctx.be_to_calc - corelevels_toc = corelevels_toc_new # [ 'Be 1s', 'W_4f', 'O all', 'W-3d'...] + corelevels_toc = corelevels_toc_new # [ 'Be 1s', 'W_4f', 'O all', 'W-3d'...] coreholes_atoms = [] # list of aiida sites - corehole_to_create = [] # prepare list of dicts for final loop, for calculation creation + corehole_to_create = [] # prepare list of dicts for final loop, for calculation creation #[{'site' : sites[8], 'kindname' : 'W1', 'econfig': "[Kr] 5s2 4d10 4f13 | 5p6 5d5 6s2", 'fleurinp_change' : []}] # get the symmetry equivivalent atoms by ase @@ -384,23 +405,23 @@ def create_coreholes(self): method = self.ctx.method if method == 'valence': hole_charge = self.ctx.hole_charge - correct_val_charge = False # the routines add the electron per default to the valence + correct_val_charge = False # the routines add the electron per default to the valence htype = 'valence' elif method == 'charge': hole_charge = self.ctx.hole_charge correct_val_charge = True htype = 'charge' else: - htype = 'valence' # default so far, otherwise not defined. + htype = 'valence' # default so far, otherwise not defined. # TODO probally better, to throw error hole_charge = self.ctx.hole_charge - correct_val_charge = False # the routines add the electron per default to the valence + correct_val_charge = False # the routines add the electron per default to the valence ########## # 1. Find out what atoms to put coreholes on self.report('Atoms to calculate : {}'.format(atoms_toc)) for atom_info in atoms_toc: - if isinstance(atom_info, (str, six.text_type)):#basestring): + if isinstance(atom_info, (str, six.text_type)): #basestring): if atom_info == 'all': # add all symmetry equivivalent atoms of structure to create coreholes #coreholes_atoms = base_atoms_sites @@ -423,23 +444,23 @@ def create_coreholes(self): else: # check if a valid element or some garbage pass - elif isinstance(atom_info, tuple): # coordinates + elif isinstance(atom_info, tuple): # coordinates if len(atom_info) == 3: for site in base_atoms_sites: - if site.position == atom_info:#ggf give a threshold... + if site.position == atom_info: #ggf give a threshold... coreholes_atoms.append(site) else: # wrong tuple length this is not a position self.report('WARNING: strange position/coordinates given: {}'.format(atom_info)) # - elif isinstance(atom_info, int): # index for sites + elif isinstance(atom_info, int): # index for sites to_append = None try: to_append = base_atoms_sites[atom_info] except IndexError: error = ("ERROR: The index/integer: {} specified in 'atoms' key is not valid." - "There are only {} atom sites in your provided structure." - "".format(atom_info, len(base_atoms_sites))) + 'There are only {} atom sites in your provided structure.' + ''.format(atom_info, len(base_atoms_sites))) to_append = None self.report(error) if to_append: @@ -457,16 +478,15 @@ def create_coreholes(self): # 2. now check what type of corelevel shall we create on those atoms self.report('Corelevels to calculate : {}'.format(corelevels_toc)) for corel in corelevels_toc: - if isinstance(corel, (str, six.text_type)):#basestring): + if isinstance(corel, (str, six.text_type)): #basestring): # split string (Be1s) s.replace(';',' ')... could get rid of re - elm_cl = re.split("[, ;:-]", corel) + elm_cl = re.split('[, ;:-]', corel) #print(elm_cl) if len(elm_cl) != 2: - pass # something went wrong, wrong input # TODO log, error and hint - error = ("ERROR: corelevel was given in the wrong format: {}," - "should have len 2. Hint hast to be the format " + error = ('ERROR: corelevel was given in the wrong format: {},' + 'should have len 2. Hint hast to be the format ' "['Element,corelevel',...] i.e ['Be,1s', 'W,all]".format(elm_cl)) self.control_end_wc(error) return self.exit_codes.ERROR_IN_REFERENCE_CREATION @@ -475,7 +495,7 @@ def create_coreholes(self): econfigs = [] all_corestates = [] all_changed_valence = [] - elm_cl = [str(elm_cl[0]), str(elm_cl[1])]#otherwise stuff fails because of basestrings + elm_cl = [str(elm_cl[0]), str(elm_cl[1])] #otherwise stuff fails because of basestrings if elm_cl[0] in valid_elements: # get corelevel econfig of element dict_corelevel_elm = {} @@ -500,21 +520,20 @@ def create_coreholes(self): econfigs.append(holeconfig) all_corestates.append(state + ' ' + rel) all_changed_valence.append(highest_unocc[:2]) - elif elm_cl[1] in valid_coreconfig: # check if corelevel in valid coreconfig + elif elm_cl[1] in valid_coreconfig: # check if corelevel in valid coreconfig #add corelevel to calculate. state_index = oriegconfig.find(elm_cl[1]) - state = oriegconfig[state_index:state_index+4].rstrip(' ')# +4: icii, or ici + state = oriegconfig[state_index:state_index + 4].rstrip(' ') # +4: icii, or ici holeconfig = econfigstr_hole(oriegconfig, state, highest_unocc, htype=htype) rel_states = states_spin.get(state[1], []) # get rel core level (for 4f 5/2, 7/2) for rel in rel_states: econfigs.append(holeconfig) all_corestates.append(state + ' ' + rel) - all_changed_valence.append(highest_unocc[:2])# the methods below need them without occ - elif "/" in elm_cl[1]: - pass # TODO FUll state information given...[4f 7/2] + all_changed_valence.append(highest_unocc[:2]) # the methods below need them without occ + elif '/' in elm_cl[1]: + pass # TODO FUll state information given...[4f 7/2] else: - pass # corelevel provided wrong, not understood, warning continue # TODO several corelevels of one element... update lists instead of override... @@ -523,14 +542,13 @@ def create_coreholes(self): dict_corelevel_elm['econfig'] = econfigs tempd = dict_corelevel.get(elm_cl[0], {}) together = dict_merger(dict_corelevel_elm, tempd) - pprint(together) + #pprint(together) dict_corelevel[elm_cl[0]] = together else: pass #element or string provieded not in structure, # what about upper and lower caps - #print(dict_corelevel) #output of above #list of sites [site_bla, ..] @@ -543,53 +561,68 @@ def create_coreholes(self): # what coreholes need to be created for that element for i, econfig in enumerate(cl_dict.get('econfig', [])): fleurinp_change = [] - change_kind = site.kind_name + '_corehole1'# the number at the end + change_kind = site.kind_name + '_corehole1' # the number at the end # is important otherwise inpgen does not make this a new species # through the hard coded one might lead to conflicts.. - kind = site.kind_name# + '1'# this will be the kind name in the broke sym structure, + kind = site.kind_name # + '1'# this will be the kind name in the broke sym structure, #its name will be changed later to change_kind # maybe the kind name cann also not be known at this point #self.report('{}, {}, {}, {}'.format(econfig, cl_dict.get('corelevel')[i], cl_dict.get('valence')[i], hole_charge)) #print(cl_dict.get('corelevel')[i]) #print(cl_dict.get('valence')[i]) #print(econfig) - state_tag_list = get_state_occ(econfig, corehole=cl_dict.get('corelevel')[i], valence=cl_dict.get('valence')[i], ch_occ=hole_charge) - attributedict = {'electronConfig' : {'stateOccupation' : state_tag_list}} - pprint(state_tag_list) - change = ('set_species' , {'species_name' : change_kind, 'attributedict' : attributedict, 'create' : False}) + state_tag_list = get_state_occ(econfig, + corehole=cl_dict.get('corelevel')[i], + valence=cl_dict.get('valence')[i], + ch_occ=hole_charge) + attributedict = {'electronConfig': {'stateOccupation': state_tag_list}} + #pprint(state_tag_list) + change = ('set_species', { + 'species_name': change_kind, + 'attributedict': attributedict, + 'create': False + }) fleurinp_change.append(change) - if correct_val_charge: # only needed in certain methods - charge_change = ('add_num_to_att', { - 'xpathn': '/fleurInput/calculationSetup/bzIntegration', - 'attributename' : 'valenceElectrons', - 'set_val' : -1.0000,#-hole_charge, #one electron was added by ingen, we remove it - 'mode' : 'abs', - 'occ' : [0], - 'create' : False}) + if correct_val_charge: # only needed in certain methods + charge_change = ( + 'add_num_to_att', + { + 'xpathn': '/fleurInput/calculationSetup/bzIntegration', + 'attributename': 'valenceElectrons', + 'set_val': -1.0000, #-hole_charge, #one electron was added by ingen, we remove it + 'mode': 'abs', + 'occ': [0], + }) fleurinp_change.append(charge_change) - elif hole_charge != 1.0:# fractional valence hole - charge_change = ('add_num_to_att', { - 'xpathn': '/fleurInput/calculationSetup/bzIntegration', - 'attributename' : 'valenceElectrons', - 'set_val' : -1.0000+hole_charge, # one electron was already added by inpgen - 'mode' : 'abs', - 'occ' : [0], - 'create' : False}) + elif hole_charge != 1.0: # fractional valence hole + charge_change = ( + 'add_num_to_att', + { + 'xpathn': '/fleurInput/calculationSetup/bzIntegration', + 'attributename': 'valenceElectrons', + 'set_val': -1.0000 + hole_charge, # one electron was already added by inpgen + 'mode': 'abs', + 'occ': [0], + }) fleurinp_change.append(charge_change) - if self.ctx.magnetic: # Do a collinear magentic calculation - charge_change = ('set_inpchanges', {'change_dict' : {'jspins' : 2}}) + if self.ctx.magnetic: # Do a collinear magentic calculation + charge_change = ('set_inpchanges', {'change_dict': {'jspins': 2}}) fleurinp_change.append(charge_change) #self.report('{}'.format(fleurinp_change)) # because there might be already some kinds and another number is right... # repacking of sites, because input to a calcfunction, otherwise not storeable... - corehole = {'site' : {'kind_name' : kind,#site.kind_name, - 'position' : site.position}, - 'econfig' : econfig, 'kindname' : change_kind, - 'inpxml_changes' : fleurinp_change} + corehole = { + 'site': { + 'kind_name': kind, #site.kind_name, + 'position': site.position + }, + 'econfig': econfig, + 'kindname': change_kind, + 'inpxml_changes': fleurinp_change + } corehole_to_create.append(corehole) - #state_tag_list = get_state_occ(econfigstr, corehole = '', valence = '', ch_occ = 1.0): # lesson go over site position to get atom in supercell @@ -610,11 +643,11 @@ def create_coreholes(self): moved_struc = ret_dict['moved_struc'] calc_para = ret_dict['hole_para'] #print('calc_para:') - pprint(calc_para.get_dict()) - pprint('inpxml_changes {}'.format(corehole['inpxml_changes'])) + #pprint(calc_para.get_dict()) + #pprint('inpxml_changes {}'.format(corehole['inpxml_changes'])) # create_wf para or write in last line what should be in 'fleur_change' # for scf, which with the changes in the inp.xml needed - para = self.ctx.scf_para.copy() # Otherwise inline edit... What about Provenance? TODO check + para = self.ctx.scf_para.copy() # Otherwise inline edit... What about Provenance? TODO check if para == 'default': wf_parameter = {} else: @@ -628,6 +661,7 @@ def create_coreholes(self): self.ctx.calcs_torun = calcs #print('ctx.calcs_torun {}'.format(self.ctx.calcs_torun)) #self.report('INFO: end of create coreholes') + ''' def run_scf2(self): """ @@ -653,7 +687,6 @@ def run_scf2(self): return ToContext(**calcs)# this is a blocking return ''' - def run_ref_scf(self): """ Run a scf for the reference super cell @@ -661,8 +694,7 @@ def run_ref_scf(self): # TODO: idea instead of a list, just use a dictionary... self.report('INFO: In run_ref_scf fleur_corehole_wc') - - + print('INFO: In run_ref_scf fleur_corehole_wc') para = self.ctx.scf_para if para == 'default': wf_parameter = {} @@ -671,14 +703,13 @@ def run_ref_scf(self): wf_parameter['serial'] = self.ctx.serial wf_parameters = Dict(dict=wf_parameter) options = Dict(dict=self.ctx.options) - ''' #res_all = [] calcs = {} i = 0 for node in self.ctx.calcs_ref_torun: # usually just 1, but we leave the default. - print node + #print(node) i = i+1 if isinstance(node, StructureData): res = fleur_scf_wc.run(wf_parameters=wf_parameters, structure=node, @@ -688,7 +719,7 @@ def run_ref_scf(self): inpgen = self.inputs.inpgen, fleur=self.inputs.fleur)# elif isinstance(node, tuple): if isinstance(node[0], StructureData) and isinstance(node[1], Dict): - print(node[1].get_dict()) + #print(node[1].get_dict()) res = fleur_scf_wc.run(wf_parameters=wf_parameters, calc_parameters=node[1], structure=node[0], inpgen = self.inputs.inpgen, fleur=self.inputs.fleur)# else: @@ -710,23 +741,44 @@ def run_ref_scf(self): scf_label = 'corehole_wc ref cell' scf_desc = '|corehole_wc|' i = 0 - for node in self.ctx.calcs_ref_torun: # usually just 1, but we leave the default. + for node in self.ctx.calcs_ref_torun: # usually just 1, but we leave the default. #print node - i = i+1 + i = i + 1 if isinstance(node, StructureData): - res = self.submit(FleurScfWorkChain, wf_parameters=wf_parameters, structure=node, - inpgen=self.inputs.inpgen, fleur=self.inputs.fleur, options=options, - label=scf_label, description=scf_desc)# + res = self.submit(FleurScfWorkChain, + wf_parameters=wf_parameters, + structure=node, + inpgen=self.inputs.inpgen, + fleur=self.inputs.fleur, + options=options, + metadata={ + 'label': scf_label, + 'description': scf_desc + }) # elif isinstance(node, FleurinpData): - res = self.submit(FleurScfWorkChain, wf_parameters=wf_parameters, structure=node, - inpgen=self.inputs.inpgen, fleur=self.inputs.fleur, options=options, - label=scf_label, _description=scf_desc)# + res = self.submit(FleurScfWorkChain, + wf_parameters=wf_parameters, + structure=node, + inpgen=self.inputs.inpgen, + fleur=self.inputs.fleur, + options=options, + metadata={ + 'label': scf_label, + 'description': scf_desc + }) # elif isinstance(node, list): if isinstance(node[0], StructureData) and isinstance(node[1], Dict): - res = self.submit(FleurScfWorkChain, wf_parameters=wf_parameters, options=options, - calc_parameters=node[1], structure=node[0], - inpgen=self.inputs.inpgen, fleur=self.inputs.fleur, - label=scf_label, description=scf_desc)# + res = self.submit(FleurScfWorkChain, + wf_parameters=wf_parameters, + options=options, + calc_parameters=node[1], + structure=node[0], + inpgen=self.inputs.inpgen, + fleur=self.inputs.fleur, + metadata={ + 'label': scf_label, + 'description': scf_desc + }) # else: self.report('WARNING: a tuple in run_ref_scf which I do not reconise: {}'.format(node)) else: @@ -741,7 +793,7 @@ def run_ref_scf(self): #self.ctx.calcs_res.append(res) self.ctx.calcs_ref_torun = [] - return ToContext(**calcs)# this is a blocking return + return ToContext(**calcs) # this is a blocking return def check_scf(self): """ @@ -749,7 +801,14 @@ def check_scf(self): If unsuccesful abort, because makes no sense to continue. """ #so far not implemented - pass + + for i, label in enumerate(self.ctx.labels): + calc = self.ctx[label] + print('collect results ...') + print(calc) + if not calc.is_finished_ok: + self.report('SCF workchain {} failed'.format(calc)) + print('SCF workchain {} failed'.format(calc)) def relaxation_needed(self): """ @@ -760,14 +819,10 @@ def relaxation_needed(self): if self.ctx.relax: # TODO check all forces of calculations forces_fine = True - if forces_fine: - return True - else: - return False + return bool(forces_fine) else: return False - def relax(self): """ Do structural relaxation for certain structures. @@ -778,13 +833,12 @@ def relax(self): # pass # # TODO run relax workflow - def run_scfs(self): """ Run a scf for the all corehole calculations in parallel super cell """ self.report('INFO: In run_scfs fleur_corehole_wc') - + print('INFO: In run_scfs fleur_corehole_wc') para = self.ctx.scf_para if para == 'default': wf_parameter = {} @@ -801,26 +855,47 @@ def run_scfs(self): scf_desc = '|corehole_wc|' # now in parallel #print self.ctx.ref_calcs_torun - i = 0 # + i = 0 # self.report('Calculations to launch : {}'.format(self.ctx.calcs_torun)) for node in self.ctx.calcs_torun: #print node - i = i+1 + i = i + 1 if isinstance(node, StructureData): - res = self.submit(FleurScfWorkChain, wf_parameters=wf_parameters, structure=node, - inpgen=self.inputs.inpgen, fleur=self.inputs.fleur, options=options, - label=scf_label, description=scf_desc)# + res = self.submit(FleurScfWorkChain, + wf_parameters=wf_parameters, + structure=node, + inpgen=self.inputs.inpgen, + fleur=self.inputs.fleur, + options=options, + metadata={ + 'label': scf_label, + 'description': scf_desc + }) # elif isinstance(node, FleurinpData): - res = self.submit(FleurScfWorkChain, wf_parameters=wf_parameters, structure=node, - inpgen=self.inputs.inpgen, fleur=self.inputs.fleur, options=options, - label=scf_label, description=scf_desc)# + res = self.submit(FleurScfWorkChain, + wf_parameters=wf_parameters, + structure=node, + inpgen=self.inputs.inpgen, + fleur=self.inputs.fleur, + options=options, + metadata={ + 'label': scf_label, + 'description': scf_desc + }) # elif isinstance(node, list): if isinstance(node[0], StructureData) and isinstance(node[1], Dict): if isinstance(node[2], Dict): - res = self.submit(FleurScfWorkChain, wf_parameters=node[2], - calc_parameters=node[1], structure=node[0], options=options, - inpgen=self.inputs.inpgen, fleur=self.inputs.fleur, - label=scf_label, description=scf_desc)# + res = self.submit(FleurScfWorkChain, + wf_parameters=node[2], + calc_parameters=node[1], + structure=node[0], + options=options, + inpgen=self.inputs.inpgen, + fleur=self.inputs.fleur, + metadata={ + 'label': scf_label, + 'description': scf_desc + }) # else: self.report('ERROR: Something in run_scfs which I do not recognize: {}'.format(node)) continue @@ -834,9 +909,9 @@ def run_scfs(self): #self.ctx.calcs_res.append(res) #self.ctx.calcs_torun.remove(node) #print res + self.to_context(**{label: res}) self.ctx.calcs_torun = [] - return ToContext(**calcs) - + #return ToContext(**calcs) def collect_results(self): """ @@ -853,32 +928,37 @@ def collect_results(self): ref_calcs = [] ref_cl_energies = {} cl_energies = {} - bindingenergies = [] # atomtype, binding eneergy - weighted_binding_energies = [] # *(1+1- coreholecharge) + bindingenergies = [] # atomtype, binding eneergy + weighted_binding_energies = [] # *(1+1- coreholecharge) calcs = [] # get results from calc/scf #calcs = self.ctx.calcs_res for i, label in enumerate(self.ctx.labels): calc = self.ctx[label] + #print('collect results ...') + #print(calc) + #if not calc.is_finished_ok: + # print('calculation failed') + # continue if i == 0: ref_calcs.append(calc) else: calcs.append(calc) fermi_energies, bandgaps, atomtypes, all_corelevel, total_energies = extract_results_corehole(calcs) - ref_fermi_energies, ref_bandgaps, ref_atomtypes, ref_all_corelevel, ref_total_energies = extract_results_corehole(ref_calcs) - + ref_fermi_energies, ref_bandgaps, ref_atomtypes, ref_all_corelevel, ref_total_energies = extract_results_corehole( + ref_calcs) # now calculate binding energies of the coreholes. # Differences of total energies #for number, energy in total_energies:#.iteritems(): - for energy in total_energies:#.iteritems(): + for energy in total_energies: #.iteritems(): #print ref_total_energies - bde = energy - ref_total_energies[0]#.get('0', 0) + bde = energy - ref_total_energies[0] #.get('0', 0) bindingenergies.append(bde) hole_charge = self.ctx.hole_charge if hole_charge != 0.0: - weighted_binding_energy = bde * (1.0/hole_charge) + weighted_binding_energy = bde * (1.0 / hole_charge) else: weighted_binding_energy = bde weighted_binding_energies.append(weighted_binding_energy) @@ -896,9 +976,9 @@ def collect_results(self): self.ctx.ref_total_energies = ref_total_energies self.ctx.bindingenergies = bindingenergies self.ctx.wbindingenergies = weighted_binding_energies - print(bindingenergies) - print(weighted_binding_energies) - return + #print(bindingenergies) + #print(weighted_binding_energies) + #return def return_results(self): """ @@ -914,7 +994,7 @@ def return_results(self): # call one routine, that will set all variables in the ctx #cl, cls, ref_cl, efermi, gap, ref_efermi, ref_gap, at, at_ref, te, te_ref = self.collect_results() # check if this should be called - if self.ctx.successful: # TODO parse partially results... + if self.ctx.successful: # TODO parse partially results... self.collect_results() outputnode_dict = {} @@ -929,18 +1009,18 @@ def return_results(self): outputnode_dict['total_energy_all_units'] = 'eV' outputnode_dict['binding_energy'] = self.ctx.bindingenergies outputnode_dict['binding_energy_units'] = 'eV' - outputnode_dict['weighted_binding_energy'] = self.ctx.wbindingenergies # BE for scaled hole charge 1.0 + outputnode_dict['weighted_binding_energy'] = self.ctx.wbindingenergies # BE for scaled hole charge 1.0 outputnode_dict['weighted_binding_energy_units'] = 'eV' outputnode_dict['binding_energy_convention'] = 'negativ' outputnode_dict['corehole_type'] = self.ctx.method - outputnode_dict['coreholes_calculated'] = '' # on what atom what level basicly description of the other lists - outputnode_dict['coreholes_calculated_details'] = '' # the dict internally used + outputnode_dict['coreholes_calculated'] = '' # on what atom what level basicly description of the other lists + outputnode_dict['coreholes_calculated_details'] = '' # the dict internally used #outputnode_dict['corelevel_energies'] = cl #outputnode_dict['reference_corelevel_energies'] = ref_cl outputnode_dict['fermi_energy'] = self.ctx.fermi_energies outputnode_dict['fermi_energy_unit'] = 'eV' - outputnode_dict['coresetup'] = []#cls - outputnode_dict['reference_coresetup'] = []#cls + outputnode_dict['coresetup'] = [] #cls + outputnode_dict['reference_coresetup'] = [] #cls outputnode_dict['bandgap'] = self.ctx.bandgaps outputnode_dict['bandgap_units'] = 'eV' outputnode_dict['reference_bandgaps'] = self.ctx.ref_bandgaps @@ -958,10 +1038,16 @@ def return_results(self): outnode = Dict(dict=outputnode_dict) outnodedict['results_node'] = outnode - # TODO: bad design, put in calcfunction and make bullet proof. + # TODO: bad design, make bullet proof. for i, label in enumerate(self.ctx.labels): calc = self.ctx[label] - calc_dict = calc.outputs.output_scf_wc_para + #print(calc) + #print(calc.get_outgoing().all()) + try: + calc_dict = calc.get_outgoing().get_node_by_label( + 'output_scf_wc_para') #calc.outputs.output_scf_wc_para + except (KeyError, ValueError): + print('continue 2') outnodedict[label] = calc_dict outdict = create_corehole_result_node(**outnodedict) @@ -974,8 +1060,6 @@ def return_results(self): msg = ('INFO: fleur_corehole_wc workflow Done') self.report(msg) - - def control_end_wc(self, errormsg): """ Controled way to shutdown the workchain. @@ -987,11 +1071,10 @@ def control_end_wc(self, errormsg): self.ctx.errors.append(errormsg) self.report(errormsg) self.return_results() - return @cf -def create_corehole_result_node(**kwargs):#*args): +def create_corehole_result_node(**kwargs): #*args): """ This is a pseudo wf, to create the rigth graph structure of AiiDA. This wokfunction will create the output node in the database. @@ -1008,13 +1091,14 @@ def create_corehole_result_node(**kwargs):#*args): return outdict - # corehole = {'site' : {'kind_name' : change_kind,#site.kind_name, # 'position' : site.position}, # 'econfig' : econfig, 'kindname' : kind, # 'inpxml_changes' : fleurinp_change} @cf -def prepare_struc_corehole_wf(base_supercell, wf_para, para):#, _label='prepare_struc_corehole_wf', _description='WF, used in the corehole_wc, breaks the symmetry and moves the cell, prepares the inpgen parameters for a corehole.'): +def prepare_struc_corehole_wf( + base_supercell, wf_para, para +): #, _label='prepare_struc_corehole_wf', _description='WF, used in the corehole_wc, breaks the symmetry and moves the cell, prepares the inpgen parameters for a corehole.'): """ calcfunction which does all/some the structure+calcparameter manipulations together (therefore less nodes are produced and proverance is kept) @@ -1027,15 +1111,20 @@ def prepare_struc_corehole_wf(base_supercell, wf_para, para):#, _label='prepare_ # has to be repacked, site object is not jason serializable... site_info = wf_para_dict['site'] #site = Site(kind_name=site_info['kind_name'], position=site_info['position']) - pos = site_info['position']#site.position + pos = site_info['position'] #site.position species_name = wf_para_dict['kindname'] broke_kn = site_info['kind_name'] - new_kinds_names = {broke_kn : [species_name]} + new_kinds_names = {broke_kn: [species_name]} #print pos npos = -np.array(pos) # break the symmetry, make corehole atoms its own species. # pos has to be tuple, unpack problem here.. #TODO rather not so nice - new_struc, new_para = break_symmetry(base_supercell, atoms=[], site=[], pos=[(pos[0], pos[1], pos[2])], new_kinds_names=new_kinds_names, Dict=para) + new_struc, new_para = break_symmetry(base_supercell, + atoms=[], + site=[], + pos=[(pos[0], pos[1], pos[2])], + new_kinds_names=new_kinds_names, + parameterdata=para) #kinds = new_struc.kinds #for kind in kinds: # if kind.name == broke_kn: @@ -1044,12 +1133,16 @@ def prepare_struc_corehole_wf(base_supercell, wf_para, para):#, _label='prepare_ # move unit cell that impurity is in 0,0,0 moved_struc = move_atoms_incell(new_struc, npos) # Make sure to provide a parameter node otherwise create_corhole para won't work - para = create_corehole_para(moved_struc, species_name,#wf_para_dict['kindname'], - wf_para_dict['econfig'], - Dict=new_para, species_name=species_name) + para = create_corehole_para( + moved_struc, + species_name, #wf_para_dict['kindname'], + wf_para_dict['econfig'], + parameterdata=new_para, + species_name=species_name) # return of a wf has to be dictionary of nodes... - return {'moved_struc' : moved_struc, 'hole_para' : para} + return {'moved_struc': moved_struc, 'hole_para': para} + def extract_results_corehole(calcs): """ @@ -1062,8 +1155,14 @@ def extract_results_corehole(calcs): calc_uuids = [] for calc in calcs: - #print(calc) - calc_uuids.append(calc.outputs.output_scf_wc_para.get_dict()['last_calc_uuid']) + print(calc) + print(calc.exit_status, calc.exit_message) + print(calc.get_outgoing().all()) + try: + calc_uuids.append(calc.outputs.output_scf_wc_para.get_dict()['last_calc_uuid']) + except (KeyError, AttributeError): + print('continue') + continue #calc_uuids.append(calc['output_scf_wc_para'].get_dict()['last_calc_uuid']) #print(calc_uuids) @@ -1083,15 +1182,19 @@ def extract_results_corehole(calcs): # check if calculation pks belong to successful fleur calculations for i, uuid in enumerate(calc_uuids): calc = load_node(uuid) - if (not isinstance(calc, FleurCalculation)): + if not isinstance(calc, CalcJobNode): #raise ValueError("Calculation with pk {} must be a FleurCalculation".format(pk)) # log and continue continue - if not calc.is_finished_ok: + if calc.is_finished_ok: # get out.xml file of calculation - outxml = calc.outputs.retrieved.folder.get_abs_path('path/out.xml') + #outxml = calc.outputs.retrieved.folder.get_abs_path('path/out.xml') + outxml = calc.outputs.retrieved.open('out.xml') #print outxml - corelevels, atomtypes = extract_corelevels(outxml) + try: + corelevels, atomtypes = extract_corelevels(outxml) + finally: + outxml.close() #all_corelevels.append(core) #print('corelevels: {}'.format(corelevels)) #print('atomtypes: {}'.format(atomtypes)) @@ -1120,11 +1223,11 @@ def extract_results_corehole(calcs): #all_total_energies[number] = total_energy else: # log and continue - total_energy = float('nan') - bandgap = float('nan') - efermi = float('nan') - corelevels = [float('nan')] - atomtypes = [float('nan')] + total_energy = 2e308 #float('nan')) + bandgap = 2e308 #float('nan') + efermi = 2e308 #float('nan') + corelevels = [2e308] #[float('nan')] + atomtypes = [2e308] #[float('nan')] #continue #raise ValueError("Calculation with pk {} must be in state FINISHED".format(pk)) fermi_energies.append(efermi) diff --git a/aiida_fleur/workflows/create_magnetic_film.py b/aiida_fleur/workflows/create_magnetic_film.py index 127b532ee..25224d5df 100644 --- a/aiida_fleur/workflows/create_magnetic_film.py +++ b/aiida_fleur/workflows/create_magnetic_film.py @@ -9,7 +9,6 @@ # For further information please visit http://www.flapw.de or # # http://aiida-fleur.readthedocs.io/en/develop/ # ############################################################################### - """ In this module you find the workflow 'FleurCreateMagneticWorkChain' for creation of relaxed film deposited on a cubic substrate. @@ -21,36 +20,33 @@ from aiida.engine import WorkChain, if_ from aiida.engine import calcfunction as cf -from aiida.plugins import DataFactory -from aiida.orm import StructureData, Dict +from aiida.orm import StructureData, Dict, Float, load_node, Str from aiida.common import AttributeDict +from aiida.common.exceptions import NotExistent -from aiida_fleur.tools.common_fleur_wf import test_and_get_codenode from aiida_fleur.workflows.eos import FleurEosWorkChain from aiida_fleur.workflows.base_relax import FleurBaseRelaxWorkChain -from aiida_fleur.data.fleurinp import FleurinpData - class FleurCreateMagneticWorkChain(WorkChain): """ This workflow creates relaxed magnetic film on a substrate. """ - - _workflowversion = "0.1.1" + _workflowversion = '0.1.2' _wf_default = { 'lattice': 'fcc', - 'miller': [[-1, 1, 0], - [0, 0, 1], - [1, 1, 0]], + 'miller': [[-1, 1, 0], [0, 0, 1], [1, 1, 0]], 'host_symbol': 'Pt', - 'latticeconstant': 4.0, + 'latticeconstant': 4.0, # if equals to 0, use distance_suggestion 'size': (1, 1, 5), - 'replacements': {0: 'Fe', -1: 'Fe'}, + 'replacements': { + 0: 'Fe', + -1: 'Fe' + }, + 'hold_n_first_layers': 3, 'decimals': 10, 'pop_last_layers': 1, - 'total_number_layers': 4, 'num_relaxed_layers': 2 } @@ -58,34 +54,37 @@ class FleurCreateMagneticWorkChain(WorkChain): @classmethod def define(cls, spec): super(FleurCreateMagneticWorkChain, cls).define(spec) - spec.expose_inputs(FleurEosWorkChain, namespace='eos', exclude=('structure', )) - spec.expose_inputs(FleurBaseRelaxWorkChain, namespace='relax', exclude=('structure', )) - spec.input("wf_parameters", valid_type=Dict, required=False) - spec.input("eos_output", valid_type=Dict, required=False) - spec.input("optimized_structure", valid_type=StructureData, required=False) - - spec.outline( - cls.start, - if_(cls.eos_needed)( - cls.run_eos, - ), - if_(cls.relax_needed)( - cls.run_relax, - ), - cls.make_magnetic - ) + spec.expose_inputs(FleurEosWorkChain, + namespace_options={ + 'required': False, + 'populate_defaults': False + }, + namespace='eos', + exclude=('structure',)) + spec.expose_inputs(FleurBaseRelaxWorkChain, + namespace_options={ + 'required': False, + 'populate_defaults': False + }, + namespace='relax', + exclude=('structure',)) + spec.input('wf_parameters', valid_type=Dict, required=False) + spec.input('eos_output', valid_type=Dict, required=False) + spec.input('optimized_structure', valid_type=StructureData, required=False) + spec.input('distance_suggestion', valid_type=Dict, required=False) + + spec.outline(cls.start, + if_(cls.eos_needed)(cls.run_eos,), + if_(cls.relax_needed)(cls.run_relax,), cls.make_magnetic) spec.output('magnetic_structure', valid_type=StructureData) # exit codes - spec.exit_code(230, 'ERROR_INVALID_INPUT_PARAM', - message="Invalid workchain parameters.") - spec.exit_code(231, 'ERROR_INVALID_INPUT_CONFIG', - message="Invalid input configuration.") - spec.exit_code(380, 'ERROR_NOT_SUPPORTED_LATTICE', - message="Specified substrate has to be bcc or fcc.") - spec.exit_code(382, 'ERROR_RELAX_FAILED', - message="Relaxation calculation failed.") + spec.exit_code(230, 'ERROR_INVALID_INPUT_PARAM', message='Invalid workchain parameters.') + spec.exit_code(231, 'ERROR_INVALID_INPUT_CONFIG', message='Invalid input configuration.') + spec.exit_code(380, 'ERROR_NOT_SUPPORTED_LATTICE', message='Specified substrate has to be bcc or fcc.') + spec.exit_code(382, 'ERROR_RELAX_FAILED', message='Relaxation calculation failed.') + spec.exit_code(383, 'ERROR_EOS_FAILED', message='EOS WorkChain failed.') def eos_needed(self): """ @@ -99,7 +98,10 @@ def prepare_eos(self): wf_param, options, calculation parameters, codes, structure """ inputs = AttributeDict(self.exposed_inputs(FleurEosWorkChain, namespace='eos')) - inputs.structure = self.create_substrate_bulk() + inputs.metadata.label = 'EOS_substrate' + inputs.metadata.description = 'The EOS workchain finding equilibrium substrate' + # Here wf_dict nodes appears out of nowwhere. + inputs.structure = create_substrate_bulk(Dict(dict=self.ctx.wf_dict)) if not isinstance(inputs.structure, StructureData): return inputs, inputs.structure # exit code thrown in create_substrate_bulk @@ -110,49 +112,25 @@ def run_eos(self): """ Optimize lattice parameter for substrate bulk structure. """ + self.report('INFO: submit EOS WorkChain') inputs = {} inputs, error = self.prepare_eos() - if not error: + if error: return error res = self.submit(FleurEosWorkChain, **inputs) self.to_context(eos_wc=res) - def create_substrate_bulk(self): - """ - Create a bulk structure of a substrate. - """ - lattice = self.ctx.wf_dict['lattice'] - if lattice == 'fcc': - from ase.lattice.cubic import FaceCenteredCubic - structure_factory = FaceCenteredCubic - elif lattice == 'bcc': - from ase.lattice.cubic import BodyCenteredCubic - structure_factory = BodyCenteredCubic - else: - return self.ctx.exit_codes.ERROR_NOT_SUPPORTED_LATTICE - - miller = [[1, 0, 0], - [0, 1, 0], - [0, 0, 1]] - host_symbol = self.ctx.wf_dict['host_symbol'] - latticeconstant = self.ctx.wf_dict['latticeconstant'] - size = (1, 1, 1) - structure = structure_factory(miller=miller, symbol=host_symbol, pbc=(1, 1, 1), - latticeconstant=latticeconstant, size=size) - - return StructureData(ase=structure) - def start(self): """ Retrieve and initialize paramters of the WorkChain """ - self.report('INFO: started Create Magnetic Film' - ' workflow version {}\n'.format(self._workflowversion)) + self.report('INFO: started Create Magnetic Film' ' workflow version {}\n'.format(self._workflowversion)) self.ctx.info = [] self.ctx.warnings = [] self.ctx.errors = [] self.ctx.energy_dict = [] + self.ctx.substrate = None # initialize the dictionary using defaults if no wf paramters are given wf_default = copy.deepcopy(self._wf_default) @@ -163,11 +141,10 @@ def start(self): extra_keys = [] for key in wf_dict.keys(): - if key not in wf_default.keys(): + if key not in list(wf_default.keys()): extra_keys.append(key) if extra_keys: - error = 'ERROR: input wf_parameters for Create Magnetic contains extra keys: {}'.format( - extra_keys) + error = 'ERROR: input wf_parameters for Create Magnetic contains extra keys: {}'.format(extra_keys) self.report(error) return self.exit_codes.ERROR_INVALID_INPUT_PARAM @@ -177,57 +154,97 @@ def start(self): self.ctx.wf_dict = wf_dict inputs = self.inputs - if inputs.eos: + if 'eos' in inputs: + self.report('INFO: EOS workchain will be submitted') self.ctx.eos_needed = True self.ctx.relax_needed = True if 'eos_output' in inputs: self.report('ERROR: you specified both eos_output and eos wc inputs.') - return self.ctx.exit_codes.ERROR_INVALID_INPUT_CONFIG - if not inputs.relax: + return self.exit_codes.ERROR_INVALID_INPUT_CONFIG + if 'relax' not in inputs: self.report('ERROR: no relax wc input was given despite EOS is needed.') - return self.ctx.exit_codes.ERROR_INVALID_INPUT_CONFIG + return self.exit_codes.ERROR_INVALID_INPUT_CONFIG if 'optimized_structure' in inputs: self.report('ERROR: optimized structure was given despite EOS is needed.') - return self.ctx.exit_codes.ERROR_INVALID_INPUT_CONFIG + return self.exit_codes.ERROR_INVALID_INPUT_CONFIG else: if 'eos_output' in inputs: + self.report('INFO: Outputs of the given EOS workchain will be used for relaxation') self.ctx.eos_needed = False self.ctx.relax_needed = True - if not inputs.relax: + if 'relax' not in inputs: self.report('ERROR: no relax wc input was given despite EOS is needed.') - return self.ctx.exit_codes.ERROR_INVALID_INPUT_CONFIG + return self.exit_codes.ERROR_INVALID_INPUT_CONFIG if 'optimized_structure' in inputs: self.report('ERROR: optimized structure was given despite relax is needed.') - return self.ctx.exit_codes.ERROR_INVALID_INPUT_CONFIG + return self.exit_codes.ERROR_INVALID_INPUT_CONFIG else: if 'optimized_structure' in inputs: + self.report('INFO: given relaxed structure will be used, no EOS or relax WC') self.ctx.eos_needed = False self.ctx.relax_needed = False - if inputs.relax: - if inputs.relax: - self.report('ERROR: relax wc input was given but relax is not needed.') - return self.ctx.exit_codes.ERROR_INVALID_INPUT_CONFIG + if 'relax' in inputs: + self.report('ERROR: relax wc input was given but relax is not needed.') + return self.exit_codes.ERROR_INVALID_INPUT_CONFIG else: self.ctx.eos_needed = False self.ctx.relax_needed = True - if inputs.relax: - if not inputs.relax: - self.report('ERROR: relax wc input was not given but relax is needed.') - return self.ctx.exit_codes.ERROR_INVALID_INPUT_CONFIG + self.report('INFO: relaxation will be continued; no EOS') + if 'relax' not in inputs: + self.report('ERROR: relax wc input was not given but relax is needed.') + return self.exit_codes.ERROR_INVALID_INPUT_CONFIG + + if 'relax' in inputs and 'distance_suggestion' not in inputs: + if 'eos' or 'eos_output' in inputs: + self.report('ERROR: relax wc input was given but distance_suggestion was not.') + return self.exit_codes.ERROR_INVALID_INPUT_CONFIG + + if self.ctx.wf_dict['latticeconstant'] == 0 and 'distance_suggestion' not in inputs: + self.report('ERROR: latticeconstant equals to 0 but distance_suggestion was not given.') + return self.exit_codes.ERROR_INVALID_INPUT_CONFIG + + if not self.ctx.wf_dict['latticeconstant']: + from numpy import sqrt + host_symbol = self.ctx.wf_dict['host_symbol'] + dict_suggestion = self.inputs.distance_suggestion.get_dict() + lattice = self.ctx.wf_dict['lattice'] + + if lattice == 'fcc': + suggestion_factor = sqrt(2) + elif lattice == 'bcc': + suggestion_factor = 2 / sqrt(3) + else: + return self.exit_codes.ERROR_NOT_SUPPORTED_LATTICE + + suggestion = dict_suggestion.get(lattice, dict_suggestion[host_symbol]).get(host_symbol, 4.0) + + self.ctx.wf_dict['latticeconstant'] = float(suggestion_factor * suggestion) def relax_needed(self): """ Returns true if interlayer relaxation should be performed. """ + if self.ctx.eos_needed or 'eos_output' in self.inputs: + if not self.ctx.eos_needed: + eos_output = self.inputs.eos_output + else: + try: + eos_output = self.ctx.eos_wc.outputs.output_eos_wc_para + except NotExistent: + return self.ctx.ERROR_EOS_FAILED + + self.ctx.scaling_param = eos_output.get_dict()['scaling_gs'] + return self.ctx.relax_needed def run_relax(self): """ Optimize interlayer distance. """ + self.report('INFO: submit Relaxation WorkChain') inputs = {} inputs, error = self.prepare_relax() - if not error: + if error: return error res = self.submit(FleurBaseRelaxWorkChain, **inputs) self.to_context(relax_wc=res) @@ -237,70 +254,70 @@ def prepare_relax(self): Initialise inputs for Relax workchain """ inputs = AttributeDict(self.exposed_inputs(FleurBaseRelaxWorkChain, namespace='relax')) + inputs.metadata.label = 'Relax_symmetric_film' + inputs.metadata.description = 'The Relax workchain relaxing film structure' if self.ctx.eos_needed or 'eos_output' in self.inputs: - inputs.scf.structure = self.create_film_to_relax() + if not self.ctx.eos_needed: + eos_output = self.inputs.eos_output + else: + try: + eos_output = self.ctx.eos_wc.outputs.output_eos_wc_para + except NotExistent: + return self.ctx.ERROR_EOS_FAILED + # print(eos_output.get_dict()) + scaling_param = eos_output.get_dict()['scaling_gs'] + + out_create_structure = create_film_to_relax(wf_dict_node=Dict(dict=self.ctx.wf_dict), + scaling_parameter=Float(scaling_param), + suggestion_node=self.inputs.distance_suggestion) + inputs.scf.structure = out_create_structure['structure'] + substrate = out_create_structure['substrate'] + # TODO: error handling might be needed + self.ctx.substrate = substrate.uuid # can not store aiida data nodes directly in ctx. if not isinstance(inputs.scf.structure, StructureData): return inputs, inputs.scf.structure return inputs, None - def create_film_to_relax(self): - """ - Create a film structure those interlayers will be relaxed. - """ - from aiida_fleur.tools.StructureData_util import create_manual_slab_ase, center_film - - miller = self.ctx.wf_dict['miller'] - host_symbol = self.ctx.wf_dict['host_symbol'] - if not self.ctx.eos_needed: - eos_output = self.inputs.eos_output - else: - eos_output = self.ctx.eos_wc.outputs.output_eos_wc_para - scaling_parameter = eos_output.get_dict()['scaling_gs'] - latticeconstant = self.ctx.wf_dict['latticeconstant'] * scaling_parameter - size = self.ctx.wf_dict['size'] - replacements = self.ctx.wf_dict['replacements'] - pop_last_layers = self.ctx.wf_dict['pop_last_layers'] - decimals = self.ctx.wf_dict['decimals'] - structure = create_manual_slab_ase(miller=miller, host_symbol=host_symbol, - latticeconstant=latticeconstant, size=size, - replacements=replacements, decimals=decimals, - pop_last_layers=pop_last_layers) - - self.ctx.substrate = create_manual_slab_ase(miller=miller, host_symbol=host_symbol, - latticeconstant=latticeconstant, size=(1, 1, 1), - replacements=None, decimals=decimals) - - centered_structure = center_film(StructureData(ase=structure)) - - return centered_structure - def make_magnetic(self): """ Analuses outputs of previous steps and generated the final structure suitable for magnetic film calculations. """ - from aiida_fleur.tools.StructureData_util import magnetic_slab_from_relaxed - if not self.ctx.relax_wc.is_finished_ok: - return self.exit_codes.ERROR_RELAX_FAILED + if 'optimized_structure' not in self.inputs: + if not self.ctx.relax_wc.is_finished_ok: + return self.exit_codes.ERROR_RELAX_FAILED if self.ctx.relax_needed: optimized_structure = self.ctx.relax_wc.outputs.optimized_structure else: optimized_structure = self.inputs.optimized_structure - magnetic = magnetic_slab_from_relaxed(optimized_structure, self.ctx.substrate, - self.ctx.wf_dict['total_number_layers'], - self.ctx.wf_dict['num_relaxed_layers']) + para_dict = { + 'total_number_layers': self.ctx.wf_dict['total_number_layers'], + 'num_relaxed_layers': self.ctx.wf_dict['num_relaxed_layers'] + } + + if not self.ctx.substrate: # workchain was stated from remote->Relax or optimized_structure + if 'optimized_structure' in self.inputs: + self.ctx.substrate = find_substrate(structure=self.inputs['optimized_structure']) + else: + self.ctx.substrate = find_substrate(remote=self.inputs.relax.scf.remote_data) - magnetic = save_structure(magnetic) + # to track the provenance from which structures it was created + magnetic = magnetic_slab_from_relaxed_cf(optimized_structure, load_node(self.ctx.substrate), + Dict(dict=para_dict)) + magnetic.label = 'magnetic_structure' + magnetic.description = ('Magnetic structure slab created within FleurCreateMagneticWorkChain, ' + 'created from : {} and {}'.format(optimized_structure.uuid, self.ctx.substrate)) self.out('magnetic_structure', magnetic) +''' @cf def save_structure(structure): """ @@ -308,3 +325,164 @@ def save_structure(structure): """ structure_return = structure.clone() return structure_return +''' + + +@cf +def magnetic_slab_from_relaxed_cf(optimized_structure, substrate, para_dict): + """ calcfunction which wraps magnetic_slab_from_relaxed to keep provenance """ + from aiida_fleur.tools.StructureData_util import magnetic_slab_from_relaxed + + magnetic = magnetic_slab_from_relaxed(optimized_structure, substrate, **para_dict.get_dict()) + + return magnetic + + +@cf +def create_substrate_bulk(wf_dict_node): + """ + Calcfunction to create a bulk structure of a substrate. + + :params wf_dict: AiiDA dict node with at least keys lattice, host_symbol and latticeconstant + (If they are not there, raises KeyError) + Lattice key supports only fcc and bcc + + raises ExitCode 380, ERROR_NOT_SUPPORTED_LATTICE + """ + + from aiida.engine import ExitCode + from ase.lattice.cubic import FaceCenteredCubic + from ase.lattice.cubic import BodyCenteredCubic + + wf_dict = wf_dict_node.get_dict() + lattice = wf_dict['lattice'] + if lattice == 'fcc': + structure_factory = FaceCenteredCubic + elif lattice == 'bcc': + structure_factory = BodyCenteredCubic + else: + return ExitCode(380, 'ERROR_NOT_SUPPORTED_LATTICE', message='Specified substrate has to be bcc or fcc.') + + miller = [[1, 0, 0], [0, 1, 0], [0, 0, 1]] + host_symbol = str(wf_dict['host_symbol']) + latticeconstant = float(wf_dict['latticeconstant']) + size = (1, 1, 1) + structure = structure_factory(miller=miller, + symbol=host_symbol, + pbc=(1, 1, 1), + latticeconstant=latticeconstant, + size=size) + + return StructureData(ase=structure) + + +@cf +def create_film_to_relax(wf_dict_node, scaling_parameter, suggestion_node): + """ + Create a film structure those interlayers will be relaxed. + """ + from aiida_fleur.tools.StructureData_util import create_manual_slab_ase, center_film, adjust_film_relaxation + + # scaling_parameter = eos_output.get_dict()['scaling_gs'] + wf_dict = wf_dict_node.get_dict() + scaling_parameter = float(scaling_parameter) + + miller = wf_dict['miller'] + host_symbol = wf_dict['host_symbol'] + latticeconstant = float(wf_dict['latticeconstant'] * scaling_parameter**(1 / 3.0)) + size = wf_dict['size'] + replacements = wf_dict['replacements'] + pop_last_layers = wf_dict['pop_last_layers'] + decimals = wf_dict['decimals'] + lattice = wf_dict['lattice'] + hold_layers = wf_dict['hold_n_first_layers'] + + structure = create_manual_slab_ase(lattice=lattice, + miller=miller, + host_symbol=host_symbol, + latticeconstant=latticeconstant, + size=size, + replacements=replacements, + decimals=decimals, + pop_last_layers=pop_last_layers) + + structure = StructureData(ase=structure) + + # substrate needs to be reversed + substrate = create_manual_slab_ase(lattice=lattice, + miller=miller, + host_symbol=host_symbol, + latticeconstant=latticeconstant, + size=(1, 1, 1), + replacements=None, + decimals=decimals, + inverse=True) + + tmp_substrate = create_manual_slab_ase(lattice=lattice, + miller=miller, + host_symbol=host_symbol, + latticeconstant=latticeconstant, + size=(2, 2, 2), + replacements=None, + decimals=decimals) + + bond_length = find_min_distance_unary_struct(tmp_substrate) + + suggestion = suggestion_node.get_dict() + + # structure will be reversed here + structure = adjust_film_relaxation(structure, suggestion, host_symbol, bond_length, hold_layers) + + centered_structure = center_film(structure) + + return {'structure': centered_structure, 'substrate': StructureData(ase=substrate)} + + +def find_min_distance_unary_struct(tmp_substrate): + """ + Finds a minimal distance beteween atoms in a unary structure. + + ..warning: + + Make sure tmp_substrate to have a non-primitive unit cell! + + """ + import numpy as np + distance = tmp_substrate.get_all_distances() + di = np.diag_indices(len(distance)) + distance[di] = 100 + bond_length = np.amin(distance) + return bond_length + + +def find_substrate(remote=None, structure=None): + """ + Finds the stored substrate structure. + If remote is given, goes up and tri + """ + from aiida_fleur.workflows.base_relax import find_inputs_relax + from aiida.plugins import DataFactory + + FleurinpData = DataFactory('fleur.fleurinp') + + if remote: + inputs = find_inputs_relax(remote) + elif structure: + from aiida.orm import WorkChainNode + inc_nodes = structure.get_incoming().all() + for link in inc_nodes: + if isinstance(link.node, WorkChainNode): + relax_wc = link.node + break + + if 'scf__remote_data' in relax_wc.inputs: + inputs = find_inputs_relax(relax_wc.inputs.scf__remote_data) + else: + return relax_wc.inputs.scf__structure.get_incoming().all()[0].node.get_outgoing().get_node_by_label( + 'substrate').uuid + + if isinstance(inputs, FleurinpData): + raise ValueError('Did not expect to find Relax WC started from FleurinpData') + else: + orig_structure = inputs[0] + return orig_structure.get_incoming().all()[0].node.get_outgoing().get_node_by_label('substrate').uuid diff --git a/aiida_fleur/workflows/delta.py b/aiida_fleur/workflows/delta.py index b8022548d..5df0bf867 100644 --- a/aiida_fleur/workflows/delta.py +++ b/aiida_fleur/workflows/delta.py @@ -9,7 +9,6 @@ # For further information please visit http://www.flapw.de or # # http://aiida-fleur.readthedocs.io/en/develop/ # ############################################################################### - """ In this module you find the worklfow 'fleur_delta_wc' which is a turnkey solution to calculate a delta for a given code with AiiDA. """ @@ -21,23 +20,20 @@ from __future__ import absolute_import from __future__ import print_function import os +import six from string import digits #from pprint import pprint from aiida.plugins import DataFactory from aiida.orm import Code, Group from aiida.orm import RemoteData, StructureData, Dict, SinglefileData -from aiida.engine import WorkChain, ToContext#, while_ +from aiida.engine import WorkChain, ToContext #, while_ #from aiida.work.process_registry import ProcessRegistry from aiida.engine import calcfunction as cf from aiida.engine import submit from aiida.common.exceptions import NotExistent -from aiida_fleur.workflows.eos import FleurEosWorkChain -import six - -#from aiida_fleur.tools.xml_util import eval_xpath2 -#from lxml import etree +from aiida_fleur.workflows.eos import FleurEosWorkChain from aiida_fleur.data.fleurinp import FleurinpData @@ -47,40 +43,52 @@ class fleur_delta_wc(WorkChain): group of structures in the database using a group of given parameter nodes in the database """ - _workflowversion = "0.3.2" + _workflowversion = '0.3.2' _wf_default = {} - @classmethod def define(cls, spec): super(fleur_delta_wc, cls).define(spec) - spec.input("wf_parameters", valid_type=Dict, required=False, - default=Dict(dict={'struc_group': 'delta', - 'para_group' : 'delta', - 'add_extra' : {'type' : 'delta run'}, - #'group_label' : 'delta_eos', - 'joblimit' : 100, - 'part' : [1,2,3,4], - 'points' : 7, - 'step' : 0.02})) - spec.input("options", valid_type=Dict, required=False, - default=Dict(dict={ - 'resources': {"num_machines": 1}, - 'walltime_sec': 60*60, - 'queue_name': '', - 'custom_scheduler_commands' : '', - 'import_sys_environment' : False, - 'environment_variables' : {}})) - spec.input("inpgen", valid_type=Code, required=True) - spec.input("fleur", valid_type=Code, required=True) + spec.input( + 'wf_parameters', + valid_type=Dict, + required=False, + default=Dict( + dict={ + 'struc_group': 'delta', + 'para_group': 'delta', + 'add_extra': { + 'type': 'delta run' + }, + #'group_label' : 'delta_eos', + 'joblimit': 100, + 'part': [1, 2, 3, 4], + 'points': 7, + 'step': 0.02 + })) + spec.input('options', + valid_type=Dict, + required=False, + default=Dict( + dict={ + 'resources': { + 'num_machines': 1 + }, + 'walltime_sec': 60 * 60, + 'queue_name': '', + 'custom_scheduler_commands': '', + 'import_sys_environment': False, + 'environment_variables': {} + })) + spec.input('inpgen', valid_type=Code, required=True) + spec.input('fleur', valid_type=Code, required=True) spec.outline( cls.start_up, #while_(cls.calculations_left_torun)( - cls.run_eos,#), + cls.run_eos, #), cls.extract_results_eos, cls.calculate_delta, cls.return_results, - ) #spec.dynamic_output() @@ -95,8 +103,8 @@ def start_up(self): #self.ctx.own_uuid = identifier.uuid #self.ctx.own_pk = identifier.pk - self.report('started delta workflow version {} with identifier: '#{}' - ''.format(self._workflowversion))#, identifier)) + self.report('started delta workflow version {} with identifier: ' #{}' + ''.format(self._workflowversion)) #, identifier)) # init self.ctx.calcs_to_run = [] @@ -104,18 +112,25 @@ def start_up(self): # check if right codes wf_dict = self.inputs.wf_parameters.get_dict() - options_dict = self.inputs.get('options', Dict(dict={'resources' : {"num_machines": 1}, 'walltime_sec': int(5.5*3600)})) + options_dict = self.inputs.get('options', + Dict(dict={ + 'resources': { + 'num_machines': 1 + }, + 'walltime_sec': int(5.5 * 3600) + })) self.ctx.inputs_eos = { 'fleur': self.inputs.fleur, 'inpgen': self.inputs.inpgen, - 'wf_parameters': - {'points' : wf_dict.get('points', 7), - 'step' : wf_dict.get('step', 0.02), - 'guess' : 1.0}, - 'options' : options_dict - } + 'wf_parameters': { + 'points': wf_dict.get('points', 7), + 'step': wf_dict.get('step', 0.02), + 'guess': 1.0 + }, + 'options': options_dict + } self.ctx.wc_eos_para = Dict(dict=self.ctx.inputs_eos.get('wf_parameters')) - self.ctx.ncalc = 1 # init + self.ctx.ncalc = 1 # init self.get_calcs_from_groups() self.ctx.successful = True self.ctx.warnings = [] @@ -124,19 +139,19 @@ def start_up(self): self.ctx.ncalcs = len(self.ctx.calcs_to_run) print((self.ctx.ncalcs)) print((self.ctx.ncalc)) - estimated_jobs = self.ctx.ncalc*wf_dict.get('points', 5) + estimated_jobs = self.ctx.ncalc * wf_dict.get('points', 5) joblimit = wf_dict.get('joblimit', 90) self.ctx.eos_run_steps = 1 self.ctx.eos_steps_done = 0 self.ctx.minindex = 0 - self.ctx.maxindex = self.ctx.ncalc -1 - self.ctx.eos_max_perstep = 10000 # init + self.ctx.maxindex = self.ctx.ncalc - 1 + self.ctx.eos_max_perstep = 10000 # init if estimated_jobs >= joblimit: - self.ctx.eos_run_steps = estimated_jobs/joblimit + 1 - self.ctx.eos_max_perstep = joblimit/wf_dict.get('points', 5) + self.ctx.eos_run_steps = estimated_jobs / joblimit + 1 + self.ctx.eos_max_perstep = joblimit / wf_dict.get('points', 5) # TODO be carefull if is not a divisor... of joblimit - self.ctx.maxindex = 0 # will be set later self.ctx.eos_max_perstep + self.ctx.maxindex = 0 # will be set later self.ctx.eos_max_perstep self.report('{} {}'.format(self.ctx.ncalc, self.ctx.eos_max_perstep)) self.report('Estimated fleur scfs to run {}, running in {} steps.' @@ -163,9 +178,9 @@ def get_calcs_from_groups(self): except NotExistent: str_group = None message = ('You have to provide a valid pk for a Group of' - 'structures or a Group name. Wf_para key: "struc_group".' - 'given pk= {} is not a valid group' - '(or is your group name integer?)'.format(group_pk)) + 'structures or a Group name. Wf_para key: "struc_group".' + 'given pk= {} is not a valid group' + '(or is your group name integer?)'.format(group_pk)) #print(message) self.report(message) self.abort_nowait('I abort, because I have no structures to calculate ...') @@ -175,14 +190,13 @@ def get_calcs_from_groups(self): except NotExistent: str_group = None message = ('You have to provide a valid pk for a Group of' - 'structures or a Group name. Wf_para key: "struc_group".' - 'given group name= {} is not a valid group' - '(or is your group name integer?)'.format(group_name)) + 'structures or a Group name. Wf_para key: "struc_group".' + 'given group name= {} is not a valid group' + '(or is your group name integer?)'.format(group_name)) #print(message) self.report(message) self.abort_nowait('I abort, because I have no structures to calculate ...') - #get all delta parameters para_gr = wf_dict.get('para_group', 'delta') @@ -192,7 +206,7 @@ def get_calcs_from_groups(self): self.report(message) try: - group_pk = int(para_gr ) + group_pk = int(para_gr) except ValueError: group_pk = None group_name = para_gr @@ -203,9 +217,9 @@ def get_calcs_from_groups(self): except NotExistent: para_group = None message = ('ERROR: You have to provide a valid pk for a Group of' - 'parameters or a Group name (or use None for inpgen defaults). Wf_para key: "para_group".' - 'given pk= {} is not a valid group' - '(or is your group name integer?)'.format(group_pk)) + 'parameters or a Group name (or use None for inpgen defaults). Wf_para key: "para_group".' + 'given pk= {} is not a valid group' + '(or is your group name integer?)'.format(group_pk)) #print(message) self.report(message) self.abort_nowait('ERROR: I abort, because I have no paremeters to calculate and ' @@ -216,9 +230,9 @@ def get_calcs_from_groups(self): except NotExistent: para_group = None message = ('ERROR: You have to provide a valid pk for a Group of' - 'parameters or a Group name (or use None for inpgen defaults). Wf_para key: "struc_group".' - 'given group name= {} is not a valid group' - '(or is your group name integer?)'.format(group_name)) + 'parameters or a Group name (or use None for inpgen defaults). Wf_para key: "struc_group".' + 'given group name= {} is not a valid group' + '(or is your group name integer?)'.format(group_name)) #print(message) self.report(message) self.abort_nowait('ERROR: I abort, because I have no paremeters to calculate and ' @@ -249,7 +263,6 @@ def get_calcs_from_groups(self): #pprint(calcs[:20]) self.ctx.calcs_to_run = calcs self.ctx.ncalc = len(calcs) - return #def calculations_left_torun(self): # """ @@ -265,8 +278,6 @@ def get_calcs_from_groups(self): # # return calculations_left - - def run_eos(self): """ Run the equation of states for all delta structures with their parameters @@ -283,25 +294,33 @@ def run_eos(self): eos_results = {} inputs = self.get_inputs_eos() - #print(self.ctx.minindex) #print(self.ctx.maxindex) - for struc, para in self.ctx.calcs_to_run:#[:4]self.ctx.minindex:self.ctx.maxindex]:#0:0]:# + for struc, para in self.ctx.calcs_to_run: #[:4]self.ctx.minindex:self.ctx.maxindex]:#0:0]:# #print para formula = struc.get_formula() label = '|delta_wc|eos|{}'.format(formula) description = '|delta| fleur_eos_wc on {}'.format(formula) if para: eos_future = submit(FleurEosWorkChain, - wf_parameters=inputs['wc_eos_para'], structure=struc, options=inputs['options'], - calc_parameters=para, inpgen=inputs['inpgen'], fleur=inputs['fleur'], - label=label, description=description) - else: # TODO: run eos_wc_simple + wf_parameters=inputs['wc_eos_para'], + structure=struc, + options=inputs['options'], + calc_parameters=para, + inpgen=inputs['inpgen'], + fleur=inputs['fleur'], + label=label, + description=description) + else: # TODO: run eos_wc_simple eos_future = submit(FleurEosWorkChain, - wf_parameters=inputs['wc_eos_para'], structure=struc, options=inputs['options'], - inpgen=inputs['inpgen'], fleur=inputs['fleur'], - label=label, description=description) + wf_parameters=inputs['wc_eos_para'], + structure=struc, + options=inputs['options'], + inpgen=inputs['inpgen'], + fleur=inputs['fleur'], + label=label, + description=description) self.report('launching fleur_eos_wc<{}> on structure {} with parameter {}' ''.format(eos_future.pid, struc.pk, para.pk)) label = formula @@ -310,10 +329,6 @@ def run_eos(self): #self.ctx.eos_steps_done = self.ctx.eos_steps_done + 1 #self.ctx.minindex = self.ctx.maxindex - - - return ToContext(**eos_results) - ''' # with run eos_results = {} @@ -343,6 +358,7 @@ def run_eos(self): return ToContext(**eos_results) ''' + return ToContext(**eos_results) # To limit the troughput of 100 jobs, we create several run eos steps def get_inputs_eos(self): @@ -367,7 +383,7 @@ def extract_results_eos(self): self.ctx.all_results = {} self.ctx.all_succ = {} - self.ctx.eos_uuids ={} + self.ctx.eos_uuids = {} outstr = ('''\ Delta calculation FLEUR {} (AiiDA wc). @@ -384,7 +400,7 @@ def extract_results_eos(self): outpara1 = eos_res.get_outputs_dict() #print outpara1 try: - outpara= outpara1['output_eos_wc_para'].get_dict() + outpara = outpara1['output_eos_wc_para'].get_dict() except KeyError: self.report('ERROR: Eos wc for element: {} failed. I retrieved {} ' 'I skip the results retrieval for that element.'.format(label, eos_res)) @@ -400,11 +416,11 @@ def extract_results_eos(self): #bm_u = outpara.get('bulk_modulus_units', 'GPa') dbm = outpara.get('bulk_deriv', None) if natoms: - gs_vol_pera = gs_vol/natoms + gs_vol_pera = gs_vol / natoms else: gs_vol_pera = gs_vol - element = label.translate(None, digits) # remove all numbers from string + element = label.translate(None, digits) # remove all numbers from string self.ctx.all_results[element] = [gs_vol_pera, bm, dbm] self.ctx.all_succ[element] = eos_succ self.ctx.eos_uuids[element] = eos_res.get_inputs()[0].uuid @@ -418,14 +434,13 @@ def extract_results_eos(self): # produce a single file # maybe put in try(or write in a certain place where is sure that you have the permissions) #outfile = open('delta_wc.out', 'w') - outfile = open(filename, 'a') # for testing purposes + outfile = open(filename, 'a') # for testing purposes outfile.write(outstr) outfile.close() self.ctx.outfilepath = os.path.abspath(outfile.name) - def calculate_delta(self): """ Execute here the script to calculate a delta factor @@ -451,14 +466,13 @@ def return_results(self): bmd_dic = {} vol_dic = {} - for elem,val in six.iteritems(all_res): + for elem, val in six.iteritems(all_res): #print elem vol_dic[elem] = val[0] bm_dic[elem] = val[1] bmd_dic[elem] = val[2] - outputnode_dict ={} - + outputnode_dict = {} outputnode_dict['workflow_name'] = self.__class__.__name__ outputnode_dict['warnings'] = self.ctx.warnings @@ -470,7 +484,7 @@ def return_results(self): outputnode_dict['bulk_modulus_dev'] = bmd_dic outputnode_dict['volumes'] = vol_dic outputnode_dict['volumes_units'] = 'A^3/per atom' - outputnode_dict['delta_factor'] = {'Wien2K' : '', 'Fleur_026' : ''} + outputnode_dict['delta_factor'] = {'Wien2K': '', 'Fleur_026': ''} #outputnode = Dict(dict=outputnode_dict) @@ -512,6 +526,8 @@ def return_results(self): #print outdict for link_name, node in six.iteritems(outdict): self.out(link_name, node) + + ''' if __name__ == "__main__": import argparse @@ -543,8 +559,10 @@ def return_results(self): inpgen = args.inpgen, fleur=args.fleur) ''' + + @cf -def create_delta_result_node(**kwargs):#*args): +def create_delta_result_node(**kwargs): #*args): """ This is a pseudo wf, to create the rigth graph structure of AiiDA. This wokfunction will create the output node in the database. @@ -554,7 +572,7 @@ def create_delta_result_node(**kwargs):#*args): """ outdict = {} - outpara = kwargs.get('results_node', {}) + outpara = kwargs.get('results_node', {}) outdict['output_delta_wc_para'] = outpara.clone() # copy, because we rather produce the same node twice then have a circle in the database for now... #output_para = args[0] @@ -591,6 +609,6 @@ def get_paranode(struc, para_nodes): # we found no parameter node for the given structure therefore return none return None + def write_delta_file(result_dict): pass - diff --git a/aiida_fleur/workflows/delta_split.py.legacy b/aiida_fleur/workflows/delta_split.py.legacy index c9b494182..a06c9fe37 100644 --- a/aiida_fleur/workflows/delta_split.py.legacy +++ b/aiida_fleur/workflows/delta_split.py.legacy @@ -586,4 +586,3 @@ def get_paranode(struc, para_nodes): def write_delta_file(result_dict): pass - diff --git a/aiida_fleur/workflows/dmi.py b/aiida_fleur/workflows/dmi.py index ebd5ef10d..7d37ac13e 100644 --- a/aiida_fleur/workflows/dmi.py +++ b/aiida_fleur/workflows/dmi.py @@ -9,7 +9,6 @@ # For further information please visit http://www.flapw.de or # # http://aiida-fleur.readthedocs.io/en/develop/ # ############################################################################### - """ In this module you find the workflow 'FleurDMIWorkChain' for the calculation of DMI energy dispersion. @@ -20,8 +19,8 @@ import numpy as np import six -from six.moves import range -from six.moves import map +#from six.moves import range +#from six.moves import map from lxml import etree from aiida.engine import WorkChain, ToContext, if_ @@ -45,11 +44,14 @@ class FleurDMIWorkChain(WorkChain): This workflow calculates DMI energy dispersion of a structure. """ - _workflowversion = "0.2.0" + _workflowversion = '0.2.0' _default_options = { - 'resources': {"num_machines": 1, "num_mpiprocs_per_machine": 1}, - 'max_wallclock_seconds': 2*60*60, + 'resources': { + 'num_machines': 1, + 'num_mpiprocs_per_machine': 1 + }, + 'max_wallclock_seconds': 2 * 60 * 60, 'queue_name': '', 'custom_scheduler_commands': '', 'import_sys_environment': False, @@ -58,15 +60,14 @@ class FleurDMIWorkChain(WorkChain): _wf_default = { 'serial': False, - 'beta': {'all': 1.57079}, + 'beta': { + 'all': 1.57079 + }, 'sqas_theta': [0.0, 1.57079, 1.57079], 'sqas_phi': [0.0, 0.0, 1.57079], 'soc_off': [], # 'prop_dir': [1.0, 0.0, 0.0], - 'q_vectors': [[0.0, 0.0, 0.0], - [0.125, 0.0, 0.0], - [0.250, 0.0, 0.0], - [0.375, 0.0, 0.0]], + 'q_vectors': [[0.0, 0.0, 0.0], [0.125, 0.0, 0.0], [0.250, 0.0, 0.0], [0.375, 0.0, 0.0]], 'ref_qss': [0.0, 0.0, 0.0], 'inpxml_changes': [] } @@ -75,50 +76,41 @@ class FleurDMIWorkChain(WorkChain): def define(cls, spec): super(FleurDMIWorkChain, cls).define(spec) spec.expose_inputs(FleurScfWorkChain, namespace='scf') - spec.input("wf_parameters", valid_type=Dict, required=False) - spec.input("fleur", valid_type=Code, required=True) - spec.input("remote", valid_type=RemoteData, required=False) - spec.input("fleurinp", valid_type=FleurinpData, required=False) - spec.input("options", valid_type=Dict, required=False) - - spec.outline( - cls.start, - if_(cls.scf_needed)( - cls.converge_scf, - cls.force_after_scf, - ).else_( - cls.force_wo_scf, - ), - cls.get_results, - cls.return_results - ) + spec.input('wf_parameters', valid_type=Dict, required=False) + spec.input('fleur', valid_type=Code, required=True) + spec.input('remote', valid_type=RemoteData, required=False) + spec.input('fleurinp', valid_type=FleurinpData, required=False) + spec.input('options', valid_type=Dict, required=False) + + spec.outline(cls.start, + if_(cls.scf_needed)( + cls.converge_scf, + cls.force_after_scf, + ).else_( + cls.force_wo_scf, + ), cls.get_results, cls.return_results) spec.output('out', valid_type=Dict) # exit codes - spec.exit_code(230, 'ERROR_INVALID_INPUT_PARAM', - message="Invalid workchain parameters.") - spec.exit_code(231, 'ERROR_INVALID_INPUT_CONFIG', - message="Invalid input configuration.") - spec.exit_code(233, 'ERROR_INVALID_CODE_PROVIDED', - message="Invalid code node specified, check inpgen and fleur code nodes.") - spec.exit_code(235, 'ERROR_CHANGING_FLEURINPUT_FAILED', - message="Input file modification failed.") - spec.exit_code(236, 'ERROR_INVALID_INPUT_FILE', - message="Input file was corrupted after user's modifications.") - spec.exit_code(334, 'ERROR_REFERENCE_CALCULATION_FAILED', - message="Reference calculation failed.") - spec.exit_code(335, 'ERROR_REFERENCE_CALCULATION_NOREMOTE', - message="Found no reference calculation remote repository.") - spec.exit_code(336, 'ERROR_FORCE_THEOREM_FAILED', - message="Force theorem calculation failed.") + spec.exit_code(230, 'ERROR_INVALID_INPUT_PARAM', message='Invalid workchain parameters.') + spec.exit_code(231, 'ERROR_INVALID_INPUT_CONFIG', message='Invalid input configuration.') + spec.exit_code(233, + 'ERROR_INVALID_CODE_PROVIDED', + message='Invalid code node specified, check inpgen and fleur code nodes.') + spec.exit_code(235, 'ERROR_CHANGING_FLEURINPUT_FAILED', message='Input file modification failed.') + spec.exit_code(236, 'ERROR_INVALID_INPUT_FILE', message="Input file was corrupted after user's modifications.") + spec.exit_code(334, 'ERROR_REFERENCE_CALCULATION_FAILED', message='Reference calculation failed.') + spec.exit_code(335, + 'ERROR_REFERENCE_CALCULATION_NOREMOTE', + message='Found no reference calculation remote repository.') + spec.exit_code(336, 'ERROR_FORCE_THEOREM_FAILED', message='Force theorem calculation failed.') def start(self): """ Retrieve and initialize paramters of the WorkChain """ - self.report('INFO: started DMI calculation workflow version {}\n' - ''.format(self._workflowversion)) + self.report('INFO: started DMI calculation workflow version {}\n' ''.format(self._workflowversion)) self.ctx.info = [] self.ctx.warnings = [] self.ctx.errors = [] @@ -152,14 +144,14 @@ def start(self): self.ctx.wf_dict = wf_dict if wf_dict['ref_qss'] != wf_dict['q_vectors'][0]: - error = ("The first q_vector of the forceTheorem step has to be equal to" - "the q vector of the reference calculation.") + error = ('The first q_vector of the forceTheorem step has to be equal to' + 'the q vector of the reference calculation.') self.control_end_wc(error) return self.exit_codes.ERROR_INVALID_INPUT_PARAM # Check if sqas_theta and sqas_phi have the same length if len(self.ctx.wf_dict.get('sqas_theta')) != len(self.ctx.wf_dict.get('sqas_phi')): - error = ("Number of sqas_theta has to be equal to the number of sqas_phi") + error = ('Number of sqas_theta has to be equal to the number of sqas_phi') self.control_end_wc(error) return self.exit_codes.ERROR_INVALID_INPUT_PARAM @@ -181,7 +173,7 @@ def start(self): try: test_and_get_codenode(inputs.fleur, 'fleur.fleur', use_exceptions=True) except ValueError: - error = ("The code you provided for FLEUR does not use the plugin fleur.fleur") + error = ('The code you provided for FLEUR does not use the plugin fleur.fleur') self.control_end_wc(error) return self.exit_codes.ERROR_INVALID_CODE_PROVIDED @@ -189,15 +181,15 @@ def start(self): if inputs.scf: self.ctx.scf_needed = True if 'remote' in inputs: - error = "ERROR: you gave SCF input + remote for the FT" + error = 'ERROR: you gave SCF input + remote for the FT' self.control_end_wc(error) return self.exit_codes.ERROR_INVALID_INPUT_CONFIG if 'fleurinp' in inputs: - error = "ERROR: you gave SCF input + fleurinp for the FT" + error = 'ERROR: you gave SCF input + fleurinp for the FT' self.control_end_wc(error) return self.exit_codes.ERROR_INVALID_INPUT_CONFIG elif 'remote' not in inputs: - error = "ERROR: you gave neither SCF input nor remote for the FT" + error = 'ERROR: you gave neither SCF input nor remote for the FT' self.control_end_wc(error) return self.exit_codes.ERROR_INVALID_INPUT_CONFIG else: @@ -235,26 +227,20 @@ def get_inputs_scf(self): # set up q vector for the reference calculation list_ref_qss = self.ctx.wf_dict['ref_qss'] if [x for x in list_ref_qss if x != 0]: - changes_dict = {'qss': self.ctx.wf_dict['ref_qss'], - 'l_noco': True, - 'ctail': False, - 'l_ss': True} + changes_dict = {'qss': self.ctx.wf_dict['ref_qss'], 'l_noco': True, 'ctail': False, 'l_ss': True} else: - changes_dict = {'qss': ' 0.0 0.0 0.0 ', - 'l_noco': False, - 'ctail': True, - 'l_ss': False} + changes_dict = {'qss': ' 0.0 0.0 0.0 ', 'l_noco': False, 'ctail': True, 'l_ss': False} - scf_wf_dict['inpxml_changes'].append( - ('set_inpchanges', {'change_dict': changes_dict})) + scf_wf_dict['inpxml_changes'].append(('set_inpchanges', {'change_dict': changes_dict})) # change beta parameter for key, val in six.iteritems(self.ctx.wf_dict.get('beta')): - scf_wf_dict['inpxml_changes'].append( - ('set_atomgr_att_label', - {'attributedict': {'nocoParams': [('beta', val)]}, - 'atom_label': key - })) + scf_wf_dict['inpxml_changes'].append(('set_atomgr_att_label', { + 'attributedict': { + 'nocoParams': [('beta', val)] + }, + 'atom_label': key + })) input_scf.wf_parameters = Dict(dict=scf_wf_dict) @@ -263,10 +249,8 @@ def get_inputs_scf(self): calc_parameters = input_scf.calc_parameters.get_dict() else: calc_parameters = {} - sum_vec = np.array([np.pi/4.0, np.e/3.0, np.euler_gamma]) - calc_parameters['qss'] = {'x': sum_vec[0], - 'y': sum_vec[1], - 'z': sum_vec[2]} + sum_vec = np.array([np.pi / 4.0, np.e / 3.0, np.euler_gamma]) + calc_parameters['qss'] = {'x': sum_vec[0], 'y': sum_vec[1], 'z': sum_vec[2]} input_scf.calc_parameters = Dict(dict=calc_parameters) return input_scf @@ -300,63 +284,65 @@ def change_fleurinp(self): # copy inpchanges from wf parameters fchanges = self.ctx.wf_dict.get('inpxml_changes', []) # create forceTheorem tags - fchanges.extend([('create_tag', - {'xpath': '/fleurInput', - 'newelement': 'forceTheorem' - }), - ('create_tag', - {'xpath': '/fleurInput/forceTheorem', - 'newelement': 'DMI' - }), - ('create_tag', - {'xpath': '/fleurInput/forceTheorem/DMI', - 'newelement': 'qVectors' - }), - ('xml_set_attribv_occ', - {'xpathn': '/fleurInput/forceTheorem/DMI', - 'attributename': 'theta', - 'attribv': ' '.join(map(str, self.ctx.wf_dict.get('sqas_theta'))) - }), - ('xml_set_attribv_occ', - {'xpathn': '/fleurInput/forceTheorem/DMI', - 'attributename': 'phi', - 'attribv': ' '.join(map(str, self.ctx.wf_dict.get('sqas_phi'))) - }) - ]) + fchanges.extend([('create_tag', { + 'xpath': '/fleurInput', + 'newelement': 'forceTheorem' + }), ('create_tag', { + 'xpath': '/fleurInput/forceTheorem', + 'newelement': 'DMI' + }), ('create_tag', { + 'xpath': '/fleurInput/forceTheorem/DMI', + 'newelement': 'qVectors' + }), + ('xml_set_attribv_occ', { + 'xpathn': '/fleurInput/forceTheorem/DMI', + 'attributename': 'theta', + 'attribv': ' '.join(six.moves.map(str, self.ctx.wf_dict.get('sqas_theta'))) + }), + ('xml_set_attribv_occ', { + 'xpathn': '/fleurInput/forceTheorem/DMI', + 'attributename': 'phi', + 'attribv': ' '.join(six.moves.map(str, self.ctx.wf_dict.get('sqas_phi'))) + })]) for i, vectors in enumerate(self.ctx.wf_dict['q_vectors']): - fchanges.append(('create_tag', - {'xpath': '/fleurInput/forceTheorem/DMI/qVectors', - 'newelement': 'q' - })) - fchanges.append(('xml_set_text_occ', - {'xpathn': '/fleurInput/forceTheorem/DMI/qVectors/q', - 'text': ' '.join(map(str, vectors)), - 'create': False, - 'occ': i - })) - - changes_dict = {'itmax': 1, - 'l_noco': True, - 'ctail': False, - # 'l_soc': True, - 'l_ss': True} + fchanges.append(('create_tag', {'xpath': '/fleurInput/forceTheorem/DMI/qVectors', 'newelement': 'q'})) + fchanges.append(('xml_set_text_occ', { + 'xpathn': '/fleurInput/forceTheorem/DMI/qVectors/q', + 'text': ' '.join(six.moves.map(str, vectors)), + 'create': False, + 'occ': i + })) + + changes_dict = { + 'itmax': 1, + 'l_noco': True, + 'ctail': False, + # 'l_soc': True, + 'l_ss': True + } fchanges.append(('set_inpchanges', {'change_dict': changes_dict})) # change beta parameter for key, val in six.iteritems(self.ctx.wf_dict.get('beta')): - fchanges.append(('set_atomgr_att_label', - {'attributedict': {'nocoParams': [('beta', val)]}, - 'atom_label': key - })) + fchanges.append(('set_atomgr_att_label', { + 'attributedict': { + 'nocoParams': [('beta', val)] + }, + 'atom_label': key + })) # switch off SOC on an atom specie for atom_label in self.ctx.wf_dict['soc_off']: - fchanges.append(('set_species_label', - {'at_label': atom_label, - 'attributedict': {'special': {'socscale': 0.0}}, - 'create': True - })) + fchanges.append(('set_species_label', { + 'at_label': atom_label, + 'attributedict': { + 'special': { + 'socscale': 0.0 + } + }, + 'create': True + })) if fchanges: # change inp.xml file fleurmode = FleurinpModifier(fleurin) @@ -369,9 +355,9 @@ def change_fleurinp(self): method = avail_ac_dict.get(function, None) if not method: error = ("ERROR: Input 'inpxml_changes', function {} " - "is not known to fleurinpmodifier class, " - "please check/test your input. I abort..." - "".format(function)) + 'is not known to fleurinpmodifier class, ' + 'please check/test your input. I abort...' + ''.format(function)) self.control_end_wc(error) return self.exit_codes.ERROR_CHANGING_FLEURINPUT_FAILED @@ -418,8 +404,7 @@ def force_after_scf(self): outpara = outpara_node.get_dict() if 'total_energy' not in outpara: - message = ('Did not manage to extract float total energy from the' - ' reference SCF calculation.') + message = ('Did not manage to extract float total energy from the reference SCF calculation.') self.control_end_wc(message) return self.exit_codes.ERROR_REFERENCE_CALCULATION_FAILED @@ -455,8 +440,13 @@ def force_after_scf(self): code = self.inputs.fleur options = self.ctx.options.copy() - inputs_builder = get_inputs_fleur(code, remote, - fleurin, options, label, description, settings, + inputs_builder = get_inputs_fleur(code, + remote, + fleurin, + options, + label, + description, + settings, serial=self.ctx.wf_dict['serial']) future = self.submit(FleurBaseWorkChain, **inputs_builder) return ToContext(f_t=future) @@ -479,14 +469,19 @@ def force_wo_scf(self): # Retrieve remote folder from the inputs remote = self.inputs.remote - label = 'Force_theorem_calculation' - description = 'This is a force theorem calculation for all SQA' + label = 'DMI_force_theorem' + description = 'The is the force theorem calculation for DMI energy.' code = self.inputs.fleur options = self.ctx.options.copy() - inputs_builder = get_inputs_fleur(code, remote, - fleurin, options, label, description, settings, + inputs_builder = get_inputs_fleur(code, + remote, + fleurin, + options, + label, + description, + settings, serial=self.ctx.wf_dict['serial']) future = self.submit(FleurBaseWorkChain, **inputs_builder) return ToContext(f_t=future) @@ -522,18 +517,18 @@ def get_results(self): mae_phis = out_dict.dmi_force_phi num_ang = out_dict.dmi_force_angles num_q_vectors = out_dict.dmi_force_qs - q_vectors = [self.ctx.wf_dict['q_vectors'][x-1] for x in out_dict.dmi_force_q] + q_vectors = [self.ctx.wf_dict['q_vectors'][x - 1] for x in out_dict.dmi_force_q] e_u = out_dict.energy_units - for i in range((num_q_vectors-1)*(num_ang), -1, -num_ang): + for i in six.moves.range((num_q_vectors - 1) * (num_ang), -1, -num_ang): ref_enrg = t_energydict.pop(i) q_vectors.pop(i) - for k in range(i, i+num_ang-1, 1): + for k in six.moves.range(i, i + num_ang - 1, 1): t_energydict[k] -= ref_enrg if e_u == 'Htr' or 'htr': - for labels in range(len(t_energydict)): - t_energydict[labels] = t_energydict[labels] * htr_to_ev + for labels, energies in t_energydict.items(): + t_energydict[labels] = energies * htr_to_ev except AttributeError: message = ('Did not manage to read evSum or energy units after FT calculation.') self.control_end_wc(message) @@ -549,19 +544,20 @@ def return_results(self): """ This function outputs results of the wc """ - out = {'workflow_name': self.__class__.__name__, - 'workflow_version': self._workflowversion, - # 'initial_structure': self.inputs.structure.uuid, - 'energies': self.ctx.t_energydict, - 'q_vectors': self.ctx.q_vectors, - 'theta': self.ctx.mae_thetas, - 'phi': self.ctx.mae_phis, - 'angles': self.ctx.num_ang-1, - 'energy_units': 'eV', - 'info': self.ctx.info, - 'warnings': self.ctx.warnings, - 'errors': self.ctx.errors, - } + out = { + 'workflow_name': self.__class__.__name__, + 'workflow_version': self._workflowversion, + # 'initial_structure': self.inputs.structure.uuid, + 'energies': self.ctx.t_energydict, + 'q_vectors': self.ctx.q_vectors, + 'theta': self.ctx.mae_thetas, + 'phi': self.ctx.mae_phis, + 'angles': self.ctx.num_ang - 1, + 'energy_units': 'eV', + 'info': self.ctx.info, + 'warnings': self.ctx.warnings, + 'errors': self.ctx.errors, + } out = save_output_node(Dict(dict=out)) self.out('out', out) diff --git a/aiida_fleur/workflows/dos.py b/aiida_fleur/workflows/dos.py index 5d783c81a..88508c749 100644 --- a/aiida_fleur/workflows/dos.py +++ b/aiida_fleur/workflows/dos.py @@ -9,7 +9,6 @@ # For further information please visit http://www.flapw.de or # # http://aiida-fleur.readthedocs.io/en/develop/ # ############################################################################### - """ This is the worklfow 'dos' for the Fleur code, which calculates a density of states (DOS). @@ -17,6 +16,7 @@ from __future__ import absolute_import from __future__ import print_function import os.path +import six from aiida.plugins import DataFactory from aiida.orm import Code, StructureData, Dict, RemoteData @@ -27,8 +27,6 @@ from aiida_fleur.data.fleurinpmodifier import FleurinpModifier from aiida_fleur.tools.common_fleur_wf import get_inputs_fleur from aiida_fleur.tools.common_fleur_wf import test_and_get_codenode -import six - from aiida_fleur.data.fleurinp import FleurinpData @@ -43,41 +41,34 @@ class fleur_dos_wc(WorkChain): defaults : tria = True, nkpts = 800, sigma=0.005, emin= -0.3, emax = 0.8 """ - _workflowversion = "0.3.3" - - _default_options = {'resources': {"num_machines": 1}, - 'max_wallclock_seconds': 60*60, - 'queue_name': '', - 'custom_scheduler_commands': '', - # 'max_memory_kb' : None, - 'import_sys_environment': False, - 'environment_variables': {}} - _default_wf_para = {'tria': True, - 'nkpts': 800, - 'sigma': 0.005, - 'emin': -0.30, - 'emax': 0.80} + _workflowversion = '0.3.3' + + _default_options = { + 'resources': { + 'num_machines': 1 + }, + 'max_wallclock_seconds': 60 * 60, + 'queue_name': '', + 'custom_scheduler_commands': '', + # 'max_memory_kb' : None, + 'import_sys_environment': False, + 'environment_variables': {} + } + _default_wf_para = {'tria': True, 'nkpts': 800, 'sigma': 0.005, 'emin': -0.30, 'emax': 0.80} @classmethod def define(cls, spec): super(fleur_dos_wc, cls).define(spec) - spec.input("wf_parameters", valid_type=Dict, required=False, - default=Dict(dict=cls._default_wf_para)) - spec.input("calc_parameters", valid_type=Dict, required=False) - spec.input("settings", valid_type=Dict, required=False) - spec.input("options", valid_type=Dict, required=False, - default=Dict(dict=cls._default_options)) - spec.input("fleurinp", valid_type=FleurinpData, required=False) + spec.input('wf_parameters', valid_type=Dict, required=False, default=Dict(dict=cls._default_wf_para)) + spec.input('calc_parameters', valid_type=Dict, required=False) + spec.input('settings', valid_type=Dict, required=False) + spec.input('options', valid_type=Dict, required=False, default=Dict(dict=cls._default_options)) + spec.input('fleurinp', valid_type=FleurinpData, required=False) # TODO ggf run convergence first - spec.input("remote_data", valid_type=RemoteData, required=False) + spec.input('remote_data', valid_type=RemoteData, required=False) #spec.input("inpgen", valid_type=Code, required=False) - spec.input("fleur", valid_type=Code, required=True) - spec.outline( - cls.start, - cls.create_new_fleurinp, - cls.run_fleur, - cls.return_results - ) + spec.input('fleur', valid_type=Code, required=True) + spec.outline(cls.start, cls.create_new_fleurinp, cls.run_fleur, cls.return_results) # spec.dynamic_output() def start(self): @@ -87,11 +78,11 @@ def start(self): ''' # input check ### ? or done automaticly, how optional? # check if fleuinp corresponds to fleur_calc - self.report("Started dos workflow version {}" + self.report('Started dos workflow version {}' # "Workchain node identifiers: ")#{}" - "".format(self._workflowversion)) # ProcessRegistry().current_calc_node)) + ''.format(self._workflowversion)) # ProcessRegistry().current_calc_node)) - self.ctx.fleurinp1 = "" + self.ctx.fleurinp1 = '' self.ctx.last_calc = None self.ctx.successful = False self.ctx.warnings = [] @@ -115,8 +106,7 @@ def start(self): try: test_and_get_codenode(inputs.fleur, 'fleur.fleur', use_exceptions=True) except ValueError: - error = ("The code you provided for FLEUR does not " - "use the plugin fleur.fleur") + error = ('The code you provided for FLEUR does not use the plugin fleur.fleur') # self.control_end_wc(error) self.report(error) return 1 @@ -139,8 +129,7 @@ def create_new_fleurinp(self): # change_dict = {'dos': True, 'ndir' : -1, 'minEnergy' : self.inputs.wf_parameters.get_dict().get('minEnergy', -0.30000000), # 'maxEnergy' : self.inputs.wf_parameters.get_dict().get('manEnergy','0.80000000'), # 'sigma' : self.inputs.wf_parameters.get_dict().get('sigma', '0.00500000')} - change_dict = {'dos': True, 'ndir': -1, 'minEnergy': emin, - 'maxEnergy': emax, 'sigma': sigma} + change_dict = {'dos': True, 'ndir': -1, 'minEnergy': emin, 'maxEnergy': emax, 'sigma': sigma} fleurmode.set_inpchanges(change_dict) if tria: @@ -183,8 +172,8 @@ def return_results(self): # TODO be careful with general DOS.X dosfilename = 'DOS.1' # ['DOS.1', 'DOS.2', ...] # TODO this should be easier... - dosfilepath = self.ctx.last_calc.get_outputs_dict( - )['retrieved'].folder.get_subfolder('path').get_abs_path(dosfilename) + dosfilepath = self.ctx.last_calc.get_outputs_dict()['retrieved'].folder.get_subfolder('path').get_abs_path( + dosfilename) print(dosfilepath) # dosfilepath = "path to dosfile" # Array? if os.path.isfile(dosfilepath): diff --git a/aiida_fleur/workflows/eos.py b/aiida_fleur/workflows/eos.py index 0d72225d4..fa97dbfe0 100644 --- a/aiida_fleur/workflows/eos.py +++ b/aiida_fleur/workflows/eos.py @@ -9,7 +9,6 @@ # For further information please visit http://www.flapw.de or # # http://aiida-fleur.readthedocs.io/en/develop/ # ############################################################################### - """ In this module you find the workflow 'FleurEosWorkChain' for the calculation of of an equation of state @@ -23,10 +22,9 @@ import numpy as np import six -from six.moves import range from aiida.orm import load_node -from aiida.orm import Float, StructureData, Dict +from aiida.orm import Float, StructureData, Dict, List from aiida.engine import WorkChain, ToContext from aiida.engine import calcfunction as cf from aiida.common import AttributeDict @@ -54,48 +52,42 @@ class FleurEosWorkChain(WorkChain): about general succeed, fit results and so on. """ - _workflowversion = "0.3.5" + _workflowversion = '0.4.0' - _wf_default = { - 'points': 9, - 'step': 0.002, - 'guess': 1.00 - } + _wf_default = {'points': 9, 'step': 0.002, 'guess': 1.00} @classmethod def define(cls, spec): super(FleurEosWorkChain, cls).define(spec) - spec.expose_inputs(FleurScfWorkChain, namespace='scf', exclude=('structure', )) - spec.input("wf_parameters", valid_type=Dict, required=False) - spec.input("structure", valid_type=StructureData, required=True) + spec.expose_inputs(FleurScfWorkChain, namespace='scf', exclude=( + 'structure', + 'remote_data', + 'fleurinp', + )) + spec.input('wf_parameters', valid_type=Dict, required=False) + spec.input('structure', valid_type=StructureData, required=True) - spec.outline( - cls.start, - cls.structures, - cls.converge_scf, - cls.return_results - ) + spec.outline(cls.start, cls.structures, cls.converge_scf, cls.return_results) spec.output('output_eos_wc_para', valid_type=Dict) spec.output('output_eos_wc_structure', valid_type=StructureData) # exit codes - spec.exit_code(230, 'ERROR_INVALID_INPUT_PARAM', - message="Invalid workchain parameters.") + spec.exit_code(230, 'ERROR_INVALID_INPUT_PARAM', message='Invalid workchain parameters.') def start(self): """ check parameters, what condictions? complete? check input nodes """ - self.report("Started eos workflow version {}".format(self._workflowversion)) + self.report('Started eos workflow version {}'.format(self._workflowversion)) self.ctx.last_calc2 = None self.ctx.calcs = [] self.ctx.calcs_future = [] self.ctx.structures = [] self.ctx.temp_calc = None - self.ctx.structurs_uuids = [] + self.ctx.structures_uuids = [] self.ctx.scalelist = [] self.ctx.volume = [] self.ctx.volume_peratom = {} @@ -148,7 +140,10 @@ def structures(self): self.report('scaling factors which will be calculated:{}'.format(self.ctx.scalelist)) self.ctx.org_volume = self.inputs.structure.get_cell_volume() - self.ctx.structurs = eos_structures(self.inputs.structure, self.ctx.scalelist) + + struc_dict = eos_structures(self.inputs.structure, List(list=self.ctx.scalelist)) + # since cf this has to be a dict, we sort to assure ordering of scale + self.ctx.structures = [struc_dict[key] for key in sorted(struc_dict)] def converge_scf(self): """ @@ -156,7 +151,7 @@ def converge_scf(self): """ calcs = {} - for i, struc in enumerate(self.ctx.structurs): + for i, struc in enumerate(self.ctx.structures): inputs = self.get_inputs_scf() inputs.structure = struc natoms = len(struc.sites) @@ -168,7 +163,7 @@ def converge_scf(self): self.ctx.volume.append(struc.get_cell_volume()) self.ctx.volume_peratom[label] = struc.get_cell_volume() / natoms - self.ctx.structurs_uuids.append(struc.uuid) + self.ctx.structures_uuids.append(struc.uuid) result = self.submit(FleurScfWorkChain, **inputs) self.ctx.labels.append(label) @@ -197,7 +192,7 @@ def return_results(self): natoms = len(self.inputs.structure.sites) htr_to_ev = 27.21138602 e_u = 'eV' - + dis_u = 'me/bohr^3' for label in self.ctx.labels: calc = self.ctx[label] @@ -208,23 +203,26 @@ def return_results(self): continue try: - _ = calc.outputs.output_scf_wc_para + outputnode_scf = calc.outputs.output_scf_wc_para except KeyError: - message = ( - 'One SCF workflow failed, no scf output node: {}.' - ' I skip this one.'.format(label)) + message = ('One SCF workflow failed, no scf output node: {}.' ' I skip this one.'.format(label)) self.ctx.errors.append(message) self.ctx.successful = False continue - outpara = calc.outputs.output_scf_wc_para.get_dict() + # we loose the connection of the failed scf here. + # link labels cannot contain '.' + link_label = 'scale_{}'.format(label).replace('.', '_') + outnodedict[link_label] = outputnode_scf + + outpara = outputnode_scf.get_dict() t_e = outpara.get('total_energy', float('nan')) e_u = outpara.get('total_energy_units', 'eV') if e_u == 'Htr' or 'htr': t_e = t_e * htr_to_ev dis = outpara.get('distance_charge', float('nan')) - dis_u = outpara.get('distance_charge_units') + dis_u = outpara.get('distance_charge_units', 'me/bohr^3') t_energylist.append(t_e) t_energylist_peratom.append(t_e / natoms) vol_peratom_success.append(self.ctx.volume_peratom[label]) @@ -233,8 +231,7 @@ def return_results(self): not_ok, an_index = check_eos_energies(t_energylist_peratom) if not_ok: - message = ('Abnormality in Total energy list detected. Check ' - 'entr(ies) {}.'.format(an_index)) + message = ('Abnormality in Total energy list detected. Check ' 'entr(ies) {}.'.format(an_index)) hint = ('Consider refining your basis set.') self.ctx.info.append(hint) self.ctx.warnings.append(message) @@ -247,11 +244,18 @@ def return_results(self): if len(en_array): # for some reason just en_array does not work volume, bulk_modulus, bulk_deriv, residuals = birch_murnaghan_fit(en_array, vol_array) + # something went wrong with the fit for i in volume, bulk_modulus, bulk_deriv, residuals: if issubclass(type(i), np.complex): write_defaults_fit = True + + # cast float, because np datatypes are sometimes not serialable + volume, bulk_modulus = float(volume), float(bulk_modulus) + bulk_deriv, residuals = float(bulk_deriv), float(residuals) + volumes = self.ctx.volume gs_scale = volume * natoms / self.ctx.org_volume + bulk_modulus = bulk_modulus * 160.217733 # *echarge*1.0e21,#GPa if (volume * natoms < volumes[0]) or (volume * natoms > volumes[-1]): warn = ('Groundstate volume was not in the scaling range.') hint = ('Consider rerunning around point {}'.format(gs_scale)) @@ -269,42 +273,42 @@ def return_results(self): bulk_modulus = None bulk_deriv = None - out = {'workflow_name': self.__class__.__name__, - 'workflow_version': self._workflowversion, - 'scaling': self.ctx.scalelist, - 'scaling_gs': gs_scale, - 'initial_structure': self.inputs.structure.uuid, - 'volume_gs': volume * natoms, - 'volumes': volumes, - 'volume_units': 'A^3', - 'natoms': natoms, - 'total_energy': t_energylist, - 'total_energy_units': e_u, - 'structures': self.ctx.structurs_uuids, - 'calculations': [], # self.ctx.calcs1, - 'scf_wfs': [], # self.converge_scf_uuids, - 'distance_charge': distancelist, - 'distance_charge_units': dis_u, - 'nsteps': self.ctx.points, - 'guess': self.ctx.guess, - 'stepsize': self.ctx.step, - # 'fitresults' : [a, latticeconstant, c], - # 'fit' : fit_new, - 'residuals': residuals, - 'bulk_deriv': bulk_deriv, - 'bulk_modulus': bulk_modulus * 160.217733, # * echarge * 1.0e21,#GPa - 'bulk_modulus_units': 'GPa', - 'info': self.ctx.info, - 'warnings': self.ctx.warnings, - 'errors': self.ctx.errors - } + out = { + 'workflow_name': self.__class__.__name__, + 'workflow_version': self._workflowversion, + 'scaling': self.ctx.scalelist, + 'scaling_gs': gs_scale, + 'initial_structure': self.inputs.structure.uuid, + 'volume_gs': volume * natoms, + 'volumes': volumes, + 'volume_units': 'A^3', + 'natoms': natoms, + 'total_energy': t_energylist, + 'total_energy_units': e_u, + 'structures': self.ctx.structures_uuids, + 'calculations': [], # self.ctx.calcs1, + 'scf_wfs': [], # self.converge_scf_uuids, + 'distance_charge': distancelist, + 'distance_charge_units': dis_u, + 'nsteps': self.ctx.points, + 'guess': self.ctx.guess, + 'stepsize': self.ctx.step, + # 'fitresults' : [a, latticeconstant, c], + # 'fit' : fit_new, + 'residuals': residuals, + 'bulk_deriv': bulk_deriv, + 'bulk_modulus': bulk_modulus, + 'bulk_modulus_units': 'GPa', + 'info': self.ctx.info, + 'warnings': self.ctx.warnings, + 'errors': self.ctx.errors + } if self.ctx.successful: self.report('Done, Equation of states calculation complete') else: - self.report( - 'Done, but something went wrong.... Probably some individual calculation failed or' - ' a scf-cycle did not reach the desired distance.') + self.report('Done, but something went wrong.... Probably some individual calculation failed or' + ' a scf-cycle did not reach the desired distance.') outnode = Dict(dict=out) outnodedict['results_node'] = outnode @@ -313,8 +317,7 @@ def return_results(self): outputnode_dict = create_eos_result_node(**outnodedict) outputnode = outputnode_dict.get('output_eos_wc_para') outputnode.label = 'output_eos_wc_para' - outputnode.description = ('Contains equation of states results and information of an ' - 'FleurEosWorkChain run.') + outputnode.description = ('Contains equation of states results and information of an FleurEosWorkChain run.') returndict = {} returndict['output_eos_wc_para'] = outputnode @@ -324,7 +327,7 @@ def return_results(self): outputstructure.label = 'output_eos_wc_structure' outputstructure.description = ('Structure with the scaling/volume of the lowest total ' 'energy extracted from FleurEosWorkChain') - outputstructure = save_structure(outputstructure) + returndict['output_eos_wc_structure'] = outputstructure # create link to workchain node @@ -341,16 +344,16 @@ def control_end_wc(self, errormsg): self.ctx.errors.append(errormsg) self.return_results() - return - @cf def create_eos_result_node(**kwargs): """ - This is a pseudo wf, to create the right graph structure of AiiDA. - This wokfunction will create the output node in the database. - It also connects the output_node to all nodes the information commes from. - So far it is just also parsed in as argument, because so far we are to lazy + This is a pseudo cf, to create the right graph structure of AiiDA. + This calcfunction will create the output nodes in the database. + It also connects the output_nodes to all nodes the information comes from. + This includes the output_parameter node for the eos, connections to run scfs, + and returning of the gs_structure (best scale) + So far it is just parsed in as kwargs argument, because we are to lazy to put most of the code overworked from return_results in here. """ outdict = {} @@ -369,37 +372,55 @@ def create_eos_result_node(**kwargs): @cf -def save_structure(structure): +def eos_structures(inp_structure, scalelist): """ - Saves a structure data node + Calcfunction, which creates many rescaled StructureData nodes out of a given crystal structure. + Keeps the provenance in the database + + :param StructureData, a StructureData node + :param scalelist, AiiDA List, list of floats, scaling factors for the cell + + :returns: dict of New StructureData nodes with rescalled structure, which are linked to input + Structure """ - structure_return = structure.clone() - return structure_return + # we do this in one calcfunction now to store less nodes in the DB + re_strucs = eos_structures_nocf(inp_structure, scalelist) + # in AiiDA link labels are always strings, because of namespaces '.' are not allowed. + # replace '.' by underscore to store floats in link label + res_new = {} + for key, struc in re_strucs.items(): + # label already set by rescale_nowf + struc.description = str(key) + link_name = 'scale_{}'.format(key).replace('.', '_') + res_new[link_name] = struc -def eos_structures(inp_structure, scalelist): + return res_new + + +def eos_structures_nocf(inp_structure, scalelist): """ Creates many rescalled StructureData nodes out of a crystal structure. - Keeps the provenance in the database. + Does NOT keep the provenance in the database. :param StructureData, a StructureData node (pk, sor uuid) :param scalelist, list of floats, scaling factors for the cell - :returns: list of New StructureData nodes with rescalled structure, which are linked to input - Structure + :returns: dict of New StructureData nodes with rescalled structure, key=scale """ structure = is_structure(inp_structure) if not structure: # TODO: log something (test if it gets here at all) return None - re_structures = [] + re_structures = {} for scale in scalelist: - structure_rescaled = rescale(structure, Float(scale)) # this is a wf - re_structures.append(structure_rescaled) + structure_rescaled = rescale_nowf(structure, scale) # this is not a cf + re_structures[scale] = structure_rescaled return re_structures + # pylint: disable=invalid-name @@ -417,8 +438,11 @@ def birch_murnaghan_fit(energies, volumes): fitdata = np.polyfit(volumes[:]**(-2. / 3.), energies[:], 3, full=True) ssr = fitdata[1] sst = np.sum((energies[:] - np.average(energies[:]))**2.) - - residuals0 = ssr / sst + print(ssr, sst, energies) + if sst == 0: + residuals0 = -1 + else: + residuals0 = ssr / sst deriv0 = np.poly1d(fitdata[0]) deriv1 = np.polyder(deriv0, 1) deriv2 = np.polyder(deriv1, 1) @@ -433,11 +457,10 @@ def birch_murnaghan_fit(energies, volumes): if volume0 == 0: print('Error: No minimum could be found') - exit() + return None, None, None, None #exit() derivV2 = 4. / 9. * x**5. * deriv2(x) - derivV3 = (-20. / 9. * x**(13. / 2.) * deriv2(x) - - 8. / 27. * x**(15. / 2.) * deriv3(x)) + derivV3 = (-20. / 9. * x**(13. / 2.) * deriv2(x) - 8. / 27. * x**(15. / 2.) * deriv3(x)) bulk_modulus0 = derivV2 / x**(3. / 2.) bulk_deriv0 = -1 - x**(-3. / 2.) * derivV3 / derivV2 @@ -458,7 +481,7 @@ def birch_murnaghan(volumes, volume0, bulk_modulus0, bulk_deriv0): pv_val = 3 * bm / 2. * ((v0 / vol)**(7 / 3.) - (v0 / vol)**(5 / 3.)) * \ (1 + 3 / 4. * (dbm - 4) * ((v0 / vol)**(2 / 3.) - 1)) PV.append(pv_val) - ev_val = 9 * bm * v0 / 16. * ((dbm * (v0 / vol)**(2 / 3.) - 1)**(3) * - ((v0 / vol)**(2 / 3.) - 1)**2 * (6 - 4 * (v0 / vol)**(2 / 3.))) + ev_val = 9 * bm * v0 / 16. * ((dbm * (v0 / vol)**(2 / 3.) - 1)**(3) * ((v0 / vol)**(2 / 3.) - 1)**2 * + (6 - 4 * (v0 / vol)**(2 / 3.))) EV.append(ev_val) return EV, PV diff --git a/aiida_fleur/workflows/initial_cls.py b/aiida_fleur/workflows/initial_cls.py index 937711f9f..6a69161a9 100644 --- a/aiida_fleur/workflows/initial_cls.py +++ b/aiida_fleur/workflows/initial_cls.py @@ -9,7 +9,6 @@ # For further information please visit http://www.flapw.de or # # http://aiida-fleur.readthedocs.io/en/develop/ # ############################################################################### - """ This is the worklfow 'initial_cls' using the Fleur code calculating corelevel shifts with different methods. @@ -29,10 +28,11 @@ from aiida.engine import ToContext, WorkChain, if_ from aiida.engine import calcfunction as cf from aiida.plugins import DataFactory, CalculationFactory -from aiida.orm import Code, load_node, Group +from aiida.orm import Code, load_node, Group, CalcJobNode from aiida.orm import StructureData, Dict, RemoteData +from aiida.orm import load_group from aiida.orm.querybuilder import QueryBuilder -from aiida.common.exceptions import NotExistent +from aiida.common.exceptions import NotExistent, MultipleObjectsError from aiida_fleur.calculation.fleur import FleurCalculation as FleurCalc from aiida_fleur.workflows.scf import FleurScfWorkChain from aiida_fleur.tools.common_fleur_wf_util import get_natoms_element @@ -40,8 +40,6 @@ import six - - class fleur_initial_cls_wc(WorkChain): """ Turn key solution for the calculation of core level shift @@ -73,23 +71,29 @@ class fleur_initial_cls_wc(WorkChain): # 'relax_para' : 'default' # 'calculate_doses' : False # 'dos_para' : 'default' - _workflowversion = "0.3.4" - _default_wf_para = {'references' : {}, - 'relax' : True, - 'relax_mode': 'Fleur', - 'relax_para' : 'default', - 'scf_para' : 'default', - 'same_para' : True, - 'serial' : False} - - _default_options = {'resources' : {"num_machines": 1}, - 'max_wallclock_seconds' : 6*60*60, - 'queue_name' : '', - 'custom_scheduler_commands' : '', - #'max_memory_kb' : None, - 'import_sys_environment' : False, - 'environment_variables' : {}} - + _workflowversion = '0.4.0' + _default_wf_para = { + 'references': {}, + 'relax': True, + 'relax_mode': 'Fleur', + 'relax_para': 'default', + 'scf_para': 'default', + 'same_para': True, + 'serial': False + } + + _default_options = { + 'resources': { + 'num_machines': 1, + 'num_mpiprocs_per_machine': 1 + }, + 'max_wallclock_seconds': 6 * 60 * 60, + 'queue_name': '', + 'custom_scheduler_commands': '', + #'max_memory_kb' : None, + 'import_sys_environment': False, + 'environment_variables': {} + } ERROR_INVALID_INPUT_RESOURCES = 1 ERROR_INVALID_INPUT_RESOURCES_UNDERSPECIFIED = 2 @@ -101,31 +105,21 @@ class fleur_initial_cls_wc(WorkChain): ERROR_CONVERGENCE_NOT_ARCHIVED = 8 ERROR_REFERENCE_MISSING = 9 - @classmethod def define(cls, spec): super(fleur_initial_cls_wc, cls).define(spec) - spec.input("wf_parameters", valid_type=Dict, required=False, - default=Dict(dict=cls._default_wf_para)) - spec.input("fleurinp", valid_type=FleurinpData, required=False) - spec.input("fleur", valid_type=Code, required=True) - spec.input("inpgen", valid_type=Code, required=False) - spec.input("structure", valid_type=StructureData, required=False) - spec.input("calc_parameters", valid_type=Dict, required=False) - spec.input("options", valid_type=Dict, required=False, - default=Dict(dict=cls._default_options)) - - spec.outline( - cls.check_input, - cls.get_references, - cls.run_fleur_scfs, - if_(cls.relaxation_needed)( - cls.relax), - cls.find_parameters, - cls.run_scfs_ref, - cls.return_results - ) - + spec.input('wf_parameters', valid_type=Dict, required=False, default=Dict(dict=cls._default_wf_para)) + spec.input('fleurinp', valid_type=FleurinpData, required=False) + spec.input('fleur', valid_type=Code, required=True) + spec.input('inpgen', valid_type=Code, required=False) + spec.input('structure', valid_type=StructureData, required=False) + spec.input('calc_parameters', valid_type=Dict, required=False) + spec.input('options', valid_type=Dict, required=False) #, default=Dict(dict=cls._default_options#) + #) + + spec.outline(cls.check_input, cls.get_references, cls.run_fleur_scfs, + if_(cls.relaxation_needed)(cls.relax), cls.find_parameters, cls.run_scfs_ref, cls.return_results) + spec.output('output_initial_cls_wc_para', valid_type=Dict) def check_input(self): """ @@ -133,9 +127,10 @@ def check_input(self): """ ### input check ### ? or done automaticly, how optional? - msg = ("INFO: Started initial_state_CLS workflow version {} " - "Workchain node identifiers: "#{}" - "".format(self._workflowversion))#, ProcessRegistry().current_calc_node)) + msg = ( + 'INFO: Started initial_state_CLS workflow version {} ' + 'Workchain node identifiers: ' #{}" + ''.format(self._workflowversion)) #, ProcessRegistry().current_calc_node)) self.report(msg) # init @@ -160,7 +155,7 @@ def check_input(self): # 'W-1_coreconfig' : ['1s','2s',...], # 'W-2' : [...], 'Be-1': [], ...} #all in eV! self.ctx.CLS = {} - self.ctx.cl_energies = {}# same style as CLS only energy <-> shift + self.ctx.cl_energies = {} # same style as CLS only energy <-> shift self.ctx.ref_cl_energies = {} #Style: {'Compound' : energy, 'ref_x' : energy , ...} #i.e {'Be12W' : 0.0, 'Be' : 0.104*htr_eV , 'W' : 0.12*htr_eV} # all in eV! @@ -212,8 +207,7 @@ def check_input(self): self.control_end_wc(error) return self.ERROR_INVALID_INPUT_RESOURCES if 'calc_parameters' in inputs: - self.ctx.calcs_torun.append( - [inputs.get('structure'), inputs.get('calc_parameters')]) + self.ctx.calcs_torun.append([inputs.get('structure'), inputs.get('calc_parameters')]) else: self.ctx.calcs_torun.append(inputs.get('structure')) else: @@ -223,7 +217,6 @@ def check_input(self): return self.ERROR_INVALID_INPUT_RESOURCES self.report('INFO: elements in structure: {}'.format(self.ctx.elements)) - def get_references(self): """ To calculate a CLS in initial state approx, we need reference calculations @@ -254,7 +247,7 @@ def get_references(self): # get specific element reference if given override #print(self.ctx.elements) - elements = self.ctx.elements # ggf copy because ctx.elements will be modified + elements = self.ctx.elements # ggf copy because ctx.elements will be modified for elem in elements: #to_calc[elem] = 'find' ref_el = references.get(elem, None) @@ -266,7 +259,7 @@ def get_references(self): for ref_el_el in ref_el: try: ref_el_nodes = load_node(ref_el_el) - except: + except (NotExistent, MultipleObjectsError, ValueError, TypeError): ref_el_node = None self.report('ERROR: The reference node in the list ' '(id or uuid) provided: {} for element: ' @@ -277,7 +270,8 @@ def get_references(self): else: try: ref_el_node = load_node(ref_el) - except:# NotExistent: No node was found + except (NotExistent, MultipleObjectsError, ValueError, TypeError): + # NotExistent: No node was found ref_el_node = None self.report('ERROR: The reference node (id or uuid) ' 'provided: {} for element: {} could' @@ -286,7 +280,7 @@ def get_references(self): self.ctx.abort = True # expecting nodes and filling ref_calcs_torun - if isinstance(ref_el_node, list):#(StructureData, Dict)): + if isinstance(ref_el_node, list): #(StructureData, Dict)): #enforced parameters, add directly to run queue # TODO: if a scf with these parameters was already done link to it # and extract the results instead of running the calculation again.... @@ -295,12 +289,12 @@ def get_references(self): self.ctx.ref_calcs_torun.append(ref_el_node) else: self.report('WARNING: I did not undestand the list with length 2 ' - 'you gave me as reference input') + 'you gave me as reference input') else: self.report('WARNING: I did not undestand the list {} with length {} ' - 'you gave me as reference input' - ''.format(ref_el_node, len(ref_el_node))) - elif isinstance(ref_el_node, FleurCalc): + 'you gave me as reference input' + ''.format(ref_el_node, len(ref_el_node))) + elif isinstance(ref_el_node, CalcJobNode): #extract from fleur calc TODO self.ctx.ref_cl_energies[elem] = {} elif isinstance(ref_el_node, Dict): @@ -317,8 +311,8 @@ def get_references(self): #elif isinstance(ref_el, initial_state_CLS): # extract TODO else: - error = ("ERROR: I do not know what to do with this given " - "reference {} for element {}".format(ref_el, elem)) + error = ('ERROR: I do not know what to do with this given ' + 'reference {} for element {}'.format(ref_el, elem)) #print(error) self.report(error) self.ctx.errors.append(error) @@ -337,8 +331,7 @@ def get_references(self): self.ctx.ref[elem] = structure self.ctx.ref_calcs_torun.append(structure) else: - pass # report not found? - + pass # report not found? #elif query_for_ref: # no ref given, we have to look for it. # structure = querry_for_ref_structure(elem) @@ -356,7 +349,7 @@ def get_references(self): # self.ctx.abort = True # self.report(error) - else: # no reference for element found + else: # no reference for element found # do we not want to calculate it or is this an error? warning = ('WARNING: I did not find a reference for element {}. ' 'If you do not calculate shifts for this element ' @@ -397,8 +390,6 @@ def get_references(self): #if yes, if a calculation exists use that result #else do a calculation on that structure as above - - def run_fleur_scfs(self): """ Run SCF-cycles for all structures, calculations given in certain workflow arrays. @@ -413,38 +404,56 @@ def run_fleur_scfs(self): wf_parameter['serial'] = self.ctx.serial #wf_parameter['options'] = self.ctx.options wf_parameters = Dict(dict=wf_parameter) - res_all = [] + resall = {} + calc_labels = [] options = Dict(dict=self.ctx.options) # for each calulation in self.ctx.calcs_torun #TODO what about wf params? res = None #print(self.ctx.calcs_torun) - for node in self.ctx.calcs_torun: + for i, node in enumerate(self.ctx.calcs_torun): #print node + calclabel = 'ori_calc_{}'.format(i) + calc_labels.append(calclabel) scf_label = 'cls|scf_wc main' scf_description = 'cls|scf of the main structure' if isinstance(node, StructureData): - res = self.submit(FleurScfWorkChain, wf_parameters=wf_parameters, structure=node, - inpgen=self.inputs.inpgen, fleur=self.inputs.fleur, options=options, - label=scf_label, description=scf_description)# + inputs = { + 'wf_parameters': wf_parameters, + 'structure': node, + 'options': options, + 'inpgen': self.inputs.inpgen, + 'fleur': self.inputs.fleur, + #'metadata' : {'label' : scf_label, + # 'description' : scf_description} + } + res = self.submit(FleurScfWorkChain, **inputs) #elif isinstance(node, FleurinpData): # res = fleur_scf_wc.run(wf_parameters=wf_parameters, structure=node, # inpgen = self.inputs.inpgen, fleur=self.inputs.fleur)# - elif isinstance(node, list):#(StructureData, Dict)): + elif isinstance(node, list): #(StructureData, Dict)): if len(node) == 2: - res = self.submit(FleurScfWorkChain, wf_parameters=wf_parameters, - structure=node[0], calc_parameters=node[1], options=options, - inpgen=self.inputs.inpgen, fleur=self.inputs.fleur, - label=scf_label, description=scf_description) + inputs = { + 'wf_parameters': wf_parameters, + 'structure': node[0], + 'calc_parameters': node[1], + 'options': options, + 'inpgen': self.inputs.inpgen, + 'fleur': self.inputs.fleur, + 'metadata': { + 'label': scf_label, + 'description': scf_description + } + } + res = self.submit(FleurScfWorkChain, **inputs) else: self.report('ERROR: something in calcs_torun which I do not' 'recognize, list has not 2 entries: {}'.format(node)) else: - self.report('ERROR: something in calcs_torun which I do not ' - 'recognize: {}'.format(node)) + self.report('ERROR: something in calcs_torun which I do not ' 'recognize: {}'.format(node)) #self.report('{}{}'.format(type(node[0], node[1]))) res = None continue - res_all.append(res) + resall[calclabel] = res #append(res) #print res #calc_node = res['output_scf_wc_para'].get_inputs()[0] # if run is used, otherwise use labels @@ -452,8 +461,10 @@ def run_fleur_scfs(self): #self.ctx.calcs_torun.remove(node) #print res self.ctx.calcs_torun = [] - #return ToContext(last_calc=res) + self.ctx.calc_labels = calc_labels + print('res_all', resall) + #return ToContext(last_calc=res) ''' inputs = get_inputs_fleur(code, remote, fleurin, options) future = submit(FleurCalc, **inputs) @@ -461,8 +472,7 @@ def run_fleur_scfs(self): print 'run FLEUR number: {}'.format(self.ctx.loop_count) self.ctx.calcs.append(future) ''' - return ToContext(calcs_res=res) #calcs.append(future - + return ToContext(**resall) #calcs_res=res) #calcs.append(future def relaxation_needed(self): """ @@ -473,14 +483,10 @@ def relaxation_needed(self): if self.ctx.relax: # TODO check all forces of calculations forces_fine = True - if forces_fine: - return True - else: - return False + return forces_fine else: return False - def relax(self): """ Do structural relaxation for certain structures. @@ -491,7 +497,6 @@ def relax(self): pass # TODO run relax workflow - def find_parameters(self): """ If the same parameters shall be used in the calculations you have to @@ -513,7 +518,6 @@ def find_parameters(self): #parameter_dict = fleurinp.extract_para(element) # BE CAREFUL WITH LOs! soc and co - def run_scfs_ref(self): """ Run SCF-cycles for ref structures, calculations given in certain workflow arrays. @@ -540,21 +544,39 @@ def run_scfs_ref(self): #print(self.ctx.ref_calcs_torun) for i, node in enumerate(self.ctx.ref_calcs_torun): scf_label = 'cls|scf_wc on ref {}'.format(self.ctx.elements[i]) - scf_description = ('cls|scf of the reference structure of element {}' - ''.format(self.ctx.elements[i])) + scf_description = ('cls|scf of the reference structure of element {}' ''.format(self.ctx.elements[i])) #print node if isinstance(node, StructureData): - res = self.submit(FleurScfWorkChain, wf_parameters=wf_parameters, structure=node, - inpgen = self.inputs.inpgen, fleur=self.inputs.fleur, options=options, - label=scf_label, description=scf_description)# + inputs = { + 'wf_parameters': wf_parameters, + 'structure': node, + 'options': options, + 'inpgen': self.inputs.inpgen, + 'fleur': self.inputs.fleur, + 'metadata': { + 'label': scf_label, + 'description': scf_description + } + } + res = self.submit(FleurScfWorkChain, **inputs) # + #elif isinstance(node, FleurinpData): # res = submit(fleur_scf_wc, wf_parameters=wf_parameters, structure=node, # inpgen = self.inputs.inpgen, fleur=self.inputs.fleur)# - elif isinstance(node, list):#(StructureData, Dict)): - res = self.submit(FleurScfWorkChain, wf_parameters=wf_parameters, - structure=node[0], calc_parameters=node[1], options=options, - inpgen = self.inputs.inpgen, fleur=self.inputs.fleur, - label=scf_label, description=scf_description)# + elif isinstance(node, list): #(StructureData, Dict)): + inputs = { + 'wf_parameters': wf_parameters, + 'structure': node[0], + 'calc_parameters': node[1], + 'options': options, + 'inpgen': self.inputs.inpgen, + 'fleur': self.inputs.fleur, + 'metadata': { + 'label': scf_label, + 'description': scf_description + } + } + res = self.submit(FleurScfWorkChain, **inputs) # else: self.report('WARNING: something in calcs_torun which I do not reconise: {}'.format(node)) continue @@ -564,7 +586,6 @@ def run_scfs_ref(self): self.ctx.ref_labels.append(label) calcs[label] = res res_all.append(res) - #print res self.ctx.ref_calcs_res.append(res) #self.ctx.calcs_torun.remove(node) #print res @@ -619,9 +640,6 @@ def handle_scf_failure(self): if failure: self.ctx.successful = False - return - - def collect_results(self): """ Collect results from certain calculation, check if everything is fine, @@ -630,7 +648,7 @@ def collect_results(self): """ from aiida_fleur.tools.common_fleur_wf_util import determine_formation_energy - message=('INFO: Collecting results of initial_state_CLS workflow') + message = ('INFO: Collecting results of initial_state_CLS workflow') self.report(message) # TODO be very careful with core config? #from pprint import pprint @@ -638,16 +656,18 @@ def collect_results(self): #self.ctx.ref_cl_energies all_CLS = {} # get results from calc - calcs = self.ctx.calcs_res - ref_calcs = []#self.ctx.ref_calcs_res - #print (self.ctx.ref_labels) + calcs = [] #self.ctx.calcs_res + ref_calcs = [] #self.ctx.ref_calcs_res for label in self.ctx.ref_labels: calc = self.ctx[label] ref_calcs.append(calc) - + for label in self.ctx.calc_labels: + calc = self.ctx[label] + calcs.append(calc) # extract_results need the scf workchain calculation node - total_en, fermi_energies, bandgaps, atomtypes, all_corelevel, log_ref = extract_results([calcs]) - ref_total_en, ref_fermi_energies, ref_bandgaps, ref_atomtypes, ref_all_corelevel, log = extract_results(ref_calcs) + total_en, fermi_energies, bandgaps, atomtypes, all_corelevel, log_ref = extract_results(calcs) + ref_total_en, ref_fermi_energies, ref_bandgaps, ref_atomtypes, ref_all_corelevel, log = extract_results( + ref_calcs) if log_ref or log: self.ctx.successful = False @@ -695,18 +715,18 @@ def collect_results(self): cls_atomtype = cls_atomtypes_list[i] corelevels = [] for corelevel in cls_atomtype[0]['corestates']: - correct_cl = corelevel['energy']-fermi_energies[compound] + correct_cl = corelevel['energy'] - fermi_energies[compound] corelevels.append(correct_cl) cl_energies[elm].append(corelevels) #now calculate CLS - ref = ref_cl_energies.get(elm,[0])[-1]# We just use one (last) atomtype + ref = ref_cl_energies.get(elm, [0])[-1] # We just use one (last) atomtype #of elemental reference (in general might be more complex, #since certain elemental unit cells could have several atom types (graphene)) corelevel_shifts = [] #TODO shall we store just one core-level shift per atomtype? - for i, corelevel in enumerate(cl_energies[elm][-1]): - corelevel_shifts.append(corelevel - float(ref[i])) + for j, corelevel in enumerate(cl_energies[elm][-1]): + corelevel_shifts.append(corelevel - float(ref[j])) all_CLS[elm].append(corelevel_shifts) # calculate formation energy @@ -718,7 +738,7 @@ def collect_results(self): # Formation energy calculation is ony possible if all elementals of the structure # have been calculated. # convert total_en dict to list, why? - total_en_list =[] + total_en_list = [] for key, val in six.iteritems(total_en): total_en_list.append([key, val]) if self.ctx.calculate_formation_energy: @@ -727,18 +747,20 @@ def collect_results(self): ref_total_en_norm = {} for key, val in six.iteritems(ref_total_en): elm_dict = get_natoms_element(key) - ref_total_en_norm[list(elm_dict.keys())[0]] = 1.0* val/list(elm_dict.values())[0] - #print ref_total_en_norm - #print total_en + ref_total_en_norm[list(elm_dict.keys())[0]] = 1.0 * val / list(elm_dict.values())[0] + #print(ref_total_en_norm) + #print(total_en) formation_energy, form_dict = determine_formation_energy(total_en, ref_total_en_norm) + #print(form_dict) else: formation_energy = [[]] # TODO make simpler format of atomtypes for node # TODO write corelevel explanation/coresetup in a format like 4f7/2 #TODO ? also get total energies? - return cl_energies, all_CLS, ref_cl_energies, fermi_energies, bandgaps, ref_fermi_energies, ref_bandgaps, atomtypes, ref_atomtypes, formation_energy[0], total_en, ref_total_en + return cl_energies, all_CLS, ref_cl_energies, fermi_energies, bandgaps, ref_fermi_energies, ref_bandgaps, atomtypes, ref_atomtypes, formation_energy, total_en, ref_total_en + #return cl_energies, all_CLS, ref_cl_energies, fermi_energies, bandgaps, ref_fermi_energies, ref_bandgaps, atomtypes, ref_atomtypes, formation_energy[0], total_en, ref_total_en def return_results(self): """ @@ -760,9 +782,9 @@ def return_results(self): outputnode_dict['successful'] = self.ctx.successful outputnode_dict['material'] = list(efermi.keys())[0] outputnode_dict['corelevel_energies'] = cl - outputnode_dict['corelevel_energies_units'] = 'htr'#'eV' + outputnode_dict['corelevel_energies_units'] = 'htr' #'eV' outputnode_dict['reference_corelevel_energies'] = ref_cl - outputnode_dict['reference_corelevel_energies_units'] = 'htr'#'eV' + outputnode_dict['reference_corelevel_energies_units'] = 'htr' #'eV' outputnode_dict['reference_fermi_energy'] = list(ref_efermi.values()) outputnode_dict['reference_fermi_energy_des'] = list(ref_efermi.keys()) outputnode_dict['fermi_energy'] = list(efermi.values())[0] @@ -791,14 +813,14 @@ def return_results(self): outnodedict['results_node'] = outnode # TODO: bad design, put in calcfunction and make bullet proof. - calc = self.ctx.calcs_res - calc_dict = calc.get_outputs_dict()['output_scf_wc_para'] - outnodedict['input_structure'] = calc_dict + calc = self.ctx[self.ctx.calc_labels[-1]] + calc_dict = calc.get_outgoing().get_node_by_label('output_scf_wc_para') + outnodedict['input_structure'] = calc_dict for label in self.ctx.ref_labels: calc = self.ctx[label] - calc_dict = calc.get_outputs_dict()['output_scf_wc_para'] - outnodedict[label] = calc_dict + calc_dict = calc.get_outgoing().get_node_by_label('output_scf_wc_para') + outnodedict[label] = calc_dict outdict = create_initcls_result_node(**outnodedict) @@ -817,13 +839,10 @@ def control_end_wc(self, errormsg): """ self.ctx.successful = False self.ctx.abort = True - self.report(errormsg) # because return_results still fails somewhen + self.report(errormsg) # because return_results still fails somewhen self.ctx.errors.append(errormsg) self.return_results() - return - - @cf def create_initcls_result_node(**kwargs): @@ -844,7 +863,6 @@ def create_initcls_result_node(**kwargs): return outdict - def querry_for_ref_structure(element_string): """ This methods finds StructureData nodes with the following extras: @@ -861,12 +879,21 @@ def querry_for_ref_structure(element_string): #query db q = QueryBuilder() q.append(StructureData, - filters = {'extras.type' : {'==' : 'bulk'}, - 'extras.specification' : {'==' : 'reference'}, - 'extras.elemental' : {'==' : True}, - 'extras.element' : {'==' : element_string} - }) - q.order_by({StructureData : 'ctime'})#always use the most recent + filters={ + 'extras.type': { + '==': 'bulk' + }, + 'extras.specification': { + '==': 'reference' + }, + 'extras.elemental': { + '==': True + }, + 'extras.element': { + '==': element_string + } + }) + q.order_by({StructureData: 'ctime'}) #always use the most recent structures = q.all() if structures: @@ -884,6 +911,7 @@ def fleur_calc_get_structure(calc_node): structure = fleurinp.get_structuredata(fleurinp) return structure + def extract_results(calcs): """ Collect results from certain calculation, check if everything is fine, @@ -898,14 +926,13 @@ def extract_results(calcs): for calc in calcs: #print(calc) try: - calc_uuids.append(calc.get_outputs_dict()['output_scf_wc_para'].get_dict()['last_calc_uuid']) - except: #TODO what error - logmsg = ('ERROR: No output_scf_wc_para node found for "last_calc_uuid"' + calc_uuids.append(calc.get_outgoing().get_node_by_label('output_scf_wc_para').get_dict()['last_calc_uuid']) + except (NotExistent, MultipleObjectsError, ValueError, TypeError, KeyError): #TODO which error + logmsg = ('ERROR: No output_scf_wc_para node found or no "last_calc_uuid" ' 'key in it for calculation: {}'.format(calc)) log.append(logmsg) continue #calc_uuids.append(calc['output_scf_wc_para'].get_dict()['last_calc_uuid']) - #print(calc_uuids) all_corelevels = {} fermi_energies = {} @@ -918,15 +945,19 @@ def extract_results(calcs): # check if calculation pks belong to successful fleur calculations for uuid in calc_uuids: calc = load_node(uuid) - if not isinstance(calc, FleurCalc): + if not isinstance(calc, CalcJobNode): #raise ValueError("Calculation with pk {} must be a FleurCalculation".format(pk)) # log and continue continue if calc.is_finished_ok: # get out.xml file of calculation - outxml = calc.outputs.retrieved.folder.get_abs_path('path/out.xml') + #outxml = calc.outputs.retrieved.folder.get_abs_path('path/out.xml') + outxml = calc.outputs.retrieved.open('out.xml') #print outxml - corelevels, atomtypes = extract_corelevels(outxml) + try: + corelevels, atomtypes = extract_corelevels(outxml) + finally: + outxml.close() #all_corelevels.append(core) #print('corelevels: {}'.format(corelevels)) #print('atomtypes: {}'.format(atomtypes)) @@ -959,13 +990,13 @@ def extract_results(calcs): efermi = float('nan') corelevels = [float('nan')] atomtypes = [float('nan')] - logmsg = "ERROR: Fleur Calculation with uuid {} was not in in state FINISHED".format(uuid) + logmsg = 'ERROR: Fleur Calculation with uuid {} was not in in state FINISHED'.format(uuid) log.append(logmsg) #continue #raise ValueError("Calculation with pk {} must be in state FINISHED".format(pk)) # TODO: maybe different, because it is prob know from before - fleurinp = calc.inp.fleurinpdata + fleurinp = calc.inputs.fleurinpdata structure = fleurinp.get_structuredata_ncf() compound = structure.get_formula() #print compound @@ -1049,12 +1080,11 @@ def get_ref_from_group(element, group): for struc in stru_nodes: formula = struc.get_formula() - eformula = formula.translate(None, digits) # remove digits, !python3 differs + eformula = formula.translate(None, digits) # remove digits, !python3 differs if eformula == element: return struc, report - report.append('Structure node for element {} not found in group {}' - ''.format(element, group)) + report.append('Structure node for element {} not found in group {}' ''.format(element, group)) return structure, report @@ -1075,7 +1105,7 @@ def get_para_from_group(element, group): if group_pk is not None: try: - para_group = Group(dbgroup=group_pk) + para_group = load_group(pk=group_pk) except NotExistent: para_group = None message = ('You have to provide a valid pk for a Group of ' @@ -1085,10 +1115,10 @@ def get_para_from_group(element, group): report.append(message) else: try: - para_group = Group.get_from_string(group_name) + para_group = load_group(label=group_name) except NotExistent: para_group = None - message = ('You have to provide a valid pk for a Group of ' + message = ('You have to provide a valid label for a Group of ' 'parameters or a Group name. Wf_para key: "para_group".' 'given group name= {} is not a valid group' '(or is your group name integer?)'.format(group_name)) @@ -1106,13 +1136,11 @@ def get_para_from_group(element, group): if formula == element: return para, report - report.append('Parameter node for element {} not found in group {}' - ''.format(element, group)) + report.append('Parameter node for element {} not found in group {}' ''.format(element, group)) return parameter, report - def clshifts_to_be(coreleveldict, reference_dict): """ This methods converts corelevel shifts to binding energies, @@ -1152,4 +1180,3 @@ def clshifts_to_be(coreleveldict, reference_dict): return_corelevel_dict[elem][corelevel_name] = be_all return return_corelevel_dict - diff --git a/aiida_fleur/workflows/mae.py b/aiida_fleur/workflows/mae.py index 53467a904..992ad2ed4 100644 --- a/aiida_fleur/workflows/mae.py +++ b/aiida_fleur/workflows/mae.py @@ -9,7 +9,6 @@ # For further information please visit http://www.flapw.de or # # http://aiida-fleur.readthedocs.io/en/develop/ # ############################################################################### - """ In this module you find the workflow 'FleurMaeWorkChain' for the calculation of Magnetic Anisotropy Energy via the force theorem. @@ -19,7 +18,7 @@ import copy import six -from six.moves import map +#from six.moves import map from lxml import etree from aiida.engine import WorkChain, ToContext, if_ @@ -41,15 +40,19 @@ class FleurMaeWorkChain(WorkChain): This workflow calculates the Magnetic Anisotropy Energy of a structure. """ - _workflowversion = "0.2.0" + _workflowversion = '0.3.0' _default_options = { - 'resources': {"num_machines": 1, "num_mpiprocs_per_machine": 1}, + 'resources': { + 'num_machines': 1, + 'num_mpiprocs_per_machine': 1 + }, 'max_wallclock_seconds': 2 * 60 * 60, 'queue_name': '', 'custom_scheduler_commands': '', 'import_sys_environment': False, - 'environment_variables': {}} + 'environment_variables': {} + } _wf_default = { 'sqa_ref': [0.7, 0.7], @@ -65,43 +68,35 @@ class FleurMaeWorkChain(WorkChain): def define(cls, spec): super(FleurMaeWorkChain, cls).define(spec) spec.expose_inputs(FleurScfWorkChain, namespace='scf') - spec.input("wf_parameters", valid_type=Dict, required=False) - spec.input("fleur", valid_type=Code, required=True) - spec.input("remote", valid_type=RemoteData, required=False) - spec.input("fleurinp", valid_type=FleurinpData, required=False) - spec.input("options", valid_type=Dict, required=False) - - spec.outline( - cls.start, - if_(cls.scf_needed)( - cls.converge_scf, - cls.force_after_scf, - ).else_( - cls.force_wo_scf, - ), - cls.get_results, - cls.return_results - ) - - spec.output('out', valid_type=Dict) + spec.input('wf_parameters', valid_type=Dict, required=False) + spec.input('fleur', valid_type=Code, required=True) + spec.input('remote', valid_type=RemoteData, required=False) + spec.input('fleurinp', valid_type=FleurinpData, required=False) + spec.input('options', valid_type=Dict, required=False) + + spec.outline(cls.start, + if_(cls.scf_needed)( + cls.converge_scf, + cls.force_after_scf, + ).else_( + cls.force_wo_scf, + ), cls.get_results, cls.return_results) + + spec.output('output_mae_wc_para', valid_type=Dict) # exit codes - spec.exit_code(230, 'ERROR_INVALID_INPUT_PARAM', - message="Invalid workchain parameters.") - spec.exit_code(231, 'ERROR_INVALID_INPUT_CONFIG', - message="Invalid input configuration.") - spec.exit_code(233, 'ERROR_INVALID_CODE_PROVIDED', - message="Invalid code node specified, check inpgen and fleur code nodes.") - spec.exit_code(235, 'ERROR_CHANGING_FLEURINPUT_FAILED', - message="Input file modification failed.") - spec.exit_code(236, 'ERROR_INVALID_INPUT_FILE', - message="Input file was corrupted after user's modifications.") - spec.exit_code(334, 'ERROR_REFERENCE_CALCULATION_FAILED', - message="Reference calculation failed.") - spec.exit_code(335, 'ERROR_REFERENCE_CALCULATION_NOREMOTE', - message="Found no reference calculation remote repository.") - spec.exit_code(336, 'ERROR_FORCE_THEOREM_FAILED', - message="Force theorem calculation failed.") + spec.exit_code(230, 'ERROR_INVALID_INPUT_PARAM', message='Invalid workchain parameters.') + spec.exit_code(231, 'ERROR_INVALID_INPUT_CONFIG', message='Invalid input configuration.') + spec.exit_code(233, + 'ERROR_INVALID_CODE_PROVIDED', + message='Invalid code node specified, check inpgen and fleur code nodes.') + spec.exit_code(235, 'ERROR_CHANGING_FLEURINPUT_FAILED', message='Input file modification failed.') + spec.exit_code(236, 'ERROR_INVALID_INPUT_FILE', message="Input file was corrupted after user's modifications.") + spec.exit_code(334, 'ERROR_REFERENCE_CALCULATION_FAILED', message='Reference calculation failed.') + spec.exit_code(335, + 'ERROR_REFERENCE_CALCULATION_NOREMOTE', + message='Found no reference calculation remote repository.') + spec.exit_code(336, 'ERROR_FORCE_THEOREM_FAILED', message='Force theorem calculation failed.') def start(self): """ @@ -116,6 +111,7 @@ def start(self): self.ctx.t_energydict = [] self.ctx.mae_thetas = [] self.ctx.mae_phis = [] + self.ctx.fleuroutuuid = None # initialize the dictionary using defaults if no wf paramters are given wf_default = copy.deepcopy(self._wf_default) @@ -140,16 +136,19 @@ def start(self): # switch off SOC on an atom specie for atom_label in self.ctx.wf_dict['soc_off']: - self.ctx.wf_dict['inpxml_changes'].append( - ('set_species_label', - {'at_label': atom_label, - 'attributedict': {'special': {'socscale': 0.0}}, - 'create': True - })) + self.ctx.wf_dict['inpxml_changes'].append(('set_species_label', { + 'at_label': atom_label, + 'attributedict': { + 'special': { + 'socscale': 0.0 + } + }, + 'create': True + })) # Check if sqas_theta and sqas_phi have the same length if len(self.ctx.wf_dict.get('sqas_theta')) != len(self.ctx.wf_dict.get('sqas_phi')): - error = ("Number of sqas_theta has to be equal to the number of sqas_phi") + error = ('Number of sqas_theta has to be equal to the number of sqas_phi') self.control_end_wc(error) return self.exit_codes.ERROR_INVALID_INPUT_PARAM @@ -171,7 +170,7 @@ def start(self): try: test_and_get_codenode(inputs.fleur, 'fleur.fleur', use_exceptions=True) except ValueError: - error = ("The code you provided for FLEUR does not use the plugin fleur.fleur") + error = ('The code you provided for FLEUR does not use the plugin fleur.fleur') self.control_end_wc(error) return self.exit_codes.ERROR_INVALID_CODE_PROVIDED @@ -179,15 +178,15 @@ def start(self): if inputs.scf: self.ctx.scf_needed = True if 'remote' in inputs: - error = "ERROR: you gave SCF input + remote for the FT" + error = 'ERROR: you gave SCF input + remote for the FT' self.control_end_wc(error) return self.exit_codes.ERROR_INVALID_INPUT_CONFIG if 'fleurinp' in inputs: - error = "ERROR: you gave SCF input + fleurinp for the FT" + error = 'ERROR: you gave SCF input + fleurinp for the FT' self.control_end_wc(error) return self.exit_codes.ERROR_INVALID_INPUT_CONFIG elif 'remote' not in inputs: - error = "ERROR: you gave neither SCF input nor remote for the FT" + error = 'ERROR: you gave neither SCF input nor remote for the FT' self.control_end_wc(error) return self.exit_codes.ERROR_INVALID_INPUT_CONFIG else: @@ -226,8 +225,7 @@ def get_inputs_scf(self): soc = self.ctx.wf_dict.get('sqa_ref') if not self.ctx.wf_dict.get('use_soc_ref'): - scf_wf_dict['inpxml_changes'].append( - ('set_inpchanges', {'change_dict': {'l_soc': False}})) + scf_wf_dict['inpxml_changes'].append(('set_inpchanges', {'change_dict': {'l_soc': False}})) else: # set soc parameters explicitly changes_dict = {'theta': soc[0], 'phi': soc[1], 'l_soc': True} scf_wf_dict['inpxml_changes'].append(('set_inpchanges', {'change_dict': changes_dict})) @@ -273,26 +271,32 @@ def change_fleurinp(self): fchanges = self.ctx.wf_dict.get('inpxml_changes', []) # add forceTheorem tag into inp.xml - fchanges.extend([('create_tag', - {'xpath': '/fleurInput', - 'newelement': 'forceTheorem' - }), - ('create_tag', - {'xpath': '/fleurInput/forceTheorem', - 'newelement': 'MAE' - }), - ('xml_set_attribv_occ', - {'xpathn': '/fleurInput/forceTheorem/MAE', - 'attributename': 'theta', - 'attribv': ' '.join(map(str, self.ctx.wf_dict.get('sqas_theta'))) - }), - ('xml_set_attribv_occ', - {'xpathn': '/fleurInput/forceTheorem/MAE', - 'attributename': 'phi', - 'attribv': ' '.join(map(str, self.ctx.wf_dict.get('sqas_phi'))) - }), - ('set_inpchanges', {'change_dict': {'itmax': 1, 'l_soc': True}}), - ]) + fchanges.extend([ + ('create_tag', { + 'xpath': '/fleurInput', + 'newelement': 'forceTheorem' + }), + ('create_tag', { + 'xpath': '/fleurInput/forceTheorem', + 'newelement': 'MAE' + }), + ('xml_set_attribv_occ', { + 'xpathn': '/fleurInput/forceTheorem/MAE', + 'attributename': 'theta', + 'attribv': ' '.join(six.moves.map(str, self.ctx.wf_dict.get('sqas_theta'))) + }), + ('xml_set_attribv_occ', { + 'xpathn': '/fleurInput/forceTheorem/MAE', + 'attributename': 'phi', + 'attribv': ' '.join(six.moves.map(str, self.ctx.wf_dict.get('sqas_phi'))) + }), + ('set_inpchanges', { + 'change_dict': { + 'itmax': 1, + 'l_soc': True + } + }), + ]) if fchanges: # change inp.xml file fleurmode = FleurinpModifier(fleurin) @@ -305,9 +309,9 @@ def change_fleurinp(self): method = avail_ac_dict.get(function, None) if not method: error = ("ERROR: Input 'inpxml_changes', function {} " - "is not known to fleurinpmodifier class, " - "please check/test your input. I abort..." - "".format(function)) + 'is not known to fleurinpmodifier class, ' + 'please check/test your input. I abort...' + ''.format(function)) self.control_end_wc(error) return self.exit_codes.ERROR_CHANGING_FLEURINPUT_FAILED @@ -353,8 +357,7 @@ def force_after_scf(self): t_e = outpara.get('total_energy', 'failed') if not isinstance(t_e, float): - message = ('Did not manage to extract float total energy from the reference ' - 'SCF calculation.') + message = ('Did not manage to extract float total energy from the reference SCF calculation.') self.control_end_wc(message) return self.exit_codes.ERROR_REFERENCE_CALCULATION_FAILED @@ -384,14 +387,19 @@ def force_after_scf(self): self.control_end_wc(message) return self.exit_codes.ERROR_REFERENCE_CALCULATION_NOREMOTE - label = 'Force_theorem_calculation' - description = 'This is a force theorem calculation for all SQA' + label = 'MAE_force_theorem' + description = 'This is the force theorem calculation for MAE.' code = self.inputs.fleur options = self.ctx.options.copy() - inputs_builder = get_inputs_fleur(code, remote, - fleurin, options, label, description, settings, + inputs_builder = get_inputs_fleur(code, + remote, + fleurin, + options, + label, + description, + settings, serial=self.ctx.wf_dict['serial']) future = self.submit(FleurBaseWorkChain, **inputs_builder) return ToContext(f_t=future) @@ -420,8 +428,13 @@ def force_wo_scf(self): code = self.inputs.fleur options = self.ctx.options.copy() - inputs_builder = get_inputs_fleur(code, remote, - fleurin, options, label, description, settings, + inputs_builder = get_inputs_fleur(code, + remote, + fleurin, + options, + label, + description, + settings, serial=self.ctx.wf_dict['serial']) future = self.submit(FleurBaseWorkChain, **inputs_builder) return ToContext(f_t=future) @@ -434,6 +447,7 @@ def get_results(self): mae_thetas = [] mae_phis = [] htr_to_ev = 27.21138602 + fleur_output_uuid = None try: calculation = self.ctx.f_t @@ -448,7 +462,9 @@ def get_results(self): return self.exit_codes.ERROR_FORCE_THEOREM_FAILED try: - out_dict = calculation.outputs.output_parameters.dict + fleurout = calculation.outputs.output_parameters + fleur_output_uuid = fleurout.uuid + out_dict = fleurout.dict t_energydict = out_dict.mae_force_evSum mae_thetas = out_dict.mae_force_theta mae_phis = out_dict.mae_force_phi @@ -457,38 +473,50 @@ def get_results(self): minenergy = min(t_energydict) if e_u == 'Htr' or 'htr': - t_energydict = [htr_to_ev * (x-minenergy) for x in t_energydict] + t_energydict = [htr_to_ev * (x - minenergy) for x in t_energydict] else: - t_energydict = [(x-minenergy) for x in t_energydict] + t_energydict = [(x - minenergy) for x in t_energydict] - except AttributeError: - message = ('Did not manage to read evSum or energy units after FT calculation.') + except AttributeError as e_message: + message = ('Did not manage to read evSum or energy units after FT calculation. {}'.format(e_message)) self.control_end_wc(message) return self.exit_codes.ERROR_FORCE_THEOREM_FAILED self.ctx.t_energydict = t_energydict self.ctx.mae_thetas = mae_thetas self.ctx.mae_phis = mae_phis + self.ctx.fleuroutuuid = fleur_output_uuid def return_results(self): """ This function outputs results of the wc """ - out = {'workflow_name': self.__class__.__name__, - 'workflow_version': self._workflowversion, - # 'initial_structure': self.inputs.structure.uuid, - 'is_it_force_theorem': True, - 'maes': self.ctx.t_energydict, - 'theta': self.ctx.mae_thetas, - 'phi': self.ctx.mae_phis, - 'mae_units': 'eV', - 'info': self.ctx.info, - 'warnings': self.ctx.warnings, - 'errors': self.ctx.errors} - - out = save_output_node(Dict(dict=out)) - self.out('out', out) + out = { + 'workflow_name': self.__class__.__name__, + 'workflow_version': self._workflowversion, + # 'initial_structure': self.inputs.structure.uuid, + 'is_it_force_theorem': True, + 'maes': self.ctx.t_energydict, + 'theta': self.ctx.mae_thetas, + 'phi': self.ctx.mae_phis, + 'mae_units': 'eV', + 'info': self.ctx.info, + 'warnings': self.ctx.warnings, + 'errors': self.ctx.errors + } + + # ensure provenance of output nodes + + out_dict = {'out': Dict(dict=out)} + if self.ctx.fleuroutuuid is not None: + out_dict['last_fleur_out'] = load_node(self.ctx.fleuroutuuid) + + out_nodes = save_mae_output_node(**out_dict) + out = out_nodes.get('output_mae_wc_para') + + # make wc return out node + self.out('output_mae_wc_para', out) def control_end_wc(self, errormsg): """ @@ -501,9 +529,24 @@ def control_end_wc(self, errormsg): @cf -def save_output_node(out): +def save_mae_output_node(**kwargs): """ - This calcfunction saves the out dict in the db + This is a pseudo cf, to create the right graph structure of AiiDA. + This calcfunction will create the output node in the database. + It also connects the output_node to all nodes the information comes from. + So far it is just also parsed in as argument, because so far we are to lazy + to put most of the code overworked from return_results in here. """ - out_wc = out.clone() - return out_wc + for key, val in six.iteritems(kwargs): + if key == 'out': # should be always there + outpara = val + outdict = {} + + # clone, because we rather produce the same node twice then have a circle in the database for + outputnode = outpara.clone() + outputnode.label = 'output_mae_wc_para' + outputnode.description = ('Contains magnetic anisotropy results and information of an FleurMaeWorkChain run.') + + outdict['output_mae_wc_para'] = outputnode + + return outdict diff --git a/aiida_fleur/workflows/mae_conv.py b/aiida_fleur/workflows/mae_conv.py index cb5d0e796..06bbbce76 100644 --- a/aiida_fleur/workflows/mae_conv.py +++ b/aiida_fleur/workflows/mae_conv.py @@ -9,7 +9,6 @@ # For further information please visit http://www.flapw.de or # # http://aiida-fleur.readthedocs.io/en/develop/ # ############################################################################### - """ In this module you find the workflow 'FleurMAEWorkChain' for the calculation of Magnetic Anisotropy Energy converging all the directions. @@ -32,35 +31,24 @@ class FleurMaeConvWorkChain(WorkChain): This workflow calculates the Magnetic Anisotropy Energy of a structure. """ - _workflowversion = "0.2.0" + _workflowversion = '0.2.0' - _wf_default = { - 'sqas': {'label': [0.0, 0.0]}, - 'soc_off': [] - } + _wf_default = {'sqas': {'label': [0.0, 0.0]}, 'soc_off': []} @classmethod def define(cls, spec): super(FleurMaeConvWorkChain, cls).define(spec) spec.expose_inputs(FleurScfWorkChain, namespace='scf') - spec.input("wf_parameters", valid_type=Dict, required=False) + spec.input('wf_parameters', valid_type=Dict, required=False) - spec.outline( - cls.start, - cls.converge_scf, - cls.get_results, - cls.return_results - ) + spec.outline(cls.start, cls.converge_scf, cls.get_results, cls.return_results) spec.output('out', valid_type=Dict) # exit codes - spec.exit_code(230, 'ERROR_INVALID_INPUT_PARAM', - message="Invalid workchain parameters.") - spec.exit_code(343, 'ERROR_ALL_SQAS_FAILED', - message="Convergence MAE calculation failed for all SQAs.") - spec.exit_code(344, 'ERROR_SOME_SQAS_FAILED', - message="Convergence MAE calculation failed for some SQAs.") + spec.exit_code(230, 'ERROR_INVALID_INPUT_PARAM', message='Invalid workchain parameters.') + spec.exit_code(343, 'ERROR_ALL_SQAS_FAILED', message='Convergence MAE calculation failed for all SQAs.') + spec.exit_code(344, 'ERROR_SOME_SQAS_FAILED', message='Convergence MAE calculation failed for some SQAs.') def start(self): """ @@ -90,8 +78,7 @@ def start(self): if key not in wf_default.keys(): extra_keys.append(key) if extra_keys: - error = 'ERROR: input wf_parameters for MAE Conv contains extra keys: {}'.format( - extra_keys) + error = 'ERROR: input wf_parameters for MAE Conv contains extra keys: {}'.format(extra_keys) self.report(error) return self.exit_codes.ERROR_INVALID_INPUT_PARAM @@ -131,12 +118,15 @@ def get_inputs_scf(self): # switch off SOC on an atom specie for atom_label in self.ctx.wf_dict['soc_off']: - scf_wf_dict['inpxml_changes'].append( - ('set_species_label', - {'at_label': atom_label, - 'attributedict': {'special': {'socscale': 0.0}}, - 'create': True - })) + scf_wf_dict['inpxml_changes'].append(('set_species_label', { + 'at_label': atom_label, + 'attributedict': { + 'special': { + 'socscale': 0.0 + } + }, + 'create': True + })) input_scf.wf_parameters = Dict(dict=scf_wf_dict) @@ -167,9 +157,7 @@ def get_results(self): try: outnodedict[label] = calc.outputs.output_scf_wc_para except KeyError: - message = ( - 'One SCF workflow failed, no scf output node: {}.' - ' I skip this one.'.format(label)) + message = ('One SCF workflow failed, no scf output node: {}.' ' I skip this one.'.format(label)) self.ctx.errors.append(message) continue @@ -177,9 +165,7 @@ def get_results(self): t_e = outpara.get('total_energy', 'failed') if not isinstance(t_e, float): - message = ( - 'Did not manage to extract float total energy from one ' - 'SCF workflow: {}'.format(label)) + message = ('Did not manage to extract float total energy from one ' 'SCF workflow: {}'.format(label)) self.ctx.warnings.append(message) continue e_u = outpara.get('total_energy_units', 'Htr') @@ -207,16 +193,18 @@ def return_results(self): if label not in six.iterkeys(self.ctx.energydict): failed_labels.append(label) - out = {'workflow_name': self.__class__.__name__, - 'workflow_version': self._workflowversion, - # 'initial_structure': self.inputs.structure.uuid, - 'mae': self.ctx.energydict, - 'sqa': self.ctx.wf_dict['sqas'], - 'failed_labels': failed_labels, - 'mae_units': 'eV', - 'info': self.ctx.info, - 'warnings': self.ctx.warnings, - 'errors': self.ctx.errors} + out = { + 'workflow_name': self.__class__.__name__, + 'workflow_version': self._workflowversion, + # 'initial_structure': self.inputs.structure.uuid, + 'mae': self.ctx.energydict, + 'sqa': self.ctx.wf_dict['sqas'], + 'failed_labels': failed_labels, + 'mae_units': 'eV', + 'info': self.ctx.info, + 'warnings': self.ctx.warnings, + 'errors': self.ctx.errors + } # create link to workchain node out = save_output_node(Dict(dict=out)) diff --git a/aiida_fleur/workflows/optimize_para.py b/aiida_fleur/workflows/optimize_para.py index a0b7567cf..901bd7b42 100644 --- a/aiida_fleur/workflows/optimize_para.py +++ b/aiida_fleur/workflows/optimize_para.py @@ -9,7 +9,6 @@ # For further information please visit http://www.flapw.de or # # http://aiida-fleur.readthedocs.io/en/develop/ # ############################################################################### - """ In this module you find the workflow 'fleur_optimize_parameter_wc', which finds working/(in the future, optiomal) flapw parameters for a given Structure @@ -17,22 +16,16 @@ #import numpy as np from __future__ import absolute_import +import six + from aiida.plugins import DataFactory from aiida.orm import Code, load_node from aiida.orm import StructureData, RemoteData, Dict -#from aiida.orm.data.base import Float -#from aiida.work.process_registry import ProcessRegistry -from aiida.engine import WorkChain, ToContext#,Outputs -#from aiida.work import calcfunction as cf +from aiida.engine import WorkChain, ToContext #,Outputs from aiida.engine import submit -#from aiida_fleur.tools.StructureData_util import rescale, is_structure -#from aiida_fleur.workflows.scf import fleur_scf_wc from aiida_fleur.calculation.fleurinputgen import FleurinputgenCalculation -#from aiida_fleur.data.fleurinpmodifier import FleurinpModifier from aiida_fleur.tools.common_fleur_wf import get_inputs_fleur, get_inputs_inpgen from aiida_fleur.tools.common_fleur_wf import test_and_get_codenode -import six - from aiida_fleur.data.fleurinp import FleurinpData @@ -55,7 +48,7 @@ class fleur_optimize_parameters_wc(WorkChain): """ - _workflowversion = "0.1.0" + _workflowversion = '0.1.0' def __init__(self, *args, **kwargs): super(fleur_optimize_parameters_wc, self).__init__(*args, **kwargs) @@ -63,31 +56,32 @@ def __init__(self, *args, **kwargs): @classmethod def define(cls, spec): super(fleur_optimize_parameters_wc, cls).define(spec) - spec.input("wf_parameters", valid_type=Dict, required=False, - default=Dict(dict={ - 'resources' : {"num_machines": 1},#, "num_mpiprocs_per_machine" : 12}, - 'walltime_sec': 60*60, - 'queue_name' : '', - 'custom_scheduler_commands' : ''})) - spec.input("structure", valid_type=StructureData, required=True) - spec.input("inpgen", valid_type=Code, required=True) - spec.input("fleur", valid_type=Code, required=False) - spec.outline( - cls.start, - cls.run_inpgen, - cls.determine_parameters, - cls.return_results - ) + spec.input( + 'wf_parameters', + valid_type=Dict, + required=False, + default=Dict( + dict={ + 'resources': { + 'num_machines': 1 + }, #, "num_mpiprocs_per_machine" : 12}, + 'walltime_sec': 60 * 60, + 'queue_name': '', + 'custom_scheduler_commands': '' + })) + spec.input('structure', valid_type=StructureData, required=True) + spec.input('inpgen', valid_type=Code, required=True) + spec.input('fleur', valid_type=Code, required=False) + spec.outline(cls.start, cls.run_inpgen, cls.determine_parameters, cls.return_results) #spec.dynamic_output() - def start(self): """ check parameters, what condictions? complete? check input nodes """ self.report('started fleur_optimize_parameter workflow version {}'.format(self._workflowversion)) - self.report("Workchain node identifiers: ")#{}".format(ProcessRegistry().current_calc_node)) + self.report('Workchain node identifiers: ') #{}".format(ProcessRegistry().current_calc_node)) ### input check ### @@ -106,32 +100,27 @@ def start(self): self.ctx.custom_scheduler_commands = wf_dict.get('custom_scheduler_commands', '') self.ctx.max_number_runs = wf_dict.get('fleur_runmax', 4) self.ctx.description_wf = self.inputs.get('_description', '') + '|fleur_optimize_parameters_wc|' - self.ctx.walltime_sec = wf_dict.get('walltime_sec', 60*60) - self.ctx.resources = wf_dict.get('resources' , {"num_machines": 1}) - self.ctx.queue = wf_dict.get('queue_name' , '') + self.ctx.walltime_sec = wf_dict.get('walltime_sec', 60 * 60) + self.ctx.resources = wf_dict.get('resources', {'num_machines': 1}) + self.ctx.queue = wf_dict.get('queue_name', '') # codes if 'inpgen' in inputs: try: - test_and_get_codenode(inputs.inpgen, 'fleur.inpgen', - use_exceptions=True) + test_and_get_codenode(inputs.inpgen, 'fleur.inpgen', use_exceptions=True) except ValueError: - error = ("The code you provided for inpgen of FLEUR does not " - "use the plugin fleur.inpgen") + error = ('The code you provided for inpgen of FLEUR does not use the plugin fleur.inpgen') self.control_end_wc(error) self.abort(error) if 'fleur' in inputs: try: - test_and_get_codenode(inputs.fleur, 'fleur.fleur', - use_exceptions=True) + test_and_get_codenode(inputs.fleur, 'fleur.fleur', use_exceptions=True) except ValueError: - error = ("The code you provided for FLEUR does not " - "use the plugin fleur.fleur") + error = ('The code you provided for FLEUR does not use the plugin fleur.fleur') self.control_end_wc(error) self.abort(error) - def run_inpgen(self): """ So far run inpgen and see what you get @@ -140,8 +129,7 @@ def run_inpgen(self): structure = self.inputs.structure self.ctx.formula = structure.get_formula() label = 'scf: inpgen' - description = '{} inpgen on {}'.format(self.ctx.description_wf, - self.ctx.formula) + description = '{} inpgen on {}'.format(self.ctx.description_wf, self.ctx.formula) inpgencode = self.inputs.inpgen if 'calc_parameters' in self.inputs: @@ -149,18 +137,18 @@ def run_inpgen(self): else: params = None - options = {"max_wallclock_seconds": self.ctx.walltime_sec, - "resources": self.ctx.resources, - "queue_name" : self.ctx.queue} + options = { + 'max_wallclock_seconds': self.ctx.walltime_sec, + 'resources': self.ctx.resources, + 'queue_name': self.ctx.queue + } - inputs = get_inputs_inpgen(structure, inpgencode, options, label, - description, params=params) + inputs = get_inputs_inpgen(structure, inpgencode, options, label, description, params=params) self.report('INFO: run inpgen') future = submit(FleurinputgenCalculation, **inputs) return ToContext(inpgen=future, last_calc=future) - def determine_parameters(self): """ Determine_parameters, so far extract them from FleurinpData @@ -175,7 +163,6 @@ def determine_parameters(self): # TODO this has to be implemented self.ctx.optimal_parameters = fleurin.get_parameterdata(fleurin) - # TODO determine optimasation # look at number of atoms # basis size nvd not known, only after fleur run @@ -193,11 +180,13 @@ def return_results(self): else: optimal_parameters_uuid = None - out = {'workflow_name' : self.__class__.__name__, - 'workflow_version' : self._workflowversion, - 'structure': self.inputs.structure.uuid, - 'optimal_para' : optimal_parameters_uuid, - 'successful' : self.ctx.successful} + out = { + 'workflow_name': self.__class__.__name__, + 'workflow_version': self._workflowversion, + 'structure': self.inputs.structure.uuid, + 'optimal_para': optimal_parameters_uuid, + 'successful': self.ctx.successful + } outnode = Dict(dict=out) @@ -212,7 +201,6 @@ def return_results(self): else: self.report('Done, but something failed in fleur_optimize_parameter_wc.') - # create link to workchain node for link_name, node in six.iteritems(returndict): self.out(link_name, node) @@ -224,7 +212,7 @@ def control_end_wc(self, errormsg): """ self.ctx.successful = False self.ctx.abort = True - self.report(errormsg) # because return_results still fails somewhen + self.report(errormsg) # because return_results still fails somewhen self.return_results() #self.abort_nowait(errormsg) self.abort(errormsg) diff --git a/aiida_fleur/workflows/relax.py b/aiida_fleur/workflows/relax.py index ee87e5f97..53deac5c2 100644 --- a/aiida_fleur/workflows/relax.py +++ b/aiida_fleur/workflows/relax.py @@ -9,7 +9,6 @@ # For further information please visit http://www.flapw.de or # # http://aiida-fleur.readthedocs.io/en/develop/ # ############################################################################### - """ In this module you find the workflow 'FleurRelaxWorkChain' for geometry optimization. """ @@ -17,10 +16,9 @@ from __future__ import print_function import copy import numpy as np - import six -from aiida.engine import WorkChain, ToContext, while_ +from aiida.engine import WorkChain, ToContext, while_, if_ from aiida.engine import calcfunction as cf from aiida.orm import load_node from aiida.orm import StructureData, Dict @@ -29,6 +27,8 @@ from aiida_fleur.workflows.scf import FleurScfWorkChain from aiida_fleur.calculation.fleur import FleurCalculation as FleurCalc +from aiida_fleur.common.constants import bohr_a +from aiida_fleur.tools.StructureData_util import break_symmetry_wf class FleurRelaxWorkChain(WorkChain): @@ -36,19 +36,23 @@ class FleurRelaxWorkChain(WorkChain): This workflow performs structure optimization. """ - _workflowversion = "0.1.3" + _workflowversion = '0.2.0' _wf_default = { 'relax_iter': 5, 'film_distance_relaxation': False, - 'force_criterion': 0.001 + 'force_criterion': 0.001, + 'run_final_scf': False, + 'break_symmetry': False, + 'change_mixing_criterion': 0.025, + 'atoms_off': [] # '49' is reserved } @classmethod def define(cls, spec): super(FleurRelaxWorkChain, cls).define(spec) spec.expose_inputs(FleurScfWorkChain, namespace='scf') - spec.input("wf_parameters", valid_type=Dict, required=False) + spec.input('wf_parameters', valid_type=Dict, required=False) spec.outline( cls.start, @@ -59,7 +63,8 @@ def define(cls, spec): cls.converge_scf, cls.check_failure, ), - cls.get_results, + cls.get_results_relax, + if_(cls.should_run_final_scf)(cls.run_final_scf, cls.get_results_final_scf), cls.return_results, ) @@ -67,28 +72,23 @@ def define(cls, spec): spec.output('optimized_structure', valid_type=StructureData) # exit codes - spec.exit_code(230, 'ERROR_INVALID_INPUT_PARAM', - message="Invalid workchain parameters.") - spec.exit_code(350, 'ERROR_DID_NOT_RELAX', - message="Optimization cycle did not lead to convergence of forces.") - spec.exit_code(351, 'ERROR_SCF_FAILED', - message="SCF Workchains failed for some reason.") - spec.exit_code(352, 'ERROR_NO_RELAX_OUTPUT', - message="Found no relaxed structure info in the output of SCF") - spec.exit_code(352, 'ERROR_NO_SCF_OUTPUT', - message="Found no SCF output") - spec.exit_code(311, 'ERROR_VACUUM_SPILL_RELAX', + spec.exit_code(230, 'ERROR_INVALID_INPUT_PARAM', message='Invalid workchain parameters.') + spec.exit_code(350, 'ERROR_DID_NOT_RELAX', message='Optimization cycle did not lead to convergence of forces.') + spec.exit_code(351, 'ERROR_SCF_FAILED', message='SCF Workchains failed for some reason.') + spec.exit_code(352, 'ERROR_NO_RELAX_OUTPUT', message='Found no relaxed structure info in the output of SCF') + spec.exit_code(353, 'ERROR_NO_SCF_OUTPUT', message='Found no SCF output') + spec.exit_code(354, 'ERROR_SWITCH_BFGS', message='Force is small, switch to BFGS') + spec.exit_code(311, + 'ERROR_VACUUM_SPILL_RELAX', message='FLEUR calculation failed because an atom spilled to the' - 'vacuum during relaxation') - spec.exit_code(313, 'ERROR_MT_RADII_RELAX', - message='Overlapping MT-spheres during relaxation.') + 'vacuum during relaxation') + spec.exit_code(313, 'ERROR_MT_RADII_RELAX', message='Overlapping MT-spheres during relaxation.') def start(self): """ Retrieve and initialize paramters of the WorkChain """ - self.report('INFO: started structure relaxation workflow version {}\n' - ''.format(self._workflowversion)) + self.report('INFO: started structure relaxation workflow version {}\n' ''.format(self._workflowversion)) self.ctx.info = [] self.ctx.warnings = [] @@ -101,7 +101,9 @@ def start(self): self.ctx.final_atom_positions = None self.ctx.pbc = None self.ctx.reached_relax = True + self.ctx.switch_bfgs = False self.ctx.scf_res = None + self.ctx.final_structure = None # initialize the dictionary using defaults if no wf paramters are given wf_default = copy.deepcopy(self._wf_default) @@ -115,8 +117,7 @@ def start(self): if key not in wf_default.keys(): extra_keys.append(key) if extra_keys: - error = 'ERROR: input wf_parameters for Relax contains extra keys: {}'.format( - extra_keys) + error = 'ERROR: input wf_parameters for Relax contains extra keys: {}'.format(extra_keys) self.report(error) return self.exit_codes.ERROR_INVALID_INPUT_PARAM @@ -125,6 +126,11 @@ def start(self): wf_dict[key] = wf_dict.get(key, val) self.ctx.wf_dict = wf_dict + if '49' in wf_dict['atoms_off']: + error = '"49" label for atoms_off is reserved for internal use' + self.report(error) + return self.exit_codes.ERROR_INVALID_INPUT_PARAM + def converge_scf(self): """ Submits :class:`aiida_fleur.workflows.scf.FleurScfWorkChain`. @@ -142,6 +148,18 @@ def get_inputs_first_scf(self): Initialize inputs for the first iteration. """ input_scf = AttributeDict(self.exposed_inputs(FleurScfWorkChain, namespace='scf')) + input_scf.metadata.label = 'SCF_forces' + input_scf.metadata.description = 'The SCF workchain converging forces, part of the Relax' + + if self.ctx.wf_dict['break_symmetry']: + calc_para = None + if 'calc_parameters' in input_scf: + calc_para = input_scf.calc_parameters + # currently we always break the full symmetry + break_dict = Dict(dict={'atoms': ['all']}) # for provenance + broken_sys = break_symmetry_wf(input_scf.structure, wf_para=break_dict, parameterdata=calc_para) + input_scf.structure = broken_sys['new_structure'] + input_scf.calc_parameters = broken_sys['new_parameters'] if 'wf_parameters' not in input_scf: scf_wf_dict = {} @@ -154,9 +172,27 @@ def get_inputs_first_scf(self): scf_wf_dict['mode'] = 'force' if self.ctx.wf_dict['film_distance_relaxation']: - scf_wf_dict['inpxml_changes'].append( - ('set_atomgr_att', {'attributedict': {'force': [('relaxXYZ', 'FFT')]}, - 'species': 'all'})) + scf_wf_dict['inpxml_changes'].append(('set_atomgr_att', { + 'attributedict': { + 'force': [('relaxXYZ', 'FFT')] + }, + 'species': 'all' + })) + + for specie_off in self.ctx.wf_dict['atoms_off']: + scf_wf_dict['inpxml_changes'].append(('set_atomgr_att_label', { + 'attributedict': { + 'force': [('relaxXYZ', 'FFF')] + }, + 'atom_label': specie_off + })) + + scf_wf_dict['inpxml_changes'].append(('set_atomgr_att_label', { + 'attributedict': { + 'force': [('relaxXYZ', 'FFF')] + }, + 'atom_label': '49' + })) input_scf.wf_parameters = Dict(dict=scf_wf_dict) @@ -176,6 +212,13 @@ def get_inputs_scf(self): scf_wf_dict = {} else: scf_wf_dict = input_scf.wf_parameters.get_dict() + if 'inpxml_changes' in scf_wf_dict: + old_changes = scf_wf_dict['inpxml_changes'] + new_changes = [] + for change in old_changes: + if 'shift_value' not in change[0]: + new_changes.append(change) + scf_wf_dict['inpxml_changes'] = new_changes scf_wf_dict['mode'] = 'force' input_scf.wf_parameters = Dict(dict=scf_wf_dict) @@ -203,8 +246,7 @@ def check_failure(self): if not scf_wc.is_finished_ok: exit_statuses = FleurScfWorkChain.get_exit_statuses(['ERROR_FLEUR_CALCULATION_FAILED']) if scf_wc.exit_status == exit_statuses[0]: - fleur_calc = load_node( - scf_wc.outputs.output_scf_wc_para.get_dict()['last_calc_uuid']) + fleur_calc = load_node(scf_wc.outputs.output_scf_wc_para.get_dict()['last_calc_uuid']) if fleur_calc.exit_status == FleurCalc.get_exit_statuses(['ERROR_VACUUM_SPILL_RELAX'])[0]: self.control_end_wc('Failed due to atom and vacuum overlap') return self.exit_codes.ERROR_VACUUM_SPILL_RELAX @@ -222,18 +264,30 @@ def condition(self): scf_wc = self.ctx.scf_res try: - self.ctx.forces.append(scf_wc.outputs.output_scf_wc_para.dict.force_largest) - except AttributeError: + last_calc = load_node(scf_wc.outputs.output_scf_wc_para.dict.last_calc_uuid) + except (NotExistent, AttributeError): + # TODO: throw exit code # message = 'ERROR: Did not manage to read the largest force' # self.control_end_wc(message) # return self.exit_codes.ERROR_RELAX_FAILED return False + else: + forces_data = last_calc.outputs.relax_parameters.get_dict()['posforces'][-1] + all_forces = [] + for force in forces_data: + all_forces.extend(force[-3:]) + all_forces = [abs(x) for x in all_forces] + self.ctx.forces.append(max(all_forces)) - largest_now = abs(self.ctx.forces[-1]) + largest_now = self.ctx.forces[-1] if largest_now < self.ctx.wf_dict['force_criterion']: - self.report('Structure is converged to the largest force' - '{}'.format(self.ctx.forces[-1])) + self.report('Structure is converged to the largest force ' '{}'.format(self.ctx.forces[-1])) + return False + elif largest_now < self.ctx.wf_dict['change_mixing_criterion'] and self.inputs.scf.wf_parameters['force_dict'][ + 'forcemix'] == 'straight': + self.report('Seems it is safe to switch to BFGS. Current largest force: ' '{}'.format(self.ctx.forces[-1])) + self.ctx.switch_bfgs = True return False self.ctx.loop_count = self.ctx.loop_count + 1 @@ -256,6 +310,7 @@ def generate_new_fleurinp(self): :meth:`~aiida_fleur.workflows.relax.FleurRelaxWorkChain.analyse_relax()`. New FleurinpData is stored in the context. """ + # TODO do we loose provenance here, which we like to keep? scf_wc = self.ctx.scf_res last_calc = load_node(scf_wc.outputs.output_scf_wc_para.get_dict()['last_calc_uuid']) try: @@ -278,13 +333,58 @@ def analyse_relax(relax_dict): :param relax_dict: parsed relax.xml from the previous calculation :return new_fleurinp: new FleurinpData object that will be used for next relax iteration """ - # TODO: implement this function, now always use relax.xml gemerated in FLEUR - if False: + # TODO: implement this function, now always use relax.xml generated in FLEUR + should_relax = False + if should_relax: return 1 return None - def get_results(self): + def should_run_final_scf(self): + """ + Check if a final scf should be run on the optimized structure + """ + return self.ctx.wf_dict.get('run_final_scf', False) + + def get_inputs_final_scf(self): + """ + Initializes inputs for final scf on relaxed structure. + """ + input_scf = AttributeDict(self.exposed_inputs(FleurScfWorkChain, namespace='scf')) + if 'structure' in input_scf: + del input_scf.structure + if 'remote_data' in input_scf: + del input_scf.remote_data + if 'wf_parameters' not in input_scf: + scf_wf_dict = {} + else: + scf_wf_dict = input_scf.wf_parameters.get_dict() + if 'inpxml_changes' in scf_wf_dict: + old_changes = scf_wf_dict['inpxml_changes'] + new_changes = [] + for change in old_changes: + if 'shift_value' not in change[0]: + new_changes.append(change) + scf_wf_dict['inpxml_changes'] = new_changes + + scf_wf_dict['mode'] = 'density' + input_scf.wf_parameters = Dict(dict=scf_wf_dict) + input_scf.structure = self.ctx.final_structure + + return input_scf + + def run_final_scf(self): + """ + Run a final scf for charge convergence on the optimized structure + """ + inputs = {} + + inputs = self.get_inputs_final_scf() + res = self.submit(FleurScfWorkChain, **inputs) + + return ToContext(scf_final_res=res) + + def get_results_relax(self): """ Generates results of the workchain. Creates a new structure data node which is an @@ -301,9 +401,13 @@ def get_results(self): cell = relax_out['relax_brav_vectors'] atom_positions = relax_out['relax_atom_positions'] film = relax_out['film'] + total_energy = relax_out['energy'] + total_energy_units = relax_out['energy_units'] except KeyError: return self.exit_codes.ERROR_NO_RELAX_OUTPUT + self.ctx.total_energy_last = total_energy + self.ctx.total_energy_units = total_energy_units self.ctx.final_cell = cell self.ctx.final_atom_positions = atom_positions @@ -312,44 +416,97 @@ def get_results(self): else: self.ctx.pbc = (True, True, True) - def return_results(self): - """ - This function stores results of the workchain into the output nodes. - """ - - out = {'workflow_name': self.__class__.__name__, - 'workflow_version': self._workflowversion, - 'info': self.ctx.info, - 'warnings': self.ctx.warnings, - 'errors': self.ctx.errors, - 'force': self.ctx.forces, - 'force_iter_done': self.ctx.loop_count, - 'last_scf_wc_uuid': self.ctx.scf_res.uuid - } - + # we build the structure here, that way we can run an scf afterwards if self.ctx.final_cell: - structure = StructureData(cell=self.ctx.final_cell) - bohr_a = 0.52917721092 + np_cell = np.array(self.ctx.final_cell) * bohr_a + structure = StructureData(cell=np_cell.tolist()) for atom in self.ctx.final_atom_positions: - np_cell = np.array(self.ctx.final_cell) - np_pos = np.array(atom[1:]) * bohr_a - pos_abs = list(np.dot(np_cell, np_pos)) + np_pos = np.array(atom[1:]) + pos_abs = np_pos @ np_cell if self.ctx.pbc == (True, True, True): - structure.append_atom(position=(pos_abs[0], pos_abs[1], pos_abs[2]), - symbols=atom[0]) + structure.append_atom(position=(pos_abs[0], pos_abs[1], pos_abs[2]), symbols=atom[0]) else: # assume z-direction is orthogonal to xy - structure.append_atom(position=(pos_abs[0], pos_abs[1], atom[3] * bohr_a), - symbols=atom[0]) + structure.append_atom(position=(pos_abs[0], pos_abs[1], atom[3] * bohr_a), symbols=atom[0]) structure.pbc = self.ctx.pbc - structure = save_structure(structure) - self.out('optimized_structure', structure) + self.ctx.final_structure = structure + + def get_results_final_scf(self): + """ + Parser some results of final scf + """ + + try: + scf_out = self.ctx.scf_final_res.outputs.last_fleur_calc_output + except NotExistent: + return self.exit_codes.ERROR_NO_SCF_OUTPUT + + scf_out_d = scf_out.get_dict() + try: + total_energy = scf_out_d['energy'] + total_energy_units = scf_out_d['energy_units'] + except KeyError: + self.report('ERROR: Could not parse total energy of final scf run') + #return self.exit_codes.ERROR_NO_RELAX_OUTPUT + + self.ctx.total_energy_last = total_energy + self.ctx.total_energy_units = total_energy_units + + def return_results(self): + """ + This function stores results of the workchain into the output nodes. + """ + #TODO maybe we want to have a more detailed array output node with the force and + # position history of all atoms? + out = { + 'workflow_name': self.__class__.__name__, + 'workflow_version': self._workflowversion, + 'energy': self.ctx.total_energy_last, + 'energy_units': self.ctx.total_energy_units, + 'info': self.ctx.info, + 'warnings': self.ctx.warnings, + 'errors': self.ctx.errors, + 'force': self.ctx.forces, + 'force_iter_done': self.ctx.loop_count, + # uuids in the output are bad for caching should be avoided, + # instead better return the node. + 'last_scf_wc_uuid': self.ctx.scf_res.uuid + } + outnode = Dict(dict=out) + + con_nodes = {} + try: + relax_out = self.ctx.scf_res.outputs.last_fleur_calc_output + except NotExistent: + relax_out = None + if relax_out is not None: + con_nodes['last_fleur_calc_output'] = relax_out + + if self.ctx.wf_dict.get('run_final_scf', False): + try: + scf_out = self.ctx.scf_final_res.outputs.last_fleur_calc_output + except NotExistent: + scf_out = None + if relax_out is not None: + con_nodes['last_scf__output'] = scf_out + + # TODO: for a trajectory output node all corresponding nodes have to go into + # con_nodes + + if self.ctx.final_structure is not None: + outdict = create_relax_result_node(out=outnode, optimized_structure=self.ctx.final_structure, **con_nodes) + else: + outdict = create_relax_result_node(out=outnode, **con_nodes) + + # return output nodes + for link_name, node in six.iteritems(outdict): + self.out(link_name, node) - out = save_output_node(Dict(dict=out)) - self.out('out', out) if not self.ctx.reached_relax: return self.exit_codes.ERROR_DID_NOT_RELAX + if self.ctx.switch_bfgs: + return self.exit_codes.ERROR_SWITCH_BFGS def control_end_wc(self, errormsg): """ @@ -362,18 +519,25 @@ def control_end_wc(self, errormsg): @cf -def save_structure(structure): - """ - Save a structure data node to provide correct provenance. - """ - structure_return = structure.clone() - return structure_return - - -@cf -def save_output_node(out): +def create_relax_result_node(**kwargs): """ - Save the out dict in the db to provide correct provenance. + This calcfunction assures the right provenance (additional links) + for ALL result nodes it takes any nodes as input + and return a special set of nodes. + All other inputs will be connected in the DB to these ourput nodes """ - out_wc = out.clone() - return out_wc + outdict = {} + for key, val in six.iteritems(kwargs): + if key == 'out': # should always be present + outnode = val.clone() # dublicate node instead of circle (keep DAG) + outnode.label = 'out_relax_wc_para' + outnode.description = ('Contains results and information of an FleurRelaxWorkChain run.') + outdict['out'] = outnode + + if key == 'optimized_structure': + structure = val.clone() # dublicate node instead of circle (keep DAG) + structure.label = 'optimized_structure' + structure.description = ('Relaxed structure result of an FleurRelaxWorkChain run.') + outdict['optimized_structure'] = structure + + return outdict diff --git a/aiida_fleur/workflows/scf.py b/aiida_fleur/workflows/scf.py index 67b7edd95..b176ec611 100644 --- a/aiida_fleur/workflows/scf.py +++ b/aiida_fleur/workflows/scf.py @@ -9,7 +9,6 @@ # For further information please visit http://www.flapw.de or # # http://aiida-fleur.readthedocs.io/en/develop/ # ############################################################################### - """ In this module you find the workchain 'FleurScfWorkChain' for the self-consistency cycle management of a FLEUR calculation with AiiDA. @@ -21,7 +20,6 @@ from __future__ import absolute_import from lxml import etree import six -from six.moves import range from aiida.orm import Code, load_node, CalcJobNode from aiida.orm import StructureData, RemoteData, Dict @@ -33,6 +31,7 @@ from aiida_fleur.tools.common_fleur_wf import get_inputs_fleur, get_inputs_inpgen from aiida_fleur.tools.common_fleur_wf import test_and_get_codenode from aiida_fleur.tools.xml_util import eval_xpath2, get_xml_attribute +from aiida_fleur.tools.common_fleur_wf import find_last_submitted_calcjob from aiida_fleur.workflows.base_fleur import FleurBaseWorkChain from aiida_fleur.data.fleurinp import FleurinpData @@ -60,90 +59,79 @@ class FleurScfWorkChain(WorkChain): like Success, last result node, list with convergence behavior """ - _workflowversion = "0.4.0" - _wf_default = {'fleur_runmax': 4, - 'density_converged': 0.00002, - 'energy_converged': 0.002, - 'force_converged': 0.002, - 'mode': 'density', # 'density', 'energy' or 'force' - 'serial': False, - 'itmax_per_run': 30, - 'force_dict': {'qfix': 2, - 'forcealpha': 0.5, - 'forcemix': 'BFGS'}, - 'use_relax_xml': True, - 'inpxml_changes': [], - } + _workflowversion = '0.4.1' + _wf_default = { + 'fleur_runmax': 4, + 'density_converged': 0.00002, + 'energy_converged': 0.002, + 'force_converged': 0.002, + 'mode': 'density', # 'density', 'energy' or 'force' + 'serial': False, + 'itmax_per_run': 30, + 'force_dict': { + 'qfix': 2, + 'forcealpha': 1.0, + 'forcemix': 'straight' + }, + 'use_relax_xml': False, + 'inpxml_changes': [], + } _default_options = { - 'resources': {"num_machines": 1, "num_mpiprocs_per_machine": 1}, - 'max_wallclock_seconds': 6*60*60, + 'resources': { + 'num_machines': 1, + 'num_mpiprocs_per_machine': 1 + }, + 'max_wallclock_seconds': 6 * 60 * 60, 'queue_name': '', 'custom_scheduler_commands': '', 'import_sys_environment': False, - 'environment_variables': {}} + 'environment_variables': {} + } @classmethod def define(cls, spec): super(FleurScfWorkChain, cls).define(spec) - spec.input("fleur", valid_type=Code, required=True) - spec.input("inpgen", valid_type=Code, required=False) - spec.input("wf_parameters", valid_type=Dict, required=False) - spec.input("structure", valid_type=StructureData, required=False) - spec.input("calc_parameters", valid_type=Dict, required=False) - spec.input("fleurinp", valid_type=FleurinpData, required=False) - spec.input("remote_data", valid_type=RemoteData, required=False) - spec.input("options", valid_type=Dict, required=False) - spec.input("settings", valid_type=Dict, required=False) - - spec.outline( - cls.start, - cls.validate_input, - if_(cls.fleurinpgen_needed)( - cls.run_fleurinpgen), - cls.run_fleur, - cls.inspect_fleur, - cls.get_res, - while_(cls.condition)( - cls.run_fleur, - cls.inspect_fleur, - cls.get_res), - cls.return_results - ) + spec.input('fleur', valid_type=Code, required=True) + spec.input('inpgen', valid_type=Code, required=False) + spec.input('wf_parameters', valid_type=Dict, required=False) + spec.input('structure', valid_type=StructureData, required=False) + spec.input('calc_parameters', valid_type=Dict, required=False) + spec.input('fleurinp', valid_type=FleurinpData, required=False) + spec.input('remote_data', valid_type=RemoteData, required=False) + spec.input('options', valid_type=Dict, required=False) + spec.input('settings', valid_type=Dict, required=False) + + spec.outline(cls.start, cls.validate_input, + if_(cls.fleurinpgen_needed)(cls.run_fleurinpgen), cls.run_fleur, cls.inspect_fleur, cls.get_res, + while_(cls.condition)(cls.run_fleur, cls.inspect_fleur, cls.get_res), cls.return_results) spec.output('fleurinp', valid_type=FleurinpData) spec.output('output_scf_wc_para', valid_type=Dict) spec.output('last_fleur_calc_output', valid_type=Dict) # exit codes - spec.exit_code(230, 'ERROR_INVALID_INPUT_PARAM', - message="Invalid workchain parameters.") - spec.exit_code(231, 'ERROR_INVALID_INPUT_CONFIG', - message="Invalid input configuration.") - spec.exit_code(233, 'ERROR_INVALID_CODE_PROVIDED', - message="Input codes do not correspond to fleur or inpgen respectively.") - spec.exit_code(235, 'ERROR_CHANGING_FLEURINPUT_FAILED', - message="Input file modification failed.") - spec.exit_code(236, 'ERROR_INVALID_INPUT_FILE', - message="Input file was corrupted after user's modifications.") - spec.exit_code(360, 'ERROR_INPGEN_CALCULATION_FAILED', - message="Inpgen calculation failed.") - spec.exit_code(361, 'ERROR_FLEUR_CALCULATION_FAILED', - message="Fleur calculation failed.") - spec.exit_code(362, 'ERROR_DID_NOT_CONVERGE', - message="SCF cycle did not lead to convergence.") + spec.exit_code(230, 'ERROR_INVALID_INPUT_PARAM', message='Invalid workchain parameters.') + spec.exit_code(231, 'ERROR_INVALID_INPUT_CONFIG', message='Invalid input configuration.') + spec.exit_code(233, + 'ERROR_INVALID_CODE_PROVIDED', + message='Input codes do not correspond to fleur or inpgen respectively.') + spec.exit_code(235, 'ERROR_CHANGING_FLEURINPUT_FAILED', message='Input file modification failed.') + spec.exit_code(236, 'ERROR_INVALID_INPUT_FILE', message="Input file was corrupted after user's modifications.") + spec.exit_code(360, 'ERROR_INPGEN_CALCULATION_FAILED', message='Inpgen calculation failed.') + spec.exit_code(361, 'ERROR_FLEUR_CALCULATION_FAILED', message='Fleur calculation failed.') + spec.exit_code(362, 'ERROR_DID_NOT_CONVERGE', message='SCF cycle did not lead to convergence.') def start(self): """ init context and some parameters """ - self.report('INFO: started convergence workflow version {}' - ''.format(self._workflowversion)) + self.report('INFO: started convergence workflow version {}' ''.format(self._workflowversion)) ####### init ####### # internal para /control para - self.ctx.last_calc = None + self.ctx.last_base_wc = None self.ctx.loop_count = 0 self.ctx.relax_generated = False self.ctx.calcs = [] @@ -236,15 +224,15 @@ def validate_input(self): elif 'remote_data' in inputs: self.ctx.run_inpgen = False if 'structure' in inputs: - error = 'ERROR: structure input is not needed because Fleurinp was given' + error = 'ERROR: structure input is not needed because remote_data was given' self.report(error) return self.exit_codes.ERROR_INVALID_INPUT_CONFIG if 'inpgen' in inputs: - error = 'ERROR: inpgen code is not needed input because Fleurinp was given' + error = 'ERROR: inpgen code is not needed input because remote_data was given' self.report(error) return self.exit_codes.ERROR_INVALID_INPUT_CONFIG if 'calc_parameters' in inputs: - error = 'ERROR: calc_parameter input is not needed because Fleurinp was given' + error = 'ERROR: calc_parameter input is not needed because remote_data was given' self.report(error) return self.exit_codes.ERROR_INVALID_INPUT_CONFIG elif 'structure' in inputs: @@ -259,27 +247,22 @@ def validate_input(self): if 'inpgen' in inputs: try: - test_and_get_codenode( - inputs.inpgen, 'fleur.inpgen', use_exceptions=True) + test_and_get_codenode(inputs.inpgen, 'fleur.inpgen', use_exceptions=True) except ValueError: - error = ("The code you provided for inpgen of FLEUR does not " - "use the plugin fleur.inpgen") + error = ('The code you provided for inpgen of FLEUR does not use the plugin fleur.inpgen') return self.exit_codes.ERROR_INVALID_CODE_PROVIDED if 'fleur' in inputs: try: - test_and_get_codenode( - inputs.fleur, 'fleur.fleur', use_exceptions=True) + test_and_get_codenode(inputs.fleur, 'fleur.fleur', use_exceptions=True) except ValueError: - error = ("The code you provided for FLEUR does not " - "use the plugin fleur.fleur") + error = ('The code you provided for FLEUR does not use the plugin fleur.fleur') return self.exit_codes.ERROR_INVALID_CODE_PROVIDED # check the mode in wf_dict mode = self.ctx.wf_dict.get('mode') if mode not in ['force', 'density', 'energy']: - error = ("ERROR: Wrong mode of convergence" - ": one of 'force', 'density' or 'energy' was expected.") + error = ('ERROR: Wrong mode of convergence' + ": one of 'force', 'density' or 'energy' was expected.") return self.exit_codes.ERROR_INVALID_INPUT_PARAM max_iters = self.ctx.wf_dict.get('itmax_per_run') @@ -312,8 +295,7 @@ def run_fleurinpgen(self): structure = self.inputs.structure self.ctx.formula = structure.get_formula() label = 'scf: inpgen' - description = '{} inpgen on {}'.format( - self.ctx.description_wf, self.ctx.formula) + description = '{} inpgen on {}'.format(self.ctx.description_wf, self.ctx.formula) inpgencode = self.inputs.inpgen if 'calc_parameters' in self.inputs: @@ -321,14 +303,15 @@ def run_fleurinpgen(self): else: params = {} - options = {"max_wallclock_seconds": int(self.ctx.options.get('max_wallclock_seconds')), - "resources": self.ctx.options.get('resources'), - "queue_name": self.ctx.options.get('queue_name', '')} + options = { + 'max_wallclock_seconds': int(self.ctx.options.get('max_wallclock_seconds')), + 'resources': self.ctx.options.get('resources'), + 'queue_name': self.ctx.options.get('queue_name', '') + } # TODO do not use the same option for inpgen as for FLEUR; so far we ignore the other # clean Idea might be to provide second inpgen options - inputs_build = get_inputs_inpgen( - structure, inpgencode, options, label, description, params=params) + inputs_build = get_inputs_inpgen(structure, inpgencode, options, label, description, params=params) self.report('INFO: run inpgen') future = self.submit(inputs_build) @@ -384,20 +367,22 @@ def change_fleurinp(self): # set proper convergence parameters in inp.xml if converge_mode == 'density': dist = wf_dict.get('density_converged') - fleurmode.set_inpchanges( - {'itmax': self.ctx.default_itmax, 'minDistance': dist}) + fleurmode.set_inpchanges({'itmax': self.ctx.default_itmax, 'minDistance': dist}) elif converge_mode == 'force': force_converged = wf_dict.get('force_converged') dist = wf_dict.get('density_converged') - fleurmode.set_inpchanges({'itmax': self.ctx.default_itmax, 'minDistance': dist, - 'force_converged': force_converged, 'l_f': True, - 'qfix': force_dict.get('qfix'), - 'forcealpha': force_dict.get('forcealpha'), - 'forcemix': force_dict.get('forcemix')}) + fleurmode.set_inpchanges({ + 'itmax': self.ctx.default_itmax, + 'minDistance': dist, + 'force_converged': force_converged, + 'l_f': True, + 'qfix': force_dict.get('qfix'), + 'forcealpha': force_dict.get('forcealpha'), + 'forcemix': force_dict.get('forcemix') + }) elif converge_mode == 'energy': dist = 0.0 - fleurmode.set_inpchanges( - {'itmax': self.ctx.default_itmax, 'minDistance': dist}) + fleurmode.set_inpchanges({'itmax': self.ctx.default_itmax, 'minDistance': dist}) avail_ac_dict = fleurmode.get_avail_actions() @@ -409,14 +394,21 @@ def change_fleurinp(self): method = avail_ac_dict.get(function, None) if not method: error = ("ERROR: Input 'inpxml_changes', function {} " - "is not known to fleurinpmodifier class, " - "please check/test your input. I abort..." - "".format(function)) + 'is not known to fleurinpmodifier class, ' + 'please check/test your input. I abort...' + ''.format(function)) self.control_end_wc(error) return self.exit_codes.ERROR_CHANGING_FLEURINPUT_FAILED else: # apply change - method(**para) + try: + method(**para) + except ValueError as vale: + error = ('ERROR: Changing the inp.xml file failed. Tried to apply {}' + ', which failed with {}. I abort, good luck next time!' + ''.format(change, vale)) + self.control_end_wc(error) + return self.exit_codes.ERROR_CHANGING_FLEURINPUT_FAILED # validate? try: @@ -448,10 +440,10 @@ def run_fleur(self): else: settings = None - if self.ctx['last_calc']: + if self.ctx['last_base_wc']: # will this fail if fleur before failed? try needed? - remote = self.ctx['last_calc'].outputs.remote_folder - elif 'remote_data' in self.inputs: + remote = self.ctx['last_base_wc'].outputs.remote_folder + elif 'remote_data' in self.inputs: # and not self.ctx.wf_dict['use_relax_xml']: remote = self.inputs.remote_data else: remote = None @@ -459,25 +451,30 @@ def run_fleur(self): label = ' ' description = ' ' if self.ctx.formula: - label = 'scf: fleur run {}'.format(self.ctx.loop_count+1) - description = '{} fleur run {} on {}'.format( - self.ctx.description_wf, self.ctx.loop_count+1, self.ctx.formula) + label = 'scf: fleur run {}'.format(self.ctx.loop_count + 1) + description = '{} fleur run {} on {}'.format(self.ctx.description_wf, self.ctx.loop_count + 1, + self.ctx.formula) else: - label = 'scf: fleur run {}'.format(self.ctx.loop_count+1) - description = '{} fleur run {}, fleurinp given'.format( - self.ctx.description_wf, self.ctx.loop_count+1) + label = 'scf: fleur run {}'.format(self.ctx.loop_count + 1) + description = '{} fleur run {}, fleurinp given'.format(self.ctx.description_wf, self.ctx.loop_count + 1) code = self.inputs.fleur options = self.ctx.options.copy() - inputs_builder = get_inputs_fleur( - code, remote, fleurin, options, label, description, settings, serial=self.ctx.serial) + inputs_builder = get_inputs_fleur(code, + remote, + fleurin, + options, + label, + description, + settings, + serial=self.ctx.serial) future = self.submit(FleurBaseWorkChain, **inputs_builder) self.ctx.loop_count = self.ctx.loop_count + 1 self.report('INFO: run FLEUR number: {}'.format(self.ctx.loop_count)) self.ctx.calcs.append(future) - return ToContext(last_calc=future) + return ToContext(last_base_wc=future) def inspect_fleur(self): """ @@ -489,17 +486,16 @@ def inspect_fleur(self): self.report('INFO: inspect FLEUR') try: - calculation = self.ctx.last_calc + base_wc = self.ctx.last_base_wc except AttributeError: self.ctx.parse_last = False error = 'ERROR: Something went wrong I do not have a last calculation' self.control_end_wc(error) return self.exit_codes.ERROR_FLEUR_CALCULATION_FAILED - exit_status = calculation.exit_status - if not calculation.is_finished_ok: - error = ('ERROR: Last Fleur calculation failed ' - 'with exit status {}'.format(exit_status)) + exit_status = base_wc.exit_status + if not base_wc.is_finished_ok: + error = ('ERROR: Last Fleur calculation failed ' 'with exit status {}'.format(exit_status)) self.control_end_wc(error) return self.exit_codes.ERROR_FLEUR_CALCULATION_FAILED else: @@ -523,20 +519,14 @@ def get_res(self): mode = self.ctx.wf_dict.get('mode') if self.ctx.parse_last: - last_calc = self.ctx.last_calc - - # TODO: dangerous, can fail, error catching - # TODO: is there a way to use a standard parser? - out_para = last_calc.outputs.output_parameters - fleur_calcjob = load_node(out_para.get_dict()['CalcJob_uuid']) - outxmlfile_opened = last_calc.outputs.retrieved.open( - fleur_calcjob.process_class._OUTXML_FILE_NAME, 'r') - - walltime = last_calc.outputs.output_parameters.dict.walltime + last_base_wc = self.ctx.last_base_wc + fleur_calcjob = load_node(find_last_submitted_calcjob(last_base_wc)) + walltime = last_base_wc.outputs.output_parameters.dict.walltime if isinstance(walltime, int): self.ctx.total_wall_time = self.ctx.total_wall_time + walltime - - tree = etree.parse(outxmlfile_opened) + with fleur_calcjob.outputs.retrieved.open(fleur_calcjob.process_class._OUTXML_FILE_NAME, + 'r') as outxmlfile_opened: + tree = etree.parse(outxmlfile_opened) root = tree.getroot() energies = eval_xpath2(root, xpath_energy) @@ -567,16 +557,20 @@ def get_res(self): forces_in_iter.append(force_z) self.ctx.all_forces.append(forces_in_iter) - outxmlfile_opened.close() else: errormsg = 'ERROR: scf wc was not successful, check log for details' self.control_end_wc(errormsg) return self.exit_codes.ERROR_FLEUR_CALCULATION_FAILED if not self.ctx.distance: - errormsg = 'ERROR: did not manage to extract charge density from the calculation' - self.control_end_wc(errormsg) - return self.exit_codes.ERROR_FLEUR_CALCULATION_FAILED + # if fleur relaxes an already converged crystal it stops directly + if mode == 'force': + self.report('INFO: System already force converged, could not extract distance.') + self.ctx.last_charge_density = None + else: + errormsg = 'ERROR: did not manage to extract charge density from the calculation' + self.control_end_wc(errormsg) + return self.exit_codes.ERROR_FLEUR_CALCULATION_FAILED else: self.ctx.last_charge_density = self.ctx.distance[-1] @@ -589,13 +583,12 @@ def condition(self): energy = self.ctx.total_energy if len(energy) >= 2: - self.ctx.energydiff = abs(energy[-1]-energy[-2]) + self.ctx.energydiff = abs(energy[-1] - energy[-2]) if mode == 'force': forces = self.ctx.all_forces if len(forces) >= 2: - self.ctx.forcediff = max( - [abs(forces[-1][i] - forces[-2][i]) for i in range(len(forces[-1]))]) + self.ctx.forcediff = max([abs(forces[-1][i] - forces[-2][i]) for i in range(len(forces[-1]))]) else: self.ctx.forcediff = 'can not be determined' @@ -607,7 +600,7 @@ def condition(self): return False elif mode == 'force': try: - _ = self.ctx.last_calc.outputs.relax_parameters + _ = self.ctx.last_base_wc.outputs.relax_parameters except NotExistent: pass else: @@ -625,15 +618,17 @@ def return_results(self): This should run through and produce output nodes even if everything failed, therefore it only uses results from context. """ - from aiida_fleur.tools.common_fleur_wf import find_last_in_restart - if self.ctx.last_calc: - last_calc_uuid = find_last_in_restart(self.ctx.last_calc) + if self.ctx.last_base_wc: + try: + last_calc_uuid = find_last_submitted_calcjob(self.ctx.last_base_wc) + except NotExistent: + last_calc_uuid = None else: last_calc_uuid = None try: # if something failed, we still might be able to retrieve something - last_calc_out = self.ctx.last_calc.outputs.output_parameters - retrieved = self.ctx.last_calc.outputs.retrieved + last_calc_out = self.ctx.last_base_wc.outputs.output_parameters + retrieved = self.ctx.last_base_wc.outputs.retrieved last_calc_out_dict = last_calc_out.get_dict() except (NotExistent, AttributeError): last_calc_out = None @@ -646,8 +641,7 @@ def return_results(self): outputnode_dict['material'] = self.ctx.formula outputnode_dict['conv_mode'] = self.ctx.wf_dict.get('mode') outputnode_dict['loop_count'] = self.ctx.loop_count - outputnode_dict['iterations_total'] = last_calc_out_dict.get( - 'number_of_iterations_total', None) + outputnode_dict['iterations_total'] = last_calc_out_dict.get('number_of_iterations_total', None) outputnode_dict['distance_charge'] = self.ctx.last_charge_density outputnode_dict['distance_charge_all'] = self.ctx.distance outputnode_dict['total_energy'] = last_calc_out_dict.get('energy_hartree', None) @@ -671,10 +665,8 @@ def return_results(self): 'walltime to {} "me/bohr^3" \n' 'INFO: Did not manage to get energy and largest force difference ' 'between two last iterations, probably converged in a single iteration' - ''.format(self.ctx.loop_count, - last_calc_out_dict.get('number_of_iterations_total', None), - self.ctx.total_wall_time, - outputnode_dict['distance_charge'])) + ''.format(self.ctx.loop_count, last_calc_out_dict.get('number_of_iterations_total', None), + self.ctx.total_wall_time, outputnode_dict['distance_charge'])) else: self.report('STATUS: Done, the convergence criteria are reached.\n' 'INFO: The charge density of the FLEUR calculation ' @@ -682,12 +674,9 @@ def return_results(self): 'walltime to {} "me/bohr^3" \n' 'INFO: The total energy difference of the last two iterations ' 'is {} Htr and largest force difference is {} Htr/bohr' - ''.format(self.ctx.loop_count, - last_calc_out_dict.get('number_of_iterations_total', None), - self.ctx.total_wall_time, - outputnode_dict['distance_charge'], - self.ctx.energydiff, - self.ctx.forcediff)) + ''.format(self.ctx.loop_count, last_calc_out_dict.get('number_of_iterations_total', + None), self.ctx.total_wall_time, + outputnode_dict['distance_charge'], self.ctx.energydiff, self.ctx.forcediff)) elif self.ctx.successful and not self.ctx.reached_conv: if len(self.ctx.total_energy) <= 1: # then len(self.ctx.all_forces) <= 1 too self.report('STATUS/WARNING: Done, the maximum number of runs ' @@ -697,11 +686,8 @@ def return_results(self): 'walltime is {} "me/bohr^3"\n' 'INFO: can not extract energy and largest force difference between' ' two last iterations, probably converged in a single iteration' - ''.format(self.ctx.loop_count, - last_calc_out_dict.get( - 'number_of_iterations_total', None), - self.ctx.total_wall_time, - outputnode_dict['distance_charge'])) + ''.format(self.ctx.loop_count, last_calc_out_dict.get('number_of_iterations_total', None), + self.ctx.total_wall_time, outputnode_dict['distance_charge'])) else: self.report('STATUS/WARNING: Done, the maximum number of runs ' 'was reached.\n INFO: The ' @@ -710,23 +696,19 @@ def return_results(self): 'walltime is {} "me/bohr^3"\n' 'INFO: The total energy difference of the last two iterations ' 'is {} Htr and largest force difference is {} Htr/bohr\n' - ''.format(self.ctx.loop_count, - last_calc_out_dict.get( - 'number_of_iterations_total', None), - self.ctx.total_wall_time, - outputnode_dict['distance_charge'], - self.ctx.energydiff, - self.ctx.forcediff)) + ''.format(self.ctx.loop_count, last_calc_out_dict.get('number_of_iterations_total', + None), self.ctx.total_wall_time, + outputnode_dict['distance_charge'], self.ctx.energydiff, self.ctx.forcediff)) else: # Termination ok, but not converged yet... if self.ctx.abort: # some error occurred, do not use the output. - self.report('STATUS/ERROR: I abort, see logs and ' - 'errors/warning/hints in output_scf_wc_para') + self.report('STATUS/ERROR: I abort, see logs and ' 'errors/warning/hints in output_scf_wc_para') outputnode_t = Dict(dict=outputnode_dict) # this is unsafe so far, because last_calc_out could not exist... if last_calc_out: - outdict = create_scf_result_node( - outpara=outputnode_t, last_calc_out=last_calc_out, last_calc_retrieved=retrieved) + outdict = create_scf_result_node(outpara=outputnode_t, + last_calc_out=last_calc_out, + last_calc_retrieved=retrieved) else: outdict = create_scf_result_node(outpara=outputnode_t) @@ -771,8 +753,7 @@ def create_scf_result_node(**kwargs): outdict = {} outputnode = outpara.clone() outputnode.label = 'output_scf_wc_para' - outputnode.description = ('Contains self-consistency results and ' - 'information of an fleur_scf_wc run.') + outputnode.description = ('Contains self-consistency results and information of an fleur_scf_wc run.') outdict['output_scf_wc_para'] = outputnode # copy, because we rather produce the same node twice then have a circle in the database for now diff --git a/aiida_fleur/workflows/ssdisp.py b/aiida_fleur/workflows/ssdisp.py index f9d7d1e8a..c2583d43a 100644 --- a/aiida_fleur/workflows/ssdisp.py +++ b/aiida_fleur/workflows/ssdisp.py @@ -9,7 +9,6 @@ # For further information please visit http://www.flapw.de or # # http://aiida-fleur.readthedocs.io/en/develop/ # ############################################################################### - """ In this module you find the workflow 'FleurSSDispWorkChain' for the calculation of spin spiral dispersion using scalar-relatevistic Hamiltonian. @@ -19,7 +18,7 @@ import copy import six -from six.moves import map +#from six.moves import map from lxml import etree from aiida.engine import WorkChain, ToContext, if_ @@ -43,11 +42,14 @@ class FleurSSDispWorkChain(WorkChain): This workflow calculates spin spiral dispersion of a structure. """ - _workflowversion = "0.2.0" + _workflowversion = '0.2.0' _default_options = { - 'resources': {"num_machines": 1, "num_mpiprocs_per_machine": 1}, - 'max_wallclock_seconds': 2*60*60, + 'resources': { + 'num_machines': 1, + 'num_mpiprocs_per_machine': 1 + }, + 'max_wallclock_seconds': 2 * 60 * 60, 'queue_name': '', 'custom_scheduler_commands': '', 'import_sys_environment': False, @@ -55,12 +57,11 @@ class FleurSSDispWorkChain(WorkChain): } _wf_default = { - 'beta': {'all': 1.57079}, + 'beta': { + 'all': 1.57079 + }, 'prop_dir': [1.0, 0.0, 0.0], - 'q_vectors': [[0.0, 0.0, 0.0], - [0.125, 0.0, 0.0], - [0.250, 0.0, 0.0], - [0.375, 0.0, 0.0]], + 'q_vectors': [[0.0, 0.0, 0.0], [0.125, 0.0, 0.0], [0.250, 0.0, 0.0], [0.375, 0.0, 0.0]], 'ref_qss': [0.0, 0.0, 0.0], 'serial': False, 'inpxml_changes': [] @@ -70,50 +71,41 @@ class FleurSSDispWorkChain(WorkChain): def define(cls, spec): super(FleurSSDispWorkChain, cls).define(spec) spec.expose_inputs(FleurScfWorkChain, namespace='scf') - spec.input("wf_parameters", valid_type=Dict, required=False) - spec.input("fleur", valid_type=Code, required=True) - spec.input("remote", valid_type=RemoteData, required=False) - spec.input("fleurinp", valid_type=FleurinpData, required=False) - spec.input("options", valid_type=Dict, required=False) - - spec.outline( - cls.start, - if_(cls.scf_needed)( - cls.converge_scf, - cls.force_after_scf, - ).else_( - cls.force_wo_scf, - ), - cls.get_results, - cls.return_results - ) + spec.input('wf_parameters', valid_type=Dict, required=False) + spec.input('fleur', valid_type=Code, required=True) + spec.input('remote', valid_type=RemoteData, required=False) + spec.input('fleurinp', valid_type=FleurinpData, required=False) + spec.input('options', valid_type=Dict, required=False) + + spec.outline(cls.start, + if_(cls.scf_needed)( + cls.converge_scf, + cls.force_after_scf, + ).else_( + cls.force_wo_scf, + ), cls.get_results, cls.return_results) spec.output('out', valid_type=Dict) # exit codes - spec.exit_code(230, 'ERROR_INVALID_INPUT_PARAM', - message="Invalid workchain parameters.") - spec.exit_code(231, 'ERROR_INVALID_INPUT_CONFIG', - message="Invalid input configuration.") - spec.exit_code(233, 'ERROR_INVALID_CODE_PROVIDED', - message="Invalid code node specified, check inpgen and fleur code nodes.") - spec.exit_code(235, 'ERROR_CHANGING_FLEURINPUT_FAILED', - message="Input file modification failed.") - spec.exit_code(236, 'ERROR_INVALID_INPUT_FILE', - message="Input file was corrupted after user's modifications.") - spec.exit_code(334, 'ERROR_REFERENCE_CALCULATION_FAILED', - message="Reference calculation failed.") - spec.exit_code(335, 'ERROR_REFERENCE_CALCULATION_NOREMOTE', - message="Found no reference calculation remote repository.") - spec.exit_code(336, 'ERROR_FORCE_THEOREM_FAILED', - message="Force theorem calculation failed.") + spec.exit_code(230, 'ERROR_INVALID_INPUT_PARAM', message='Invalid workchain parameters.') + spec.exit_code(231, 'ERROR_INVALID_INPUT_CONFIG', message='Invalid input configuration.') + spec.exit_code(233, + 'ERROR_INVALID_CODE_PROVIDED', + message='Invalid code node specified, check inpgen and fleur code nodes.') + spec.exit_code(235, 'ERROR_CHANGING_FLEURINPUT_FAILED', message='Input file modification failed.') + spec.exit_code(236, 'ERROR_INVALID_INPUT_FILE', message="Input file was corrupted after user's modifications.") + spec.exit_code(334, 'ERROR_REFERENCE_CALCULATION_FAILED', message='Reference calculation failed.') + spec.exit_code(335, + 'ERROR_REFERENCE_CALCULATION_NOREMOTE', + message='Found no reference calculation remote repository.') + spec.exit_code(336, 'ERROR_FORCE_THEOREM_FAILED', message='Force theorem calculation failed.') def start(self): """ Retrieve and initialize paramters of the WorkChain """ - self.report('INFO: started Spin Stiffness calculation workflow version {}\n' - ''.format(self._workflowversion)) + self.report('INFO: started Spin Stiffness calculation workflow version {}\n' ''.format(self._workflowversion)) self.ctx.info = [] self.ctx.warnings = [] self.ctx.errors = [] @@ -131,8 +123,7 @@ def start(self): if key not in wf_default.keys(): extra_keys.append(key) if extra_keys: - error = 'ERROR: input wf_parameters for SSDisp contains extra keys: {}'.format( - extra_keys) + error = 'ERROR: input wf_parameters for SSDisp contains extra keys: {}'.format(extra_keys) self.report(error) return self.exit_codes.ERROR_INVALID_INPUT_PARAM @@ -142,8 +133,8 @@ def start(self): self.ctx.wf_dict = wf_dict if wf_dict['ref_qss'] != wf_dict['q_vectors'][0]: - error = ("The first q_vector of the forceTheorem step has to be equal to" - "the q vector of the reference calculation.") + error = ('The first q_vector of the forceTheorem step has to be equal to' + 'the q vector of the reference calculation.') self.control_end_wc(error) return self.exit_codes.ERROR_INVALID_INPUT_PARAM @@ -165,7 +156,7 @@ def start(self): try: test_and_get_codenode(inputs.fleur, 'fleur.fleur', use_exceptions=True) except ValueError: - error = "The code you provided for FLEUR does not use the plugin fleur.fleur" + error = 'The code you provided for FLEUR does not use the plugin fleur.fleur' self.control_end_wc(error) return self.exit_codes.ERROR_INVALID_CODE_PROVIDED @@ -173,15 +164,15 @@ def start(self): if inputs.scf: self.ctx.scf_needed = True if 'remote' in inputs: - error = "ERROR: you gave SCF input + remote for the FT" + error = 'ERROR: you gave SCF input + remote for the FT' self.control_end_wc(error) return self.exit_codes.ERROR_INVALID_INPUT_CONFIG if 'fleurinp' in inputs: - error = "ERROR: you gave SCF input + fleurinp for the FT" + error = 'ERROR: you gave SCF input + fleurinp for the FT' self.control_end_wc(error) return self.exit_codes.ERROR_INVALID_INPUT_CONFIG elif 'remote' not in inputs: - error = "ERROR: you gave neither SCF input nor remote for the FT" + error = 'ERROR: you gave neither SCF input nor remote for the FT' self.control_end_wc(error) return self.exit_codes.ERROR_INVALID_INPUT_CONFIG else: @@ -207,6 +198,9 @@ def get_inputs_scf(self): Initialize inputs for the scf cycle """ input_scf = AttributeDict(self.exposed_inputs(FleurScfWorkChain, namespace='scf')) + input_scf.metadata.label = 'reference_scf_SSDisp' + input_scf.metadata.description = ('The SCF workchain converging reference charge' + ' density for Spin Spiral Dispersion') if 'wf_parameters' not in input_scf: scf_wf_dict = {} @@ -218,25 +212,20 @@ def get_inputs_scf(self): # set up q vector for the reference calculation list_ref_qss = self.ctx.wf_dict['ref_qss'] if [x for x in list_ref_qss if x != 0]: - changes_dict = {'qss': self.ctx.wf_dict['ref_qss'], - 'l_noco': True, - 'ctail': False, - 'l_ss': True} + changes_dict = {'qss': self.ctx.wf_dict['ref_qss'], 'l_noco': True, 'ctail': False, 'l_ss': True} else: - changes_dict = {'qss': ' 0.0 0.0 0.0 ', - 'l_noco': False, - 'ctail': True, - 'l_ss': False} + changes_dict = {'qss': ' 0.0 0.0 0.0 ', 'l_noco': False, 'ctail': True, 'l_ss': False} scf_wf_dict['inpxml_changes'].append(('set_inpchanges', {'change_dict': changes_dict})) # change beta parameter for key, val in six.iteritems(self.ctx.wf_dict.get('beta')): - scf_wf_dict['inpxml_changes'].append( - ('set_atomgr_att_label', - {'attributedict': {'nocoParams': [('beta', val)]}, - 'atom_label': key - })) + scf_wf_dict['inpxml_changes'].append(('set_atomgr_att_label', { + 'attributedict': { + 'nocoParams': [('beta', val)] + }, + 'atom_label': key + })) input_scf.wf_parameters = Dict(dict=scf_wf_dict) @@ -245,9 +234,11 @@ def get_inputs_scf(self): calc_parameters = input_scf.calc_parameters.get_dict() else: calc_parameters = {} - calc_parameters['qss'] = {'x': self.ctx.wf_dict['prop_dir'][0], - 'y': self.ctx.wf_dict['prop_dir'][1], - 'z': self.ctx.wf_dict['prop_dir'][2]} + calc_parameters['qss'] = { + 'x': self.ctx.wf_dict['prop_dir'][0], + 'y': self.ctx.wf_dict['prop_dir'][1], + 'z': self.ctx.wf_dict['prop_dir'][2] + } input_scf.calc_parameters = Dict(dict=calc_parameters) return input_scf @@ -280,40 +271,38 @@ def change_fleurinp(self): # copy inpchanges from wf parameters fchanges = self.ctx.wf_dict.get('inpxml_changes', []) # create forceTheorem tags - fchanges.extend([('create_tag', - {'xpath': '/fleurInput', - 'newelement': 'forceTheorem' - }), - ('create_tag', - {'xpath': '/fleurInput/forceTheorem', - 'newelement': 'spinSpiralDispersion' - })]) + fchanges.extend([('create_tag', { + 'xpath': '/fleurInput', + 'newelement': 'forceTheorem' + }), ('create_tag', { + 'xpath': '/fleurInput/forceTheorem', + 'newelement': 'spinSpiralDispersion' + })]) for i, vectors in enumerate(self.ctx.wf_dict['q_vectors']): - fchanges.append(('create_tag', - {'xpath': '/fleurInput/forceTheorem/spinSpiralDispersion', - 'newelement': 'q' - })) - fchanges.append(('xml_set_text_occ', - {'xpathn': '/fleurInput/forceTheorem/spinSpiralDispersion/q', - 'text': ' '.join(map(str, vectors)), - 'create': False, - 'occ': i - })) - - changes_dict = {'itmax': 1, - 'l_noco': True, - 'ctail': False, - 'l_ss': True} + fchanges.append(('create_tag', { + 'xpath': '/fleurInput/forceTheorem/spinSpiralDispersion', + 'newelement': 'q' + })) + fchanges.append(('xml_set_text_occ', { + 'xpathn': '/fleurInput/forceTheorem/spinSpiralDispersion/q', + 'text': ' '.join(six.moves.map(str, vectors)), + 'create': False, + 'occ': i + })) + + changes_dict = {'itmax': 1, 'l_noco': True, 'ctail': False, 'l_ss': True} fchanges.append(('set_inpchanges', {'change_dict': changes_dict})) # change beta parameter for key, val in six.iteritems(self.ctx.wf_dict.get('beta')): - fchanges.append(('set_atomgr_att_label', - {'attributedict': {'nocoParams': [('beta', val)]}, - 'atom_label': key - })) + fchanges.append(('set_atomgr_att_label', { + 'attributedict': { + 'nocoParams': [('beta', val)] + }, + 'atom_label': key + })) if fchanges: # change inp.xml file fleurmode = FleurinpModifier(fleurin) @@ -326,9 +315,9 @@ def change_fleurinp(self): method = avail_ac_dict.get(function, None) if not method: error = ("ERROR: Input 'inpxml_changes', function {} " - "is not known to fleurinpmodifier class, " - "please check/test your input. I abort..." - "".format(function)) + 'is not known to fleurinpmodifier class, ' + 'please check/test your input. I abort...' + ''.format(function)) self.control_end_wc(error) return self.exit_codes.ERROR_CHANGING_FLEURINPUT_FAILED @@ -375,8 +364,7 @@ def force_after_scf(self): outpara = outpara_node.get_dict() if 'total_energy' not in outpara: - message = ('Did not manage to extract float total energy from the' - ' reference SCF calculation.') + message = ('Did not manage to extract float total energy from the reference SCF calculation.') self.control_end_wc(message) return self.exit_codes.ERROR_REFERENCE_CALCULATION_FAILED @@ -412,8 +400,13 @@ def force_after_scf(self): code = self.inputs.fleur options = self.ctx.options.copy() - inputs_builder = get_inputs_fleur(code, remote, - fleurin, options, label, description, settings, + inputs_builder = get_inputs_fleur(code, + remote, + fleurin, + options, + label, + description, + settings, serial=self.ctx.wf_dict['serial']) future = self.submit(FleurBaseWorkChain, **inputs_builder) return ToContext(f_t=future) @@ -436,14 +429,19 @@ def force_wo_scf(self): # Retrieve remote folder from the inputs remote = self.inputs.remote - label = 'Force_theorem_calculation' - description = 'This is a force theorem calculation for all SQA' + label = 'SSDisp_force_theorem' + description = 'This is the force theorem calculation for Spin Spiral Dispersion.' code = self.inputs.fleur options = self.ctx.options.copy() - inputs_builder = get_inputs_fleur(code, remote, - fleurin, options, label, description, settings, + inputs_builder = get_inputs_fleur(code, + remote, + fleurin, + options, + label, + description, + settings, serial=self.ctx.wf_dict['serial']) future = self.submit(FleurBaseWorkChain, **inputs_builder) return ToContext(f_t=future) @@ -475,9 +473,9 @@ def get_results(self): minenergy = min(t_energydict) if e_u == 'Htr' or 'htr': - t_energydict = [htr_to_ev * (x-minenergy) for x in t_energydict] + t_energydict = [htr_to_ev * (x - minenergy) for x in t_energydict] else: - t_energydict = [(x-minenergy) for x in t_energydict] + t_energydict = [(x - minenergy) for x in t_energydict] self.ctx.energy_dict = t_energydict @@ -490,17 +488,18 @@ def return_results(self): """ This function outputs results of the wc """ - out = {'workflow_name': self.__class__.__name__, - 'workflow_version': self._workflowversion, - # 'initial_structure': self.inputs.structure.uuid, # parse from fleurinp or remove - 'is_it_force_theorem': True, - 'energies': self.ctx.energy_dict, - 'q_vectors': self.ctx.wf_dict['q_vectors'], - 'energy_units': 'eV', - 'info': self.ctx.info, - 'warnings': self.ctx.warnings, - 'errors': self.ctx.errors - } + out = { + 'workflow_name': self.__class__.__name__, + 'workflow_version': self._workflowversion, + # 'initial_structure': self.inputs.structure.uuid, # parse from fleurinp or remove + 'is_it_force_theorem': True, + 'energies': self.ctx.energy_dict, + 'q_vectors': self.ctx.wf_dict['q_vectors'], + 'energy_units': 'eV', + 'info': self.ctx.info, + 'warnings': self.ctx.warnings, + 'errors': self.ctx.errors + } out = save_output_node(Dict(dict=out)) self.out('out', out) diff --git a/aiida_fleur/workflows/ssdisp_conv.py b/aiida_fleur/workflows/ssdisp_conv.py index 999fad563..ef580b866 100644 --- a/aiida_fleur/workflows/ssdisp_conv.py +++ b/aiida_fleur/workflows/ssdisp_conv.py @@ -9,7 +9,6 @@ # For further information please visit http://www.flapw.de or # # http://aiida-fleur.readthedocs.io/en/develop/ # ############################################################################### - """ In this module you find the workflow 'FleurSSDispConvWorkChain' for the calculation of Spin Spiral energy Dispersion converging all the directions. @@ -32,37 +31,28 @@ class FleurSSDispConvWorkChain(WorkChain): This workflow calculates the Spin Spiral Dispersion of a structure. """ - _workflowversion = "0.2.0" + _workflowversion = '0.2.0' - _wf_default = { - 'beta': {'all': 1.57079}, - 'q_vectors': {'label': [0.0, 0.0, 0.0], - 'label2': [0.125, 0.0, 0.0] - } - } + _wf_default = {'beta': {'all': 1.57079}, 'q_vectors': {'label': [0.0, 0.0, 0.0], 'label2': [0.125, 0.0, 0.0]}} @classmethod def define(cls, spec): super(FleurSSDispConvWorkChain, cls).define(spec) spec.expose_inputs(FleurScfWorkChain, namespace='scf') - spec.input("wf_parameters", valid_type=Dict, required=False) + spec.input('wf_parameters', valid_type=Dict, required=False) - spec.outline( - cls.start, - cls.converge_scf, - cls.get_results, - cls.return_results - ) + spec.outline(cls.start, cls.converge_scf, cls.get_results, cls.return_results) spec.output('out', valid_type=Dict) # exit codes - spec.exit_code(230, 'ERROR_INVALID_INPUT_PARAM', - message="Invalid workchain parameters.") - spec.exit_code(340, 'ERROR_ALL_QVECTORS_FAILED', - message="Convergence SSDisp calculation failed for all q-vectors.") - spec.exit_code(341, 'ERROR_SOME_QVECTORS_FAILED', - message="Convergence SSDisp calculation failed for some q-vectors.") + spec.exit_code(230, 'ERROR_INVALID_INPUT_PARAM', message='Invalid workchain parameters.') + spec.exit_code(340, + 'ERROR_ALL_QVECTORS_FAILED', + message='Convergence SSDisp calculation failed for all q-vectors.') + spec.exit_code(341, + 'ERROR_SOME_QVECTORS_FAILED', + message='Convergence SSDisp calculation failed for some q-vectors.') def start(self): """ @@ -88,8 +78,7 @@ def start(self): if key not in wf_default.keys(): extra_keys.append(key) if extra_keys: - error = 'ERROR: input wf_parameters for SSDisp Conv contains extra keys: {}'.format( - extra_keys) + error = 'ERROR: input wf_parameters for SSDisp Conv contains extra keys: {}'.format(extra_keys) self.report(error) return self.exit_codes.ERROR_INVALID_INPUT_PARAM @@ -108,9 +97,7 @@ def converge_scf(self): inputs = {} for key, q_vector in six.iteritems(self.ctx.wf_dict['q_vectors']): inputs[key] = self.get_inputs_scf() - inputs[key].calc_parameters['qss'] = {'x': q_vector[0], - 'y': q_vector[1], - 'z': q_vector[2]} + inputs[key].calc_parameters['qss'] = {'x': q_vector[0], 'y': q_vector[1], 'z': q_vector[2]} inputs[key].calc_parameters = Dict(dict=inputs[key]['calc_parameters']) res = self.submit(FleurScfWorkChain, **inputs[key]) self.to_context(**{key: res}) @@ -132,9 +119,12 @@ def get_inputs_scf(self): # change beta parameter for key, val in six.iteritems(self.ctx.wf_dict.get('beta')): - scf_wf_dict['inpxml_changes'].append(('set_atomgr_att_label', - {'attributedict': {'nocoParams': [('beta', val)]}, - 'atom_label': key})) + scf_wf_dict['inpxml_changes'].append(('set_atomgr_att_label', { + 'attributedict': { + 'nocoParams': [('beta', val)] + }, + 'atom_label': key + })) input_scf.wf_parameters = Dict(dict=scf_wf_dict) @@ -165,9 +155,7 @@ def get_results(self): try: outnodedict[label] = calc.outputs.output_scf_wc_para except KeyError: - message = ( - 'One SCF workflow failed, no scf output node: {}.' - ' I skip this one.'.format(label)) + message = ('One SCF workflow failed, no scf output node: {}.' ' I skip this one.'.format(label)) self.ctx.errors.append(message) continue @@ -175,9 +163,7 @@ def get_results(self): t_e = outpara.get('total_energy', 'failed') if not isinstance(t_e, float): - message = ( - 'Did not manage to extract float total energy from one ' - 'SCF workflow: {}'.format(label)) + message = ('Did not manage to extract float total energy from one ' 'SCF workflow: {}'.format(label)) self.ctx.warnings.append(message) continue e_u = outpara.get('total_energy_units', 'Htr') @@ -205,16 +191,18 @@ def return_results(self): if label not in six.iterkeys(self.ctx.energydict): failed_labels.append(label) - out = {'workflow_name': self.__class__.__name__, - 'workflow_version': self._workflowversion, - # 'initial_structure': self.inputs.structure.uuid, - 'energies': self.ctx.energydict, - 'q_vectors': self.ctx.wf_dict['q_vectors'], - 'failed_labels': failed_labels, - 'energy_units': 'eV', - 'info': self.ctx.info, - 'warnings': self.ctx.warnings, - 'errors': self.ctx.errors} + out = { + 'workflow_name': self.__class__.__name__, + 'workflow_version': self._workflowversion, + # 'initial_structure': self.inputs.structure.uuid, + 'energies': self.ctx.energydict, + 'q_vectors': self.ctx.wf_dict['q_vectors'], + 'failed_labels': failed_labels, + 'energy_units': 'eV', + 'info': self.ctx.info, + 'warnings': self.ctx.warnings, + 'errors': self.ctx.errors + } # create link to workchain node out = save_output_node(Dict(dict=out)) diff --git a/docs/b_code b/docs/b_code index e1489376e..f4be38111 100644 --- a/docs/b_code +++ b/docs/b_code @@ -51,5 +51,3 @@ Fleur tools/utility .. automodule:: aiida_fleur.tool.xml_util.py .. automodule:: aiida_fleur.tools.merge_parameter.py - - diff --git a/docs/code.rst b/docs/code.rst index 8db273a84..be8fc404a 100644 --- a/docs/code.rst +++ b/docs/code.rst @@ -62,5 +62,3 @@ ParameterData utility +++++++++++++++++++++ .. automodule:: aiida.tools.codespecific.fleur.merge_parameter :members: - - diff --git a/docs/requirements_for_rtd_aiida.txt b/docs/requirements_for_rtd_aiida.txt index 886b89f4a..f7185bf5b 100644 --- a/docs/requirements_for_rtd_aiida.txt +++ b/docs/requirements_for_rtd_aiida.txt @@ -38,7 +38,7 @@ kiwipy[rmq]==0.5.1 marshmallow-sqlalchemy==0.16.0 mock==2.0.0 monty==2.0.4 -numpy==1.16.4 +numpy==1.16.4,<1.18.0 paramiko==2.6.0 passlib==1.7.1 pg8000<1.13.0 @@ -70,4 +70,4 @@ typing==3.6.6; python_version<'3.5' tzlocal==1.5.1 unittest2==1.1.0; python_version<'3.5' uritools==2.2.0 -wrapt==1.11.1 \ No newline at end of file +wrapt==1.11.1 diff --git a/docs/rtd_settings.py b/docs/rtd_settings.py index 5a13787fd..9153ebc26 100644 --- a/docs/rtd_settings.py +++ b/docs/rtd_settings.py @@ -73,7 +73,7 @@ 'NAME' : ':memory:', } } - + # Internationalization # https://docs.djangoproject.com/en/1.7/topics/i18n/ diff --git a/docs/source/_static/theme_overrides.css b/docs/source/_static/theme_overrides.css new file mode 100644 index 000000000..63ee6cc74 --- /dev/null +++ b/docs/source/_static/theme_overrides.css @@ -0,0 +1,13 @@ +/* override table width restrictions */ +@media screen and (min-width: 767px) { + + .wy-table-responsive table td { + /* !important prevents the common CSS stylesheets from overriding + this as on RTD they are loaded after this stylesheet */ + white-space: normal !important; + } + + .wy-table-responsive { + overflow: visible !important; + } +} diff --git a/docs/source/b_index.rstb b/docs/source/b_index.rstb index 60e3e2cae..8c1bb1eca 100644 --- a/docs/source/b_index.rstb +++ b/docs/source/b_index.rstb @@ -201,4 +201,3 @@ Indices and tables * :ref:`genindex` * :ref:`modindex` * :ref:`search` - diff --git a/docs/source/conf.py b/docs/source/conf.py index 34e3cd968..ea8f7186e 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -12,20 +12,19 @@ # All configuration values have a default; values that are commented out # serve to show the default. +import aiida_fleur +import aiida import sys import os import time # Following 3 lines avoid the need of importing load_dbenv() for compiling the # documentation -> works also without verdi install -sys.path.append( os.path.join( os.path.split(__file__)[0], - os.pardir,os.pardir) ) -sys.path.append( os.path.join( os.path.split(__file__)[0], - os.pardir)) +sys.path.append(os.path.join(os.path.split(__file__)[0], + os.pardir, os.pardir)) +sys.path.append(os.path.join(os.path.split(__file__)[0], + os.pardir)) os.environ['DJANGO_SETTINGS_MODULE'] = 'rtd_settings' -import aiida -import aiida_fleur - # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the @@ -42,19 +41,19 @@ # ones. extensions = ['sphinx.ext.autodoc', 'sphinx.ext.mathjax', - 'sphinx.ext.doctest', - 'sphinx.ext.todo', - 'sphinx.ext.coverage', - 'sphinx.ext.ifconfig', + 'sphinx.ext.doctest', + 'sphinx.ext.todo', + 'sphinx.ext.coverage', + 'sphinx.ext.ifconfig', 'sphinx.ext.intersphinx', 'sphinx.ext.viewcode'] todo_include_todos = True intersphinx_mapping = { -# 'python': ('https://docs.python.org/2.7', None), - 'aiida': ('http://aiida_core.readthedocs.io/en/latest/', None), - } + # 'python': ('https://docs.python.org/2.7', None), + 'aiida': ('https://aiida-core.readthedocs.io/en/latest/', None), +} nitpick_ignore = [('py:obj', 'module')] @@ -75,10 +74,11 @@ project = u'AiiDA-FLEUR' #copyright = u'2016-2019, Jens Broeder' copyright_first_year = 2016 -copyright_owners = u"FZ Jülich GmbH, Germany" +copyright_owners = u'FZ Jülich GmbH, Germany' current_year = time.localtime().tm_year -copyright_year_string = current_year if current_year == copyright_first_year else "{}-{}".format(copyright_first_year, current_year) +copyright_year_string = current_year if current_year == copyright_first_year else '{}-{}'.format( + copyright_first_year, current_year) copyright = u'{}, {}. All rights reserved'.format(copyright_year_string, copyright_owners) @@ -93,7 +93,7 @@ # The short X.Y version. version = '.'.join(release.split('.')[:2]) -author = "The AiiDA-FLEUR team." +author = 'The AiiDA-FLEUR team.' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. @@ -138,7 +138,7 @@ # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -html_theme = 'sphinx_rtd_theme' #'default' +html_theme = 'sphinx_rtd_theme' # 'default' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the @@ -228,22 +228,22 @@ # -- Options for LaTeX output --------------------------------------------- latex_elements = { -# The paper size ('letterpaper' or 'a4paper'). -#'papersize': 'letterpaper', + # The paper size ('letterpaper' or 'a4paper'). + # 'papersize': 'letterpaper', -# The font size ('10pt', '11pt' or '12pt'). -#'pointsize': '10pt', + # The font size ('10pt', '11pt' or '12pt'). + # 'pointsize': '10pt', -# Additional stuff for the LaTeX preamble. -#'preamble': '', + # Additional stuff for the LaTeX preamble. + # 'preamble': '', } # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ - ('index', 'aiida-fleur.tex', u'AiiDa-FLEUR Documentation', - author.replace(',',r'\and'), 'manual'), + ('index', 'aiida-fleur.tex', u'AiiDa-FLEUR Documentation', + author.replace(',', r'\and'), 'manual'), ] # The name of an image file (relative to this directory) to place at the top of @@ -274,9 +274,9 @@ # Following 3 lines avoid the need of importing load_dbenv() for compiling the # documentation -> works also without verdi install -#sys.path.append( os.path.join( os.path.split(__file__)[0], +# sys.path.append( os.path.join( os.path.split(__file__)[0], # os.pardir,os.pardir) ) -#sys.path.append( os.path.join( os.path.split(__file__)[0], +# sys.path.append( os.path.join( os.path.split(__file__)[0], # os.pardir)) #os.environ['DJANGO_SETTINGS_MODULE'] = 'rtd_settings' @@ -298,8 +298,8 @@ # Back-end settings for readthedocs online documentation. from aiida.manage import configuration configuration.IN_RT_DOC_MODE = True - configuration.BACKEND = "django" - configuration.AIIDADB_PROFILE = "default" + configuration.BACKEND = 'django' + configuration.AIIDADB_PROFILE = 'default' ''' @@ -364,9 +364,9 @@ def setup(app): # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ - ('index', 'aiida-fleur', u'AiiDA-Fleur Documentation', - author, 'aiida-fleur', 'One line description of project.', - 'Miscellaneous'), + ('index', 'aiida-fleur', u'AiiDA-Fleur Documentation', + author, 'aiida-fleur', 'One line description of project.', + 'Miscellaneous'), ] # Documents to append as an appendix to all manuals. @@ -426,8 +426,16 @@ def setup(app): nitpick_ignore = [] for line in open('nitpick-exceptions'): - if line.strip() == "" or line.startswith("#"): + if line.strip() == '' or line.startswith('#'): continue dtype, target = line.split(None, 1) target = target.strip() nitpick_ignore.append((dtype, target)) + +html_static_path = ['_static'] + +html_context = { + 'css_files': [ + '_static/theme_overrides.css', # override wide tables in RTD theme + ], +} diff --git a/docs/source/devel_guide/dg_index.rst b/docs/source/devel_guide/dg_index.rst index f35c724e1..ff068db48 100644 --- a/docs/source/devel_guide/dg_index.rst +++ b/docs/source/devel_guide/dg_index.rst @@ -244,7 +244,7 @@ Example:: "aiida.workflows" : [ "fleur.scf = aiida_fleur.workflows.scf:fleur_scf_wc", "fleur.dos = aiida_fleur.workflows.dos:fleur_dos_wc", - "fleur.band = aiida_fleur.workflows.band:fleur_band_wc", + "fleur.band = aiida_fleur.workflows.band:FleurBandWorkChain", "fleur.eos = aiida_fleur.workflows.eos:fleur_eos_wc", "fleur.dummy = aida_fleur.workflows.dummy:dummy_wc", "fleur.sub_dummy = aida_fleur.workflows.dummy:sub_dummy_wc", @@ -279,4 +279,3 @@ Always install python packages you are working on with -e, this way the new vers %autoreload 2 This will import your classes everytime anew. Otherwise they are not reimportet if they have already importet. This is very useful for development work. - diff --git a/docs/source/images/eos_wc_outputnode.py b/docs/source/images/eos_wc_outputnode.py index a0a8843a5..87c6948d4 100644 --- a/docs/source/images/eos_wc_outputnode.py +++ b/docs/source/images/eos_wc_outputnode.py @@ -1,58 +1,59 @@ +# -*- coding: utf-8 -*- { - "bulk_deriv": -612.513884563477, - "bulk_modulus": 29201.4098068761, - "bulk_modulus_units": "GPa", - "calculations": [], - "distance_charge": [ - 4.4141e-06, - 4.8132e-06, - 1.02898e-05, + 'bulk_deriv': -612.513884563477, + 'bulk_modulus': 29201.4098068761, + 'bulk_modulus_units': 'GPa', + 'calculations': [], + 'distance_charge': [ + 4.4141e-06, + 4.8132e-06, + 1.02898e-05, 1.85615e-05 - ], - "distance_charge_units": "me/bohr^3", - "errors": [], - "guess": 1.0, - "info": [ - "Consider refining your basis set." - ], - "initial_structure": "d6985712-7eca-4730-991f-1d924cbd1062", - "natoms": 1, - "nsteps": 4, - "residuals": [], - "scaling": [ - 0.998, - 1.0, - 1.002, + ], + 'distance_charge_units': 'me/bohr^3', + 'errors': [], + 'guess': 1.0, + 'info': [ + 'Consider refining your basis set.' + ], + 'initial_structure': 'd6985712-7eca-4730-991f-1d924cbd1062', + 'natoms': 1, + 'nsteps': 4, + 'residuals': [], + 'scaling': [ + 0.998, + 1.0, + 1.002, 1.004 - ], - "scaling_gs": 1.00286268683922, - "scf_wfs": [], - "stepsize": 0.002, - "structures": [ - "f7fddbb5-51af-4dac-a4ba-021d1bf5795b", - "28e9ed28-837c-447e-aae7-371b70454dc4", - "fc340850-1a54-4be4-abed-576621b3015f", - "77fd128b-e88c-4d7d-9aea-d909166926cb" - ], - "successful": true, - "total_energy": [ - -439902.565469453, - -439902.560450163, - -439902.564547518, + ], + 'scaling_gs': 1.00286268683922, + 'scf_wfs': [], + 'stepsize': 0.002, + 'structures': [ + 'f7fddbb5-51af-4dac-a4ba-021d1bf5795b', + '28e9ed28-837c-447e-aae7-371b70454dc4', + 'fc340850-1a54-4be4-abed-576621b3015f', + '77fd128b-e88c-4d7d-9aea-d909166926cb' + ], + 'successful': true, + 'total_energy': [ + -439902.565469453, + -439902.560450163, + -439902.564547518, -439902.563105211 - ], - "total_energy_units": "Htr", - "volume_gs": 16.2724654374658, - "volume_units": "A^3", - "volumes": [ - 16.1935634057491, - 16.2260154366224, - 16.2584674674955, + ], + 'total_energy_units': 'Htr', + 'volume_gs': 16.2724654374658, + 'volume_units': 'A^3', + 'volumes': [ + 16.1935634057491, + 16.2260154366224, + 16.2584674674955, 16.290919498369 - ], - "warnings": [ - "Abnormality in Total energy list detected. Check entr(ies) [1]." - ], - "workflow_name": "fleur_eos_wc", - "workflow_version": "0.3.3" + ], + 'warnings': [ + 'Abnormality in Total energy list detected. Check entr(ies) [1].' + ], + 'workflow_name': 'fleur_eos_wc', + 'workflow_version': '0.3.3' } diff --git a/docs/source/user_guide/calculations/fleurcode_plugin.rst b/docs/source/user_guide/calculations/fleurcode_plugin.rst index 64f462f95..3d4008d69 100644 --- a/docs/source/user_guide/calculations/fleurcode_plugin.rst +++ b/docs/source/user_guide/calculations/fleurcode_plugin.rst @@ -152,6 +152,10 @@ Each exit code has it's own reason: +-----------+--------------------------------------------------------------+ | 312 | FLEUR calculation failed due to MT overlap | +-----------+--------------------------------------------------------------+ +| 313 | FLEUR calculation failed due to MT overlap during relaxation | ++-----------+--------------------------------------------------------------+ +| 314 | Problem with cdn is suspected | ++-----------+--------------------------------------------------------------+ .. _Fleur_settings: diff --git a/docs/source/user_guide/calculations/output_node_example.py b/docs/source/user_guide/calculations/output_node_example.py index 1f90ffa66..1c14a8a5d 100644 --- a/docs/source/user_guide/calculations/output_node_example.py +++ b/docs/source/user_guide/calculations/output_node_example.py @@ -1,30 +1,31 @@ +# -*- coding: utf-8 -*- (aiidapy)% verdi data dict show 425 { - "CalcJob_uuid": "a6511a00-7759-484a-839d-c100dafd6118", - "bandgap": 0.0029975592, - "bandgap_units": "eV", - "charge_den_xc_den_integral": -3105.2785777045, - "charge_density1": 3.55653e-05, - "charge_density2": 6.70788e-05, - "creator_name": "fleur 27", - "creator_target_architecture": "GEN", - "creator_target_structure": " ", - "density_convergence_units": "me/bohr^3", - "end_date": { - "date": "2019/07/17", - "time": "12:50:27" + 'CalcJob_uuid': 'a6511a00-7759-484a-839d-c100dafd6118', + 'bandgap': 0.0029975592, + 'bandgap_units': 'eV', + 'charge_den_xc_den_integral': -3105.2785777045, + 'charge_density1': 3.55653e-05, + 'charge_density2': 6.70788e-05, + 'creator_name': 'fleur 27', + 'creator_target_architecture': 'GEN', + 'creator_target_structure': ' ', + 'density_convergence_units': 'me/bohr^3', + 'end_date': { + 'date': '2019/07/17', + 'time': '12:50:27' }, - "energy": -4405621.1469633, - "energy_core_electrons": -99592.985569309, - "energy_hartree": -161903.59225823, - "energy_hartree_units": "Htr", - "energy_units": "eV", - "energy_valence_electrons": -158.7015525598, - "fermi_energy": -0.2017877885, - "fermi_energy_units": "Htr", - "force_largest": 0.0, - "magnetic_moment_units": "muBohr", - "magnetic_moments": [ + 'energy': -4405621.1469633, + 'energy_core_electrons': -99592.985569309, + 'energy_hartree': -161903.59225823, + 'energy_hartree_units': 'Htr', + 'energy_units': 'eV', + 'energy_valence_electrons': -158.7015525598, + 'fermi_energy': -0.2017877885, + 'fermi_energy_units': 'Htr', + 'force_largest': 0.0, + 'magnetic_moment_units': 'muBohr', + 'magnetic_moments': [ 2.7677822875, 2.47601e-05, 2.22588e-05, @@ -36,7 +37,7 @@ 1.87169e-05, -0.0002957294 ], - "magnetic_spin_down_charges": [ + 'magnetic_spin_down_charges': [ 5.8532354421, 6.7738647125, 6.8081938915, @@ -48,7 +49,7 @@ 6.7733972589, 6.6797683064 ], - "magnetic_spin_up_charges": [ + 'magnetic_spin_up_charges': [ 8.6210177296, 6.7738894726, 6.8082161503, @@ -60,37 +61,36 @@ 6.7734159758, 6.679472577 ], - "number_of_atom_types": 10, - "number_of_atoms": 10, - "number_of_iterations": 49, - "number_of_iterations_total": 49, - "number_of_kpoints": 240, - "number_of_species": 1, - "number_of_spin_components": 2, - "number_of_symmetries": 2, - "orbital_magnetic_moment_units": "muBohr", - "orbital_magnetic_moments": [], - "orbital_magnetic_spin_down_charges": [], - "orbital_magnetic_spin_up_charges": [], - "output_file_version": "0.27", - "overall_charge_density": 7.25099e-05, - "parser_info": "AiiDA Fleur Parser v0.2beta", - "parser_warnings": [], - "spin_density": 7.91911e-05, - "start_date": { - "date": "2019/07/17", - "time": "10:38:24" + 'number_of_atom_types': 10, + 'number_of_atoms': 10, + 'number_of_iterations': 49, + 'number_of_iterations_total': 49, + 'number_of_kpoints': 240, + 'number_of_species': 1, + 'number_of_spin_components': 2, + 'number_of_symmetries': 2, + 'orbital_magnetic_moment_units': 'muBohr', + 'orbital_magnetic_moments': [], + 'orbital_magnetic_spin_down_charges': [], + 'orbital_magnetic_spin_up_charges': [], + 'output_file_version': '0.27', + 'overall_charge_density': 7.25099e-05, + 'parser_info': 'AiiDA Fleur Parser v0.2beta', + 'parser_warnings': [], + 'spin_density': 7.91911e-05, + 'start_date': { + 'date': '2019/07/17', + 'time': '10:38:24' }, - "sum_of_eigenvalues": -99751.687121869, - "title": "A Fleur input generator calulation with aiida", - "unparsed": [], - "walltime": 7923, - "walltime_units": "seconds", - "warnings": { - "debug": {}, - "error": {}, - "info": {}, - "warning": {} + 'sum_of_eigenvalues': -99751.687121869, + 'title': 'A Fleur input generator calulation with aiida', + 'unparsed': [], + 'walltime': 7923, + 'walltime_units': 'seconds', + 'warnings': { + 'debug': {}, + 'error': {}, + 'info': {}, + 'warning': {} } } - diff --git a/docs/source/user_guide/calculations/parameter_example.py b/docs/source/user_guide/calculations/parameter_example.py index 344c94978..df750d4ca 100644 --- a/docs/source/user_guide/calculations/parameter_example.py +++ b/docs/source/user_guide/calculations/parameter_example.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- Cd = Dict(dict={ 'atom':{'element' : 'Cd', 'rmt' : 2.5, 'jri' : 981, 'lmax' : 12, 'lnonsph' : 6, 'lo' : '4d', diff --git a/docs/source/user_guide/data/fleurinp_data.rst b/docs/source/user_guide/data/fleurinp_data.rst index 0ab6010d9..ac5a8fdaf 100644 --- a/docs/source/user_guide/data/fleurinp_data.rst +++ b/docs/source/user_guide/data/fleurinp_data.rst @@ -116,3 +116,62 @@ User Methods of a :py:class:`~aiida.orm.KpointsData` node in the inp.xml file returns a new :py:class:`~aiida_fleur.data.fleurinp.FleurinpData` instance. It replaces old kpoints. + +.. _setting_labels: + +Setting up atom labels +---------------------- + +Label is a string that marks a certain atom in the ``inp.xml`` file. Labels are created automatically +by the inpgen, however, in some cases it is helpful to control atom labeling. This can be done by +setting up the kind name while initialising the structure: + +.. code-block:: python + + structure = StructureData(cell=cell) + structure.append_atom(position=(0.0, 0.0, -z), symbols='Fe', name='Fe123') + structure.append_atom(position=(x, y, 0.0), symbols='Pt') + structure.append_atom(position=(0., 0., z), symbols='Pt') + +in this case both of the Pr atoms will get default labels, but 'Fe' atom will the label '123' +(actually ' 123', but all of the methods in AiiDA-Fleur are implemented in a way +that user should know only last digit characters). + +.. note:: + + Kind name, which is used for labeling, must begin from the element name and end up with a number. + It is **very important** that the first digit of the number is smaller than 4: ``152``, ``3``, ``21`` + can be good choices, when ``492``, ``66``, ``91`` are forbidden. + +.. warning:: + + Except setting up the label, providing a kind name also creates a new specie. This is because + the ``123`` will not only appear as a label, but also in the atom number. In our case, the line + in the inpgen input corresponding to Fe atom will look like ``26.123 0 0 -z 123``. Hence, + if we would have another Fe atom with the default kind name, both of the Fe atom would belong + to different atom group, generally resulting in lower symmetry. + +Given labels can be used for simplified xml methods. For example, +when one performs SOC calculations it might be needed to vary ``socscale`` parameter for a certain +atom. Knowing the correct label of the atom, it is straightforward to make such a change in +:class:`~aiida_fleur.data.fleurinp.FleurinpData` object +(:ref:`using ` the :class:`~aiida_fleur.data.fleurinpmodifier.FleurinpModifier`) +or pass a corresponding +line to ``inpxml_changes`` of workchain parameters: + +.. code-block:: python + + + # an example of inpxml_changes list, that sets socscale of the iron atom + # from the above structure to zero + inpxml_changes = [('set_species_label', {'at_label': '123', + 'attributedict': { + 'special': {'socscale': 0.0} + }, + 'create': True + })] + + # in this example the atomgroup, to which the atom with label '222' belongs, + # will be modified + fm = FleurinpModifier(SomeFleurinp) + fm.set_atomgr_att_label(attributedict={'force': [('relaxXYZ', 'FFF')]}, atom_label=' 222') diff --git a/docs/source/user_guide/data/fleurinp_modifier.rst b/docs/source/user_guide/data/fleurinp_modifier.rst index 0a6d41cd2..d81f02ba7 100644 --- a/docs/source/user_guide/data/fleurinp_modifier.rst +++ b/docs/source/user_guide/data/fleurinp_modifier.rst @@ -64,7 +64,7 @@ _______________ the changes in the given list are validated. * :py:func:`~aiida_fleur.data.fleurinpmodifier.FleurinpModifier.freeze()`: Applies all the changes in the list, calls - :py:func:`~aiida_fleur.data.fleurinpmodifier.FleurinpModifier.modify_fleurinpdata()` and + :py:func:`~aiida_fleur.data.fleurinpmodifier.modify_fleurinpdata()` and returns a new :py:class:`~aiida_fleur.data.fleurinp.FleurinpData` object. * :py:func:`~aiida_fleur.data.fleurinpmodifier.FleurinpModifier.changes()`: Displays the current list of changes. @@ -72,6 +72,8 @@ _______________ the modifications and displays/prints the resulting ``inp.xml`` file. Does not generate a new :py:class:`~aiida_fleur.data.fleurinp.FleurinpData` object. +.. _modify_methods: + Modification registration methods _________________________________ The registration methods can be separated into two groups. First of all, @@ -115,6 +117,8 @@ On the other hand, there are shortcut methods that already know some paths: user-friendly method for easy changes of attribute key value type. * :py:func:`~aiida_fleur.data.fleurinpmodifier.FleurinpModifier.shift_value()`: Specific user-friendly method to shift value of an attribute. + * :py:func:`~aiida_fleur.data.fleurinpmodifier.FleurinpModifier.shift_value_species_label()`: Specific + user-friendly method to shift value of an attribute of an atom with a certain label. * :py:func:`~aiida_fleur.data.fleurinpmodifier.FleurinpModifier.set_nkpts()`: Specific method to set the number of kpoints. diff --git a/docs/source/user_guide/data/parameter_example.py b/docs/source/user_guide/data/parameter_example.py index 74db6e04b..5fd74dac9 100644 --- a/docs/source/user_guide/data/parameter_example.py +++ b/docs/source/user_guide/data/parameter_example.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- Cd = Dict(dict={ 'atom':{'element' : 'Cd', 'rmt' : 2.5, 'jri' : 981, 'lmax' : 12, 'lnonsph' : 6, 'lo' : '4d', 'econfig' : '[Ar] 4s2 3d10 4p6 | 4d10 5s2'}, 'comp': {'kmax': 4.7, 'gmaxxc' : 12.0, 'gmax' : 14.0}, @@ -11,4 +12,3 @@ 'kpt': {'div1' : 24, 'div2': 24, 'div3' : 24, 'tkb' : 0.0005}, 'soc' : {'theta' : 0.0, 'phi' : 0.0} }) - diff --git a/docs/source/user_guide/getting_started/getting_started.rst b/docs/source/user_guide/getting_started/getting_started.rst index 5eb8de551..5385626fb 100644 --- a/docs/source/user_guide/getting_started/getting_started.rst +++ b/docs/source/user_guide/getting_started/getting_started.rst @@ -8,13 +8,11 @@ Installation of AiiDA-FLEUR .. _tutorial: https://aiida.readthedocs.io/projects/aiida-core/en/latest/install/installation.html#aiida-profile-setup .. _needed: https://aiida.readthedocs.io/projects/aiida-core/en/latest/install/prerequisites.html .. _iffwiki: https://iffwiki.fz-juelich.de/Using_AiiDA_at_PGI#Circumventing_SSH_open_and_close_limits_of_firewalls_by_ssh_tunnels -.. _official guide: https://www.flapw.de/site/Install/ +.. _official guide: https://www.flapw.de/MaX-4.0/documentation/installation/ To use AiiDA, it has to be installed on your local machine and configured properly. The detailed description of all required steps can be found in the `AiiDA`_ documentation. -However, a small guide presented -below (which basically duplicates more detailed instructions given in `AiiDA`_) shows an example of -installation of AiiDA-FLEUR. +However, a small guide presented below shows an example of installation of AiiDA-FLEUR. Installation of python packages ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -25,16 +23,16 @@ First of all, make sure that you have all required libraries that are `needed`_ If you use a cooperative machine, you might need to contact to your IT department to help you with setting up some libraries such as postgres and RabbitMQ. -In order to safely install AiiDA, you need to set up a virtual environment which protects you local +In order to safely install AiiDA, you need to set up a virtual environment to protect your local settings and packages. -To set up a python 3 environment, run a command: +To set up a python3 environment, run: .. code-block:: bash python3 -m venv ~/.virtualenvs/aiidapy This will create a directory in your home directory named ``.virtualenvs/aiidapy`` where all the -required packages will be installed. First, the virtual environment has to be activated via: +required packages will be installed. Next, the virtual environment has to be activated: .. code-block:: bash @@ -220,7 +218,7 @@ and fill all the required forms. An example: after that, a vim editor pops out and you need to specify prepend and append text where you can add required imports and commands for you system. Particularly in my case, I need to -set proper library paths for inpgen to run. Hence my prepend text looks like: +set proper library paths. Hence my prepend text looks like: .. code-block:: bash @@ -235,8 +233,8 @@ FLEUR code can be set up the same way as the input generator. However, there is that has to be mentioned. .. note:: - If you use an HDF version of the FLEUR code then AiiDA-FLEUR plugin should know this. That - is because names of generated output files vary between HDF and standard FLEUR versions. + If you use an HDF version of the FLEUR code then AiiDA-FLEUR plugin should know this. The + main reason for this is that names of output files vary between HDF and standard FLEUR versions. To properly set up an HDF version of the code, you *must* mention HDF5 (or hdf5) in the code description and not change it in the future. An example of setting up an HDF version: @@ -323,7 +321,7 @@ the output should look something like this No worries about skipped tests - they appear due to technical implementation of tests and contain some information for developers. For a user it is important to make sure that the others do not fail: if anything (especially a lot of tests) fails it is very likely that your -installation is messed up. Maybe some packages are missing (reinstall them by hand and report -please). The other problem could be that the AiiDA-FLEUR version you have +installation is messed up. Some packages might be missing (reinstall them by hand and report +to development team). The other problem could be that the AiiDA-FLEUR version you have installed is not compatible with the AiiDA version you are running, since not all AiiDA versions are back-compatible. diff --git a/docs/source/user_guide/hints/exit_codes.rst b/docs/source/user_guide/hints/exit_codes.rst index 96cbbf916..4b22761e1 100644 --- a/docs/source/user_guide/hints/exit_codes.rst +++ b/docs/source/user_guide/hints/exit_codes.rst @@ -27,144 +27,164 @@ For more detailed information, see AiiDA `documentation`_. The list of all exit codes implemented in AiiDA-FLEUR: -+-----------+--------------------------------------------------------------------------------------------------------+------------------------+ -| Exit code | Exit message | Thrown by | -+-----------+--------------------------------------------------------------------------------------------------------+------------------------+ -| 230 | Invalid workchain parameters | CreateMagnetic | -+-----------+--------------------------------------------------------------------------------------------------------+------------------------+ -| 230 | Invalid workchain parameters | DMI | -+-----------+--------------------------------------------------------------------------------------------------------+------------------------+ -| 230 | Invalid workchain parameters | EOS | -+-----------+--------------------------------------------------------------------------------------------------------+------------------------+ -| 230 | Invalid workchain parameters | MAE | -+-----------+--------------------------------------------------------------------------------------------------------+------------------------+ -| 230 | Invalid workchain parameters | MAE Conv | -+-----------+--------------------------------------------------------------------------------------------------------+------------------------+ -| 230 | Invalid workchain parameters | Relax | -+-----------+--------------------------------------------------------------------------------------------------------+------------------------+ -| 230 | Invalid workchain parameters | SCF | -+-----------+--------------------------------------------------------------------------------------------------------+------------------------+ -| 230 | Invalid workchain parameters | SSDisp | -+-----------+--------------------------------------------------------------------------------------------------------+------------------------+ -| 230 | Invalid workchain parameters | SSDisp Conv | -+-----------+--------------------------------------------------------------------------------------------------------+------------------------+ -| 231 | Invalid input configuration | CreateMagnetic | -+-----------+--------------------------------------------------------------------------------------------------------+------------------------+ -| 231 | Invalid input configuration | DMI | -+-----------+--------------------------------------------------------------------------------------------------------+------------------------+ -| 231 | Invalid input configuration | MAE | -+-----------+--------------------------------------------------------------------------------------------------------+------------------------+ -| 231 | Invalid input configuration | SCF | -+-----------+--------------------------------------------------------------------------------------------------------+------------------------+ -| 231 | Invalid input configuration | SSDisp | -+-----------+--------------------------------------------------------------------------------------------------------+------------------------+ -| 233 | Input codes do not correspond to fleur or inpgen codes respectively. | DMI | -+-----------+--------------------------------------------------------------------------------------------------------+------------------------+ -| 233 | Input codes do not correspond to fleur or inpgen codes respectively. | MAE | -+-----------+--------------------------------------------------------------------------------------------------------+------------------------+ -| 233 | Input codes do not correspond to fleur or inpgen codes respectively. | SSDisp | -+-----------+--------------------------------------------------------------------------------------------------------+------------------------+ -| 235 | Input file modification failed. | DMI | -+-----------+--------------------------------------------------------------------------------------------------------+------------------------+ -| 235 | Input file modification failed. | MAE | -+-----------+--------------------------------------------------------------------------------------------------------+------------------------+ -| 235 | Input file modification failed | SCF | -+-----------+--------------------------------------------------------------------------------------------------------+------------------------+ -| 235 | Input file modification failed. | SSDisp | -+-----------+--------------------------------------------------------------------------------------------------------+------------------------+ -| 236 | Input file was corrupted after modifications | DMI | -+-----------+--------------------------------------------------------------------------------------------------------+------------------------+ -| 236 | Input file was corrupted after modifications | MAE | -+-----------+--------------------------------------------------------------------------------------------------------+------------------------+ -| 236 | Input file was corrupted after modifications | SCF | -+-----------+--------------------------------------------------------------------------------------------------------+------------------------+ -| 236 | Input file was corrupted after modifications | SSDisp | -+-----------+--------------------------------------------------------------------------------------------------------+------------------------+ -| 300 | No retrieved folder found | FleurCalculation | -+-----------+--------------------------------------------------------------------------------------------------------+------------------------+ -| 300 | No retrieved folder found | FleurCalculation | -+-----------+--------------------------------------------------------------------------------------------------------+------------------------+ -| 300 | No retrieved folder found | FleurinpgenCalculation | -+-----------+--------------------------------------------------------------------------------------------------------+------------------------+ -| 300 | No retrieved folder found | FleurinpgenCalculation | -+-----------+--------------------------------------------------------------------------------------------------------+------------------------+ -| 301 | One of the output files can not be opened | FleurCalculation | -+-----------+--------------------------------------------------------------------------------------------------------+------------------------+ -| 301 | One of the output files can not be opened | FleurinpgenCalculation | -+-----------+--------------------------------------------------------------------------------------------------------+------------------------+ -| 302 | FLEUR calculation failed for unknown reason | FleurCalculation | -+-----------+--------------------------------------------------------------------------------------------------------+------------------------+ -| 303 | XML output file was not found | FleurCalculation | -+-----------+--------------------------------------------------------------------------------------------------------+------------------------+ -| 304 | Parsing of XML output file failed | FleurCalculation | -+-----------+--------------------------------------------------------------------------------------------------------+------------------------+ -| 305 | Parsing of relax XML output file failed | FleurCalculation | -+-----------+--------------------------------------------------------------------------------------------------------+------------------------+ -| 306 | XML input file was not found | FleurinpgenCalculation | -+-----------+--------------------------------------------------------------------------------------------------------+------------------------+ -| 310 | FLEUR calculation failed due to memory issue | FleurCalculation | -+-----------+--------------------------------------------------------------------------------------------------------+------------------------+ -| 311 | FLEUR calculation failed because atoms spilled to the vacuum | FleurBase | -+-----------+--------------------------------------------------------------------------------------------------------+------------------------+ -| 311 | FLEUR calculation failed because atoms spilled to the vacuum | FleurCalculation | -+-----------+--------------------------------------------------------------------------------------------------------+------------------------+ -| 311 | FLEUR calculation failed because atoms spilled to the vacuum | Relax | -+-----------+--------------------------------------------------------------------------------------------------------+------------------------+ -| 312 | FLEUR calculation failed due to MT overlap | FleurCalculation | -+-----------+--------------------------------------------------------------------------------------------------------+------------------------+ -| 313 | Overlapping MT-spheres during relaxation | FleurBase | -+-----------+--------------------------------------------------------------------------------------------------------+------------------------+ -| 313 | Overlapping MT-spheres during relaxation | FleurCalculation | -+-----------+--------------------------------------------------------------------------------------------------------+------------------------+ -| 313 | Overlapping MT-spheres during relaxation | Relax | -+-----------+--------------------------------------------------------------------------------------------------------+------------------------+ -| 334 | Reference calculation failed. | DMI | -+-----------+--------------------------------------------------------------------------------------------------------+------------------------+ -| 334 | Reference calculation failed. | MAE | -+-----------+--------------------------------------------------------------------------------------------------------+------------------------+ -| 334 | Reference calculation failed. | SSDisp | -+-----------+--------------------------------------------------------------------------------------------------------+------------------------+ -| 335 | Found no reference calculation remote repository. | DMI | -+-----------+--------------------------------------------------------------------------------------------------------+------------------------+ -| 335 | Found no reference calculation remote repository. | MAE | -+-----------+--------------------------------------------------------------------------------------------------------+------------------------+ -| 335 | Found no reference calculation remote repository. | SSDisp | -+-----------+--------------------------------------------------------------------------------------------------------+------------------------+ -| 336 | Force theorem calculation failed. | DMI | -+-----------+--------------------------------------------------------------------------------------------------------+------------------------+ -| 336 | Force theorem calculation failed. | MAE | -+-----------+--------------------------------------------------------------------------------------------------------+------------------------+ -| 336 | Force theorem calculation failed. | SSDisp | -+-----------+--------------------------------------------------------------------------------------------------------+------------------------+ -| 340 | Convergence SSDisp calculation failed for all q-vectors | SSDisp conv | -+-----------+--------------------------------------------------------------------------------------------------------+------------------------+ -| 341 | Convergence SSDisp calculation failed for some q-vectors | SSDisp conv | -+-----------+--------------------------------------------------------------------------------------------------------+------------------------+ -| 343 | Convergence MAE calculation failed for all SQAs | MAE conv | -+-----------+--------------------------------------------------------------------------------------------------------+------------------------+ -| 344 | Convergence MAE calculation failed for some SQAs | MAE conv | -+-----------+--------------------------------------------------------------------------------------------------------+------------------------+ -| 350 | The workchain execution did not lead to relaxation criterion. Thrown in the vary end of the workchain. | Relax | -+-----------+--------------------------------------------------------------------------------------------------------+------------------------+ -| 351 | SCF Workchains failed for some reason. | Relax | -+-----------+--------------------------------------------------------------------------------------------------------+------------------------+ -| 352 | Found no relaxed structure info in the output of SCF | Relax | -+-----------+--------------------------------------------------------------------------------------------------------+------------------------+ -| 353 | Found no SCF output | Relax | -+-----------+--------------------------------------------------------------------------------------------------------+------------------------+ -| 360 | Inpgen calculation failed | SCF | -+-----------+--------------------------------------------------------------------------------------------------------+------------------------+ -| 361 | Fleur calculation failed | SCF | -+-----------+--------------------------------------------------------------------------------------------------------+------------------------+ -| 380 | Specified substrate is not bcc or fcc, only them are supported | CreateMagnetic | -+-----------+--------------------------------------------------------------------------------------------------------+------------------------+ -| 382 | Relaxation calculation failed. | CreateMagnetic | -+-----------+--------------------------------------------------------------------------------------------------------+------------------------+ -| 389 | FLEUR calculation failed due to memory issue and it can not be solved for this scheduler | FleurBase | -+-----------+--------------------------------------------------------------------------------------------------------+------------------------+ -| 390 | check_kpts() suggests less than 60% of node load | FleurBase | -+-----------+--------------------------------------------------------------------------------------------------------+------------------------+ -| 399 | FleurCalculation failed and FleurBaseWorkChain has no strategy to resolve this | FleurBase | -+-----------+--------------------------------------------------------------------------------------------------------+------------------------+ -| 399 | FleurRelaxWorkChain failed and FleurBaseRelaxWorkChain has no strategy to resolve this | Relax Base | -+-----------+--------------------------------------------------------------------------------------------------------+------------------------+ ++-----------+---------------------------------------------------------+------------------------+ +| Exit code | Exit message | Thrown by | ++-----------+---------------------------------------------------------+------------------------+ +| 230 | Invalid workchain parameters | CreateMagnetic | ++-----------+---------------------------------------------------------+------------------------+ +| 230 | Invalid workchain parameters | DMI | ++-----------+---------------------------------------------------------+------------------------+ +| 230 | Invalid workchain parameters | EOS | ++-----------+---------------------------------------------------------+------------------------+ +| 230 | Invalid workchain parameters | MAE | ++-----------+---------------------------------------------------------+------------------------+ +| 230 | Invalid workchain parameters | MAE Conv | ++-----------+---------------------------------------------------------+------------------------+ +| 230 | Invalid workchain parameters | Relax | ++-----------+---------------------------------------------------------+------------------------+ +| 230 | Invalid workchain parameters | SCF | ++-----------+---------------------------------------------------------+------------------------+ +| 230 | Invalid workchain parameters | SSDisp | ++-----------+---------------------------------------------------------+------------------------+ +| 230 | Invalid workchain parameters | SSDisp Conv | ++-----------+---------------------------------------------------------+------------------------+ +| 231 | Invalid input configuration | CreateMagnetic | ++-----------+---------------------------------------------------------+------------------------+ +| 231 | Invalid input configuration | DMI | ++-----------+---------------------------------------------------------+------------------------+ +| 231 | Invalid input configuration | MAE | ++-----------+---------------------------------------------------------+------------------------+ +| 231 | Invalid input configuration | SCF | ++-----------+---------------------------------------------------------+------------------------+ +| 231 | Invalid input configuration | SSDisp | ++-----------+---------------------------------------------------------+------------------------+ +| 233 | Input codes do not correspond to | DMI | +| | fleur or inpgen codes respectively. | | ++-----------+---------------------------------------------------------+------------------------+ +| 233 | Input codes do not correspond to | MAE | +| | fleur or inpgen codes respectively. | | ++-----------+---------------------------------------------------------+------------------------+ +| 233 | Input codes do not correspond to | SSDisp | +| | fleur or inpgen codes respectively. | | ++-----------+---------------------------------------------------------+------------------------+ +| 235 | Input file modification failed. | DMI | ++-----------+---------------------------------------------------------+------------------------+ +| 235 | Input file modification failed. | MAE | ++-----------+---------------------------------------------------------+------------------------+ +| 235 | Input file modification failed | SCF | ++-----------+---------------------------------------------------------+------------------------+ +| 235 | Input file modification failed. | SSDisp | ++-----------+---------------------------------------------------------+------------------------+ +| 236 | Input file was corrupted after modifications | DMI | ++-----------+---------------------------------------------------------+------------------------+ +| 236 | Input file was corrupted after modifications | MAE | ++-----------+---------------------------------------------------------+------------------------+ +| 236 | Input file was corrupted after modifications | SCF | ++-----------+---------------------------------------------------------+------------------------+ +| 236 | Input file was corrupted after modifications | SSDisp | ++-----------+---------------------------------------------------------+------------------------+ +| 300 | No retrieved folder found | FleurCalculation | ++-----------+---------------------------------------------------------+------------------------+ +| 300 | No retrieved folder found | FleurCalculation | ++-----------+---------------------------------------------------------+------------------------+ +| 300 | No retrieved folder found | FleurinpgenCalculation | ++-----------+---------------------------------------------------------+------------------------+ +| 300 | No retrieved folder found | FleurinpgenCalculation | ++-----------+---------------------------------------------------------+------------------------+ +| 301 | One of the output files can not be opened | FleurCalculation | ++-----------+---------------------------------------------------------+------------------------+ +| 301 | One of the output files can not be opened | FleurinpgenCalculation | ++-----------+---------------------------------------------------------+------------------------+ +| 302 | FLEUR calculation failed for unknown reason | FleurCalculation | ++-----------+---------------------------------------------------------+------------------------+ +| 303 | XML output file was not found | FleurCalculation | ++-----------+---------------------------------------------------------+------------------------+ +| 304 | Parsing of XML output file failed | FleurCalculation | ++-----------+---------------------------------------------------------+------------------------+ +| 305 | Parsing of relax XML output file failed | FleurCalculation | ++-----------+---------------------------------------------------------+------------------------+ +| 306 | XML input file was not found | FleurinpgenCalculation | ++-----------+---------------------------------------------------------+------------------------+ +| 310 | FLEUR calculation failed due to memory issue | FleurCalculation | ++-----------+---------------------------------------------------------+------------------------+ +| 311 | FLEUR calculation failed because atoms | FleurBase | +| | spilled to the vacuum | | ++-----------+---------------------------------------------------------+------------------------+ +| 311 | FLEUR calculation failed because atoms | FleurCalculation | +| | spilled to the vacuum | | ++-----------+---------------------------------------------------------+------------------------+ +| 311 | FLEUR calculation failed because atoms | Relax | +| | spilled to the vacuum | | ++-----------+---------------------------------------------------------+------------------------+ +| 312 | FLEUR calculation failed due to MT overlap | FleurCalculation | ++-----------+---------------------------------------------------------+------------------------+ +| 313 | Overlapping MT-spheres during relaxation | FleurBase | ++-----------+---------------------------------------------------------+------------------------+ +| 313 | Overlapping MT-spheres during relaxation | FleurCalculation | ++-----------+---------------------------------------------------------+------------------------+ +| 313 | Overlapping MT-spheres during relaxation | Relax | ++-----------+---------------------------------------------------------+------------------------+ +| 314 | Problem with cdn is suspected | Relax | ++-----------+---------------------------------------------------------+------------------------+ +| 334 | Reference calculation failed. | DMI | ++-----------+---------------------------------------------------------+------------------------+ +| 334 | Reference calculation failed. | MAE | ++-----------+---------------------------------------------------------+------------------------+ +| 334 | Reference calculation failed. | SSDisp | ++-----------+---------------------------------------------------------+------------------------+ +| 335 | Found no reference calculation remote repository. | DMI | ++-----------+---------------------------------------------------------+------------------------+ +| 335 | Found no reference calculation remote repository. | MAE | ++-----------+---------------------------------------------------------+------------------------+ +| 335 | Found no reference calculation remote repository. | SSDisp | ++-----------+---------------------------------------------------------+------------------------+ +| 336 | Force theorem calculation failed. | DMI | ++-----------+---------------------------------------------------------+------------------------+ +| 336 | Force theorem calculation failed. | MAE | ++-----------+---------------------------------------------------------+------------------------+ +| 336 | Force theorem calculation failed. | SSDisp | ++-----------+---------------------------------------------------------+------------------------+ +| 340 | Convergence SSDisp calculation failed | SSDisp conv | +| | for all q-vectors | | ++-----------+---------------------------------------------------------+------------------------+ +| 341 | Convergence SSDisp calculation failed | SSDisp conv | +| | for some q-vectors | | ++-----------+---------------------------------------------------------+------------------------+ +| 343 | Convergence MAE calculation failed for all SQAs | MAE conv | ++-----------+---------------------------------------------------------+------------------------+ +| 344 | Convergence MAE calculation failed for some SQAs | MAE conv | ++-----------+---------------------------------------------------------+------------------------+ +| 350 | The workchain execution did not lead to | Relax | +| | relaxation criterion. Thrown in the very | | +| | end of the workchain. | | ++-----------+---------------------------------------------------------+------------------------+ +| 351 | SCF Workchains failed for some reason. | Relax | ++-----------+---------------------------------------------------------+------------------------+ +| 352 | Found no relaxed structure info in the output of SCF | Relax | ++-----------+---------------------------------------------------------+------------------------+ +| 353 | Found no SCF output | Relax | ++-----------+---------------------------------------------------------+------------------------+ +| 354 | Force is small, switch to BFGS | Relax | ++-----------+---------------------------------------------------------+------------------------+ +| 360 | Inpgen calculation failed | SCF | ++-----------+---------------------------------------------------------+------------------------+ +| 361 | Fleur calculation failed | SCF | ++-----------+---------------------------------------------------------+------------------------+ +| 380 | Specified substrate is not bcc or fcc, | CreateMagnetic | +| | only them are supported | | ++-----------+---------------------------------------------------------+------------------------+ +| 382 | Relaxation calculation failed. | CreateMagnetic | ++-----------+---------------------------------------------------------+------------------------+ +| 383 | EOS WorkChain failed. | CreateMagnetic | ++-----------+---------------------------------------------------------+------------------------+ +| 389 | FLEUR calculation failed due to memory issue | FleurBase | +| | and it can not be solved for this scheduler | | ++-----------+---------------------------------------------------------+------------------------+ +| 390 | check_kpts() suggests less than 60% of node load | FleurBase | ++-----------+---------------------------------------------------------+------------------------+ +| 399 | FleurCalculation failed and FleurBaseWorkChain | FleurBase | +| | has no strategy to resolve this | | ++-----------+---------------------------------------------------------+------------------------+ +| 399 | FleurRelaxWorkChain failed and | Relax Base | +| | FleurBaseRelaxWorkChain has no strategy to resolve this | | ++-----------+---------------------------------------------------------+------------------------+ diff --git a/docs/source/user_guide/hints/hints_faq.rst b/docs/source/user_guide/hints/hints_faq.rst index 8833c83b9..f3bb6481e 100644 --- a/docs/source/user_guide/hints/hints_faq.rst +++ b/docs/source/user_guide/hints/hints_faq.rst @@ -26,5 +26,3 @@ FAQ --- to come - - diff --git a/docs/source/user_guide/tools/tools_index.rst b/docs/source/user_guide/tools/tools_index.rst index c85c664ad..44d21a379 100644 --- a/docs/source/user_guide/tools/tools_index.rst +++ b/docs/source/user_guide/tools/tools_index.rst @@ -15,4 +15,4 @@ From cif files (ICSD) From COD/TCOD From OQMD From ALFOWLIB -From Materials project \ No newline at end of file +From Materials project diff --git a/docs/source/user_guide/ug_index.rst b/docs/source/user_guide/ug_index.rst index dc36f62ab..17fe88814 100644 --- a/docs/source/user_guide/ug_index.rst +++ b/docs/source/user_guide/ug_index.rst @@ -16,4 +16,3 @@ This is the AiiDA-FLEUR user's guide. ./tutorials/tutorials ./hints/hints_faq ./hints/exit_codes - diff --git a/docs/source/user_guide/workflows/code/create_magnetic_parameters.py b/docs/source/user_guide/workflows/code/create_magnetic_parameters.py index 8b41281ce..59eb1cec2 100644 --- a/docs/source/user_guide/workflows/code/create_magnetic_parameters.py +++ b/docs/source/user_guide/workflows/code/create_magnetic_parameters.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- 'lattice': 'fcc', # type of the substrate lattice: 'bcc' or 'fcc' 'miller': [[-1, 1, 0], # miller indices to orient the lattice [0, 0, 1], diff --git a/docs/source/user_guide/workflows/code/create_magnetic_submission.py b/docs/source/user_guide/workflows/code/create_magnetic_submission.py index 5d698e38d..9a2c887c4 100644 --- a/docs/source/user_guide/workflows/code/create_magnetic_submission.py +++ b/docs/source/user_guide/workflows/code/create_magnetic_submission.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from aiida.orm import load_node, Dict from aiida.engine import submit @@ -50,9 +51,8 @@ calc_eos = Dict(dict=calc_eos) -options_eos = {'resources': {"num_machines": 1, "num_mpiprocs_per_machine": 4, "num_cores_per_mpiproc": 6}, +options_eos = {'resources': {'num_machines': 1, 'num_mpiprocs_per_machine': 4, 'num_cores_per_mpiproc': 6}, 'queue_name': 'devel', - 'environment_variables': {'OMP_NUM_THREADS': '6'}, 'custom_scheduler_commands': '', 'max_wallclock_seconds': 1*60*60} @@ -101,9 +101,8 @@ calc_relax = Dict(dict=calc_relax) -options_relax = {'resources': {"num_machines": 1, "num_mpiprocs_per_machine": 4, "num_cores_per_mpiproc": 6}, +options_relax = {'resources': {'num_machines': 1, 'num_mpiprocs_per_machine': 4, 'num_cores_per_mpiproc': 6}, 'queue_name': 'devel', - 'environment_variables': {'OMP_NUM_THREADS': '6'}, 'custom_scheduler_commands': '', 'max_wallclock_seconds': 1*60*60} diff --git a/docs/source/user_guide/workflows/code/dmi_parameters.py b/docs/source/user_guide/workflows/code/dmi_parameters.py index 574bcf7c1..64621d0e0 100644 --- a/docs/source/user_guide/workflows/code/dmi_parameters.py +++ b/docs/source/user_guide/workflows/code/dmi_parameters.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- 'beta': {'all': 1.57079}, # see description below 'sqas_theta': [0.0, 1.57079, 1.57079], # a list of theta values for the FT 'sqas_phi': [0.0, 0.0, 1.57079], # a list of phi values for the FT diff --git a/docs/source/user_guide/workflows/code/dmi_wc_submission.py b/docs/source/user_guide/workflows/code/dmi_wc_submission.py index c17ecbe25..fa24049f5 100644 --- a/docs/source/user_guide/workflows/code/dmi_wc_submission.py +++ b/docs/source/user_guide/workflows/code/dmi_wc_submission.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from aiida.orm import load_node, Dict from aiida.engine import submit @@ -18,7 +19,7 @@ 'inpxml_changes': [] }) -options = Dict(dict={'resources': {"num_machines": 1, "num_mpiprocs_per_machine": 24}, +options = Dict(dict={'resources': {'num_machines': 1, 'num_mpiprocs_per_machine': 24}, 'queue_name': 'devel', 'custom_scheduler_commands': '', 'max_wallclock_seconds': 60*60}) @@ -46,7 +47,7 @@ wf_para_scf = Dict(dict=wf_para_scf) -options_scf = Dict(dict={'resources': {"num_machines": 2, "num_mpiprocs_per_machine": 24}, +options_scf = Dict(dict={'resources': {'num_machines': 2, 'num_mpiprocs_per_machine': 24}, 'queue_name': 'devel', 'custom_scheduler_commands': '', 'max_wallclock_seconds': 60*60}) diff --git a/docs/source/user_guide/workflows/code/mae_conv_parameters.py b/docs/source/user_guide/workflows/code/mae_conv_parameters.py index 237473e10..79dd4f81b 100644 --- a/docs/source/user_guide/workflows/code/mae_conv_parameters.py +++ b/docs/source/user_guide/workflows/code/mae_conv_parameters.py @@ -1,2 +1,3 @@ +# -*- coding: utf-8 -*- 'sqas': {'label': [0.0, 0.0]}, # sets theta, phi pairs to calculate 'soc_off': [] # a list of atom labels to switch off SOC term diff --git a/docs/source/user_guide/workflows/code/mae_conv_wc_submission.py b/docs/source/user_guide/workflows/code/mae_conv_wc_submission.py index 0cd2cc55b..9ac30af29 100644 --- a/docs/source/user_guide/workflows/code/mae_conv_wc_submission.py +++ b/docs/source/user_guide/workflows/code/mae_conv_wc_submission.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from aiida.orm import load_node, Dict from aiida.engine import submit @@ -11,7 +12,7 @@ 'soc_off': []}) -options = Dict(dict={'resources': {"num_machines": 1, "num_mpiprocs_per_machine": 24}, +options = Dict(dict={'resources': {'num_machines': 1, 'num_mpiprocs_per_machine': 24}, 'queue_name': 'devel', 'custom_scheduler_commands': '', 'max_wallclock_seconds': 60*60}) @@ -39,7 +40,7 @@ wf_para_scf = Dict(dict=wf_para_scf) -options_scf = Dict(dict={'resources': {"num_machines": 2, "num_mpiprocs_per_machine": 24}, +options_scf = Dict(dict={'resources': {'num_machines': 2, 'num_mpiprocs_per_machine': 24}, 'queue_name': 'devel', 'custom_scheduler_commands': '', 'max_wallclock_seconds': 60*60}) diff --git a/docs/source/user_guide/workflows/code/mae_parameters.py b/docs/source/user_guide/workflows/code/mae_parameters.py index 13f3e5812..611776c9e 100644 --- a/docs/source/user_guide/workflows/code/mae_parameters.py +++ b/docs/source/user_guide/workflows/code/mae_parameters.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- 'sqa_ref': [0.7, 0.7], # sets theta and phi for the reference calc 'use_soc_ref': False, # True if reference calc should use SOC terms 'sqas_theta': [0.0, 1.57079, 1.57079], # a list of theta values for the FT diff --git a/docs/source/user_guide/workflows/code/mae_wc_submission.py b/docs/source/user_guide/workflows/code/mae_wc_submission.py index 438ea1238..c0b2ba2fe 100644 --- a/docs/source/user_guide/workflows/code/mae_wc_submission.py +++ b/docs/source/user_guide/workflows/code/mae_wc_submission.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from aiida.orm import load_node, Dict from aiida.engine import submit @@ -16,7 +17,7 @@ 'inpxml_changes': [], }) -options = Dict(dict={'resources': {"num_machines": 1, "num_mpiprocs_per_machine": 24}, +options = Dict(dict={'resources': {'num_machines': 1, 'num_mpiprocs_per_machine': 24}, 'queue_name': 'devel', 'custom_scheduler_commands': '', 'max_wallclock_seconds': 60*60}) @@ -44,7 +45,7 @@ wf_para_scf = Dict(dict=wf_para_scf) -options_scf = Dict(dict={'resources': {"num_machines": 2, "num_mpiprocs_per_machine": 24}, +options_scf = Dict(dict={'resources': {'num_machines': 2, 'num_mpiprocs_per_machine': 24}, 'queue_name': 'devel', 'custom_scheduler_commands': '', 'max_wallclock_seconds': 60*60}) diff --git a/docs/source/user_guide/workflows/code/relax_parameters.py b/docs/source/user_guide/workflows/code/relax_parameters.py index 0418b00e8..18d1a44c4 100644 --- a/docs/source/user_guide/workflows/code/relax_parameters.py +++ b/docs/source/user_guide/workflows/code/relax_parameters.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- 'film_distance_relaxation': False, # if True, sets relaxXYZ="FFT" for all atoms 'force_criterion': 0.049, # Sets the threshold of the largest force 'relax_iter': 5 # Maximum number of optimization iterations diff --git a/docs/source/user_guide/workflows/code/relax_submission.py b/docs/source/user_guide/workflows/code/relax_submission.py index 50ff27105..a84deff8a 100644 --- a/docs/source/user_guide/workflows/code/relax_submission.py +++ b/docs/source/user_guide/workflows/code/relax_submission.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from aiida.orm import load_node, Dict from aiida.engine import submit @@ -49,9 +50,8 @@ calc_relax = Dict(dict=calc_relax) -options_relax = {'resources': {"num_machines": 1, "num_mpiprocs_per_machine": 4, "num_cores_per_mpiproc": 6}, +options_relax = {'resources': {'num_machines': 1, 'num_mpiprocs_per_machine': 4, 'num_cores_per_mpiproc': 6}, 'queue_name': 'devel', - 'environment_variables': {'OMP_NUM_THREADS': '6'}, 'custom_scheduler_commands': '', 'max_wallclock_seconds': 1*60*60} diff --git a/docs/source/user_guide/workflows/code/scf_parameters.py b/docs/source/user_guide/workflows/code/scf_parameters.py index 944559093..66dafc1f1 100644 --- a/docs/source/user_guide/workflows/code/scf_parameters.py +++ b/docs/source/user_guide/workflows/code/scf_parameters.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- 'fleur_runmax': 4, # Maximum number of fleur jobs/starts 'density_converged': 0.00002, # Charge density convergence criterion 'energy_converged': 0.002, # Total energy convergence criterion @@ -9,4 +10,3 @@ 'forcealpha': 0.5, 'forcemix': 'BFGS'}, 'inpxml_changes': [], # Modifications to inp.xml - diff --git a/docs/source/user_guide/workflows/code/scf_wc_outputnode.py b/docs/source/user_guide/workflows/code/scf_wc_outputnode.py index c897591a9..0d85a136f 100644 --- a/docs/source/user_guide/workflows/code/scf_wc_outputnode.py +++ b/docs/source/user_guide/workflows/code/scf_wc_outputnode.py @@ -1,30 +1,31 @@ +# -*- coding: utf-8 -*- { - "conv_mode": "density", - "distance_charge": 0.1406279038, - "distance_charge_all": [ + 'conv_mode': 'density', + 'distance_charge': 0.1406279038, + 'distance_charge_all': [ 61.1110641131, 43.7556515683, ... ], - "distance_charge_units": "me/bohr^3", - "errors": [], - "force_diff_last": "can not be determined", - "force_largest": 0.0, - "info": [], - "iterations_total": 23, - "last_calc_uuid": "b20b5b94-5d80-41a8-82bf-b4d8eee9bddc", - "loop_count": 1, - "material": "FePt2", - "total_energy": -38166.176928494, - "total_energy_all": [ + 'distance_charge_units': 'me/bohr^3', + 'errors': [], + 'force_diff_last': 'can not be determined', + 'force_largest': 0.0, + 'info': [], + 'iterations_total': 23, + 'last_calc_uuid': 'b20b5b94-5d80-41a8-82bf-b4d8eee9bddc', + 'loop_count': 1, + 'material': 'FePt2', + 'total_energy': -38166.176928494, + 'total_energy_all': [ -38166.542950054, -38166.345602746, ... ], - "total_energy_units": "Htr", - "total_wall_time": 245, - "total_wall_time_units": "s", - "warnings": [], - "workflow_name": "FleurScfWorkChain", - "workflow_version": "0.4.0" + 'total_energy_units': 'Htr', + 'total_wall_time': 245, + 'total_wall_time_units': 's', + 'warnings': [], + 'workflow_name': 'FleurScfWorkChain', + 'workflow_version': '0.4.0' } diff --git a/docs/source/user_guide/workflows/code/scf_wc_submission.py b/docs/source/user_guide/workflows/code/scf_wc_submission.py index 281bec401..e545c5a54 100644 --- a/docs/source/user_guide/workflows/code/scf_wc_submission.py +++ b/docs/source/user_guide/workflows/code/scf_wc_submission.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from aiida_fleur.workflows.scf import FleurScfWorkChain from aiida.orm import Dict, load_node @@ -11,7 +12,7 @@ 'itmax_per_run': 30, 'serial': False}) -options = Dict(dict={'resources': {"num_machines": 1, "num_mpiprocs_per_machine": 2}, +options = Dict(dict={'resources': {'num_machines': 1, 'num_mpiprocs_per_machine': 2}, 'withmpi': True, 'max_wallclock_seconds': 600}) diff --git a/docs/source/user_guide/workflows/code/ssdisp_conv_parameters.py b/docs/source/user_guide/workflows/code/ssdisp_conv_parameters.py index 344ec87dc..75635c816 100644 --- a/docs/source/user_guide/workflows/code/ssdisp_conv_parameters.py +++ b/docs/source/user_guide/workflows/code/ssdisp_conv_parameters.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- 'beta': {'all': 1.57079}, # see the description below 'q_vectors': {'label': [0.0, 0.0, 0.0], # sets q_points to calculate 'label2': [0.125, 0.0, 0.0] diff --git a/docs/source/user_guide/workflows/code/ssdisp_conv_wc_submission.py b/docs/source/user_guide/workflows/code/ssdisp_conv_wc_submission.py index 9d1badb9c..37579fb78 100644 --- a/docs/source/user_guide/workflows/code/ssdisp_conv_wc_submission.py +++ b/docs/source/user_guide/workflows/code/ssdisp_conv_wc_submission.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from aiida.orm import load_node, Dict from aiida.engine import submit @@ -14,7 +15,7 @@ }) -options = Dict(dict={'resources': {"num_machines": 1, "num_mpiprocs_per_machine": 24}, +options = Dict(dict={'resources': {'num_machines': 1, 'num_mpiprocs_per_machine': 24}, 'queue_name': 'devel', 'custom_scheduler_commands': '', 'max_wallclock_seconds': 60*60}) @@ -42,7 +43,7 @@ wf_para_scf = Dict(dict=wf_para_scf) -options_scf = Dict(dict={'resources': {"num_machines": 2, "num_mpiprocs_per_machine": 24}, +options_scf = Dict(dict={'resources': {'num_machines': 2, 'num_mpiprocs_per_machine': 24}, 'queue_name': 'devel', 'custom_scheduler_commands': '', 'max_wallclock_seconds': 60*60}) diff --git a/docs/source/user_guide/workflows/code/ssdisp_parameters.py b/docs/source/user_guide/workflows/code/ssdisp_parameters.py index 38c3e0ebe..f05e510a7 100644 --- a/docs/source/user_guide/workflows/code/ssdisp_parameters.py +++ b/docs/source/user_guide/workflows/code/ssdisp_parameters.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- 'beta': {'all': 1.57079}, # see description below 'prop_dir': [1.0, 0.0, 0.0], # sets a propagation direction of a q-vector 'q_vectors': [[0.0, 0.0, 0.0], # set a set of q-vectors to calculate SSDispersion diff --git a/docs/source/user_guide/workflows/code/ssdisp_wc_submission.py b/docs/source/user_guide/workflows/code/ssdisp_wc_submission.py index 9fbd1fd47..ec04d6d24 100644 --- a/docs/source/user_guide/workflows/code/ssdisp_wc_submission.py +++ b/docs/source/user_guide/workflows/code/ssdisp_wc_submission.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from aiida.orm import load_node, Dict from aiida.engine import submit @@ -19,7 +20,7 @@ 'serial': False }) -options = Dict(dict={'resources': {"num_machines": 1, "num_mpiprocs_per_machine": 24}, +options = Dict(dict={'resources': {'num_machines': 1, 'num_mpiprocs_per_machine': 24}, 'queue_name': 'devel', 'custom_scheduler_commands': '', 'max_wallclock_seconds': 60*60}) @@ -47,7 +48,7 @@ wf_para_scf = Dict(dict=wf_para_scf) -options_scf = Dict(dict={'resources': {"num_machines": 2, "num_mpiprocs_per_machine": 24}, +options_scf = Dict(dict={'resources': {'num_machines': 2, 'num_mpiprocs_per_machine': 24}, 'queue_name': 'devel', 'custom_scheduler_commands': '', 'max_wallclock_seconds': 60*60}) diff --git a/docs/source/user_guide/workflows/code/tutorial_submit_eos.py b/docs/source/user_guide/workflows/code/tutorial_submit_eos.py index cf18c412f..cdcedca22 100644 --- a/docs/source/user_guide/workflows/code/tutorial_submit_eos.py +++ b/docs/source/user_guide/workflows/code/tutorial_submit_eos.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from aiida_fleur.workflows.ssdisp import FleurSSDispWorkChain from aiida.orm import Dict, load_node @@ -19,11 +20,11 @@ }) -options_scf = Dict(dict={'resources': {"num_machines": 1, "num_mpiprocs_per_machine": 8}, +options_scf = Dict(dict={'resources': {'num_machines': 1, 'num_mpiprocs_per_machine': 8}, 'queue_name': 'devel', 'custom_scheduler_commands': '', 'max_wallclock_seconds': 60*60}) - + inputs = {'scf': { 'wf_parameters': wf_para_scf, 'calc_parameters': parameters, diff --git a/docs/source/user_guide/workflows/corehole_wc.rst b/docs/source/user_guide/workflows/corehole_wc.rst index 39415ab7e..d00be9525 100644 --- a/docs/source/user_guide/workflows/corehole_wc.rst +++ b/docs/source/user_guide/workflows/corehole_wc.rst @@ -3,10 +3,6 @@ Fleur core-hole workflow ------------------------ -.. warning:: - - This workchain does not work with AiiDA 1.1.0 version yet. They need to be updated. - Class name, import from: :: @@ -83,4 +79,4 @@ Output node example Error handling ^^^^^^^^^^^^^^ - Still has to be documented \ No newline at end of file + Still has to be documented diff --git a/docs/source/user_guide/workflows/create_magnetic_wc.rst b/docs/source/user_guide/workflows/create_magnetic_wc.rst index 5319e90dd..d06e3cbe9 100644 --- a/docs/source/user_guide/workflows/create_magnetic_wc.rst +++ b/docs/source/user_guide/workflows/create_magnetic_wc.rst @@ -78,21 +78,26 @@ The FleurCreateMagneticWorkChain employs `exposed`_ feature of the AiiDA-core, thus inputs for the :ref:`EOS` and :ref:`relaxation` workchains should be passed in the namespaces ``eos`` and ``relax`` correspondingly (see :ref:`example of usage`). - -+---------------------+-------------------------------------+-------------------------------------+----------+ -| name | type | description | required | -+=====================+=====================================+=====================================+==========+ -| eos | namespace | inputs for nested EOS WC | no | -+---------------------+-------------------------------------+-------------------------------------+----------+ -| relax | namespace | inputs for nested Relax WC | no | -+---------------------+-------------------------------------+-------------------------------------+----------+ -| wf_parameters | :py:class:`~aiida.orm.Dict` | Settings of the workchain | no | -+---------------------+-------------------------------------+-------------------------------------+----------+ -| eos_output | :py:class:`~aiida.orm.Dict` | :ref:`EOS` output dictionary| no | -+---------------------+-------------------------------------+-------------------------------------+----------+ -| optimized_structure | :py:class:`~aiida.orm.StructureData`| relaxed film structure | no | -+---------------------+-------------------------------------+-------------------------------------+----------+ - +Please note that the `structure` input node +is excluded from the EOS namespace and from the Relax SCF namespace +since corresponding input structures are created within the CreateMagnetic workchain. + ++---------------------+-------------------------------------+--------------------------------------------------------------------------------------+----------+ +| name | type | description | required | ++=====================+=====================================+======================================================================================+==========+ +| eos | namespace | inputs for nested EOS WC. structure input is excluded. | no | ++---------------------+-------------------------------------+--------------------------------------------------------------------------------------+----------+ +| relax | namespace | inputs for nested Relax WC. structure input of SCF sub-namespace is excluded | no | ++---------------------+-------------------------------------+--------------------------------------------------------------------------------------+----------+ +| wf_parameters | :py:class:`~aiida.orm.Dict` | Settings of the workchain | no | ++---------------------+-------------------------------------+--------------------------------------------------------------------------------------+----------+ +| eos_output | :py:class:`~aiida.orm.Dict` | :ref:`EOS` output dictionary | no | ++---------------------+-------------------------------------+--------------------------------------------------------------------------------------+----------+ +| optimized_structure | :py:class:`~aiida.orm.StructureData`| relaxed film structure | no | ++---------------------+-------------------------------------+--------------------------------------------------------------------------------------+----------+ +| distance_suggestion | :py:class:`~aiida.orm.StructureData`| interatomic distance suggestion, output of | no | +| | | py:method:`~aiida_fleur.tools.StructureData_util.request_average_bond_length_store()`| | ++---------------------+-------------------------------------+--------------------------------------------------------------------------------------+----------+ Similarly to other workchains, FleurCreateMagneticWorkChain behaves @@ -128,19 +133,21 @@ input combinations that implicitly define the workchain layout. **eos**, **relax **optimized_structure** and **eos_output** are analysed. Depending on the given setup of the inputs, one of four supported scenarios will happen: -1. **eos** + **relax**: +1. **eos** + **relax** + **distance_suggestion**: The EOS will be used to calculate the equilibrium structure of the substrate, then Relax WC will be used to relax the interlayer distances. Finally, the non-symmetrical magnetic structure will be created. A good choice if there is nothing - to begin with. + to begin with. **distance_suggestion** will be used to guess a better starting interlayer + distances before submitting Relax WC. -2. **eos_output** + **relax**: +2. **eos_output** + **relax** + **distance_suggestion**: The equilibrium substrate structure will be extracted from the **eos_output**, then Relax WC will be used to relax the interlayer distances. Finally, the non-symmetrical magnetic structure will be created. A good choice if EOS was previously done - for the substrate. + for the substrate. **distance_suggestion** will be used to guess a better starting interlayer + distances before submitting Relax WC. 3. **optimized_structure**: @@ -174,6 +181,8 @@ A list of implemented :ref:`exit codes`: +------+------------------------------------------------------------------------------------------+ | 382 | Relaxation calculation failed. | +------+------------------------------------------------------------------------------------------+ +| 383 | EOS WorkChain failed. | ++------+------------------------------------------------------------------------------------------+ .. _example_use_create_magnetic: diff --git a/docs/source/user_guide/workflows/dmi_wc.rst b/docs/source/user_guide/workflows/dmi_wc.rst index 8b23c8bd0..abae448d1 100644 --- a/docs/source/user_guide/workflows/dmi_wc.rst +++ b/docs/source/user_guide/workflows/dmi_wc.rst @@ -172,7 +172,7 @@ to:
As you can see, I was careful about "Ir-2" specie and it contained a single atom with a -label 458. +label 458. Please also refer to :ref:`setting_labels` section to learn how to set labels up. **sqas_theta** and **sqas_phi** are python lists that set SOC theta and phi values. diff --git a/docs/source/user_guide/workflows/dos_band_wc.rst b/docs/source/user_guide/workflows/dos_band_wc.rst index 6f0af823a..97d3da593 100644 --- a/docs/source/user_guide/workflows/dos_band_wc.rst +++ b/docs/source/user_guide/workflows/dos_band_wc.rst @@ -5,11 +5,11 @@ Fleur dos/band workflows .. warning:: - These workchains do not work with AiiDA 1.1.0 version yet. They need to be updated. + These workchains do not work with AiiDA 1.1.1 version yet. They need to be updated. These are two seperate workflows which are pretty similar so we treat them here together -* **Class**: :py:class:`~aiida_fleur.workflows.dos.fleur_dos_wc` and :py:class:`~aiida_fleur.workflows.band.fleur_band_wc` +* **Class**: :py:class:`~aiida_fleur.workflows.dos.fleur_dos_wc` and :py:class:`~aiida_fleur.workflows.band.FleurBandWorkChain` * **String to pass to the** :py:func:`~aiida.plugins.WorkflowFactory`: ``fleur.dos``, ``fleur.band`` * **Workflow type**: Workflow (lv 1) * **Aim**: Calculate a density of states. Calculate a Band structure. @@ -28,7 +28,7 @@ Import Example: #or WorkflowFactory('fleur.dos') - from aiida_fleur.workflows.band import fleur_band_wc + from aiida_fleur.workflows.band import FleurBandWorkChain #or WorkflowFactory('fleur.band') @@ -159,4 +159,4 @@ Error handling ^^^^^^^^^^^^^^ Still has to be documented - Warning if parent calculation was not converged. \ No newline at end of file + Warning if parent calculation was not converged. diff --git a/docs/source/user_guide/workflows/eos_wc.rst b/docs/source/user_guide/workflows/eos_wc.rst index efb336b99..3ef985197 100644 --- a/docs/source/user_guide/workflows/eos_wc.rst +++ b/docs/source/user_guide/workflows/eos_wc.rst @@ -39,17 +39,19 @@ Input nodes The :py:class:`~aiida_fleur.workflows.eos.FleurEosWorkChain` employs `exposed`_ feature of the AiiDA-core, thus inputs for the :ref:`SCF` sub-workchain should be passed in the namespace called -``scf`` (see :ref:`example of usage`). - -+-----------------+--------------------------------------+-------------------------------------+----------+ -| name | type | description | required | -+=================+======================================+=====================================+==========+ -| scf | namespace | inputs for nested SCF WorkChain | no | -+-----------------+--------------------------------------+-------------------------------------+----------+ -| wf_parameters | :py:class:`~aiida.orm.Dict` | Settings of the workchain | no | -+-----------------+--------------------------------------+-------------------------------------+----------+ -| structure | :py:class:`~aiida.orm.StructureData` | input structure | no | -+-----------------+--------------------------------------+-------------------------------------+----------+ +``scf`` (see :ref:`example of usage`). Please note that the `structure` input node +is excluded from the `scf` namespace since the EOS workchain should process input structure before +performing energy calculations. + ++-----------------+--------------------------------------+------------------------------------------------------------------+----------+ +| name | type | description | required | ++=================+======================================+==================================================================+==========+ +| scf | namespace | inputs for nested SCF WorkChain. structure input is excluded | no | ++-----------------+--------------------------------------+------------------------------------------------------------------+----------+ +| wf_parameters | :py:class:`~aiida.orm.Dict` | Settings of the workchain | no | ++-----------------+--------------------------------------+------------------------------------------------------------------+----------+ +| structure | :py:class:`~aiida.orm.StructureData` | input structure | no | ++-----------------+--------------------------------------+------------------------------------------------------------------+----------+ Returns nodes ^^^^^^^^^^^^^ diff --git a/docs/source/user_guide/workflows/initial_cls_wc.rst b/docs/source/user_guide/workflows/initial_cls_wc.rst index 96b4a3033..8b7a86595 100644 --- a/docs/source/user_guide/workflows/initial_cls_wc.rst +++ b/docs/source/user_guide/workflows/initial_cls_wc.rst @@ -5,9 +5,6 @@ Fleur initial core-level shifts workflow ---------------------------------------- -.. warning:: - - This workchain does not work with AiiDA 1.1.0 version yet. They need to be updated. Class name, import from: :: @@ -114,4 +111,4 @@ Output node example Error handling ^^^^^^^^^^^^^^ - Still has to be documented \ No newline at end of file + Still has to be documented diff --git a/docs/source/user_guide/workflows/mae_conv_wc.rst b/docs/source/user_guide/workflows/mae_conv_wc.rst index a3b8dd602..e1a5fc471 100644 --- a/docs/source/user_guide/workflows/mae_conv_wc.rst +++ b/docs/source/user_guide/workflows/mae_conv_wc.rst @@ -116,7 +116,7 @@ to: As you can see, I was careful about "Ir-2" specie and it contained a single atom with a -label 458. +label 458. Please also refer to :ref:`setting_labels` section to learn how to set labels up. **sqas** is a python dictionary (``key: value`` pairs). The ``key`` can be any string which sets a label of the SQA. ``value`` must be a list of 2 values: ``[theta, phi]``. diff --git a/docs/source/user_guide/workflows/mae_wc.rst b/docs/source/user_guide/workflows/mae_wc.rst index 2905f4115..ff4b6028b 100644 --- a/docs/source/user_guide/workflows/mae_wc.rst +++ b/docs/source/user_guide/workflows/mae_wc.rst @@ -132,7 +132,7 @@ to: As you can see, I was careful about "Ir-2" specie and it contained a single atom with a -label 458. +label 458. Please also refer to :ref:`setting_labels` section to learn how to set labels up. **sqas_theta** and **sqas_phi** are python lists that set SOC theta and phi values. diff --git a/docs/source/user_guide/workflows/relax_wc.rst b/docs/source/user_guide/workflows/relax_wc.rst index 2f5c3fb75..244dbbe10 100644 --- a/docs/source/user_guide/workflows/relax_wc.rst +++ b/docs/source/user_guide/workflows/relax_wc.rst @@ -111,19 +111,21 @@ Error handling ^^^^^^^^^^^^^^ A list of implemented exit codes: -+------+--------------------------------------------------------------------------+ -| Code | Meaning | -+------+--------------------------------------------------------------------------+ -| 230 | Input nodes do not correspond to any valid input configuration. | -+------+--------------------------------------------------------------------------+ -| 350 | Optimization cycle did not lead to convergence of forces | -+------+--------------------------------------------------------------------------+ -| 351 | SCF Workchains failed for some reason. | -+------+--------------------------------------------------------------------------+ -| 352 | Found no SCF output. | -+------+--------------------------------------------------------------------------+ -| 354 | Found no fleurinpData in the last SCF workchain | -+------+--------------------------------------------------------------------------+ ++-----------+---------------------------------------------------------- +| Code | Meaning | ++-----------+---------------------------------------------------------- +| 350 | The workchain execution did not lead to | +| | relaxation criterion. Thrown in the very | +| | end of the workchain. | ++-----------+---------------------------------------------------------+ +| 351 | SCF Workchains failed for some reason. | ++-----------+---------------------------------------------------------+ +| 352 | Found no relaxed structure info in the output of SCF | ++-----------+---------------------------------------------------------+ +| 353 | Found no SCF output | ++-----------+---------------------------------------------------------+ +| 354 | Force is small, switch to BFGS | ++-----------+---------------------------------------------------------+ Exit codes duplicating FleurCalculation exit codes: diff --git a/examples/benchmarks/bench.py b/examples/benchmarks/bench.py index 8fd7fc1e4..d59bc1838 100644 --- a/examples/benchmarks/bench.py +++ b/examples/benchmarks/bench.py @@ -3,12 +3,10 @@ from __future__ import absolute_import from __future__ import print_function -__copyright__ = (u"Copyright (c), 2018, Forschungszentrum Jülich GmbH, " -from aiida_fleur.data.fleurinp import FleurinpData - "IAS-1/PGI-1, Germany. All rights reserved.") -__license__ = "MIT license, see LICENSE.txt file" -__version__ = "0.27" -__contributors__ = "Jens Broeder" +__copyright__ = (u'Copyright (c), 2018, Forschungszentrum Jülich GmbH, ' 'IAS-1/PGI-1, Germany. All rights reserved.') +__license__ = 'MIT license, see LICENSE.txt file' +__version__ = '0.27' +__contributors__ = 'Jens Broeder' from aiida import load_dbenv, is_dbenv_loaded if not is_dbenv_loaded(): @@ -23,20 +21,18 @@ from aiida_fleur.workflows.scf import FleurScfWorkChain from aiida.engine.run import submit from aiida.engine.calculation.job import CalcJob - +from aiida_fleur_data.fleurinp import FleurinpData ParameterData = DataFactory('parameter') # get code # look in benchmark.jason # if no benchmark: print('No benchmarks definded in benchmark.jason for computer {}.) # run the benchmarks, ggf think about input selection - code = 'fleur_mpi_v0.28@claix' code_node = test_and_get_code(code, 'fleur.fleur') - def run_fleur_benchmark(code, inp_files_folder_path_list, wf_para_base_dict_list): """ Executes fleur_scf_wcs for every path given in the inp_files_folder_path_list. @@ -69,30 +65,33 @@ def run_fleur_benchmark(code, inp_files_folder_path_list, wf_para_base_dict_list inpfiles.append(os.path.join(path, name)) if inpfiles: fleurinp = FleurinpData(files=inpfiles) - structure = fleurinp.get_structuredata_nwf()#fleurinp) + structure = fleurinp.get_structuredata_nwf() #fleurinp) formula = structure.get_formula() else: - print(("No files found in {}".format(path))) + print(('No files found in {}'.format(path))) continue scf_para = wf_para_base_dict_list[i] print(scf_para) label = 'fleur_scf_benchmark_run_{}'.format(formula) description = 'Fleur benchmark run on system {} with resources {}'.format(formula, scf_para['resources']) print(('submitting {}'.format(label))) - res = submit(FleurScfWorkChain, wf_parameters=Dict(dict=scf_para), fleurinp=fleurinp, fleur=code_node, _label=label, _description=description) + res = submit(FleurScfWorkChain, + wf_parameters=Dict(dict=scf_para), + fleurinp=fleurinp, + fleur=code_node, + _label=label, + _description=description) all_res.append(res) return all_res + # TODO: set path, or use some scheme for finding the files basepath = '../inp_xml_files/benchmarks/' basepath = os.path.abspath(basepath) -benchmark_system = ['fleur_big_TiO', - 'fleur_big_TiO2', - 'fleur_mid_CuAg', - 'fleur_mid_GaAs', - 'fleur_small_AuAg', - 'fleur_tiny_NaCl'] +benchmark_system = [ + 'fleur_big_TiO', 'fleur_big_TiO2', 'fleur_mid_CuAg', 'fleur_mid_GaAs', 'fleur_small_AuAg', 'fleur_tiny_NaCl' +] bench_res_file = './fleur_benchmark_resources.json' rf = open(bench_res_file, 'r') @@ -100,21 +99,18 @@ def run_fleur_benchmark(code, inp_files_folder_path_list, wf_para_base_dict_list rf.close() # scf parameter node, change fleur_runmax and itmax_per_run to run several iterations and converge the calculation. -wf_para_base_benchmark = {'fleur_runmax' : 1, - 'density_criterion' : 0.00001, - 'itmax_per_run' : 1, - 'serial' : False} - # 'options' : { - # 'resources': {"num_machines": 1}, - ## 'walltime_sec': 60*60, - # 'queue_name': '', - # 'custom_scheduler_commands' : '', - # 'max_memory_kb' : None, - # 'import_sys_environment' : False, - # 'environment_variables' : {}}, - # 'serial' : False, - # 'itmax_per_run' : 30, - # 'inpxml_changes' : [], +wf_para_base_benchmark = {'fleur_runmax': 1, 'density_criterion': 0.00001, 'itmax_per_run': 1, 'serial': False} +# 'options' : { +# 'resources': {"num_machines": 1}, +## 'walltime_sec': 60*60, +# 'queue_name': '', +# 'custom_scheduler_commands' : '', +# 'max_memory_kb' : None, +# 'import_sys_environment' : False, +# 'environment_variables' : {}}, +# 'serial' : False, +# 'itmax_per_run' : 30, +# 'inpxml_changes' : [], # select the systems to run # TODO maybe from input systems_to_run = benchmark_system[-2:-1] @@ -133,9 +129,9 @@ def run_fleur_benchmark(code, inp_files_folder_path_list, wf_para_base_dict_list if not sys_res: print(('INPUT VALIDATION WARNING: No benchmark to run on computer "{}" for system "{}"'.format(clabel, system))) continue - benchmark_system_folder = os.path.join(basepath, system +'/input_files/') + benchmark_system_folder = os.path.join(basepath, system + '/input_files/') - hpc_res = sys_res.get('resources') + hpc_res = sys_res.get('resources') benchmark_system_folders_list, wf_para_benchmark_list = [], [] # so far we assume that the lists for resources, walltime and scheduler commands have the same length diff --git a/examples/benchmarks/fleur_benchmark_resources.json b/examples/benchmarks/fleur_benchmark_resources.json index 121f98f63..d39043fd8 100644 --- a/examples/benchmarks/fleur_benchmark_resources.json +++ b/examples/benchmarks/fleur_benchmark_resources.json @@ -1 +1 @@ -{"fleur_big_TiO2": {"jureca": {"queue_name": "", "custom_scheduler_commands": ["#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi"], "max_memory_kb": [30000000, 30000000, 30000000, 30000000], "environment_variables": [{"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}], "walltime_sec": [36000, 36000, 36000, 36000], "resources": [{"tot_num_mpiprocs": 64}, {"tot_num_mpiprocs": 128}, {"tot_num_mpiprocs": 256}, {"tot_num_mpiprocs": 512}]}, "claix": {"queue_name": "", "custom_scheduler_commands": ["#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi"], "max_memory_kb": [30000000, 30000000, 30000000, 30000000], "environment_variables": [{"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}], "walltime_sec": [36000, 36000, 36000, 36000], "resources": [{"tot_num_mpiprocs": 64}, {"tot_num_mpiprocs": 128}, {"tot_num_mpiprocs": 256}, {"tot_num_mpiprocs": 512}]}}, "fleur_small_AuAg": {"claix_knl": {"queue_name": "", "custom_scheduler_commands": ["#BSUB -R \"span[ptile=16]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=16]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=16]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=16]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi"], "max_memory_kb": [1600, 800, 400, 200], "environment_variables": [{"OMP_NUM_THREADS": "4", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "4", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "4", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "4", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}], "walltime_sec": [3600, 3600, 3600, 3600], "resources": [{"tot_num_mpiprocs": 16}, {"tot_num_mpiprocs": 32}, {"tot_num_mpiprocs": 64}, {"tot_num_mpiprocs": 128}]}, "jureca": {"queue_name": "", "custom_scheduler_commands": ["#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi"], "max_memory_kb": [6400, 3200, 1600, 800], "environment_variables": [{"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}], "walltime_sec": [3600, 3600, 3600, 3600], "resources": [{"tot_num_mpiprocs": 4}, {"tot_num_mpiprocs": 8}, {"tot_num_mpiprocs": 16}, {"tot_num_mpiprocs": 32}]}, "claix": {"queue_name": "", "custom_scheduler_commands": ["#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi"], "max_memory_kb": [6400, 3200, 1600, 800], "environment_variables": [{"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}], "walltime_sec": [3600, 3600, 3600, 3600], "resources": [{"tot_num_mpiprocs": 4}, {"tot_num_mpiprocs": 8}, {"tot_num_mpiprocs": 16}, {"tot_num_mpiprocs": 32}]}, "jureca_boo": {"queue_name": "", "custom_scheduler_commands": ["#BSUB -R \"span[ptile=16]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=16]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=16]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=16]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi"], "max_memory_kb": [1600, 800, 400, 200], "environment_variables": [{"OMP_NUM_THREADS": "4", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "4", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "4", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "4", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}], "walltime_sec": [3600, 3600, 3600, 3600], "resources": [{"tot_num_mpiprocs": 16}, {"tot_num_mpiprocs": 32}, {"tot_num_mpiprocs": 64}, {"tot_num_mpiprocs": 128}]}}, "fleur_big_TiO": {"jureca": {"queue_name": "", "custom_scheduler_commands": ["#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi"], "max_memory_kb": [30000000, 30000000, 30000000, 30000000], "environment_variables": [{"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}], "walltime_sec": [36000, 36000, 36000, 36000], "resources": [{"tot_num_mpiprocs": 64}, {"tot_num_mpiprocs": 128}, {"tot_num_mpiprocs": 256}, {"tot_num_mpiprocs": 512}]}, "claix": {"queue_name": "", "custom_scheduler_commands": ["#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi"], "max_memory_kb": [30000000, 30000000, 30000000, 30000000], "environment_variables": [{"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}], "walltime_sec": [36000, 36000, 36000, 36000], "resources": [{"tot_num_mpiprocs": 64}, {"tot_num_mpiprocs": 128}, {"tot_num_mpiprocs": 256}, {"tot_num_mpiprocs": 512}]}}, "fleur_mid_GaAs": {"jureca": {"queue_name": "", "custom_scheduler_commands": ["#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi"], "max_memory_kb": [6400, 3200, 1600, 800, 400], "environment_variables": [{"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}], "walltime_sec": [3600, 3600, 3600, 3600, 3600], "resources": [{"tot_num_mpiprocs": 4}, {"tot_num_mpiprocs": 8}, {"tot_num_mpiprocs": 16}, {"tot_num_mpiprocs": 32}, {"tot_num_mpiprocs": 64}]}, "claix": {"queue_name": "", "custom_scheduler_commands": ["#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi"], "max_memory_kb": [6400, 3200, 1600, 800, 400], "environment_variables": [{"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}], "walltime_sec": [3600, 3600, 3600, 3600, 3600], "resources": [{"tot_num_mpiprocs": 4}, {"tot_num_mpiprocs": 8}, {"tot_num_mpiprocs": 16}, {"tot_num_mpiprocs": 32}, {"tot_num_mpiprocs": 64}]}}, "fleur_tiny_NaCl": {"claix_knl": {"queue_name": "", "custom_scheduler_commands": ["#BSUB -R \"span[ptile=16]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=16]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi"], "max_memory_kb": [1600, 800], "environment_variables": [{"OMP_NUM_THREADS": "4", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "4", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}], "walltime_sec": [600, 600], "resources": [{"tot_num_mpiprocs": 16}, {"tot_num_mpiprocs": 32}]}, "jureca": {"queue_name": "", "custom_scheduler_commands": ["#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi"], "max_memory_kb": [6400, 3200], "environment_variables": [{"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}], "walltime_sec": [600, 600], "resources": [{"tot_num_mpiprocs": 4}, {"tot_num_mpiprocs": 8}]}, "claix": {"queue_name": "", "custom_scheduler_commands": ["#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi"], "max_memory_kb": [6400, 3200], "environment_variables": [{"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}], "walltime_sec": [600, 600], "resources": [{"tot_num_mpiprocs": 4}, {"tot_num_mpiprocs": 8}]}, "jureca_boo": {"queue_name": "", "custom_scheduler_commands": ["#BSUB -R \"span[ptile=16]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=16]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi"], "max_memory_kb": [1600, 800], "environment_variables": [{"OMP_NUM_THREADS": "4", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "4", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}], "walltime_sec": [600, 600], "resources": [{"tot_num_mpiprocs": 16}, {"tot_num_mpiprocs": 32}]}}, "fleur_mid_CuAg": {"jureca": {"queue_name": "", "custom_scheduler_commands": ["#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi"], "max_memory_kb": [6400, 3200, 1600, 800, 400], "environment_variables": [{"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}], "walltime_sec": [3600, 3600, 3600, 3600, 3600], "resources": [{"tot_num_mpiprocs": 4}, {"tot_num_mpiprocs": 8}, {"tot_num_mpiprocs": 16}, {"tot_num_mpiprocs": 32}, {"tot_num_mpiprocs": 64}]}, "claix": {"queue_name": "", "custom_scheduler_commands": ["#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi"], "max_memory_kb": [6400, 3200, 1600, 800, 400], "environment_variables": [{"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}], "walltime_sec": [3600, 3600, 3600, 3600, 3600], "resources": [{"tot_num_mpiprocs": 4}, {"tot_num_mpiprocs": 8}, {"tot_num_mpiprocs": 16}, {"tot_num_mpiprocs": 32}, {"tot_num_mpiprocs": 64}]}}} \ No newline at end of file +{"fleur_big_TiO2": {"jureca": {"queue_name": "", "custom_scheduler_commands": ["#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi"], "max_memory_kb": [30000000, 30000000, 30000000, 30000000], "environment_variables": [{"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}], "walltime_sec": [36000, 36000, 36000, 36000], "resources": [{"tot_num_mpiprocs": 64}, {"tot_num_mpiprocs": 128}, {"tot_num_mpiprocs": 256}, {"tot_num_mpiprocs": 512}]}, "claix": {"queue_name": "", "custom_scheduler_commands": ["#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi"], "max_memory_kb": [30000000, 30000000, 30000000, 30000000], "environment_variables": [{"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}], "walltime_sec": [36000, 36000, 36000, 36000], "resources": [{"tot_num_mpiprocs": 64}, {"tot_num_mpiprocs": 128}, {"tot_num_mpiprocs": 256}, {"tot_num_mpiprocs": 512}]}}, "fleur_small_AuAg": {"claix_knl": {"queue_name": "", "custom_scheduler_commands": ["#BSUB -R \"span[ptile=16]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=16]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=16]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=16]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi"], "max_memory_kb": [1600, 800, 400, 200], "environment_variables": [{"OMP_NUM_THREADS": "4", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "4", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "4", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "4", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}], "walltime_sec": [3600, 3600, 3600, 3600], "resources": [{"tot_num_mpiprocs": 16}, {"tot_num_mpiprocs": 32}, {"tot_num_mpiprocs": 64}, {"tot_num_mpiprocs": 128}]}, "jureca": {"queue_name": "", "custom_scheduler_commands": ["#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi"], "max_memory_kb": [6400, 3200, 1600, 800], "environment_variables": [{"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}], "walltime_sec": [3600, 3600, 3600, 3600], "resources": [{"tot_num_mpiprocs": 4}, {"tot_num_mpiprocs": 8}, {"tot_num_mpiprocs": 16}, {"tot_num_mpiprocs": 32}]}, "claix": {"queue_name": "", "custom_scheduler_commands": ["#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi"], "max_memory_kb": [6400, 3200, 1600, 800], "environment_variables": [{"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}], "walltime_sec": [3600, 3600, 3600, 3600], "resources": [{"tot_num_mpiprocs": 4}, {"tot_num_mpiprocs": 8}, {"tot_num_mpiprocs": 16}, {"tot_num_mpiprocs": 32}]}, "jureca_boo": {"queue_name": "", "custom_scheduler_commands": ["#BSUB -R \"span[ptile=16]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=16]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=16]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=16]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi"], "max_memory_kb": [1600, 800, 400, 200], "environment_variables": [{"OMP_NUM_THREADS": "4", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "4", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "4", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "4", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}], "walltime_sec": [3600, 3600, 3600, 3600], "resources": [{"tot_num_mpiprocs": 16}, {"tot_num_mpiprocs": 32}, {"tot_num_mpiprocs": 64}, {"tot_num_mpiprocs": 128}]}}, "fleur_big_TiO": {"jureca": {"queue_name": "", "custom_scheduler_commands": ["#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi"], "max_memory_kb": [30000000, 30000000, 30000000, 30000000], "environment_variables": [{"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}], "walltime_sec": [36000, 36000, 36000, 36000], "resources": [{"tot_num_mpiprocs": 64}, {"tot_num_mpiprocs": 128}, {"tot_num_mpiprocs": 256}, {"tot_num_mpiprocs": 512}]}, "claix": {"queue_name": "", "custom_scheduler_commands": ["#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi"], "max_memory_kb": [30000000, 30000000, 30000000, 30000000], "environment_variables": [{"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}], "walltime_sec": [36000, 36000, 36000, 36000], "resources": [{"tot_num_mpiprocs": 64}, {"tot_num_mpiprocs": 128}, {"tot_num_mpiprocs": 256}, {"tot_num_mpiprocs": 512}]}}, "fleur_mid_GaAs": {"jureca": {"queue_name": "", "custom_scheduler_commands": ["#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi"], "max_memory_kb": [6400, 3200, 1600, 800, 400], "environment_variables": [{"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}], "walltime_sec": [3600, 3600, 3600, 3600, 3600], "resources": [{"tot_num_mpiprocs": 4}, {"tot_num_mpiprocs": 8}, {"tot_num_mpiprocs": 16}, {"tot_num_mpiprocs": 32}, {"tot_num_mpiprocs": 64}]}, "claix": {"queue_name": "", "custom_scheduler_commands": ["#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi"], "max_memory_kb": [6400, 3200, 1600, 800, 400], "environment_variables": [{"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}], "walltime_sec": [3600, 3600, 3600, 3600, 3600], "resources": [{"tot_num_mpiprocs": 4}, {"tot_num_mpiprocs": 8}, {"tot_num_mpiprocs": 16}, {"tot_num_mpiprocs": 32}, {"tot_num_mpiprocs": 64}]}}, "fleur_tiny_NaCl": {"claix_knl": {"queue_name": "", "custom_scheduler_commands": ["#BSUB -R \"span[ptile=16]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=16]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi"], "max_memory_kb": [1600, 800], "environment_variables": [{"OMP_NUM_THREADS": "4", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "4", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}], "walltime_sec": [600, 600], "resources": [{"tot_num_mpiprocs": 16}, {"tot_num_mpiprocs": 32}]}, "jureca": {"queue_name": "", "custom_scheduler_commands": ["#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi"], "max_memory_kb": [6400, 3200], "environment_variables": [{"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}], "walltime_sec": [600, 600], "resources": [{"tot_num_mpiprocs": 4}, {"tot_num_mpiprocs": 8}]}, "claix": {"queue_name": "", "custom_scheduler_commands": ["#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi"], "max_memory_kb": [6400, 3200], "environment_variables": [{"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}], "walltime_sec": [600, 600], "resources": [{"tot_num_mpiprocs": 4}, {"tot_num_mpiprocs": 8}]}, "jureca_boo": {"queue_name": "", "custom_scheduler_commands": ["#BSUB -R \"span[ptile=16]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=16]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi"], "max_memory_kb": [1600, 800], "environment_variables": [{"OMP_NUM_THREADS": "4", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "4", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}], "walltime_sec": [600, 600], "resources": [{"tot_num_mpiprocs": 16}, {"tot_num_mpiprocs": 32}]}}, "fleur_mid_CuAg": {"jureca": {"queue_name": "", "custom_scheduler_commands": ["#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi"], "max_memory_kb": [6400, 3200, 1600, 800, 400], "environment_variables": [{"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}], "walltime_sec": [3600, 3600, 3600, 3600, 3600], "resources": [{"tot_num_mpiprocs": 4}, {"tot_num_mpiprocs": 8}, {"tot_num_mpiprocs": 16}, {"tot_num_mpiprocs": 32}, {"tot_num_mpiprocs": 64}]}, "claix": {"queue_name": "", "custom_scheduler_commands": ["#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi", "#BSUB -R \"span[ptile=4]\" \n#BSUB -x \n#BSUB -P jara0161 \n#BSUB -a intelmpi"], "max_memory_kb": [6400, 3200, 1600, 800, 400], "environment_variables": [{"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}, {"OMP_NUM_THREADS": "6", "I_MPI_PIN": "on", "OMP_PROC_BIND": "spread", "OMP_PLACES": "cores"}], "walltime_sec": [3600, 3600, 3600, 3600, 3600], "resources": [{"tot_num_mpiprocs": 4}, {"tot_num_mpiprocs": 8}, {"tot_num_mpiprocs": 16}, {"tot_num_mpiprocs": 32}, {"tot_num_mpiprocs": 64}]}}} diff --git a/examples/inp_xml_files/NiO_ldauXML/files/NiO b/examples/inp_xml_files/NiO_ldauXML/files/NiO index f4bfeba41..36d0e0995 100644 --- a/examples/inp_xml_files/NiO_ldauXML/files/NiO +++ b/examples/inp_xml_files/NiO_ldauXML/files/NiO @@ -10,4 +10,3 @@ NiO bct uc (AFM1) 8 0.5 0.5 0.0 28 0.5 0.5 0.5 8 0.0 0.0 0.5 - diff --git a/examples/inp_xml_files/W/W_delta_inp b/examples/inp_xml_files/W/W_delta_inp index db80afa7c..6140e7bde 100644 --- a/examples/inp_xml_files/W/W_delta_inp +++ b/examples/inp_xml_files/W/W_delta_inp @@ -9,4 +9,4 @@ bcc tungsten &atom element="W" rmt=2.3 jri=981 lmax=12 lnonsph=6 lo="5s 5p" / &comp kmax=5.0 gmaxxc=12.5 gmax=15.0 / -&kpt div1=25 div2=25 div3=25 tkb=0.0005 / \ No newline at end of file +&kpt div1=25 div2=25 div3=25 tkb=0.0005 / diff --git a/examples/old_workflowtests/__init__.py b/examples/old_workflowtests/__init__.py index 6e18fe392..8b4505153 100644 --- a/examples/old_workflowtests/__init__.py +++ b/examples/old_workflowtests/__init__.py @@ -3,10 +3,9 @@ FLEUR base workflows ''' -__copyright__ = u"Copyright (c), 2016, Forschungszentrum Juelich, Germany. All rights reserved." -__license__ = "MIT license, see LICENSE.txt file." -__version__ = "0.1.0" -__contributors__ = "Jens Broeder" -__paper__ = "" -__paper_short__ = "" - +__copyright__ = u'Copyright (c), 2016, Forschungszentrum Juelich, Germany. All rights reserved.' +__license__ = 'MIT license, see LICENSE.txt file.' +__version__ = '0.1.0' +__contributors__ = 'Jens Broeder' +__paper__ = '' +__paper_short__ = '' diff --git a/examples/old_workflowtests/old/__init__.py b/examples/old_workflowtests/old/__init__.py index 6e18fe392..8b4505153 100644 --- a/examples/old_workflowtests/old/__init__.py +++ b/examples/old_workflowtests/old/__init__.py @@ -3,10 +3,9 @@ FLEUR base workflows ''' -__copyright__ = u"Copyright (c), 2016, Forschungszentrum Juelich, Germany. All rights reserved." -__license__ = "MIT license, see LICENSE.txt file." -__version__ = "0.1.0" -__contributors__ = "Jens Broeder" -__paper__ = "" -__paper_short__ = "" - +__copyright__ = u'Copyright (c), 2016, Forschungszentrum Juelich, Germany. All rights reserved.' +__license__ = 'MIT license, see LICENSE.txt file.' +__version__ = '0.1.0' +__contributors__ = 'Jens Broeder' +__paper__ = '' +__paper_short__ = '' diff --git a/examples/old_workflowtests/old/test_band.py b/examples/old_workflowtests/old/test_band.py index d3764ddc2..c6753705c 100644 --- a/examples/old_workflowtests/old/test_band.py +++ b/examples/old_workflowtests/old/test_band.py @@ -1,4 +1,5 @@ #!/usr/bin/env python +# -*- coding: utf-8 -*- """ This test runs the Fleur band workflow """ @@ -9,7 +10,7 @@ from aiida.plugins import Code, DataFactory from aiida.orm import load_node #from aiida.work.run import run -from aiida_fleur.workflows.band import fleur_band_wc +from aiida_fleur.workflows.band import FleurBandWorkChain StructureData = DataFactory('structure') ParameterData = DataFactory('parameter') @@ -18,7 +19,7 @@ ############################### # Set your values here -codename2 = 'fleur_iff@local_iff'#'fleur_iff003_v0_27@iff003' +codename2 = 'fleur_iff@local_iff' #'fleur_iff003_v0_27@iff003' codename2 = 'fleur_iff003_v0_27@iff003' ############################### @@ -27,8 +28,7 @@ fleurinp = load_node(1684) fleur_calc = load_node(1693) remote = fleur_calc.out.remote_folder -wf_para = Dict(dict={'queue' : 'th123_node'}) - +wf_para = Dict(dict={'queue': 'th123_node'}) #res = band.run(fleurinp=fleurinp, remote=remote, fleur=code2) -res = fleur_band_wc.run(wf_parameters=wf_para, fleurinp=fleurinp, remote=remote, fleur=code2) +res = FleurBandWorkChain.run(wf_parameters=wf_para, fleurinp=fleurinp, remote=remote, fleur=code2) diff --git a/examples/old_workflowtests/old/test_dos.py b/examples/old_workflowtests/old/test_dos.py index 128a0f06e..7578bad4c 100644 --- a/examples/old_workflowtests/old/test_dos.py +++ b/examples/old_workflowtests/old/test_dos.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # /usr/bin/env python """ This test runs the Fleur dos workflow @@ -30,6 +31,5 @@ remote = fleur_calc.out.remote_folder #wf_para = ParameterData(dict={}) - res = fleur_dos_wc.run(fleurinp=fleurinp, remote=remote, fleur=code2) #res = dos.run(wf_parameters=wf_para, fleurinp=fleurinp, fleur_calc=remote, fleur=code2) diff --git a/examples/old_workflowtests/old/test_eos.py b/examples/old_workflowtests/old/test_eos.py index 8e5c58678..07bb4bce5 100644 --- a/examples/old_workflowtests/old/test_eos.py +++ b/examples/old_workflowtests/old/test_eos.py @@ -16,7 +16,7 @@ ############################### # Set your values here -codename = 'inpgen_iff@local_iff'#'inpgen_mac_30_11_2016@local_mac' +codename = 'inpgen_iff@local_iff' #'inpgen_mac_30_11_2016@local_mac' codename2 = 'fleur_MPI_iff003_v0_27@iff003' ############################### @@ -24,29 +24,34 @@ code2 = Code.get_from_string(codename2) from pprint import pprint -s = load_node(5937)#Ti -s = load_node(5955)#W +s = load_node(5937) #Ti +s = load_node(5955) #W #s = load_node(5898) #Be2W -s = load_node(120) # Si +s = load_node(120) # Si f = s.get_formula() #print s.get_formula() parameters = load_node(139) -parameters = load_node(121) # Si -wf_para = Dict(dict={'fleur_runmax': 4, - 'points' : 7, - 'step' : 0.002, - 'guess' : 1.00, - 'resources' : {"num_machines": 1, "num_mpiprocs_per_machine" : 12}, - 'walltime_sec': 60*60, - 'queue_name' : 'th123_node'}) +parameters = load_node(121) # Si +wf_para = Dict( + dict={ + 'fleur_runmax': 4, + 'points': 7, + 'step': 0.002, + 'guess': 1.00, + 'resources': { + 'num_machines': 1, + 'num_mpiprocs_per_machine': 12 + }, + 'walltime_sec': 60 * 60, + 'queue_name': 'th123_node' + }) -print(("structure = {}".format(f))) -print("wf-para =")#.format(wf_para.get_dict())) +print(('structure = {}'.format(f))) +print('wf-para =') #.format(wf_para.get_dict())) pprint(wf_para.get_dict()) -print("parameterdata = ")#{}".format(parameters.get_dict())) +print('parameterdata = ') #{}".format(parameters.get_dict())) pprint(parameters.get_dict()) -res = FleurEosWorkChain.run(wf_parameters=wf_para, structure=s, - calc_parameters=parameters, - inpgen = code, fleur=code2)#, settings=settings)# +res = FleurEosWorkChain.run(wf_parameters=wf_para, structure=s, calc_parameters=parameters, inpgen=code, + fleur=code2) #, settings=settings)# diff --git a/examples/old_workflowtests/old/test_eos_old.py b/examples/old_workflowtests/old/test_eos_old.py index 4bef32a72..36653b332 100644 --- a/examples/old_workflowtests/old/test_eos_old.py +++ b/examples/old_workflowtests/old/test_eos_old.py @@ -25,7 +25,7 @@ ParameterData = DataFactory('parameter') -W_bcc_id = 24513#24423 +W_bcc_id = 24513 #24423 W_bcc_id2 = 24422 W_fcc_id = 24 @@ -35,7 +35,7 @@ print('sites: {}\n'.format(W_bcc.sites)) # create a Parameternode or load one from the DB -W_para_id = 24507#without soc soc:24424 +W_para_id = 24507 #without soc soc:24424 W_para = load_node(W_para_id) print('ParamterNode used:') @@ -49,10 +49,10 @@ codename2 = 'fleur_mac_v0_27' #codename2 = 'fleur_iff003_v0_27@iff003' #codename2 = 'fleur_MPI_iff003_v0_27@iff003' -points = 3#9 +points = 3 #9 step = 0.002 guess = 1.01 -wf_dict = {'fleur_runmax' : 2, 'density_criterion' : 0.0000001, 'points' : points, 'step' : step, 'guess' : guess} +wf_dict = {'fleur_runmax': 2, 'density_criterion': 0.0000001, 'points': points, 'step': step, 'guess': guess} ############################### code = Code.get_from_string(codename) @@ -121,7 +121,7 @@ def fit_latticeconstant(scale, eT): for i in range(0,nfiles): p1 = pp.plot(scaleAll[i],eT1_all[i], 's-', label = labela[i], linewidth = 2.0, markersize = 4.0) pl.append(p1) - + pp.legend(bbox_to_anchor=(0.85, 1), loc=2, borderaxespad=0., fancybox=True)#loc='best', fancybox=True) #, framealpha=0.5) #loc='upper right') if save: diff --git a/examples/old_workflowtests/old/test_relaxation.py b/examples/old_workflowtests/old/test_relaxation.py index 1f36ad1e3..2cdfb3570 100644 --- a/examples/old_workflowtests/old/test_relaxation.py +++ b/examples/old_workflowtests/old/test_relaxation.py @@ -1,10 +1,11 @@ #!/usr/bin/env python +# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import print_function from aiida import load_dbenv, is_dbenv_loaded if not is_dbenv_loaded(): load_dbenv() -import sys,os +import sys, os from aiida.plugins import Code, DataFactory from aiida.orm import Computer from aiida.orm import load_node @@ -35,11 +36,11 @@ #JobCalc = FleurinputgenCalculation.process() computer = Computer.objects.get(computer_name) -s = load_node(14204)#13586)#137)# Be13586, W 137 +s = load_node(14204) #13586)#137)# Be13586, W 137 print(s.sites) #print s.cell -parameters = load_node(13496)# Be 13496, W 13161 -wf_para = Dict(dict={'relax_runmax' : 5, 'density_criterion' : 0.0000001, 'max_force_cycle' : 9}) +parameters = load_node(13496) # Be 13496, W 13161 +wf_para = Dict(dict={'relax_runmax': 5, 'density_criterion': 0.0000001, 'max_force_cycle': 9}) - -res = fleur_relax_wc.run(wf_parameters=wf_para, structure=s, calc_parameters=parameters, inpgen = code, fleur=code2)#, computer=computer) +res = fleur_relax_wc.run(wf_parameters=wf_para, structure=s, calc_parameters=parameters, inpgen=code, + fleur=code2) #, computer=computer) diff --git a/examples/old_workflowtests/old/test_scf.py b/examples/old_workflowtests/old/test_scf.py index 82820d7ec..580ea778d 100644 --- a/examples/old_workflowtests/old/test_scf.py +++ b/examples/old_workflowtests/old/test_scf.py @@ -1,4 +1,5 @@ #!/usr/bin/env python +# -*- coding: utf-8 -*- """ This test runs the fleur_convergence workflow for path 1 """ @@ -19,11 +20,11 @@ ############################### # Set your values here -codename = 'inpgen_iff_0.28@local_iff' #'inpgen_iff@local_iff'#'inpgen_mac_30_11_2016@local_mac' +codename = 'inpgen_iff_0.28@local_iff' #'inpgen_iff@local_iff'#'inpgen_mac_30_11_2016@local_mac' #codename2 = 'fleur_iff@local_iff'#'fleur_mac_v0_27@local_mac' #codename = 'fleur_inpgen_iff003@iff003'#'inpgen_mac_30_11_2016@local_mac' #codename2 = 'fleur_iff003_v0_27@iff003'#fleur_iff@iff003'#'fleur_mac_v0_27@local_mac' -codename2 = 'fleur_iff_0.28@local_iff'#'fleur_MPI_iff003_v0_27@iff003' +codename2 = 'fleur_iff_0.28@local_iff' #'fleur_MPI_iff003_v0_27@iff003' ############################### code = Code.get_from_string(codename) @@ -33,20 +34,34 @@ parameters = Dict(dict={}) -settings = Dict(dict={'files_to_retrieve' : [], 'files_not_to_retrieve': [], - 'files_copy_remotely': [], 'files_not_copy_remotely': [], - 'commandline_options': ["-wtime", "30"], 'blaha' : ['bla']}) - -wf_para = Dict(dict={'fleur_runmax' : 4, - 'density_criterion' : 0.000001,#}) - 'queue_name' : 'th123_node', - 'resources' : {"num_machines": 1, "num_mpiprocs_per_machine" : 12}, - 'walltime_sec': 10*60}) +settings = Dict( + dict={ + 'files_to_retrieve': [], + 'files_not_to_retrieve': [], + 'files_copy_remotely': [], + 'files_not_copy_remotely': [], + 'commandline_options': ['-wtime', '30'], + 'blaha': ['bla'] + }) -res = FleurScfWorkChain.run(wf_parameters=wf_para, structure=s, - #calc_parameters=parameters, - inpgen = code, fleur=code2)#, settings=settings)# +wf_para = Dict( + dict={ + 'fleur_runmax': 4, + 'density_criterion': 0.000001, #}) + 'queue_name': 'th123_node', + 'resources': { + 'num_machines': 1, + 'num_mpiprocs_per_machine': 12 + }, + 'walltime_sec': 10 * 60 + }) +res = FleurScfWorkChain.run( + wf_parameters=wf_para, + structure=s, + #calc_parameters=parameters, + inpgen=code, + fleur=code2) #, settings=settings)# ''' code = Code.get_from_string('inpgen_mac_25_10_2016') code2 = Code.get_from_string('fleur_mac_v0_27') diff --git a/examples/old_workflowtests/old/test_scf2.py b/examples/old_workflowtests/old/test_scf2.py index 5138a14c6..dbd729a45 100644 --- a/examples/old_workflowtests/old/test_scf2.py +++ b/examples/old_workflowtests/old/test_scf2.py @@ -1,4 +1,5 @@ #!/usr/bin/env python +# -*- coding: utf-8 -*- """ This test runs the fleur_convergence workflow for path 2 """ @@ -21,21 +22,23 @@ ############################### # Set your values here -codename = 'inpgen_iff@local_iff'#'inpgen_mac_30_11_2016@local_mac' -codename2 = 'fleur_iff@local_iff'#'fleur_mac_v0_27@local_mac' +codename = 'inpgen_iff@local_iff' #'inpgen_mac_30_11_2016@local_mac' +codename2 = 'fleur_iff@local_iff' #'fleur_mac_v0_27@local_mac' ############################### code = Code.get_from_string(codename) code2 = Code.get_from_string(codename2) -wf_para = Dict(dict={'relax_runmax' : 4, - 'density_criterion' : 0.0000002, - 'energy_criterion' : 0.0005, - 'converge_energy' : True, - 'converge_density' : True}) +wf_para = Dict( + dict={ + 'relax_runmax': 4, + 'density_criterion': 0.0000002, + 'energy_criterion': 0.0005, + 'converge_energy': True, + 'converge_density': True + }) fleurinp = load_node(1339) remote = load_node(1353) wf_para = load_node(1333) -res = FleurScfWorkChain.run(wf_parameters=wf_para, fleurinp=fleurinp, - remote_data= remote, fleur=code2) +res = FleurScfWorkChain.run(wf_parameters=wf_para, fleurinp=fleurinp, remote_data=remote, fleur=code2) diff --git a/examples/old_workflowtests/test_inital_state.py b/examples/old_workflowtests/test_inital_state.py index 85878c261..2bcc632f5 100644 --- a/examples/old_workflowtests/test_inital_state.py +++ b/examples/old_workflowtests/test_inital_state.py @@ -1,6 +1,7 @@ #!/usr/bin/env python +# -*- coding: utf-8 -*- """ -This test runs the initial stae CLS workflow +This test runs the initial stae CLS workflow """ #TODO: overall tests, should create the nodes they use in the db. from __future__ import absolute_import @@ -21,7 +22,7 @@ ############################### # Set your values here -codename = 'inpgen_iff@local_iff'#'inpgen_mac_30_11_2016@local_mac' +codename = 'inpgen_iff@local_iff' #'inpgen_mac_30_11_2016@local_mac' #codename2 = 'fleur_iff@local_iff'#'fleur_mac_v0_27@local_mac' #codename = 'fleur_inpgen_iff003@iff003'#'inpgen_mac_30_11_2016@local_mac' #codename2 = 'fleur_iff003_v0_27@iff003'#fleur_iff@iff003'#'fleur_mac_v0_27@local_mac' @@ -31,30 +32,33 @@ code = Code.get_from_string(codename) code2 = Code.get_from_string(codename2) -resources = {"num_machines": 1, "num_mpiprocs_per_machine" : 12} +resources = {'num_machines': 1, 'num_mpiprocs_per_machine': 12} -s = load_node(5898) # Be2W +s = load_node(5898) # Be2W -s1 =load_node(5955) #W -s2 =load_node(3100) #Be +s1 = load_node(5955) #W +s2 = load_node(3100) #Be -references = {'use' : {'Be' : s2.uuid, 'W' : s1.uuid}} +references = {'use': {'Be': s2.uuid, 'W': s1.uuid}} print(references) parameters = Dict(dict={}) parameters = Dict(dict={}) -wf_para = Dict(dict={'fleur_runmax' : 4, - 'density_criterion' : 0.000002,#}) - 'queue_name' : 'th123_node', - 'resources' : resources, - 'walltime_sec': 10*60, - 'serial' : False, - 'references' : references}) +wf_para = Dict( + dict={ + 'fleur_runmax': 4, + 'density_criterion': 0.000002, #}) + 'queue_name': 'th123_node', + 'resources': resources, + 'walltime_sec': 10 * 60, + 'serial': False, + 'references': references + }) -res = fleur_initial_cls_wc.run(structure=s, wf_parameters=wf_para, inpgen = code, fleur=code2)# -#wf_parameters=wf_para, +res = fleur_initial_cls_wc.run(structure=s, wf_parameters=wf_para, inpgen=code, fleur=code2) # +#wf_parameters=wf_para, ''' - _default_wf_para = {'references' : {'calculate' : 'all'}, + _default_wf_para = {'references' : {'calculate' : 'all'}, 'calculate_doses' : False, 'relax' : True, 'relax_mode': 'QE Fleur', @@ -65,13 +69,13 @@ 'resources' : {"num_machines": 1}, 'walltime_sec' : 10*30, 'queue' : None, - 'serial' : False} - + 'serial' : False} + spec.input("wf_parameters", valid_type=ParameterData, required=False, default=ParameterData(dict=self._default_wf_para))#get_defaut_wf_para()))# spec.input("fleurinp", valid_type=FleurinpData, required=False) spec.input("fleur", valid_type=Code, required=True) - spec.input("inpgen", valid_type=Code, required=False) + spec.input("inpgen", valid_type=Code, required=False) spec.input("structure", valid_type=StructureData, required=False) - spec.input("calc_parameters", valid_type=ParameterData, required=False) + spec.input("calc_parameters", valid_type=ParameterData, required=False) ''' diff --git a/examples/old_workflowtests/test_run_scf2.py b/examples/old_workflowtests/test_run_scf2.py index 79101bf60..9f305e9d8 100644 --- a/examples/old_workflowtests/test_run_scf2.py +++ b/examples/old_workflowtests/test_run_scf2.py @@ -3,11 +3,10 @@ from __future__ import absolute_import from __future__ import print_function -__copyright__ = (u"Copyright (c), 2016, Forschungszentrum Jülich GmbH, " - "IAS-1/PGI-1, Germany. All rights reserved.") -__license__ = "MIT license, see LICENSE.txt file" -__version__ = "0.27" -__contributors__ = "Jens Broeder" +__copyright__ = (u'Copyright (c), 2016, Forschungszentrum Jülich GmbH, ' 'IAS-1/PGI-1, Germany. All rights reserved.') +__license__ = 'MIT license, see LICENSE.txt file' +__version__ = '0.27' +__contributors__ = 'Jens Broeder' from aiida import load_dbenv, is_dbenv_loaded if not is_dbenv_loaded(): @@ -22,25 +21,23 @@ # If set to True, will ask AiiDA to run in serial mode (i.e., AiiDA will not # invoke the mpirun command in the submission script) -run_in_serial_mode = True#False +run_in_serial_mode = True #False queue = None ################################################################ ParameterData = DataFactory('parameter') FleurinpData = DataFactory('fleur.fleurinp') - try: dontsend = sys.argv[1] - if dontsend == "--dont-send": + if dontsend == '--dont-send': submit_test = True - elif dontsend == "--send": + elif dontsend == '--send': submit_test = False else: raise IndexError except IndexError: - print(("The first parameter can only be either " - "--send or --dont-send"), file=sys.stderr) + print(('The first parameter can only be either ' '--send or --dont-send'), file=sys.stderr) sys.exit(1) try: @@ -59,18 +56,24 @@ # get where tests folder is, then relative path inpxmlfile = '/usr/users/iff_th1/broeder/aiida/github/aiida-fleur/tests/inp_xml_files/W/inp.xml' -fleurinp = FleurinpData(files = [inpxmlfile]) - -wf_para = Dict(dict={'fleur_runmax' : 4, - 'density_criterion' : 0.000001,#}) - 'queue_name' : 'th123_node', - 'resources' : {"num_machines": 1, "num_mpiprocs_per_machine" : 12}, - 'walltime_sec': 10*60, 'serial' : run_in_serial_mode}) +fleurinp = FleurinpData(files=[inpxmlfile]) +wf_para = Dict( + dict={ + 'fleur_runmax': 4, + 'density_criterion': 0.000001, #}) + 'queue_name': 'th123_node', + 'resources': { + 'num_machines': 1, + 'num_mpiprocs_per_machine': 12 + }, + 'walltime_sec': 10 * 60, + 'serial': run_in_serial_mode + }) if submit_test: print('workchain do not have so far a submit_test function') else: - print("Running fleur_scf_wc") + print('Running fleur_scf_wc') res = FleurScfWorkChain.run(wf_parameters=wf_para, fleurinp=fleurinp, fleur=code) - #remote_data= remote, fleur=code) + #remote_data= remote, fleur=code) diff --git a/examples/old_workflowtests/test_submit_inpgen.py b/examples/old_workflowtests/test_submit_inpgen.py index 3a78f880b..1e6bf77b9 100644 --- a/examples/old_workflowtests/test_submit_inpgen.py +++ b/examples/old_workflowtests/test_submit_inpgen.py @@ -3,11 +3,10 @@ from __future__ import absolute_import from __future__ import print_function -__copyright__ = (u"Copyright (c), 2016, Forschungszentrum Jülich GmbH, " - "IAS-1/PGI-1, Germany. All rights reserved.") -__license__ = "MIT license, see LICENSE.txt file" -__version__ = "0.27" -__contributors__ = "Jens Broeder" +__copyright__ = (u'Copyright (c), 2016, Forschungszentrum Jülich GmbH, ' 'IAS-1/PGI-1, Germany. All rights reserved.') +__license__ = 'MIT license, see LICENSE.txt file' +__version__ = '0.27' +__contributors__ = 'Jens Broeder' from aiida import load_dbenv, is_dbenv_loaded if not is_dbenv_loaded(): @@ -20,23 +19,20 @@ from aiida.plugins import DataFactory, CalculationFactory from aiida_fleur.calculation.fleurinputgen import FleurinputgenCalculation as calc - ################################################################ - ParameterData = DataFactory('parameter') StructureData = DataFactory('structure') try: dontsend = sys.argv[1] - if dontsend == "--dont-send": + if dontsend == '--dont-send': submit_test = True - elif dontsend == "--send": + elif dontsend == '--send': submit_test = False else: raise IndexError except IndexError: - print(("The first parameter can only be either " - "--send or --dont-send"), file=sys.stderr) + print(('The first parameter can only be either ' '--send or --dont-send'), file=sys.stderr) sys.exit(1) try: @@ -51,31 +47,33 @@ code = test_and_get_code(codename, expected_code_type='fleur.inpgen') -# W bcc structure -bohr_a_0= 0.52917721092 # A -a = 3.013812049196*bohr_a_0 -cell = [[-a,a,a],[a,-a,a],[a,a,-a]] +# W bcc structure +bohr_a_0 = 0.52917721092 # A +a = 3.013812049196 * bohr_a_0 +cell = [[-a, a, a], [a, -a, a], [a, a, -a]] s = StructureData(cell=cell) -s.append_atom(position=(0.,0.,0.), symbols='W') -parameters = Dict(dict={ - 'atom':{ - 'element' : 'W', - 'jri' : 833, - 'rmt' : 2.3, - 'dx' : 0.015, - 'lmax' : 8, - 'lo' : '5p', - 'econfig': '[Kr] 5s2 4d10 4f14| 5p6 5d4 6s2', - }, - 'comp': { - 'kmax': 3.5, - 'gmax': 2.9, - }, - 'kpt': { - 'nkpt': 200, - }}) - -#elements = list(s.get_symbols_set()) +s.append_atom(position=(0., 0., 0.), symbols='W') +parameters = Dict( + dict={ + 'atom': { + 'element': 'W', + 'jri': 833, + 'rmt': 2.3, + 'dx': 0.015, + 'lmax': 8, + 'lo': '5p', + 'econfig': '[Kr] 5s2 4d10 4f14| 5p6 5d4 6s2', + }, + 'comp': { + 'kmax': 3.5, + 'gmax': 2.9, + }, + 'kpt': { + 'nkpt': 200, + } + }) + +#elements = list(s.get_symbols_set()) ## For remote codes, it is not necessary to manually set the computer, ## since it is set automatically by new_calc @@ -85,20 +83,20 @@ calc = code.new_calc() #calc = CalculationFactory('fleur.inpgen') print(calc, type(calc)) -calc.label = "Test Fleur inpgen" -calc.description = "Test calculation of the Fleur input generator" +calc.label = 'Test Fleur inpgen' +calc.description = 'Test calculation of the Fleur input generator' calc.set_max_wallclock_seconds(300) # 5 min # Valid only for Slurm and PBS (using default values for the # number_cpus_per_machine), change for SGE-like schedulers -calc.set_resources({"num_machines": 1}) +calc.set_resources({'num_machines': 1}) calc.set_withmpi(False) calc.use_code(code) ## Otherwise, to specify a given # of cpus per machine, uncomment the following: # calc.set_resources({"num_machines": 1, "num_mpiprocs_per_machine": 8}) -calc.set_resources({"tot_num_mpiprocs" : 1}) +calc.set_resources({'tot_num_mpiprocs': 1}) #calc.set_custom_scheduler_commands("#SBATCH --account=ch3") -calc.set_custom_scheduler_commands("#BSUB -P jara0043 \n#BSUB -x") +calc.set_custom_scheduler_commands('#BSUB -P jara0043 \n#BSUB -x') if queue is not None: calc.set_queue_name(queue) @@ -109,20 +107,12 @@ if settings is not None: calc.use_settings(settings) - if submit_test: subfolder, script_filename = calc.submit_test() - print("Test_submit for calculation (uuid='{}')".format( - calc.uuid)) - print("Submit file in {}".format(os.path.join( - os.path.relpath(subfolder.abspath), - script_filename - ))) + print("Test_submit for calculation (uuid='{}')".format(calc.uuid)) + print('Submit file in {}'.format(os.path.join(os.path.relpath(subfolder.abspath), script_filename))) else: calc.store_all() - print("created calculation; calc=Calculation(uuid='{}') # ID={}".format( - calc.uuid, calc.dbnode.pk)) + print("created calculation; calc=Calculation(uuid='{}') # ID={}".format(calc.uuid, calc.dbnode.pk)) calc.submit() - print("submitted calculation; calc=Calculation(uuid='{}') # ID={}".format( - calc.uuid, calc.dbnode.pk)) - + print("submitted calculation; calc=Calculation(uuid='{}') # ID={}".format(calc.uuid, calc.dbnode.pk)) diff --git a/examples/out_xml_files/old/out.xml b/examples/out_xml_files/old/out.xml index b2e5556d2..d6c184f87 100644 --- a/examples/out_xml_files/old/out.xml +++ b/examples/out_xml_files/old/out.xml @@ -1794,4 +1794,4 @@ - \ No newline at end of file + diff --git a/examples/out_xml_files/old/outCu.xml b/examples/out_xml_files/old/outCu.xml index 6179ff81b..2a750f916 100644 --- a/examples/out_xml_files/old/outCu.xml +++ b/examples/out_xml_files/old/outCu.xml @@ -1790,4 +1790,4 @@ - \ No newline at end of file + diff --git a/examples/out_xml_files/old/outCuF.xml b/examples/out_xml_files/old/outCuF.xml index 0797ca6ba..2688de374 100644 --- a/examples/out_xml_files/old/outCuF.xml +++ b/examples/out_xml_files/old/outCuF.xml @@ -1190,4 +1190,4 @@ - \ No newline at end of file + diff --git a/examples/out_xml_files/old/outFe.xml b/examples/out_xml_files/old/outFe.xml index 2a751c44e..5ff09a52a 100644 --- a/examples/out_xml_files/old/outFe.xml +++ b/examples/out_xml_files/old/outFe.xml @@ -1648,4 +1648,4 @@ - \ No newline at end of file + diff --git a/examples/out_xml_files/old/outHg.xml b/examples/out_xml_files/old/outHg.xml index e8bacf50e..640d75054 100644 --- a/examples/out_xml_files/old/outHg.xml +++ b/examples/out_xml_files/old/outHg.xml @@ -1343,4 +1343,4 @@ - \ No newline at end of file + diff --git a/examples/out_xml_files/old/outO.xml b/examples/out_xml_files/old/outO.xml index ad4bfabc3..8112af5cb 100644 --- a/examples/out_xml_files/old/outO.xml +++ b/examples/out_xml_files/old/outO.xml @@ -704,4 +704,4 @@ - \ No newline at end of file + diff --git a/examples/out_xml_files/outBeCr.xml b/examples/out_xml_files/outBeCr.xml index 2d5c0aeb5..cdc86481d 100644 --- a/examples/out_xml_files/outBeCr.xml +++ b/examples/out_xml_files/outBeCr.xml @@ -2029,4 +2029,4 @@ - \ No newline at end of file + diff --git a/examples/simple/Cu_bulk.py b/examples/simple/Cu_bulk.py index eb45f721f..c637acaa3 100644 --- a/examples/simple/Cu_bulk.py +++ b/examples/simple/Cu_bulk.py @@ -1,10 +1,11 @@ #!/usr/bin/env python +# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import print_function from aiida import load_dbenv, is_dbenv_loaded if not is_dbenv_loaded(): load_dbenv() -import sys,os +import sys, os from aiida.plugins import Code, DataFactory, Computer, load_node from aiida.engine.run import async, run from aiida_fleur.calculation.fleurinputgen import FleurinputgenCalculation @@ -19,50 +20,69 @@ #computer_name = 'local_mac' codename2 = 'fleur_iff@local_iff' ############################### -bohr_a_0= 0.52917721092 # A +bohr_a_0 = 0.52917721092 # A # first create a structure, or get it from somewhere #s = load_node(601) #parameters =load_node(602) # Cu_delta_inp -a = 3.436364432671*bohr_a_0 -cell = [[0.0,a,a],[a,0.,a],[a,a,0.]] +a = 3.436364432671 * bohr_a_0 +cell = [[0.0, a, a], [a, 0., a], [a, a, 0.]] s = StructureData(cell=cell) -s.append_atom(position=(0.,0.,0.), symbols='Cu') +s.append_atom(position=(0., 0., 0.), symbols='Cu') -# A structure would be enough, then the input generator will choose default values, +# A structure would be enough, then the input generator will choose default values, # if you want to set parameters you have to provide a ParameterData node with some namelists of the inpgen: -parameters = Dict(dict={ - 'title': 'Cu, fcc copper, bulk, delta project', - 'atom':{'element' : 'Cu', 'rmt' : 2.28, 'jri' : 981, 'lmax' : 12, 'lnonsph' : 6}, - 'comp': {'kmax': 5.0, 'gmaxxc' : 12.5, 'gmax' : 15.0}, - 'kpt': {'div1' : 25, 'div2': 25, 'div3' : 25, 'tkb' : 0.0005}}) - +parameters = Dict( + dict={ + 'title': 'Cu, fcc copper, bulk, delta project', + 'atom': { + 'element': 'Cu', + 'rmt': 2.28, + 'jri': 981, + 'lmax': 12, + 'lnonsph': 6 + }, + 'comp': { + 'kmax': 5.0, + 'gmaxxc': 12.5, + 'gmax': 15.0 + }, + 'kpt': { + 'div1': 25, + 'div2': 25, + 'div3': 25, + 'tkb': 0.0005 + } + }) # now run the inputgenerator: code = Code.get_from_string(codename) #computer = Computer.get(computer_name) JobCalc = FleurinputgenCalculation.process() -attrs ={'max_wallclock_seconds' :180, - 'resources' : {"num_machines": 1}, - 'withmpi' : False, - #'computer': computer - } -inp = {'structure' : s, 'parameters' : parameters, 'code' : code} +attrs = { + 'max_wallclock_seconds': 180, + 'resources': { + 'num_machines': 1 + }, + 'withmpi': False, + #'computer': computer +} +inp = {'structure': s, 'parameters': parameters, 'code': code} print('running inpgen') f = run(JobCalc, _options=attrs, **inp) -fleurinp= f['fleurinpData'] +fleurinp = f['fleurinpData'] fleurinpd = load_node(fleurinp.pk) # now run a Fleur calculation ontop of an inputgen calculation code = Code.get_from_string(codename2) JobCalc = FleurCalculation.process() -attrs ={'max_wallclock_seconds' : 180, 'resources' : {"num_machines": 1} } -inp1 = {'code' : code, 'fleurinpdata' : fleurinpd}#'parent' : parent_calc, +attrs = {'max_wallclock_seconds': 180, 'resources': {'num_machines': 1}} +inp1 = {'code': code, 'fleurinpdata': fleurinpd} #'parent' : parent_calc, print('running Fleur') f1 = run(JobCalc, _options=attrs, **inp1) diff --git a/examples/simple/Si_bulk.py b/examples/simple/Si_bulk.py index 61c05b68b..ea9dc8968 100644 --- a/examples/simple/Si_bulk.py +++ b/examples/simple/Si_bulk.py @@ -1,9 +1,10 @@ #!/usr/bin/env python +# -*- coding: utf-8 -*- from __future__ import absolute_import from aiida import load_dbenv, is_dbenv_loaded if not is_dbenv_loaded(): load_dbenv() -import sys,os +import sys, os from aiida.plugins import Code, DataFactory, Computer, load_node from aiida.engine.run import async, run from aiida_fleur.calculation.fleurinputgen import FleurinputgenCalculation @@ -18,21 +19,25 @@ #computer_name = 'local_mac' codename2 = 'Fleur_mac@local_mac' ############################### -bohr_a_0= 0.52917721092 # A +bohr_a_0 = 0.52917721092 # A + def rel_to_abs(vector, cell): """ converts interal coordinates to absolut coordinates in Angstroem. """ if len(vector) == 3: - postionR = vector - row1 = cell[0] - row2 = cell[1] - row3 = cell[2] - new_abs_pos = [postionR[0]*row1[0] + postionR[1]*row2[0]+ postionR[2]*row3[0], - postionR[0]*row1[1] + postionR[1]*row2[1]+ postionR[2]*row3[1], - postionR[0]*row1[2] + postionR[1]*row2[2]+ postionR[2]*row3[2]] - return new_abs_pos + postionR = vector + row1 = cell[0] + row2 = cell[1] + row3 = cell[2] + new_abs_pos = [ + postionR[0] * row1[0] + postionR[1] * row2[0] + postionR[2] * row3[0], + postionR[0] * row1[1] + postionR[1] * row2[1] + postionR[2] * row3[1], + postionR[0] * row1[2] + postionR[1] * row2[2] + postionR[2] * row3[2] + ] + return new_abs_pos + # first create a structure, or get it from somewhere @@ -41,21 +46,38 @@ def rel_to_abs(vector, cell): # Si_delta_inp -a = 5.167355275190*bohr_a_0 -cell = [[0.0,a,a],[a,0.0,a],[a,a,0.0]] +a = 5.167355275190 * bohr_a_0 +cell = [[0.0, a, a], [a, 0.0, a], [a, a, 0.0]] s = StructureData(cell=cell) -pos1 =rel_to_abs((1./8., 1./8., 1./8.), cell) -pos2 =rel_to_abs((-1./8., -1./8., -1./8.), cell) -s.append_atom(position=pos1,symbols='Si') -s.append_atom(position=pos2,symbols='Si') +pos1 = rel_to_abs((1. / 8., 1. / 8., 1. / 8.), cell) +pos2 = rel_to_abs((-1. / 8., -1. / 8., -1. / 8.), cell) +s.append_atom(position=pos1, symbols='Si') +s.append_atom(position=pos2, symbols='Si') -# A structure would be enough, then the input generator will choose default values, +# A structure would be enough, then the input generator will choose default values, # if you want to set parameters you have to provide a ParameterData node with some namelists of the inpgen: -parameters = Dict(dict={ - 'title': 'Si, alpha silicon, bulk, delta project', - 'atom':{'element' : 'Si', 'rmt' : 2.1, 'jri' : 981, 'lmax' : 12, 'lnonsph' : 6}, - 'comp': {'kmax': 5.0, 'gmaxxc' : 12.5, 'gmax' : 15.0}, - 'kpt': {'div1' : 17, 'div2': 17, 'div3' : 17, 'tkb' : 0.0005}}) +parameters = Dict( + dict={ + 'title': 'Si, alpha silicon, bulk, delta project', + 'atom': { + 'element': 'Si', + 'rmt': 2.1, + 'jri': 981, + 'lmax': 12, + 'lnonsph': 6 + }, + 'comp': { + 'kmax': 5.0, + 'gmaxxc': 12.5, + 'gmax': 15.0 + }, + 'kpt': { + 'div1': 17, + 'div2': 17, + 'div3': 17, + 'tkb': 0.0005 + } + }) # now run an inputgen calculation: @@ -63,25 +85,27 @@ def rel_to_abs(vector, cell): computer = Computer.objects.get(computer_name) JobCalc = FleurinputgenCalculation.process() -attrs ={'max_wallclock_seconds' :180, - 'resources' : {"num_machines": 1}, - 'withmpi' : False, - #'computer': computer - } -inp = {'structure' : s, 'parameters' : parameters, 'code' : code} +attrs = { + 'max_wallclock_seconds': 180, + 'resources': { + 'num_machines': 1 + }, + 'withmpi': False, + #'computer': computer +} +inp = {'structure': s, 'parameters': parameters, 'code': code} f = run(JobCalc, _options=attrs, **inp) -fleurinp= f['fleurinpData'] +fleurinp = f['fleurinpData'] fleurinpd = load_node(fleurinp.pk) # now run a Fleur calculation ontop of an inputgen calculation code = Code.get_from_string(codename2) JobCalc = FleurCalculation.process() -attrs ={'max_wallclock_seconds' : 180, 'resources' : {"num_machines": 1} } -inp1 = {'code' : code, 'fleurinpdata' : fleurinpd}#'parent' : parent_calc, +attrs = {'max_wallclock_seconds': 180, 'resources': {'num_machines': 1}} +inp1 = {'code': code, 'fleurinpdata': fleurinpd} #'parent' : parent_calc, f1 = run(JobCalc, _options=attrs, **inp1) - ''' # You can also run Fleur from a Fleur calculation and apply some changes to the input file. #parent_id = JobCalc.pk diff --git a/examples/simple/Si_bulk2.py b/examples/simple/Si_bulk2.py index 1831d0ad1..878d6e81a 100644 --- a/examples/simple/Si_bulk2.py +++ b/examples/simple/Si_bulk2.py @@ -1,9 +1,10 @@ #!/usr/bin/env python +# -*- coding: utf-8 -*- from __future__ import absolute_import from aiida import load_dbenv, is_dbenv_loaded if not is_dbenv_loaded(): load_dbenv() -import sys,os +import sys, os from aiida.plugins import Code, DataFactory, Computer, load_node from aiida.engine.run import async, run from aiida_fleur.calculation.fleurinputgen import FleurinputgenCalculation @@ -17,25 +18,29 @@ #codename = 'fleur_inpgen_xml_mac_v0.27@local_mac' #computer_name = 'local_mac' #codename2 = 'Fleur_mac@local_mac' -codename = 'inpgen_iff@local_iff'#'inpgen_mac_30_11_2016@local_mac' +codename = 'inpgen_iff@local_iff' #'inpgen_mac_30_11_2016@local_mac' #codename2 = 'fleur_iff@local_iff'#'fleur_mac_v0_27@local_mac' codename2 = 'fleur_iff003_v0_27@iff003' ############################### -bohr_a_0= 0.52917721092 # A +bohr_a_0 = 0.52917721092 # A + def rel_to_abs(vector, cell): """ converts interal coordinates to absolut coordinates in Angstroem. """ if len(vector) == 3: - postionR = vector - row1 = cell[0] - row2 = cell[1] - row3 = cell[2] - new_abs_pos = [postionR[0]*row1[0] + postionR[1]*row2[0]+ postionR[2]*row3[0], - postionR[0]*row1[1] + postionR[1]*row2[1]+ postionR[2]*row3[1], - postionR[0]*row1[2] + postionR[1]*row2[2]+ postionR[2]*row3[2]] - return new_abs_pos + postionR = vector + row1 = cell[0] + row2 = cell[1] + row3 = cell[2] + new_abs_pos = [ + postionR[0] * row1[0] + postionR[1] * row2[0] + postionR[2] * row3[0], + postionR[0] * row1[1] + postionR[1] * row2[1] + postionR[2] * row3[1], + postionR[0] * row1[2] + postionR[1] * row2[2] + postionR[2] * row3[2] + ] + return new_abs_pos + # first create a structure, or get it from somewhere @@ -44,21 +49,38 @@ def rel_to_abs(vector, cell): # Si_delta_inp -a = 5.167355275190*bohr_a_0 -cell = [[0.0,a,a],[a,0.0,a],[a,a,0.0]] +a = 5.167355275190 * bohr_a_0 +cell = [[0.0, a, a], [a, 0.0, a], [a, a, 0.0]] s = StructureData(cell=cell) -pos1 =rel_to_abs((1./8., 1./8., 1./8.), cell) -pos2 =rel_to_abs((-1./8., -1./8., -1./8.), cell) -s.append_atom(position=pos1,symbols='Si') -s.append_atom(position=pos2,symbols='Si') +pos1 = rel_to_abs((1. / 8., 1. / 8., 1. / 8.), cell) +pos2 = rel_to_abs((-1. / 8., -1. / 8., -1. / 8.), cell) +s.append_atom(position=pos1, symbols='Si') +s.append_atom(position=pos2, symbols='Si') -# A structure would be enough, then the input generator will choose default values, +# A structure would be enough, then the input generator will choose default values, # if you want to set parameters you have to provide a ParameterData node with some namelists of the inpgen: -parameters = Dict(dict={ - 'title': 'Si, alpha silicon, bulk, delta project', - 'atom':{'element' : 'Si', 'rmt' : 2.1, 'jri' : 981, 'lmax' : 12, 'lnonsph' : 6}, - 'comp': {'kmax': 5.0, 'gmaxxc' : 12.5, 'gmax' : 15.0}, - 'kpt': {'div1' : 17, 'div2': 17, 'div3' : 17, 'tkb' : 0.0005}}) +parameters = Dict( + dict={ + 'title': 'Si, alpha silicon, bulk, delta project', + 'atom': { + 'element': 'Si', + 'rmt': 2.1, + 'jri': 981, + 'lmax': 12, + 'lnonsph': 6 + }, + 'comp': { + 'kmax': 5.0, + 'gmaxxc': 12.5, + 'gmax': 15.0 + }, + 'kpt': { + 'div1': 17, + 'div2': 17, + 'div3': 17, + 'tkb': 0.0005 + } + }) # now run an inputgen calculation: @@ -66,26 +88,28 @@ def rel_to_abs(vector, cell): #computer = Computer.get(computer_name) JobCalc = FleurinputgenCalculation.process() -attrs ={'max_wallclock_seconds' :180, - 'resources' : {"num_machines": 1}, - 'withmpi' : False, - #'computer': computer - } -inp = {'structure' : s, 'parameters' : parameters, 'code' : code} +attrs = { + 'max_wallclock_seconds': 180, + 'resources': { + 'num_machines': 1 + }, + 'withmpi': False, + #'computer': computer +} +inp = {'structure': s, 'parameters': parameters, 'code': code} f = run(JobCalc, _options=attrs, **inp) -fleurinp= f['fleurinpData'] +fleurinp = f['fleurinpData'] fleurinpd = load_node(fleurinp.pk) # now run a Fleur calculation ontop of an inputgen calculation code = Code.get_from_string(codename2) JobCalc = FleurCalculation.process() -attrs ={'max_wallclock_seconds' : 180, 'resources' : {"num_machines": 1}, 'queue_name' : 'th123_node', 'withmpi' : False} -inp1 = {'_options': attrs, 'code' : code, 'fleurinpdata' : fleurinpd}#'parent' : parent_calc, +attrs = {'max_wallclock_seconds': 180, 'resources': {'num_machines': 1}, 'queue_name': 'th123_node', 'withmpi': False} +inp1 = {'_options': attrs, 'code': code, 'fleurinpdata': fleurinpd} #'parent' : parent_calc, #f1 = run(JobCalc, _options=attrs, **inp1) f1 = run(JobCalc, **inp1) - ''' # You can also run Fleur from a Fleur calculation and apply some changes to the input file. #parent_id = JobCalc.pk diff --git a/examples/submission/calculation_tests/check_test_fleur.py b/examples/submission/calculation_tests/check_test_fleur.py index a92162676..a41e7048d 100644 --- a/examples/submission/calculation_tests/check_test_fleur.py +++ b/examples/submission/calculation_tests/check_test_fleur.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import print_function from aiida import load_dbenv, is_dbenv_loaded @@ -13,44 +14,40 @@ try: pk = int(sys.argv[1]) except (KeyError, IndexError): - raise ValueError("Pass a valid PK of a completed calculation") + raise ValueError('Pass a valid PK of a completed calculation') calc = load_node(pk) if calc.get_state() == calc_states.SUBMISSIONFAILED: - raise ValueError("The calculation could not be submitted (failed)") + raise ValueError('The calculation could not be submitted (failed)') elif calc.get_state() == calc_states.FAILED: - raise ValueError("The calculation did fail") + raise ValueError('The calculation did fail') elif calc.get_state() != calc_states.FINISHED: - raise ValueError("The calculation did not complete") + raise ValueError('The calculation did not complete') res = calc.res -print("Test: {}".format(calc.label)) -print("Description: {}".format(calc.description)) -print("Code name in db: {}".format(calc.get_code())) +print('Test: {}'.format(calc.label)) +print('Description: {}'.format(calc.description)) +print('Code name in db: {}'.format(calc.get_code())) #print "Input structure (chemical formula): {}".format(calc.inp.structure.get_formula()) -print("Code name/version: {}".format(res.creator_name)) -print("The following files were retrieved: {}".format(calc.out.retrieved.get_folder_list())) +print('Code name/version: {}'.format(res.creator_name)) +print('The following files were retrieved: {}'.format(calc.out.retrieved.get_folder_list())) #print "Wall time: {} s".format(calc.res.wall_time_seconds) #print "Input wavefunction cutoff: {} Ry".format(calc.inp.parameters.dict.SYSTEM['ecutwfc']) -print("The total energy of the system is {} eV".format(res.energy)) -print("The fermi energy of the system is {} htr".format(res.fermi_energy)) +print('The total energy of the system is {} eV'.format(res.energy)) +print('The fermi energy of the system is {} htr'.format(res.fermi_energy)) if res.number_of_spin_components == 1: - print("Non magnetic calculation, 1 spin component") - print("Charge distance of the system is: {} me/bohr^3".format(res.charge_density)) + print('Non magnetic calculation, 1 spin component') + print('Charge distance of the system is: {} me/bohr^3'.format(res.charge_density)) else: - print("Magnetic calculation, 2 spin components") - print("Charge distance spin 1 of the system is: {} me/bohr^3".format(res.charge_density1)) - print("Charge distance spin 2 of the system is: {} me/bohr^3".format(res.charge_density2)) - print("Spin density distance of the system is: {} me/bohr^3".format(res.spin_density)) - + print('Magnetic calculation, 2 spin components') + print('Charge distance spin 1 of the system is: {} me/bohr^3'.format(res.charge_density1)) + print('Charge distance spin 2 of the system is: {} me/bohr^3'.format(res.charge_density2)) + print('Spin density distance of the system is: {} me/bohr^3'.format(res.spin_density)) + #if calc.res.warnings: # print "List of warnings:" # for warning in calc.res.warnings: # print "- {}".format(warning) #if 'res -print("Log messages: {}".format(get_log_messages(calc))) - - - - +print('Log messages: {}'.format(get_log_messages(calc))) diff --git a/examples/submission/calculation_tests/check_test_inpgen.py b/examples/submission/calculation_tests/check_test_inpgen.py index c54d1fe48..37a67e370 100644 --- a/examples/submission/calculation_tests/check_test_inpgen.py +++ b/examples/submission/calculation_tests/check_test_inpgen.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import print_function from aiida import load_dbenv, is_dbenv_loaded @@ -13,28 +14,28 @@ try: pk = int(sys.argv[1]) except (KeyError, IndexError): - raise ValueError("Pass a valid PK of a completed calculation") + raise ValueError('Pass a valid PK of a completed calculation') calc = load_node(pk) if calc.get_state() == calc_states.SUBMISSIONFAILED: - raise ValueError("The calculation could not be submitted (failed)") + raise ValueError('The calculation could not be submitted (failed)') elif calc.get_state() == calc_states.FAILED: - raise ValueError("The calculation did fail") + raise ValueError('The calculation did fail') elif calc.get_state() != calc_states.FINISHED: - raise ValueError("The calculation did not complete") + raise ValueError('The calculation did not complete') -print("Test: {}".format(calc.label)) -print("Description: {}".format(calc.description)) -print("Code name in db: {}".format(calc.get_code())) -print("Input structure (chemical formula): {}".format(calc.inp.structure.get_formula())) +print('Test: {}'.format(calc.label)) +print('Description: {}'.format(calc.description)) +print('Code name in db: {}'.format(calc.get_code())) +print('Input structure (chemical formula): {}'.format(calc.inp.structure.get_formula())) inp = calc.get_inputs_dict() if 'parameters' in inp: - print("Input parameter dictionary:") + print('Input parameter dictionary:') pprint(calc.inp.parameters.get_dict()) else: - print("no parameters were specified for inpgen input") -print("The following files were retrieved: {}".format(calc.out.retrieved.get_folder_list())) -print("Output nodes produced: {}".format(calc.get_outputs())) + print('no parameters were specified for inpgen input') +print('The following files were retrieved: {}'.format(calc.out.retrieved.get_folder_list())) +print('Output nodes produced: {}'.format(calc.get_outputs())) #print "Wall time: {} s".format(calc.res.wall_time_seconds) #if calc.res.warnings: @@ -42,8 +43,4 @@ # for warning in calc.res.warnings: # print "- {}".format(warning) #if 'res -print("Log messages: {}".format(get_log_messages(calc))) - - - - +print('Log messages: {}'.format(get_log_messages(calc))) diff --git a/examples/submission/calculation_tests/test_inpgen_complex.py b/examples/submission/calculation_tests/test_inpgen_complex.py index 9f2a9adef..2f54a963e 100644 --- a/examples/submission/calculation_tests/test_inpgen_complex.py +++ b/examples/submission/calculation_tests/test_inpgen_complex.py @@ -3,11 +3,10 @@ from __future__ import absolute_import from __future__ import print_function -__copyright__ = (u"Copyright (c), 2016, Forschungszentrum Jülich GmbH, " - "IAS-1/PGI-1, Germany. All rights reserved.") -__license__ = "MIT license, see LICENSE.txt file" -__version__ = "0.27" -__contributors__ = "Jens Broeder" +__copyright__ = (u'Copyright (c), 2016, Forschungszentrum Jülich GmbH, ' 'IAS-1/PGI-1, Germany. All rights reserved.') +__license__ = 'MIT license, see LICENSE.txt file' +__version__ = '0.27' +__contributors__ = 'Jens Broeder' from aiida import load_dbenv, is_dbenv_loaded if not is_dbenv_loaded(): @@ -22,20 +21,18 @@ ################################################################ - ParameterData = DataFactory('parameter') StructureData = DataFactory('structure') try: dontsend = sys.argv[1] - if dontsend == "--dont-send": + if dontsend == '--dont-send': submit_test = True - elif dontsend == "--send": + elif dontsend == '--send': submit_test = False else: raise IndexError except IndexError: - print(("The first parameter can only be either " - "--send or --dont-send"), file=sys.stderr) + print(('The first parameter can only be either ' '--send or --dont-send'), file=sys.stderr) sys.exit(1) try: @@ -49,25 +46,56 @@ ##### code = test_and_get_code(codename, expected_code_type='fleur_inp.fleurinputgen') -bohr_a_0= 0.52917721092 # A - +bohr_a_0 = 0.52917721092 # A # Cr_delta_inp -a = 5.425405929900*bohr_a_0 -cell = [[a,0.,0.],[0.,a,0.],[0.,0.,a]] +a = 5.425405929900 * bohr_a_0 +cell = [[a, 0., 0.], [0., a, 0.], [0., 0., a]] Cr = StructureData(cell=cell) -Cr.append_atom(position=(0.,0.,0.), symbols='Cr', name = 'Cr1') -pos2 =rel_to_abs((1./2., 1./2., 1./2.), cell) -Cr.append_atom(position=pos2, symbols='Cr', name = 'Cr2') -Crp = Dict(dict={ - 'title': 'Cr, bcc chromium, bulk, delta project', - 'atom1':{'element' : 'Cr', 'id': '24.0', 'rmt' : 2.1, 'jri' : 981, 'lmax' : 12, 'lnonsph' : 6, 'lo' : '3s 3p', 'bmu':1.5}, - 'atom2':{'element' : 'Cr', 'id': '24.1', 'rmt' : 2.1, 'jri' : 981, 'lmax' : 12, 'lnonsph' : 6, 'lo' : '3s 3p', 'bmu':1.5}, - 'comp': {'kmax': 5.2, 'gmaxxc' : 12.5, 'gmax' : 15.0}, - 'soc' : {'phi' : 0.0, 'theta' : 0.0}, - 'kpt': {'div1' : 24, 'div2': 24, 'div3' : 24, 'tkb' : 0.0005}}) - -#elements = list(s.get_symbols_set()) +Cr.append_atom(position=(0., 0., 0.), symbols='Cr', name='Cr1') +pos2 = rel_to_abs((1. / 2., 1. / 2., 1. / 2.), cell) +Cr.append_atom(position=pos2, symbols='Cr', name='Cr2') +Crp = Dict( + dict={ + 'title': 'Cr, bcc chromium, bulk, delta project', + 'atom1': { + 'element': 'Cr', + 'id': '24.0', + 'rmt': 2.1, + 'jri': 981, + 'lmax': 12, + 'lnonsph': 6, + 'lo': '3s 3p', + 'bmu': 1.5 + }, + 'atom2': { + 'element': 'Cr', + 'id': '24.1', + 'rmt': 2.1, + 'jri': 981, + 'lmax': 12, + 'lnonsph': 6, + 'lo': '3s 3p', + 'bmu': 1.5 + }, + 'comp': { + 'kmax': 5.2, + 'gmaxxc': 12.5, + 'gmax': 15.0 + }, + 'soc': { + 'phi': 0.0, + 'theta': 0.0 + }, + 'kpt': { + 'div1': 24, + 'div2': 24, + 'div3': 24, + 'tkb': 0.0005 + } + }) + +#elements = list(s.get_symbols_set()) ## For remote codes, it is not necessary to manually set the computer, ## since it is set automatically by new_calc @@ -75,12 +103,12 @@ #calc = code.new_calc(computer=computer) calc = code.new_calc() -calc.label = "Test Fleur inpgen complexer input, multi atom" -calc.description = "Test calculation of the Fleur input generator" +calc.label = 'Test Fleur inpgen complexer input, multi atom' +calc.description = 'Test calculation of the Fleur input generator' calc.set_max_wallclock_seconds(5 * 60) # 5 min # Valid only for Slurm and PBS (using default values for the # number_cpus_per_machine), change for SGE-like schedulers -calc.set_resources({"num_machines": 1}) +calc.set_resources({'num_machines': 1}) calc.set_withmpi(False) ## Otherwise, to specify a given # of cpus per machine, uncomment the following: # calc.set_resources({"num_machines": 1, "num_mpiprocs_per_machine": 8}) @@ -96,20 +124,12 @@ if settings is not None: calc.use_settings(settings) - if submit_test: subfolder, script_filename = calc.submit_test() - print("Test_submit for calculation (uuid='{}')".format( - calc.uuid)) - print("Submit file in {}".format(os.path.join( - os.path.relpath(subfolder.abspath), - script_filename - ))) + print("Test_submit for calculation (uuid='{}')".format(calc.uuid)) + print('Submit file in {}'.format(os.path.join(os.path.relpath(subfolder.abspath), script_filename))) else: calc.store_all() - print("created calculation; calc=Calculation(uuid='{}') # ID={}".format( - calc.uuid, calc.dbnode.pk)) + print("created calculation; calc=Calculation(uuid='{}') # ID={}".format(calc.uuid, calc.dbnode.pk)) calc.submit() - print("submitted calculation; calc=Calculation(uuid='{}') # ID={}".format( - calc.uuid, calc.dbnode.pk)) - + print("submitted calculation; calc=Calculation(uuid='{}') # ID={}".format(calc.uuid, calc.dbnode.pk)) diff --git a/examples/submission/calculation_tests/test_inpgen_minimal.py b/examples/submission/calculation_tests/test_inpgen_minimal.py index 9f17313c3..4d852c398 100644 --- a/examples/submission/calculation_tests/test_inpgen_minimal.py +++ b/examples/submission/calculation_tests/test_inpgen_minimal.py @@ -3,11 +3,10 @@ from __future__ import absolute_import from __future__ import print_function -__copyright__ = (u"Copyright (c), 2016, Forschungszentrum Jülich GmbH, " - "IAS-1/PGI-1, Germany. All rights reserved.") -__license__ = "MIT license, see LICENSE.txt file" -__version__ = "0.27" -__contributors__ = "Jens Broeder" +__copyright__ = (u'Copyright (c), 2016, Forschungszentrum Jülich GmbH, ' 'IAS-1/PGI-1, Germany. All rights reserved.') +__license__ = 'MIT license, see LICENSE.txt file' +__version__ = '0.27' +__contributors__ = 'Jens Broeder' from aiida import load_dbenv, is_dbenv_loaded if not is_dbenv_loaded(): @@ -19,24 +18,20 @@ from aiida.common.example_helpers import test_and_get_code from aiida.plugins import DataFactory - - ################################################################ - ParameterData = DataFactory('parameter') StructureData = DataFactory('structure') try: dontsend = sys.argv[1] - if dontsend == "--dont-send": + if dontsend == '--dont-send': submit_test = True - elif dontsend == "--send": + elif dontsend == '--send': submit_test = False else: raise IndexError except IndexError: - print(("The first parameter can only be either " - "--send or --dont-send"), file=sys.stderr) + print(('The first parameter can only be either ' '--send or --dont-send'), file=sys.stderr) sys.exit(1) try: @@ -51,14 +46,14 @@ code = test_and_get_code(codename, expected_code_type='fleur_inp.fleurinputgen') -# W bcc structure -bohr_a_0= 0.52917721092 # A -a = 3.013812049196*bohr_a_0 -cell = [[-a,a,a],[a,-a,a],[a,a,-a]] +# W bcc structure +bohr_a_0 = 0.52917721092 # A +a = 3.013812049196 * bohr_a_0 +cell = [[-a, a, a], [a, -a, a], [a, a, -a]] s = StructureData(cell=cell) -s.append_atom(position=(0.,0.,0.), symbols='W') - -#elements = list(s.get_symbols_set()) +s.append_atom(position=(0., 0., 0.), symbols='W') + +#elements = list(s.get_symbols_set()) ## For remote codes, it is not necessary to manually set the computer, ## since it is set automatically by new_calc @@ -66,12 +61,12 @@ #calc = code.new_calc(computer=computer) calc = code.new_calc() -calc.label = "Test Fleur inpgen minimal" -calc.description = "Test calculation of the Fleur input generator minimal" +calc.label = 'Test Fleur inpgen minimal' +calc.description = 'Test calculation of the Fleur input generator minimal' calc.set_max_wallclock_seconds(5 * 60) # 5 min # Valid only for Slurm and PBS (using default values for the # number_cpus_per_machine), change for SGE-like schedulers -calc.set_resources({"num_machines": 1}) +calc.set_resources({'num_machines': 1}) calc.set_withmpi(False) ## Otherwise, to specify a given # of cpus per machine, uncomment the following: # calc.set_resources({"num_machines": 1, "num_mpiprocs_per_machine": 8}) @@ -86,20 +81,12 @@ if settings is not None: calc.use_settings(settings) - if submit_test: subfolder, script_filename = calc.submit_test() - print("Test_submit for calculation (uuid='{}')".format( - calc.uuid)) - print("Submit file in {}".format(os.path.join( - os.path.relpath(subfolder.abspath), - script_filename - ))) + print("Test_submit for calculation (uuid='{}')".format(calc.uuid)) + print('Submit file in {}'.format(os.path.join(os.path.relpath(subfolder.abspath), script_filename))) else: calc.store_all() - print("created calculation; calc=Calculation(uuid='{}') # ID={}".format( - calc.uuid, calc.dbnode.pk)) + print("created calculation; calc=Calculation(uuid='{}') # ID={}".format(calc.uuid, calc.dbnode.pk)) calc.submit() - print("submitted calculation; calc=Calculation(uuid='{}') # ID={}".format( - calc.uuid, calc.dbnode.pk)) - + print("submitted calculation; calc=Calculation(uuid='{}') # ID={}".format(calc.uuid, calc.dbnode.pk)) diff --git a/examples/submission/calculation_tests/test_submit_fleur.py b/examples/submission/calculation_tests/test_submit_fleur.py index fa4f50e5a..2e09f826d 100644 --- a/examples/submission/calculation_tests/test_submit_fleur.py +++ b/examples/submission/calculation_tests/test_submit_fleur.py @@ -3,11 +3,10 @@ from __future__ import absolute_import from __future__ import print_function -__copyright__ = (u"Copyright (c), 2016, Forschungszentrum Jülich GmbH, " - "IAS-1/PGI-1, Germany. All rights reserved.") -__license__ = "MIT license, see LICENSE.txt file" -__version__ = "0.27" -__contributors__ = "Jens Broeder" +__copyright__ = (u'Copyright (c), 2016, Forschungszentrum Jülich GmbH, ' 'IAS-1/PGI-1, Germany. All rights reserved.') +__license__ = 'MIT license, see LICENSE.txt file' +__version__ = '0.27' +__contributors__ = 'Jens Broeder' from aiida import load_dbenv, is_dbenv_loaded if not is_dbenv_loaded(): @@ -25,21 +24,19 @@ ################################################################ - ParameterData = DataFactory('parameter') StructureData = DataFactory('structure') FleurinpData = DataFactory('fleur.fleurinp') try: dontsend = sys.argv[1] - if dontsend == "--dont-send": + if dontsend == '--dont-send': submit_test = True - elif dontsend == "--send": + elif dontsend == '--send': submit_test = False else: raise IndexError except IndexError: - print(("The first parameter can only be either " - "--send or --dont-send"), file=sys.stderr) + print(('The first parameter can only be either ' '--send or --dont-send'), file=sys.stderr) sys.exit(1) try: @@ -59,7 +56,7 @@ # get where tests folder is, then relative path #inpxmlfile = '/usr/users/iff_th1/broeder/aiida/github/aiida-fleur/tests/inp_xml_files/W/inp.xml' inpxmlfile = '/Users/broeder/aiida/github/aiida-fleur/examples/inp_xml_files/W/inp.xml' -fleurinp = FleurinpData(files = [inpxmlfile]) +fleurinp = FleurinpData(files=[inpxmlfile]) ## For remote codes, it is not necessary to manually set the computer, ## since it is set automatically by new_calc @@ -67,20 +64,20 @@ #calc = code.new_calc(computer=computer) calc = code.new_calc() -calc.label = "Test Fleur fleur_MPI" -calc.description = "Test calculation of the Fleur code" -calc.set_max_wallclock_seconds(10*60) # 5 min +calc.label = 'Test Fleur fleur_MPI' +calc.description = 'Test calculation of the Fleur code' +calc.set_max_wallclock_seconds(10 * 60) # 5 min # Valid only for Slurm and PBS (using default values for the # number_cpus_per_machine), change for SGE-like schedulers #calc.set_resources({"num_machines": 1}) if run_in_serial_mode: calc.set_withmpi(False) ## Otherwise, to specify a given # of cpus per machine, uncomment the following: -calc.set_resources({"num_machines": 1, "num_mpiprocs_per_machine": 24}) +calc.set_resources({'num_machines': 1, 'num_mpiprocs_per_machine': 24}) #calc.set_resources({"tot_num_mpiprocs" : 8}) #calc.set_custom_scheduler_commands("#BSUB -P jara0043 \n#BSUB -a intelmpi") #calc.set_custom_scheduler_commands("#BSUB -P test-clx \n#BSUB -a intelmpi") -calc.set_custom_scheduler_commands("#SBATCH --partition=batch") +calc.set_custom_scheduler_commands('#SBATCH --partition=batch') if queue is not None: calc.set_queue_name(queue) @@ -91,20 +88,12 @@ if settings is not None: calc.use_settings(settings) - if submit_test: subfolder, script_filename = calc.submit_test() - print("Test_submit for calculation (uuid='{}')".format( - calc.uuid)) - print("Submit file in {}".format(os.path.join( - os.path.relpath(subfolder.abspath), - script_filename - ))) + print("Test_submit for calculation (uuid='{}')".format(calc.uuid)) + print('Submit file in {}'.format(os.path.join(os.path.relpath(subfolder.abspath), script_filename))) else: calc.store_all() - print("created calculation; calc=Calculation(uuid='{}') # ID={}".format( - calc.uuid, calc.dbnode.pk)) + print("created calculation; calc=Calculation(uuid='{}') # ID={}".format(calc.uuid, calc.dbnode.pk)) calc.submit() - print("submitted calculation; calc=Calculation(uuid='{}') # ID={}".format( - calc.uuid, calc.dbnode.pk)) - + print("submitted calculation; calc=Calculation(uuid='{}') # ID={}".format(calc.uuid, calc.dbnode.pk)) diff --git a/examples/submission/calculation_tests/test_submit_fleur_lsf.py b/examples/submission/calculation_tests/test_submit_fleur_lsf.py index 282867083..7badc9d7f 100644 --- a/examples/submission/calculation_tests/test_submit_fleur_lsf.py +++ b/examples/submission/calculation_tests/test_submit_fleur_lsf.py @@ -3,11 +3,10 @@ from __future__ import absolute_import from __future__ import print_function -__copyright__ = (u"Copyright (c), 2016, Forschungszentrum Jülich GmbH, " - "IAS-1/PGI-1, Germany. All rights reserved.") -__license__ = "MIT license, see LICENSE.txt file" -__version__ = "0.27" -__contributors__ = "Jens Broeder" +__copyright__ = (u'Copyright (c), 2016, Forschungszentrum Jülich GmbH, ' 'IAS-1/PGI-1, Germany. All rights reserved.') +__license__ = 'MIT license, see LICENSE.txt file' +__version__ = '0.27' +__contributors__ = 'Jens Broeder' from aiida import load_dbenv, is_dbenv_loaded if not is_dbenv_loaded(): @@ -21,25 +20,23 @@ # If set to True, will ask AiiDA to run in serial mode (i.e., AiiDA will not # invoke the mpirun command in the submission script) -run_in_serial_mode = False#True#False +run_in_serial_mode = False #True#False ################################################################ - ParameterData = DataFactory('parameter') StructureData = DataFactory('structure') FleurinpData = DataFactory('fleur.fleurinp') try: dontsend = sys.argv[1] - if dontsend == "--dont-send": + if dontsend == '--dont-send': submit_test = True - elif dontsend == "--send": + elif dontsend == '--send': submit_test = False else: raise IndexError except IndexError: - print(("The first parameter can only be either " - "--send or --dont-send"), file=sys.stderr) + print(('The first parameter can only be either ' '--send or --dont-send'), file=sys.stderr) sys.exit(1) try: @@ -59,7 +56,7 @@ # get where tests folder is, then relative path inpxmlfile = '/usr/users/iff_th1/broeder/aiida/github/aiida-fleur/tests/inp_xml_files/W/inp.xml' inpxmlfile = '/Users/broeder/aiida/github/aiida-fleur/tests/inp_xml_files/W/inp.xml' -fleurinp = FleurinpData(files = [inpxmlfile]) +fleurinp = FleurinpData(files=[inpxmlfile]) ## For remote codes, it is not necessary to manually set the computer, ## since it is set automatically by new_calc @@ -67,8 +64,8 @@ #calc = code.new_calc(computer=computer) calc = code.new_calc() -calc.label = "Test Fleur fleur_MPI" -calc.description = "Test calculation of the Fleur code" +calc.label = 'Test Fleur fleur_MPI' +calc.description = 'Test calculation of the Fleur code' calc.set_max_wallclock_seconds(600) # 10 min # Valid only for Slurm and PBS (using default values for the # number_cpus_per_machine), change for SGE-like schedulers @@ -77,11 +74,11 @@ calc.set_withmpi(False) ## Otherwise, to specify a given # of cpus per machine, uncomment the following: #calc.set_resources({"num_machines": 1, "num_mpiprocs_per_machine": 12}) -calc.set_resources({"tot_num_mpiprocs" : 4}) +calc.set_resources({'tot_num_mpiprocs': 4}) #calc.set_resources({"tot_num_mpiprocs" : 1}) - -calc.set_custom_scheduler_commands('#BSUB -P jara0043 \n#BSUB -M 1024 \n#BSUB -a intelmpi')# \n#BSUB -R "span[ptile=4]"') +calc.set_custom_scheduler_commands( + '#BSUB -P jara0043 \n#BSUB -M 1024 \n#BSUB -a intelmpi') # \n#BSUB -R "span[ptile=4]"') if queue is not None: calc.set_queue_name(queue) @@ -92,20 +89,12 @@ if settings is not None: calc.use_settings(settings) - if submit_test: subfolder, script_filename = calc.submit_test() - print("Test_submit for calculation (uuid='{}')".format( - calc.uuid)) - print("Submit file in {}".format(os.path.join( - os.path.relpath(subfolder.abspath), - script_filename - ))) + print("Test_submit for calculation (uuid='{}')".format(calc.uuid)) + print('Submit file in {}'.format(os.path.join(os.path.relpath(subfolder.abspath), script_filename))) else: calc.store_all() - print("created calculation; calc=Calculation(uuid='{}') # ID={}".format( - calc.uuid, calc.dbnode.pk)) + print("created calculation; calc=Calculation(uuid='{}') # ID={}".format(calc.uuid, calc.dbnode.pk)) calc.submit() - print("submitted calculation; calc=Calculation(uuid='{}') # ID={}".format( - calc.uuid, calc.dbnode.pk)) - + print("submitted calculation; calc=Calculation(uuid='{}') # ID={}".format(calc.uuid, calc.dbnode.pk)) diff --git a/examples/submission/calculation_tests/test_submit_fleur_lsf_serial.py b/examples/submission/calculation_tests/test_submit_fleur_lsf_serial.py index 8c6623544..f3953ec37 100644 --- a/examples/submission/calculation_tests/test_submit_fleur_lsf_serial.py +++ b/examples/submission/calculation_tests/test_submit_fleur_lsf_serial.py @@ -3,11 +3,10 @@ from __future__ import absolute_import from __future__ import print_function -__copyright__ = (u"Copyright (c), 2016, Forschungszentrum Jülich GmbH, " - "IAS-1/PGI-1, Germany. All rights reserved.") -__license__ = "MIT license, see LICENSE.txt file" -__version__ = "0.27" -__contributors__ = "Jens Broeder" +__copyright__ = (u'Copyright (c), 2016, Forschungszentrum Jülich GmbH, ' 'IAS-1/PGI-1, Germany. All rights reserved.') +__license__ = 'MIT license, see LICENSE.txt file' +__version__ = '0.27' +__contributors__ = 'Jens Broeder' from aiida import load_dbenv, is_dbenv_loaded if not is_dbenv_loaded(): @@ -21,25 +20,23 @@ # If set to True, will ask AiiDA to run in serial mode (i.e., AiiDA will not # invoke the mpirun command in the submission script) -run_in_serial_mode = True#False +run_in_serial_mode = True #False ################################################################ - ParameterData = DataFactory('parameter') StructureData = DataFactory('structure') FleurinpData = DataFactory('fleur.fleurinp') try: dontsend = sys.argv[1] - if dontsend == "--dont-send": + if dontsend == '--dont-send': submit_test = True - elif dontsend == "--send": + elif dontsend == '--send': submit_test = False else: raise IndexError except IndexError: - print(("The first parameter can only be either " - "--send or --dont-send"), file=sys.stderr) + print(('The first parameter can only be either ' '--send or --dont-send'), file=sys.stderr) sys.exit(1) try: @@ -59,7 +56,7 @@ # get where tests folder is, then relative path inpxmlfile = '/usr/users/iff_th1/broeder/aiida/github/aiida-fleur/tests/inp_xml_files/W/inp.xml' inpxmlfile = '/Users/broeder/aiida/github/aiida-fleur/tests/inp_xml_files/W/inp.xml' -fleurinp = FleurinpData(files = [inpxmlfile]) +fleurinp = FleurinpData(files=[inpxmlfile]) ## For remote codes, it is not necessary to manually set the computer, ## since it is set automatically by new_calc @@ -67,8 +64,8 @@ #calc = code.new_calc(computer=computer) calc = code.new_calc() -calc.label = "Test Fleur fleur_MPI" -calc.description = "Test calculation of the Fleur code" +calc.label = 'Test Fleur fleur_MPI' +calc.description = 'Test calculation of the Fleur code' calc.set_max_wallclock_seconds(300) # 5 min # Valid only for Slurm and PBS (using default values for the # number_cpus_per_machine), change for SGE-like schedulers @@ -78,8 +75,7 @@ ## Otherwise, to specify a given # of cpus per machine, uncomment the following: #calc.set_resources({"num_machines": 1, "num_mpiprocs_per_machine": 12}) #calc.set_resources({"tot_num_mpiprocs" : 4}) -calc.set_resources({"tot_num_mpiprocs" : 1}) - +calc.set_resources({'tot_num_mpiprocs': 1}) calc.set_custom_scheduler_commands('#BSUB -P jara0043 \n') @@ -92,20 +88,12 @@ if settings is not None: calc.use_settings(settings) - if submit_test: subfolder, script_filename = calc.submit_test() - print("Test_submit for calculation (uuid='{}')".format( - calc.uuid)) - print("Submit file in {}".format(os.path.join( - os.path.relpath(subfolder.abspath), - script_filename - ))) + print("Test_submit for calculation (uuid='{}')".format(calc.uuid)) + print('Submit file in {}'.format(os.path.join(os.path.relpath(subfolder.abspath), script_filename))) else: calc.store_all() - print("created calculation; calc=Calculation(uuid='{}') # ID={}".format( - calc.uuid, calc.dbnode.pk)) + print("created calculation; calc=Calculation(uuid='{}') # ID={}".format(calc.uuid, calc.dbnode.pk)) calc.submit() - print("submitted calculation; calc=Calculation(uuid='{}') # ID={}".format( - calc.uuid, calc.dbnode.pk)) - + print("submitted calculation; calc=Calculation(uuid='{}') # ID={}".format(calc.uuid, calc.dbnode.pk)) diff --git a/examples/submission/calculation_tests/test_submit_fleur_mpi.py b/examples/submission/calculation_tests/test_submit_fleur_mpi.py index 64138ca10..ef4daf0ff 100644 --- a/examples/submission/calculation_tests/test_submit_fleur_mpi.py +++ b/examples/submission/calculation_tests/test_submit_fleur_mpi.py @@ -3,11 +3,10 @@ from __future__ import absolute_import from __future__ import print_function -__copyright__ = (u"Copyright (c), 2016, Forschungszentrum Jülich GmbH, " - "IAS-1/PGI-1, Germany. All rights reserved.") -__license__ = "MIT license, see LICENSE.txt file" -__version__ = "0.27" -__contributors__ = "Jens Broeder" +__copyright__ = (u'Copyright (c), 2016, Forschungszentrum Jülich GmbH, ' 'IAS-1/PGI-1, Germany. All rights reserved.') +__license__ = 'MIT license, see LICENSE.txt file' +__version__ = '0.27' +__contributors__ = 'Jens Broeder' from aiida import load_dbenv, is_dbenv_loaded if not is_dbenv_loaded(): @@ -25,21 +24,19 @@ ################################################################ - ParameterData = DataFactory('parameter') StructureData = DataFactory('structure') FleurinpData = DataFactory('fleur.fleurinp') try: dontsend = sys.argv[1] - if dontsend == "--dont-send": + if dontsend == '--dont-send': submit_test = True - elif dontsend == "--send": + elif dontsend == '--send': submit_test = False else: raise IndexError except IndexError: - print(("The first parameter can only be either " - "--send or --dont-send"), file=sys.stderr) + print(('The first parameter can only be either ' '--send or --dont-send'), file=sys.stderr) sys.exit(1) try: @@ -48,7 +45,7 @@ codename = None queue = None -queue = 'th1'#'th123_node' +queue = 'th1' #'th123_node' # queue = "th1_small" settings = None ##### @@ -59,7 +56,7 @@ # get where tests folder is, then relative path #inpxmlfile = '/usr/users/iff_th1/broeder/aiida/github/aiida-fleur/tests/inp_xml_files/W/inp.xml' inpxmlfile = '/Users/broeder/aiida/github/aiida-fleur/tests/inp_xml_files/W/inp.xml' -fleurinp = FleurinpData(files = [inpxmlfile]) +fleurinp = FleurinpData(files=[inpxmlfile]) ## For remote codes, it is not necessary to manually set the computer, ## since it is set automatically by new_calc @@ -67,8 +64,8 @@ #calc = code.new_calc(computer=computer) calc = code.new_calc() -calc.label = "Test Fleur fleur_MPI" -calc.description = "Test calculation of the Fleur code" +calc.label = 'Test Fleur fleur_MPI' +calc.description = 'Test calculation of the Fleur code' calc.set_max_wallclock_seconds(3600) # 60 min # Valid only for Slurm and PBS (using default values for the # number_cpus_per_machine), change for SGE-like schedulers @@ -76,7 +73,7 @@ if run_in_serial_mode: calc.set_withmpi(False) ## Otherwise, to specify a given # of cpus per machine, uncomment the following: -calc.set_resources({"num_machines": 2, "num_mpiprocs_per_machine": 12}) +calc.set_resources({'num_machines': 2, 'num_mpiprocs_per_machine': 12}) #calc.set_resources({"tot_num_mpiprocs" : 8}) # unfortunatly this does not work @@ -93,20 +90,12 @@ if settings is not None: calc.use_settings(settings) - if submit_test: subfolder, script_filename = calc.submit_test() - print("Test_submit for calculation (uuid='{}')".format( - calc.uuid)) - print("Submit file in {}".format(os.path.join( - os.path.relpath(subfolder.abspath), - script_filename - ))) + print("Test_submit for calculation (uuid='{}')".format(calc.uuid)) + print('Submit file in {}'.format(os.path.join(os.path.relpath(subfolder.abspath), script_filename))) else: calc.store_all() - print("created calculation; calc=Calculation(uuid='{}') # ID={}".format( - calc.uuid, calc.dbnode.pk)) + print("created calculation; calc=Calculation(uuid='{}') # ID={}".format(calc.uuid, calc.dbnode.pk)) calc.submit() - print("submitted calculation; calc=Calculation(uuid='{}') # ID={}".format( - calc.uuid, calc.dbnode.pk)) - + print("submitted calculation; calc=Calculation(uuid='{}') # ID={}".format(calc.uuid, calc.dbnode.pk)) diff --git a/examples/submission/calculation_tests/test_submit_inpgen_calc.py b/examples/submission/calculation_tests/test_submit_inpgen_calc.py index b701e9474..5b06c426a 100644 --- a/examples/submission/calculation_tests/test_submit_inpgen_calc.py +++ b/examples/submission/calculation_tests/test_submit_inpgen_calc.py @@ -3,11 +3,10 @@ from __future__ import absolute_import from __future__ import print_function -__copyright__ = (u"Copyright (c), 2016, Forschungszentrum Jülich GmbH, " - "IAS-1/PGI-1, Germany. All rights reserved.") -__license__ = "MIT license, see LICENSE.txt file" -__version__ = "0.27" -__contributors__ = "Jens Broeder" +__copyright__ = (u'Copyright (c), 2016, Forschungszentrum Jülich GmbH, ' 'IAS-1/PGI-1, Germany. All rights reserved.') +__license__ = 'MIT license, see LICENSE.txt file' +__version__ = '0.27' +__contributors__ = 'Jens Broeder' from aiida import load_dbenv, is_dbenv_loaded if not is_dbenv_loaded(): @@ -20,23 +19,20 @@ from aiida.plugins import DataFactory, CalculationFactory, load_node from aiida_fleur.calculation.fleurinputgen import FleurinputgenCalculation as calc - ################################################################ - ParameterData = DataFactory('parameter') StructureData = DataFactory('structure') try: dontsend = sys.argv[1] - if dontsend == "--dont-send": + if dontsend == '--dont-send': submit_test = True - elif dontsend == "--send": + elif dontsend == '--send': submit_test = False else: raise IndexError except IndexError: - print(("The first parameter can only be either " - "--send or --dont-send"), file=sys.stderr) + print(('The first parameter can only be either ' '--send or --dont-send'), file=sys.stderr) sys.exit(1) try: @@ -51,31 +47,33 @@ code = test_and_get_code(codename, expected_code_type='fleur.inpgen') -# W bcc structure -bohr_a_0= 0.52917721092 # A -a = 3.013812049196*bohr_a_0 -cell = [[-a,a,a],[a,-a,a],[a,a,-a]] +# W bcc structure +bohr_a_0 = 0.52917721092 # A +a = 3.013812049196 * bohr_a_0 +cell = [[-a, a, a], [a, -a, a], [a, a, -a]] s = StructureData(cell=cell) -s.append_atom(position=(0.,0.,0.), symbols='W') -parameters = Dict(dict={ - 'atom':{ - 'element' : 'W', - 'jri' : 833, - 'rmt' : 2.3, - 'dx' : 0.015, - 'lmax' : 8, - 'lo' : '5p', - 'econfig': '[Kr] 5s2 4d10 4f14| 5p6 5d4 6s2', - }, - 'comp': { - 'kmax': 3.5, - 'gmax': 2.9, - }, - 'kpt': { - 'nkpt': 200, - }}) -#s=load_node(5814) -#elements = list(s.get_symbols_set()) +s.append_atom(position=(0., 0., 0.), symbols='W') +parameters = Dict( + dict={ + 'atom': { + 'element': 'W', + 'jri': 833, + 'rmt': 2.3, + 'dx': 0.015, + 'lmax': 8, + 'lo': '5p', + 'econfig': '[Kr] 5s2 4d10 4f14| 5p6 5d4 6s2', + }, + 'comp': { + 'kmax': 3.5, + 'gmax': 2.9, + }, + 'kpt': { + 'nkpt': 200, + } + }) +#s=load_node(5814) +#elements = list(s.get_symbols_set()) ## For remote codes, it is not necessary to manually set the computer, ## since it is set automatically by new_calc @@ -85,16 +83,16 @@ calc = code.new_calc() #calc = CalculationFactory('fleur.inpgen') print(calc, type(calc)) -calc.label = "Test Fleur inpgen" -calc.description = "Test calculation of the Fleur input generator" +calc.label = 'Test Fleur inpgen' +calc.description = 'Test calculation of the Fleur input generator' calc.set_max_wallclock_seconds(300) # 5 min # Valid only for Slurm and PBS (using default values for the # number_cpus_per_machine), change for SGE-like schedulers -calc.set_resources({"num_machines": 1}) +calc.set_resources({'num_machines': 1}) calc.set_withmpi(False) calc.use_code(code) ## Otherwise, to specify a given # of cpus per machine, uncomment the following: -calc.set_resources({"num_machines": 1, "num_mpiprocs_per_machine": 8}) +calc.set_resources({'num_machines': 1, 'num_mpiprocs_per_machine': 8}) #calc.set_resources({"tot_num_mpiprocs" : 1}) #calc.set_custom_scheduler_commands("#SBATCH --account=ch3") @@ -111,17 +109,10 @@ if submit_test: subfolder, script_filename = calc.submit_test() - print("Test_submit for calculation (uuid='{}')".format( - calc.uuid)) - print("Submit file in {}".format(os.path.join( - os.path.relpath(subfolder.abspath), - script_filename - ))) + print("Test_submit for calculation (uuid='{}')".format(calc.uuid)) + print('Submit file in {}'.format(os.path.join(os.path.relpath(subfolder.abspath), script_filename))) else: calc.store_all() - print("created calculation; calc=Calculation(uuid='{}') # ID={}".format( - calc.uuid, calc.dbnode.pk)) + print("created calculation; calc=Calculation(uuid='{}') # ID={}".format(calc.uuid, calc.dbnode.pk)) calc.submit() - print("submitted calculation; calc=Calculation(uuid='{}') # ID={}".format( - calc.uuid, calc.dbnode.pk)) - + print("submitted calculation; calc=Calculation(uuid='{}') # ID={}".format(calc.uuid, calc.dbnode.pk)) diff --git a/examples/submission/calculation_tests/test_submit_inpgen_process.py b/examples/submission/calculation_tests/test_submit_inpgen_process.py index a7f31c095..c2506015b 100644 --- a/examples/submission/calculation_tests/test_submit_inpgen_process.py +++ b/examples/submission/calculation_tests/test_submit_inpgen_process.py @@ -1,43 +1,34 @@ -#!/usr/bin/env runaiida # -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import print_function -__copyright__ = (u"Copyright (c), 2016, Forschungszentrum Jülich GmbH, " - "IAS-1/PGI-1, Germany. All rights reserved.") -__license__ = "MIT license, see LICENSE.txt file" -__version__ = "0.27" -__contributors__ = "Jens Broeder" -from aiida import load_dbenv, is_dbenv_loaded -if not is_dbenv_loaded(): - load_dbenv() +from aiida import load_profile +load_profile() import sys import os -from aiida.common.example_helpers import test_and_get_code -from aiida.plugins import DataFactory, CalculationFactory, load_node -from aiida_fleur.calculation.fleurinputgen import FleurinputgenCalculation# as calc -from aiida.engine.run import submit, run - +from aiida.orm import load_node, Code +from aiida.plugins import DataFactory, CalculationFactory +from aiida_fleur.calculation.fleurinputgen import FleurinputgenCalculation # as calc +from aiida.engine import submit, run +from aiida.common.exceptions import NotExistent ################################################################ - -ParameterData = DataFactory('parameter') +Dict = DataFactory('dict') StructureData = DataFactory('structure') try: dontsend = sys.argv[1] - if dontsend == "--dont-send": + if dontsend == '--dont-send': submit_test = True - elif dontsend == "--send": + elif dontsend == '--send': submit_test = False else: raise IndexError except IndexError: - print(("The first parameter can only be either " - "--send or --dont-send"), file=sys.stderr) + print(('The first parameter can only be either ' '--send or --dont-send'), file=sys.stderr) sys.exit(1) try: @@ -50,113 +41,93 @@ settings = None ##### -code = test_and_get_code(codename, expected_code_type='fleur.inpgen') +expected_code_type = 'fleur.inpgen' -# W bcc structure -bohr_a_0= 0.52917721092 # A -a = 3.013812049196*bohr_a_0 -cell = [[-a,a,a],[a,-a,a],[a,a,-a]] +try: + if codename is None: + raise ValueError(message='codename is None') + code = Code.get_from_string(codename) + if code.get_input_plugin_name() != expected_code_type: + raise ValueError +except (NotExistent, ValueError): + print('codename {} does not exist or is not of the expected type : {}'.format(codename, expected_code_type)) + +# W bcc structure +bohr_a_0 = 0.52917721092 # A +a = 3.013812049196 * bohr_a_0 +cell = [[-a, a, a], [a, -a, a], [a, a, -a]] s = StructureData(cell=cell) -s.append_atom(position=(0.,0.,0.), symbols='W') -parameters = Dict(dict={ - 'atom':{ - 'element' : 'W', - 'jri' : 833, - 'rmt' : 2.3, - 'dx' : 0.015, - 'lmax' : 8, - 'lo' : '5p', - 'econfig': '[Kr] 5s2 4d10 4f14| 5p6 5d4 6s2', - }, - 'comp': { - 'kmax': 3.5, - 'gmax': 2.9, - }, - 'kpt': { - 'nkpt': 200, - }}) -#s=load_node(5814) -#elements = list(s.get_symbols_set()) - -## For remote codes, it is not necessary to manually set the computer, -## since it is set automatically by new_calc -#computer = code.get_remote_computer() -#calc = code.new_calc(computer=computer) -calc = FleurinputgenCalculation() -#print calc -#calc.label = 'Test inpgen run' -print(('set label {}'.format(calc.label))) -JobCalc = calc.process() -print((JobCalc.calc)) -print(JobCalc) -#print(JobCalc.label) -#JobCalc.calc.label = 'Test inpgen run' -#print(JobCalc.calc) -#print(JobCalc.label) +s.append_atom(position=(0., 0., 0.), symbols='W') +parameters = Dict( + dict={ + 'atom': { + 'element': 'W', + 'jri': 833, + 'rmt': 2.3, + 'dx': 0.015, + 'lmax': 8, + 'lo': '5p', + 'econfig': '[Kr] 5s2 4d10 4f14| 5p6 5d4 6s2', + }, + 'comp': { + 'kmax': 3.5, + 'gmax': 2.9, + }, + 'kpt': { + 'nkpt': 200, + } + }) +JobCalc = FleurinputgenCalculation label = 'Test inpgen run' -description = 'Test inpgen run on W' +description = 'Test inpgen run on W' label = 'fleur_scf_wc inpgen on W' description = '|fleur_scf_wc| inpgen on W, pbc(True, True, True)' -attrs ={'max_wallclock_seconds' :180, - 'resources' : {"num_machines": 1}, - 'withmpi' : False}#, - #'label' : 'Test inpgen run'}#, - #'description' : 'Test inpgen run on W' } -inp = {'structure' : s, 'parameters' : parameters, 'code' : code, '_options' : attrs, '_label' : label, '_description' : description} - -#f = run(JobCalc, _options=attrs, **inp) -#fleurinp= f['fleurinpData'] - -''' -calc = code.new_calc() -#calc = CalculationFactory('fleur.inpgen') -print calc, type(calc) -calc.label = "Test Fleur inpgen" -calc.description = "Test calculation of the Fleur input generator" -calc.set_max_wallclock_seconds(300) # 5 min -# Valid only for Slurm and PBS (using default values for the -# number_cpus_per_machine), change for SGE-like schedulers -calc.set_resources({"num_machines": 1}) -calc.set_withmpi(False) -calc.use_code(code) -## Otherwise, to specify a given # of cpus per machine, uncomment the following: -calc.set_resources({"num_machines": 1, "num_mpiprocs_per_machine": 8}) -#calc.set_resources({"tot_num_mpiprocs" : 1}) - -#calc.set_custom_scheduler_commands("#SBATCH --account=ch3") -#calc.set_custom_scheduler_commands("#BSUB -P jara0043 \n#BSUB -x") - -if queue is not None: - calc.set_queue_name(queue) - -calc.use_structure(s) -calc.use_parameters(parameters) - -if settings is not None: - calc.use_settings(settings) -''' +attrs = {'resources': {'num_machines': 1, 'num_mpiprocs_per_machine': 1}, 'withmpi': False} # , + +inp = { + 'structure': s, + 'parameters': parameters, + 'code': code, + 'metadata': { + 'options': { + 'resources': { + 'num_machines': 1, + 'num_mpiprocs_per_machine': 1 + }, + 'withmpi': False + } + } +} + +inputs = { + 'structure': s, + 'parameters': parameters, + 'metadata': { + 'options': { + 'withmpi': False, + 'resources': { + 'num_machines': 1, + 'num_mpiprocs_per_machine': 1 + } + } + } +} +# 'label': label, 'description': description}} if submit_test: - #subfolder, script_filename = calc.submit_test() - #print "Test_submit for calculation (uuid='{}')".format( + # subfolder, script_filename = calc.submit_test() + # print "Test_submit for calculation (uuid='{}')".format( # calc.uuid) - #print "Submit file in {}".format(os.path.join( + # print "Submit file in {}".format(os.path.join( # os.path.relpath(subfolder.abspath), # script_filename - #)) + # )) + #JobCalc. pass else: - #future = submit(JobCalc, _options=attrs, _label=label, _description=description, **inp) - future = submit(JobCalc, **inp) - #calc.store_all() + # future = submit(JobCalc, _options=attrs, _label=label, _description=description, **inp) + future = submit(JobCalc, code=code, **inputs) + # calc.store_all() print('submited') print(future) - print((JobCalc.calc)) - - #print "created calculation; calc=Calculation(uuid='{}') # ID={}".format( - # JobCalc.uuid, JobCalc.dbnode.pk) - #calc.submit() - #print "submitted calculation; calc=Calculation(uuid='{}') # ID={}".format( - # calc.uuid, calc.dbnode.pk) - diff --git a/examples/submission/fleur_specific_tests/test_Bi2Te3_fleur.py b/examples/submission/fleur_specific_tests/test_Bi2Te3_fleur.py index c4e4e4670..ba758ba5d 100644 --- a/examples/submission/fleur_specific_tests/test_Bi2Te3_fleur.py +++ b/examples/submission/fleur_specific_tests/test_Bi2Te3_fleur.py @@ -3,11 +3,10 @@ from __future__ import absolute_import from __future__ import print_function -__copyright__ = (u"Copyright (c), 2016, Forschungszentrum Jülich GmbH, " - "IAS-1/PGI-1, Germany. All rights reserved.") -__license__ = "MIT license, see LICENSE.txt file" -__version__ = "0.27" -__contributors__ = "Jens Broeder" +__copyright__ = (u'Copyright (c), 2016, Forschungszentrum Jülich GmbH, ' 'IAS-1/PGI-1, Germany. All rights reserved.') +__license__ = 'MIT license, see LICENSE.txt file' +__version__ = '0.27' +__contributors__ = 'Jens Broeder' from aiida import load_dbenv, is_dbenv_loaded if not is_dbenv_loaded(): @@ -21,25 +20,23 @@ # If set to True, will ask AiiDA to run in serial mode (i.e., AiiDA will not # invoke the mpirun command in the submission script) -run_in_serial_mode = True#False +run_in_serial_mode = True #False ################################################################ - ParameterData = DataFactory('parameter') StructureData = DataFactory('structure') FleurinpData = DataFactory('fleur.fleurinp') try: dontsend = sys.argv[1] - if dontsend == "--dont-send": + if dontsend == '--dont-send': submit_test = True - elif dontsend == "--send": + elif dontsend == '--send': submit_test = False else: raise IndexError except IndexError: - print(("The first parameter can only be either " - "--send or --dont-send"), file=sys.stderr) + print(('The first parameter can only be either ' '--send or --dont-send'), file=sys.stderr) sys.exit(1) try: @@ -59,7 +56,7 @@ inpxmlfile = '/usr/users/iff_th1/broeder/aiida/github/aiida_fleur_plugin/tests/inp_xml_files/Bi2Te3XML/files/inp.xml' enpara = '/usr/users/iff_th1/broeder/aiida/github/aiida_fleur_plugin/tests/inp_xml_files/Bi2Te3XML/files/enpara' -fleurinp = FleurinpData(files = [inpxmlfile, enpara]) +fleurinp = FleurinpData(files=[inpxmlfile, enpara]) print(fleurinp.files) ## For remote codes, it is not necessary to manually set the computer, ## since it is set automatically by new_calc @@ -67,14 +64,14 @@ #calc = code.new_calc(computer=computer) calc = code.new_calc() -calc.label = "Bi2Te3 Fleur test" -calc.description = ("Simple test of Fleur with one step:" - "1.Generate a starting density and run a single iteration " - "and test for ef, total energy and orbital moment. Uses: SOC,LOs") +calc.label = 'Bi2Te3 Fleur test' +calc.description = ('Simple test of Fleur with one step:' + '1.Generate a starting density and run a single iteration ' + 'and test for ef, total energy and orbital moment. Uses: SOC,LOs') calc.set_max_wallclock_seconds(5 * 60) # 5 min # Valid only for Slurm and PBS (using default values for the # number_cpus_per_machine), change for SGE-like schedulers -calc.set_resources({"num_machines": 1}) +calc.set_resources({'num_machines': 1}) if run_in_serial_mode: calc.set_withmpi(False) ## Otherwise, to specify a given # of cpus per machine, uncomment the following: @@ -91,20 +88,12 @@ if settings is not None: calc.use_settings(settings) - if submit_test: subfolder, script_filename = calc.submit_test() - print("Test_submit for calculation (uuid='{}')".format( - calc.uuid)) - print("Submit file in {}".format(os.path.join( - os.path.relpath(subfolder.abspath), - script_filename - ))) + print("Test_submit for calculation (uuid='{}')".format(calc.uuid)) + print('Submit file in {}'.format(os.path.join(os.path.relpath(subfolder.abspath), script_filename))) else: calc.store_all() - print("created calculation; calc=Calculation(uuid='{}') # ID={}".format( - calc.uuid, calc.dbnode.pk)) + print("created calculation; calc=Calculation(uuid='{}') # ID={}".format(calc.uuid, calc.dbnode.pk)) calc.submit() - print("submitted calculation; calc=Calculation(uuid='{}') # ID={}".format( - calc.uuid, calc.dbnode.pk)) - + print("submitted calculation; calc=Calculation(uuid='{}') # ID={}".format(calc.uuid, calc.dbnode.pk)) diff --git a/examples/submission/fleur_specific_tests/test_CuBand_fleur.py b/examples/submission/fleur_specific_tests/test_CuBand_fleur.py index 195576d81..ecd0ef497 100644 --- a/examples/submission/fleur_specific_tests/test_CuBand_fleur.py +++ b/examples/submission/fleur_specific_tests/test_CuBand_fleur.py @@ -3,11 +3,10 @@ from __future__ import absolute_import from __future__ import print_function -__copyright__ = (u"Copyright (c), 2016, Forschungszentrum Jülich GmbH, " - "IAS-1/PGI-1, Germany. All rights reserved.") -__license__ = "MIT license, see LICENSE.txt file" -__version__ = "0.27" -__contributors__ = "Jens Broeder" +__copyright__ = (u'Copyright (c), 2016, Forschungszentrum Jülich GmbH, ' 'IAS-1/PGI-1, Germany. All rights reserved.') +__license__ = 'MIT license, see LICENSE.txt file' +__version__ = '0.27' +__contributors__ = 'Jens Broeder' from aiida import load_dbenv, is_dbenv_loaded if not is_dbenv_loaded(): @@ -21,25 +20,23 @@ # If set to True, will ask AiiDA to run in serial mode (i.e., AiiDA will not # invoke the mpirun command in the submission script) -run_in_serial_mode = True#False +run_in_serial_mode = True #False ################################################################ - ParameterData = DataFactory('parameter') StructureData = DataFactory('structure') FleurinpData = DataFactory('fleur.fleurinp') try: dontsend = sys.argv[1] - if dontsend == "--dont-send": + if dontsend == '--dont-send': submit_test = True - elif dontsend == "--send": + elif dontsend == '--send': submit_test = False else: raise IndexError except IndexError: - print(("The first parameter can only be either " - "--send or --dont-send"), file=sys.stderr) + print(('The first parameter can only be either ' '--send or --dont-send'), file=sys.stderr) sys.exit(1) try: @@ -59,7 +56,7 @@ inpxmlfile = '/usr/users/iff_th1/broeder/aiida/github/aiida_fleur_plugin/tests/inp_xml_files/CuBandXML/files/inp.xml' enpara = '/usr/users/iff_th1/broeder/aiida/github/aiida_fleur_plugin/tests/inp_xml_files/CuBandXML/files/enpara' -fleurinp = FleurinpData(files = [inpxmlfile, enpara]) +fleurinp = FleurinpData(files=[inpxmlfile, enpara]) print(fleurinp.files) ## For remote codes, it is not necessary to manually set the computer, ## since it is set automatically by new_calc @@ -67,14 +64,14 @@ #calc = code.new_calc(computer=computer) calc = code.new_calc() -calc.label = "Cu Band Fleur test" -calc.description = ("Simple test of Fleur band structure calculation with XML input with one step:" - "1.Generate a starting density, run 1 iteration, and generate band structure." - "Ensure that the files are created.") +calc.label = 'Cu Band Fleur test' +calc.description = ('Simple test of Fleur band structure calculation with XML input with one step:' + '1.Generate a starting density, run 1 iteration, and generate band structure.' + 'Ensure that the files are created.') calc.set_max_wallclock_seconds(5 * 60) # 5 min # Valid only for Slurm and PBS (using default values for the # number_cpus_per_machine), change for SGE-like schedulers -calc.set_resources({"num_machines": 1}) +calc.set_resources({'num_machines': 1}) if run_in_serial_mode: calc.set_withmpi(False) ## Otherwise, to specify a given # of cpus per machine, uncomment the following: @@ -91,20 +88,12 @@ if settings is not None: calc.use_settings(settings) - if submit_test: subfolder, script_filename = calc.submit_test() - print("Test_submit for calculation (uuid='{}')".format( - calc.uuid)) - print("Submit file in {}".format(os.path.join( - os.path.relpath(subfolder.abspath), - script_filename - ))) + print("Test_submit for calculation (uuid='{}')".format(calc.uuid)) + print('Submit file in {}'.format(os.path.join(os.path.relpath(subfolder.abspath), script_filename))) else: calc.store_all() - print("created calculation; calc=Calculation(uuid='{}') # ID={}".format( - calc.uuid, calc.dbnode.pk)) + print("created calculation; calc=Calculation(uuid='{}') # ID={}".format(calc.uuid, calc.dbnode.pk)) calc.submit() - print("submitted calculation; calc=Calculation(uuid='{}') # ID={}".format( - calc.uuid, calc.dbnode.pk)) - + print("submitted calculation; calc=Calculation(uuid='{}') # ID={}".format(calc.uuid, calc.dbnode.pk)) diff --git a/examples/submission/fleur_specific_tests/test_CuBulk_fleur.py b/examples/submission/fleur_specific_tests/test_CuBulk_fleur.py index 8dafc638d..a78cb6ab3 100644 --- a/examples/submission/fleur_specific_tests/test_CuBulk_fleur.py +++ b/examples/submission/fleur_specific_tests/test_CuBulk_fleur.py @@ -3,11 +3,10 @@ from __future__ import absolute_import from __future__ import print_function -__copyright__ = (u"Copyright (c), 2016, Forschungszentrum Jülich GmbH, " - "IAS-1/PGI-1, Germany. All rights reserved.") -__license__ = "MIT license, see LICENSE.txt file" -__version__ = "0.27" -__contributors__ = "Jens Broeder" +__copyright__ = (u'Copyright (c), 2016, Forschungszentrum Jülich GmbH, ' 'IAS-1/PGI-1, Germany. All rights reserved.') +__license__ = 'MIT license, see LICENSE.txt file' +__version__ = '0.27' +__contributors__ = 'Jens Broeder' from aiida import load_dbenv, is_dbenv_loaded if not is_dbenv_loaded(): @@ -21,25 +20,23 @@ # If set to True, will ask AiiDA to run in serial mode (i.e., AiiDA will not # invoke the mpirun command in the submission script) -run_in_serial_mode = True#False +run_in_serial_mode = True #False ################################################################ - ParameterData = DataFactory('parameter') StructureData = DataFactory('structure') FleurinpData = DataFactory('fleur.fleurinp') try: dontsend = sys.argv[1] - if dontsend == "--dont-send": + if dontsend == '--dont-send': submit_test = True - elif dontsend == "--send": + elif dontsend == '--send': submit_test = False else: raise IndexError except IndexError: - print(("The first parameter can only be either " - "--send or --dont-send"), file=sys.stderr) + print(('The first parameter can only be either ' '--send or --dont-send'), file=sys.stderr) sys.exit(1) try: @@ -59,7 +56,7 @@ inpxmlfile = '/usr/users/iff_th1/broeder/aiida/github/aiida_fleur_plugin/tests/inp_xml_files/CuBulkXML/files/inp.xml' enpara = '/usr/users/iff_th1/broeder/aiida/github/aiida_fleur_plugin/tests/inp_xml_files/CuBulkXML/files/enpara' -fleurinp = FleurinpData(files = [inpxmlfile, enpara]) +fleurinp = FleurinpData(files=[inpxmlfile, enpara]) print(fleurinp.files) ## For remote codes, it is not necessary to manually set the computer, ## since it is set automatically by new_calc @@ -67,14 +64,14 @@ #calc = code.new_calc(computer=computer) calc = code.new_calc() -calc.label = "Cu Bulk Fleur test" -calc.description = ("Simple test of Fleur with XML input with one step:" - "1.Generate a starting density and run 1 iteration " - "and compare fermi-energy & total energy") +calc.label = 'Cu Bulk Fleur test' +calc.description = ('Simple test of Fleur with XML input with one step:' + '1.Generate a starting density and run 1 iteration ' + 'and compare fermi-energy & total energy') calc.set_max_wallclock_seconds(5 * 60) # 5 min # Valid only for Slurm and PBS (using default values for the # number_cpus_per_machine), change for SGE-like schedulers -calc.set_resources({"num_machines": 1}) +calc.set_resources({'num_machines': 1}) if run_in_serial_mode: calc.set_withmpi(False) ## Otherwise, to specify a given # of cpus per machine, uncomment the following: @@ -91,20 +88,12 @@ if settings is not None: calc.use_settings(settings) - if submit_test: subfolder, script_filename = calc.submit_test() - print("Test_submit for calculation (uuid='{}')".format( - calc.uuid)) - print("Submit file in {}".format(os.path.join( - os.path.relpath(subfolder.abspath), - script_filename - ))) + print("Test_submit for calculation (uuid='{}')".format(calc.uuid)) + print('Submit file in {}'.format(os.path.join(os.path.relpath(subfolder.abspath), script_filename))) else: calc.store_all() - print("created calculation; calc=Calculation(uuid='{}') # ID={}".format( - calc.uuid, calc.dbnode.pk)) + print("created calculation; calc=Calculation(uuid='{}') # ID={}".format(calc.uuid, calc.dbnode.pk)) calc.submit() - print("submitted calculation; calc=Calculation(uuid='{}') # ID={}".format( - calc.uuid, calc.dbnode.pk)) - + print("submitted calculation; calc=Calculation(uuid='{}') # ID={}".format(calc.uuid, calc.dbnode.pk)) diff --git a/examples/submission/fleur_specific_tests/test_CuDOS_fleur.py b/examples/submission/fleur_specific_tests/test_CuDOS_fleur.py index 0f88ec5bb..3ffb3f181 100644 --- a/examples/submission/fleur_specific_tests/test_CuDOS_fleur.py +++ b/examples/submission/fleur_specific_tests/test_CuDOS_fleur.py @@ -3,11 +3,10 @@ from __future__ import absolute_import from __future__ import print_function -__copyright__ = (u"Copyright (c), 2016, Forschungszentrum Jülich GmbH, " - "IAS-1/PGI-1, Germany. All rights reserved.") -__license__ = "MIT license, see LICENSE.txt file" -__version__ = "0.27" -__contributors__ = "Jens Broeder" +__copyright__ = (u'Copyright (c), 2016, Forschungszentrum Jülich GmbH, ' 'IAS-1/PGI-1, Germany. All rights reserved.') +__license__ = 'MIT license, see LICENSE.txt file' +__version__ = '0.27' +__contributors__ = 'Jens Broeder' from aiida import load_dbenv, is_dbenv_loaded if not is_dbenv_loaded(): @@ -21,25 +20,23 @@ # If set to True, will ask AiiDA to run in serial mode (i.e., AiiDA will not # invoke the mpirun command in the submission script) -run_in_serial_mode = True#False +run_in_serial_mode = True #False ################################################################ - ParameterData = DataFactory('parameter') StructureData = DataFactory('structure') FleurinpData = DataFactory('fleur.fleurinp') try: dontsend = sys.argv[1] - if dontsend == "--dont-send": + if dontsend == '--dont-send': submit_test = True - elif dontsend == "--send": + elif dontsend == '--send': submit_test = False else: raise IndexError except IndexError: - print(("The first parameter can only be either " - "--send or --dont-send"), file=sys.stderr) + print(('The first parameter can only be either ' '--send or --dont-send'), file=sys.stderr) sys.exit(1) try: @@ -59,7 +56,7 @@ inpxmlfile = '/usr/users/iff_th1/broeder/aiida/github/aiida_fleur_plugin/tests/inp_xml_files/CuDOSXML/files/inp.xml' enpara = '/usr/users/iff_th1/broeder/aiida/github/aiida_fleur_plugin/tests/inp_xml_files/CuDOSXML/files/enpara' -fleurinp = FleurinpData(files = [inpxmlfile, enpara]) +fleurinp = FleurinpData(files=[inpxmlfile, enpara]) print(fleurinp.files) ## For remote codes, it is not necessary to manually set the computer, ## since it is set automatically by new_calc @@ -67,14 +64,14 @@ #calc = code.new_calc(computer=computer) calc = code.new_calc() -calc.label = "Cu DOS Fleur test" -calc.description = ("Simple test of Fleur DOS calculation with XML input with one step:" - "1.Generate a starting density, run 1 iteration, and generate DOS." - "Ensure that the files are created.") +calc.label = 'Cu DOS Fleur test' +calc.description = ('Simple test of Fleur DOS calculation with XML input with one step:' + '1.Generate a starting density, run 1 iteration, and generate DOS.' + 'Ensure that the files are created.') calc.set_max_wallclock_seconds(5 * 60) # 5 min # Valid only for Slurm and PBS (using default values for the # number_cpus_per_machine), change for SGE-like schedulers -calc.set_resources({"num_machines": 1}) +calc.set_resources({'num_machines': 1}) if run_in_serial_mode: calc.set_withmpi(False) ## Otherwise, to specify a given # of cpus per machine, uncomment the following: @@ -91,20 +88,12 @@ if settings is not None: calc.use_settings(settings) - if submit_test: subfolder, script_filename = calc.submit_test() - print("Test_submit for calculation (uuid='{}')".format( - calc.uuid)) - print("Submit file in {}".format(os.path.join( - os.path.relpath(subfolder.abspath), - script_filename - ))) + print("Test_submit for calculation (uuid='{}')".format(calc.uuid)) + print('Submit file in {}'.format(os.path.join(os.path.relpath(subfolder.abspath), script_filename))) else: calc.store_all() - print("created calculation; calc=Calculation(uuid='{}') # ID={}".format( - calc.uuid, calc.dbnode.pk)) + print("created calculation; calc=Calculation(uuid='{}') # ID={}".format(calc.uuid, calc.dbnode.pk)) calc.submit() - print("submitted calculation; calc=Calculation(uuid='{}') # ID={}".format( - calc.uuid, calc.dbnode.pk)) - + print("submitted calculation; calc=Calculation(uuid='{}') # ID={}".format(calc.uuid, calc.dbnode.pk)) diff --git a/examples/submission/fleur_specific_tests/test_Fe_1lXML_fleur.py b/examples/submission/fleur_specific_tests/test_Fe_1lXML_fleur.py index 92b90d51d..12ee9c5f8 100644 --- a/examples/submission/fleur_specific_tests/test_Fe_1lXML_fleur.py +++ b/examples/submission/fleur_specific_tests/test_Fe_1lXML_fleur.py @@ -3,11 +3,10 @@ from __future__ import absolute_import from __future__ import print_function -__copyright__ = (u"Copyright (c), 2016, Forschungszentrum Jülich GmbH, " - "IAS-1/PGI-1, Germany. All rights reserved.") -__license__ = "MIT license, see LICENSE.txt file" -__version__ = "0.27" -__contributors__ = "Jens Broeder" +__copyright__ = (u'Copyright (c), 2016, Forschungszentrum Jülich GmbH, ' 'IAS-1/PGI-1, Germany. All rights reserved.') +__license__ = 'MIT license, see LICENSE.txt file' +__version__ = '0.27' +__contributors__ = 'Jens Broeder' from aiida import load_dbenv, is_dbenv_loaded if not is_dbenv_loaded(): @@ -21,25 +20,23 @@ # If set to True, will ask AiiDA to run in serial mode (i.e., AiiDA will not # invoke the mpirun command in the submission script) -run_in_serial_mode = True#False +run_in_serial_mode = True #False ################################################################ - ParameterData = DataFactory('parameter') StructureData = DataFactory('structure') FleurinpData = DataFactory('fleur.fleurinp') try: dontsend = sys.argv[1] - if dontsend == "--dont-send": + if dontsend == '--dont-send': submit_test = True - elif dontsend == "--send": + elif dontsend == '--send': submit_test = False else: raise IndexError except IndexError: - print(("The first parameter can only be either " - "--send or --dont-send"), file=sys.stderr) + print(('The first parameter can only be either ' '--send or --dont-send'), file=sys.stderr) sys.exit(1) try: @@ -60,7 +57,7 @@ enpara = '/usr/users/iff_th1/broeder/aiida/github/aiida_fleur_plugin/tests/inp_xml_files/Fe_1lXML/files/enpara' symout = '/usr/users/iff_th1/broeder/aiida/github/aiida_fleur_plugin/tests/inp_xml_files/Fe_1lXML/files/sym.out' -fleurinp = FleurinpData(files = [inpxmlfile, enpara, symout]) +fleurinp = FleurinpData(files=[inpxmlfile, enpara, symout]) print(fleurinp.files) ## For remote codes, it is not necessary to manually set the computer, ## since it is set automatically by new_calc @@ -68,14 +65,14 @@ #calc = code.new_calc(computer=computer) calc = code.new_calc() -calc.label = "Fe_1l Fleur test" -calc.description = ("Simple test of Fleur with one step:" - "1.Generate a starting density and run 1 iteration and " - "compare convergence, fermi-energy & total energy") +calc.label = 'Fe_1l Fleur test' +calc.description = ('Simple test of Fleur with one step:' + '1.Generate a starting density and run 1 iteration and ' + 'compare convergence, fermi-energy & total energy') calc.set_max_wallclock_seconds(5 * 60) # 5 min # Valid only for Slurm and PBS (using default values for the # number_cpus_per_machine), change for SGE-like schedulers -calc.set_resources({"num_machines": 1}) +calc.set_resources({'num_machines': 1}) if run_in_serial_mode: calc.set_withmpi(False) ## Otherwise, to specify a given # of cpus per machine, uncomment the following: @@ -92,20 +89,12 @@ if settings is not None: calc.use_settings(settings) - if submit_test: subfolder, script_filename = calc.submit_test() - print("Test_submit for calculation (uuid='{}')".format( - calc.uuid)) - print("Submit file in {}".format(os.path.join( - os.path.relpath(subfolder.abspath), - script_filename - ))) + print("Test_submit for calculation (uuid='{}')".format(calc.uuid)) + print('Submit file in {}'.format(os.path.join(os.path.relpath(subfolder.abspath), script_filename))) else: calc.store_all() - print("created calculation; calc=Calculation(uuid='{}') # ID={}".format( - calc.uuid, calc.dbnode.pk)) + print("created calculation; calc=Calculation(uuid='{}') # ID={}".format(calc.uuid, calc.dbnode.pk)) calc.submit() - print("submitted calculation; calc=Calculation(uuid='{}') # ID={}".format( - calc.uuid, calc.dbnode.pk)) - + print("submitted calculation; calc=Calculation(uuid='{}') # ID={}".format(calc.uuid, calc.dbnode.pk)) diff --git a/examples/submission/fleur_specific_tests/test_Fe_1l_SOCXML_fleur.py b/examples/submission/fleur_specific_tests/test_Fe_1l_SOCXML_fleur.py index ad26dd091..14b366c57 100644 --- a/examples/submission/fleur_specific_tests/test_Fe_1l_SOCXML_fleur.py +++ b/examples/submission/fleur_specific_tests/test_Fe_1l_SOCXML_fleur.py @@ -3,11 +3,10 @@ from __future__ import absolute_import from __future__ import print_function -__copyright__ = (u"Copyright (c), 2016, Forschungszentrum Jülich GmbH, " - "IAS-1/PGI-1, Germany. All rights reserved.") -__license__ = "MIT license, see LICENSE.txt file" -__version__ = "0.27" -__contributors__ = "Jens Broeder" +__copyright__ = (u'Copyright (c), 2016, Forschungszentrum Jülich GmbH, ' 'IAS-1/PGI-1, Germany. All rights reserved.') +__license__ = 'MIT license, see LICENSE.txt file' +__version__ = '0.27' +__contributors__ = 'Jens Broeder' from aiida import load_dbenv, is_dbenv_loaded if not is_dbenv_loaded(): @@ -21,25 +20,23 @@ # If set to True, will ask AiiDA to run in serial mode (i.e., AiiDA will not # invoke the mpirun command in the submission script) -run_in_serial_mode = True#False +run_in_serial_mode = True #False ################################################################ - ParameterData = DataFactory('parameter') StructureData = DataFactory('structure') FleurinpData = DataFactory('fleur.fleurinp') try: dontsend = sys.argv[1] - if dontsend == "--dont-send": + if dontsend == '--dont-send': submit_test = True - elif dontsend == "--send": + elif dontsend == '--send': submit_test = False else: raise IndexError except IndexError: - print(("The first parameter can only be either " - "--send or --dont-send"), file=sys.stderr) + print(('The first parameter can only be either ' '--send or --dont-send'), file=sys.stderr) sys.exit(1) try: @@ -60,7 +57,7 @@ enpara = '/usr/users/iff_th1/broeder/aiida/github/aiida_fleur_plugin/tests/inp_xml_files/Fe_1l_SOCXML/files/enpara' symout = '/usr/users/iff_th1/broeder/aiida/github/aiida_fleur_plugin/tests/inp_xml_files/Fe_1l_SOCXML/files/sym.out' -fleurinp = FleurinpData(files = [inpxmlfile, enpara, symout]) +fleurinp = FleurinpData(files=[inpxmlfile, enpara, symout]) print(fleurinp.files) ## For remote codes, it is not necessary to manually set the computer, ## since it is set automatically by new_calc @@ -68,14 +65,14 @@ #calc = code.new_calc(computer=computer) calc = code.new_calc() -calc.label = "Fe_1l_SOC Fleur test" -calc.description = ("Simple test of Fleur with two steps:" - "1.Generate a starting density and run 1 iteration and " - "compare convergence, fermi-energy & total energy") +calc.label = 'Fe_1l_SOC Fleur test' +calc.description = ('Simple test of Fleur with two steps:' + '1.Generate a starting density and run 1 iteration and ' + 'compare convergence, fermi-energy & total energy') calc.set_max_wallclock_seconds(5 * 60) # 5 min # Valid only for Slurm and PBS (using default values for the # number_cpus_per_machine), change for SGE-like schedulers -calc.set_resources({"num_machines": 1}) +calc.set_resources({'num_machines': 1}) if run_in_serial_mode: calc.set_withmpi(False) ## Otherwise, to specify a given # of cpus per machine, uncomment the following: @@ -92,20 +89,12 @@ if settings is not None: calc.use_settings(settings) - if submit_test: subfolder, script_filename = calc.submit_test() - print("Test_submit for calculation (uuid='{}')".format( - calc.uuid)) - print("Submit file in {}".format(os.path.join( - os.path.relpath(subfolder.abspath), - script_filename - ))) + print("Test_submit for calculation (uuid='{}')".format(calc.uuid)) + print('Submit file in {}'.format(os.path.join(os.path.relpath(subfolder.abspath), script_filename))) else: calc.store_all() - print("created calculation; calc=Calculation(uuid='{}') # ID={}".format( - calc.uuid, calc.dbnode.pk)) + print("created calculation; calc=Calculation(uuid='{}') # ID={}".format(calc.uuid, calc.dbnode.pk)) calc.submit() - print("submitted calculation; calc=Calculation(uuid='{}') # ID={}".format( - calc.uuid, calc.dbnode.pk)) - + print("submitted calculation; calc=Calculation(uuid='{}') # ID={}".format(calc.uuid, calc.dbnode.pk)) diff --git a/examples/submission/fleur_specific_tests/test_Fe_bctXML_fleur.py b/examples/submission/fleur_specific_tests/test_Fe_bctXML_fleur.py index c8fe8308d..631f972ff 100644 --- a/examples/submission/fleur_specific_tests/test_Fe_bctXML_fleur.py +++ b/examples/submission/fleur_specific_tests/test_Fe_bctXML_fleur.py @@ -3,11 +3,10 @@ from __future__ import absolute_import from __future__ import print_function -__copyright__ = (u"Copyright (c), 2016, Forschungszentrum Jülich GmbH, " - "IAS-1/PGI-1, Germany. All rights reserved.") -__license__ = "MIT license, see LICENSE.txt file" -__version__ = "0.27" -__contributors__ = "Jens Broeder" +__copyright__ = (u'Copyright (c), 2016, Forschungszentrum Jülich GmbH, ' 'IAS-1/PGI-1, Germany. All rights reserved.') +__license__ = 'MIT license, see LICENSE.txt file' +__version__ = '0.27' +__contributors__ = 'Jens Broeder' from aiida import load_dbenv, is_dbenv_loaded if not is_dbenv_loaded(): @@ -21,25 +20,23 @@ # If set to True, will ask AiiDA to run in serial mode (i.e., AiiDA will not # invoke the mpirun command in the submission script) -run_in_serial_mode = True#False +run_in_serial_mode = True #False ################################################################ - ParameterData = DataFactory('parameter') StructureData = DataFactory('structure') FleurinpData = DataFactory('fleur.fleurinp') try: dontsend = sys.argv[1] - if dontsend == "--dont-send": + if dontsend == '--dont-send': submit_test = True - elif dontsend == "--send": + elif dontsend == '--send': submit_test = False else: raise IndexError except IndexError: - print(("The first parameter can only be either " - "--send or --dont-send"), file=sys.stderr) + print(('The first parameter can only be either ' '--send or --dont-send'), file=sys.stderr) sys.exit(1) try: @@ -59,7 +56,7 @@ inpxmlfile = '/usr/users/iff_th1/broeder/aiida/github/aiida_fleur_plugin/tests/inp_xml_files/Fe_bctXML/files/inp.xml' symout = '/usr/users/iff_th1/broeder/aiida/github/aiida_fleur_plugin/tests/inp_xml_files/Fe_bctXML/files/sym.out' -fleurinp = FleurinpData(files = [inpxmlfile, symout]) +fleurinp = FleurinpData(files=[inpxmlfile, symout]) print(fleurinp.files) ## For remote codes, it is not necessary to manually set the computer, ## since it is set automatically by new_calc @@ -67,14 +64,14 @@ #calc = code.new_calc(computer=computer) calc = code.new_calc() -calc.label = "Fe_bct Fleur test" -calc.description = ("Simple test of Fleur with two steps:" - "1.Generate a starting density" - "2.Run 20 iterations and compare convergence, fermi-energy & total energy") +calc.label = 'Fe_bct Fleur test' +calc.description = ('Simple test of Fleur with two steps:' + '1.Generate a starting density' + '2.Run 20 iterations and compare convergence, fermi-energy & total energy') calc.set_max_wallclock_seconds(5 * 60) # 5 min # Valid only for Slurm and PBS (using default values for the # number_cpus_per_machine), change for SGE-like schedulers -calc.set_resources({"num_machines": 1}) +calc.set_resources({'num_machines': 1}) if run_in_serial_mode: calc.set_withmpi(False) ## Otherwise, to specify a given # of cpus per machine, uncomment the following: @@ -91,20 +88,12 @@ if settings is not None: calc.use_settings(settings) - if submit_test: subfolder, script_filename = calc.submit_test() - print("Test_submit for calculation (uuid='{}')".format( - calc.uuid)) - print("Submit file in {}".format(os.path.join( - os.path.relpath(subfolder.abspath), - script_filename - ))) + print("Test_submit for calculation (uuid='{}')".format(calc.uuid)) + print('Submit file in {}'.format(os.path.join(os.path.relpath(subfolder.abspath), script_filename))) else: calc.store_all() - print("created calculation; calc=Calculation(uuid='{}') # ID={}".format( - calc.uuid, calc.dbnode.pk)) + print("created calculation; calc=Calculation(uuid='{}') # ID={}".format(calc.uuid, calc.dbnode.pk)) calc.submit() - print("submitted calculation; calc=Calculation(uuid='{}') # ID={}".format( - calc.uuid, calc.dbnode.pk)) - + print("submitted calculation; calc=Calculation(uuid='{}') # ID={}".format(calc.uuid, calc.dbnode.pk)) diff --git a/examples/submission/fleur_specific_tests/test_Fe_bct_LOXML_fleur.py b/examples/submission/fleur_specific_tests/test_Fe_bct_LOXML_fleur.py index a9926be2c..9fa828acc 100644 --- a/examples/submission/fleur_specific_tests/test_Fe_bct_LOXML_fleur.py +++ b/examples/submission/fleur_specific_tests/test_Fe_bct_LOXML_fleur.py @@ -3,11 +3,10 @@ from __future__ import absolute_import from __future__ import print_function -__copyright__ = (u"Copyright (c), 2016, Forschungszentrum Jülich GmbH, " - "IAS-1/PGI-1, Germany. All rights reserved.") -__license__ = "MIT license, see LICENSE.txt file" -__version__ = "0.27" -__contributors__ = "Jens Broeder" +__copyright__ = (u'Copyright (c), 2016, Forschungszentrum Jülich GmbH, ' 'IAS-1/PGI-1, Germany. All rights reserved.') +__license__ = 'MIT license, see LICENSE.txt file' +__version__ = '0.27' +__contributors__ = 'Jens Broeder' from aiida import load_dbenv, is_dbenv_loaded if not is_dbenv_loaded(): @@ -21,25 +20,23 @@ # If set to True, will ask AiiDA to run in serial mode (i.e., AiiDA will not # invoke the mpirun command in the submission script) -run_in_serial_mode = True#False +run_in_serial_mode = True #False ################################################################ - ParameterData = DataFactory('parameter') StructureData = DataFactory('structure') FleurinpData = DataFactory('fleur.fleurinp') try: dontsend = sys.argv[1] - if dontsend == "--dont-send": + if dontsend == '--dont-send': submit_test = True - elif dontsend == "--send": + elif dontsend == '--send': submit_test = False else: raise IndexError except IndexError: - print(("The first parameter can only be either " - "--send or --dont-send"), file=sys.stderr) + print(('The first parameter can only be either ' '--send or --dont-send'), file=sys.stderr) sys.exit(1) try: @@ -59,7 +56,7 @@ inpxmlfile = '/usr/users/iff_th1/broeder/aiida/github/aiida_fleur_plugin/tests/inp_xml_files/Fe_bct_LOXML/files/inp.xml' symout = '/usr/users/iff_th1/broeder/aiida/github/aiida_fleur_plugin/tests/inp_xml_files/Fe_bct_LOXML/files/sym.out' -fleurinp = FleurinpData(files = [inpxmlfile, symout]) +fleurinp = FleurinpData(files=[inpxmlfile, symout]) print(fleurinp.files) ## For remote codes, it is not necessary to manually set the computer, ## since it is set automatically by new_calc @@ -67,14 +64,14 @@ #calc = code.new_calc(computer=computer) calc = code.new_calc() -calc.label = "Fe_bct_LO Fleur test" -calc.description = ("Simple test of Fleur with two steps:" - "1.Generate a starting density (+get some errors afterwards)" - "2.Run 4 noco iterations and compare convergence, fermi-energy & total energy") +calc.label = 'Fe_bct_LO Fleur test' +calc.description = ('Simple test of Fleur with two steps:' + '1.Generate a starting density (+get some errors afterwards)' + '2.Run 4 noco iterations and compare convergence, fermi-energy & total energy') calc.set_max_wallclock_seconds(5 * 60) # 5 min # Valid only for Slurm and PBS (using default values for the # number_cpus_per_machine), change for SGE-like schedulers -calc.set_resources({"num_machines": 1}) +calc.set_resources({'num_machines': 1}) if run_in_serial_mode: calc.set_withmpi(False) ## Otherwise, to specify a given # of cpus per machine, uncomment the following: @@ -91,20 +88,12 @@ if settings is not None: calc.use_settings(settings) - if submit_test: subfolder, script_filename = calc.submit_test() - print("Test_submit for calculation (uuid='{}')".format( - calc.uuid)) - print("Submit file in {}".format(os.path.join( - os.path.relpath(subfolder.abspath), - script_filename - ))) + print("Test_submit for calculation (uuid='{}')".format(calc.uuid)) + print('Submit file in {}'.format(os.path.join(os.path.relpath(subfolder.abspath), script_filename))) else: calc.store_all() - print("created calculation; calc=Calculation(uuid='{}') # ID={}".format( - calc.uuid, calc.dbnode.pk)) + print("created calculation; calc=Calculation(uuid='{}') # ID={}".format(calc.uuid, calc.dbnode.pk)) calc.submit() - print("submitted calculation; calc=Calculation(uuid='{}') # ID={}".format( - calc.uuid, calc.dbnode.pk)) - + print("submitted calculation; calc=Calculation(uuid='{}') # ID={}".format(calc.uuid, calc.dbnode.pk)) diff --git a/examples/submission/fleur_specific_tests/test_Fe_bct_SOCXML_fleur.py b/examples/submission/fleur_specific_tests/test_Fe_bct_SOCXML_fleur.py index 4dbbebc3a..d2aac7249 100644 --- a/examples/submission/fleur_specific_tests/test_Fe_bct_SOCXML_fleur.py +++ b/examples/submission/fleur_specific_tests/test_Fe_bct_SOCXML_fleur.py @@ -3,11 +3,10 @@ from __future__ import absolute_import from __future__ import print_function -__copyright__ = (u"Copyright (c), 2016, Forschungszentrum Jülich GmbH, " - "IAS-1/PGI-1, Germany. All rights reserved.") -__license__ = "MIT license, see LICENSE.txt file" -__version__ = "0.27" -__contributors__ = "Jens Broeder" +__copyright__ = (u'Copyright (c), 2016, Forschungszentrum Jülich GmbH, ' 'IAS-1/PGI-1, Germany. All rights reserved.') +__license__ = 'MIT license, see LICENSE.txt file' +__version__ = '0.27' +__contributors__ = 'Jens Broeder' from aiida import load_dbenv, is_dbenv_loaded if not is_dbenv_loaded(): @@ -21,25 +20,23 @@ # If set to True, will ask AiiDA to run in serial mode (i.e., AiiDA will not # invoke the mpirun command in the submission script) -run_in_serial_mode = True#False +run_in_serial_mode = True #False ################################################################ - ParameterData = DataFactory('parameter') StructureData = DataFactory('structure') FleurinpData = DataFactory('fleur.fleurinp') try: dontsend = sys.argv[1] - if dontsend == "--dont-send": + if dontsend == '--dont-send': submit_test = True - elif dontsend == "--send": + elif dontsend == '--send': submit_test = False else: raise IndexError except IndexError: - print(("The first parameter can only be either " - "--send or --dont-send"), file=sys.stderr) + print(('The first parameter can only be either ' '--send or --dont-send'), file=sys.stderr) sys.exit(1) try: @@ -60,7 +57,7 @@ enpara = '/usr/users/iff_th1/broeder/aiida/github/aiida_fleur_plugin/tests/inp_xml_files/Fe_bct_SOCXML/files/enpara' symout = '/usr/users/iff_th1/broeder/aiida/github/aiida_fleur_plugin/tests/inp_xml_files/Fe_bct_SOCXML/files/sym.out' -fleurinp = FleurinpData(files = [inpxmlfile, enpara, symout]) +fleurinp = FleurinpData(files=[inpxmlfile, enpara, symout]) print(fleurinp.files) ## For remote codes, it is not necessary to manually set the computer, ## since it is set automatically by new_calc @@ -68,14 +65,14 @@ #calc = code.new_calc(computer=computer) calc = code.new_calc() -calc.label = "Fe_bct_SOC Fleur test" -calc.description = ("Simple test of Fleur with two steps:" - "1.Generate a starting density" - "2.Run 20 iterations and compare convergence, fermi-energy & total energy") +calc.label = 'Fe_bct_SOC Fleur test' +calc.description = ('Simple test of Fleur with two steps:' + '1.Generate a starting density' + '2.Run 20 iterations and compare convergence, fermi-energy & total energy') calc.set_max_wallclock_seconds(5 * 60) # 5 min # Valid only for Slurm and PBS (using default values for the # number_cpus_per_machine), change for SGE-like schedulers -calc.set_resources({"num_machines": 1}) +calc.set_resources({'num_machines': 1}) if run_in_serial_mode: calc.set_withmpi(False) ## Otherwise, to specify a given # of cpus per machine, uncomment the following: @@ -92,20 +89,12 @@ if settings is not None: calc.use_settings(settings) - if submit_test: subfolder, script_filename = calc.submit_test() - print("Test_submit for calculation (uuid='{}')".format( - calc.uuid)) - print("Submit file in {}".format(os.path.join( - os.path.relpath(subfolder.abspath), - script_filename - ))) + print("Test_submit for calculation (uuid='{}')".format(calc.uuid)) + print('Submit file in {}'.format(os.path.join(os.path.relpath(subfolder.abspath), script_filename))) else: calc.store_all() - print("created calculation; calc=Calculation(uuid='{}') # ID={}".format( - calc.uuid, calc.dbnode.pk)) + print("created calculation; calc=Calculation(uuid='{}') # ID={}".format(calc.uuid, calc.dbnode.pk)) calc.submit() - print("submitted calculation; calc=Calculation(uuid='{}') # ID={}".format( - calc.uuid, calc.dbnode.pk)) - + print("submitted calculation; calc=Calculation(uuid='{}') # ID={}".format(calc.uuid, calc.dbnode.pk)) diff --git a/examples/submission/fleur_specific_tests/test_Fe_fccXML_fleur.py b/examples/submission/fleur_specific_tests/test_Fe_fccXML_fleur.py index 00cf6ba4b..cb3610d00 100644 --- a/examples/submission/fleur_specific_tests/test_Fe_fccXML_fleur.py +++ b/examples/submission/fleur_specific_tests/test_Fe_fccXML_fleur.py @@ -3,11 +3,10 @@ from __future__ import absolute_import from __future__ import print_function -__copyright__ = (u"Copyright (c), 2016, Forschungszentrum Jülich GmbH, " - "IAS-1/PGI-1, Germany. All rights reserved.") -__license__ = "MIT license, see LICENSE.txt file" -__version__ = "0.27" -__contributors__ = "Jens Broeder" +__copyright__ = (u'Copyright (c), 2016, Forschungszentrum Jülich GmbH, ' 'IAS-1/PGI-1, Germany. All rights reserved.') +__license__ = 'MIT license, see LICENSE.txt file' +__version__ = '0.27' +__contributors__ = 'Jens Broeder' from aiida import load_dbenv, is_dbenv_loaded if not is_dbenv_loaded(): @@ -21,25 +20,23 @@ # If set to True, will ask AiiDA to run in serial mode (i.e., AiiDA will not # invoke the mpirun command in the submission script) -run_in_serial_mode = True#False +run_in_serial_mode = True #False ################################################################ - ParameterData = DataFactory('parameter') StructureData = DataFactory('structure') FleurinpData = DataFactory('fleur.fleurinp') try: dontsend = sys.argv[1] - if dontsend == "--dont-send": + if dontsend == '--dont-send': submit_test = True - elif dontsend == "--send": + elif dontsend == '--send': submit_test = False else: raise IndexError except IndexError: - print(("The first parameter can only be either " - "--send or --dont-send"), file=sys.stderr) + print(('The first parameter can only be either ' '--send or --dont-send'), file=sys.stderr) sys.exit(1) try: @@ -59,7 +56,7 @@ inpxmlfile = '/usr/users/iff_th1/broeder/aiida/github/aiida_fleur_plugin/tests/inp_xml_files/Fe_fccXML/files/inp.xml' symout = '/usr/users/iff_th1/broeder/aiida/github/aiida_fleur_plugin/tests/inp_xml_files/Fe_fccXML/files/sym.out' -fleurinp = FleurinpData(files = [inpxmlfile, symout]) +fleurinp = FleurinpData(files=[inpxmlfile, symout]) print(fleurinp.files) ## For remote codes, it is not necessary to manually set the computer, ## since it is set automatically by new_calc @@ -67,14 +64,14 @@ #calc = code.new_calc(computer=computer) calc = code.new_calc() -calc.label = "Fe_fcc Fleur test" -calc.description = ("Simple test of Fleur with two steps:" - "1.Generate a starting density" - "2.Run 20 iterations and compare convergence, fermi-energy & total energy") +calc.label = 'Fe_fcc Fleur test' +calc.description = ('Simple test of Fleur with two steps:' + '1.Generate a starting density' + '2.Run 20 iterations and compare convergence, fermi-energy & total energy') calc.set_max_wallclock_seconds(5 * 60) # 5 min # Valid only for Slurm and PBS (using default values for the # number_cpus_per_machine), change for SGE-like schedulers -calc.set_resources({"num_machines": 1}) +calc.set_resources({'num_machines': 1}) if run_in_serial_mode: calc.set_withmpi(False) ## Otherwise, to specify a given # of cpus per machine, uncomment the following: @@ -91,20 +88,12 @@ if settings is not None: calc.use_settings(settings) - if submit_test: subfolder, script_filename = calc.submit_test() - print("Test_submit for calculation (uuid='{}')".format( - calc.uuid)) - print("Submit file in {}".format(os.path.join( - os.path.relpath(subfolder.abspath), - script_filename - ))) + print("Test_submit for calculation (uuid='{}')".format(calc.uuid)) + print('Submit file in {}'.format(os.path.join(os.path.relpath(subfolder.abspath), script_filename))) else: calc.store_all() - print("created calculation; calc=Calculation(uuid='{}') # ID={}".format( - calc.uuid, calc.dbnode.pk)) + print("created calculation; calc=Calculation(uuid='{}') # ID={}".format(calc.uuid, calc.dbnode.pk)) calc.submit() - print("submitted calculation; calc=Calculation(uuid='{}') # ID={}".format( - calc.uuid, calc.dbnode.pk)) - + print("submitted calculation; calc=Calculation(uuid='{}') # ID={}".format(calc.uuid, calc.dbnode.pk)) diff --git a/examples/submission/fleur_specific_tests/test_NaOW_fleur.py b/examples/submission/fleur_specific_tests/test_NaOW_fleur.py index 907ef33e4..675ac7419 100644 --- a/examples/submission/fleur_specific_tests/test_NaOW_fleur.py +++ b/examples/submission/fleur_specific_tests/test_NaOW_fleur.py @@ -3,11 +3,10 @@ from __future__ import absolute_import from __future__ import print_function -__copyright__ = (u"Copyright (c), 2016, Forschungszentrum Jülich GmbH, " - "IAS-1/PGI-1, Germany. All rights reserved.") -__license__ = "MIT license, see LICENSE.txt file" -__version__ = "0.27" -__contributors__ = "Jens Broeder" +__copyright__ = (u'Copyright (c), 2016, Forschungszentrum Jülich GmbH, ' 'IAS-1/PGI-1, Germany. All rights reserved.') +__license__ = 'MIT license, see LICENSE.txt file' +__version__ = '0.27' +__contributors__ = 'Jens Broeder' from aiida import load_dbenv, is_dbenv_loaded if not is_dbenv_loaded(): @@ -21,25 +20,23 @@ # If set to True, will ask AiiDA to run in serial mode (i.e., AiiDA will not # invoke the mpirun command in the submission script) -run_in_serial_mode = True#False +run_in_serial_mode = True #False ################################################################ - ParameterData = DataFactory('parameter') StructureData = DataFactory('structure') FleurinpData = DataFactory('fleur.fleurinp') try: dontsend = sys.argv[1] - if dontsend == "--dont-send": + if dontsend == '--dont-send': submit_test = True - elif dontsend == "--send": + elif dontsend == '--send': submit_test = False else: raise IndexError except IndexError: - print(("The first parameter can only be either " - "--send or --dont-send"), file=sys.stderr) + print(('The first parameter can only be either ' '--send or --dont-send'), file=sys.stderr) sys.exit(1) try: @@ -58,7 +55,7 @@ # get where tests folder is, then relative path inpxmlfile = '/usr/users/iff_th1/broeder/aiida/github/aiida_fleur_plugin/tests/inp_xml_files/NaWO/files/inp.xml' -fleurinp = FleurinpData(files = [inpxmlfile]) +fleurinp = FleurinpData(files=[inpxmlfile]) print(fleurinp.files) ## For remote codes, it is not necessary to manually set the computer, ## since it is set automatically by new_calc @@ -66,13 +63,13 @@ #calc = code.new_calc(computer=computer) calc = code.new_calc() -calc.label = "Na W O Fleur test" -calc.description = ("Simple test of Fleur band structure calculation with XML input with one step:" - "1.Generate a starting density, run 9 iteration") +calc.label = 'Na W O Fleur test' +calc.description = ('Simple test of Fleur band structure calculation with XML input with one step:' + '1.Generate a starting density, run 9 iteration') calc.set_max_wallclock_seconds(5 * 60) # 5 min # Valid only for Slurm and PBS (using default values for the # number_cpus_per_machine), change for SGE-like schedulers -calc.set_resources({"num_machines": 1}) +calc.set_resources({'num_machines': 1}) if run_in_serial_mode: calc.set_withmpi(False) ## Otherwise, to specify a given # of cpus per machine, uncomment the following: @@ -89,20 +86,12 @@ if settings is not None: calc.use_settings(settings) - if submit_test: subfolder, script_filename = calc.submit_test() - print("Test_submit for calculation (uuid='{}')".format( - calc.uuid)) - print("Submit file in {}".format(os.path.join( - os.path.relpath(subfolder.abspath), - script_filename - ))) + print("Test_submit for calculation (uuid='{}')".format(calc.uuid)) + print('Submit file in {}'.format(os.path.join(os.path.relpath(subfolder.abspath), script_filename))) else: calc.store_all() - print("created calculation; calc=Calculation(uuid='{}') # ID={}".format( - calc.uuid, calc.dbnode.pk)) + print("created calculation; calc=Calculation(uuid='{}') # ID={}".format(calc.uuid, calc.dbnode.pk)) calc.submit() - print("submitted calculation; calc=Calculation(uuid='{}') # ID={}".format( - calc.uuid, calc.dbnode.pk)) - + print("submitted calculation; calc=Calculation(uuid='{}') # ID={}".format(calc.uuid, calc.dbnode.pk)) diff --git a/examples/submission/fleur_specific_tests/test_NiO_ldauXML_fleur.py b/examples/submission/fleur_specific_tests/test_NiO_ldauXML_fleur.py index d4eb30266..1fb087d82 100644 --- a/examples/submission/fleur_specific_tests/test_NiO_ldauXML_fleur.py +++ b/examples/submission/fleur_specific_tests/test_NiO_ldauXML_fleur.py @@ -3,11 +3,10 @@ from __future__ import absolute_import from __future__ import print_function -__copyright__ = (u"Copyright (c), 2016, Forschungszentrum Jülich GmbH, " - "IAS-1/PGI-1, Germany. All rights reserved.") -__license__ = "MIT license, see LICENSE.txt file" -__version__ = "0.27" -__contributors__ = "Jens Broeder" +__copyright__ = (u'Copyright (c), 2016, Forschungszentrum Jülich GmbH, ' 'IAS-1/PGI-1, Germany. All rights reserved.') +__license__ = 'MIT license, see LICENSE.txt file' +__version__ = '0.27' +__contributors__ = 'Jens Broeder' from aiida import load_dbenv, is_dbenv_loaded if not is_dbenv_loaded(): @@ -21,25 +20,23 @@ # If set to True, will ask AiiDA to run in serial mode (i.e., AiiDA will not # invoke the mpirun command in the submission script) -run_in_serial_mode = True#False +run_in_serial_mode = True #False ################################################################ - ParameterData = DataFactory('parameter') StructureData = DataFactory('structure') FleurinpData = DataFactory('fleur.fleurinp') try: dontsend = sys.argv[1] - if dontsend == "--dont-send": + if dontsend == '--dont-send': submit_test = True - elif dontsend == "--send": + elif dontsend == '--send': submit_test = False else: raise IndexError except IndexError: - print(("The first parameter can only be either " - "--send or --dont-send"), file=sys.stderr) + print(('The first parameter can only be either ' '--send or --dont-send'), file=sys.stderr) sys.exit(1) try: @@ -49,7 +46,7 @@ queue = None # queue = "th1_small" -settings = Dict(dict={'additional_retrieve_list' : ['n_mmp_mat']}) +settings = Dict(dict={'additional_retrieve_list': ['n_mmp_mat']}) ##### code = test_and_get_code(codename, expected_code_type='fleur_inp.fleur') @@ -59,7 +56,7 @@ inpxmlfile = '/usr/users/iff_th1/broeder/aiida/github/aiida_fleur_plugin/tests/inp_xml_files/NiO_ldauXML/files/inp.xml' symout = '/usr/users/iff_th1/broeder/aiida/github/aiida_fleur_plugin/tests/inp_xml_files/NiO_ldauXML/files/sym.out' -fleurinp = FleurinpData(files = [inpxmlfile, symout]) +fleurinp = FleurinpData(files=[inpxmlfile, symout]) print(fleurinp.files) ## For remote codes, it is not necessary to manually set the computer, ## since it is set automatically by new_calc @@ -67,14 +64,14 @@ #calc = code.new_calc(computer=computer) calc = code.new_calc() -calc.label = "NiO_ldau Fleur test" -calc.description = ("Simple test of Fleur with one steps:" - "1.Generate a starting density and run 9 iterations and " - "compare convergence, fermi-energy & total energy") +calc.label = 'NiO_ldau Fleur test' +calc.description = ('Simple test of Fleur with one steps:' + '1.Generate a starting density and run 9 iterations and ' + 'compare convergence, fermi-energy & total energy') calc.set_max_wallclock_seconds(5 * 60) # 5 min # Valid only for Slurm and PBS (using default values for the # number_cpus_per_machine), change for SGE-like schedulers -calc.set_resources({"num_machines": 1}) +calc.set_resources({'num_machines': 1}) if run_in_serial_mode: calc.set_withmpi(False) ## Otherwise, to specify a given # of cpus per machine, uncomment the following: @@ -91,20 +88,12 @@ if settings is not None: calc.use_settings(settings) - if submit_test: subfolder, script_filename = calc.submit_test() - print("Test_submit for calculation (uuid='{}')".format( - calc.uuid)) - print("Submit file in {}".format(os.path.join( - os.path.relpath(subfolder.abspath), - script_filename - ))) + print("Test_submit for calculation (uuid='{}')".format(calc.uuid)) + print('Submit file in {}'.format(os.path.join(os.path.relpath(subfolder.abspath), script_filename))) else: calc.store_all() - print("created calculation; calc=Calculation(uuid='{}') # ID={}".format( - calc.uuid, calc.dbnode.pk)) + print("created calculation; calc=Calculation(uuid='{}') # ID={}".format(calc.uuid, calc.dbnode.pk)) calc.submit() - print("submitted calculation; calc=Calculation(uuid='{}') # ID={}".format( - calc.uuid, calc.dbnode.pk)) - + print("submitted calculation; calc=Calculation(uuid='{}') # ID={}".format(calc.uuid, calc.dbnode.pk)) diff --git a/examples/submission/fleur_specific_tests/test_PTOXML_fleur.py b/examples/submission/fleur_specific_tests/test_PTOXML_fleur.py index c32a882a7..197b74bfa 100644 --- a/examples/submission/fleur_specific_tests/test_PTOXML_fleur.py +++ b/examples/submission/fleur_specific_tests/test_PTOXML_fleur.py @@ -3,11 +3,10 @@ from __future__ import absolute_import from __future__ import print_function -__copyright__ = (u"Copyright (c), 2016, Forschungszentrum Jülich GmbH, " - "IAS-1/PGI-1, Germany. All rights reserved.") -__license__ = "MIT license, see LICENSE.txt file" -__version__ = "0.27" -__contributors__ = "Jens Broeder" +__copyright__ = (u'Copyright (c), 2016, Forschungszentrum Jülich GmbH, ' 'IAS-1/PGI-1, Germany. All rights reserved.') +__license__ = 'MIT license, see LICENSE.txt file' +__version__ = '0.27' +__contributors__ = 'Jens Broeder' from aiida import load_dbenv, is_dbenv_loaded if not is_dbenv_loaded(): @@ -21,25 +20,23 @@ # If set to True, will ask AiiDA to run in serial mode (i.e., AiiDA will not # invoke the mpirun command in the submission script) -run_in_serial_mode = True#False +run_in_serial_mode = True #False ################################################################ - ParameterData = DataFactory('parameter') StructureData = DataFactory('structure') FleurinpData = DataFactory('fleur.fleurinp') try: dontsend = sys.argv[1] - if dontsend == "--dont-send": + if dontsend == '--dont-send': submit_test = True - elif dontsend == "--send": + elif dontsend == '--send': submit_test = False else: raise IndexError except IndexError: - print(("The first parameter can only be either " - "--send or --dont-send"), file=sys.stderr) + print(('The first parameter can only be either ' '--send or --dont-send'), file=sys.stderr) sys.exit(1) try: @@ -59,7 +56,7 @@ inpxmlfile = '/usr/users/iff_th1/broeder/aiida/github/aiida_fleur_plugin/tests/inp_xml_files/PTO-SOCXML/files/inp.xml' symout = '/usr/users/iff_th1/broeder/aiida/github/aiida_fleur_plugin/tests/inp_xml_files/PTO-SOCXML/files/sym.out' -fleurinp = FleurinpData(files = [inpxmlfile, symout]) +fleurinp = FleurinpData(files=[inpxmlfile, symout]) print(fleurinp.files) ## For remote codes, it is not necessary to manually set the computer, ## since it is set automatically by new_calc @@ -67,14 +64,14 @@ #calc = code.new_calc(computer=computer) calc = code.new_calc() -calc.label = "PTOXML Fleur test" -calc.description = ("Simple test of Fleur with two steps:" - "1.Generate a starting density and run a single iteration " - "and test for ef, total energy. Uses: LOs") +calc.label = 'PTOXML Fleur test' +calc.description = ('Simple test of Fleur with two steps:' + '1.Generate a starting density and run a single iteration ' + 'and test for ef, total energy. Uses: LOs') calc.set_max_wallclock_seconds(5 * 60) # 5 min # Valid only for Slurm and PBS (using default values for the # number_cpus_per_machine), change for SGE-like schedulers -calc.set_resources({"num_machines": 1}) +calc.set_resources({'num_machines': 1}) if run_in_serial_mode: calc.set_withmpi(False) ## Otherwise, to specify a given # of cpus per machine, uncomment the following: @@ -91,20 +88,12 @@ if settings is not None: calc.use_settings(settings) - if submit_test: subfolder, script_filename = calc.submit_test() - print("Test_submit for calculation (uuid='{}')".format( - calc.uuid)) - print("Submit file in {}".format(os.path.join( - os.path.relpath(subfolder.abspath), - script_filename - ))) + print("Test_submit for calculation (uuid='{}')".format(calc.uuid)) + print('Submit file in {}'.format(os.path.join(os.path.relpath(subfolder.abspath), script_filename))) else: calc.store_all() - print("created calculation; calc=Calculation(uuid='{}') # ID={}".format( - calc.uuid, calc.dbnode.pk)) + print("created calculation; calc=Calculation(uuid='{}') # ID={}".format(calc.uuid, calc.dbnode.pk)) calc.submit() - print("submitted calculation; calc=Calculation(uuid='{}') # ID={}".format( - calc.uuid, calc.dbnode.pk)) - + print("submitted calculation; calc=Calculation(uuid='{}') # ID={}".format(calc.uuid, calc.dbnode.pk)) diff --git a/examples/submission/fleur_specific_tests/test_PTO_SOCXML_fleur.py b/examples/submission/fleur_specific_tests/test_PTO_SOCXML_fleur.py index 098753a8e..d11e5172b 100644 --- a/examples/submission/fleur_specific_tests/test_PTO_SOCXML_fleur.py +++ b/examples/submission/fleur_specific_tests/test_PTO_SOCXML_fleur.py @@ -3,11 +3,10 @@ from __future__ import absolute_import from __future__ import print_function -__copyright__ = (u"Copyright (c), 2016, Forschungszentrum Jülich GmbH, " - "IAS-1/PGI-1, Germany. All rights reserved.") -__license__ = "MIT license, see LICENSE.txt file" -__version__ = "0.27" -__contributors__ = "Jens Broeder" +__copyright__ = (u'Copyright (c), 2016, Forschungszentrum Jülich GmbH, ' 'IAS-1/PGI-1, Germany. All rights reserved.') +__license__ = 'MIT license, see LICENSE.txt file' +__version__ = '0.27' +__contributors__ = 'Jens Broeder' from aiida import load_dbenv, is_dbenv_loaded if not is_dbenv_loaded(): @@ -21,25 +20,23 @@ # If set to True, will ask AiiDA to run in serial mode (i.e., AiiDA will not # invoke the mpirun command in the submission script) -run_in_serial_mode = True#False +run_in_serial_mode = True #False ################################################################ - ParameterData = DataFactory('parameter') StructureData = DataFactory('structure') FleurinpData = DataFactory('fleur.fleurinp') try: dontsend = sys.argv[1] - if dontsend == "--dont-send": + if dontsend == '--dont-send': submit_test = True - elif dontsend == "--send": + elif dontsend == '--send': submit_test = False else: raise IndexError except IndexError: - print(("The first parameter can only be either " - "--send or --dont-send"), file=sys.stderr) + print(('The first parameter can only be either ' '--send or --dont-send'), file=sys.stderr) sys.exit(1) try: @@ -60,7 +57,7 @@ enpara = '/usr/users/iff_th1/broeder/aiida/github/aiida_fleur_plugin/tests/inp_xml_files/PTO-SOCXML/files/enpara' symout = '/usr/users/iff_th1/broeder/aiida/github/aiida_fleur_plugin/tests/inp_xml_files/PTO-SOCXML/files/sym.out' -fleurinp = FleurinpData(files = [inpxmlfile, enpara, symout]) +fleurinp = FleurinpData(files=[inpxmlfile, enpara, symout]) print(fleurinp.files) ## For remote codes, it is not necessary to manually set the computer, ## since it is set automatically by new_calc @@ -68,14 +65,14 @@ #calc = code.new_calc(computer=computer) calc = code.new_calc() -calc.label = "PTO-SOCXML Fleur test" -calc.description = ("Simple test of Fleur with two steps:" - "1.Generate a starting density and run a single iteration " - "and test for ef, total energy. Uses: SOC, LOs") +calc.label = 'PTO-SOCXML Fleur test' +calc.description = ('Simple test of Fleur with two steps:' + '1.Generate a starting density and run a single iteration ' + 'and test for ef, total energy. Uses: SOC, LOs') calc.set_max_wallclock_seconds(5 * 60) # 5 min # Valid only for Slurm and PBS (using default values for the # number_cpus_per_machine), change for SGE-like schedulers -calc.set_resources({"num_machines": 1}) +calc.set_resources({'num_machines': 1}) if run_in_serial_mode: calc.set_withmpi(False) ## Otherwise, to specify a given # of cpus per machine, uncomment the following: @@ -92,20 +89,12 @@ if settings is not None: calc.use_settings(settings) - if submit_test: subfolder, script_filename = calc.submit_test() - print("Test_submit for calculation (uuid='{}')".format( - calc.uuid)) - print("Submit file in {}".format(os.path.join( - os.path.relpath(subfolder.abspath), - script_filename - ))) + print("Test_submit for calculation (uuid='{}')".format(calc.uuid)) + print('Submit file in {}'.format(os.path.join(os.path.relpath(subfolder.abspath), script_filename))) else: calc.store_all() - print("created calculation; calc=Calculation(uuid='{}') # ID={}".format( - calc.uuid, calc.dbnode.pk)) + print("created calculation; calc=Calculation(uuid='{}') # ID={}".format(calc.uuid, calc.dbnode.pk)) calc.submit() - print("submitted calculation; calc=Calculation(uuid='{}') # ID={}".format( - calc.uuid, calc.dbnode.pk)) - + print("submitted calculation; calc=Calculation(uuid='{}') # ID={}".format(calc.uuid, calc.dbnode.pk)) diff --git a/examples/submission/workflow_tests/run_all_workflows_tests.sh b/examples/submission/workflow_tests/run_all_workflows_tests.sh index 07f15cb82..48abfeea8 100644 --- a/examples/submission/workflow_tests/run_all_workflows_tests.sh +++ b/examples/submission/workflow_tests/run_all_workflows_tests.sh @@ -69,6 +69,3 @@ verdi run test_submit_scf.py --fleur $FLEUR_CODE3 --inpgen $INPGEN_CODE --struct #verdi run test_submit_dos.py --fleur $FLEUR_CODE4 --fleurinp $FLEURINP --remote $REMOTE2 --options $OPTIONS5 --submit $SUBMIT #verdi run test_submit_band.py --fleur $FLEUR_CODE4 --fleurinp $FLEURINP --remote $REMOTE2 --options $OPTIONS5 --submit $SUBMIT - - - diff --git a/examples/submission/workflow_tests/test_submit_band.py b/examples/submission/workflow_tests/test_submit_band.py index 01fc00ded..f51a08e2f 100644 --- a/examples/submission/workflow_tests/test_submit_band.py +++ b/examples/submission/workflow_tests/test_submit_band.py @@ -9,9 +9,8 @@ # For further information please visit http://www.flapw.de or # # http://aiida-fleur.readthedocs.io/en/develop/ # ############################################################################### - """ -Here we run the fleur_band_wc for W or some other material +Here we run the FleurBandWorkChain for W or some other material """ from __future__ import absolute_import from __future__ import print_function @@ -23,32 +22,38 @@ from aiida.plugins import DataFactory from aiida.orm import load_node from aiida.engine import submit, run -from aiida_fleur.workflows.band import fleur_band_wc +from aiida_fleur.workflows.band import FleurBandWorkChain from pprint import pprint ################################################################ ParameterData = DataFactory('dict') FleurinpData = DataFactory('fleur.fleurinp') StructureData = DataFactory('structure') -parser = argparse.ArgumentParser(description=('Bandstructure with FLEUR. workflow to' +parser = argparse.ArgumentParser( + description=('Bandstructure with FLEUR. workflow to' ' calculate a band structure. all arguments are pks, or uuids, codes can be names')) -parser.add_argument('--wf_para', type=int, dest='wf_parameters', - help='Some workflow parameters', required=False) - -parser.add_argument('--calc_para', type=int, dest='calc_parameters', - help='Parameters for the FLEUR calculation', required=False) -parser.add_argument('--fleurinp', type=int, dest='fleurinp', - help='FleurinpData from which to run the FLEUR calculation', required=False) -parser.add_argument('--remote', type=int, dest='remote_data', - help=('Remote Data of older FLEUR calculation, ' - 'from which files will be copied (mixing_history ...)'), required=False) - -parser.add_argument('--fleur', type=int, dest='fleur', - help='The FLEUR code node to use', required=True) -parser.add_argument('--submit', type=bool, dest='submit', - help='should the workflow be submited or run', required=False) -parser.add_argument('--options', type=int, dest='options', - help='options of the workflow', required=False) +parser.add_argument('--wf_para', type=int, dest='wf_parameters', help='Some workflow parameters', required=False) + +parser.add_argument('--calc_para', + type=int, + dest='calc_parameters', + help='Parameters for the FLEUR calculation', + required=False) +parser.add_argument('--fleurinp', + type=int, + dest='fleurinp', + help='FleurinpData from which to run the FLEUR calculation', + required=False) +parser.add_argument('--remote', + type=int, + dest='remote_data', + help=('Remote Data of older FLEUR calculation, ' + 'from which files will be copied (mixing_history ...)'), + required=False) + +parser.add_argument('--fleur', type=int, dest='fleur', help='The FLEUR code node to use', required=True) +parser.add_argument('--submit', type=bool, dest='submit', help='should the workflow be submited or run', required=False) +parser.add_argument('--options', type=int, dest='options', help='options of the workflow', required=False) args = parser.parse_args() print(args) @@ -64,30 +69,29 @@ # nodes_dict[key] = val_new ### Defaults ### -wf_para = Dict(dict={'fleur_runmax' : 4, - 'kpath' : 'auto', - 'nkpts' : 800, - 'sigma' : 0.005, - 'emin' : -0.30, - 'emax' : 0.80}) +wf_para = Dict(dict={'fleur_runmax': 4, 'kpath': 'auto', 'nkpts': 800, 'sigma': 0.005, 'emin': -0.30, 'emax': 0.80}) -options = Dict(dict={'resources' : {"num_machines": 1}, - 'queue_name' : 'th1',#23_node', - 'max_wallclock_seconds': 60*60}) +options = Dict(dict={ + 'resources': { + 'num_machines': 1 + }, + 'queue_name': 'th1', #23_node', + 'max_wallclock_seconds': 60 * 60 +}) # W bcc structure file_path = '../../inp_xml_files/W/inp.xml' - filefolder = os.path.dirname(os.path.abspath(__file__)) -inputfile = os.path.abspath(os.path.join(filefolder, file_path)) +inputfile = os.path.abspath(os.path.join(filefolder, file_path)) fleurinp = FleurinpData(files=[inputfile]) -default = {'fleurinp' : fleurinp, - 'wf_parameters': wf_para, - 'options' : options, - } +default = { + 'fleurinp': fleurinp, + 'wf_parameters': wf_para, + 'options': options, +} #### @@ -119,15 +123,14 @@ submit_wc = submit pprint(inputs) - -print("##################### TEST fleur_band_wc #####################") +print('##################### TEST FleurBandWorkChain #####################') if submit_wc: - res = submit(fleur_band_wc, **inputs) - print("##################### Submited fleur_band_wc #####################") - print(("Runtime info: {}".format(res))) - print("##################### Finished submiting fleur_band_wc #####################") + res = submit(FleurBandWorkChain, **inputs) + print('##################### Submited FleurBandWorkChain #####################') + print(('Runtime info: {}'.format(res))) + print('##################### Finished submiting FleurBandWorkChain #####################') else: - print("##################### Running fleur_dos_wc #####################") - res = run(fleur_band_wc, **inputs) - print("##################### Finished running fleur_band_wc #####################") + print('##################### Running fleur_dos_wc #####################') + res = run(FleurBandWorkChain, **inputs) + print('##################### Finished running FleurBandWorkChain #####################') diff --git a/examples/submission/workflow_tests/test_submit_corehole.py b/examples/submission/workflow_tests/test_submit_corehole.py index c09ac4593..c62984359 100644 --- a/examples/submission/workflow_tests/test_submit_corehole.py +++ b/examples/submission/workflow_tests/test_submit_corehole.py @@ -9,7 +9,6 @@ # For further information please visit http://www.flapw.de or # # http://aiida-fleur.readthedocs.io/en/develop/ # ############################################################################### - """ Here we run the fleur_corehole_wc for Si or some other material """ @@ -32,25 +31,28 @@ parser = argparse.ArgumentParser(description=('Corehole calculation with FLEUR workflow' '. all arguments are pks, or uuids, codes can be names')) -parser.add_argument('--wf_para', type=int, dest='wf_parameters', - help='Some workflow parameters', required=False) -parser.add_argument('--structure', type=int, dest='structure', - help='The crystal structure node', required=False) -parser.add_argument('--calc_para', type=int, dest='calc_parameters', - help='Parameters for the FLEUR calculation', required=False) -parser.add_argument('--fleurinp', type=int, dest='fleurinp', - help='FleurinpData from which to run the FLEUR calculation', required=False) -parser.add_argument('--remote', type=int, dest='remote_data', - help=('Remote Data of older FLEUR calculation, ' - 'from which files will be copied (mixing_history ...)'), required=False) -parser.add_argument('--inpgen', type=int, dest='inpgen', - help='The inpgen code node to use', required=False) -parser.add_argument('--fleur', type=int, dest='fleur', - help='The FLEUR code node to use', required=True) -parser.add_argument('--submit', type=bool, dest='submit', - help='should the workflow be submited or run', required=False) -parser.add_argument('--options', type=int, dest='options', - help='options of the workflow', required=False) +parser.add_argument('--wf_para', type=int, dest='wf_parameters', help='Some workflow parameters', required=False) +parser.add_argument('--structure', type=int, dest='structure', help='The crystal structure node', required=False) +parser.add_argument('--calc_para', + type=int, + dest='calc_parameters', + help='Parameters for the FLEUR calculation', + required=False) +parser.add_argument('--fleurinp', + type=int, + dest='fleurinp', + help='FleurinpData from which to run the FLEUR calculation', + required=False) +parser.add_argument('--remote', + type=int, + dest='remote_data', + help=('Remote Data of older FLEUR calculation, ' + 'from which files will be copied (mixing_history ...)'), + required=False) +parser.add_argument('--inpgen', type=int, dest='inpgen', help='The inpgen code node to use', required=False) +parser.add_argument('--fleur', type=int, dest='fleur', help='The FLEUR code node to use', required=True) +parser.add_argument('--submit', type=bool, dest='submit', help='should the workflow be submited or run', required=False) +parser.add_argument('--options', type=int, dest='options', help='options of the workflow', required=False) args = parser.parse_args() print(args) @@ -66,45 +68,50 @@ # nodes_dict[key] = val_new ### Defaults ### -wf_para = Dict(dict={'method' : 'valence', - 'hole_charge' : 0.5, - 'atoms' : ['all'], - 'corelevel' : ['W,4f', 'W,4p'],#['W,all'],# - 'supercell_size' : [2,1,1], - 'magnetic' : True}) - -options = Dict(dict={'resources' : {"num_machines": 1}, - 'queue_name' : 'th1',#23_node', - 'max_wallclock_seconds': 60*60}) +wf_para = Dict( + dict={ + 'method': 'valence', + 'hole_charge': 0.5, + 'atoms': ['all'], + 'corelevel': ['W,4f', 'W,4p'], #['W,all'],# + 'supercell_size': [2, 1, 1], + 'magnetic': True + }) + +options = Dict(dict={ + 'resources': { + 'num_machines': 1 + }, + 'queue_name': 'th1', #23_node', + 'max_wallclock_seconds': 60 * 60 +}) # W bcc structure -bohr_a_0= 0.52917721092 # A -a = 3.013812049196*bohr_a_0 -cell = [[-a,a,a],[a,-a,a],[a,a,-a]] +bohr_a_0 = 0.52917721092 # A +a = 3.013812049196 * bohr_a_0 +cell = [[-a, a, a], [a, -a, a], [a, a, -a]] structure = StructureData(cell=cell) -structure.append_atom(position=(0.,0.,0.), symbols='W') -parameters = Dict(dict={ - 'atom':{ - 'element' : 'W', - 'jri' : 833, - 'rmt' : 2.3, - 'dx' : 0.015, - 'lmax' : 8, - 'lo' : '5p', - 'econfig': '[Kr] 5s2 4d10 4f14| 5p6 5d4 6s2', - }, - 'comp': { - 'kmax': 3.0, - }, - 'kpt': { - 'nkpt': 100, - }}) - -default = {'structure' : structure, - 'wf_parameters': wf_para, - 'options' : options, - 'calc_parameters' : parameters - } +structure.append_atom(position=(0., 0., 0.), symbols='W') +parameters = Dict( + dict={ + 'atom': { + 'element': 'W', + 'jri': 833, + 'rmt': 2.3, + 'dx': 0.015, + 'lmax': 8, + 'lo': '5p', + 'econfig': '[Kr] 5s2 4d10 4f14| 5p6 5d4 6s2', + }, + 'comp': { + 'kmax': 3.0, + }, + 'kpt': { + 'nkpt': 100, + } + }) + +default = {'structure': structure, 'wf_parameters': wf_para, 'options': options, 'calc_parameters': parameters} #### @@ -148,14 +155,14 @@ #builder = fleur_scf_wc.get_builder() -print("##################### TEST fleur_corehole_wc #####################") +print('##################### TEST fleur_corehole_wc #####################') if submit_wc: res = submit(fleur_corehole_wc, **inputs) - print("##################### Submited fleur_corehole_wc #####################") - print(("Runtime info: {}".format(res))) - print("##################### Finished submiting fleur_corehole_wc #####################") + print('##################### Submited fleur_corehole_wc #####################') + print(('Runtime info: {}'.format(res))) + print('##################### Finished submiting fleur_corehole_wc #####################') else: - print("##################### Running fleur_corehole_wc #####################") + print('##################### Running fleur_corehole_wc #####################') res = run(fleur_corehole_wc, **inputs) - print("##################### Finished running fleur_corehole_wc #####################") + print('##################### Finished running fleur_corehole_wc #####################') diff --git a/examples/submission/workflow_tests/test_submit_create_magnetic.py b/examples/submission/workflow_tests/test_submit_create_magnetic.py index 2c6033185..f58a4a42d 100644 --- a/examples/submission/workflow_tests/test_submit_create_magnetic.py +++ b/examples/submission/workflow_tests/test_submit_create_magnetic.py @@ -30,26 +30,25 @@ parser = argparse.ArgumentParser(description=('Create Magnetic WorkChain.' ' All arguments are pks, or uuids, ' 'codes can be names')) -parser.add_argument('--wf_para', type=int, dest='wf_parameters', - help='Some workflow parameters', required=False) -parser.add_argument('--structure', type=int, dest='structure', - help='The crystal structure node', required=False) -parser.add_argument('--calc_para', type=int, dest='calc_parameters', - help='Parameters for the FLEUR calculation', required=False) -parser.add_argument('--inpgen', type=int, dest='inpgen', - help='The inpgen code node to use', required=False) -parser.add_argument('--fleur', type=int, dest='fleur', - help='The FLEUR code node to use', required=True) -parser.add_argument('--submit', type=bool, dest='submit', - help='should the workflow be submitted or run', required=False) -parser.add_argument('--options', type=int, dest='options', - help='options of the workflow', required=False) +parser.add_argument('--wf_para', type=int, dest='wf_parameters', help='Some workflow parameters', required=False) +parser.add_argument('--structure', type=int, dest='structure', help='The crystal structure node', required=False) +parser.add_argument('--calc_para', + type=int, + dest='calc_parameters', + help='Parameters for the FLEUR calculation', + required=False) +parser.add_argument('--inpgen', type=int, dest='inpgen', help='The inpgen code node to use', required=False) +parser.add_argument('--fleur', type=int, dest='fleur', help='The FLEUR code node to use', required=True) +parser.add_argument('--submit', + type=bool, + dest='submit', + help='should the workflow be submitted or run', + required=False) +parser.add_argument('--options', type=int, dest='options', help='options of the workflow', required=False) args = parser.parse_args() print(args) - - fleur_code = is_code(args.fleur) fleur_code = test_and_get_codenode(fleur_code, expected_code_type='fleur.fleur') @@ -59,36 +58,32 @@ #### wf_para = { - 'lattice': 'fcc', - 'miller': [[-1, 1, 0], - [0, 0, 1], - [1, 1, 0]], - 'host_symbol': 'Pt', - 'latticeconstant': 4.0, - 'size': (1, 1, 5), - 'replacements': {0: 'Fe', -1: 'Fe'}, - 'decimals': 10, - 'pop_last_layers': 1, - - 'total_number_layers': 8, - 'num_relaxed_layers': 3 - } + 'lattice': 'fcc', + 'miller': [[-1, 1, 0], [0, 0, 1], [1, 1, 0]], + 'host_symbol': 'Pt', + 'latticeconstant': 4.0, + 'size': (1, 1, 5), + 'replacements': { + 0: 'Fe', + -1: 'Fe' + }, + 'decimals': 10, + 'pop_last_layers': 1, + 'total_number_layers': 8, + 'num_relaxed_layers': 3 +} wf_para = Dict(dict=wf_para) -wf_eos = { - 'points': 15, - 'step': 0.015, - 'guess': 1.00 - } +wf_eos = {'points': 15, 'step': 0.015, 'guess': 1.00} wf_eos_scf = { - 'fleur_runmax': 4, - 'density_converged': 0.0002, - 'serial': False, - 'itmax_per_run': 50, - 'inpxml_changes': [] - } + 'fleur_runmax': 4, + 'density_converged': 0.0002, + 'serial': False, + 'itmax_per_run': 50, + 'inpxml_changes': [] +} wf_eos_scf = Dict(dict=wf_eos_scf) @@ -97,42 +92,45 @@ calc_eos = { 'comp': { 'kmax': 3.8, - }, + }, 'kpt': { 'div1': 4, - 'div2' : 4, - 'div3' : 4 - } + 'div2': 4, + 'div3': 4 + } } calc_eos = Dict(dict=calc_eos) -options_eos = {'resources' : {"num_machines": 1, "num_mpiprocs_per_machine" : 4, "num_cores_per_mpiproc" : 6}, - 'queue_name' : 'devel', - 'environment_variables' : {'OMP_NUM_THREADS' : '6'}, - 'custom_scheduler_commands' : '', - 'max_wallclock_seconds': 1*60*60} +options_eos = { + 'resources': { + 'num_machines': 1, + 'num_mpiprocs_per_machine': 4, + 'num_cores_per_mpiproc': 6 + }, + 'queue_name': 'devel', + 'custom_scheduler_commands': '', + 'max_wallclock_seconds': 1 * 60 * 60 +} options_eos = Dict(dict=options_eos) -wf_relax = { - 'film_distance_relaxation' : False, - 'force_criterion': 0.049, - 'use_relax_xml': True - } +wf_relax = {'film_distance_relaxation': False, 'force_criterion': 0.049, 'use_relax_xml': True} wf_relax_scf = { - 'fleur_runmax': 5, - 'serial': False, - 'itmax_per_run': 50, - 'alpha_mix': 0.015, - 'relax_iter': 25, - 'force_converged': 0.001, - 'force_dict': {'qfix': 2, - 'forcealpha': 0.75, - 'forcemix': 'straight'}, - 'inpxml_changes': [] - } + 'fleur_runmax': 5, + 'serial': False, + 'itmax_per_run': 50, + 'alpha_mix': 0.015, + 'relax_iter': 25, + 'force_converged': 0.001, + 'force_dict': { + 'qfix': 2, + 'forcealpha': 0.75, + 'forcemix': 'straight' + }, + 'inpxml_changes': [] +} wf_relax = Dict(dict=wf_relax) wf_relax_scf = Dict(dict=wf_relax_scf) @@ -140,35 +138,40 @@ calc_relax = { 'comp': { 'kmax': 4.0, - }, + }, 'kpt': { 'div1': 24, - 'div2' : 20, - 'div3' : 1 - }, - 'atom':{ - 'element' : 'Pt', - 'rmt' : 2.2, - 'lmax' : 10, - 'lnonsph' : 6, + 'div2': 20, + 'div3': 1 + }, + 'atom': { + 'element': 'Pt', + 'rmt': 2.2, + 'lmax': 10, + 'lnonsph': 6, 'econfig': '[Kr] 5s2 4d10 4f14 5p6| 5d9 6s1', - }, - 'atom2':{ - 'element' : 'Fe', - 'rmt' : 2.1, - 'lmax' : 10, - 'lnonsph' : 6, + }, + 'atom2': { + 'element': 'Fe', + 'rmt': 2.1, + 'lmax': 10, + 'lnonsph': 6, 'econfig': '[Ne] 3s2 3p6| 3d6 4s2', - }, + }, } calc_relax = Dict(dict=calc_relax) -options_relax = {'resources' : {"num_machines": 1, "num_mpiprocs_per_machine" : 4, "num_cores_per_mpiproc" : 6}, - 'queue_name' : 'devel', - 'environment_variables' : {'OMP_NUM_THREADS' : '6'}, - 'custom_scheduler_commands' : '', - 'max_wallclock_seconds': 1*60*60} +options_relax = { + 'resources': { + 'num_machines': 1, + 'num_mpiprocs_per_machine': 4, + 'num_cores_per_mpiproc': 6 + }, + 'queue_name': 'devel', + 'custom_scheduler_commands': '', + 'max_wallclock_seconds': 1 * 60 * 60 +} options_relax = Dict(dict=options_relax) @@ -183,46 +186,45 @@ inputs = { 'eos': { 'scf': { - 'wf_parameters' : wf_eos_scf, - 'calc_parameters' : calc_eos, - 'options' : options_eos, - 'inpgen' : inpgen_inp, - 'fleur' : fleur_inp + 'wf_parameters': wf_eos_scf, + 'calc_parameters': calc_eos, + 'options': options_eos, + 'inpgen': inpgen_inp, + 'fleur': fleur_inp }, - 'wf_parameters' : wf_eos + 'wf_parameters': wf_eos }, 'relax': { - 'scf' : { - 'wf_parameters' : wf_relax_scf, - 'calc_parameters' : calc_relax, - 'options' : options_relax, - 'inpgen' : inpgen_inp, - 'fleur' : fleur_inp + 'scf': { + 'wf_parameters': wf_relax_scf, + 'calc_parameters': calc_relax, + 'options': options_relax, + 'inpgen': inpgen_inp, + 'fleur': fleur_inp }, - 'wf_parameters' : wf_relax, + 'wf_parameters': wf_relax, 'label': 'relaxation', - 'description' : 'describtion', - 'max_iterations' : Int(5) + 'description': 'describtion', + 'max_iterations': Int(5) }, 'wf_parameters': wf_para - #'eos_output': load_node(14405) + # 'eos_output': load_node(14405) } - submit_wc = False if args.submit is not None: submit_wc = submit -print("##################### TEST fleur_create_magnetic_wc #####################") +print('##################### TEST fleur_create_magnetic_wc #####################') if submit_wc: res = submit(FleurCreateMagneticWorkChain, **inputs) - print("##################### Submitted fleur_create_magnetic_wc #####################") - print(("Runtime info: {}".format(res))) + print('##################### Submitted fleur_create_magnetic_wc #####################') + print(('Runtime info: {}'.format(res))) print((res.pk)) - print("##################### Finished submiting fleur_create_magnetic_wc #####################") + print('##################### Finished submiting fleur_create_magnetic_wc #####################') else: - print("##################### Running fleur_create_magnetic_wc #####################") + print('##################### Running fleur_create_magnetic_wc #####################') res = run(FleurCreateMagneticWorkChain, **inputs) - print("##################### Finished running fleur_create_magnetic_wc #####################") + print('##################### Finished running fleur_create_magnetic_wc #####################') diff --git a/examples/submission/workflow_tests/test_submit_dmi.py b/examples/submission/workflow_tests/test_submit_dmi.py index e7f876faa..50c588a14 100644 --- a/examples/submission/workflow_tests/test_submit_dmi.py +++ b/examples/submission/workflow_tests/test_submit_dmi.py @@ -9,7 +9,6 @@ # For further information please visit http://www.flapw.de or # # http://aiida-fleur.readthedocs.io/en/develop/ # ############################################################################### - """ Here we run the FleurDMIWorkChain """ @@ -35,126 +34,131 @@ parser = argparse.ArgumentParser(description=('Relax with FLEUR. workflow to optimize ' 'the structure. All arguments are pks, or uuids, ' 'codes can be names')) -parser.add_argument('--wf_para', type=int, dest='wf_parameters', - help='Some workflow parameters', required=False) -parser.add_argument('--structure', type=int, dest='structure', - help='The crystal structure node', required=False) -parser.add_argument('--calc_para', type=int, dest='calc_parameters', - help='Parameters for the FLEUR calculation', required=False) -parser.add_argument('--inpgen', type=int, dest='inpgen', - help='The inpgen code node to use', required=False) -parser.add_argument('--fleur', type=int, dest='fleur', - help='The FLEUR code node to use', required=True) -parser.add_argument('--submit', type=bool, dest='submit', - help='should the workflow be submited or run', required=False) -parser.add_argument('--options', type=int, dest='options', - help='options of the workflow', required=False) -parser.add_argument('--remote', type=int, dest='remote', - help='remote', required=False) -parser.add_argument('--fleurinp', type=int, dest='fleurinp', - help='fleurinp', required=False) +parser.add_argument('--wf_para', type=int, dest='wf_parameters', help='Some workflow parameters', required=False) +parser.add_argument('--structure', type=int, dest='structure', help='The crystal structure node', required=False) +parser.add_argument('--calc_para', + type=int, + dest='calc_parameters', + help='Parameters for the FLEUR calculation', + required=False) +parser.add_argument('--inpgen', type=int, dest='inpgen', help='The inpgen code node to use', required=False) +parser.add_argument('--fleur', type=int, dest='fleur', help='The FLEUR code node to use', required=True) +parser.add_argument('--submit', type=bool, dest='submit', help='should the workflow be submited or run', required=False) +parser.add_argument('--options', type=int, dest='options', help='options of the workflow', required=False) +parser.add_argument('--remote', type=int, dest='remote', help='remote', required=False) +parser.add_argument('--fleurinp', type=int, dest='fleurinp', help='fleurinp', required=False) args = parser.parse_args() print(args) ### Defaults ### -wf_para = Dict(dict={'serial': False, - 'beta': {'123': 1.57079}, - 'sqas_theta': [0.0, 1.57079, 1.57079], - 'sqas_phi': [0.0, 0.0, 1.57079], - 'soc_off': [], - # 'prop_dir': [0.125, 0.15, 0.24], - 'q_vectors': [[0.0, 0.0, 0.0], - [0.1, 0.1, 0.0]], - 'ref_qss': [0.0, 0.0, 0.0], - 'inpxml_changes': [] - }) - -options = Dict(dict={'resources': {"num_machines": 1, "num_mpiprocs_per_machine": 24}, - 'queue_name': 'devel', - 'custom_scheduler_commands': '', - 'max_wallclock_seconds': 60*60}) +wf_para = Dict( + dict={ + 'serial': False, + 'beta': { + '123': 1.57079 + }, + 'sqas_theta': [0.0, 1.57079, 1.57079], + 'sqas_phi': [0.0, 0.0, 1.57079], + 'soc_off': [], + # 'prop_dir': [0.125, 0.15, 0.24], + 'q_vectors': [[0.0, 0.0, 0.0], [0.1, 0.1, 0.0]], + 'ref_qss': [0.0, 0.0, 0.0], + 'inpxml_changes': [] + }) + +options = Dict( + dict={ + 'resources': { + 'num_machines': 1, + 'num_mpiprocs_per_machine': 24 + }, + 'queue_name': 'devel', + 'custom_scheduler_commands': '', + 'max_wallclock_seconds': 60 * 60 + }) bohr_a_0 = 0.52917721092 # A -a = 7.497*bohr_a_0 -cell = [[0.7071068*a, 0.0, 0.0], - [0.0, 1.0*a, 0.0], - [0.0, 0.0, 0.7071068*a]] +a = 7.497 * bohr_a_0 +cell = [[0.7071068 * a, 0.0, 0.0], [0.0, 1.0 * a, 0.0], [0.0, 0.0, 0.7071068 * a]] structure = StructureData(cell=cell) -structure.append_atom(position=(0.0, 0.0, -1.99285*bohr_a_0), symbols='Fe', name='Fe123') -structure.append_atom(position=(0.5*0.7071068*a, 0.5*a, 0.0), symbols='Pt') -structure.append_atom(position=(0., 0., 2.65059*bohr_a_0), symbols='Pt') +structure.append_atom(position=(0.0, 0.0, -1.99285 * bohr_a_0), symbols='Fe', name='Fe123') +structure.append_atom(position=(0.5 * 0.7071068 * a, 0.5 * a, 0.0), symbols='Pt') +structure.append_atom(position=(0., 0., 2.65059 * bohr_a_0), symbols='Pt') structure.pbc = (True, True, False) -parameters = Dict(dict={ - 'atom': { - 'element': 'Pt', - 'lmax': 8 - }, - 'atom2': { - 'element': 'Fe', - 'lmax': 8, - }, - 'comp': { - 'kmax': 3.8, - }, - 'kpt': { - 'div1': 20, - 'div2': 24, - 'div3': 1 - }}) - -wf_para_scf = {'fleur_runmax': 2, - 'itmax_per_run': 120, - 'density_converged': 0.2, - 'serial': False, - 'mode': 'density' - } +parameters = Dict( + dict={ + 'atom': { + 'element': 'Pt', + 'lmax': 8 + }, + 'atom2': { + 'element': 'Fe', + 'lmax': 8, + }, + 'comp': { + 'kmax': 3.8, + }, + 'kpt': { + 'div1': 20, + 'div2': 24, + 'div3': 1 + } + }) + +wf_para_scf = {'fleur_runmax': 2, 'itmax_per_run': 120, 'density_converged': 0.2, 'serial': False, 'mode': 'density'} wf_para_scf = Dict(dict=wf_para_scf) -options_scf = Dict(dict={'resources': {"num_machines": 2, "num_mpiprocs_per_machine": 24}, - 'queue_name': 'devel', - 'custom_scheduler_commands': '', - 'max_wallclock_seconds': 60*60}) +options_scf = Dict( + dict={ + 'resources': { + 'num_machines': 2, + 'num_mpiprocs_per_machine': 24 + }, + 'queue_name': 'devel', + 'custom_scheduler_commands': '', + 'max_wallclock_seconds': 60 * 60 + }) #### - fleur_code = is_code(args.fleur) fleur_inp = test_and_get_codenode(fleur_code, expected_code_type='fleur.fleur') inpgen_code = is_code(args.inpgen) inpgen_inp = test_and_get_codenode(inpgen_code, expected_code_type='fleur.inpgen') -inputs = {'scf': {'wf_parameters': wf_para_scf, - 'structure': structure, - 'calc_parameters': parameters, - 'options': options_scf, - 'inpgen': inpgen_inp, - 'fleur': fleur_inp - }, - 'wf_parameters': wf_para, - 'fleur': fleur_inp, - 'options': options - } - +inputs = { + 'scf': { + 'wf_parameters': wf_para_scf, + 'structure': structure, + 'calc_parameters': parameters, + 'options': options_scf, + 'inpgen': inpgen_inp, + 'fleur': fleur_inp + }, + 'wf_parameters': wf_para, + 'fleur': fleur_inp, + 'options': options +} submit_wc = False if args.submit is not None: submit_wc = submit pprint(inputs) -print("##################### TEST fleur_spst_wc #####################") +print('##################### TEST fleur_spst_wc #####################') if submit_wc: res = submit(FleurDMIWorkChain, **inputs) - print("##################### Submited fleur_spst_wc #####################") - print(("Runtime info: {}".format(res))) + print('##################### Submited fleur_spst_wc #####################') + print(('Runtime info: {}'.format(res))) print((res.pk)) - print("##################### Finished submiting fleur_spst_wc #####################") + print('##################### Finished submiting fleur_spst_wc #####################') else: - print("##################### Running fleur_spst_wc #####################") + print('##################### Running fleur_spst_wc #####################') res = run(FleurDMIWorkChain, **inputs) - print("##################### Finished running fleur_spst_wc #####################") + print('##################### Finished running fleur_spst_wc #####################') diff --git a/examples/submission/workflow_tests/test_submit_dos.py b/examples/submission/workflow_tests/test_submit_dos.py index 1fa1f0199..22749c43b 100644 --- a/examples/submission/workflow_tests/test_submit_dos.py +++ b/examples/submission/workflow_tests/test_submit_dos.py @@ -9,7 +9,6 @@ # For further information please visit http://www.flapw.de or # # http://aiida-fleur.readthedocs.io/en/develop/ # ############################################################################### - """ Here we run the fleur_scf_wc for Si or some other material """ @@ -30,25 +29,31 @@ FleurinpData = DataFactory('fleur.fleurinp') StructureData = DataFactory('structure') -parser = argparse.ArgumentParser(description=('SCF with FLEUR. workflow to' - ' converge the chargedensity and optional the total energy. all arguments are pks, or uuids, codes can be names')) -parser.add_argument('--wf_para', type=int, dest='wf_parameters', - help='Some workflow parameters', required=False) - -parser.add_argument('--calc_para', type=int, dest='calc_parameters', - help='Parameters for the FLEUR calculation', required=False) -parser.add_argument('--fleurinp', type=int, dest='fleurinp', - help='FleurinpData from which to run the FLEUR calculation', required=False) -parser.add_argument('--remote', type=int, dest='remote_data', - help=('Remote Data of older FLEUR calculation, ' - 'from which files will be copied (mixing_history ...)'), required=False) - -parser.add_argument('--fleur', type=int, dest='fleur', - help='The FLEUR code node to use', required=True) -parser.add_argument('--submit', type=bool, dest='submit', - help='should the workflow be submited or run', required=False) -parser.add_argument('--options', type=int, dest='options', - help='options of the workflow', required=False) +parser = argparse.ArgumentParser(description=( + 'SCF with FLEUR. workflow to' + ' converge the chargedensity and optional the total energy. all arguments are pks, or uuids, codes can be names')) +parser.add_argument('--wf_para', type=int, dest='wf_parameters', help='Some workflow parameters', required=False) + +parser.add_argument('--calc_para', + type=int, + dest='calc_parameters', + help='Parameters for the FLEUR calculation', + required=False) +parser.add_argument('--fleurinp', + type=int, + dest='fleurinp', + help='FleurinpData from which to run the FLEUR calculation', + required=False) +parser.add_argument('--remote', + type=int, + dest='remote_data', + help=('Remote Data of older FLEUR calculation, ' + 'from which files will be copied (mixing_history ...)'), + required=False) + +parser.add_argument('--fleur', type=int, dest='fleur', help='The FLEUR code node to use', required=True) +parser.add_argument('--submit', type=bool, dest='submit', help='should the workflow be submited or run', required=False) +parser.add_argument('--options', type=int, dest='options', help='options of the workflow', required=False) args = parser.parse_args() print(args) @@ -64,30 +69,29 @@ # nodes_dict[key] = val_new ### Defaults ### -wf_para = Dict(dict={'fleur_runmax' : 4, - 'tria' : True, - 'nkpts' : 800, - 'sigma' : 0.005, - 'emin' : -0.30, - 'emax' : 0.80}) +wf_para = Dict(dict={'fleur_runmax': 4, 'tria': True, 'nkpts': 800, 'sigma': 0.005, 'emin': -0.30, 'emax': 0.80}) -options = Dict(dict={'resources' : {"num_machines": 1}, - 'queue_name' : 'th1',#23_node', - 'max_wallclock_seconds': 60*60}) +options = Dict(dict={ + 'resources': { + 'num_machines': 1 + }, + 'queue_name': 'th1', #23_node', + 'max_wallclock_seconds': 60 * 60 +}) # W bcc structure file_path = '../../inp_xml_files/W/inp.xml' - filefolder = os.path.dirname(os.path.abspath(__file__)) -inputfile = os.path.abspath(os.path.join(filefolder, file_path)) +inputfile = os.path.abspath(os.path.join(filefolder, file_path)) fleurinp = FleurinpData(files=[inputfile]) -default = {'fleurinp' : fleurinp, - 'wf_parameters': wf_para, - 'options' : options, - } +default = { + 'fleurinp': fleurinp, + 'wf_parameters': wf_para, + 'options': options, +} #### @@ -119,15 +123,14 @@ submit_wc = submit pprint(inputs) - -print("##################### TEST fleur_dos_wc #####################") +print('##################### TEST fleur_dos_wc #####################') if submit_wc: res = submit(fleur_dos_wc, **inputs) - print("##################### Submited fleur_dos_wc #####################") - print(("Runtime info: {}".format(res))) - print("##################### Finished submiting fleur_dos_wc #####################") + print('##################### Submited fleur_dos_wc #####################') + print(('Runtime info: {}'.format(res))) + print('##################### Finished submiting fleur_dos_wc #####################') else: - print("##################### Running fleur_dos_wc #####################") + print('##################### Running fleur_dos_wc #####################') res = run(fleur_dos_wc, **inputs) - print("##################### Finished running fleur_dos_wc #####################") + print('##################### Finished running fleur_dos_wc #####################') diff --git a/examples/submission/workflow_tests/test_submit_eos.py b/examples/submission/workflow_tests/test_submit_eos.py index dd88b8bb8..36285d74e 100644 --- a/examples/submission/workflow_tests/test_submit_eos.py +++ b/examples/submission/workflow_tests/test_submit_eos.py @@ -9,7 +9,6 @@ # For further information please visit http://www.flapw.de or # # http://aiida-fleur.readthedocs.io/en/develop/ # ############################################################################### - """ Here we run the FleurSSDispWorkChain """ @@ -34,87 +33,83 @@ parser = argparse.ArgumentParser(description=('Relax with FLEUR. workflow to optimize ' 'the structure. All arguments are pks, or uuids, ' 'codes can be names')) -parser.add_argument('--wf_para', type=int, dest='wf_parameters', - help='Some workflow parameters', required=False) -parser.add_argument('--structure', type=int, dest='structure', - help='The crystal structure node', required=False) -parser.add_argument('--calc_para', type=int, dest='calc_parameters', - help='Parameters for the FLEUR calculation', required=False) -parser.add_argument('--inpgen', type=int, dest='inpgen', - help='The inpgen code node to use', required=False) -parser.add_argument('--fleur', type=int, dest='fleur', - help='The FLEUR code node to use', required=True) -parser.add_argument('--submit', type=bool, dest='submit', - help='should the workflow be submited or run', required=False) -parser.add_argument('--options', type=int, dest='options', - help='options of the workflow', required=False) +parser.add_argument('--wf_para', type=int, dest='wf_parameters', help='Some workflow parameters', required=False) +parser.add_argument('--structure', type=int, dest='structure', help='The crystal structure node', required=False) +parser.add_argument('--calc_para', + type=int, + dest='calc_parameters', + help='Parameters for the FLEUR calculation', + required=False) +parser.add_argument('--inpgen', type=int, dest='inpgen', help='The inpgen code node to use', required=False) +parser.add_argument('--fleur', type=int, dest='fleur', help='The FLEUR code node to use', required=True) +parser.add_argument('--submit', type=bool, dest='submit', help='should the workflow be submited or run', required=False) +parser.add_argument('--options', type=int, dest='options', help='options of the workflow', required=False) args = parser.parse_args() print(args) ### Defaults ### -wf_para = Dict(dict={ - 'points': 9, - 'step': 0.002, - 'guess': 1.00 -}) +wf_para = Dict(dict={'points': 9, 'step': 0.002, 'guess': 1.00}) # Fe fcc structure bohr_a_0 = 0.52917721092 # A -a = 3.4100000000*2**(0.5) -cell = [[a, 0, 0], - [0, a, 0], - [0, 0, a]] +a = 3.4100000000 * 2**(0.5) +cell = [[a, 0, 0], [0, a, 0], [0, 0, a]] structure = StructureData(cell=cell) structure.append_atom(position=(0., 0., 0.), symbols='Fe', name='Fe1') -structure.append_atom(position=(0.5*a, 0.5*a, 0.0*a), symbols='Fe', name='Fe2') -structure.append_atom(position=(0.5*a, 0.0*a, 0.5*a), symbols='Fe', name='Fe31') -structure.append_atom(position=(0.0*a, 0.5*a, 0.5*a), symbols='Fe', name='Fe43') +structure.append_atom(position=(0.5 * a, 0.5 * a, 0.0 * a), symbols='Fe', name='Fe2') +structure.append_atom(position=(0.5 * a, 0.0 * a, 0.5 * a), symbols='Fe', name='Fe31') +structure.append_atom(position=(0.0 * a, 0.5 * a, 0.5 * a), symbols='Fe', name='Fe43') parameters = Dict(dict={ - 'comp': {'kmax': 3.4, - }, - 'atom': {'element': 'Fe', - 'bmu': 2.5, - 'rmt': 2.15 - }, - 'kpt': {'div1': 4, - 'div2': 4, - 'div3': 4 - }}) - -wf_para_scf = {'fleur_runmax': 2, - 'itmax_per_run': 120, - 'density_converged': 0.2, - 'serial': False, - 'mode': 'density' - } + 'comp': { + 'kmax': 3.4, + }, + 'atom': { + 'element': 'Fe', + 'bmu': 2.5, + 'rmt': 2.15 + }, + 'kpt': { + 'div1': 4, + 'div2': 4, + 'div3': 4 + } +}) + +wf_para_scf = {'fleur_runmax': 2, 'itmax_per_run': 120, 'density_converged': 0.2, 'serial': False, 'mode': 'density'} wf_para_scf = Dict(dict=wf_para_scf) -options_scf = Dict(dict={'resources': {"num_machines": 1, "num_mpiprocs_per_machine": 8}, - 'queue_name': 'devel', - 'custom_scheduler_commands': '', - 'max_wallclock_seconds': 60*60}) +options_scf = Dict( + dict={ + 'resources': { + 'num_machines': 1, + 'num_mpiprocs_per_machine': 8 + }, + 'queue_name': 'devel', + 'custom_scheduler_commands': '', + 'max_wallclock_seconds': 60 * 60 + }) #### - fleur_code = is_code(args.fleur) fleur_inp = test_and_get_codenode(fleur_code, expected_code_type='fleur.fleur') inpgen_code = is_code(args.inpgen) inpgen_inp = test_and_get_codenode(inpgen_code, expected_code_type='fleur.inpgen') -inputs = {'scf': {'wf_parameters': wf_para_scf, - 'calc_parameters': parameters, - 'options': options_scf, - 'inpgen': inpgen_inp, - 'fleur': fleur_inp - }, - 'wf_parameters': wf_para, - 'structure': structure - } - +inputs = { + 'scf': { + 'wf_parameters': wf_para_scf, + 'calc_parameters': parameters, + 'options': options_scf, + 'inpgen': inpgen_inp, + 'fleur': fleur_inp + }, + 'wf_parameters': wf_para, + 'structure': structure +} submit_wc = False if args.submit is not None: @@ -126,16 +121,16 @@ submit_wc = submit pprint(inputs) -print("##################### TEST FleurEosWorkChain #####################") +print('##################### TEST FleurEosWorkChain #####################') if submit_wc: res = submit(FleurEosWorkChain, **inputs) - print("##################### Submited FleurEosWorkChain #####################") - print(("Runtime info: {}".format(res))) + print('##################### Submited FleurEosWorkChain #####################') + print(('Runtime info: {}'.format(res))) print((res.pk)) - print("##################### Finished submiting FleurEosWorkChain #####################") + print('##################### Finished submiting FleurEosWorkChain #####################') else: - print("##################### Running FleurEosWorkChain #####################") + print('##################### Running FleurEosWorkChain #####################') res = run(FleurEosWorkChain, **inputs) - print("##################### Finished running FleurEosWorkChain #####################") + print('##################### Finished running FleurEosWorkChain #####################') diff --git a/examples/submission/workflow_tests/test_submit_initial_cls.py b/examples/submission/workflow_tests/test_submit_initial_cls.py index b0ffe820c..79201dc51 100644 --- a/examples/submission/workflow_tests/test_submit_initial_cls.py +++ b/examples/submission/workflow_tests/test_submit_initial_cls.py @@ -9,7 +9,6 @@ # For further information please visit http://www.flapw.de or # # http://aiida-fleur.readthedocs.io/en/develop/ # ############################################################################### - """ Here we run the fleur_intitial_cls_wc on some material """ @@ -25,30 +24,30 @@ from aiida.engine import submit, run from aiida_fleur.workflows.initial_cls import fleur_initial_cls_wc - from pprint import pprint ################################################################ ParameterData = DataFactory('dict') FleurinpData = DataFactory('fleur.fleurinp') StructureData = DataFactory('structure') - -parser = argparse.ArgumentParser(description=('Calculate initial core-level shifts with FLEUR. all arguments are pks, or uuids, codes can be names')) -parser.add_argument('--wf_para', type=int, dest='wf_parameters', - help='Some workflow parameters', required=False) -parser.add_argument('--structure', type=int, dest='structure', - help='The crystal structure node', required=False) -parser.add_argument('--calc_para', type=int, dest='calc_parameters', - help='Parameters for the FLEUR calculation', required=False) -parser.add_argument('--fleurinp', type=int, dest='fleurinp', - help='FleurinpData from which to run the FLEUR calculation', required=False) -parser.add_argument('--inpgen', type=int, dest='inpgen', - help='The inpgen code node to use', required=False) -parser.add_argument('--fleur', type=int, dest='fleur', - help='The FLEUR code node to use', required=True) -parser.add_argument('--submit', type=bool, dest='submit', - help='should the workflow be submited or run', required=False) -parser.add_argument('--options', type=int, dest='options', - help='options of the workflow', required=False) + +parser = argparse.ArgumentParser( + description=('Calculate initial core-level shifts with FLEUR. all arguments are pks, or uuids, codes can be names')) +parser.add_argument('--wf_para', type=int, dest='wf_parameters', help='Some workflow parameters', required=False) +parser.add_argument('--structure', type=int, dest='structure', help='The crystal structure node', required=False) +parser.add_argument('--calc_para', + type=int, + dest='calc_parameters', + help='Parameters for the FLEUR calculation', + required=False) +parser.add_argument('--fleurinp', + type=int, + dest='fleurinp', + help='FleurinpData from which to run the FLEUR calculation', + required=False) +parser.add_argument('--inpgen', type=int, dest='inpgen', help='The inpgen code node to use', required=False) +parser.add_argument('--fleur', type=int, dest='fleur', help='The FLEUR code node to use', required=True) +parser.add_argument('--submit', type=bool, dest='submit', help='should the workflow be submited or run', required=False) +parser.add_argument('--options', type=int, dest='options', help='options of the workflow', required=False) args = parser.parse_args() print(args) @@ -65,38 +64,42 @@ ### Defaults ### -options = Dict(dict={'resources' : {"num_machines": 1}, - 'queue_name' : 'th1',#23_node', - 'max_wallclock_seconds': 60*60}) - -# W bcc structure -bohr_a_0= 0.52917721092 # A -a = 3.013812049196*bohr_a_0 -cell = [[-a,a,a],[a,-a,a],[a,a,-a]] +options = Dict( + dict={ + 'resources': { + 'num_machines': 1, + 'num_mpiprocs_per_machine': 1 + }, + 'queue_name': '', #23_node', + 'max_wallclock_seconds': 60 * 60 + }) + +# W bcc structure +bohr_a_0 = 0.52917721092 # A +a = 3.013812049196 * bohr_a_0 +cell = [[-a, a, a], [a, -a, a], [a, a, -a]] structure = StructureData(cell=cell) -structure.append_atom(position=(0.,0.,0.), symbols='W') -parameters = Dict(dict={ - 'atom':{ - 'element' : 'W', - 'jri' : 833, - 'rmt' : 2.3, - 'dx' : 0.015, - 'lmax' : 8, - 'lo' : '5p', - 'econfig': '[Kr] 5s2 4d10 4f14| 5p6 5d4 6s2', - }, - 'comp': { - 'kmax': 3.0, - }, - 'kpt': { - 'nkpt': 100, - }}) - -default = {'structure' : structure, - 'options' : options, - 'calc_parameters' : parameters - } - +structure.append_atom(position=(0., 0., 0.), symbols='W') +parameters = Dict( + dict={ + 'atom': { + 'element': 'W', + 'jri': 833, + 'rmt': 2.3, + 'dx': 0.015, + 'lmax': 8, + 'lo': '5p', + 'econfig': '[Kr] 5s2 4d10 4f14| 5p6 5d4 6s2', + }, + 'comp': { + 'kmax': 3.0, + }, + 'kpt': { + 'nkpt': 100, + } + }) + +default = {'structure': structure, 'options': options, 'calc_parameters': parameters} #### @@ -119,10 +122,9 @@ if args.wf_parameters is not None: inputs['wf_parameters'] = load_node(args.wf_parameters) else: - wf_para = Dict(dict={'references' : {'W' : [structure.uuid, parameters.uuid]}}) + wf_para = Dict(dict={'references': {'W': [structure.uuid, parameters.uuid]}}) inputs['wf_parameters'] = wf_para - if args.options is not None: inputs['options'] = load_node(args.options) else: @@ -142,14 +144,14 @@ #builder = fleur_scf_wc.get_builder() -print("##################### TEST fleur_initial_cls_wc #####################") +print('##################### TEST fleur_initial_cls_wc #####################') if submit_wc: res = submit(fleur_initial_cls_wc, **inputs) - print("##################### Submited fleur_initial_cls_wc #####################") - print(("Runtime info: {}".format(res))) - print("##################### Finished submiting fleur_initial_cls_wc #####################") + print('##################### Submited fleur_initial_cls_wc #####################') + print(('Runtime info: {}'.format(res))) + print('##################### Finished submiting fleur_initial_cls_wc #####################') else: - print("##################### Running fleur_initial_cls_wc #####################") + print('##################### Running fleur_initial_cls_wc #####################') res = run(fleur_initial_cls_wc, **inputs) - print("##################### Finished running fleur_initial_cls_wc #####################") + print('##################### Finished running fleur_initial_cls_wc #####################') diff --git a/examples/submission/workflow_tests/test_submit_mae.py b/examples/submission/workflow_tests/test_submit_mae.py index 83c43d2dd..37bd01135 100644 --- a/examples/submission/workflow_tests/test_submit_mae.py +++ b/examples/submission/workflow_tests/test_submit_mae.py @@ -9,7 +9,6 @@ # For further information please visit http://www.flapw.de or # # http://aiida-fleur.readthedocs.io/en/develop/ # ############################################################################### - """ Here we run the FleurSSDispWorkChain """ @@ -35,123 +34,127 @@ parser = argparse.ArgumentParser(description=('Relax with FLEUR. workflow to optimize ' 'the structure. All arguments are pks, or uuids, ' 'codes can be names')) -parser.add_argument('--wf_para', type=int, dest='wf_parameters', - help='Some workflow parameters', required=False) -parser.add_argument('--structure', type=int, dest='structure', - help='The crystal structure node', required=False) -parser.add_argument('--calc_para', type=int, dest='calc_parameters', - help='Parameters for the FLEUR calculation', required=False) -parser.add_argument('--inpgen', type=int, dest='inpgen', - help='The inpgen code node to use', required=False) -parser.add_argument('--fleur', type=int, dest='fleur', - help='The FLEUR code node to use', required=True) -parser.add_argument('--submit', type=bool, dest='submit', - help='should the workflow be submited or run', required=False) -parser.add_argument('--options', type=int, dest='options', - help='options of the workflow', required=False) -parser.add_argument('--remote', type=int, dest='remote', - help='remote', required=False) -parser.add_argument('--fleurinp', type=int, dest='fleurinp', - help='fleurinp', required=False) +parser.add_argument('--wf_para', type=int, dest='wf_parameters', help='Some workflow parameters', required=False) +parser.add_argument('--structure', type=int, dest='structure', help='The crystal structure node', required=False) +parser.add_argument('--calc_para', + type=int, + dest='calc_parameters', + help='Parameters for the FLEUR calculation', + required=False) +parser.add_argument('--inpgen', type=int, dest='inpgen', help='The inpgen code node to use', required=False) +parser.add_argument('--fleur', type=int, dest='fleur', help='The FLEUR code node to use', required=True) +parser.add_argument('--submit', type=bool, dest='submit', help='should the workflow be submited or run', required=False) +parser.add_argument('--options', type=int, dest='options', help='options of the workflow', required=False) +parser.add_argument('--remote', type=int, dest='remote', help='remote', required=False) +parser.add_argument('--fleurinp', type=int, dest='fleurinp', help='fleurinp', required=False) args = parser.parse_args() print(args) # Defaults ###e -wf_para = Dict(dict={'sqa_ref': [0.7, 0.7], - 'use_soc_ref': False, - 'sqas_theta': [0.0, 1.57079, 1.57079], - 'sqas_phi': [0.0, 0.0, 1.57079], - 'serial': False, - 'soc_off': [], - 'inpxml_changes': [], - }) - -options = Dict(dict={'resources': {"num_machines": 1, "num_mpiprocs_per_machine": 24}, - 'queue_name': 'devel', - 'custom_scheduler_commands': '', - 'max_wallclock_seconds': 60*60}) +wf_para = Dict( + dict={ + 'sqa_ref': [0.7, 0.7], + 'use_soc_ref': False, + 'sqas_theta': [0.0, 1.57079, 1.57079], + 'sqas_phi': [0.0, 0.0, 1.57079], + 'serial': False, + 'soc_off': [], + 'inpxml_changes': [], + }) + +options = Dict( + dict={ + 'resources': { + 'num_machines': 1, + 'num_mpiprocs_per_machine': 24 + }, + 'queue_name': 'devel', + 'custom_scheduler_commands': '', + 'max_wallclock_seconds': 60 * 60 + }) bohr_a_0 = 0.52917721092 # A -a = 7.497*bohr_a_0 -cell = [[0.7071068*a, 0.0, 0.0], - [0.0, 1.0*a, 0.0], - [0.0, 0.0, 0.7071068*a]] +a = 7.497 * bohr_a_0 +cell = [[0.7071068 * a, 0.0, 0.0], [0.0, 1.0 * a, 0.0], [0.0, 0.0, 0.7071068 * a]] structure = StructureData(cell=cell) -structure.append_atom(position=(0.0, 0.0, -1.99285*bohr_a_0), symbols='Fe', name='Fe123') -structure.append_atom(position=(0.5*0.7071068*a, 0.5*a, 0.0), symbols='Pt') -structure.append_atom(position=(0., 0., 2.65059*bohr_a_0), symbols='Pt') +structure.append_atom(position=(0.0, 0.0, -1.99285 * bohr_a_0), symbols='Fe', name='Fe123') +structure.append_atom(position=(0.5 * 0.7071068 * a, 0.5 * a, 0.0), symbols='Pt') +structure.append_atom(position=(0., 0., 2.65059 * bohr_a_0), symbols='Pt') structure.pbc = (True, True, False) -parameters = Dict(dict={ - 'atom': { - 'element': 'Pt', - 'lmax': 8 - }, - 'atom2': { - 'element': 'Fe', - 'lmax': 8, - }, - 'comp': { - 'kmax': 3.8, - }, - 'kpt': { - 'div1': 20, - 'div2': 24, - 'div3': 1 - }}) - -wf_para_scf = {'fleur_runmax': 2, - 'itmax_per_run': 120, - 'density_converged': 0.2, - 'serial': False, - 'mode': 'density' - } +parameters = Dict( + dict={ + 'atom': { + 'element': 'Pt', + 'lmax': 8 + }, + 'atom2': { + 'element': 'Fe', + 'lmax': 8, + }, + 'comp': { + 'kmax': 3.8, + }, + 'kpt': { + 'div1': 20, + 'div2': 24, + 'div3': 1 + } + }) + +wf_para_scf = {'fleur_runmax': 2, 'itmax_per_run': 120, 'density_converged': 0.2, 'serial': False, 'mode': 'density'} wf_para_scf = Dict(dict=wf_para_scf) -options_scf = Dict(dict={'resources': {"num_machines": 2, "num_mpiprocs_per_machine": 24}, - 'queue_name': 'devel', - 'custom_scheduler_commands': '', - 'max_wallclock_seconds': 60*60}) +options_scf = Dict( + dict={ + 'resources': { + 'num_machines': 2, + 'num_mpiprocs_per_machine': 24 + }, + 'queue_name': 'devel', + 'custom_scheduler_commands': '', + 'max_wallclock_seconds': 60 * 60 + }) #### - fleur_code = is_code(args.fleur) fleur_inp = test_and_get_codenode(fleur_code, expected_code_type='fleur.fleur') inpgen_code = is_code(args.inpgen) inpgen_inp = test_and_get_codenode(inpgen_code, expected_code_type='fleur.inpgen') -inputs = {'scf': {'wf_parameters': wf_para_scf, - 'structure': structure, - 'calc_parameters': parameters, - 'options': options_scf, - 'inpgen': inpgen_inp, - 'fleur': fleur_inp - }, - 'wf_parameters': wf_para, - 'fleur': fleur_inp, - 'options': options - } - +inputs = { + 'scf': { + 'wf_parameters': wf_para_scf, + 'structure': structure, + 'calc_parameters': parameters, + 'options': options_scf, + 'inpgen': inpgen_inp, + 'fleur': fleur_inp + }, + 'wf_parameters': wf_para, + 'fleur': fleur_inp, + 'options': options +} submit_wc = False if args.submit is not None: submit_wc = submit pprint(inputs) -print("##################### TEST fleur_spst_wc #####################") +print('##################### TEST fleur_spst_wc #####################') if submit_wc: res = submit(FleurMaeWorkChain, **inputs) - print("##################### Submited fleur_spst_wc #####################") - print(("Runtime info: {}".format(res))) + print('##################### Submited fleur_spst_wc #####################') + print(('Runtime info: {}'.format(res))) print((res.pk)) - print("##################### Finished submiting fleur_spst_wc #####################") + print('##################### Finished submiting fleur_spst_wc #####################') else: - print("##################### Running fleur_spst_wc #####################") + print('##################### Running fleur_spst_wc #####################') res = run(FleurMaeWorkChain, **inputs) - print("##################### Finished running fleur_spst_wc #####################") + print('##################### Finished running fleur_spst_wc #####################') diff --git a/examples/submission/workflow_tests/test_submit_mae_conv.py b/examples/submission/workflow_tests/test_submit_mae_conv.py index e4cd03522..2294c654d 100644 --- a/examples/submission/workflow_tests/test_submit_mae_conv.py +++ b/examples/submission/workflow_tests/test_submit_mae_conv.py @@ -9,7 +9,6 @@ # For further information please visit http://www.flapw.de or # # http://aiida-fleur.readthedocs.io/en/develop/ # ############################################################################### - """ Here we run the FleurSSDispWorkChain """ @@ -35,112 +34,105 @@ parser = argparse.ArgumentParser(description=('Relax with FLEUR. workflow to optimize ' 'the structure. All arguments are pks, or uuids, ' 'codes can be names')) -parser.add_argument('--wf_para', type=int, dest='wf_parameters', - help='Some workflow parameters', required=False) -parser.add_argument('--structure', type=int, dest='structure', - help='The crystal structure node', required=False) -parser.add_argument('--calc_para', type=int, dest='calc_parameters', - help='Parameters for the FLEUR calculation', required=False) -parser.add_argument('--inpgen', type=int, dest='inpgen', - help='The inpgen code node to use', required=False) -parser.add_argument('--fleur', type=int, dest='fleur', - help='The FLEUR code node to use', required=True) -parser.add_argument('--submit', type=bool, dest='submit', - help='should the workflow be submited or run', required=False) -parser.add_argument('--options', type=int, dest='options', - help='options of the workflow', required=False) -parser.add_argument('--remote', type=int, dest='remote', - help='remote', required=False) -parser.add_argument('--fleurinp', type=int, dest='fleurinp', - help='fleurinp', required=False) +parser.add_argument('--wf_para', type=int, dest='wf_parameters', help='Some workflow parameters', required=False) +parser.add_argument('--structure', type=int, dest='structure', help='The crystal structure node', required=False) +parser.add_argument('--calc_para', + type=int, + dest='calc_parameters', + help='Parameters for the FLEUR calculation', + required=False) +parser.add_argument('--inpgen', type=int, dest='inpgen', help='The inpgen code node to use', required=False) +parser.add_argument('--fleur', type=int, dest='fleur', help='The FLEUR code node to use', required=True) +parser.add_argument('--submit', type=bool, dest='submit', help='should the workflow be submited or run', required=False) +parser.add_argument('--options', type=int, dest='options', help='options of the workflow', required=False) +parser.add_argument('--remote', type=int, dest='remote', help='remote', required=False) +parser.add_argument('--fleurinp', type=int, dest='fleurinp', help='fleurinp', required=False) args = parser.parse_args() print(args) ### Defaults ### -wf_para = Dict(dict={ - 'sqas': {'label': [0.0, 0.0], 'label2': [1.57079, 1.57079]}, - 'soc_off': ['124'] -}) +wf_para = Dict(dict={'sqas': {'label': [0.0, 0.0], 'label2': [1.57079, 1.57079]}, 'soc_off': ['124']}) bohr_a_0 = 0.52917721092 # A -a = 7.497*bohr_a_0 -cell = [[0.7071068*a, 0.0, 0.0], - [0.0, 1.0*a, 0.0], - [0.0, 0.0, 0.7071068*a]] +a = 7.497 * bohr_a_0 +cell = [[0.7071068 * a, 0.0, 0.0], [0.0, 1.0 * a, 0.0], [0.0, 0.0, 0.7071068 * a]] structure = StructureData(cell=cell) -structure.append_atom(position=(0.0, 0.0, -1.99285*bohr_a_0), symbols='Fe', name='Fe123') -structure.append_atom(position=(0.5*0.7071068*a, 0.5*a, 0.0), symbols='Pt') -structure.append_atom(position=(0., 0., 2.65059*bohr_a_0), symbols='Pt', name='Fe124') +structure.append_atom(position=(0.0, 0.0, -1.99285 * bohr_a_0), symbols='Fe', name='Fe123') +structure.append_atom(position=(0.5 * 0.7071068 * a, 0.5 * a, 0.0), symbols='Pt') +structure.append_atom(position=(0., 0., 2.65059 * bohr_a_0), symbols='Pt', name='Fe124') structure.pbc = (True, True, False) -parameters = Dict(dict={ - 'atom': { - 'element': 'Pt', - 'lmax': 8 - }, - 'atom2': { - 'element': 'Fe', - 'lmax': 8, - }, - 'comp': { - 'kmax': 3.8, - }, - 'kpt': { - 'div1': 20, - 'div2': 24, - 'div3': 1 - }}) - -wf_para_scf = {'fleur_runmax': 2, - 'itmax_per_run': 120, - 'density_converged': 0.2, - 'serial': False, - 'mode': 'density' - } +parameters = Dict( + dict={ + 'atom': { + 'element': 'Pt', + 'lmax': 8 + }, + 'atom2': { + 'element': 'Fe', + 'lmax': 8, + }, + 'comp': { + 'kmax': 3.8, + }, + 'kpt': { + 'div1': 20, + 'div2': 24, + 'div3': 1 + } + }) + +wf_para_scf = {'fleur_runmax': 2, 'itmax_per_run': 120, 'density_converged': 0.2, 'serial': False, 'mode': 'density'} wf_para_scf = Dict(dict=wf_para_scf) -options_scf = Dict(dict={'resources': {"num_machines": 2, "num_mpiprocs_per_machine": 24}, - 'queue_name': 'devel', - 'custom_scheduler_commands': '', - 'max_wallclock_seconds': 60*60}) +options_scf = Dict( + dict={ + 'resources': { + 'num_machines': 2, + 'num_mpiprocs_per_machine': 24 + }, + 'queue_name': 'devel', + 'custom_scheduler_commands': '', + 'max_wallclock_seconds': 60 * 60 + }) #### - fleur_code = is_code(args.fleur) fleur_inp = test_and_get_codenode(fleur_code, expected_code_type='fleur.fleur') inpgen_code = is_code(args.inpgen) inpgen_inp = test_and_get_codenode(inpgen_code, expected_code_type='fleur.inpgen') -inputs = {'scf': {'wf_parameters': wf_para_scf, - 'structure': structure, - 'calc_parameters': parameters, - 'options': options_scf, - 'inpgen': inpgen_inp, - 'fleur': fleur_inp - }, - 'wf_parameters': wf_para - } - +inputs = { + 'scf': { + 'wf_parameters': wf_para_scf, + 'structure': structure, + 'calc_parameters': parameters, + 'options': options_scf, + 'inpgen': inpgen_inp, + 'fleur': fleur_inp + }, + 'wf_parameters': wf_para +} submit_wc = False if args.submit is not None: submit_wc = submit pprint(inputs) -print("##################### TEST FleurMaeConvWorkChain #####################") +print('##################### TEST FleurMaeConvWorkChain #####################') if submit_wc: res = submit(FleurMaeConvWorkChain, **inputs) - print("##################### Submited FleurMaeConvWorkChain #####################") - print(("Runtime info: {}".format(res))) + print('##################### Submited FleurMaeConvWorkChain #####################') + print(('Runtime info: {}'.format(res))) print((res.pk)) - print("##################### Finished submiting FleurMaeConvWorkChain #####################") + print('##################### Finished submiting FleurMaeConvWorkChain #####################') else: - print("##################### Running FleurMaeConvWorkChain #####################") + print('##################### Running FleurMaeConvWorkChain #####################') res = run(FleurMaeConvWorkChain, **inputs) - print("##################### Finished running FleurMaeConvWorkChain #####################") + print('##################### Finished running FleurMaeConvWorkChain #####################') diff --git a/examples/submission/workflow_tests/test_submit_relax_restart.py b/examples/submission/workflow_tests/test_submit_relax_restart.py index a2c9b4abe..16d804403 100644 --- a/examples/submission/workflow_tests/test_submit_relax_restart.py +++ b/examples/submission/workflow_tests/test_submit_relax_restart.py @@ -9,7 +9,6 @@ # For further information please visit http://www.flapw.de or # # http://aiida-fleur.readthedocs.io/en/develop/ # ############################################################################### - """ Here we run the fleur_scf_wc for Si or some other material """ @@ -34,97 +33,99 @@ parser = argparse.ArgumentParser(description=('Relax with FLEUR. workflow to optimize ' 'the structure. All arguments are pks, or uuids, ' 'codes can be names')) -parser.add_argument('--wf_para', type=int, dest='wf_parameters', - help='Some workflow parameters', required=False) -parser.add_argument('--structure', type=int, dest='structure', - help='The crystal structure node', required=False) -parser.add_argument('--calc_para', type=int, dest='calc_parameters', - help='Parameters for the FLEUR calculation', required=False) -parser.add_argument('--inpgen', type=int, dest='inpgen', - help='The inpgen code node to use', required=False) -parser.add_argument('--fleur', type=int, dest='fleur', - help='The FLEUR code node to use', required=True) -parser.add_argument('--submit', type=bool, dest='submit', - help='should the workflow be submited or run', required=False) -parser.add_argument('--options', type=int, dest='options', - help='options of the workflow', required=False) +parser.add_argument('--wf_para', type=int, dest='wf_parameters', help='Some workflow parameters', required=False) +parser.add_argument('--structure', type=int, dest='structure', help='The crystal structure node', required=False) +parser.add_argument('--calc_para', + type=int, + dest='calc_parameters', + help='Parameters for the FLEUR calculation', + required=False) +parser.add_argument('--inpgen', type=int, dest='inpgen', help='The inpgen code node to use', required=False) +parser.add_argument('--fleur', type=int, dest='fleur', help='The FLEUR code node to use', required=True) +parser.add_argument('--submit', type=bool, dest='submit', help='should the workflow be submited or run', required=False) +parser.add_argument('--options', type=int, dest='options', help='options of the workflow', required=False) args = parser.parse_args() print(args) ### Defaults ### -wf_para = Dict(dict={ - 'relax_iter': 2, - 'film_distance_relaxation': False, - 'force_criterion': 0.005 -}) +wf_para = Dict(dict={'relax_iter': 2, 'film_distance_relaxation': False, 'force_criterion': 0.02}) bohr_a_0 = 0.52917721092 # A -a = 7.497*bohr_a_0 -cell = [[0.7071068*a, 0.0, 0.0], - [0.0, 1.0*a, 0.0], - [0.0, 0.0, 0.7071068*a]] +a = 7.497 * bohr_a_0 +cell = [[0.7071068 * a, 0.0, 0.0], [0.0, 1.0 * a, 0.0], [0.0, 0.0, 0.7071068 * a]] structure = StructureData(cell=cell) -structure.append_atom(position=(0.0, 0.0, -1.99285*bohr_a_0), symbols='Fe', name='Fe123') -structure.append_atom(position=(0.5*0.7071068*a, 0.5*a, 0.0), symbols='Pt') -structure.append_atom(position=(0., 0., 2.65059*bohr_a_0), symbols='Pt') +structure.append_atom(position=(0.0, 0.0, -1.99285 * bohr_a_0), symbols='Fe', name='Fe123') +structure.append_atom(position=(0.5 * 0.7071068 * a, 0.5 * a, 0.0), symbols='Pt') +structure.append_atom(position=(0., 0., 2.65059 * bohr_a_0), symbols='Pt') structure.pbc = (True, True, False) -parameters = Dict(dict={ - 'atom': { - 'element': 'Pt', - 'lmax': 8 - }, - 'atom2': { - 'element': 'Fe', - 'lmax': 8, - }, - 'comp': { - 'kmax': 3.8, +parameters = Dict( + dict={ + 'atom': { + 'element': 'Pt', + 'lmax': 8 + }, + 'atom2': { + 'element': 'Fe', + 'lmax': 8, + }, + 'comp': { + 'kmax': 3.8, + }, + 'kpt': { + 'div1': 20, + 'div2': 24, + 'div3': 1 + } + }) + +wf_para_scf = { + 'fleur_runmax': 2, + 'itmax_per_run': 120, + 'force_converged': 0.002, + 'force_dict': { + 'qfix': 2, + 'forcealpha': 0.75, + 'forcemix': 'straight' }, - 'kpt': { - 'div1': 20, - 'div2': 24, - 'div3': 1 - }}) - -wf_para_scf = {'fleur_runmax': 2, - 'itmax_per_run': 120, - 'force_converged': 0.02, - 'force_dict': {'qfix': 2, - 'forcealpha': 0.75, - 'forcemix': 'straight'}, - 'use_relax_xml': True, - 'serial': False, - 'mode': 'force', - } + 'use_relax_xml': True, + 'serial': False, + 'mode': 'force', +} wf_para_scf = Dict(dict=wf_para_scf) -options_scf = Dict(dict={'resources': {"num_machines": 2, "num_mpiprocs_per_machine": 24}, - 'queue_name': 'devel', - 'custom_scheduler_commands': '', - 'max_wallclock_seconds': 60*60}) +options_scf = Dict( + dict={ + 'resources': { + 'num_machines': 2, + 'num_mpiprocs_per_machine': 24 + }, + 'queue_name': 'devel', + 'custom_scheduler_commands': '', + 'max_wallclock_seconds': 60 * 60 + }) #### - fleur_code = is_code(args.fleur) fleur_inp = test_and_get_codenode(fleur_code, expected_code_type='fleur.fleur') inpgen_code = is_code(args.inpgen) inpgen_inp = test_and_get_codenode(inpgen_code, expected_code_type='fleur.inpgen') -inputs = {'scf': {'wf_parameters': wf_para_scf, - 'structure': structure, - 'calc_parameters': parameters, - 'options': options_scf, - 'inpgen': inpgen_inp, - 'fleur': fleur_inp - }, - 'wf_parameters': wf_para - } - +inputs = { + 'scf': { + 'wf_parameters': wf_para_scf, + 'structure': structure, + 'calc_parameters': parameters, + 'options': options_scf, + 'inpgen': inpgen_inp, + 'fleur': fleur_inp + }, + 'wf_parameters': wf_para +} submit_wc = False if args.submit is not None: @@ -136,16 +137,16 @@ submit_wc = submit pprint(inputs) -print("##################### TEST fleur_relax_wc #####################") +print('##################### TEST fleur_relax_wc #####################') if submit_wc: res = submit(FleurBaseRelaxWorkChain, **inputs) - print("##################### Submited fleur_relax_wc #####################") - print(("Runtime info: {}".format(res))) + print('##################### Submited fleur_relax_wc #####################') + print(('Runtime info: {}'.format(res))) print((res.pk)) - print("##################### Finished submiting fleur_relax_wc #####################") + print('##################### Finished submiting fleur_relax_wc #####################') else: - print("##################### Running fleur_relax_wc #####################") + print('##################### Running fleur_relax_wc #####################') res = run(FleurBaseRelaxWorkChain, **inputs) - print("##################### Finished running fleur_relax_wc #####################") + print('##################### Finished running fleur_relax_wc #####################') diff --git a/examples/submission/workflow_tests/test_submit_scf.py b/examples/submission/workflow_tests/test_submit_scf.py index c8ac405dd..597443afa 100644 --- a/examples/submission/workflow_tests/test_submit_scf.py +++ b/examples/submission/workflow_tests/test_submit_scf.py @@ -9,7 +9,6 @@ # For further information please visit http://www.flapw.de or # # http://aiida-fleur.readthedocs.io/en/develop/ # ############################################################################### - """ Here we run the FleurScfWorkChain for Si or some other material """ @@ -19,11 +18,13 @@ import argparse from pprint import pprint +from aiida import load_profile +load_profile() from aiida.plugins import DataFactory from aiida.orm import load_node from aiida.engine import submit, run - +from aiida.manage.caching import enable_caching from aiida_fleur.workflows.scf import FleurScfWorkChain from aiida_fleur.tools.common_fleur_wf import is_code, test_and_get_codenode @@ -34,82 +35,99 @@ parser = argparse.ArgumentParser(description=('SCF with FLEUR. workflow to converge the ' 'chargedensity, total energy or forces. all arguments' 'are pks, or uuids, codes can be names')) -parser.add_argument('--wf_para', type=int, dest='wf_parameters', - help='Some workflow parameters', required=False) -parser.add_argument('--structure', type=int, dest='structure', - help='The crystal structure node', required=False) -parser.add_argument('--calc_para', type=int, dest='calc_parameters', - help='Parameters for the FLEUR calculation', required=False) -parser.add_argument('--fleurinp', type=int, dest='fleurinp', - help='FleurinpData from which to run the FLEUR calculation', required=False) -parser.add_argument('--remote', type=int, dest='remote_data', +parser.add_argument('--wf_para', type=int, dest='wf_parameters', help='Some workflow parameters', required=False) +parser.add_argument('--structure', type=int, dest='structure', help='The crystal structure node', required=False) +parser.add_argument('--calc_para', + type=int, + dest='calc_parameters', + help='Parameters for the FLEUR calculation', + required=False) +parser.add_argument('--fleurinp', + type=int, + dest='fleurinp', + help='FleurinpData from which to run the FLEUR calculation', + required=False) +parser.add_argument('--remote', + type=int, + dest='remote_data', help=('Remote Data of older FLEUR calculation, ' - 'from which files will be copied (mixing_history ...)'), required=False) -parser.add_argument('--inpgen', type=int, dest='inpgen', - help='The inpgen code node to use', required=False) -parser.add_argument('--fleur', type=int, dest='fleur', - help='The FLEUR code node to use', required=True) -parser.add_argument('--submit', type=bool, dest='submit', - help='should the workflow be submited or run', required=False) -parser.add_argument('--options', type=int, dest='options', - help='options of the workflow', required=False) + 'from which files will be copied (mixing_history ...)'), + required=False) +parser.add_argument('--inpgen', type=int, dest='inpgen', help='The inpgen code node to use', required=False) +parser.add_argument('--fleur', type=int, dest='fleur', help='The FLEUR code node to use', required=True) +parser.add_argument('--submit', type=bool, dest='submit', help='should the workflow be submited or run', required=False) +parser.add_argument('--options', type=int, dest='options', help='options of the workflow', required=False) args = parser.parse_args() print(args) ### Defaults ### -wf_para = Dict(dict={'fleur_runmax': 2, - 'density_converged': 0.001, - 'energy_converged': 0.002, - 'mode': 'force', # 'force', 'energy' or 'density' - 'force_converged': 0.02, - 'itmax_per_run': 10, - 'use_relax_xml': False, - 'force_dict': {'qfix': 2, - 'forcealpha': 0.5, - 'forcemix': 'BFGS'}, - 'serial': False}) - -options = Dict(dict={'resources': {"num_machines": 1, "num_mpiprocs_per_machine": 24}, - 'queue_name': 'devel', - 'custom_scheduler_commands': '', - 'max_wallclock_seconds': 60*60}) - +wf_para = Dict( + dict={ + 'fleur_runmax': 2, + 'density_converged': 0.001, + 'energy_converged': 0.002, + 'mode': 'force', # 'force', 'energy' or 'density' + 'force_converged': 0.02, + 'itmax_per_run': 10, + 'use_relax_xml': False, + 'force_dict': { + 'qfix': 2, + 'forcealpha': 0.5, + 'forcemix': 'BFGS' + }, + 'serial': True + }) + +options = Dict( + dict={ + 'resources': { + 'num_machines': 1, + 'num_mpiprocs_per_machine': 24 + }, + 'queue_name': 'devel', + 'custom_scheduler_commands': '', + 'max_wallclock_seconds': 60 * 60 + }) bohr_a_0 = 0.52917721092 # A a = 7.497 * bohr_a_0 -cell = [[0.7071068*a, 0.0, 0.0], - [0.0, 1.0*a, 0.0], - [0.0, 0.0, 0.7071068*a]] +cell = [[0.7071068 * a, 0.0, 0.0], [0.0, 1.0 * a, 0.0], [0.0, 0.0, 0.7071068 * a]] structure = StructureData(cell=cell) -structure.append_atom(position=(0., 0., -1.99285*bohr_a_0), symbols='Fe') -structure.append_atom(position=(0.5*0.7071068*a, 0.5*a, 0.0), symbols='Pt') -structure.append_atom(position=(0., 0., 2.65059*bohr_a_0), symbols='Pt') +structure.append_atom(position=(0., 0., -1.99285 * bohr_a_0), symbols='Fe') +structure.append_atom(position=(0.5 * 0.7071068 * a, 0.5 * a, 0.0), symbols='Pt') +structure.append_atom(position=(0., 0., 2.65059 * bohr_a_0), symbols='Pt') structure.pbc = (True, True, False) -parameters = Dict(dict={ - 'atom': {'element': 'Pt', - # 'jri' : 833, - # 'rmt' : 2.3, - # 'dx' : 0.015, - 'lmax': 8, - # 'lo' : '5p', - # 'econfig': '[Kr] 5s2 4d10 4f14| 5p6 5d4 6s2', - }, - 'atom2': {'element': 'Fe', - # 'jri' : 833, - # 'rmt' : 2.3, - # 'dx' : 0.015, - 'lmax': 8, - # 'lo' : '5p', - # 'econfig': '[Kr] 5s2 4d10 4f14| 5p6 5d4 6s2', - }, - 'comp': {'kmax': 3.8, - }, - 'kpt': {'div1': 12, +parameters = Dict( + dict={ + 'atom': { + 'element': 'Pt', + # 'jri' : 833, + # 'rmt' : 2.3, + # 'dx' : 0.015, + 'lmax': 8, + # 'lo' : '5p', + # 'econfig': '[Kr] 5s2 4d10 4f14| 5p6 5d4 6s2', + }, + 'atom2': { + 'element': 'Fe', + # 'jri' : 833, + # 'rmt' : 2.3, + # 'dx' : 0.015, + 'lmax': 8, + # 'lo' : '5p', + # 'econfig': '[Kr] 5s2 4d10 4f14| 5p6 5d4 6s2', + }, + 'comp': { + 'kmax': 3.8, + }, + 'kpt': { + 'div1': 12, 'div2': 10, 'div3': 1 - }}) + } + }) ''' # Fe fcc structure @@ -137,11 +155,7 @@ 'div3' : 1 }}) ''' -default = {'structure': structure, - 'wf_parameters': wf_para, - 'options': options, - 'calc_parameters': parameters - } +default = {'structure': structure, 'wf_parameters': wf_para, 'options': options, 'calc_parameters': parameters} #### @@ -186,14 +200,15 @@ submit_wc = submit pprint(inputs) -print("##################### TEST FleurScfWorkChain #####################") +print('##################### TEST FleurScfWorkChain #####################') if submit_wc: res = submit(FleurScfWorkChain, **inputs) - print("##################### Submited FleurScfWorkChain #####################") - print(("Runtime info: {}".format(res))) - print("##################### Finished submiting FleurScfWorkChain #####################") + print('##################### Submited FleurScfWorkChain #####################') + print(('Runtime info: {}'.format(res))) + print('##################### Finished submiting FleurScfWorkChain #####################') else: - print("##################### Running FleurScfWorkChain #####################") - res = run(FleurScfWorkChain, **inputs) - print("##################### Finished running FleurScfWorkChain #####################") + print('##################### Running FleurScfWorkChain #####################') + with enable_caching(): + res = run(FleurScfWorkChain, **inputs) + print('##################### Finished running FleurScfWorkChain #####################') diff --git a/examples/submission/workflow_tests/test_submit_ssdisp.py b/examples/submission/workflow_tests/test_submit_ssdisp.py index b611ffefc..5e321fbc7 100644 --- a/examples/submission/workflow_tests/test_submit_ssdisp.py +++ b/examples/submission/workflow_tests/test_submit_ssdisp.py @@ -9,7 +9,6 @@ # For further information please visit http://www.flapw.de or # # http://aiida-fleur.readthedocs.io/en/develop/ # ############################################################################### - """ Here we run the FleurSSDispWorkChain """ @@ -35,127 +34,128 @@ parser = argparse.ArgumentParser(description=('Relax with FLEUR. workflow to optimize ' 'the structure. All arguments are pks, or uuids, ' 'codes can be names')) -parser.add_argument('--wf_para', type=int, dest='wf_parameters', - help='Some workflow parameters', required=False) -parser.add_argument('--structure', type=int, dest='structure', - help='The crystal structure node', required=False) -parser.add_argument('--calc_para', type=int, dest='calc_parameters', - help='Parameters for the FLEUR calculation', required=False) -parser.add_argument('--inpgen', type=int, dest='inpgen', - help='The inpgen code node to use', required=True) -parser.add_argument('--fleur', type=int, dest='fleur', - help='The FLEUR code node to use', required=True) -parser.add_argument('--submit', type=bool, dest='submit', - help='should the workflow be submited or run', required=False) -parser.add_argument('--options', type=int, dest='options', - help='options of the workflow', required=False) -parser.add_argument('--remote', type=int, dest='remote', - help='remote', required=False) -parser.add_argument('--fleurinp', type=int, dest='fleurinp', - help='fleurinp', required=False) +parser.add_argument('--wf_para', type=int, dest='wf_parameters', help='Some workflow parameters', required=False) +parser.add_argument('--structure', type=int, dest='structure', help='The crystal structure node', required=False) +parser.add_argument('--calc_para', + type=int, + dest='calc_parameters', + help='Parameters for the FLEUR calculation', + required=False) +parser.add_argument('--inpgen', type=int, dest='inpgen', help='The inpgen code node to use', required=True) +parser.add_argument('--fleur', type=int, dest='fleur', help='The FLEUR code node to use', required=True) +parser.add_argument('--submit', type=bool, dest='submit', help='should the workflow be submited or run', required=False) +parser.add_argument('--options', type=int, dest='options', help='options of the workflow', required=False) +parser.add_argument('--remote', type=int, dest='remote', help='remote', required=False) +parser.add_argument('--fleurinp', type=int, dest='fleurinp', help='fleurinp', required=False) args = parser.parse_args() print(args) ### Defaults ### -wf_para = Dict(dict={ - 'beta': {'all': 1.57079}, - 'prop_dir': [0.125, 0.125, 0.0], - 'q_vectors': [[0.0, 0.0, 0.0], - [0.125, 0.125, 0.0], - [0.250, 0.250, 0.0], - [0.375, 0.375, 0.0], - [0.500, 0.500, 0.0]], - 'ref_qss': [0.0, 0.0, 0.0], - 'inpxml_changes': [] -}) - -options = Dict(dict={'resources': {"num_machines": 1, "num_mpiprocs_per_machine": 24}, - 'queue_name': 'devel', - 'custom_scheduler_commands': '', - 'max_wallclock_seconds': 60*60}) +wf_para = Dict( + dict={ + 'beta': { + 'all': 1.57079 + }, + 'prop_dir': [0.125, 0.125, 0.0], + 'q_vectors': [[0.0, 0.0, 0.0], [0.125, 0.125, 0.0], [0.250, 0.250, 0.0], [0.375, 0.375, 0.0], + [0.500, 0.500, 0.0]], + 'ref_qss': [0.0, 0.0, 0.0], + 'inpxml_changes': [] + }) + +options = Dict( + dict={ + 'resources': { + 'num_machines': 1, + 'num_mpiprocs_per_machine': 24 + }, + 'queue_name': 'devel', + 'custom_scheduler_commands': '', + 'max_wallclock_seconds': 60 * 60 + }) bohr_a_0 = 0.52917721092 # A -a = 7.497*bohr_a_0 -cell = [[0.7071068*a, 0.0, 0.0], - [0.0, 1.0*a, 0.0], - [0.0, 0.0, 0.7071068*a]] +a = 7.497 * bohr_a_0 +cell = [[0.7071068 * a, 0.0, 0.0], [0.0, 1.0 * a, 0.0], [0.0, 0.0, 0.7071068 * a]] structure = StructureData(cell=cell) -structure.append_atom(position=(0.0, 0.0, -1.99285*bohr_a_0), symbols='Fe', name='Fe123') -structure.append_atom(position=(0.5*0.7071068*a, 0.5*a, 0.0), symbols='Pt') -structure.append_atom(position=(0., 0., 2.65059*bohr_a_0), symbols='Pt') +structure.append_atom(position=(0.0, 0.0, -1.99285 * bohr_a_0), symbols='Fe', name='Fe123') +structure.append_atom(position=(0.5 * 0.7071068 * a, 0.5 * a, 0.0), symbols='Pt') +structure.append_atom(position=(0., 0., 2.65059 * bohr_a_0), symbols='Pt') structure.pbc = (True, True, False) -parameters = Dict(dict={ - 'atom': { - 'element': 'Pt', - 'lmax': 8 - }, - 'atom2': { - 'element': 'Fe', - 'lmax': 8, - }, - 'comp': { - 'kmax': 3.8, - }, - 'kpt': { - 'div1': 20, - 'div2': 24, - 'div3': 1 - }}) - -wf_para_scf = {'fleur_runmax': 2, - 'itmax_per_run': 120, - 'density_converged': 0.2, - 'serial': False, - 'mode': 'density' - } +parameters = Dict( + dict={ + 'atom': { + 'element': 'Pt', + 'lmax': 8 + }, + 'atom2': { + 'element': 'Fe', + 'lmax': 8, + }, + 'comp': { + 'kmax': 3.8, + }, + 'kpt': { + 'div1': 20, + 'div2': 24, + 'div3': 1 + } + }) + +wf_para_scf = {'fleur_runmax': 2, 'itmax_per_run': 120, 'density_converged': 0.2, 'serial': False, 'mode': 'density'} wf_para_scf = Dict(dict=wf_para_scf) -options_scf = Dict(dict={'resources': {"num_machines": 2, "num_mpiprocs_per_machine": 24}, - 'queue_name': 'devel', - 'custom_scheduler_commands': '', - 'max_wallclock_seconds': 60*60}) +options_scf = Dict( + dict={ + 'resources': { + 'num_machines': 2, + 'num_mpiprocs_per_machine': 24 + }, + 'queue_name': 'devel', + 'custom_scheduler_commands': '', + 'max_wallclock_seconds': 60 * 60 + }) #### - fleur_code = is_code(args.fleur) fleur_inp = test_and_get_codenode(fleur_code, expected_code_type='fleur.fleur') inpgen_code = is_code(args.inpgen) inpgen_inp = test_and_get_codenode(inpgen_code, expected_code_type='fleur.inpgen') -inputs = {'scf': { - 'wf_parameters': wf_para_scf, - 'structure': structure, - 'calc_parameters': parameters, - 'options': options_scf, - 'inpgen': inpgen_inp, - 'fleur': fleur_inp -}, +inputs = { + 'scf': { + 'wf_parameters': wf_para_scf, + 'structure': structure, + 'calc_parameters': parameters, + 'options': options_scf, + 'inpgen': inpgen_inp, + 'fleur': fleur_inp + }, 'wf_parameters': wf_para, 'fleur': fleur_inp, 'options': options } - submit_wc = False if args.submit is not None: submit_wc = submit pprint(inputs) -print("##################### TEST fleur_spst_wc #####################") +print('##################### TEST fleur_spst_wc #####################') if submit_wc: res = submit(FleurSSDispWorkChain, **inputs) - print("##################### Submited fleur_spst_wc #####################") - print(("Runtime info: {}".format(res))) + print('##################### Submited fleur_spst_wc #####################') + print(('Runtime info: {}'.format(res))) print((res.pk)) - print("##################### Finished submiting fleur_spst_wc #####################") + print('##################### Finished submiting fleur_spst_wc #####################') else: - print("##################### Running fleur_spst_wc #####################") + print('##################### Running fleur_spst_wc #####################') res = run(FleurSSDispWorkChain, **inputs) - print("##################### Finished running fleur_spst_wc #####################") + print('##################### Finished running fleur_spst_wc #####################') diff --git a/examples/submission/workflow_tests/test_submit_ssdisp_conv.py b/examples/submission/workflow_tests/test_submit_ssdisp_conv.py index 4cffd2ce6..6d4c73a6a 100644 --- a/examples/submission/workflow_tests/test_submit_ssdisp_conv.py +++ b/examples/submission/workflow_tests/test_submit_ssdisp_conv.py @@ -9,7 +9,6 @@ # For further information please visit http://www.flapw.de or # # http://aiida-fleur.readthedocs.io/en/develop/ # ############################################################################### - """ Here we run the FleurSSDispWorkChain """ @@ -35,98 +34,89 @@ parser = argparse.ArgumentParser(description=('Relax with FLEUR. workflow to optimize ' 'the structure. All arguments are pks, or uuids, ' 'codes can be names')) -parser.add_argument('--wf_para', type=int, dest='wf_parameters', - help='Some workflow parameters', required=False) -parser.add_argument('--structure', type=int, dest='structure', - help='The crystal structure node', required=False) -parser.add_argument('--calc_para', type=int, dest='calc_parameters', - help='Parameters for the FLEUR calculation', required=False) -parser.add_argument('--inpgen', type=int, dest='inpgen', - help='The inpgen code node to use', required=False) -parser.add_argument('--fleur', type=int, dest='fleur', - help='The FLEUR code node to use', required=True) -parser.add_argument('--submit', type=bool, dest='submit', - help='should the workflow be submited or run', required=False) -parser.add_argument('--options', type=int, dest='options', - help='options of the workflow', required=False) -parser.add_argument('--remote', type=int, dest='remote', - help='remote', required=False) -parser.add_argument('--fleurinp', type=int, dest='fleurinp', - help='fleurinp', required=False) +parser.add_argument('--wf_para', type=int, dest='wf_parameters', help='Some workflow parameters', required=False) +parser.add_argument('--structure', type=int, dest='structure', help='The crystal structure node', required=False) +parser.add_argument('--calc_para', + type=int, + dest='calc_parameters', + help='Parameters for the FLEUR calculation', + required=False) +parser.add_argument('--inpgen', type=int, dest='inpgen', help='The inpgen code node to use', required=False) +parser.add_argument('--fleur', type=int, dest='fleur', help='The FLEUR code node to use', required=True) +parser.add_argument('--submit', type=bool, dest='submit', help='should the workflow be submited or run', required=False) +parser.add_argument('--options', type=int, dest='options', help='options of the workflow', required=False) +parser.add_argument('--remote', type=int, dest='remote', help='remote', required=False) +parser.add_argument('--fleurinp', type=int, dest='fleurinp', help='fleurinp', required=False) args = parser.parse_args() print(args) ### Defaults ### -wf_para = Dict(dict={ - 'beta': {'all': 1.57079}, - 'q_vectors': {'label': [0.0, 0.0, 0.0], - 'label2': [0.125, 0.0, 0.0] - } -}) +wf_para = Dict(dict={'beta': {'all': 1.57079}, 'q_vectors': {'label': [0.0, 0.0, 0.0], 'label2': [0.125, 0.0, 0.0]}}) bohr_a_0 = 0.52917721092 # A -a = 7.497*bohr_a_0 -cell = [[0.7071068*a, 0.0, 0.0], - [0.0, 1.0*a, 0.0], - [0.0, 0.0, 0.7071068*a]] +a = 7.497 * bohr_a_0 +cell = [[0.7071068 * a, 0.0, 0.0], [0.0, 1.0 * a, 0.0], [0.0, 0.0, 0.7071068 * a]] structure = StructureData(cell=cell) -structure.append_atom(position=(0.0, 0.0, -1.99285*bohr_a_0), symbols='Fe', name='Fe123') -structure.append_atom(position=(0.5*0.7071068*a, 0.5*a, 0.0), symbols='Pt') -structure.append_atom(position=(0., 0., 2.65059*bohr_a_0), symbols='Pt') +structure.append_atom(position=(0.0, 0.0, -1.99285 * bohr_a_0), symbols='Fe', name='Fe123') +structure.append_atom(position=(0.5 * 0.7071068 * a, 0.5 * a, 0.0), symbols='Pt') +structure.append_atom(position=(0., 0., 2.65059 * bohr_a_0), symbols='Pt') structure.pbc = (True, True, False) -parameters = Dict(dict={ - 'atom': { - 'element': 'Pt', - 'lmax': 8 - }, - 'atom2': { - 'element': 'Fe', - 'lmax': 8, - }, - 'comp': { - 'kmax': 3.8, - }, - 'kpt': { - 'div1': 20, - 'div2': 24, - 'div3': 1 - }}) - -wf_para_scf = {'fleur_runmax': 2, - 'itmax_per_run': 120, - 'density_converged': 0.2, - 'serial': False, - 'mode': 'density' - } +parameters = Dict( + dict={ + 'atom': { + 'element': 'Pt', + 'lmax': 8 + }, + 'atom2': { + 'element': 'Fe', + 'lmax': 8, + }, + 'comp': { + 'kmax': 3.8, + }, + 'kpt': { + 'div1': 20, + 'div2': 24, + 'div3': 1 + } + }) + +wf_para_scf = {'fleur_runmax': 2, 'itmax_per_run': 120, 'density_converged': 0.2, 'serial': False, 'mode': 'density'} wf_para_scf = Dict(dict=wf_para_scf) -options_scf = Dict(dict={'resources': {"num_machines": 2, "num_mpiprocs_per_machine": 24}, - 'queue_name': 'devel', - 'custom_scheduler_commands': '', - 'max_wallclock_seconds': 60*60}) +options_scf = Dict( + dict={ + 'resources': { + 'num_machines': 2, + 'num_mpiprocs_per_machine': 24 + }, + 'queue_name': 'devel', + 'custom_scheduler_commands': '', + 'max_wallclock_seconds': 60 * 60 + }) #### - fleur_code = is_code(args.fleur) fleur_inp = test_and_get_codenode(fleur_code, expected_code_type='fleur.fleur') inpgen_code = is_code(args.inpgen) inpgen_inp = test_and_get_codenode(inpgen_code, expected_code_type='fleur.inpgen') -inputs = {'scf': {'wf_parameters': wf_para_scf, - 'structure': structure, - 'calc_parameters': parameters, - 'options': options_scf, - 'inpgen': inpgen_inp, - 'fleur': fleur_inp - }, - 'wf_parameters': wf_para - } - +inputs = { + 'scf': { + 'wf_parameters': wf_para_scf, + 'structure': structure, + 'calc_parameters': parameters, + 'options': options_scf, + 'inpgen': inpgen_inp, + 'fleur': fleur_inp + }, + 'wf_parameters': wf_para +} submit_wc = False if args.submit is not None: @@ -138,16 +128,16 @@ submit_wc = submit pprint(inputs) -print("##################### TEST FleurSSDispConvWorkChain #####################") +print('##################### TEST FleurSSDispConvWorkChain #####################') if submit_wc: res = submit(FleurSSDispConvWorkChain, **inputs) - print("##################### Submited FleurSSDispConvWorkChain #####################") - print(("Runtime info: {}".format(res))) + print('##################### Submited FleurSSDispConvWorkChain #####################') + print(('Runtime info: {}'.format(res))) print((res.pk)) - print("##################### Finished submiting FleurSSDispConvWorkChain #####################") + print('##################### Finished submiting FleurSSDispConvWorkChain #####################') else: - print("##################### Running FleurSSDispConvWorkChain #####################") + print('##################### Running FleurSSDispConvWorkChain #####################') res = run(FleurSSDispConvWorkChain, **inputs) - print("##################### Finished running FleurSSDispConvWorkChain #####################") + print('##################### Finished running FleurSSDispConvWorkChain #####################') diff --git a/examples/tutorial/workflows/tutorial_submit_dos.py b/examples/tutorial/workflows/tutorial_submit_dos.py index 42829e416..d4b4010ea 100644 --- a/examples/tutorial/workflows/tutorial_submit_dos.py +++ b/examples/tutorial/workflows/tutorial_submit_dos.py @@ -9,7 +9,6 @@ # For further information please visit http://www.flapw.de or # # http://aiida-fleur.readthedocs.io/en/develop/ # ############################################################################### - """ Here we run the fleur_dos_wc for a Fleur calculation which has been converged before Layout: @@ -35,21 +34,17 @@ ParameterData = DataFactory('parameter') StructureData = DataFactory('structure') -####################### +####################### # 2. Creation/loding of input nodes # Load the codes, thwy have to be setup in your database. fleur_label = 'fleur@localhost' -fleur_code = Code.get_from_string(fleur_label) +fleur_code = Code.get_from_string(fleur_label) ### Create wf_parameters (optional) and options -wf_para = Dict(dict={'fleur_runmax' : 4, - 'density_criterion' : 0.000001, - 'serial' : False}) +wf_para = Dict(dict={'fleur_runmax': 4, 'density_criterion': 0.000001, 'serial': False}) -options = Dict(dict={'resources' : {"num_machines": 1}, - 'queue_name' : '', - 'max_wallclock_seconds': 60*60}) +options = Dict(dict={'resources': {'num_machines': 1}, 'queue_name': '', 'max_wallclock_seconds': 60 * 60}) # load a fleurino data object from a scf_wc before ################################ @@ -64,9 +59,9 @@ inputs['options'] = options # submit workchain to the daemon -# Noice that the nodes we created before are not yet stored in the database, -# but AiiDA will do so automaticly when we launch the workchain. -# To reuse nodes it might be a good idea, to save them before by hand and then load them +# Noice that the nodes we created before are not yet stored in the database, +# but AiiDA will do so automaticly when we launch the workchain. +# To reuse nodes it might be a good idea, to save them before by hand and then load them res = submit(fleur_dos_wc, **inputs) # You can also run the workflow in the python interpreter as blocking diff --git a/examples/tutorial/workflows/tutorial_submit_eos.py b/examples/tutorial/workflows/tutorial_submit_eos.py index 287b27f56..d6be2460f 100644 --- a/examples/tutorial/workflows/tutorial_submit_eos.py +++ b/examples/tutorial/workflows/tutorial_submit_eos.py @@ -9,7 +9,6 @@ # For further information please visit http://www.flapw.de or # # http://aiida-fleur.readthedocs.io/en/develop/ # ############################################################################### - """ Here we run the fleur_eos_wc for @ or some other material @@ -37,50 +36,46 @@ ParameterData = DataFactory('parameter') StructureData = DataFactory('structure') - ####################### # 2. Creation/loding of input nodes # Load the codes, thwy have to be setup in your database. fleur_label = 'fleur@localhost' inpgen_label = 'inpgen@localhost' -fleur_code = Code.get_from_string(fleur_label) +fleur_code = Code.get_from_string(fleur_label) inpgen_code = Code.get_from_string(inpgen_label) ### Create wf_parameters (optional) and options -wf_para = Dict(dict={'fleur_runmax' : 4, - 'points' : 4, - 'guess' : 1.0}) +wf_para = Dict(dict={'fleur_runmax': 4, 'points': 4, 'guess': 1.0}) -options = Dict(dict={'resources' : {"num_machines": 1}, - 'queue_name' : '', - 'max_wallclock_seconds': 60*60}) +options = Dict(dict={'resources': {'num_machines': 1}, 'queue_name': '', 'max_wallclock_seconds': 60 * 60}) # Create W bcc crystal structure -bohr_a_0= 0.52917721092 # A -a = 3.013812049196*bohr_a_0 -cell = [[-a,a,a],[a,-a,a],[a,a,-a]] +bohr_a_0 = 0.52917721092 # A +a = 3.013812049196 * bohr_a_0 +cell = [[-a, a, a], [a, -a, a], [a, a, -a]] structure = StructureData(cell=cell) -structure.append_atom(position=(0.,0.,0.), symbols='W') +structure.append_atom(position=(0., 0., 0.), symbols='W') # (optional) We specifi some FLAPW parameters for W -parameters = Dict(dict={ - 'atom':{ - 'element' : 'W', - 'jri' : 833, - 'rmt' : 2.3, - 'dx' : 0.015, - 'lmax' : 8, - 'lo' : '5p', - 'econfig': '[Kr] 5s2 4d10 4f14| 5p6 5d4 6s2', - }, - 'comp': { - 'kmax': 3.0, - }, - 'kpt': { - 'nkpt': 100, - }}) - +parameters = Dict( + dict={ + 'atom': { + 'element': 'W', + 'jri': 833, + 'rmt': 2.3, + 'dx': 0.015, + 'lmax': 8, + 'lo': '5p', + 'econfig': '[Kr] 5s2 4d10 4f14| 5p6 5d4 6s2', + }, + 'comp': { + 'kmax': 3.0, + }, + 'kpt': { + 'nkpt': 100, + } + }) ################################ # 3. submit the workchain with its inputs. diff --git a/examples/tutorial/workflows/tutorial_submit_scf.py b/examples/tutorial/workflows/tutorial_submit_scf.py index 32589c098..eed7ac500 100644 --- a/examples/tutorial/workflows/tutorial_submit_scf.py +++ b/examples/tutorial/workflows/tutorial_submit_scf.py @@ -9,7 +9,6 @@ # For further information please visit http://www.flapw.de or # # http://aiida-fleur.readthedocs.io/en/develop/ # ############################################################################### - """ Here we run the fleur_scf_wc for W or some other material Layout: @@ -35,49 +34,46 @@ ParameterData = DataFactory('parameter') StructureData = DataFactory('structure') -####################### +####################### # 2. Creation/loding of input nodes # Load the codes, thwy have to be setup in your database. fleur_label = 'fleur@localhost' inpgen_label = 'inpgen@localhost' -fleur_code = Code.get_from_string(fleur_label) +fleur_code = Code.get_from_string(fleur_label) inpgen_code = Code.get_from_string(inpgen_label) ### Create wf_parameters (optional) and options -wf_para = Dict(dict={'fleur_runmax' : 4, - 'density_criterion' : 0.000001, - 'serial' : False}) +wf_para = Dict(dict={'fleur_runmax': 4, 'density_criterion': 0.000001, 'serial': False}) -options = Dict(dict={'resources' : {"num_machines": 1}, - 'queue_name' : '', - 'max_wallclock_seconds': 60*60}) +options = Dict(dict={'resources': {'num_machines': 1}, 'queue_name': '', 'max_wallclock_seconds': 60 * 60}) -# Create W bcc crystal structure -bohr_a_0= 0.52917721092 # A -a = 3.013812049196*bohr_a_0 -cell = [[-a,a,a],[a,-a,a],[a,a,-a]] +# Create W bcc crystal structure +bohr_a_0 = 0.52917721092 # A +a = 3.013812049196 * bohr_a_0 +cell = [[-a, a, a], [a, -a, a], [a, a, -a]] structure = StructureData(cell=cell) -structure.append_atom(position=(0.,0.,0.), symbols='W') +structure.append_atom(position=(0., 0., 0.), symbols='W') # (optional) We specifi some FLAPW parameters for W -parameters = Dict(dict={ - 'atom':{ - 'element' : 'W', - 'jri' : 833, - 'rmt' : 2.3, - 'dx' : 0.015, - 'lmax' : 8, - 'lo' : '5p', - 'econfig': '[Kr] 5s2 4d10 4f14| 5p6 5d4 6s2', - }, - 'comp': { - 'kmax': 3.0, - }, - 'kpt': { - 'nkpt': 100, - }}) - +parameters = Dict( + dict={ + 'atom': { + 'element': 'W', + 'jri': 833, + 'rmt': 2.3, + 'dx': 0.015, + 'lmax': 8, + 'lo': '5p', + 'econfig': '[Kr] 5s2 4d10 4f14| 5p6 5d4 6s2', + }, + 'comp': { + 'kmax': 3.0, + }, + 'kpt': { + 'nkpt': 100, + } + }) ################################ # 3. submit the workchain with its inputs. @@ -93,9 +89,9 @@ inputs['options'] = options # submit workchain to the daemon -# Noice that the nodes we created before are not yet stored in the database, -# but AiiDA will do so automaticly when we launch the workchain. -# To reuse nodes it might be a good idea, to save them before by hand and then load them +# Noice that the nodes we created before are not yet stored in the database, +# but AiiDA will do so automaticly when we launch the workchain. +# To reuse nodes it might be a good idea, to save them before by hand and then load them res = submit(FleurScfWorkChain, **inputs) # You can also run the workflow in the python interpreter as blocking diff --git a/setup.json b/setup.json index c81c3d014..159ab2d4c 100644 --- a/setup.json +++ b/setup.json @@ -1,5 +1,5 @@ { - "version": "1.1.0", + "version": "1.1.1", "name": "aiida-fleur", "url": "https://github.com/JuDFTteam/aiida-fleur", "license": "MIT License, see LICENSE.txt file.", @@ -27,22 +27,21 @@ ], "reentry_register": true, "install_requires": [ - "aiida-core>=1.0.1,<2.0.0", + "aiida-core>=1.4.0,<2.0.0", "lxml >= 3.6.4", "pytest-cov >= 2.5.0", - "pytest >= 2.9", - "pgtest", - "numpy>=1.16.4", + "numpy>=1.16.4,<1.18.0", "sympy", - "masci-tools", + "masci-tools==0.3.12-dev4", "future", "ase", - "pymatgen" + "pymatgen", + "pyhull" ], "extras_require": { "graphs ": [ "matplotlib", - "masci-tools" + "masci-tools==0.3.12-dev4" ], "docs": [ "Sphinx", @@ -50,10 +49,16 @@ "sphinx_rtd_theme" ], "pre-commit": [ - "pre-commit==1.11.0", - "yapf==0.24.0", - "prospector==0.12.11", - "pylint==1.9.3" + "pre-commit>=2.6.0", + "yapf==0.30.0", + "pylint==2.5.2" + ], + "testing" : [ + "pytest >= 2.9", + "pytest-timeout", + "pytest-cov >= 2.5.0", + "pgtest", + "aiida-testing @ git+https://github.com/aiidateam/aiida-testing@export_cache" ] }, "entry_points": { @@ -72,7 +77,8 @@ "aiida.workflows": [ "fleur.scf = aiida_fleur.workflows.scf:FleurScfWorkChain", "fleur.dos = aiida_fleur.workflows.dos:fleur_dos_wc", - "fleur.band = aiida_fleur.workflows.band:fleur_band_wc", + "fleur.band = aiida_fleur.workflows.band:FleurBandWorkChain", + "fleur.banddos = aiida_fleur.workflows.banddos:FleurBandDosWorkChain", "fleur.eos = aiida_fleur.workflows.eos:FleurEosWorkChain", "fleur.init_cls = aiida_fleur.workflows.initial_cls:fleur_initial_cls_wc", "fleur.corehole = aiida_fleur.workflows.corehole:fleur_corehole_wc", @@ -87,4 +93,4 @@ "fleur.base = aiida_fleur.workflows.base_fleur:FleurBaseWorkChain" ] } -} \ No newline at end of file +} diff --git a/setup.py b/setup.py index 93d466a14..73ebd7f5a 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,5 @@ #!/usr/bin/env python +# -*- coding: utf-8 -*- from __future__ import absolute_import from setuptools import setup, find_packages @@ -9,7 +10,4 @@ # such that it can be discovered automatically with open('setup.json', 'r') as info: kwargs = json.load(info) - setup( - packages=find_packages(exclude='aiida'), - **kwargs - ) + setup(packages=find_packages(exclude='aiida'), **kwargs) diff --git a/utils/validate_version_consistency.py b/utils/validate_version_consistency.py new file mode 100644 index 000000000..74880fb9f --- /dev/null +++ b/utils/validate_version_consistency.py @@ -0,0 +1,26 @@ +# -*- coding: utf-8 -*- +""" +A simple script that checks the consistency between the version number specified in +setup.json, and the version in the __init__.py file. +""" + +import json +import os +import re +import sys + +SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) +ROOT_DIR = os.path.join(SCRIPT_DIR, os.path.pardir) + +# Get the __init__.py version number +with open(os.path.join(ROOT_DIR, 'aiida_fleur/__init__.py')) as f: + MATCH_EXPR = "__version__[^'\"]+(['\"])([^'\"]+)" + VERSION_INIT = re.search(MATCH_EXPR, f.read()).group(2).strip() # type: ignore + +# Get the setup.json version number +with open(os.path.join(ROOT_DIR, 'setup.json')) as f: + VERSION_JSON = json.load(f)['version'] + +if VERSION_INIT != VERSION_JSON: + print("Version numbers don't match: init:'{}', json:'{}' ".format(VERSION_INIT, VERSION_JSON)) + sys.exit(1)