-
Notifications
You must be signed in to change notification settings - Fork 0
/
Layer.m
36 lines (28 loc) · 1.13 KB
/
Layer.m
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
% 07/14/2020 updated: add alpha as an argument (lattice constant)
classdef Layer
% Basic datastructure to store geometric info for a 2D layer.
properties
layer_index % index in the heterostructure
A % global lattice
G % global recip lattice
A_local % local lattice (theta = 0)
G_local % local recip lattice (theta = 0)
theta % twist/orientation angle
end
methods
function obj = Layer(index,theta,alpha)
%Layer Construct an instance of this class
% Detailed explanation goes here
obj.layer_index = index;
obj.theta = theta;
% alpha = 1.42*sqrt(3);
obj.A_local = alpha*[ 1 1/2
0 sqrt(3)/2];
obj.G_local = getRecip(obj.A_local);
R_base = [cos(theta) -sin(theta);
sin(theta) cos(theta)];
obj.A = R_base*obj.A_local;
obj.G = getRecip(obj.A);
end
end
end