development of the aiida plugins for the flagship code

15
HORIZON2020 European Centre of Excellence Deliverable D3.2 Development of the AiiDA plugins for the flagship codes D3.2 Development of the AiiDA plugins for the flagship codes Davide Campi, Michael Atanbo, Jens Broeder, Andrea Ferretti, Alberto Garcia, Victor M. Garcia-Suarez, Antimo Marrazzo, Gregor Michalicek, Pablo Ordejòn, Giovanni Pizzi, Gianluca Prandini, Daniel Wortmann and Nicola Marzari Due date of deliverable 01/09/2016 (month 12) Final version 31/08/2016 Actual submission date 31/08/2016 Lead beneficiary EPFL (participant number 5) Dissemination level PU - Public http://www.max-centre.eu 1

Upload: lykhue

Post on 12-Feb-2017

220 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Development of the AiiDA plugins for the flagship code

HORIZON2020 European Centre of Excellence

Deliverable D3.2Development of the AiiDA plugins for the flagship codes

D3.2

Development of the AiiDA plugins for the flagshipcodes

Davide Campi, Michael Atanbo, Jens Broeder, Andrea Ferretti,Alberto Garcia, Victor M. Garcia-Suarez, Antimo Marrazzo,Gregor Michalicek, Pablo Ordejòn, Giovanni Pizzi, Gianluca

Prandini, Daniel Wortmann and Nicola Marzari

Due date of deliverable 01/09/2016 (month 12)Final version 31/08/2016Actual submission date 31/08/2016

Lead beneficiary EPFL (participant number 5)Dissemination level PU - Public

http://www.max-centre.eu 1

Page 2: Development of the AiiDA plugins for the flagship code

HORIZON2020 European Centre of Excellence

Deliverable D3.2Development of the AiiDA plugins for the flagship codes

Document informationProject acronym MaXProject full title Materials Design at the ExascaleResearch Action Project type European Centre of Excellence in materials mod-

elling, simulations and designEC Grant agreement no. 676598Project starting/end date 01/09/2015 (month 1) / 28/02/2018 (month 30)Website http://www.max-centre.euDeliverable no. D3.2

Authors Davide Campi, Michael Atanbo, Jens Broeder, An-drea Ferretti, Alberto Garcia, Victor M. Garcia-Suarez, Antimo Marrazzo, Gregor Michalicek,Pablo Ordejòn, Giovanni Pizzi, Gianluca Prandini,Daniel Wortmann and Nicola Marzari

To be cited as Davide Campi et al., (2016): Development of theAiiDA plugins for the flagship codes. DeliverableD3.2 of the H2020 project MaX (final version asof 31/08/2016). EC grant agreement no: 676598,EPFL, Lausanne, Switzerland

Disclaimer

This document’s contents are not intended to replace consultation of any applicable legalsources or the necessary advice of a legal expert, where appropriate. All information inthis document is provided “as is” and no guarantee or warranty is given that the infor-mation is fit for any particular purpose. The user, therefore, uses the information at itssole risk and liability. For the avoidance of all doubts, the European Commission has noliability in respect of this document, which is merely representing the authors’ view.

http://www.max-centre.eu 2

Page 3: Development of the AiiDA plugins for the flagship code

HORIZON2020 European Centre of Excellence

Deliverable D3.2Development of the AiiDA plugins for the flagship codes

Contents

1 Executive summary 4

2 Introduction 4

3 FLEUR 63.1 FLEUR input generator plugin . . . . . . . . . . . . . . . . . . . . . . . 63.2 FleurinpData . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63.3 FLEUR plugin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

4 QUANTUM ESPRESSO 84.1 PW plugin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84.2 PW postprocessing codes plugins . . . . . . . . . . . . . . . . . . . . . . 94.3 CP plugin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94.4 NEB plugin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104.5 PH plugin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104.6 PH post-processing codes plugins . . . . . . . . . . . . . . . . . . . . . 114.7 Wannier90 plugin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

5 SIESTA 12

6 YAMBO 136.1 Input Generator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136.2 Output Parser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

A Acknowledgements 15

References 15

http://www.max-centre.eu 3

Page 4: Development of the AiiDA plugins for the flagship code

HORIZON2020 European Centre of Excellence

Deliverable D3.2Development of the AiiDA plugins for the flagship codes

