-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy pathferroelectric-response.tex
148 lines (135 loc) · 5.9 KB
/
ferroelectric-response.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
\documentclass{standalone}
\usepackage{tikz}
\usepackage{pgfplots}
\pgfplotsset{compat=1.18}
\usepgfplotslibrary{groupplots}
\usetikzlibrary{fadings,shadings,calc}
% Shape rendering specs
\pgfdeclareradialshading{atomshade}{\pgfpoint{0cm}{0cm}}{%
color(0cm)=(pgftransparent!0);
color(0.2cm)=(pgftransparent!20);
color(0.5cm)=(pgftransparent!50);
color(0.7cm)=(pgftransparent!70);
color(1cm)=(pgftransparent!100)%
}
\tikzset{
atom/.style={circle, shading=atomshade, minimum size=0.4cm},
bond/.style={
line width=0.5mm,
shading=axis,
color=black, %Change to #1 to specify bond color
shading angle=45
}
}
% Define BaTiO3 (#221) unit cell projection
\newcommand{\DrawUnitCell}[1]{%
\begin{tikzpicture}[scale=1.5]
% Draw the unit cell
\draw[thick] (0,0,0) -- (1,0,0) -- (1,1,0) -- (0,1,0) -- cycle; % Bottom face
\draw[thick] (0,0,1) -- (1,0,1) -- (1,1,1) -- (0,1,1) -- cycle; % Top face
\draw[thick] (0,0,0) -- (0,0,1);
\draw[thick] (1,0,0) -- (1,0,1);
\draw[thick] (1,1,0) -- (1,1,1);
\draw[thick] (0,1,0) -- (0,1,1);
% Draw lines connect Oxygen to Titanium
\begin{scope}
\ifnum \pdfstrcmp{#1}{0.5} < 0
% Connect bottom 4 oxygens to Ti
\draw[bond=red] (0,0.5,0.5) -- ($(0,0.5,0.5)!0.5!(0.5,#1,0.5)$);
\draw[bond=gray] ($(0,0.5,0.5)!0.5!(0.5,#1,0.5)$) -- (0.5,#1,0.5);
\draw[bond=red] (1,0.5,0.5) -- ($(1,0.5,0.5)!0.5!(0.5,#1,0.5)$);
\draw[bond=gray] ($(1,0.5,0.5)!0.5!(0.5,#1,0.5)$) -- (0.5,#1,0.5);
\draw[bond=red] (0.5,0,0.5) -- ($(0.5,0,0.5)!0.5!(0.5,#1,0.5)$);
\draw[bond=gray] ($(0.5,0,0.5)!0.5!(0.5,#1,0.5)$) -- (0.5,#1,0.5);
\draw[bond=red] (0.5,0.5,0) -- ($(0.5,0.5,0)!0.5!(0.5,#1,0.5)$);
\draw[bond=gray] ($(0.5,0.5,0)!0.5!(0.5,#1,0.5)$) -- (0.5,#1,0.5);
\draw[bond=red] (0.5,0.5,1) -- ($(0.5,0.5,1)!0.5!(0.5,#1,0.5)$);
\draw[bond=gray] ($(0.5,0.5,1)!0.5!(0.5,#1,0.5)$) -- (0.5,#1,0.5);
\else
\ifnum \pdfstrcmp{#1}{0.5} > 0
% Connect top 4 oxygens to Ti
\draw[bond=red] (0,0.5,0.5) -- ($(0,0.5,0.5)!0.5!(0.5,#1,0.5)$);
\draw[bond=gray] ($(0,0.5,0.5)!0.5!(0.5,#1,0.5)$) -- (0.5,#1,0.5);
\draw[bond=red] (1,0.5,0.5) -- ($(1,0.5,0.5)!0.5!(0.5,#1,0.5)$);
\draw[bond=gray] ($(1,0.5,0.5)!0.5!(0.5,#1,0.5)$) -- (0.5,#1,0.5);
\draw[bond=red] (0.5,1,0.5) -- ($(0.5,1,0.5)!0.5!(0.5,#1,0.5)$);
\draw[bond=gray] ($(0.5,1,0.5)!0.5!(0.5,#1,0.5)$) -- (0.5,#1,0.5);
\draw[bond=red] (0.5,0.5,1) -- ($(0.5,0.5,1)!0.5!(0.5,#1,0.5)$);
\draw[bond=gray] ($(0.5,0.5,1)!0.5!(0.5,#1,0.5)$) -- (0.5,#1,0.5);
\else
% Connect 8 oxygens to form octahedron
\draw[bond=red] (0,0.5,0.5) -- (1,0.5,0.5);
\draw[bond=red] (0.5,0,0.5) -- (0.5,1,0.5);
\draw[bond=red] (0.5,0.5,0) -- (0.5,0.5,1);
\fi
\fi
\end{scope}
% Draw the Oxygen atoms (Red) (back perspective)
\node[atom, anchor=center,ball color=red] at (0,0.5,0.5) {};
\node[atom, anchor=center,ball color=red] at (0.5,0,0.5) {};
\node[atom, anchor=center,ball color=red] at (0.5,0.5,0.0) {};
% Draw the Barium atoms (Cyan)
\node[atom, anchor=center,ball color=cyan] at (0,0,0) {};
\node[atom, anchor=center,ball color=cyan] at (1,0,0) {};
\node[atom, anchor=center,ball color=cyan] at (0,1,0) {};
\node[atom, anchor=center,ball color=cyan] at (1,1,0) {};
\node[atom, anchor=center,ball color=cyan] at (0,0,1) {};
\node[atom, anchor=center,ball color=cyan] at (1,0,1) {};
\node[atom, anchor=center,ball color=cyan] at (0,1,1) {};
\node[atom, anchor=center,ball color=cyan] at (1,1,1) {};
% Titanium atom (Gray)
\node[atom, anchor=center,ball color=gray, minimum size=0.25cm] at (0.5,#1,0.5) {};
% Draw the Oxygen atoms (red) (front perspective)
\node[atom, anchor=center,ball color=red] at (0.5,1,0.5) {};
\node[atom, anchor=center,ball color=red] at (1,0.5,0.5) {};
\node[atom, anchor=center,ball color=red] at (0.5,0.5,1) {};
\end{tikzpicture}%
}
\begin{document}
\begin{tikzpicture}[scale=0.8]
% Define top and bottom plots
\begin{groupplot}[
group style={group size=1 by 2, vertical sep=0pt},
width=10cm,
height=6cm,
xtick=\empty,
ytick=\empty,
axis lines*=box,
enlargelimits=false,
xmin=-2.5, xmax=2.5,
axis line style={very thick},
]
% Double-well free energy potential
\nextgroupplot[
ylabel={Free Energy},
ylabel style={rotate=0},
ymin=0, ymax=3.5,
xlabel={}, % Remove x-axis label from top plot
tick style={draw=none},
]
\addplot[domain=-2.5:2.5, samples=100, very thick] {0.5*(\x^4-4*\x^2+4)};
% Polarization vs. displacement
\nextgroupplot[
ylabel={Polarization},
ylabel style={rotate=-90},
ymin=-2.5, ymax=2.5,
xlabel={Ti Displacement},
xlabel shift={-10pt},
xlabel near ticks,
ylabel near ticks,
xtick={-2.25, 2.25},
xticklabels={negative, positive},
tick style={draw=none},
]
% Additional axes through origin
\draw[black!50, thick] (axis cs:0,-2.475) -- (axis cs:0,2.475);
\draw[black!50, thick] (axis cs:-2.49,0) -- (axis cs:2.49,0);
% Polarization line
\addplot[domain=-2.5:2.5, samples=2, blue, very thick] {\x};
\end{groupplot}
% Overlay the unit cells manually
\node[anchor=center] at (1.75,3.5) {\scalebox{0.5}{\DrawUnitCell{0.3}}};
\node[anchor=center] at (4.25,3.5) {\scalebox{0.5}{\DrawUnitCell{0.5}}};
\node[anchor=center] at (6.75,3.5) {\scalebox{0.5}{\DrawUnitCell{0.7}}};
\end{tikzpicture}
\end{document}