spirit-code / spirit

Atomistic Spin Simulation Framework
http://spirit-code.github.io
MIT License
117 stars 52 forks source link

Problem when I run ./spirit , #571

Closed Abdou137 closed 3 years ago

Abdou137 commented 4 years ago

Dear all, while I was trying to run spirit (using ./spirit) , it gave me the following error : Screenshot from 2020-07-10 16-10-30 I tried to inactivate cuda option , but it still gives the same problem

Thank you very much for your help in advance with nice regards

MSallermann commented 4 years ago

Hi, a few things, which would be good to know:

Lastly, if you fully disable the cuda compile option this error should not occur. Try this: Run the ./clean.sh script from the spirit root folder and in your build folder pass the SPIRIT_USE_CUDA=OFF option to cmake. This should make the error disappear ... Overall it should look something like this:

./clean.sh
cd build
cmake .. -DSPIRIT_USE_CUDA=OFF
make
Abdou137 commented 4 years ago

Dear MSallermann, Thank you very much , yes indeed the previous error disapear by using (./clear.sh) But still I ca't launch the GUI , I thought using ./spirit , but this is what is gives : 1

Thank you very much for your help with nice regards

MSallermann commented 4 years ago

The problem seem to be the localization settings. The decimal separator in the cardinal vectors is a comma instead of a point. A very similar bug was fixed some time ago: https://github.com/spirit-code/spirit/commit/175e05697b81d7612bde0f5e5a88aa4b87e7de68. Can you please give me the exact version of the code you are using? Best would be the hash of the current commit. (The result of git rev-parse HEAD)

Abdou137 commented 4 years ago

thank you very much , I extracted it from a master what should I do exactly to fix the problem now?

MSallermann commented 4 years ago

Can you please upload the logfile spirit produces when you start it? In the meantime you could try to checkout the develop branch and see if the problem persists.

Abdou137 commented 4 years ago

I guess this is the file you asked - please correct me if I am wrong - : Log_2020-07-11_20-55-19.txt thank you very much sir

Abdou137 commented 4 years ago

Dear Sir,

it gives: error: pathspec 'develop' did not match any file(s) known to git.

it gives: fatal: 'origin/develop' is not a commit and a branch 'develop' cannot be created from it

thank you very much with best regards

GPMueller commented 4 years ago

That last one should have worked, I just tried it to make sure and got this:

$ git clone https://github.com/spirit-code/spirit spirit-gittest
Cloning into 'spirit-gittest'...
remote: Enumerating objects: 605, done.
remote: Counting objects: 100% (605/605), done.
remote: Compressing objects: 100% (415/415), done.
remote: Total 24362 (delta 297), reused 443 (delta 179), pack-reused 23757
Receiving objects: 100% (24362/24362), 25.85 MiB | 4.84 MiB/s, done.
Resolving deltas: 100% (17117/17117), done.
$ cd spirit-gittest
$ git checkout --track origin/develop
Branch 'develop' set up to track remote branch 'develop' from 'origin'.
Switched to a new branch 'develop'

So everything as expected...

If you cannot figure out how to do it with git, you can also download the develop branch sources from GH by selecting the develop branch https://github.com/spirit-code/spirit/tree/develop and then downloading the sources as a zip.

Abdou137 commented 4 years ago

Dear GPMueller, Thank you very much for your feedback , I have a couple of questions: -Is there any tutorials ? -Is there possibility to build hexagonal grid or only square one is possible for the moments ?
Thank you very much best regards

GPMueller commented 4 years ago

You can find documentation here: https://spirit-docs.readthedocs.io where it is described how to set a hexagonal lattice in the input file. There is only a basic description of the GUI there, but you should be able to figure things out by looking at the keybindings of the GUI (press F1 to show them) and playing around with it.

You can also find some examples of using the Python API here: https://github.com/spirit-code/spirit/tree/develop/ui-python

Abdou137 commented 4 years ago

Dear GPMueller, I want to create a domain wall, so I want to subdivided the lattice into two regions, spins of each reagion are oriented deifferently, how one could do so? Currently, when I ask 'create domain' , it applies to all the net: is there a way to subdivided the lattice into regions and control spins in each region?

In another issue, when I create hexagonal lattice 'hex2d' or 'hex2d60', it doesn't show perfectly equilateral hexagons.