1 Executive summary

This documents reports on the implementation of the deliverable D3.2 concerning thedevelopment of the Automated Interactive Interface and Database for computational sci-ence (AiiDA) plugins for the four flagship codes of the MAX Centre of Excellence (CoE):FLEUR, QUANTUM ESPRESSO, SIESTA, and YAMBO. The present document brieflyoutlines the concept of an AiiDA plugin and describes the layout, the data organisation,and the current capabilities of each among the AiiDA plugins for the MAX codes, as re-alized within the Work Package 3 (WP3) effort during the first year of operation. All theplugins have been made available under MIT license from multiple sources and they areaccompanied by a comprehensive documentation, tutorials, and test cases as specified ineach section.

2 Introduction

In recent years the accuracy and predictive capability of materials simulations, togetherwith the increasing of supercomputers power, has enabled a paradigm shift for compu-tational design and discovery in which massive computing efforts can be launched toidentify and optimize novel materials to tackle key technological challenges.

The objective of WP3 within the MAX CoE is to create a working ecosystem and frame-work to empower researches of ever-increasing complexity, sharing of data and of au-tomated turnkey solutions to calculate materials properties and allow a liquid market ofcomputational resources.

Such materials’ informatics framework is provided in MAX CoE through the AiiDAplatform [1, 2], a python infrastructure that supports the functionalities encoded in thefour pillars of:

• Automation, dedicated to abstracting the low-level, time-consuming tasks that arenecessary to manage the preparation, remote submission, retrieval, and processingof manifold calculations with a wide array of codes;

• Data, dedicated to automatic translation of calculations into data that are storedin databases according to the needs of computational materials science (heteroge-neous data, evolving schemas);

• Environment, to provide the high-level working environment that end users re-quire to perform the materials simulations and to query the data without the needof being database experts;

• Sharing, to create the social ecosystem needed to share data, results and scientificworkflows.

To ensure the maximum flexibility, in AiiDA, codes are managed by a plugin interface.By using a dedicated plugin for a specific code is possible to prepare simple input filesusing templates or customized input files leveraging more advanced functionalities, au-tomatically parse the output data and store every significant information into database

http://www.max-centre.eu 4

Page 5: Development of the AiiDA plugins for the flagship code

HORIZON2020 European Centre of Excellence

Deliverable D3.2Development of the AiiDA plugins for the flagship codes

objects exposed to the user through an intuitive python interface thanks to AiiDA Object-Relational Mapper (ORM) .

The AiiDA ORM essentially translates database objects into python classes allowing thecreation of a “virtual objects database” that hides to the user the complexity related tothe management of the actual database while still enabling the preservation of the fullprovenance of the data and the possibility of fast queries.

A plugin is simply a python module file, containing the definition of new subclasses ofthe AiiDA classes to support a new simulation software. It is usually made of two maincomponents. The first one contains the code needed to generate the software-specificinput starting from data stored in the AiiDA database. The second encodes the instruc-tions to parse the results and store them into standard AiiDA data subclasses such asParameterData used to store small scalar results as a dictionary, ArrrayData for largearrays, StructureData used for crystal structures or RemoteData to save a reference tothe scratch folder on the remote computer in which the calculation was run and allow therestart of a calculation without the need to copy large files like the wavefunctions whileensuring data provenance. Optionally a plugin can also contains the definition of newsoftware-specific data types as subclasses of the main AiiDA objects.

A part of the first year WP3 tasks, object of the present deliverable, concerns the devel-opment of AiiDA plugins to support all the flagship codes supported by the MAX CoE.This will be followed by the implementation and sharing (as modular AiiDA workflows)of the computational protocols for the calculations of relevant materials properties.

A description of the plugins, their capabilities and references is reported code-by-code inthe following sections. An archive containing the current version the plugins developedfor all the flagship codes, in compliance with this deliverable, is available in the MAXwebsite. Each plugin also is hosted in an individual GIT repository on BitBucket[3].All the plugins are also available through the MAX Centre of Excellence-AiiDA plugindevelopers group on BitBucket that collects all the AiiDA plugins developed within MAXand groups together all the developers to ensure the best reciprocal coordination anddevelopment sharing. The group can be openly joined with a read access by the generalpublic interested in AiiDA plugins.1

