Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Feature: XspectraCrystalWorkChain #888

Merged

Commits on May 9, 2022

  1. Upload of new CalcJob files

    Added CalcJob implementations of the xspectra.x executable and upf2plotcore.sh shell script from the Quantum ESPRESSO library
    PNOGillespie authored May 9, 2022
    Configuration menu
    Copy the full SHA
    11e9c65 View commit details
    Browse the repository at this point in the history
  2. Upload of Parser classes for new CalcJobs

    Added Parser classes for the xspectra.x executable and upf2plotcore.sh shell script from the Quantum ESPRESSO library
    PNOGillespie authored May 9, 2022
    Configuration menu
    Copy the full SHA
    0c6373a View commit details
    Browse the repository at this point in the history
  3. Added XSpectra entry points

    Added entry points for both CalcJob and Parser classes required for XSpectra post-processing calculations
    PNOGillespie authored May 9, 2022
    Configuration menu
    Copy the full SHA
    5d14f11 View commit details
    Browse the repository at this point in the history

Commits on May 19, 2022

  1. Configuration menu
    Copy the full SHA
    4c36b55 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0e62357 View commit details
    Browse the repository at this point in the history

Commits on May 30, 2022

  1. Configuration menu
    Copy the full SHA
    8b73bd9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    bd4274a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ee2e9ef View commit details
    Browse the repository at this point in the history

Commits on Jun 6, 2022

  1. Update src/aiida_quantumespresso/calculations/xspectra.py

    Change 'spectra_data' output to 'spectra'
    
    Co-authored-by: Sebastiaan Huber <mail@sphuber.net>
    PNOGillespie and sphuber authored Jun 6, 2022
    Configuration menu
    Copy the full SHA
    6c39561 View commit details
    Browse the repository at this point in the history
  2. Correct Capitalization

    Change the caplitalization for XSpectraCalculation to XspectraCalculation
    
    Co-authored-by: Sebastiaan Huber <mail@sphuber.net>
    PNOGillespie and sphuber authored Jun 6, 2022
    Configuration menu
    Copy the full SHA
    0c20f58 View commit details
    Browse the repository at this point in the history
  3. Correct Capitalization

    Correct the capitalization of XSpectraParser to XspectraParser
    
    Co-authored-by: Sebastiaan Huber <mail@sphuber.net>
    PNOGillespie and sphuber authored Jun 6, 2022
    Configuration menu
    Copy the full SHA
    fdbddaa View commit details
    Browse the repository at this point in the history
  4. Correct Capitalization

    Correct the capitalization of XSpectraCalculation to XspectraCalculation
    
    Co-authored-by: Sebastiaan Huber <mail@sphuber.net>
    PNOGillespie and sphuber authored Jun 6, 2022
    Configuration menu
    Copy the full SHA
    5f7844e View commit details
    Browse the repository at this point in the history
  5. Correct Capitalization

    Correct the capitalization of XSpectraParser to XspectraParser
    
    Co-authored-by: Sebastiaan Huber <mail@sphuber.net>
    PNOGillespie and sphuber authored Jun 6, 2022
    Configuration menu
    Copy the full SHA
    811066b View commit details
    Browse the repository at this point in the history

Commits on Jun 8, 2022

  1. Configuration menu
    Copy the full SHA
    a41de8c View commit details
    Browse the repository at this point in the history

Commits on Jun 9, 2022

  1. Configuration menu
    Copy the full SHA
    a7390e3 View commit details
    Browse the repository at this point in the history
  2. XspectraParser: Added parsing for spin-polarised calculations, remo…

    …ved redundant file loop, and added new error code
    PNOGillespie committed Jun 9, 2022
    Configuration menu
    Copy the full SHA
    3c83c4d View commit details
    Browse the repository at this point in the history

Commits on Jun 14, 2022

  1. XspectraCalculation: Fixed wording of error codes

    Fixed the terms used in the XSpectra-specific error
    codes in order to make them easier to read.
    PNOGillespie committed Jun 14, 2022
    Configuration menu
    Copy the full SHA
    f12cf09 View commit details
    Browse the repository at this point in the history

Commits on Jun 20, 2022

  1. XspectraCalculation: Updated _Plotcore_FILENAME

    Changed filename assigned to `_Plotcore_FILENAME`
    from `plotcore.out` to `stdout` in order to work
    properly with the `aiida-shell` plugin.
    PNOGillespie committed Jun 20, 2022
    Configuration menu
    Copy the full SHA
    d5530c6 View commit details
    Browse the repository at this point in the history
  2. XspectraParser: Fixed various errors in parse

    Made corrections to the parsing of various output
    parameters (e.g. energy levels and associated units)
    in both spin-polarised and unpolarised cases. An
    additional parameter `lsda` is also added to report
    explicitly the case of spin polarisation.
    PNOGillespie committed Jun 20, 2022
    Configuration menu
    Copy the full SHA
    75ba5d8 View commit details
    Browse the repository at this point in the history
  3. Added various tests for XspectraParser

    Adds tests of the `XspectraParser`, covering spin-polarised
    and non-spin-polarised cases, interrupted calculations, and
    XSpectra-specific error codes 313 and 314.
    PNOGillespie committed Jun 20, 2022
    Configuration menu
    Copy the full SHA
    5f4bd99 View commit details
    Browse the repository at this point in the history

Commits on Jul 13, 2022

  1. Configuration menu
    Copy the full SHA
    c6f4485 View commit details
    Browse the repository at this point in the history

Commits on Sep 2, 2022

  1. XspectraCalculation+XspectraParser: Added Various Extra Features

    Adds the following features to the `XspectraCalculation` and
    `XspectraParser` classes:
    - A save file ('xanes.sav') is now reserved by default and is printed
    at the end of each calculation run or after a designated time limit.
    The file can then be used for re-starting halted calculations or
    re-plotting spectra from previously-finished calculations.
    - The `XspectraCalculation` class now copies the save file from a
    parent calculation if the calculation type is itself an
    XspectraCalculation, thus re-starts and re-plot runs are handled
    automatically.
    - An error code has been added (315) for calculations which safely exit
    after reaching their time limit, thus enabiling a restart.
    - Additional information is now included in the `output_parameters`
    node (e.g. the polarisation vectors used and whether the calculation was
    set to "xonly_plot").
    PNOGillespie committed Sep 2, 2022
    Configuration menu
    Copy the full SHA
    875fa58 View commit details
    Browse the repository at this point in the history
  2. Tests: Update XspectraParser Tests for Latest Commit

    Updates `XspectraParser` tests to work with changes made in a previous
    commit (commit 875fa58) and adds a new
    test for error code 315 (job exceeded time limit)
    PNOGillespie committed Sep 2, 2022
    Configuration menu
    Copy the full SHA
    793b391 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ec841e4 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    8427a55 View commit details
    Browse the repository at this point in the history

