-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathQCASuperCell.m
47 lines (33 loc) · 1.2 KB
/
QCASuperCell.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
36
37
38
39
40
41
42
43
44
45
46
classdef QCASuperCell
%SuperCell Holds a list of cells
% This is to help with the race condition that happens with the
% Hartree Fock approximation
properties
Device = {}; %what QCACells are in
CellID = 0; %unique ID
NeighborList = []; %this SuperCell's Neighbors
BoxColor='';
end
methods
function obj = SuperCell( varargin ) % constructor class
if nargin > 0
placeholder = obj.Device;
obj.Device = {placeholder varargin};
else
% Nothing happens
end
end
function obj = addCell( obj, newcell )
n_old = length(obj.Device);
obj.Device{n_old+1} = newcell;
obj.Device{n_old+1}.CellID = obj.CellID + length(obj.Device)/100;
end
function obj = CircuitDraw(obj, targetAxes)
hold on
for CellIndex = 1:length(obj.Device)
obj.Device{CellIndex} = obj.Device{CellIndex}.ColorDraw();
end
hold off
end
end
end