1 Access to the MAX Centre of Excellence-AiiDA plugin developers group can be required by sending anemail to [email protected], access to the individual repository can be granted by the developersof the specific plugin.

http://www.max-centre.eu 5

Page 6: Development of the AiiDA plugins for the flagship code

HORIZON2020 European Centre of Excellence

Deliverable D3.2Development of the AiiDA plugins for the flagship codes

3 FLEUR

In this section we describe the interface layout of the AiiDA plugin for the all-electronlinearized augmented plane wave code FLEUR[4] realized in the first 12 month of theMAX CoE in compliance with the present deliverable D3.2.

Adapted to the use of the FLEUR code, the overall plugin and consist of a three parts:

• A plugin for the Fleur input generator

• A FleurinpData structure

• A plugin for the Fleur code

All the three parts stand under the MIT-license and are publicly available on BitBucketat https://bitbucket.org/broeder-j/fleur_plugin.

A detailed documentation, including a description of the most important classes,common use examples and test cases are currently hosted both at www.flapw.de.

3.1 FLEUR input generator plugin

Figure 1: Graphic scheme of the FLEUR input generator plugin.

The FLEUR code can use an input generator to ease the preparation of the input fileand reduce the amount of parameters that need to be manually specified by the user. TheAiiDA input generator plugin is capable of running the FLEUR input generator with all itsfeatures, except crystal structure creation which is deliberately not supported. The inputgenerator plugin just needs a StructureData node and it can create a FLEUR input dataobject, described in the next section, with default parameters, from which one can run aFLEUR calculation. If the user wants to specify something, this can be done by parsingalso an optional ParameterData node in the form of a simple namelist dictionary.

3.2 FleurinpData

The FleurinpData is a new software-specific AiiDA subclass that defines a new datatype written to make the plugin more user friendly, hide the complexity of the full inputfile and ensure the connection to standard AiiDA data structures like StructureData andKpointsData. The FleurinpData class provides the user with methods to change theFLEUR input and also has methods to extract a StructureData node and for extractinga KpointsData node. In principle, this class also allows the user to do everything from

http://www.max-centre.eu 6

Page 7: Development of the AiiDA plugins for the flagship code

HORIZON2020 European Centre of Excellence

Deliverable D3.2Development of the AiiDA plugins for the flagship codes

scratch and directly prepare a FLEUR input, without the input generator, and create aFleurinpData object from that input.

Figure 2: Graphic scheme of the FleurinpData class.

3.3 FLEUR plugin

The FLEUR plugin is the part of the AiiDA interface for working with the main FLEUR

code. A FLEUR calculation needs a complete Extensible Markup Language (XML) inputfile, which is represented and stored as a FleurinpData node, and optionally, a startingcharge density file. To preserve the provenance and avoid unnecessary repetitions thosefiles can also be provided through a parent calculation which can be either an initialFleurinputgenCalculation or a previously completed FleurCalculation.

Figure 3: Graphic scheme of the main FLEUR plugin.

The main output is stored in a ParameterData node, which contains all the results of aFLEUR run. In the case of a structure or parameter change within the FLEUR calculationa new FleurinpData data node with the updated parameters is also created. Data ob-jects that preserve a link with the calculation executed on the remote computer such as aRemoteData and RemoteFolder nodes are also created.

In its current implementation the FLEUR plugin fully supports all the basic features ofFLEUR such as self-consistent runs, calculation of forces, density of states and electronicband structure, determination of magnetic properties, calculations including spin-orbitcoupling and supports all the exchange-correlations functionals implemented in FLEUR.All these features are available for both 3D and 2D calculations.

http://www.max-centre.eu 7

Page 8: Development of the AiiDA plugins for the flagship code

HORIZON2020 European Centre of Excellence

Deliverable D3.2Development of the AiiDA plugins for the flagship codes

4 QUANTUM ESPRESSO

The QUANTUM ESPRESSO package [5] is a distribution of independent and interop-erable codes. In this section we describe all the AiiDA plugins that has been devel-oped for the main codes included in the package. All the plugins are already includedin the current aiida_epfl distribution, freely available for academic users at http://theossrv1.epfl.ch/aiida_download/downloader/. The plugins for themain codes, PW and CP, are also included in the latest release of the aiida_core pack-age v.0.7.0 released under an open-source MIT license available as a GIT repositoryat https://bitbucket.org/aiida_team/aiida_core or from the AiiDAwebsite http://www.aiida.net.