Commits on Sep 12, 2022

  1. XspectraCalculation: Fix unnecessary bracketing

    Addresses aiidateam#837
    
    Co-authored-by: Sebastiaan Huber <mail@sphuber.net>
    PNOGillespie and sphuber authored Sep 12, 2022
    Configuration menu
    Copy the full SHA
    f0b00a5 View commit details
    Browse the repository at this point in the history
  2. XspectraCalculation: Minor change to gamma_file input check

    Addresses PR aiidateam#837
    
    Co-authored-by: Sebastiaan Huber <mail@sphuber.net>
    PNOGillespie and sphuber authored Sep 12, 2022
    Configuration menu
    Copy the full SHA
    63b32f6 View commit details
    Browse the repository at this point in the history
  3. XspectraCalculation: Change of walltime error code

    Addresses PR aiidateam#837
    
    Changes error code from 315 to 400 to match conventions
    
    Co-authored-by: Sebastiaan Huber <mail@sphuber.net>
    PNOGillespie and sphuber authored Sep 12, 2022
    Configuration menu
    Copy the full SHA
    746770e View commit details
    Browse the repository at this point in the history
  4. XspectraParser: Change of walltime error code

    Addresses PR aiidateam#837
    
    Required for commit aiidateam@746770e
    
    Co-authored-by: Sebastiaan Huber <mail@sphuber.net>
    PNOGillespie and sphuber authored Sep 12, 2022
    Configuration menu
    Copy the full SHA
    6eb8ace View commit details
    Browse the repository at this point in the history
  5. Tests: Update of error code text

    Addresses PR aiidateam#837
    
    Required with commit aiidateam@746770e
    
    Co-authored-by: Sebastiaan Huber <mail@sphuber.net>
    PNOGillespie and sphuber authored Sep 12, 2022
    Configuration menu
    Copy the full SHA
    6742ff3 View commit details
    Browse the repository at this point in the history
  6. XspectraCalculation: Cleanup code for restart_flag

    Addresses PR aiidateam#837
    
    Cleans-up the code for detecting if the parent calculation was an `XspectraCalculation`
    
    Co-authored-by: Sebastiaan Huber <mail@sphuber.net>
    PNOGillespie and sphuber authored Sep 12, 2022
    Configuration menu
    Copy the full SHA
    8b84c55 View commit details
    Browse the repository at this point in the history
  7. Tests: Trim contents of aiida.out for failed_walltime

    Addresses comment for PR aiidateam#837: aiidateam#837 (review)
    
    Safely trims down the file length of the stdout file for `failed_timeout` test of `XspectraParser`
    PNOGillespie committed Sep 12, 2022
    Configuration menu
    Copy the full SHA
    ab9ba9f View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    a6ac39a View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    e0529ec View commit details
    Browse the repository at this point in the history

Commits on Sep 26, 2022

  1. Configuration menu
    Copy the full SHA
    5a0e90f View commit details
    Browse the repository at this point in the history

Commits on Sep 27, 2022

  1. Update tests/parsers/test_xspectra.py

    Correct text of docstring for `test_xspectra_failed_timeout`
    
    Co-authored-by: Sebastiaan Huber <mail@sphuber.net>
    PNOGillespie and sphuber authored Sep 27, 2022
    Configuration menu
    Copy the full SHA
    767e2d6 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ae91712 View commit details
    Browse the repository at this point in the history

Commits on Oct 14, 2022

  1. Configuration menu
    Copy the full SHA
    a2c1321 View commit details
    Browse the repository at this point in the history

Commits on Oct 21, 2022

  1. Configuration menu
    Copy the full SHA
    dd73851 View commit details
    Browse the repository at this point in the history

Commits on Oct 27, 2022

  1. Configuration menu
    Copy the full SHA
    2a73bd5 View commit details
    Browse the repository at this point in the history
  2. XspectraParser: Fix bugs in parsing vector/coord system

    Adds information on the coordinate system used in the XSpectra
    calculation (either crystallographic or Cartesian). Also addresses a bug
    spotted in the stdout of XSpectra itself, where the epsilon/k-vector is
    reported by the code during the `read_save_file` subroutine as being in
    `[Cartesian frame]` regardless of the coordinate system used by the
    parent XSpectra calculation. Because of this, calculations where
    `xonly_plot=.true.` cannot meaningfully have metadata for the coordinate
    system used by the calculation recorded in the `output_parameters`
    dictionary by the parser.
    
    This fix also addresses the fact that the epsilon/k-vector is
    essentially reported twice in the event of a calculation restart: once
    when the input file is read and a second time when the save file is
    read.
    PNOGillespie committed Oct 27, 2022
    Configuration menu
    Copy the full SHA
    b2c4b83 View commit details
    Browse the repository at this point in the history
  3. Hotfix: Update Previous Commit to XspectraParser

    Updates commit 9ef620c
    
    Previous commit stated that when reading the save file, XSpectra prints
    the epsilon/k-vector stored in the save file as being in Cartesian
    coordinates regardless the coordinate system used in the parent
    calculation. This statement was incorrect, as XSpectra always records the
    epsilon vector in cartesian coordinates. The parser now correctly
    records the `eps_k_vector_coords` entry in the event of re-plot
    calculations while skipping the entry for calculation restarts, since
    the epsilon/k-vector used is reported with the relevant coordinate system
    at the beginning of the stdout.
    PNOGillespie committed Oct 27, 2022
    Configuration menu
    Copy the full SHA
    d6577fa View commit details
    Browse the repository at this point in the history
  4. XspectraParser: Improve reliability of parsing method

    Improves the reliability of parsing information in the `XspectraParser`
    by collecting information from the CalcJob node's `parameter` node
    instead of using the stdout.
    PNOGillespie committed Oct 27, 2022
    Configuration menu
    Copy the full SHA
    af1822d View commit details
    Browse the repository at this point in the history
  5. XspectraParser: Updates to parser dict keys and tests

    For the `XspectraParser` and related tests:
    * Changes the Parser to retrieve various information from the inputs of
    the CalcJob node rather than the stdout, since some information (e.g.
    polarisation vector and coordinate system) are not reported reliably.
    * Changes some of the keys in the `output_parameters` dictionary.
    * Updates the Parser tests to work with the new changes to the Parser
    itself.
    PNOGillespie committed Oct 27, 2022
    Configuration menu
    Copy the full SHA
    42d66bb View commit details
    Browse the repository at this point in the history