Thank you very much for your feedback , Thank you very much best regards

MSallermann commented 4 years ago

There is a panel in the configurations tab where you can select options for how the configurations are applied, these correspond to the arguments passed to the API functions. In the screenshot below I created a -z and a +z domain in a 100x100 lattice.

image

What does it show for a hex2d lattice? I get this, which looks fine I think.

image
Abdou137 commented 4 years ago

Dear all, thank you very much for your nice reply, I highly appreciate it , How one calculate the hysteresis curves of a 2D square , hexagonal and honeycomb lattice using Spirit ? Thank you very much for your feedback , Thank you very much Nice regards

MSallermann commented 4 years ago

You should script it in python https://docs.python.org/3/reference/ Full API reference: https://spirit-docs.readthedocs.io/en/latest/core/docs/python-api/API_Reference.html Setting the lattice: https://spirit-docs.readthedocs.io/en/latest/core/docs/Input.html Setting the field: https://spirit-docs.readthedocs.io/en/latest/core/docs/python-api/spirit.hamiltonian.html Minimizing the energy: https://spirit-docs.readthedocs.io/en/latest/core/docs/python-api/spirit.simulation.html Reading out the magnetization: https://spirit-docs.readthedocs.io/en/latest/core/docs/python-api/spirit.quantities.html You can also take a look at the examples in the spirit/ui-python folder

Abdou137 commented 3 years ago

Dear all, the problem insists , the OS is Ubuntu 18.04.4 LTS , however the spirit old version 1.8.8 works well. I attached a screen shot Thank you very much for your feedback , Thank you very much Nice regards 87231703-adc5aa00-c3b9-11ea-8033-aeca1a539a31

GPMueller commented 3 years ago

Please try adding the line std::locale::global(std::locale::classic()); at the top of the function SpinWidget::getColormapRotationInverted in SpinWidget.cpp. This should set the classic C locale for the std::to_string calls right before they are used, i.e. instead of something like vec3 cardinal_a = vec3(0,0000, 0,0000, 0,0000); you should get vec3 cardinal_a = vec3(0.0000, 0.0000, 0.0000);.

I am quite surprised you have this issue at all, since in Germany we also have a locale with decimal , and we have not observed this issue since we applied the bugfix commit 175e05697b81d7612bde0f5e5a88aa4b87e7de68.

Abdou137 commented 3 years ago

Dear GPMueller, I followed your instructions, it seems that works, I installed the last version of spirit-2.0.1 .

Thank you very much Nice regards

Abdou137 commented 3 years ago

Dear all, when I tried to edit cfg file (for example to go from simple cubic to honeycome), spirit doesn't accept the new file , it gives the folwoing message: Screenshot from 2020-07-26 19-10-16

Thank you very much best regards

GPMueller commented 3 years ago

Ok, what is your issue?

Abdou137 commented 3 years ago

How ones load cfg files in such cases ? Is it a problem in the code inside ? I already reset the system , and looked in the log file : nothing particular I wanted to make honeycomb lattice

GPMueller commented 3 years ago

Instead of loading the cfg file from the GUI, please try to call ./spirit -f /path/to/your/config.cfg, which should start the GUI with that config directly.

I think only two cases when loading a config from the GUI are currently not clearly logged:

  1. if you try to change the number of spins (e.g. your system is 100x100x1 and the cfg specifies 50x50x10) - probably this is the case?
  2. if you try to change the Hamiltonian type (e.g. your system is using a Heisenberg Hamiltonian but your cfg specified hamiltonian gaussian) - I doubt you're doing that?

I have created issue #572 to track the missing log messages.

If the above did not help, please set your log file level to debug (in the .cfg file with which you are starting, set log_file_level 6 or call the Log_Set_Output_To_File function in your main.cpp) and check the log again. If still nothing suspicious appears in the log, please attach the config you are trying to load, as well as the corresponding log file to this issue.

Abdou137 commented 3 years ago

Dear Mr.Muller, thank you very much for your help, indeed using './spirit -f /path/to/your/config.cfg' , it works, you said " your system is using a Heisenberg Hamiltonian but your cfg specified....": but Is not with config file we specify the system ?

Using hex2d it gives the following lattice, which doesn't seem to be perfectly hexagonal
Screenshot from 2020-07-26 22-52-26 Thank you very much best regards