4.1 PW plugin

The PW code represents the core of the QUANTUM ESPRESSO package, it is able toperform different kinds of self-consistent calculations of electronic structure propertiesusing Density Functional Theory (DFT), a plane wave basis and a pseudopotential ap-proach.

The AiiDA plugin for PW is able to support all the code features including ground stateenergy calculations, calculation of forces and stresses, structural relaxations, variable celloptimizations, molecular dynamics on the Born-Oppenheimer surface and spin-polarizedcalculations also including spin-orbit interaction and non-collinear magnetism.

A basic sheme of a PW calculation within AiiDA is represented in Fig. 4. The PW Ai-iDA plugin is able to generate a complete input file starting from standard AiiDA objectssuch as a StructureData containing the crystallographic information and KpointsDatacontaining the reciprocal space points on which to build the wavefunctions which can bespecified either as a mesh or a list of points with or without weights. A pseudopotentialfor each atomic species can be provided through a specific UpfData nodes or an entirefamilies of pseudopotentials can be imported into the database and AiiDA can automati-cally chose the appropriate pseudopotentials from a selected family. Input parameters ofPW are mapped into a nested dictionary stored into a ParameterData object.

Figure 4: Schematic representation of a PW calculation within AiiDA.

http://www.max-centre.eu 8

Page 9: Development of the AiiDA plugins for the flagship code

HORIZON2020 European Centre of Excellence

Deliverable D3.2Development of the AiiDA plugins for the flagship codes

Optionally a RemoteData object can be used to indicate the the scratch folder of a previ-ously completed PW calculation to allow a restart without the need of coping heavy files,like the wavefunctions or the charge density, while SinglefileData can instead be used toassign specific files required by certain calculations like a van der Waals kernel table fornon-local functionals.

After the calculation is executed, the output parser collects all the scalar properties (sucha energy, magnetization, total force, warnings and so on ) in a ParameterData objectaccessible by calculation.res. Vectorial properties too big to be put in the dictionary, likeforces, stresses, ionic positions parsed at every step of the ionic-relaxation / molecular-dynamics run and organized in an ArrayData object. In the case of a calculation of anelectronic band structure the result are organized in a specific subclass of the ArrayDatanamed BandsData that adds specific methods for analyze and plot the electronic energiesfor every k-point. In the case of a change in the shape of the cell or the ionic positionduring the calculation, the last configuration is saved in a StructureData object.

Possible errors are reported in the log of the calculation and are also stored in the mainParameterData output node. The PW AiiDA plugin also allows for some advancedfunctionalities like fixing some atoms coordinates, passing an explicit list of k-points orrun the code in an “initialization only” mode to enable a subsequent optimal automaticparallellization of the actual calculation or retrieving additional optional files chosen bythe user.

A detailed description of the plugin and its layout is hosted within the AiiDA documen-tation at http://aiida-core.readthedocs.io/en/stable/plugins/quantumespresso/pw.html, a tutorial on the use of PW with AiiDA can befound at http://aiida-core.readthedocs.io/en/stable/examples/pw_tutorial.html and various example are distributed wihtin the AiiDA package.

4.2 PW postprocessing codes plugins

Through a plugin interface, AiiDA supports some of the most commonly used post-processing tools wihtin the QUANTUM ESPRESSO package like DOS and PROJWFC.The simple input files of these codes are created starting from a dictionary stored in aParameterData and a RemoteData that points to the PW calculation scratch folder. Theoutput is parsed and managed as ArrayData objects. These plugins are available in betaversion in the aiida_epfl release.

4.3 CP plugin

The organization of the AiiDA plugin for the Car-Parinello molecular dynamics codeCP follows the same guidelines, conventions and data organization adopted for the PWplugin with the same structure of input and output nodes. The documentation of theplugin can be found at http://aiida-core.readthedocs.io/en/stable/plugins/quantumespresso/cp.html and examples are provided within boththe aiida_epfl and aiida_core packages.

http://www.max-centre.eu 9

Page 10: Development of the AiiDA plugins for the flagship code

HORIZON2020 European Centre of Excellence

Deliverable D3.2Development of the AiiDA plugins for the flagship codes

4.4 NEB plugin

The NEB code implements within QUANTUM ESPRESSO the nudged elastic bandmethod for finding saddle points and minimum energy paths among different atomicarrangements. A beta version of the AiiDA plugin for NEB is available in the ai-ida_epfl release and is documented at http://aiida-core.readthedocs.io/en/stable/plugins/quantumespresso/neb.html.

The plugin is able to generate a input file starting from the same AiiDA objects neededto run a PW calculation, namely a UpfData, KpointsData and a ParameterData withthe instructions for the PW code, on which NEB relies as a quantum engine, but it alsorequires a specific ParameterData with NEB-specific parameters. The initial and finalstructures are specified with two StructureData.

As customary, scalar quantities are parsed from the output and stored into a Param-eterData while larger quantities like the calculated and interpolated minimum energypath and the structures of intermediate coordinates are stored in appropriate ArrayDatanodes.

4.5 PH plugin

The PH code performs Density Functional Perturbation Theory (DFPT) calcula-tions starting from the ground states properties computed with PW. A beta ver-sion of the AiiDA plugin for PH is available within the aiida_epfl package. Afull documentation is provided at http://aiida-core.readthedocs.io/en/stable/plugins/quantumespresso/ph.html and a guided tutorial is devel-oped at http://aiida-core.readthedocs.io/en/stable/examples/ph_tutorial.html. Further examples of calculations and workflows submissioninvolving the PH plugin are provided in the example/submission folder in the aiida_epfldistribution.

The main input nodes for a PH calculation within AiiDA are a ParameterData nodecontaining a dictionary that reflects the standard PH input files with convergence param-eters and instructions on the type of calculation, a KpointsData node that specify the listof q-points in which compute the phonons and finally a parent calculation node that canbe either a PW calculation or previous PH calculation in case of restart.

Optional advanced commands like additional files to retrieve or the creation of files asa preparation of a calculation of the anharmonic force constants can be set using andadditional settings ParameterData object.

In output, small properties like dielectric constants, Born charges or possible error mes-sages generated in the run are stored into a ParameterData object, furthermore a dic-tionary containing the q-point and the phonon frequencies is created for each dynamicalmatrix. Larger files that do not like the whole dynamical matrices are retrieved and storedin a repository.

http://www.max-centre.eu 10

Page 11: Development of the AiiDA plugins for the flagship code

HORIZON2020 European Centre of Excellence

Deliverable D3.2Development of the AiiDA plugins for the flagship codes

4.6 PH post-processing codes plugins

In order to fully enable the calculation of phonon dispersions and phonon density of stateswithin AiiDA, a plugin has been developed also for the two main phonon post-processingcodes: Q2R and Matdyn.

The Q2R plugin requires two nodes as an input, a ParameterData node, containinga nested dictionary that maps the input of QUANTUM ESPRESSO, and a node corre-sponding to the parent calculation. The real space force constants produced as output arestored into a SinglefileData.

The Matdyn code read the real space force constants and can interpolate phonon bandsalong a fine q-points path or compute the phonon density of states on a grid. The AiiDAMatdyn plugin can generate an input file starting from three nodes: a ParameterDatacontaining the main input parameters, a KpointsData containing the list of q-points onwhich interpolate the phonons and the node represented by the parent calculation exe-cuted with the Q2R code.

An output ParameterData node contains mainly the possible warnings while the phononfrequencies as a function of the q-points are stored into a BandsData object.

Both the plugin are documented at http://aiida-core.readthedocs.io/en/stable/plugins/quantumespresso/index.html and are available inthe aiida_epfl package.

4.7 Wannier90 plugin

In addition to the plugins for the QUANTUM ESPRESSO package we also developeda plugin for Wannier90[6], a tool for obtaining maximally localized Wannier func-tions from DFT calculations. Wannier90 can be effectively interfaced with PW via thepw2wannier90.x pre-code.

The Wannier90 plugin needs a node representing a parent PW calculation to start with,a StructureData, a KpointsData that specifies the reciprocal space points on whichto build the Wannier functions are built, two ParameterData objects with dictionariescontaining the criteria for the pre-code and the main code and finally a dedicated object,a so called OrbitalData class, containing it it a list of orbitals on which perform theprojections. Optionally another KpointsData input can be passed to indicate the path inreciprocal space over with the Wannier-interpolated bands are computed.

Scalar properties like the centers and spreading of the Wannier functions, possible warn-ings or errors are parsed from the output and stored in a ParameterData. If avaliableinterpolated band structures are stored in a suitable BandsData node.

The Wannier90 plugin is currently availabe in the aiida_epfl package.

http://www.max-centre.eu 11

Page 12: Development of the AiiDA plugins for the flagship code

HORIZON2020 European Centre of Excellence

Deliverable D3.2Development of the AiiDA plugins for the flagship codes

5 SIESTA

In this section we sketch the layout of the AiiDA plugin for the localized-basis set DFTcode SIESTA [7, 8] that has been developed in the closest possible analogy with the PWplugin in QUANTUM ESPRESSO.

By means of this plugin a SIESTA calculation can be executed within the AiiDA frame-work, starting from: a StructureData containing the geometrical information, a set ofk-points specified as a KpointsData node, and a dictionary included into a Parameter-Data node with the calculation options that mimics the content of a standard SIESTA

input file.

A new software-specific data class named PsfData has been created for the SIESTA pseu-dopotentials in close similarity with the UpfData in QUANTUM ESPRESSO, allowingthe same properties and methods, including the possibility of loading pseudopotentialfamilies.

The main results of the calculation, including all the scalar quantities and possible errorsare output by SIESTA in a XML file conforming with the CMLComp extension of theChemical Markup Language (CML) specification [9], and are translated by the parsercomponent of the plugin into the appropriate AiiDA elements, including ParameterData(for scalar quantities), ArrayData (for forces and stresses) and StructureData (for thefinal structure in relaxation runs).

A beta version of the SIESTA plugin is available on BitBucket upon request at

• https://bitbucket.org/dcampi/siesta_plugin or

• http://userportal.max-centre.industries/sites/default/files/repository/Siesta_plugin.zip

or through the MaX Centre of Excellence-AiiDA plugin developers group. The documen-tation and a folder with examples of calculations and workflows submission are availablein the folders

• Siesta_plugin/docs/source/plugins/siesta/,

• Siesta_plugin/examples/submission/,

respectively.

http://www.max-centre.eu 12

Page 13: Development of the AiiDA plugins for the flagship code

HORIZON2020 European Centre of Excellence

Deliverable D3.2Development of the AiiDA plugins for the flagship codes

6 YAMBO

YAMBO [10, 11] is a code that computes excited-state properties in an ab initio contextwithin many-body perturbation theory starting from the Kohn-Sham wavefunctions gen-erated by a DFT code. At the moment interfaces exist with QUANTUM ESPRESSO andAbinit [12] in the public distribution, while others are under development.

An AiiDA plugin for YAMBO, has been developed and is currently available in beta ver-sion (upon request) at

• https://bitbucket.org/prandini/yambo_input,

• https://bitbucket.org/prandini/yambo_parser,

for the input generator and the output parser, respectively.The YAMBO plugin comes with with the capabilities to run different YAMBO run-

levels, including:

• RPA response function (zero and finite momentum)

• COHSEX QP corrections

• GW QP corrections

The documentation of the plugin and two guided examples are also provided to tutor theuser on how to run YAMBO jointly with QUANTUM ESPRESSO within AiiDA. Exam-ples include the calculation of the dielectric function at the RPA level and the calculationof the GW band structure.

6.1 Input Generator

The YAMBO plugin requires a parent calculation as an input node. In the current im-plementation, this calculation can be either a PW calculation (i.e. using pw.x fromQUANTUM ESPRESSO) or a previously executed YAMBO calculation. In the first case,before starting the YAMBO run, the plugin automatically calls the the p2y code (PW toYAMBO interface) that executes a proper format conversion of the relevant files, therebygenerating an initial YAMBO-compliant database. The desired optional parameters forthe p2y interface and the parameters for the YAMBO runs must be specified via Param-eterData nodes that contain a dictionary reflecting the usual p2y or YAMBO input flags.The YAMBO plugin creates data nodes with these inputs and associates them with thesubsequent calculation outputs.

