Hysterisis loop

144 views
Skip to first unread message

Rifqi Ardiyansyah

unread,
Dec 10, 2025, 8:01:45 PM12/10/25
to Vampire Users
Greetings from the Vampire Group
I'm Rifqi Ardiyansyah, a physics student currently conducting research on CoFe2O4 inverse spinel. I'm confused about how to simulate a hysteresis curve. I've created the input file and the mat file. Could you please correct me? Is this correct?

Best regards from Rifqi Ardiyansyah
CoFe2O4.mat
input

gabo...@gmail.com

unread,
Dec 11, 2025, 12:41:40 AM12/11/25
to Vampire Users
With regards to the hysteresis curve calculation, I suggest starting with less loop-time-steps, a higher maximum-applied-field-strength, and a larger applied-field-strength-increment before you increase, lower, and make smaller, respectively.  With the faster computation and wider window, it can help to pinpoint -/+ Hc for then making a narrower window around the loop.

Attached as an example is the input file adjusted to have less loop-time-steps, a higher maximum-applied-field-strength, and a larger applied-field-strength-increment then what you had in the previously posted input file.  The CoFe2O4.mat that you previously was used as is.  From the plot, it looks like the applied field needs to be more than about 20 T in your case to see Hc:

username@computername:~/Desktop/CoFe2O4$ ls -l
total 12
-rw-r--r-- 1 username username 2330 Dec 10 14:35 CoFe2O4.mat
-rw-r--r-- 1 username username 1287 Dec 10 21:58 input
-rw-r--r-- 1 username username   72 Dec 10 21:49 mzVsHplot.gnu
username@computername:~/Desktop/CoFe2O4$ vampire-serial
                                                _          
                                               (_)        
                    __   ____ _ _ __ ___  _ __  _ _ __ ___
                    \ \ / / _` | '_ ` _ \| '_ \| | '__/ _ \
                     \ V / (_| | | | | | | |_) | | | |  __/
                      \_/ \__,_|_| |_| |_| .__/|_|_|  \___|
                                         | |              
                                         |_|              

                      Version 7.0.0 Dec 27 2023 21:29:33

             Git commit: fd9de813cab95bc2b2837122bd03f0238a5d2d76

  Licensed under the GNU Public License(v2). See licence file for details.

  Developers:   Richard F L Evans, Sarah Jenkins, Andrea Meo,
                Daniel Meilak, Andrew Naden, Matthew Ellis,
                Oscar Arbelaez, Sam Morris, Rory Pond, Weijia Fan,
                Phanwadee Chureemart, Pawel Sobieszczyk, Joe Barker,
                Thomas Ostler, Andreas Biternas, Roy W Chantrell,
                Wu Hong-Ye, Razvan Ababei, Sam Westmoreland,
                Milton Persson
 
                Compiled with:  GNU C++ Compiler
                Compiler Flags:

  Vampire includes a copy of the qhull library from C.B. Barber and The
  Geometry Center and may be obtained via http from www.qhull.org.

================================================================================
Wed Dec 10 21:58:43 2025
================================================================================
Initialising system variables
Creating system
Generating neighbour list..........done!
Copying system data to optimised data structures.
Using generic/normalised form of exchange interaction with 1408 total interactions.
Number of atoms generated: 5184
Starting Simulation with Program Hysteresis-Loop...
Simulation run time [s]: 1291.37
Simulation ended gracefully.
username@computername:~/Desktop/CoFe2O4$ gnuplot --persist mzVsHplot.gnu

mzVsHplot.png

With regards to the material structure, I didn't check the correctness of it.

Kind Regards,
Gavin
VAMPIRE user
mzVsHplot.gnu
input

Rifqi Ardiyansyah

unread,
Dec 11, 2025, 1:15:43 AM12/11/25
to Vampire Users
Thanks for the answer but I plotted it using python and the result is like thishisterisis.png
and this is close to the existing theory about Hc.
But thank you for the correction. I would also like to ask for your help in checking my mat file to see if it matches the inverse spinel and how to determine its Tc.
Thank You

Best regards from Rifqi Ardiyansyah

gabo...@gmail.com

