Re: [SIESTA-L] Restarting calculations with different spin orientations

2023-02-02 Por tôpico Andres Tellez Mora
Thank you, Nick.

I had used sisl previously and didn't know it could do that. I was able to
converge the other spin configurations without issues.

Best,
Andres.

On Wed, Feb 1, 2023 at 4:11 PM Nick Papior  wrote:

> Hi,
>
> You should be able to use sisl to rotate the spin-box matrices.
> sisl is a python tool aiding dft calculations and has a root in the siesta
> environment. 
> https://urldefense.com/v3/__https://github.com/zerothi/sisl__;!!D9dNQwwGXtA!SxJyOfo0c7E4r3CqXVdJ00u8p47cOpuD6_uLXukTlMd5FgcFugEdGNvPG4iDhYudDT06N4Vfyqf86NGymlI$
>  
> 
>
> For instance I would do something like this:
>
> import sisl as si
> fdf = si.get_sile("RUN.fdf")
> DM = fdf.read_density_matrix()
> DMrot = DM.spin_rotate([45, 30, 15])
> DMrot.write("siesta.DM")
>
> this will rotate the spin by 45 around x, 30 around y and 15 around z.
> Any feedback on this would be very much appreciated!
>
> So let me know how it works!
>
> Den tir. 31. jan. 2023 kl. 22.03 skrev Andres Tellez Mora <
> at00...@mix.wvu.edu>:
>
>> Dear Siesta users and developers.
>>
>> I am running calculations of the same structure with different spin
>> orientations. Since I am performing spin-orbit calculations with DFT+U,
>> they can take a decent amount of time to converge. Hence, I was trying to
>> use the .DM file of one of the calculations to start the others; however,
>> the DM.InitSpin block information is overridden and the calculation starts
>> using the same spin orientation from the converged .DM file. This even
>> happens when using a .DM file from a non-polarized calculation, which gives
>> a starting magnetization of 0.0. Is it possible to use the information of a
>> .DM file and start with a given spin orientation simultaneously? If this is
>> not possible, what else could I do to improve the convergence? I appreciate
>> any help you can provide.
>>
>> Best Regards,
>> Andres Tellez.
>>
>> --
>> SIESTA is supported by the Spanish Research Agency (AEI) and by the
>> European H2020 MaX Centre of Excellence 
>> (https://urldefense.com/v3/__http://www.max-centre.eu/__;!!D9dNQwwGXtA!SxJyOfo0c7E4r3CqXVdJ00u8p47cOpuD6_uLXukTlMd5FgcFugEdGNvPG4iDhYudDT06N4Vfyqf8YJI5B10$
>>  
>> 
>> )
>>
>
>
> --
> Kind regards Nick
>
> --
> SIESTA is supported by the Spanish Research Agency (AEI) and by the
> European H2020 MaX Centre of Excellence 
> (https://urldefense.com/v3/__http://www.max-centre.eu/__;!!D9dNQwwGXtA!SxJyOfo0c7E4r3CqXVdJ00u8p47cOpuD6_uLXukTlMd5FgcFugEdGNvPG4iDhYudDT06N4Vfyqf8YJI5B10$
>  )
>

