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

Layout of DynamicalMatrix #831

Open
tfrederiksen opened this issue Sep 27, 2024 · 1 comment
Open

Layout of DynamicalMatrix #831

tfrederiksen opened this issue Sep 27, 2024 · 1 comment

Comments

@tfrederiksen
Copy link
Contributor

Currently, to construct the dynamical matrix one needs to assign orbitals to each atom to represent the spatial degrees of freedom. Here a simple example

import sisl

c = sisl.Atom("C", orbitals=(1, 2, 3))
g = sisl.geom.graphene(atoms=c)
dm = sisl.DynamicalMatrix(g)

for i in g:
    _, nn = g.close(i, R=(0.1, 1.6))
    for j in nn:
        dm[i, j] = [xx, xy, xz, yx, yy, yz, zx, zy, zz]
dm.apply_newton()

However, it would seem more intuitive if

  • the degrees of freedom associated to an atom in the geometry was not tied to orbitals (but, say, a different keyword dof=3)
  • the user could loop over the spatial degrees of freedom in a 4-vector form, i.e.
for k in range(dof):
    for l in range(dof):
        dm[i, j, k, l] = kl
@zerothi
Copy link
Owner

zerothi commented Sep 27, 2024

To add to this.

This could also be more intuitive for SOC matrices.

I.e.

H = sisl.Hamiltonian(..., spin="soc")
H[i, j, 0, 1] = # up-down

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants