Hysterisis loop

41 views
Skip to first unread message

Rifqi Ardiyansyah

unread,
Dec 10, 2025, 8:01:45 PM (7 days ago) Dec 10
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 AM (7 days ago) Dec 11
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 AM (7 days ago) Dec 11
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 PM (5 days ago) Dec 12
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 AM (5 days ago) Dec 13
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 AM (5 days ago) Dec 13
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 AM (5 days ago) Dec 13
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 AM (5 days ago) Dec 13
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 AM (5 days ago) Dec 13
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 AM (5 days ago) Dec 13
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 AM (5 days ago) Dec 13
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 AM (3 days ago) Dec 15
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 AM (3 days ago) Dec 15
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
Reply all
Reply to author
Forward
0 new messages