mailhexu / TB2J

a python package for computing magnetic interaction parameters
BSD 2-Clause "Simplified" License
67 stars 29 forks source link

Desired improvements #55

Closed lyonworton closed 2 months ago

lyonworton commented 3 months ago

I hope that when calculating spin waves it can be changed to setting the coordinates of the K points yourself, instead of by high symmetry point names, because the positions of some points that one wants to calculate are not in the fields given.

mailhexu commented 2 months ago

Actually this is implemented. You can call the python API by using something like this:

From TB2J.plot import plot_magnon_band
 plot_magnon_band(
    fname="exchange.xml",
    path="./",
    npoints=301,
    show=True,
    kvectors=[[0,0,0], [0.5, 0,0], [0.5,0.5,0.5]],
    knames=["GXR"],
    figfname="magnon_band.pdf",
    supercell_matrix=np.eye(3),
    Jq=False,
    kpath_fname="exchange_kpth.txt",
    ax=None,
)

you can specify the names (knames) and the coordinates (kvectors) . Best regards, HeXu