Regarding Checkpoint

34 views
Skip to first unread message

Vinod Naik Bhukya

unread,
Mar 17, 2026, 7:12:42 AMMar 17
to Vampire Users
Dear Vampire users,

I haven't used checkpoints yet, and would like to know what exactly does checkpoint stores. Is it only the spin configuration of all the layers in the material file? If initially i started with some spin configuration for all the layers and saved the checkpoint at the end of that simulation, and then use this checkpoint file to start a new simulation, then for the next simulation,  in the material file, do i need to remove all the code which defines the spin configuration of all the layers? Is that it?

Thank you. 


gabo...@gmail.com

unread,
Mar 19, 2026, 1:06:13 AMMar 19
to Vampire Users
I haven't used checkpoints yet, and would like to know what exactly does checkpoint stores. Is it only the spin configuration of all the layers in the material file?

The spin array is written to the .chk file.  VAMPIRE does seem to store more information than that though.  It looks like the details can be found in the save_checkpoint() function of the file checkpoint.cpp [1].

If initially i started with some spin configuration for all the layers

For example, material[1]:initial-spin-direction for one of the layers in the .mat file, where the initial-spin-direction is further described in the VAMPIRE 7.0 manual page 68 (pdf page 69) [2].
 
and saved the checkpoint at the end of that simulation,

The "sim:save-checkpoint=end" in the post [3].
 
and then use this checkpoint file to start a new simulation,

Here, you could comment out initial-spin-direction lines in the .mat file, if desired.
The "sim:load-checkpoint = restart" in the post [4].
 
then for the next simulation,  in the material file, do i need to remove all the code which defines the spin configuration of all the layers? Is that it?
 
You may comment out checkpoint lines like "sim:save-checkpoint=end" in the input file as talked about in the videos [5] and [6].

Vinod Naik Bhukya

unread,
Mar 19, 2026, 2:29:12 AMMar 19
to Vampire Users
Thank you so much. 

gabo...@gmail.com 在 2026年3月19日 星期四下午1:06:13 [UTC+8] 的信中寫道:

Gabriel Chaves

unread,
Mar 19, 2026, 3:41:47 AMMar 19
to gabo...@gmail.com, Vampire Users
I would like to follow up with a related question.
What's the status of other necessary things to be recovered?
A few years ago I had the following problem. 
I was generating a random configuration for the anisotropy axes at the beginning of the simulation.
While I was able to recover the spin state, I could not recover the anisotropy directions.
At that point my work stalled and I moved on to other problems.
What has been the changes with respect to this?
Thanks,
Gabriel.


--
You received this message because you are subscribed to the Google Groups "Vampire Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vampire-user...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/vampire-users/68fcb263-0867-49f4-b81b-d3dfb123bf99n%40googlegroups.com.


--
Gabriel D. Chaves-O'Flynn
Senior Lecturer
Institute of Molecular Physics
Polish Academy of Sciences

gabo...@gmail.com

unread,
Mar 20, 2026, 4:38:37 PM (14 days ago) Mar 20
to Vampire Users
I believe you are referring to the past post at [1] that mentions uniaxial anisotropy direction.

For that, if I was doing different calculations on the same alloy, I would probably keep the state of the uniaxial anisotropy unchanged by keeping the same uniaxial-anisotropy-direction line in the .mat file for each calculation.

For a different composition of the alloy, if it is known to change or if there is an expectation that the anisotropy will change, then the uniaxial-anisotropy-direction line in the .mat could be adjusted as needed in each calculation for a different composition.

For example:

Co1-xFex

The article [2] states "In hcp cobalt, the uniaxial anisotropy favors c-axis alignment".  Assuming also the c-axis is aligned in the z-direction, we could put in the .mat file for x = 0:

material[1]:uniaxial-anisotropy-direction=0,0,1

The article [3] states "We report an observation of uniaxial magnetic anisotropy along the [100] crystallographic direction in crystalline Fe film grown on Ge buffers deposited on a (001) GaAs substrate".  Assuming from at Fe (x =1) is aligned in the x-direction, we could put in the .mat file:

material[1]:uniaxial-anisotropy-direction=1,0,0

For other x or alloys, there may be experimental or theoretical papers that have been published for that.  I'm not sure of the practically of randomly generating uniaxial anisotropy directions, since you could potentially run into the issue with them not being fabricable in nature.

I'm thinking you could use a shell script if you wanted to do that though:

username@computername:~/Desktop/FM$ ls -l
total 12
-rw-r--r-- 1 username username  711 Mar 20 08:31 FM.mat
-rw-r--r-- 1 username username 1521 Mar 20 08:32 input
-rw-r--r-- 1 username username 1489 Mar 20 13:48 random_uniaxial_anisotropy.sh
username@computername:~/Desktop/FM$ grep uniaxial-anisotropy-direction FM.mat
material[1]:uniaxial-anisotropy-direction=0,1,0

Above, you can see that uniaxial anisotropy direction is in the y direction (0,1,0).

Attached is a script that uses a pseudo random number generator for the uniaxial anisotropy direction.  It should run with the following terminal commands:

username@computername:~/Desktop/FM$ chmod +x random_uniaxial_anisotropy.sh
username@computername:~/Desktop/FM$ dos2unix random_uniaxial_anisotropy.sh
dos2unix: converting file random_uniaxial_anisotropy.sh to Unix format...
username@computername:~/Desktop/FM$ ./random_uniaxial_anisotropy.sh
FM.mat should be updated with:
material[1]:uniaxial-anisotropy-direction=0.0419335727,0.0301204902,0.0419335727
The pseudo random number generation used:
x seed: 12345
y seed: 54321
z seed: 12345
username@computername:~/Desktop/FM$ grep uniaxial-anisotropy-direction FM.mat
material[1]:uniaxial-anisotropy-direction=0.0419335727,0.0301204902,0.0419335727

Above you should see that uniaxial anisotropy direction of 0,1,0 was changed to random numbers of 0.0419335727,0.0301204902,0.0419335727.

The pseudo random number generator has seed values that can be changed to get a different random number.  The seed values can be changed at the top of the file in a text editor such as gedit.  Below, the seed number is changed from 12345  to 11111 for the uniaxial anisotropy direction's z value:

username@computername:~/Desktop/FM$ gedit random_uniaxial_anisotropy.sh
seed.png
After running the script again, you should see that the z value changed from 0.0419335727 to 0.4664029613:

username@computername:~/Desktop/FM$ ./random_uniaxial_anisotropy.sh
FM.mat should be updated with:
material[1]:uniaxial-anisotropy-direction=0.0419335727,0.0301204902,0.4664029613
The pseudo random number generation used:
x seed: 12345
y seed: 54321
z seed: 11111
username@computername:~/Desktop/FM$ grep uniaxial-anisotropy-direction FM.mat
material[1]:uniaxial-anisotropy-direction=0.0419335727,0.0301204902,0.4664029613

Hope that helps.


Kind Regards,
Gavin
VAMPIRE user

random_uniaxial_anisotropy.sh
input
FM.mat
Reply all
Reply to author
Forward
0 new messages