unread,
Dec 12, 2025, 6:44:17 PM12/12/25
to Vampire Users
Regarding the mat file, you are probably aware that the atoms in an ideal inverse spinel (CoFe2O4) looks like this:
Ideal_CoFe2O4.png
Reference for the Fe2CoO4_mp-34501_conventional_standard.cif is [1].

With CoFe2O4.mat from [2] and the attached input file, the following was ran:

username@computername :~/CoFe2O4$ vampire-serial

                                                _          
                                               (_)        
                    __   ____ _ _ __ ___  _ __  _ _ __ ___
                    \ \ / / _` | '_ ` _ \| '_ \| | '__/ _ \
                     \ V / (_| | | | | | | |_) | | | |  __/
                      \_/ \__,_|_| |_| |_| .__/|_|_|  \___|
                                         | |              
                                         |_|              

                      Version 7.0.0 Dec 12 2025 07:42:48

             Git commit:

  Licensed under the GNU Public License(v2). See licence file for details.

  Developers:   Richard F L Evans, Sarah Jenkins, Andrea Meo,
                Daniel Meilak, Andrew Naden, Matthew Ellis,
                Oscar Arbelaez, Sam Morris, Rory Pond, Weijia Fan,
                Phanwadee Chureemart, Pawel Sobieszczyk, Joe Barker,
                Thomas Ostler, Andreas Biternas, Roy W Chantrell,
                Wu Hong-Ye, Razvan Ababei, Sam Westmoreland,
                Milton Persson
 
                Compiled with:  GNU C++ Compiler
                Compiler Flags:

  Vampire includes a copy of the qhull library from C.B. Barber and The
  Geometry Center and may be obtained via http from www.qhull.org.

================================================================================
Fri Dec 12 09:25:45 2025

================================================================================
Initialising system variables
Creating system
Generating neighbour list..........done!
Copying system data to optimised data structures.
Using generic/normalised form of exchange interaction with 1408 total interactions.
Number of atoms generated: 5184
Starting Simulation with Program Curie-Temperature...
Simulation run time [s]: 520.81
Monte Carlo statistics:
Total moves: 4250880000
50.7083% Accepted
49.2917% Rejected
Simulation ended gracefully.
username@computername :~/CoFe2O4$ ~/vampire/util/vdc/vdc --xyz
|------------------------------------------------------------|
|              Vampire Data Converter for v5+                |
|------------------------------------------------------------|
Processing snapshot 00000000
...
Processing snapshot 00000040
username@computername:~/CoFe2O4$ rasmol -xyz crystal.xyz

The arrangement of atoms looks wrong when compared to the previously visualized cif:

CoFe2O4.png
Note: Yellow is Fe and pink is Co.

The attached CoFe2O4.mat was constructed using what R. Evans posted at [3].  Then, using the same attached input file as before, the following was ran:

username@computername :~/CoFe2O4evans$ ls -l
total 8
-rw-r--r--. 1 username username 2816 Dec 12 09:38 CoFe2O4.mat
-rw-r--r--. 1 username username 1436 Dec 12 09:23 input
username@computername:~/CoFe2O4evans$ vampire-serial

                                                _          
                                               (_)        
                    __   ____ _ _ __ ___  _ __  _ _ __ ___
                    \ \ / / _` | '_ ` _ \| '_ \| | '__/ _ \
                     \ V / (_| | | | | | | |_) | | | |  __/
                      \_/ \__,_|_| |_| |_| .__/|_|_|  \___|
                                         | |              
                                         |_|              

                      Version 7.0.0 Dec 12 2025 07:42:48

             Git commit:

  Licensed under the GNU Public License(v2). See licence file for details.

  Developers:   Richard F L Evans, Sarah Jenkins, Andrea Meo,
                Daniel Meilak, Andrew Naden, Matthew Ellis,
                Oscar Arbelaez, Sam Morris, Rory Pond, Weijia Fan,
                Phanwadee Chureemart, Pawel Sobieszczyk, Joe Barker,
                Thomas Ostler, Andreas Biternas, Roy W Chantrell,
                Wu Hong-Ye, Razvan Ababei, Sam Westmoreland,
                Milton Persson
 
                Compiled with:  GNU C++ Compiler
                Compiler Flags:

  Vampire includes a copy of the qhull library from C.B. Barber and The
  Geometry Center and may be obtained via http from www.qhull.org.