In addition to the parameters passed to the input plugin, a separate dictionary withoptional settings can be passed to fine control the files that are retrieved after the com-pletion of the calculation. A default set of files is retrieved if the settings are not used.To make an example, in a COHSEX or GW calculations, default files to retrieve are theYAMBO report (human readable), the textual QP output file (containing the QP correc-tions actually computed), and the NetCDF4 db ndb.QP and ndb.HF_and_locXC.See Sec. 6.2 for further details.

By design, the YAMBO plugin by design does not hard code any YAMBO input param-eters, and the user needs only supply those settings that should take non-default values.

http://www.max-centre.eu 13

Page 14: Development of the AiiDA plugins for the flagship code

HORIZON2020 European Centre of Excellence

Deliverable D3.2Development of the AiiDA plugins for the flagship codes

Figure 5: High level view of the YAMBO plugin.

In fact, YAMBO reads and generates default values from the existing databases, and pro-vides the parameters that are not specified by the user with their default settings. Thisis a deliberate and conscious choice to keep the YAMBO input parameters hard-codedonly within YAMBO itself, and to keep from duplicating them. This eliminates the effortsthat would be required to keep the plugin synchronized with any advances made in theupstream YAMBO code-base. Doing so, any changes to the yambo implementation re-garding the addition or elimination of parameters can be done transparently and withoutintroducing incompatibilities or necessitating any changes within the AiiDA plugin.

6.2 Output Parser

The output is parsed by means of a python module jointly developed with the yambopycode [13]. Errors, wall-times, and log messages parsed from output and log files arestored in a ParameterData object. Larger quantities like optical, electron energy lossspectra, dielectric function or polarizability spectra are stored in generic ArrayDatanodes while GW band structures are organized in a proper BandsData subclass, thatprovides a standardized interface to represent electronic band information. An illustra-tion of the plugin’s design is shown in Fig. 5, with the input data structures at the top, andthe plugin possible outputs at the bottom.

The development of the YAMBO output parser of this AiiDA plugin has been designedto take advantage at best from the yambopy code [13], developed by Henrique PereiraCoutada Miranda and Alejandro Molina Sanchez. This code, also a Python wrapperto automatises YAMBO calculations, has been slightly modified during the developmentof this plugin to make its parsing capabilities meet AiiDA’s requerements. Yambopy’sparsing module provides an interface that is used from within the YAMBO plugin trans-parently, facilitating maintenance and collaboration between the two projects, while pro-viding for improvements to both code-bases independently. The yambopy project andits documentation can be found at:

• https://github.com/henriquemiranda/yambopy,

• http://yambopy.readthedocs.io/en/latest/.

http://www.max-centre.eu 14

Page 15: Development of the AiiDA plugins for the flagship code

HORIZON2020 European Centre of Excellence

Deliverable D3.2Development of the AiiDA plugins for the flagship codes

A Acknowledgements

We thank Henrique Pereira Coutada Miranda for his collaboration in the implementationof the YAMBO plugin.

References

[1] Pizzi, G., Cepellotti, A., Sabatini, R., Marzari, N. & Kozinsky, B. Aiida: automatedinteractive infrastructure and database for computational science. Comp Mat Sci111, 218–230 (2016).

[2] AiiDA platform home webpage, http://www.aiida.net.

[3] BitBucket home webpage, https://bitbucket.org.

[4] Fleur home webpage, http://www.flapw.de.

[5] Giannozzi, P. et al. Quantum espresso: a modular and open-source software projectfor quantum simulations of materials. Journal of Physics: Condensed Matter 21,395502 (19pp) (2009).

[6] Mostofi, A. A. et al. An updated version of wannier90: A tool for obtainingmaximally-localised wannier functions. Comput Phys Commun 185, 2309 (2009).

[7] Soler, J. et al. The siesta method for ab initio order-n materials simulation. J PhysCond Mat 14, 2745–12779 (2002).

[8] Siesta home webpage, http://www.uam.es/siesta/.

[9] CMLComp resources webpage, http://www1.gly.bris.ac.uk/~walker/CMLComp/.

[10] Marini, A., Hogan, C., Gruning, M. & Varsano, D. Yambo: an ab initio tool forexcited state calculations. Comp Phys Comm 180, 21392 (2009).

[11] Yambo home webpage, http://www.yambo-code.org/index.php.

[12] Abinit home webpage, http://www.abinit.org/.

[13] YamboPy home webpage, http://www.yambo-code.org/doc/yambopy.php.

http://www.max-centre.eu 15