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

Hubbard: add useful utility functions #996

Merged
merged 47 commits into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
b0883d4
`HubbardUtils`: nearest neighbour radius finder
bastonero Nov 23, 2023
e565295
Add Hubbard initialization parameters
bastonero Nov 27, 2023
dd2c788
Fix logic and atomic ordering
bastonero Dec 6, 2023
badd882
Improve inputs and refold with thr
bastonero Dec 22, 2023
dcdb00a
Small adjustments
bastonero Dec 22, 2023
c8e04eb
Fix pymatgen reference target for docs
bastonero Dec 22, 2023
21c00ad
Add extra utilities for nearest-neighbour analysis
bastonero Oct 2, 2024
81528a7
Test/Improve `PhBaseWorkChain` overrides/protocol
bastonero Nov 23, 2023
ce01731
Fix missing `max_iterations` in overrides
bastonero Nov 23, 2023
dab0d80
Dependencies: Update `xmlschema~=2.0` (#990)
rikigigi Dec 1, 2023
2b4ecf0
`PhBaseWorkChain`: allow generation of q-point mesh via `qpoints_dist…
AndresOrtegaGuerrero Dec 12, 2023
da0bff8
`PdosWorkChain`: Fix constrained magnetization case
AndresOrtegaGuerrero Dec 12, 2023
efc77d5
Protocols: Bump default SSSP version to 1.3
unkcpz Dec 12, 2023
55ca2bb
Tests: Revert change to `fixture_code`
mbercx Dec 13, 2023
c999434
Devops: Address various deprecation warnings from `aiida-core` (#979)
sphuber Dec 22, 2023
85e7fc1
Docs: Remove `aiida.manage.configuration.load_documentation_profile` …
sphuber Dec 22, 2023
f6a1233
Dependencies: Update `pydantic~=2.4` (#977)
sphuber Dec 22, 2023
e6dd103
`PwBaseWorkChain`: new handler for BFGS history failure
bastonero Dec 22, 2023
c781ad0
Fixing grant number for MaX EUROHPC project
mikibonacci Jan 24, 2024
69e89d1
Release `v4.5.0` (#1002)
sphuber Jan 24, 2024
935d31c
`PhBaseWorkChain`: fix `set_qpoints` step
bastonero Feb 12, 2024
ecb3fdc
`PhBaseWorkChain`: skip q-points validation if ports are excluded
mbercx Feb 12, 2024
5135ff0
📚 `CHANGELOG.md`: improve release notes for `v4.5.0`
mbercx Feb 13, 2024
c3dd07d
🚀 Release `v4.5.1`
mbercx Feb 13, 2024
8fa487c
`HubbardStructureData`: Add validation on site indices
mbercx Feb 12, 2024
6119f31
`HubbardStructureData`: add compatibility for <3D structures
mbercx Feb 12, 2024
9c35806
`seekpath_structure_analysis`: `HubbardStructureData` compatibility
mbercx Feb 19, 2024
a010664
Fix inputs for molecules in the XPS calculation (#1013)
mhdzbert Mar 19, 2024
6f63e99
CLI: Fix import of `StructureData` from QE input file (#1018)
bastonero Mar 27, 2024
0a6f6b0
CLI: Add test for data structure import (#1019)
bastonero Mar 27, 2024
56832dd
`PhCalculation`: add symmetry related exit codes
bastonero Mar 27, 2024
c408d81
`PwBandsWorkChain`: Respect `bands_kpoints` in overrides (#1021)
bastonero Mar 27, 2024
4d9f128
XAS: Enable Correct Parsing of Hubbard and Magnetic Data (#969)
PNOGillespie Mar 29, 2024
d0ca5c2
🚀 Release `v4.6.0`
mbercx Apr 23, 2024
f036c13
`get_xspectra_structures`: Refactor and Improve Code (#1026)
PNOGillespie May 2, 2024
5a9e3e1
Docs: Fix build by pinning `sphinx-autoapi~=3.0.0` (#1038)
sphuber Jul 10, 2024
2e9480d
Add calcjob, parser and base workchain plugin for `bands.x` (#1033)
bastonero Jul 10, 2024
e3641b2
`XspectraCrystalWorkChain`: Enable Symmetry Data Inputs (#1028)
PNOGillespie Jul 11, 2024
098f0f9
CLI: Fix bug in `aiida-quantumespresso workflow launc pw-base` (#1039)
sphuber Sep 11, 2024
29e5b7a
✨ `PwParser`: Add the XML schema for Quantum ESPRESSO v7.3.1
mbercx Sep 27, 2024
2c564e2
Add `nbands_factor` logic into PdosWorkChain (#1044)
AndresOrtegaGuerrero Nov 20, 2024
70b38f6
`PpCalculation`: Make parsing of output files optional (#1029)
yakutovicha Nov 20, 2024
6de1d89
🚀 Release `v4.7.0`
mbercx Nov 29, 2024
39a8ed0
Merge branch 'main' into feat/voronoi
bastonero Jan 6, 2025
4254ea4
Add import
bastonero Jan 6, 2025
c5a6277
Merge branch 'main' into feat/voronoi
bastonero Jan 14, 2025
dcfa21a
Fix docstring typo
bastonero Jan 14, 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
1 change: 1 addition & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
'python': ('https://docs.python.org/3.8', None),
'aiida': ('https://aiida.readthedocs.io/projects/aiida-core/en/latest/', None),
'aiida_pseudo': ('http://aiida-pseudo.readthedocs.io/en/latest/', None),
'pymatgen': ('https://pymatgen.org/', None),
}

# Settings for the `autoapi.extenstion` automatically generating API docs
Expand Down
8 changes: 5 additions & 3 deletions src/aiida_quantumespresso/data/hubbard_structure.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,11 @@ def append_hubbard_parameter(
parameters = HubbardParameters.from_tuple(hp_tuple)
hubbard = self.hubbard

if parameters not in hubbard.parameters:
hubbard.parameters.append(parameters)
self.hubbard = hubbard
if parameters in hubbard.parameters:
hubbard.parameters.remove(parameters)

hubbard.parameters.append(parameters)
self.hubbard = hubbard

def pop_hubbard_parameters(self, index: int):
"""Pop Hubbard parameters in the list.
Expand Down
392 changes: 389 additions & 3 deletions src/aiida_quantumespresso/utils/hubbard.py

Large diffs are not rendered by default.

263 changes: 263 additions & 0 deletions tests/fixtures/structures/Fe3O4.cif
Original file line number Diff line number Diff line change
@@ -0,0 +1,263 @@
#------------------------------------------------------------------------------
#$Date: 2017-10-13 02:32:00 +0300 (Fri, 13 Oct 2017) $
#$Revision: 201954 $
#$URL: file:///home/coder/svn-repositories/cod/cif/1/01/03/1010369.cif $
#------------------------------------------------------------------------------
#
# This file is available in the Crystallography Open Database (COD),
# http://www.crystallography.net/
#
# All data on this site have been placed in the public domain by the
# contributors.
#
data_1010369
loop_
_publ_author_name
'Montoro, V'
_publ_section_title
;
Miscibilita fra gli ossidi salini di ferro e di manganese
;
_journal_coden_ASTM GCITA9
_journal_name_full 'Gazzetta Chimica Italiana'
_journal_page_first 728
_journal_page_last 733
_journal_volume 68
_journal_year 1938
_chemical_formula_structural 'Fe3 O4'
_chemical_formula_sum 'Fe3 O4'
_chemical_name_systematic 'Iron diiron(III) oxide'
_space_group_IT_number 227
_symmetry_cell_setting cubic
_symmetry_space_group_name_Hall 'F 4d 2 3 -1d'
_symmetry_space_group_name_H-M 'F d -3 m :1'
_cell_angle_alpha 90
_cell_angle_beta 90
_cell_angle_gamma 90
_cell_formula_units_Z 8
_cell_length_a 8.384
_cell_length_b 8.384
_cell_length_c 8.384
_cell_volume 589.3
_cod_original_sg_symbol_H-M 'F d -3 m S'
_cod_database_code 1010369
loop_
_symmetry_equiv_pos_as_xyz
x,y,z
y,z,x
z,x,y
x,z,y
y,x,z
z,y,x
x,-y,-z
y,-z,-x
z,-x,-y
x,-z,-y
y,-x,-z
z,-y,-x
-x,y,-z
-y,z,-x
-z,x,-y
-x,z,-y
-y,x,-z
-z,y,-x
-x,-y,z
-y,-z,x
-z,-x,y
-x,-z,y
-y,-x,z
-z,-y,x
1/4-x,1/4-y,1/4-z
1/4-y,1/4-z,1/4-x
1/4-z,1/4-x,1/4-y
1/4-x,1/4-z,1/4-y
1/4-y,1/4-x,1/4-z
1/4-z,1/4-y,1/4-x
1/4-x,1/4+y,1/4+z
1/4-y,1/4+z,1/4+x
1/4-z,1/4+x,1/4+y
1/4-x,1/4+z,1/4+y
1/4-y,1/4+x,1/4+z
1/4-z,1/4+y,1/4+x
1/4+x,1/4-y,1/4+z
1/4+y,1/4-z,1/4+x
1/4+z,1/4-x,1/4+y
1/4+x,1/4-z,1/4+y
1/4+y,1/4-x,1/4+z
1/4+z,1/4-y,1/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x,3/4+z
3/4+y,3/4-x,1/4+z
1/4+z,3/4-y,3/4+x
3/4+z,1/4-y,3/4+x
3/4+z,3/4-y,1/4+x
1/4+x,3/4+y,3/4-z
3/4+x,1/4+y,3/4-z
3/4+x,3/4+y,1/4-z
1/4+y,3/4+z,3/4-x
3/4+y,1/4+z,3/4-x
3/4+y,3/4+z,1/4-x
1/4+z,3/4+x,3/4-y
3/4+z,1/4+x,3/4-y
3/4+z,3/4+x,1/4-y
1/4+x,3/4+z,3/4-y
3/4+x,1/4+z,3/4-y
3/4+x,3/4+z,1/4-y
1/4+y,3/4+x,3/4-z
3/4+y,1/4+x,3/4-z
3/4+y,3/4+x,1/4-z
1/4+z,3/4+y,3/4-x
3/4+z,1/4+y,3/4-x
3/4+z,3/4+y,1/4-x
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_occupancy
_atom_site_attached_hydrogens
_atom_site_calc_flag
Fe1 Fe2+ 16 d 0.625 0.625 0.625 0.5 0 d
Fe2 Fe3+ 16 d 0.625 0.625 0.625 0.5 0 d
Fe3 Fe3+ 8 a 0. 0. 0. 1. 0 d
O1 O2- 32 e 0.375 0.375 0.375 1. 0 d
loop_
_atom_type_symbol
_atom_type_oxidation_number
Fe2+ 2.000
Fe3+ 3.000
O2- -2.000
loop_
_cod_related_entry_id
_cod_related_entry_database
_cod_related_entry_code
1 ChemSpider 4937312
30 changes: 30 additions & 0 deletions tests/fixtures/structures/LMT.cif
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# generated using pymatgen
data_LiMnTe2
_symmetry_space_group_name_H-M 'P 1'
_cell_length_a 4.31097682
_cell_length_b 4.31097682
_cell_length_c 5.22251802
_cell_angle_alpha 90.00000000
_cell_angle_beta 90.00000000
_cell_angle_gamma 120.00000000
_symmetry_Int_Tables_number 1
_chemical_formula_structural LiMnTe2
_chemical_formula_sum 'Li1 Mn1 Te2'
_cell_volume 84.05469084
_cell_formula_units_Z 1
loop_
_symmetry_equiv_pos_site_id
_symmetry_equiv_pos_as_xyz
1 'x, y, z'
loop_
_atom_site_type_symbol
_atom_site_label
_atom_site_symmetry_multiplicity
_atom_site_fract_x
_atom_site_fract_y
_atom_site_fract_z
_atom_site_occupancy
Mn Mn0 1 0.33333333 0.66666667 0.47975861 1.0
Te Te1 1 0.33333333 0.66666667 -0.01976285 1.0
Te Te2 1 0.66666667 0.33333333 0.45389956 1.0
Li Li3 1 -0.00000000 -0.00000000 0.73880468 1.0
28 changes: 28 additions & 0 deletions tests/fixtures/structures/MnCoS.cif
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
data_image0
_chemical_formula_structural MnCoS
_chemical_formula_sum "Mn1 Co1 S1"
_cell_length_a 4.02254
_cell_length_b 4.02254
_cell_length_c 4.02254
_cell_angle_alpha 60
_cell_angle_beta 60
_cell_angle_gamma 60

_space_group_name_H-M_alt "P 1"
_space_group_IT_number 1

loop_
_space_group_symop_operation_xyz
'x, y, z'

loop_
_atom_site_type_symbol
_atom_site_label
_atom_site_symmetry_multiplicity
_atom_site_fract_x
_atom_site_fract_y
_atom_site_fract_z
_atom_site_occupancy
Mn Mn1 1.0 0.00000 0.00000 0.00000 1.0000
Co Co1 1.0 0.75000 0.75000 0.75000 1.0000
S S1 1.0 0.50000 0.50000 0.50000 1.0000
Loading
Loading