diff --git a/cal.py b/cal.py new file mode 100644 index 0000000..0511f36 --- /dev/null +++ b/cal.py @@ -0,0 +1,62 @@ +import numpy as np +import matplotlib.pyplot as plt + + +def deg_2_rad(winkel): + return winkel/180.0 * np.pi + + +# all units in angstrom +base_a_m = 5.75 +base_b_m = 4.5 +base_c_m = 5.38 + +base_c_r = 2.856 +base_b_r = 4.554 +base_a_r = base_b_r + +alpha_m = 122.64 # degree + + +def mono_2_rutile(c_m, a_m): + a_r = np.cos(deg_2_rad(alpha_m - 90)) * c_m * base_c_m + c_r = (a_m) * base_a_m + np.sin(deg_2_rad(alpha_m - 90)) * c_m * base_c_m + return a_r, c_r + + +def main(): + offset_a_m = 0.25 - 0.23947 + offset_c_m = 0.02646 + + offset_a_r, offset_c_r = mono_2_rutile(offset_c_m, offset_a_m) + + print("A_r: ", offset_a_r, "C_r: ", offset_c_r) + + x = np.arange(10) + y = np.arange(10) + X, Y = np.meshgrid(x, y) + + atom_x = offset_a_r + X * base_c_r + np.mod(Y, 4) * 0.5 * base_c_r + atom_x[np.mod(X, 2) == 0] -= 2 * offset_a_r + + atom_y = offset_c_r + 0.5 * Y * base_a_r + atom_y[np.mod(X, 2) == 0] -= 2 * offset_c_r + + fig, ax = plt.subplots(1) + plt.scatter(atom_x, atom_y) + + atom_x_rut = X * base_c_r + np.mod(Y, 4) * 0.5 * base_c_r + atom_y_rut = Y * 0.5 * base_a_r + + plt.scatter(atom_x_rut, atom_y_rut) + print(np.square(atom_x-atom_x_rut) + np.square(atom_y-atom_y_rut)) + + cryst = np.loadtxt("./crystal_V.xyz", delimiter=" ") + print(cryst.shape) + plt.scatter(-cryst[:, 0]+5.5*base_c_r, cryst[:, 2]) + ax.set_aspect(1) + plt.show() + + +if __name__ == "__main__": + main() diff --git a/crystal_V.xyz b/crystal_V.xyz new file mode 100644 index 0000000..682fb25 --- /dev/null +++ b/crystal_V.xyz @@ -0,0 +1,24 @@ +-1.317409 0.112925 -0.113205 +-1.317410 4.629925 -0.113205 +9.907514 -0.112924 4.641385 +9.907513 4.404076 4.641385 +1.317409 -0.112925 0.113205 +-1.578486 -0.112924 4.641385 +4.425591 0.112925 -0.113205 +4.425590 4.629925 -0.113205 +7.060409 -0.112925 0.113205 +4.164514 -0.112924 4.641385 +10.168591 0.112925 -0.113205 +10.168590 4.629925 -0.113205 +1.317408 4.404075 0.113205 +2.977644 2.145576 2.150886 +1.529697 0.112926 4.414976 +-0.130539 2.371426 2.377295 +-1.578487 4.404076 4.641385 +1.529696 4.629926 4.414976 +7.060408 4.404075 0.113205 +8.720644 2.145576 2.150886 +7.272697 0.112926 4.414976 +5.612461 2.371426 2.377295 +4.164513 4.404076 4.641385 +7.272696 4.629926 4.414976 diff --git a/crystal_maker.xyz b/crystal_maker.xyz new file mode 100644 index 0000000..64d1742 --- /dev/null +++ b/crystal_maker.xyz @@ -0,0 +1,42 @@ +V -1.317409 0.112925 -0.113205 +O -1.443069 3.207070 1.358454 +O -2.891016 3.568431 3.622545 +V -1.317410 4.629925 -0.113205 +V 9.907514 -0.112924 4.641385 +O 11.481121 0.948570 0.905636 +O 10.033174 1.309931 3.169726 +V 9.907513 4.404076 4.641385 +V 1.317409 -0.112925 0.113205 +V -1.578486 -0.112924 4.641385 +V 4.425591 0.112925 -0.113205 +V 4.425590 4.629925 -0.113205 +V 7.060409 -0.112925 0.113205 +V 4.164514 -0.112924 4.641385 +V 10.168591 0.112925 -0.113205 +V 10.168590 4.629925 -0.113205 +O -0.004879 0.948570 0.905636 +O 4.299931 3.207070 1.358454 +O 2.851984 3.568431 3.622545 +O 1.399960 3.116730 1.313172 +O 2.895092 0.858230 0.950918 +O 1.447145 1.400271 3.215008 +O -0.047988 3.658771 3.577263 +V 1.317408 4.404075 0.113205 +V 2.977644 2.145576 2.150886 +V 1.529697 0.112926 4.414976 +V -0.130539 2.371426 2.377295 +V -1.578487 4.404076 4.641385 +V 1.529696 4.629926 4.414976 +O 5.738121 0.948570 0.905636 +O 8.594984 3.568431 3.622545 +O 4.290174 1.309931 3.169726 +O 7.142960 3.116730 1.313172 +O 8.638092 0.858230 0.950918 +O 7.190145 1.400271 3.215008 +O 5.695012 3.658771 3.577263 +V 7.060408 4.404075 0.113205 +V 8.720644 2.145576 2.150886 +V 7.272697 0.112926 4.414976 +V 5.612461 2.371426 2.377295 +V 4.164513 4.404076 4.641385 +V 7.272696 4.629926 4.414976