-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting Starting with Python #604
Comments
You can look at the scripts in the ui-python folder, for example this very basic LLG simulation script https://github.com/spirit-code/spirit/blob/master/ui-python/llg.py Also, please don't use The output can be configured through the input file or corresponding settings in the Python-API or you can write your own output files. |
Hello everyone. I am also a new user. I tried to build Spirit on Linux by using cmake but it didn't work out. Therefore I desided to install it with "pip install spirit" and run it with python script. The problem now is that I don't know how to run a calculation. Which is the executable? What should my input file be and how should I name it? I really sorry but I'm a bit confused. Best regards! |
Beginner tutorials are unfortunately still an open issue (see #542). @sfragkos could you please document what exactly didn't work? Note that installing the Python package gives you access to a Python module, not a GUI executable. You may also find the discussions in the related issues #573 and #571 helpful. |
Dear Mueller, Thank very much for answering! I finally made it. I installed it and it's very user friendly. Best regards. |
Hi, I have seen the updated list of Questions in Provide a Tutorial #542. Can you also add the following questions which I have, Why do we need an input file? from spirit import state, simulation Thanks |
Also, I am not sure where I can look for output, etc if I am using python. |
The input file provides a few features that are not available through the Python-API or the GUI, such as the configuration of your lattice's basis-cell. Otherwise you can choose what to use depending on your use-case and what seems more convenient to you.
Regarding Python-questions please make sure to read the documentation and see if that clears up your questions. In this case, you'll find the relevant API here: https://spirit-docs.readthedocs.io/en/latest/core/docs/python-api/parameters.html#spirit.parameters.llg.set_output_configuration
I don't understand your question. If you open one of the log files it should be clear what their purpose is. See also the corresponding docs for the config file and the PythonAPI |
Hi,
I am a new user here. Is it possible to have a simple example of how I can start with python and get the output using cluster?
I tried to run the code e.g.
def evaluate(p_state):
from spirit import system, quantities
M = quantities.get_magnetization(p_state)
E = system.get_energy(p_state)
return M, E
But don't know how to get output and spin texture etc. Also, what is p_state here?
The text was updated successfully, but these errors were encountered: