ubermag / workshop Goto Github PK
View Code? Open in Web Editor NEWWorkshop: Micromagnetics with Ubermag
License: BSD 3-Clause "New" or "Revised" License
Workshop: Micromagnetics with Ubermag
License: BSD 3-Clause "New" or "Revised" License
Regarding spaces in Python, check out this page - it provides an explanation and compares with other languages: https://www.python-course.eu/python3_blocks.php
Hello Professor
I have a question. Do you create a manual for the ubermag? I want to see the meaning of term like rerr and other terms similar to it?? Thanks
This is done using mm.UniaxialAnisotropy
. If K>0, you have easy-axis, and if K<0 you have hard axis (easy-plane) anisotropy.
system.T
is temperature. However in micromagnetics we assume it is 0.
We plan making temperature available for some drivers in the future.
Yes, that is right.
Can you kindly discuss in the next session how one can use extension modules (CYY_STTEvolve specifically) in Ubermag . Also may be give a small demonstration of the same.
Thank You
Thank you for these workshops.
I have 2 questions.
Hi Marijan,
Thanks for the very interesting and informative lectures on Ubermag. I have a very small question, it can be some mistake done by me too.
In my case, when relaxing the vortex state without applying any external magnetic field at all why the vortex state is getting vanished and getting relaxed into a ferromagnetic state? I attach a picture for the same here too. I am not using the Binder and trying to do it in the Jupyter notebook from anaconda platform of my pc.
Hello Sir...... First of all thank you so much for these amazing Ubermag sessions .
I have followed the steps for installation of Docker in Windows 10 home :
Step 1.) Windows update to 2004 (update is available);
Step 2.) Enable : a.) Virtual machine platform;
b.) Windows Hypervisor Platform;
c.) Windows Subsystem for Linux;
Step 3.) Download and install the latest WSL2 Linux kernel;
Step 4.) Download and install Docker-Desktop.
Finally ....I have "Docker-Desktop" icon on my windows desktop.......But i don't further steps like:
1.) Requirement of Docker ID and Password is necessary to Run Docker.
2.) Which command is used to link it with Ubermag.
3.) Use of Docker-Dashboard Command w.r.t Ubermag.
I am attaching the initial Settings..... Please guide me for further steps and what i have to do next to attach it with Ubermag. Is your third session Docker Run command enough with these initial settings (as shown in attached word file) ?or I have to change some settings/options ........
Word File:
Thankyou
I have not seen this question in Zoom chat during the live session.
The licence is BSD-3-Clause. This basically means it is open-source, you can do whatever you want with it (use it, change the code, etc.). The only obligation you have is that you have to cite where the code comes from.
The details of the licence can be seen here: https://opensource.org/licenses/BSD-3-Clause
Is it then the same for running simulations in ubermag to define the geometry either region and using the saturation magnetisation, or the so called region is the total simulation space and the geometry is defined via the saturation magnetisation?
From the mathematical model, it should be possible to have the cell smaller than the atom spacing: it is a continuous representation anyway and doesn’t know about atoms. In practice, the simulations get very slow when the cell size becomes very small (as the ODEs get very stiff), and so for actual calculations I would not expect that a cell size smaller than the atom spacing is used. It should also not be necessary - if you need that resolution, you should change to an atomistic code (like Vampire or Fidimag) which simulates the atomic magnetic moments. A bit more advice is given at http://nmag.soton.ac.uk/nmag/current/manual/html/tutorial/doc.html#what-size-of-the-cells-fd-and-tetrahedra-fe-should-i-choose
Test question....
Hi @marijanbeg
I'm seeing that k3d is not plotting. I get the following output:
Plot(antialias=3, axes=['x', 'y', 'z'], axes_helper=1.0, background_color=16777215, camera=[2, -3, 0.2, 0.0, 0… Output()
I did the following:
conda update ubermag
jupyter nbextension install --py --sys-prefix k3d
jupyter nbextension enable --py --sys-prefix k3d
Jupypter nbextension reports the following.
(ubermag) C:\Users\<user>\Documents\cad_jay\ubermag>jupyter nbextension list Known nbextensions: config dir: C:\ProgramData\Miniconda3\etc\jupyter\nbconfig notebook section jupyter-js-widgets/extension enabled - Validating: problems found: - require? X jupyter-js-widgets/extension k3d/extension enabled
Would you suggest how to get k3d to plot?
No, you can set it us using fields as well. Please refer to tutorials.
I get the error "AttributeError: Object has no attribute k3d_vector" when I try to use k3d_vector in the tutorial notebooks. To try to fix this I have updated ubermag with "conda update ubermag" in the Anaconda powershell prompt and then restarted my computer, but I still get the error.
I also have issues with the Ubermag.test. I get 1 failure on test_overhead and 34 warnings. The test summary is pasted below:
=============================================== short test summary info ===============================================
FAILED tests/test_oommf.py::test_overhead - RuntimeError: Error in OOMMF run.
================== 1 failed, 288 passed, 1 skipped, 5 deselected, 34 warnings in 1712.56s (0:28:32) ===================
I'm not sure if these are two separate issues or if they are related in some way.
Thanks in advance!
Hi, I am posting this problem, because all notebooks so far worked fine on my Win10 machine (in a conda environment), except periodic-boundary-conditions.ipynb. The following error was raised:
I tried:
but unfortunately nothing worked. Any ideas?
I was just wondering if it is possible to specify an RKKY-type interaction within the micromagnetic model using ubermag (for example the Oxs_TwoSurfaceExchange in oommf). Thank you in advance
As we have shown during the introduction talk, magnetisation rotates in the plane which is perpendicular to vector D. The plane of rotation is basically the only difference between Bloch and Neel skyrmions.
Different materials have different type of DMI. Therefore bulk DMI materials host Bloch skyrmions and interfacial DMI materials host Neel-type skyrmions. This is just a result of the different atomic interactions. The equations are different, and if you work it out analytically for a simple case or computationally (with Ubermag or other packages), you find the different configurations minimise the energy for the different interactions.
So far all things were working well in following the instruction in the tutorial except i got a value error that trace back to the "T" crystal class is not supported in win32 ?? can u help me in the correcting this error.
error.pdf
Shape anisotropy is a consequence of demagnetisation (adding mm.Demag()
to the energy equation).
Hi Ubermag team,
Can we use HysteresisDriver() in ubermag like the one used in oommfc standard problem 1 on nano hub website? Or if there is another driver in ubremag? I tried HysteresisDriver() in ubremag but it says module 'oommfc' has no attribute 'HysteresisDriver'.
This is not directly possible, however, there are two possibilities you can consider:
discretisedfield.Mesh.point2index()
and discretisedfield.Mesh.index2point()
You can expose field as a numpy array (field.array
). After you expose it, you can index it as a numpy array.
Iterating through mesh indices can be achieved as:
for index in mesh.indices:
...
Dear sir
Today I am getting module not found error in import of micromagneticmode1.Sir please fix this problem.
email: [email protected]
Is it possible to track the progress of a simulation as it is running to tell how close it is to finishing? Similar to how you can use mmGraph to watch mxHxm or dm/dt in OOMMF
Jupyter was developed to provide a Mathematica like interface to Python, but otherwise no.
I installed Miniconda on my Windows 10 machine and get an error when running conda.
C:\ProgramData\Miniconda3\condabin>conda list Fatal Python error: initfsencoding: unable to load the file system codec File "C:\lyx-233\Python\Lib\encodings\__init__.py", line 123 raise CodecRegistryError,\
I have PyCell and and Lyx installed and think that Miniconda is finding these installs instead. I've tried adding C:\ProgramData\Miniconda3\condabin
to my PATH, to my PYTHONPATH and to my PYTHONHOME but none of these seem to help. Do anyone have suggestions on how to fix it?
Hans developed a semester long Python course aimed at 1st year undergraduates available at: https://fangohr.github.io/teaching/python/book.html which is a useful introduction to the language and some of the scientific libraries.
The python -c "import ubermag; ubermag.test()"
of the installation yields 79 errors.
It looks like the Tcl 8.6 version included with ubermag is some how different than the Tcl 8.6.10 installed with oommf for the first tutorial. Ubermag reports that tcl 8.6.9 was found and version 8.6.10 is required. The Tcl I installed with oommf is 8.6.10. It's more likely that a script couldn't find something and went looking for it in the Tcl path installed as part of the oommf install. The same thing happened with python script using the ubermag paths and then on the last trace going off to either the Lyx python path or the PyCellstudio path until I removed the path references in Path, PYTHONHOME, and PYTHONPATH. I removed the oommf tcl path and that cleared some of the errors.
Now there are 68 failures and they are associate with OSError errors about missing oommf, oommfc, and Docker. I look into that next.
Are there any directions on how to install minconda3 and ubermag on Windows 10 with existing installations of python (Lyx, PyCellStudio), and Tcl with details on how to set environmental and path variables? conda or python seems to want to find modules that are part of other installation and this causes version conflicts and errors. I'd prefer if ubermag had its own environmental variables that could set a specific context for the program(s).
Absolutely, you can write your own extension for Ubermag to drive a particular OOMMF extension.
Dear Ubermag team,
I am simulating a FM/AFM interlayer coupling material. In the process of simulation, I found that I need to set a negative interlayer exchange constant in AFM, but I don't seem to be able to make A < 0. Is there any way to solve this problem? in addition, I also found that the exchange energy density (Ai) in the model is defined in J / m ^ 2. How should I define this term? Can you help me solve this problem?
Dear sir
As in jupyter notebook we can see the mif file corresponding to input we insert. Sir Is there is any way to convert mif file into ipynb file.
Hello -
I know that vornoi plots can be used to model polycrystalline structure. Is there a way to implement this into ubermag? I have seen a paper on this for oommf, but I am not sure how to call the vornoi function in ubermag (https://go.gale.com/ps/anonymous?id=GALE%7CA199027902&sid=googleScholar&v=2.1&it=r&linkaccess=abs&issn=1044677X&p=AONE&sw=w).
Thank you for creating this library. I am really liking the package so far.
I followed the Youtube instructions to install miniconda3, on my Windows machine, then installed Ubermag, then created the ubermag-test directory, ran the test; it passed all tests.
After that, I was following instructions to start Jupyter Notebook from Anaconda by typing the suggested command
jupyter notebook &
Got an error message: The ampersand (& character ius not allowed. The & operator is reserved for future use; wrap an ampersand in double quotataion marks ("&") to pass it as part of a string.
I tried: jupyter notebook "&"
Got a different error message: No such file or directory C:\Users\Jaggi\ubermag-test&
Dear sir
Do you have any ipynb file related to skyrmionic structure simulation in synthetic antiferromagnet(like triple layerd structure).If possible, please attach it sir. Sir in layered structure(as you gave example of rkky interaction in last session) i am stuck in which region we should take intial magnetization to relax in skyrmion and all other things. If you already have then please send it sir otherwise no issue sir. Thanks a lot sir:
Hi @marijanbeg ,
How does Jupyter notebook paths work?
I copied index.ipynb to my ubermag directory ../ubermag
. I used GitDeskop, cloned the workshop repository to my computer, and copied the tutorial files to my ../ubermag/notebooks/
directory.
When I run the index.ipynb file from ../ubermag/ and click on the magnetization-field link I get a 404 error. The link goes to
http://localhost:8888/notebooks/magnetisation-field.ipynb`
When I go to my ../notebooks
directory the link shows http://localhost:8888/notebooks/notebooks/magnetisation-field.ipynb
. There seems to be a double notebooks in the path.
Dear sir
Please help me for this problem.I could not write equation of circle.
Email: [email protected]
Thanks sir for kind suport. Sir when i move forward, i got a huge number of errors when i want to do minimization of system energy by Mindriver.Sir please see it. I am beginer so i am facing such basic type of problem sir.
Email: [email protected]
I am using the cammand
md = mc.MinDriver()
md.drive(system)
system.m.plane('z').mpl()
when I press shift enter, it says docker was not found.
I donot know what I am doing wrong
Hello Sir..... I am installing ubermag using miniconda3 in windows 10. During reinstallation i faced issues while creating space (as already space is created in drive C) and failing of testing of some files like: mp1 and oommfrun . and many times jupytor is not recognized as external or internal command because of this i reinstalled this many times now i am facing testing failing problem and already created space creating problem. I have attached the word file contains screenshots.
waiting for your kind reply.
Thanks
Dear Ubermag team,
I would like to ask about whether you can add stress parameters to the simulation, and if so, can you tell me how, and then I see that you have also added RKKY coupling, will it be updated in the near future?
Is there any way we can define heterostructure and its behaviour? For example, ferromagnet/helimagnet/antiferromagnet, Also, how to define antiferromagnet in ubermag?
Hi, Sir. I am wondering if we can add mutiple UniaxialAnisotropy term in Ubermag. I tried this and it said just one UniaxialAnisotropy term was allowed. But as I know, in OOMMF, we can put as many as we want as long as they have different names. And I also tried put a name value in mm.UniaxialAnisotropy() but it seems to be invalid. So how can I add another UniaxialAnisotropy term in one system?
Thank you very much!
Hi Ubermag team,
I have a question related to the initial value in discretisedfield.Field. Why do we need to specify the initial value of magnetization if we want to minimize the energy and get the stable spin texture at the end? Like in vortex we started from the
This is a bit tricky. Each file has download option, but .ipynb
does not.
What you can do is to click Raw
. This opens a new tab with a notebook in raw format. Then you can save that page (Ctrl
+ S
) and remove .txt
extension which is added automatically.
Alternatively, you can:
zip
, orFile
-> Download
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.