================================================================================
Fri Dec 12 09:42:39 2025

================================================================================
Initialising system variables
Creating system
Generating neighbour list..........done!
Copying system data to optimised data structures.
Using generic/normalised form of exchange interaction with 1408 total interactions.
Number of atoms generated: 5184
Starting Simulation with Program Curie-Temperature...
Simulation run time [s]: 529.326
Monte Carlo statistics:
Total moves: 4250880000
50.7083% Accepted
49.2917% Rejected
Simulation ended gracefully.
username@computername :~/CoFe2O4evans$ ~/vampire/util/vdc/vdc --xyz
|------------------------------------------------------------|
|              Vampire Data Converter for v5+                |
|------------------------------------------------------------|
Processing snapshot 00000000
...
Processing snapshot 00000040
username@computername :~/CoFe2O4evans$ rasmol -xyz crystal.xyz

The arrangement of atoms are more easy to compare with the oxygen atoms included but it still look wrong when compared to the previously visualized cif:
CoFe2O4evans.png
Note: Yellow is Fe, pink is Co, and red is O.

Based on the rasmol results above, you might have to define the atom coordinates (cx, cy, cz) in a unit cell file (ucf) [4] for getting the desired arrangement of atoms.


Kind Regards,
Gavin
VAMPIRE user

On Wednesday, December 10, 2025 at 11:15:43 PM UTC-7 arif...@gmail.com wrote:
Thanks for the answer but I plotted it using python and the result is like this
CoFe2O4.mat
input

Rifqi Ardiyansyah

unread,
Dec 13, 2025, 12:06:29 AM12/13/25
to gabo...@gmail.com, Vampire Users
I will not use ucf here but use create:crystal-sublattice-materials = true and create:crystal-structure=spinel, So are the mat files and inputs you sent correct?

--
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/fbd78cac-f71b-414a-9173-e544406eb3c5n%40googlegroups.com.

gabo...@gmail.com

unread,
Dec 13, 2025, 7:41:57 AM12/13/25
to Vampire Users
Unfortunately, as you should seen from the rasmol views, the arrangement of atoms with "create:crystal-structure=spinel" look incorrect for an inverse spinel to me.  You may look at it yourself, though, and rotate the crystal in rasmol to see if you can find an orientation that matches the cif, but I was unsuccessful in finding a matching view.  For that, you may find the rasmol rotate command [1] helpful.

Two potential approaches as a solution for resolving that issue would be:

1) Try to construct the correct arrangement of atoms using a ucf.

2) Try to modify the VAMPIRE source code for creating the correct arrangement of atoms.  The C++ file that you might have to edit or create an inverse spinel one from is spinel.cpp [2].


Kind Regards,
Gavin
VAMPIRE user

Rifqi Ardiyansyah

unread,
Dec 13, 2025, 8:28:01 AM12/13/25
to gabo...@gmail.com, Vampire Users
Is the mat file you sent earlier correct?

--
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.

gabo...@gmail.com

unread,
Dec 13, 2025, 8:31:24 AM12/13/25
to Vampire Users
No, the CoFe2O4.mat sent earlier is incorrect since the rasmol view shows an incorrect arrangement of atoms.

Kind Regards,
Gavin
VAMPIRE user

Rifqi Ardiyansyah

unread,
Dec 13, 2025, 9:44:35 AM12/13/25
to gabo...@gmail.com, Vampire Users
But after I checked with Chatgpt, they said it was in accordance with the spinel inverse for the mat file and the Tc results, when viewed from the susceptibility, were in accordance with the existing theory. Maybe that's already true. After all, this is still undergraduate physics research, not a master's, which requires perfection. My professor also said it was correct. So, thank you for your time and feedback, Gavin.

Kind Regards,
Rifqi
Vampire User

--
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.

gabo...@gmail.com

unread,
Dec 13, 2025, 10:51:16 AM12/13/25
to Vampire Users
You shouldn't always trust ChatGPT.  ChatGPT depends on the training data that it has.  The spinel is a relatively new option for the create:crystal-structure keyword that hasn't been used much yet.  So, ChatGPT would have very little training data to go off of.  Thus, it wouldn't be surprising if it gave you an incorrect answer.