-- 
SIESTA is supported by the Spanish Research Agency (AEI) and by the European 
H2020 MaX Centre of Excellence (http://www.max-centre.eu/)


Re: [SIESTA-L] Restarting calculations with different spin orientations

2023-02-01 Por tôpico Nick Papior
Hi,

You should be able to use sisl to rotate the spin-box matrices.
sisl is a python tool aiding dft calculations and has a root in the siesta
environment. 
https://urldefense.com/v3/__https://github.com/zerothi/sisl__;!!D9dNQwwGXtA!U063I_Qr34-kBiMp8zdrQCtf7Lnq_oz_i0SYauze1EBb0cUQ1Zu-GuxOPHvhrhN2eNz39Iez2wF77lrncQ$
 

For instance I would do something like this:

import sisl as si
fdf = si.get_sile("RUN.fdf")
DM = fdf.read_density_matrix()
DMrot = DM.spin_rotate([45, 30, 15])
DMrot.write("siesta.DM")

this will rotate the spin by 45 around x, 30 around y and 15 around z.
Any feedback on this would be very much appreciated!

So let me know how it works!

Den tir. 31. jan. 2023 kl. 22.03 skrev Andres Tellez Mora <
at00...@mix.wvu.edu>:

> Dear Siesta users and developers.
>
> I am running calculations of the same structure with different spin
> orientations. Since I am performing spin-orbit calculations with DFT+U,
> they can take a decent amount of time to converge. Hence, I was trying to
> use the .DM file of one of the calculations to start the others; however,
> the DM.InitSpin block information is overridden and the calculation starts
> using the same spin orientation from the converged .DM file. This even
> happens when using a .DM file from a non-polarized calculation, which gives
> a starting magnetization of 0.0. Is it possible to use the information of a
> .DM file and start with a given spin orientation simultaneously? If this is
> not possible, what else could I do to improve the convergence? I appreciate
> any help you can provide.
>
> Best Regards,
> Andres Tellez.
>
> --
> SIESTA is supported by the Spanish Research Agency (AEI) and by the
> European H2020 MaX Centre of Excellence 
> (https://urldefense.com/v3/__http://www.max-centre.eu/__;!!D9dNQwwGXtA!U063I_Qr34-kBiMp8zdrQCtf7Lnq_oz_i0SYauze1EBb0cUQ1Zu-GuxOPHvhrhN2eNz39Iez2wFdPHAwqg$
>  )
>


-- 
Kind regards Nick

-- 
SIESTA is supported by the Spanish Research Agency (AEI) and by the European 
H2020 MaX Centre of Excellence (http://www.max-centre.eu/)


Re: [SIESTA-L] Restarting calculations with different spin orientations

2023-02-01 Por tôpico Andrei Postnikov
Dear Andres Tellez, 
my DMtune tool was written having similar tasks in mind; 
please feel free to download it from 
[ 
https://urldefense.com/v3/__https://www.home.uni-osnabrueck.de/apostnik/download.html__;!!D9dNQwwGXtA!UOZi7W_dTZOE_UPIXqgD4MdGacy1Fx8Kvs3HymrL_qKWalh8UtdNSwuKc4JOVzfzoPLVLIAZ5uHSbQoT-gAurVYvIzKoJQhPng$
  | 
https://urldefense.com/v3/__https://www.home.uni-osnabrueck.de/apostnik/download.html__;!!D9dNQwwGXtA!UOZi7W_dTZOE_UPIXqgD4MdGacy1Fx8Kvs3HymrL_qKWalh8UtdNSwuKc4JOVzfzoPLVLIAZ5uHSbQoT-gAurVYvIzKoJQhPng$
  ] 
and test whether it still works and applies to your case. 
There is no special documentation, but minimal explanations are included 
at the beginning of the source file dmtune.f. 
In case of problems it should not be difficult to modify, or pass me a word 
(with an example), I'll try to update. 

Best regards 

Andrei Postnikov 

- Le 31 Jan 23, à 18:14, Andres Tellez Mora  a écrit : 

> Dear Siesta users and developers.

> I am running calculations of the same structure with different spin
> orientations. Since I am performing spin-orbit calculations with DFT+U, they
> can take a decent amount of time to converge. Hence, I was trying to use the
> .DM file of one of the calculations to start the others; however, the
> DM.InitSpin block information is overridden and the calculation starts using
> the same spin orientation from the converged .DM file. This even happens when
> using a .DM file from a non-polarized calculation, which gives a starting
> magnetization of 0.0. Is it possible to use the information of a .DM file and
> start with a given spin orientation simultaneously? If this is not possible,
> what else could I do to improve the convergence? I appreciate any help you can
> provide.

> Best Regards,
> Andres Tellez.

> --
> SIESTA is supported by the Spanish Research Agency (AEI) and by the European
> H2020 MaX Centre of Excellence 
> (https://urldefense.com/v3/__http://www.max-centre.eu/__;!!D9dNQwwGXtA!UOZi7W_dTZOE_UPIXqgD4MdGacy1Fx8Kvs3HymrL_qKWalh8UtdNSwuKc4JOVzfzoPLVLIAZ5uHSbQoT-gAurVYvIzK9M_8LNA$
>  )

-- 
SIESTA is supported by the Spanish Research Agency (AEI) and by the European 
H2020 MaX Centre of Excellence (http://www.max-centre.eu/)