Skip to content

Layout of DynamicalMatrix #831

Open
Open
@tfrederiksen

Description

@tfrederiksen

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions