Git Product home page Git Product logo

pymagcalc's Introduction

pyMagCalc

pyMagCalc (python for Magnon Calculations) calculates spin-wave excitations based on the linear spin-wave theory. The program is written in Python using SymPy. It was used to calculate spin-wave excitations in the kagome lattice antiferromagnet KFe3(OH)6(SO4)2, the non-reciprocal magnons in α-Cu2V2O7, and spin-waves excitations in Zn-doped Cu2V2O7.

Requirement:

  • Python3
    • SymPy
    • NumPy (1.x)
    • SciPy
    • Matplotlib
    • lmfit
    • tqdm

File Description:

  • magcalc.py: calculate the spin-wave dispersion and scattering intensity
  • disp_---.py: calculate and plot the spin-wave dispersion
  • EQmap_---.py: calculate and plot the intensity map as a function of energy and momentum
  • HKmap_---.py: calculate and plot the intensity map as a function of momenta
  • lmfit_---.py: fit the dispersion
  • spin_model.py: contains the information about the spin model used to calculate spin-waves by magcalc.py
  • data (folder): contain the neutron scattering data for KFe3(OH)6(SO4)2, α-Cu2V2O7, and Zn-doped Cu2V2O7

How to run the program:

In a terminal, run the following commands

$ export PYTHONPATH=<Path to magcalc.py>
$ cd <Path to Python files>
$ mkdir pckFiles

and then run, for example,

$ python3 disp_KFe3J.py

to calculate and plot spin-wave dispersion. You must first run disp_---.py to generate and store a matrix in a .pck file. The folder pckFiles contains auxiliary files used to store matrices and calculated intensity.

One has to edit spin_model.py for a different system.

Issues:

  • The code uses SymPy for symbolic manipulation and can be slow for a large system. We use multiprocessing for sympy.subs. It takes about a few minutes (on MacBook Pro M1 Pro) to generate a matrix for α-Cu2V2O7 with 16 spins in a magnetic unit cell.

pymagcalc's People

Contributors

kit-matan avatar kitmatan avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.