Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
6e1149f
Update README.md
emolteni Apr 29, 2025
503a0b1
Update and rename README.md to README_EMolteni.md
emolteni Apr 29, 2025
9eaa6c0
Add files via upload
emolteni Apr 29, 2025
09bdd89
Delete unimi/CH4_db_minimal directory
emolteni Apr 29, 2025
6f3e0ea
Add files via upload
emolteni Apr 29, 2025
a20c34b
Create README_EMolteni.md
emolteni Apr 29, 2025
1d9345d
Update README_EMolteni.md
emolteni Apr 29, 2025
df4c17e
Add files via upload
emolteni Apr 29, 2025
7f06749
Delete unimi/README_EMolteni.md
emolteni Apr 29, 2025
481bf3e
Update README_EMolteni.md
emolteni Apr 29, 2025
a65ce8a
Add files via upload
emolteni Apr 29, 2025
43f7aed
Update README_EMolteni.md
emolteni Apr 30, 2025
bb1b50b
Create TMP
emolteni Apr 30, 2025
dd545df
Add files via upload
emolteni Apr 30, 2025
d636811
Delete unimi/UMIL_TheoSim_EMolteni/Yambo_atom_coords/TMP
emolteni Apr 30, 2025
403841c
Add files via upload
emolteni Apr 30, 2025
8c7a2bd
Delete unimi/UMIL_TheoSim_EMolteni/CH4_db_minimal directory
emolteni Apr 30, 2025
d5ffc5c
Delete unimi/UMIL_TheoSim_EMolteni/parser.py
emolteni Apr 30, 2025
501a736
Delete unimi/UMIL_TheoSim_EMolteni/test_yamboparser.py
emolteni Apr 30, 2025
4f31976
Add files via upload
emolteni Apr 30, 2025
f00c4fb
Update README_EMolteni.md
emolteni Apr 30, 2025
95273ed
Delete unimi/UMIL_TheoSim_EMolteni/Yambo_spectra/Spectra_plotting_EMv…
emolteni Apr 30, 2025
2fc5a3d
Add files via upload
emolteni Apr 30, 2025
2f739fb
Add files via upload
emolteni Apr 30, 2025
859630e
Update README_EMolteni.md
emolteni Apr 30, 2025
9659242
Update README_EMolteni.md
emolteni May 2, 2025
aeab0c6
Update README_EMolteni.md
emolteni May 2, 2025
fb25861
Update README_EMolteni.md
emolteni May 5, 2025
65f1242
Create README.md
emolteni May 6, 2025
b869826
Merge branch 'main' into main
emolteni May 6, 2025
e52c509
Add files via upload
emolteni Jul 14, 2025
fb8df2b
Delete unimi/UMIL_TheoSim_EMolteni/Yambo_spectra/Spectra_plotting_EMv…
emolteni Jul 14, 2025
2475958
Delete unimi/UMIL_TheoSim_EMolteni/Yambo_spectra/o-R_methylox_TDLDA.a…
emolteni Jul 14, 2025
aa94782
Update README_EMolteni.md for the updated version (Jul 14th, 2025) of…
emolteni Jul 14, 2025
ee51b9b
Merge branch 'main' into main
emolteni Jul 16, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 24 additions & 20 deletions unimi/UMIL_TheoSim_EMolteni/README_EMolteni.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@

Updated version: Jul 14th, 2025

This repo contains the contributions related to E. Molteni's MDMC internship work
on adding functionalities to some NOMAD parsers for electronic structure codes.
See also MDMC master thesis "Extending NOMAD schemas for the UMIL NFFA-DI Theory &
Simulation Installation, with a focus on the Yambo code", DOI: 10.5281/zenodo.15691481

# Note:
The NOMAD parsers named parser.py mentioned below, part of NOMAD electronic-parsers,
can only run within the NOMAD platform (https://nomad-lab.eu/nomad-lab/) or on a local NOMAD Oasis (https://nomad-lab.eu/nomad-lab/nomad-oasis.html), in both of which also the .../electronic-parsers/tree/develop/tests folder is present.
can only run within the NOMAD platform (https://nomad-lab.eu/nomad-lab/) or on a local NOMAD Oasis (https://nomad-lab.eu/nomad-lab/nomad-oasis.html),
in both of which also the .../electronic-parsers/tree/develop/tests folder is present.

Our modified versions only run within a local Oasis (until they will be merged, after successful Pull Requests, into the NOMAD platform).

These parsers can be run, on the corresponding Yambo or Siesta files, either:
Expand All @@ -24,9 +29,7 @@ in (b) it must be specified in the command) is the "mainfile" (which is a r* fil
also in those cases where the data we are interested in are in a different file
(a o* file for Yambo spectra, the ns.db file for Yambo coordinates, the dos file for Siesta DOS).

Our Spectra_plotting_EMvers_forgithubrepo.ipynb in the /Yambo_spectra folder
instead can be run on a jupyterlab installed on a computer where a local Oasis is present:
indeed it imports and uses some of NOMAD classes and quantities.




Expand Down Expand Up @@ -58,42 +61,43 @@ The corresponding standard NOMAD parser, yielding n. atoms / n. coordinates mism
for systems with different number of atoms of different chemical species,
is: https://github.com/nomad-coe/electronic-parsers/tree/develop/electronicparsers/yambo/parser.py


* /CH4_db_minimal (from https://github.com/emolteni/electronic-parsers/tree/develop/tests/data/yambo):
our "minimal" test folder (containing also a ns.db file within a /SAVE subfolder) for the NOMAD electronic-parsers/test/data/yambo folder,
for the above-mentioned implementation regarding atom coordinates; r_setup is the yambo mainfile.

The corresponding general NOMAD test folder for Yambo (without our contribution) is:
https://github.com/nomad-coe/electronic-parsers/tree/develop/tests/data/yambo


* test_yamboparser.py (from https://github.com/emolteni/electronic-parsers/tree/develop/tests):
file for running all the NOMAD yambo tests present in https://github.com/emolteni/electronic-parsers/tree/develop/tests/data/yambo,
where I have added the part (test_5) regarding our test folder /CH4_db_minimal.

The corresponding standard NOMAD version (without our contribution) is: https://github.com/nomad-coe/electronic-parsers/tree/develop/tests/test_yamboparser.py




# /Yambo_spectra: adding spectra parsing (and plotting) functionality in the NOMAD Yambo parser

* Spectra_plotting_EMvers_forgithubrepo.ipynb: our local parser for Yambo spectra only.
Allows for yambo spectra files as o* files with either 3 or 5 columns of data,
using a regular expression such as to match the various possible formats of spectra headers, i.e.:
E/ev[1] ALPHA-Im[2] ALPHA-Re[3] (ALPHAo-Im[4] ALPHAo-Re[5])
or
E/ev[1] EPS-Im[2] EPS-Re[3] (EPS-Im[4] EPS-Re[5])
where I have indicated with (.....) those columns which are not always present.
For this implementation, we have made a Pull Request on the NOMAD github repo:
https://github.com/nomad-coe/electronic-parsers/pull/292


Content of the /Yambo_spectra folder:

* parser.py (from https://github.com/Jajar26/electronic-parsers/tree/develop/electronicparsers/yambo): modified NOMAD Yambo parser where we have implemented the parsing of several types of optical spectra (in particular: optical absorption either as polarizability vs energy or as dielectric function vs energy; EELS): spectra are dealt with in the "to_values" function, within parse_calculation. The columns to be plotted are the first (column 0 according to python, excitation energies) and the second (column 1 according to python, intensities).
The corresponding version in the general NOMAD is: https://github.com/nomad-coe/electronic-parsers/tree/develop/electronicparsers/yambo/parser.py

* yambo.py (from https://github.com/Jajar26/electronic-parsers/tree/develop/electronicparsers/yambo/metainfo): here we have added the "sp_type" quantity, which we use in the above-mentioned modified Yambo parser, to let the parser identify the type of optical spectrum from the Yambo files. The corresponding version in the general NOMAD is: https://github.com/nomad-coe/electronic-parsers/tree/develop/electronicparsers/yambo/metainfo/yambo.py

The columns to be plotted are the first (column 0 according to python, excitation energies)
and the second (column 1 according to python, intensities).
* results.py: we have modified this piece of code in the “general” part of NOMAD, specifically in: ~/nomad/datamodel (in our local Oasis only, so far) so to add 2 additional spectra types (Polarizabiliy and Dielectric function) in the class Spectra. The corresponding version in the general NOMAD is: https://github.com/nomad-coe/nomad/blob/develop/nomad/datamodel/results.py

This version works on jupyterlab; our version of the NOMAD Yambo parser containing this part for specctra (adapted for the NOMAD platform) does not work yet in our Oasis
(no warning, no error messages, yet no spectra plotted), possibly due to issues on which subparser to use
in order to parse the correct file, which is a o* file, not a r* mainfile.
The fact that our local version of the parser works should ensure that the parts about
matching the specific formats of the headers and columns of data in the file are correct.
* /TrpTyr4_Yambo-IP : this is a folder with Yambo data, where in particular the two r* files are considered by NOMAD as mainfiles, and the o*alpha*, o*eps*, o*eel* are, respectively, the Yambo output files containing: absorption spectrum as polarizability vs energy, absorption spectrum as dielectric function vs energy, EEL spectrum.
Note: when uploading this folder to an Oasis containing our version of parser.py, yambo,py, results,py in the above-mentioned locations, NOMAD will yield a "no representative section system" warning (related to missing info on atom coordinates and cell) due to the absence of a /SAVE/ns.db in this upload (see above explanation in /Yambo_atom_coords), but it will nevertheless parse and plot the spectra, since this part is independent of the parsing of atom coors etc.

* o-R_methylox_TDLDA.alpha_q1_slepc_alda_bse: test Yambo spectrum file to be parsed

The corresponding standard NOMAD parser is: https://github.com/nomad-coe/electronic-parsers/tree/develop/electronicparsers/yambo/parser.py


# /Siesta_DOS: adding electronic Density of States (DOS) parsing (and plotting) functionality in the NOMAD Siesta parser
Expand Down
Loading