If it helps, the attached create-ucf.py is a rudimentary and not well tested Python script that outputs the beginning part of a unit cell file (ucf), where the latter interactions block still has to be completed manually in a text editor or you would have to write and add your own code to do that (For example, Jij could probably be programmed using the equation on the VAMPIRE crystals structure webpage [1]). Feel free to modify create-ucf.py
and make improvements to it. The shell commands in bash are given below, which demonstrates how to run it. The output produced by it can be seen in the attached UC.png. You can compare it to the sample UC.ucf at [2]. You might also get helpful information from the YouTube ucf video [3], if you haven't already watched it. Of note, parameters such as 'cx' are described in section "5 Unit Cell Files" which starts on page 22 in the VAMPIRE 5.0 manual [4].
username@computername:~/Desktop/test$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04 LTS
Release: 22.04
Codename: jammy
username@computername:~/Desktop/test$ dos2unix create-ucf.py
dos2unix: converting file create-ucf.py to Unix format...
username@computername:~/Desktop/test$ chmod +x create-ucf.py
username@computername:~/Desktop/test$ ls -l
total 4
-rwxr-xr-x 1 username username 3100 Jun 24 23:43 create-ucf.py
username@computername:~/Desktop/test$ python3 create-ucf.py
Enter ucf filename [example: template.ucf]
UC.ucf
Enter crystal system [cubic, tetragonal, orthorhombic, hexagonal, monoclinic, rhombohedral, or triclinic]
cubic
Enter lattice constant a [example: 3.54]
3.54
Enter vector 1 x [example: 0.0]
1.0
Enter vector 1 y [example: 0.0]
0.0
Enter vector 1 z [example: 0.0]
0.0
Enter vector 2 x [example: 0.0]
0.0
Enter vector 2 y [example: 0.0]
1.0
Enter vector 2 z [example: 0.0]
0.0
Enter vector 3 x [example: 0.0]
0.0
Enter vector 3 y [example: 0.0]
0.0
Enter vector 3 z [example: 0.0]
1.0
Enter number of atoms [example: 4]
4
Enter atom 1 id [example: 0]
0
Enter atom 1 cx [example: 0]
0
Enter atom 1 cy [example: 0]
0
Enter atom 1 cz [example: 0]
0
Enter atom 1 mat [example: 0]
0
Enter atom 1 lc [example: 0]
1
Enter atom 1 hc [example: 0]
0
Enter atom 2 id [example: 0]
1
Enter atom 2 cx [example: 0]
0.5
Enter atom 2 cy [example: 0]
0.5
Enter atom 2 cz [example: 0]
0
Enter atom 2 mat [example: 0]
1
Enter atom 2 lc [example: 0]
0
Enter atom 2 hc [example: 0]
0
Enter atom 3 id [example: 0]
2
Enter atom 3 cx [example: 0]
0.5
Enter atom 3 cy [example: 0]
0
Enter atom 3 cz [example: 0]
0.5
Enter atom 3 mat [example: 0]
1
Enter atom 3 lc [example: 0]
0
Enter atom 3 hc [example: 0]
1
Enter atom 4 id [example: 0]
3
Enter atom 4 cx [example: 0]
0
Enter atom 4 cy [example: 0]
0.5
Enter atom 4 cz [example: 0]
0.5
Enter atom 4 mat [example: 0]
1
Enter atom 4 lc [example: 0]
0
Enter atom 4 hc [example: 0]
1
Enter number of interactions [example: 48]
48
Enter exchange type [example: 0]
0
Open ucf to add interaction parameters (id i j dx dy dz Jij). These currently must be added manually.
UC.ucf has been generated.
Kind Regards,
Gavin
VAMPIRE user