How did your professor verify that the arrangement of atoms (or geometric placement of the magnetic atoms) were correct with you?  Did he look at the arrangement of atoms in rasmol?  Or did he determine it was correct by another method (for example, comparing if the atom positions in the crystal.xyz file are equivalent to the atomic positions from the material project [1]? Instead of the material project or another literature reference, it could be that you have your own experimental x-ray diffraction results that you instead want to match to for your calculation and just didn't mention it.

It could perhaps be coincidence that the susceptibility is matching, or perhaps your simulation parameters (atomic-spin-moment, anisotropy-constant, etc.) are modeling more at the micromagnetic length scale [2] rather then the atomistic length scale that VAMPIRE is typically used for.  Thus, if changing the exchange-matrix values have little change on the output results, atomistic effects of atom arrangements and exchanges would be having not much contribution to your calculation model for CoFe2O4.


Kind Regards,
Gavin
VAMPIRE user

Rifqi Ardiyansyah

unread,
Dec 13, 2025, 11:02:49 AM12/13/25
to gabo...@gmail.com, Vampire Users
Before that, I gave the chatgpt vampire-manual.pdf so he knew. My lecturer only looked at the Tc value without looking at the crystal structure in Rasmol, so he didn't go into detail about the structure. What's important is how the Tc results align with the experiment. 
And I believe in Dr. Richard regarding the CoFe2O4 material which was published in this vampire group. Thank you for your feedback so far. Thank you, Gavin.
Regards, Rifqi
Vampire user

--
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.

Rifqi Ardiyansyah

unread,
Dec 15, 2025, 1:47:14 AM12/15/25
to gabo...@gmail.com, Vampire Users
And I have checked the log section and the results are the same
FeA makes up 33.3333%
FeB makes up 33.044%
Co makes up 33.6227%
This is in accordance with the inverse spinel but there is slight deviation. Maybe you know how to make it perfectly divisible by 33.3333%

gabo...@gmail.com

unread,
Dec 15, 2025, 5:19:40 AM12/15/25
to Vampire Users
You might have to adjust the alloy-fraction.

If you change the dimensions to be one unit cell, it looks like an alloy-fraction of 0.25 for that will give the 33.3333 %.  The crystal structure also seems to look like a spinel [space group Fd-3m (No. 227)] in rasmol:

username@fedora:~/CoFe2O4evans$ grep dimensions input
dimensions:unit-cell-size = 8.39 !A
dimensions:system-size-x = 8.39 !A
dimensions:system-size-y = 8.39 !A
dimensions:system-size-z = 8.39 !A
username@fedora:~/CoFe2O4evans$ grep alloy-fraction CoFe2O4.mat
material[2]:alloy-fraction[4] = 0.25 # dope 50% of material 4 sites with Co
username@fedora:~/CoFe2O4evans$ vampire-serial

                                                _          
                                               (_)        
                    __   ____ _ _ __ ___  _ __  _ _ __ ___
                    \ \ / / _` | '_ ` _ \| '_ \| | '__/ _ \
                     \ V / (_| | | | | | | |_) | | | |  __/
                      \_/ \__,_|_| |_| |_| .__/|_|_|  \___|
                                         | |              
                                         |_|              

                      Version 7.0.0 Dec 12 2025 07:42:48

             Git commit:

  Licensed under the GNU Public License(v2). See licence file for details.

  Developers:   Richard F L Evans, Sarah Jenkins, Andrea Meo,
                Daniel Meilak, Andrew Naden, Matthew Ellis,
                Oscar Arbelaez, Sam Morris, Rory Pond, Weijia Fan,
                Phanwadee Chureemart, Pawel Sobieszczyk, Joe Barker,
                Thomas Ostler, Andreas Biternas, Roy W Chantrell,
                Wu Hong-Ye, Razvan Ababei, Sam Westmoreland,
                Milton Persson
 
                Compiled with:  GNU C++ Compiler
                Compiler Flags:

  Vampire includes a copy of the qhull library from C.B. Barber and The
  Geometry Center and may be obtained via http from www.qhull.org.

...
Simulation ended gracefully.
username@fedora:~/CoFe2O4evans$ grep "makes up" log
15-12-2025 [02:54:14] Material 1 FeA makes up 33.3333 % of all atoms ( 8 atoms )
15-12-2025 [02:54:14] Material 2 FeB makes up 33.3333 % of all atoms ( 8 atoms )
15-12-2025 [02:54:14] Material 3 O makes up 0 % of all atoms ( 0 atoms )
15-12-2025 [02:54:14] Material 4 Co makes up 33.3333 % of all atoms ( 8 atoms )
username@fedora:~/CoFe2O4evans$ ~/vampire/util/vdc/vdc --xyz
...
username@fedora:~/CoFe2O4evans$ rasmol -xyz crystal.xyz

rasmol_view.png

Kind Regards,
Gavin
VAMPIRE user

input
CoFe2O4.mat

Rifqi Ardiyansyah

unread,
Dec 19, 2025, 6:56:21 AM12/19/25
to Vampire Users
Thank you for your help so far. I would like to request your help in adjusting my script to produce a good hysteresis curve at 0 K with a magnetic field of 5 T and intervals of 0.1 T, consistent with the theory for CoFe2O4. Please help.

Regards
Rifqi Ardiyansyah
input
CoFe2O4.mat

Gavin Abo

unread,
Dec 24, 2025, 2:34:01 AM12/24/25
to vampir...@googlegroups.com

If Hc is high and not converged with the loop-time-steps of 10000, it might help to adjust the loop-time-steps.  Refer to:

https://groups.google.com/g/vampire-users/c/oaqma8rO-8Q/m/lnH7aBguBQAJ

If the VAMPIRE result is mismatched with that for a CoFe2O4 hysteresis loop, you may have to consider if there are any physics that might be missing or off (e.g., magnetic exchange energy, magnetic shape anisotropy energy, magnetocrystalline anisotropy, demagnetization energy, ...):

Slide 12: https://magnetism.eu/esm/2018/slides/evans-slides2.pdf
https://doi.org/10.1088/0953-8984/26/10/103202
https://www.ifmpan.poznan.pl/~urbaniak/WykladyIFM2019/urbIFM2019magnetic_anisotropy_9.pdf

Kind Regards,

Gavin
VAMPIRE user

--
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.

Rifqi Ardiyansyah

unread,
Dec 27, 2025, 2:32:41 AM12/27/25
to Vampire Users
I would like to ask you to do a convergence test because I don't know how to do it. So that I know which one the correct loop-time-steps for my simulation to get the correct results. I really need your help.

gabo...@gmail.com

unread,
Dec 27, 2025, 2:49:23 PM12/27/25
to Vampire Users
You should do the convergence tests for your own calculation.

However, let me illustrate how to do a convergence test with an example.

Attached are files "input" and "VSe3.mat".  For those files, it would be good to do a convergence test with time-step for determining a converged value for Hc.

Convergence Test Procedure

1. First calculation
a. Open "input" with a text editor, change "sim:time-step=0.10E-15" to  "sim:time-step=0.15E-15" .
b. Run the calculation: vampire-serial
c. Rename the "output" such as to "output_15"
d. Extract Hc from "output_15" and put in a new text file named "time-step_hc.dat"
Hc_extraction.png

2. Second calculation
a. Open "input" with a text editor, set  "sim:time-step=0.20E-15" .
b. Run the calculation: vampire-serial
c. Rename the "output" such as to "output_20"
d. Extract Hc from "output_20" and added it to the text file named "time-step_hc.dat"

3. Third - Eighth calculations
     Repeat step 2, but with sim:time-step=0.25E-15,  0.30E-15,  0.35E-15,  0.40E-15,  0.45E-15, and 0.50E-15 and with "output" renamed output_25,  _30, _35, _40, _45, and _50, respectively.

Even though the a.-c. steps above can be done by hand, I created and used a bash script (convergence-test.sh attached) for that:

username@computername:~/converge_example$ ls -l
total 20
-rw-r--r-- 1 username username  825 Dec 27 10:13 convergence-test.sh
-rw-r--r-- 1 username username 1521 Dec 27 10:49 input
-rw-r--r-- 1 username username   77 Dec 27 10:28 plot_convergence_curve
-rw-r--r-- 1 username username  303 Dec 27 10:14 plotmx
-rw-r--r-- 1 username username  782 Dec 27 00:44 VSe2.mat
username@computername:~/converge_example$ chmod +x convergence-test.sh
username@computername:~/converge_example$ dos2unix convergence-test.sh
dos2unix: converting file convergence-test.sh to Unix format...
username@computername:~/converge_example$ ./convergence-test.sh
                                                _          
                                               (_)        
                    __   ____ _ _ __ ___  _ __  _ _ __ ___
                    \ \ / / _` | '_ ` _ \| '_ \| | '__/ _ \
                     \ V / (_| | | | | | | |_) | | | |  __/
                      \_/ \__,_|_| |_| |_| .__/|_|_|  \___|
                                         | |              
                                         |_|              

                      Version 7.0.0 Dec 26 2025 21:39:04

             Git commit: fed31aa8d06f278d43089352e126350bfdca26f2


  Licensed under the GNU Public License(v2). See licence file for details.

  Developers:   Richard F L Evans, Sarah Jenkins, Andrea Meo,
                Daniel Meilak, Andrew Naden, Matthew Ellis,
                Oscar Arbelaez, Sam Morris, Rory Pond, Weijia Fan,
                Phanwadee Chureemart, Pawel Sobieszczyk, Joe Barker,
                Thomas Ostler, Andreas Biternas, Roy W Chantrell,
                Wu Hong-Ye, Razvan Ababei, Sam Westmoreland,
                Milton Persson
 
                Compiler Flags:

  Vampire includes a copy of the qhull library from C.B. Barber and The
  Geometry Center and may be obtained via http from www.qhull.org.

================================================================================
Sat Dec 27 10:56:56 2025

================================================================================
Initialising system variables
Creating system
Generating neighbour list........done!

Copying system data to optimised data structures.
Using generic/normalised form of exchange interaction with 48 total interactions.
Number of atoms generated: 30

Starting Simulation with Program Hysteresis-Loop...
...
Simulation ended gracefully.
username@computername:~/converge_example$ gnuplot --persist plotmx

The d. step was still done by hand to manually create the attached "time-step_hc.dat", where the Hc values were extracted by visual inspection of all the "output_*" files.

username@computername:~/converge_example$ gnuplot --persist plot_convergence_curve

The first calculation with sim:time-step=0.15E-15 has a Hc of about 3.82 T.

A plot of the data shows divergence (or Hc changing significantly in value) from sim:time-step=0.15E-15 to 0.35E-15.  The Hc converges to 2.56 T at sim:time-step=0.40E-15:
convergence_test.png

Other past convergence test examples for reference:

equilibration-time-steps on Tc convergence test: https://groups.google.com/g/vampire-users/c/YUE_LGbtrQc/m/jx-gFGZYDQAJ
Changes of parameters on Tc curve: https://zhuanlan.zhihu.com/p/670053789

Best Regards,
Gavin
VAMPIRE user
input
VSe2.mat
time-step_hc.dat
convergence-test.sh
plotmx
plot_convergence_curve

Rifqi Ardiyansyah

unread,
Dec 27, 2025, 7:36:28 PM12/27/25
to gabo...@gmail.com, Vampire Users
Thank you for your answer. Please explain what a good value for loop-time-steps is. I'm still confused. Please explain. Essentially, what value is being considered?

--
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.

gabo...@gmail.com

unread,
Dec 27, 2025, 8:11:50 PM12/27/25
to Vampire Users
A good loop-time-steps value is one that has reached numerical convergence.  In the previous post, you should have saw the reference link [1].  You probably looked at the attachment "loop-time-step convergence.pdf" in that post at [1].

For that calculation with VSe2.mat, you should see that loop-time-steps = 10000 is a bad value as Hc was not numerically converged with 3.995 T.  As the loop-time-steps value was increased, it was found that convergence started to happen near Hc of 0.8 T with loop-time-steps = 400000 from the convergent test.  Thus, a good loop-time-steps number for the calculation would be to use a value greater than 400000.  Since that value could possibly change from one calculation to another when different magnetic parameters (atomic-spin-moment, anisotropy-constant, damping-constant, etc.) are used, it recommended that you do convergence testing on your own calculation (e.g., for CoFe2O4).  The Hc vs loop-time-steps plot was created similar to how the Hc vs time-step plot was created.  Hc was extracted in the same way.  Instead of time-step being put in the .dat file, loop-time-steps was put in the file.

For convenience, I repost the convergence test figure in "loop-time-step convergence.pdf" as an image:
loop-time-steps.png

[1] loop-time-steps on Hc convergence test: https://groups.google.com/g/vampire-users/c/oaqma8rO-8Q/m/lnH7aBguBQAJ

Kind Regards,
Gavin
VAMPIRE

Rifqi Ardiyansyah

unread,
Dec 27, 2025, 11:30:14 PM12/27/25
to gabo...@gmail.com, Vampire Users
When taking the Hc value in the output, there are many, which value is taken to be entered into the time-step-hc.dat file?

Rifqi Ardiyansyah

unread,
Dec 28, 2025, 12:04:38 AM12/28/25
to gabo...@gmail.com, Vampire Users
from what you said is it the sim:loops-time-steps or sim:time-step values that are changed?

gabo...@gmail.com

unread,
Dec 28, 2025, 12:25:40 AM12/28/25
to Vampire Users
I took the +Hc one instead of the -Hc one.  When the loop is symmetrical, it shouldn't matter as much since they should be identical when you take the magnitude |Hc| = |+Happ| @ m = 0 = |-Happ| @ m = 0.  If the loop is asymmetrical, which could happen for example if you have an exchange bias, then you could take whichever one is of interest to you.

Ideally, you would want the applied field (Happ) value point were the magnetization (m) is 0 for the coercivity (Hc) value.  Since m_x = 0 was missing in the output file for the VSe2.mat example, the +Happ value I took to be an approximate Hc value at the m_x value was the one closest to zero at the cross over between -m_x and +m_y.  Figure that hopefully helps illustrate that:
Hc_extraction.png
If you would like a more accurate Hc, there two ways that could be improved:

1) You could use a smaller sim:applied-field-strength-increment.
2) You could use interpolation between -m_x and +m_y to get a projected m = 0 point.