Commits on Oct 28, 2022

  1. XspectraParser: Change output_parameter keys and add defaults

    Requested for aiidateam#853
    
    For parameters Parsed from the calculation input, the commit changes
    their keys to those used in the input parameters:
    * `epsilon_vectors` => `xepsilon`
    * `vector_coord_system` => `xcoordcrys`
    * `only_plot_spectrum` => `xonly_plot`
    
    Also adds default values for these keys which match those set by
    `xspectra.x` and updates the relevant parser tests.
    PNOGillespie committed Oct 28, 2022
    Configuration menu
    Copy the full SHA
    df1def4 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9bb7cbf View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4a058f5 View commit details
    Browse the repository at this point in the history

Commits on Nov 11, 2022

  1. Configuration menu
    Copy the full SHA
    ee58a8f View commit details
    Browse the repository at this point in the history

Commits on Nov 22, 2022

  1. Configuration menu
    Copy the full SHA
    ab5559a View commit details
    Browse the repository at this point in the history

Commits on Dec 14, 2022

  1. Configuration menu
    Copy the full SHA
    5c68963 View commit details
    Browse the repository at this point in the history

Commits on Dec 16, 2022

  1. Configuration menu
    Copy the full SHA
    ede83a3 View commit details
    Browse the repository at this point in the history

Commits on Jan 31, 2023

  1. Configuration menu
    Copy the full SHA
    d1c7d74 View commit details
    Browse the repository at this point in the history

Commits on Feb 3, 2023

  1. Configuration menu
    Copy the full SHA
    6bf3998 View commit details
    Browse the repository at this point in the history

