initial setup of thesis repository
[cluster_expansion_thesis.git] / little_helpers / tikz / pd100-lattice.tikz
blob31999dace78bc85d6b881076467fb72e20de5abc
1 \begin{tikzpicture}
3 \pgftransformscale{.72}
7 %Legend
8 \pgftransformrotate{-90}
9 %\draw(11.5,3.0) rectangle (10.1,16);
11 %\draw(10.8,13) node {p.u.c. boundary};
12 %\draw[line width=2pt] (10.8,14.6)--(10.8,15.6);
14 \draw(10.8,5) node {Pd(100) bridge:};
15 \draw[very thick]  (10.8,7.5)node[fill=black]{};
17 %\draw(10.8,9) node {new lattice:};
18 %\draw[very thick, dashed] (10.8,10.2)--(-1.6,11.2);
20 \draw (10.8,12) node {Pd(100) hollow site:};
21 \shade[ball color=black] (10.8 , 15.1 ) circle(2mm); 
23 %\draw (10.8,9) node {Surface Pd:};
24 %\shade[ball color=green, fill opacity = .3] (10.8, 10.7 )   circle(6mm);
26 %\draw(10.8,14) node {Oxygen:};
27 %\shade[ball color=red, fill opacity = .3] (10.8,15.1)circle(4mm); 
30 \draw(0,3)rectangle(10,16);
31 \clip(0,3)rectangle(10,16);
32 \pgftransformshift{\pgfpoint{1.5cm}{-1cm}}
37 \foreach \x in {-2,...,2}{
38   \foreach \y in {-2,...,2}{
39     %***Definition of coordinates***
40     %Pd(100) hollow sites
41     \node(h1) at (6.296+ \x*6.296+ 0.344087905082336,6.296+ \y*6.296+ 0.926618296945273) {};
42     \node(h2) at (\x*6.296+ 1.59113049268837, \y*6.296+ 3.43780332375807 ) {};
43     \node(h3) at (\x*6.296+ 2.84574797953539, \y*6.296+ 5.96310098461172 ) {}; 
44     \node(h4) at (\x*6.296+ 4.10464369172027, 6.296+ \y*6.296+ 2.21435558239077 ) {};
45     \node(h5) at (\x*6.296+ 5.31053190835417, \y*6.296+ 4.75473569641011 ) {};
47     %PBC Coordinates
48     \node(h1p01) at (h1)[right=6.296cm]{};
49     \node(h1p10) at (h1)[below=6.296cm]{};
50     \node(h2p21) at (6.296+\x*6.296+ 1.59113049268837, 2*6.296+\y*6.296+ 3.43780332375807 ) {};
51     \node(h2p01) at (\x*6.296+ 1.59113049268837, 6.296+\y*6.296+ 3.43780332375807 ) {};
52     \node(h2p10) at (6.292+\x*6.296+ 1.59113049268837, 0*6.296+\y*6.296+ 3.43780332375807 ) {};
53     \node(h2p12) at (2*6.296+\x*6.296+ 1.59113049268837, -6.296+\y*6.296+ 3.43780332375807 ) {};
54     \node(h2p11) at (1*6.296+\x*6.296+ 1.59113049268837, 6.296+\y*6.296+ 3.43780332375807 ) {};
55     \node(h2p10) at (\x*6.296+ 1.59113049268837, 6.296+\y*6.296+ 3.43780332375807 ) {};
56     \node(h2p01) at (6.296+\x*6.296+ 1.59113049268837, \y*6.296+ 3.43780332375807 ) {};
57     \node(h5p01) at (\x*6.296+ 5.31053190835417, 6.296+\y*6.296+ 4.75473569641011 ) {};
58     \node(h3p10) at (6.296+\x*6.296+ 2.84574797953539, \y*6.296+ 5.96310098461172 ) {}; 
60     %Oxide Pd
61     \node(Pd1) at (\x*6.296+3.2310128485632, \y*6.296+6.2328684774094 ){}  ; 
62     \node(Pd2) at (\x*6.296+0.0867943321959671,\y*6.296+6.25895314440737){};
63     \node(Pd3) at (\x*6.296+1.65525977156214, \y*6.296+3.23429832279509){} ; 
64     \node(Pd4) at (\x*6.296+4.78666152813302, \y*6.296+3.18465154488858){} ; 
66     \node(Pd3p10) at (6.296+\x*6.296+1.65525977156214, \y*6.296+3.23429832279509){} ; 
69     \node(Pd2p01) at (\x*6.296+0.0867943321959671,6.296+\y*6.296+6.25895314440737){};
70     \node(Pd2p10) at (6.296+\x*6.296+0.0867943321959671,\y*6.296+6.25895314440737){};
71     
72     %Oxide Oxygen
73     \node(O1) at (\x*6.296+1.64973919642545, \y*6.296+5.06314831724067){} ;
74     \node(O2) at (\x*6.296+4.81706394091531, \y*6.296+5.04027686526835){} ;
75     \node(O3) at (\x*6.296+1.67703227863746, \y*6.296+1.22762720073791){} ;
76     \node(O4) at (\x*6.296+4.78808503194601, \y*6.296+1.1931186262743 ){} ;    
77     
78     %***Visible Objects***
79     %Oxide Bridge positions
80     \foreach \from/\to in {Pd3/Pd4,Pd4/Pd3p10}{
81       %\draw[draw=none](\from)--(\to) node[midway, fill=black!20]{bridge};
82     }
84     %Pd(100) Bridge positions
85     \foreach \from/\to in {h2/h3,h3/h5,h3/h4,h4/h1,h5/h1,h1/h2p11,h4/h5p01,h1/h3p10,h2p10/h4,h2p01/h5}{
86       \draw[draw=none] (\from) --(\to) node[midway, fill=black]{};
87       %Debug label
88         %\draw[draw=none] (\from) --(\to) node[midway, fill=black!20]{\from-\to};
89     }
91     %-1 substrate layer
92     \foreach \i in {1,...,5}{
93       \shade[ball color=black] (h\i) circle(2mm); 
94     }
95     \foreach \i in {1,...,4}{
96       \begin{scope}[fill opacity = .5]
97         %surface Pd
98         %\shade[ball color=green] (Pd\i) circle(6mm);
99       %oxygen
100         %\shade[ball color=red] (O\i) circle (4mm); 
101         \end{scope}
102     }
103     %-1 substrate grid/hollow-lattice
104       \draw[very thick] (h2)--(h2p21);
105     \draw[very thick] (h2)--(h2p12);
106     %p.u.c. boundaries
107       \draw [dotted] (h1)--(h1p01);
108     \draw [dotted] (h1)--(h1p10);
109     %%Debug labels
110     \foreach \i in {1,...,5}{
111       %\draw(h\i) node {h\i};
112     }
113     \foreach \i in {1,...,4}{
114       %\draw(O\i) node {O\i};
115       %\draw(O\i) node {O};
116       %\draw(Pd\i) node {Pd\i};
117     }
119   }
122 \end{tikzpicture}