Kind Regards,
Gavin
VAMPIRE user

gabo...@gmail.com

unread,
Dec 28, 2025, 12:37:16 AM12/28/25
to Vampire Users
From the example calculations, you should have seen that Hc could be changed by both the sim:loops-time-steps or sim:time-step values.  So, you would want to do separate convergence tests for both.  Or you may try to do both at the same time:  As an example, the commercial software Minitab might be helpful sometimes when needing to analyze output from changes with multiple parameters [1].


Kind Regards,
Gavin
VAMPIRE user

Rifqi Ardiyansyah

unread,
Dec 28, 2025, 2:43:25 AM12/28/25
to gabo...@gmail.com, Vampire Users
This is the result after I did the convergence test
image.png

Rifqi Ardiyansyah

unread,
Dec 28, 2025, 2:46:45 AM12/28/25
to gabo...@gmail.com, Vampire Users
This is the result after I did the convergence test
image.png

loop-time-steps.dat
output_50000
output_100000
output_10000

gabo...@gmail.com

unread,
Dec 28, 2025, 7:10:49 AM12/28/25
to Vampire Users
On the process you have used to perform the convergence test, that is looking good.

A few comments:

For sim:loop-time-steps = 100000, you chose 0.8 from output_100000.  I would have chosen the 0.7 closer to m_z = 0:

