Parse mcif file and vesta file with vesta in a batch process

20 views
Skip to first unread message

ahxb

unread,
Mar 31, 2025, 8:46:35 PMMar 31
to VESTA users' list
Dear VESTA developers and users,
I'm using VESTA to open and visualize .mcif file and .vesta file from the MAGNDATA database, to get magnetic moment values and their ordering of magnetic materials in the database, and to provide input files for DFT calculation with proper initial magnetic moments to improve SCF convergence. However, there are about 3000 magnetic materials in the MAGNDATA database, so it's exhaustive to open these mcif or vesta files and fill in the desired magnetic moments. How can I get the magnetic moments for all the atoms in a cell in a batch way using VESTA?
Thanks for your suggestions! 


MUKESH SINGH

unread,
Apr 17, 2025, 5:27:16 PMApr 17
to VESTA users' list
Hi,

I am not familiar with magnetic moments in cif file and how are they written. But you can do it using .vesta file. All the magnetic moments are written in .vesta file after VECTR tag. Atoms takes three lines, in the 3, 6, 9, .. lines, first index in atom index, next three are mx, my and mz. So, you need to extract mx, my and mz. which are highlighted the following.

VECTR
   1    1.38300    0.00000    0.00000 0
    5   0    0    0    0
 0 0 0 0 0
   2   -1.38300    0.00000    0.00000 0
    6   0    0    0    0
 0 0 0 0 0
   3   -1.38300    0.00000    0.00000 0
    7   0    0    0    0
 0 0 0 0 0
   4    1.38300    0.00000    0.00000 0
    8   0    0    0    0
 0 0 0 0 0
 0 0 0 0 0


I have just written a simple python script (1.py) for post-processing, which takes 1.mcif files. You can easily generalized it by using loop for any number of data files.

I hope, this might be helpful for you.




Thanks
Mukesh Singh
1.mcif
1.py
Reply all
Reply to author
Forward
0 new messages