Skip to content

Commit

Permalink
fix typo orthor(''->h)ombic
Browse files Browse the repository at this point in the history
  • Loading branch information
janosh committed Nov 1, 2023
1 parent 6ddd38f commit f15f4b2
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 16 deletions.
21 changes: 11 additions & 10 deletions pymatgen/analysis/gb/grain.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,22 +333,23 @@ class GrainBoundaryGenerator:
Users can use structure matcher in pymatgen to get rid of the redundant structures.
"""

def __init__(self, initial_structure, symprec: float = 0.1, angle_tolerance=1):
def __init__(self, initial_structure: Structure, symprec: float = 0.1, angle_tolerance: float = 1) -> None:
"""
initial_structure (Structure): Initial input structure. It can
be conventional or primitive cell (primitive cell works for bcc and fcc).
For fcc and bcc, using conventional cell can lead to a non-primitive
grain boundary structure.
This code supplies Cubic, Tetragonal, Orthorhombic, Rhombohedral, and
Hexagonal systems.
symprec (float): Tolerance for symmetry finding. Defaults to 0.1 (the value used
Args:
initial_structure (Structure): Initial input structure. It can
be conventional or primitive cell (primitive cell works for bcc and fcc).
For fcc and bcc, using conventional cell can lead to a non-primitive
grain boundary structure.
This code supplies Cubic, Tetragonal, Orthorhombic, Rhombohedral, and
Hexagonal systems.
symprec (float): Tolerance for symmetry finding. Defaults to 0.1 (the value used
in Materials Project), which is for structures with slight deviations
from their proper atomic positions (e.g., structures relaxed with
electronic structure codes).
A smaller value of 0.01 is often used for properly refined
structures with atoms in the proper symmetry coordinates.
User should make sure the symmetry is what you want.
angle_tolerance (float): Angle tolerance for symmetry finding.
angle_tolerance (float): Angle tolerance for symmetry finding.
"""
analyzer = SpacegroupAnalyzer(initial_structure, symprec, angle_tolerance)
self.lat_type = analyzer.get_lattice_type()[0]
Expand Down Expand Up @@ -378,7 +379,7 @@ def __init__(self, initial_structure, symprec: float = 0.1, angle_tolerance=1):
# need to use primitive cell for rhombohedra
initial_structure = analyzer.get_primitive_standard_structure()
elif self.lat_type == "o":
# need to use the conventional cell for orthorombic
# need to use the conventional cell for orthorhombic
initial_structure = analyzer.get_conventional_standard_structure()
self.initial_structure = initial_structure

Expand Down
2 changes: 1 addition & 1 deletion pymatgen/symmetry/symm_ops.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pymatgen/symmetry/symm_ops.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24074,7 +24074,7 @@
- x+1/2,-y,z+1/2
- -x+1/2,-y,z+1/2
universal_h_m: P m c 21 (2*a,b,c)
- crystal_class: orthorombic
- crystal_class: orthorhombic
hall: ' C 2 -2 (1/2*z,x,y)'
hermann_mauguin: C m m 2
ncsym:
Expand Down
4 changes: 2 additions & 2 deletions tests/analysis/gb/test_grain.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,10 +241,10 @@ def test_get_ratio(self):
# tetragonal
Pa_ratio = self.GB_Pa.get_ratio(max_denominator=5)
assert Pa_ratio == [2, 3]
# orthorombic
# orthorhombic
Br_ratio = self.GB_Br.get_ratio(max_denominator=5)
assert Br_ratio == [21, 20, 5]
# orthorombic
# orthorhombic
Bi_ratio = self.GB_Bi.get_ratio(max_denominator=5)
assert Bi_ratio == [19, 5]

Expand Down
4 changes: 2 additions & 2 deletions tests/files/KPOINTS.band
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ORC (orthorombic) G-X-S-Y-G-Z-U-R-T-Z Y-T U-X S-R
16 ! 16 grids
ORC (orthorhombic) G-X-S-Y-G-Z-U-R-T-Z Y-T U-X S-R
16 ! 16 grids
Line-mode
reciprocal
0.000 0.000 0.000 ! \Gamma
Expand Down

0 comments on commit f15f4b2

Please sign in to comment.