B_applied     s0M_norm_z
0.7                 -0.755306
0.8                 0.979019

For your time-loops-steps versus Hc plot, it looks like the Hc value might not be fully converged yet at sim:loop-time-steps = 100000.  So, I would do a few more calculations using sim:loop-time-steps > 100000.

For your continuation of the convergence test, since you know Hc (0.7 T) is much less than 5 T, it would be a good opportunity to improve on the values used for:

sim:maximum-applied-field-strength= 5 !T

You could save some simulation time be reducing it to say:

sim:maximum-applied-field-strength= 2 !T

The points near Hc are looking sparse with:

sim:applied-field-strength-increment= 0.1 !T

You will probably want to decrease it to at least:

sim:applied-field-strength-increment= 0.05 !T

Or maybe even:

sim:applied-field-strength-increment= 0.01 !T 

As discussed in the past post at [1], it would be nice if VAMPIRE had keyword(s) for increasing the density of points (with sim:applied-field-strength-increment) around Hc in the loop similar to other hysteresis simulation programs.  Perhaps that could be a potentially new feature request for the VAMPIRE developers.

That might be a good technical issue discussion topic at the workshop coming up in Feb 2026 [2].  Unfortunately, I won't be attending.  However, if another user in the group is attending, perhaps they could bring it up at the workshop.