MSallermann commented 3 years ago

You are trying to create a honeycomb lattice? Try this configuration

bravais_lattice hex2d
basis
2
0   0   0
0.333 0.333 0

The basis positions are specified in multiples of the bravais vectors. I see that the example in the documentation is wrong.

Abdou137 commented 3 years ago

Dear Mr. Muller, Thank you very much for your help and feedback, I highly appreciate it.

Abdou137 commented 3 years ago

Thank you very much for any help or clarification with nice regards

GPMueller commented 3 years ago

but these terms (Dijx Dijy Dijz ) seem to be auto-filled, they seem to be the components of unity vector along the line connecting the two sites

You can specify the DMI vectors either directly or as magnitude and normal. In both cases, the internal representation is as magnitude and normal, which is why you're seeing normalized vectors.

i and j are the indices of the interacting atoms in their respective basis cells (if you have only one atom in the basis, both should always be 0). da etc. are the basis cell translations between the interacting atoms. For quadruplets, it is the same but with more indices of course.

If you want to specify neighbour shells, I would recommend that you use hamiltonian heisenberg_neighbours, as described in the documentation, unless you have some reason to specify the pairs individually, like DMI vectors that are neither aligned with or orthogonal to the bonds.

but why there is three sites ?

because the quadruplet interaction involves four sites in total. This interaction is described in the paper about Spirit. What do you want to use it for?

Abdou137 commented 3 years ago

"because the quadruplet interaction involves four sites in total. This interaction is described in the paper about Spirit. What do you want to use it for?" So, so you gave the indices of the three other sites, and the initial site is i whose da_i =0, db_i= 0, dc_i= 0 by default ? and they should't be 5 sites ? the site i in the centre, one site above , one down, one right , and one left in 2D square lattice?

Thank you very much for any help or clarification with nice regards

GPMueller commented 3 years ago

First of all, this thread has become too long to be helpful for other people to read through, if they encounter similar problems. Please create a new issue if you have a different topic to discuss than the one you started with.


Regarding your questions about indices: in Spirit, the lattice is generated by repeating basis cells. For this reason, interactions are specified for the first basis cell of the lattice, i.e. relative to it, and are automatically repeated over the lattice. Due to the symmetry in 2D, you only need two pairs and translating those across the lattice will cover everything:

o    o    o

o    o    o
|
o -- o    o

(the same goes for other basis cells and analogously for 3D of course)

You cannot leave out d_k and d_l I believe.


Rx is explained in the paper, as well (in the section on the GNEB method). Note that you only have one image in your chain.


I think that depends on the methods and solver

That is exactly the case. You should not be surprised that the GNEB method does not do anything if you only have one image in your chain.

Regarding the configurations, you would need to be more specific for us to help you.


sometimes I modified the cfg file ( from sc to hc lattice for instance) , and then I tried to load the configuration file , but it gave this error message Taking into consideration that I never change neither the number of spins, nor the Hamiltonian type.

You actually cannot change the geometry at all in this process, including the Bravais vectors. Just restart spirit, using the new config file with spirit -f ...

The GUI does not display the pairwise interactions, if you entered them as pairs. The GUI only understands neighbour shells (i.e. heisenberg_neighbours in the input file).


how one defines the hexagonal lattice

In what way were our previous answers relating to the hexagonal lattice unclear?


By the way, I think your colormap is not working as expected, because the "cardinal axis" is set to 0 0 0 in the visualisation settings. This is a bug when updating from an old version of spirit (related: issue #521).

GPMueller commented 3 years ago

Closing due to inactivity. Please open specific issues if you have new questions.

Abdou137 commented 3 years ago

Dear Dr G.Muller, Is there any possibilty to study bilayers systems using future versions of Spirit? Thank you very much for your attention With Best A. Dabdoub

Le jeu. 8 avr. 2021 à 23:17, G. P. Müller @.***> a écrit :

Closed #571 https://github.com/spirit-code/spirit/issues/571.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/spirit-code/spirit/issues/571#event-4571183863, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQH7ZQGFIQAO7FU63PDTOETTHYMNPANCNFSM4OXKXIUQ .

GPMueller commented 3 years ago

Dear @Abdou137, as I wrote before, please open specific issues for additional questions. It would be nice to keep each issue on topic.

That being said, I don't see what you would be missing in order to study bilayers.