Z2PackDev / symmetry_representation

Describing and constructing symmetry operations and their representations.
https://symmetry-representation.greschd.ch
Apache License 2.0
6 stars 4 forks source link

WS2, D3h - E' irrep: problems with dxy and dx^2-y^2 #3

Closed ghost closed 4 years ago

ghost commented 5 years ago

Dominik, thank you very much for this great module. I encounter a problem, when looking at a transition metal dichalcogenide, e.g WS2, where the basis is formed from dz2, dxy, and dx^2-y^2 orbitals, which should be complete (compare PRB 88, 085433 (2013)).

The number of symmetry operations is correctly found to be 12, (see http://symmetry.jacobs-university.de/cgi-bin/group.cgi?group=603&option=4), but I encounter a ValueError if I try to get the representation matrices:

ValueError: Norm 0.6614378277661367 of vector [ 2.10399167e-14+0.j -5.00000000e-01+0.j -4.33012702e-01+0.j] for expression (-0.5*x - 0.8660254037845*y)*(0.866025403784377*x - 0.5*y) created from orbital Orbital(function=x*y, function_string='x * y', position=array([0., 0., 0.]), spin=Spin(total=Fraction(0, 1), z_component=Fraction(0, 1))) is not one.

So it looks like there is a problem with the transformation of the xy and x^2-y2 orbitals.

Minimal example:

import numpy as np
import pymatgen as mg
from pymatgen.symmetry import analyzer

import symmetry_representation as sr

pos_W = (0., 0., 0.)
pos_S1 = (2 / 3., 1 / 3., 0.064505188)
pos_S2 = (2 / 3., 1 / 3., -0.064505188)

bravais = np.array([[3.1804640395316572, 0.0000000000000000, 0.0000000000000000],
                    [-1.5902320197658286, 2.7543626540574855, 0.0000000000000000],
                    [0.0000000000000000, 0.0000000000000000, 25.0036481095256136]])

structure = mg.Structure(
    lattice=bravais,
    species=['W', 'S', 'S'],
    coords=np.array([pos_W, pos_S1, pos_S2])
)

ana = analyzer.SpacegroupAnalyzer(structure)
sym_ops = ana.get_symmetry_operations(cartesian=False)
sym_ops_cart = ana.get_symmetry_operations(cartesian=True)

orbitals = []

orbitals.extend([
    sr.Orbital(position=pos_W, function_string='z ** 2')
])
orbitals.extend([
    sr.Orbital(position=pos_W, function_string='x * y')
])
orbitals.extend([
    sr.Orbital(position=pos_W, function_string='x ** 2 - y ** 2')
])

print(orbitals)
symmetry_group = sr.SymmetryGroup(
    symmetries=[
        sr.SymmetryOperation.from_orbitals(
            orbitals=orbitals,
            real_space_operator=sr.RealSpaceOperator.
                from_pymatgen(sym_reduced),
            rotation_matrix_cartesian=sym_cart.rotation_matrix,
            numeric=True
        ) for sym_reduced, sym_cart in zip(sym_ops, sym_ops_cart)
    ],
    full_group=False
)
ghost commented 5 years ago

This looks like a normalization problem, putting 2 * x * y instead, solves the problem. An automatic normalization would be nice.

greschd commented 5 years ago

Agree, it would be. I'll keep the issue open to remind myself.

AChEphys commented 5 years ago

Hi greschd, I encountered the same problem. I was using d orbitals for iron atoms, but it just kept bumping norm errors for z**2 or others. Could you please kindly fix this? Or is there a workaround? Replacing it with 2*(z**2) didn't solve the problem.

greschd commented 5 years ago

@AChEphys since the orbital shape can in be an arbitrary function of x, y, z, it's not straightforward how they should be normalized in the general case.

If you're encountering this issue even after manually ensuring that your orbital functions are normalized, it might be that the basis of orbitals used is not complete w.r.t. the symmetry operations. As a simple example, a px orbital might be mapped onto py, but that orbital does not exist in the given basis.

The issue described above should be fixable by manually ensuring that the basis functions have the same norm.