Kind Regards,
Gavin
VAMPIRE user

Rifqi Ardiyansyah

unread,
Dec 28, 2025, 8:02:48 AM12/28/25
to gabo...@gmail.com, Vampire Users
So how about I still use the 10,000 for my undergraduate thesis? Or should I continue the convergence test? If I continue, how many loop-time-steps should I use? If possible, please help me continue this convergence test so my thesis can be good.

--
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.

gabo...@gmail.com

unread,
Dec 28, 2025, 12:37:09 PM12/28/25
to Vampire Users
If it is only going into your thesis, the data with the sim:loop-time-steps of 100,000 is likely fine.  I would suggest checking with the professor(s) you have to submit your thesis to, though, for ensuring that they would accept it.

If your planning to submit the data in a manuscript to a peer reviewed journal, however, to avoid rejection, you should make sure you have reached a converged Hc value.  You might do loop-time-steps of say 150000, 200000, and 250000.  If still not converged, you could continue with step increases of 50,0000 until you find full convergence.

Kind Regards,
Gavin
VAMPIRE user

Rifqi Ardiyansyah

unread,
Dec 28, 2025, 5:13:54 PM12/28/25
to gabo...@gmail.com, Vampire Users
Can you help me to find the convergent value? Which corresponds to the inverse spinel CoFe2O4 material.

