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

Added several examples #23

Merged
merged 8 commits into from
Jun 6, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
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
1 change: 1 addition & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Contributors
- Henrique Miranda (UCL, Belgium) [development of the original phonon visualizer]
- Thibault Sohier (EPFL) [support on the python code and on the examples]
- Chara Cignarella (EPFL) [bug reporting and fixing]
- Miki Bonacci (PSI) [support on the examples]

=======
License
Expand Down
12 changes: 12 additions & 0 deletions config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ data:
C:
title: "Graphene"
filename: C.json
C4:
title: "Graphite"
filename: graphite.json
C2:
title: "Diamond"
filename: diamond.json
PbI2:
title: "PbI<sub>2</sub>"
filename: PbI2.json
Expand All @@ -52,3 +58,9 @@ data:
AgNO2:
title: "AgNO<sub>2</sub>"
filename: AgNO2.json
Al:
title: "Aluminunm"
filename: aluminum.json
GaAs:
title: "GaAs"
filename: GaAs.json
17 changes: 9 additions & 8 deletions convert-to-json.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,23 @@

system_name = os.path.basename(os.path.realpath(folder_name))

with open(os.path.join(folder_name, "scf.in")) as fhandle:
with open(os.path.join(folder_name, "GaAs.scf.in")) as fhandle:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think here we should keep the convention that's defined above, i.e. forcing to use filenames of scf.in, scf.out, matdyn.modes. Would it make sense to rename the files as such? then in principle it's easy to regenerate the json files without having to manually change this code here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, I was not considering this issue, I'll change it back (and modifiy the filenames accordingly)

scf_input = fhandle.read()
with open(os.path.join(folder_name, "scf.out")) as fhandle:
with open(os.path.join(folder_name, "GaAs.scf.out")) as fhandle:
scf_output = fhandle.read()
with open(os.path.join(folder_name, "matdyn.modes")) as fhandle:
with open(os.path.join(folder_name, "GaAs.modes")) as fhandle:
matdyn_modes = fhandle.read()

pretty_name_dict = {"BaTiO_3": "BaTiO<sub>3</sub>"}
pretty_name_dict = {"GaAs": "GaAs"}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this dict should contain entries for all the examples that have a subscript. So GaAs, is not needed, but BaTiO_3 should be kept and everything else that has subscripts should be added (although i'm not sure why it wasn't before). If the entry doesn't exist, i think the rest of the code will just use the correct system name automatically.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

got it


highsym_qpts_default = [[0, "Γ"], [20, "M"], [40, "K"], [60, "Γ"]]
highsym_qpts_default = [[0, "L"], [40, "Γ"], [80, "K"], [100, "X"], [140, "Γ"]]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here, this is the default qpts, that was the same for all the 2D materials. Before, the only expection was BaTiO3. I think this should be kept as it was, unless there is a better default.

highsym_qpts_dict = {
"BaTiO_3": [[0, "X"], [20, "Γ"], [40, "M"], [60, "Γ"], [100, "R"]],
"GaAs": [[0, "L"], [40, "Γ"], [80, "K"], [100, "X"], [140, "Γ"]],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here you should put all the qpts that do not use the default qpts defined above. I think this is all the 3d examples that you added. BaTiO3 should also be kept here.

}

starting_reps_default = (5, 5, 1)
starting_reps_dict = {"BaTiO_3": (3, 3, 3)}
#supercell.
starting_reps_default = (3,3,3)
starting_reps_dict = {"GaAs": (3, 3, 3)}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here. by default, use (5, 5, 1), but for 3d materials, use (3, 3, 3).



phonons = QePhononQetools(
Expand Down
1 change: 1 addition & 0 deletions user_static/data/GaAs.json

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions user_static/data/GaAs/GaAs.matdyn.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
&INPUT
asr = 'simple'
flfrc = 'GaAs.fc'
flfrq = 'GaAs.freq'
flvec = 'GaAs.modes'
! loto_2d = .true.
q_in_band_form = .true.
/
5
0.5000022317397719 0.5000022317397719 0.5000022317397719 40 ! L
0.000 0.000 0.000 40 ! G
0.7500033476096578 0.7500033476096578 0.0 20 ! K
0.0 1.0000044634795437 0.0 40 ! X
0.000 0.000 0.000 1 ! G
31 changes: 31 additions & 0 deletions user_static/data/GaAs/GaAs.matdyn.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@

Program MATDYN v.7.1 starts on 24May2024 at 15:26:29

This program is part of the open-source Quantum ESPRESSO suite
for quantum simulation of materials; please cite
"P. Giannozzi et al., J. Phys.:Condens. Matter 21 395502 (2009);
"P. Giannozzi et al., J. Phys.:Condens. Matter 29 465901 (2017);
"P. Giannozzi et al., J. Chem. Phys. 152 154105 (2020);
URL http://www.quantum-espresso.org",
in publications or presentations arising from this work. More details at
http://www.quantum-espresso.org/quote

Parallel version (MPI & OpenMP), running on 12 processor cores
Number of MPI processes: 12
Threads/MPI process: 1

MPI processes distributed on 1 nodes
R & G space division: proc/nbgrp/npool/nimage = 12
105150 MiB available memory on the printing compute node when the environment starts

mass for atomic type 1 not given; uses mass from file GaAs.fc
mass for atomic type 2 not given; uses mass from file GaAs.fc

MATDYN : 0.04s CPU 0.04s WALL


This run was terminated on: 15:26:29 24May2024

=------------------------------------------------------------------------------=
JOB DONE.
=------------------------------------------------------------------------------=
3,703 changes: 3,703 additions & 0 deletions user_static/data/GaAs/GaAs.modes

Large diffs are not rendered by default.

17 changes: 17 additions & 0 deletions user_static/data/GaAs/GaAs.ph.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
GaAs
&inputph
outdir='/home/bonacc_m/Documents/phonons/GaAs_NAC/TMP_GaAs'
prefix='GaAs'
fildyn='GaAs.dyn',
tr2_ph=1d-13,
epsil=.true.,
asr=.true.,
!lraman=.true.,
!elop=.true.,
!zeu=.true.,
!zue=.true.,
ldisp=.true.
nq1=4
nq2=4
nq3=4
/
Loading
Loading