Commits on Feb 14, 2023

  1. Add Feature: XspectraCrystalWorkChain

    Adds a new WorkChain for `xspectra.x` calculations to compute a complete
    K-edge XANES for each element of a given structure using `pw.x` and
    `xspectra.x`. The WorkChain uses the following process flow:
    
    * Relax the given input structure using the `PwRelaxWorkChain`
    (optional).
    * Generate the core wavefunction of each ground-state pseudopotential
    for each absorbing element considered (requires AiiDA-Shell plugin).
    * Analyse the symmetry of the relaxed structure using `spglib`. Use the
    outputs of the analysis to prepare inputs for `XspectraCoreWorkChain`
    sub-processes.
    * Call the `XspectraCoreWorkChain` for each structure prepared in the
    previous step to generate the powder sample XANES for each identified
    absorbing atom site in the structure.
    * Compile all outputs from the `XspectraCoreWorkChain` sub-processes and
    return a single XANES spectrum for each element considered in the
    analysis.
    
    Excited-state and ground-state pseudopotentials presently must be provided
    using the input namespaces `core_hole_pseudos` and `gipaw_pseudos`
    respectively, taking the form of a Dict node with the format:
    
    	{'{element} : {'core_hole' : {upf}, 'gipaw' : {upf}}}
    
    In addition to the final XANES spectra for each element, the powder
    spectrum of each absorbing atom calculated can be returned as output to
    the head WorkChain node with the optional input
    `return_all_powder_spectra` (`False` by default).
    PNOGillespie committed Feb 14, 2023
    Configuration menu
    Copy the full SHA
    d4a2845 View commit details
    Browse the repository at this point in the history

Commits on Feb 15, 2023

  1. XspectraCrystalWorkChain: Add core_wfc_data input namespace

    Adds an input namespace `core_wfc_data` which can be used to provide
    already-computed core wavefunction data files for each element. Must use
    the format:
    	{core_wfc_data : {"{element}" : {node}}}
    PNOGillespie committed Feb 15, 2023
    Configuration menu
    Copy the full SHA
    bceb7f6 View commit details
    Browse the repository at this point in the history
  2. XspectraCrystalWorkChain: Add protocol tests

    Adds tests for the `get_builder_from_protocol` method of the
    `XspectraCrystalWorkChain`
    PNOGillespie committed Feb 15, 2023
    Configuration menu
    Copy the full SHA
    58a290e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b9e6879 View commit details
    Browse the repository at this point in the history

Commits on Mar 20, 2023

  1. XspectraCrystalWorkChain: Clean up and simplify code

    Removes redundant code in `setup` and `get_xspectra_structures`
    
    Co-authored-by: Xing Wang <xingwang1991@gmail.com>
    PNOGillespie and superstar54 authored Mar 20, 2023
    Configuration menu
    Copy the full SHA
    6d9506d View commit details
    Browse the repository at this point in the history
  2. XspectraCrystalWorkChain: Fix typo in validiate_inputs

    Co-authored-by: Xing Wang <xingwang1991@gmail.com>
    PNOGillespie and superstar54 authored Mar 20, 2023
    Configuration menu
    Copy the full SHA
    28c65ac View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    142a0b1 View commit details
    Browse the repository at this point in the history

Commits on Mar 21, 2023

  1. XspectraCrystalWorkChain: Requested Changes for PR (1)

    Addresses changes requested for PR aiidateam#888 (1):
    * Expands the docstring for `get_spectra_by_element` to describe input
    parameters and usage.
    * Fixes an oversight in `get_xspectra_structures` where the
    `standardized_structure` value was returned regardless of whether the
    structure was actually standardized by the CalcFunction.
    * Add a check for the `core_wfc_data` input to check for
    improperly-formatted file content.
    * Modify the `elements_list` input to be a required input and correct
    all instances where data provenance was lost. Changes
    `get_builder_from_protocol()` to set `elements_list` automatically based
    on `pseudos` input if no `elements_list` is given
    * Correct all instances of `optimized_structure` and `relaxed_structure`
    to all be `optimized_structure`
    * Change from simply using `append_` to add all CoreWorkChains to the
    context and instead assign each their site indexes as keys (i.e.
    `self.ctx.site_{i}`)
    * Add a step to unassign the pseudopotential for the element of the
    absorbing atom if the element does not exist in the structure (e.g. for
    the case where only one atomic site of the element exists).
    * Change the `structure_preparation_settings` input to be a dynamic
    namespace instead of a single Dict node, thus ensuring data provenance
    is maintained.
    PNOGillespie committed Mar 21, 2023
    Configuration menu
    Copy the full SHA
    5964896 View commit details
    Browse the repository at this point in the history
  2. Tests: Update test_crystal.yaml

    Updates the `test_crystal.yaml` to include the required `elements_list`
    input generated by the protocol.
    PNOGillespie committed Mar 21, 2023
    Configuration menu
    Copy the full SHA
    14d2afa View commit details
    Browse the repository at this point in the history

Commits on Mar 22, 2023

  1. update doc

    superstar54 committed Mar 22, 2023
    Configuration menu
    Copy the full SHA
    41a5e40 View commit details
    Browse the repository at this point in the history
  2. fix doc warning

    superstar54 committed Mar 22, 2023
    Configuration menu
    Copy the full SHA
    dde5b4d View commit details
    Browse the repository at this point in the history