gabo...@gmail.com

unread,
Dec 29, 2025, 4:34:16 AM12/29/25
to Vampire Users
I was thinking to get Hc from converging with sim:time-step and sim:loop-time-steps from the perspective of an integrator, where that may be needed for time step [1] accuracy and stability.  I haven't looked into the details of the LLG Heun method, but it looks like information on it can be found in the VAMPIRE article at [2] should you have further interest in it.

It might be possible that instead of choosing based on convergence, you may need to choose the input parameters based on achieving a particular sweep rate.

It looks like section "5.1.4 Hysteresis behaviour" of [3] has an example for determining a sweep rate.

If it's a VSM measured value that you are comparing to, Seymour's et. al. article [4] looks like it has a very helpful explanation on why a VSM measured hysteresis loop and numerically calculated loop might not match related to the sweep rate.

There is also a past post [5] to this group that mentions sweep rate, which could be of possible interest.

If the Hc is not matching with your expected value for inverse spinel CoFe2O4, another possibility is that could be caused by the Brown paradox.  If your not familiar with what that is, the article at [6] should have a description for it.


Kind Regards,
Gavin
VAMPIRE user

Rifqi Ardiyansyah

unread,
Dec 29, 2025, 8:53:50 AM (14 days ago) 12/29/25
to gabo...@gmail.com, Vampire Users
But after I checked the coercivity, remanence, and saturation values, they were in accordance with the inverse spinel CoFe2O4 using loop-time-steps=10000. Is it permissible for a bachelor's thesis level?

--
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.

Vinod Naik Bhukya

unread,
Dec 29, 2025, 11:04:06 PM (13 days ago) 12/29/25
to Vampire Users
For convergence test, is it okay if we run vampire-parallel?

gabo...@gmail.com 在 2025年12月28日 星期日凌晨3:49:23 [UTC+8] 的信中寫道:

Rifqi Ardiyansyah

unread,
Dec 29, 2025, 11:07:39 PM (13 days ago) 12/29/25
to Vinod Naik Bhukya, Vampire Users
You can go ahead, it's even faster when using vampire-parallel

--
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.

Rifqi Ardiyansyah

unread,
2:16 AM (3 hours ago) 2:16 AM
to Vampire Users
I have now done a Tc simulation for the CoFe2O4 material but I don't know whether the equilibration value I used is correct or not. How can I check that the equilibration I used is correct?
input
CoFe2O4.mat
Reply all
Reply to author
Forward
0 new messages