Git Product home page Git Product logo

pyspinw's Introduction

pySpinW

WARNING - Work in progress.

A live demo can be found through Pangeos instance of Binder:

Binder

Summary

pySpinW (py-spin-double-u) is a python implementation of the MATLAB library SpinW. It can optimize magnetic structures using mean field theory and calculate spin wave dispersion and spin-spin correlation function for complex crystal and magnetic structures. For details see http://www.spinw.org

Status

This is currently under development and will progress in stages.

  1. Conversion to a compiled python library. Currently in testing
  2. Conversion of symmetry, atoms, matoms etc to python. In progress
  3. Conversion of graphics modules to native python using matplotlib/VTK.
  4. Migration of auxiliary code to pure python.
  5. Migration of main classes to pure python.
  6. Convert the core spinwave code to C++

Limitations

  • Currently graphics are not showing up in the Docker script.
  • The ipython interface is a bit clunky, until the ipython-magic is re-written
  • Maybe memory duplication, so not ideal for large datasets.

Install

There are 2 supported methods, Docker for a pre-built environment or a system install

Using Docker

Use the Docker file and docker-compose as it creates a stable environment.

docker-compose build

A jupyter notebook session is started with:

docker-compose up pySpinW

Where a session is accessible at http://127.0.0.1:8888 . At the moment notebook.ipynb is an example notebook.

You can also try scripting with:

docker-compose up testScript

It will execute docker_script.py

Notes

  • On Windows/OSX Xming or a similar window manager should be installed. Currently graphics are not working, so this is not a requirement.

Using system python3

Requirements

numpy and jupyter (if you want to run notebooks).

Usage

  • Correct MATLAB library paths have to be set.
  • To start a session mlPath for your MATLAB or MATLAB Runtime (v96) installation has to be given.

Then you can run host_script.py or make your own.

Notes

  • Using a conda environment crashes the interface, so it's not recommended.

Pull requests are welcome!

pyspinw's People

Contributors

wardsimon 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.