Skip to content

Commit

Permalink
Merge branch 'main' into ph-initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
sphuber authored Jan 14, 2025
2 parents d940ddb + 41f196b commit 82931e6
Show file tree
Hide file tree
Showing 7 changed files with 961 additions and 15 deletions.
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/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
x,1/2+y,1/2+z
1/2+x,y,1/2+z
1/2+x,1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/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

0 comments on commit 82931e6

Please sign in to comment.