package EnergyBand @ISA = qw() sub SetCrystal sub SetCrystal { my ($this,$crystal) = return $this->{'Crystal'} = $crystal; sub Crystal return shift->{'Crystal'}; sub SetXName sub SetXName { my ($this,$name)= return $this->{'XName'} = $name; sub XName return shift->{'XName'}; sub GetXName return shift->{'XName'}; sub SetYName sub SetYName { my ($this,$name)= return $this->{'YName'} = $name; sub YName return shift->{'YName'}; sub GetYName return shift->{'YName'}; sub GetXMinMax sub GetXMinMax { my $this = return ($this->{'XMin'}, $this->{'XMax'}); sub GetYMinMax sub GetYMinMax { my $this = return ($this->{'YMin'}, $this->{'YMax'}); sub GetMinMax sub GetMinMax { my $this = sub nData return scalar @$a; sub kx sub kx { my ($this,$i)= return $this->{'kx'}->[$i]; sub ky sub ky { my ($this,$i)= return $this->{'ky'}->[$i]; sub kz sub kz { my ($this,$i)= return $this->{'kz'}->[$i]; sub Distance sub Distance { my ($this,$i)= return $this->{'distance'}->[$i]; sub Energy sub Energy { my ($this,$i)= return $this->{'Energy'}->[$i]; sub Ne sub Ne { my ($this,$i)= return $this->{'Ne'}->[$i]; sub GetData my ($this, $i) = @_; sub pkx return shift->{'kx'}; sub pky return shift->{'ky'}; sub pkz return shift->{'kz'}; sub pDistance return shift->{'distance'}; sub pEnergy return shift->{'Energy'}; sub pNe return shift->{'Ne'}; sub Unit return shift->{'Unit'}; sub SetUnit sub SetUnit { my ($this,$u)= return $this->{'Unit'} = $u; sub new my ($module) = @_; return $this; sub DESTROY my $this = shift; sub GetBandBoundary my ($this, $fRecalc) = @_; return ($this->{'BoundaryDistances'}, $this->{'BoundaryPositions'}); return undef if($nData < 2); return (\@BoundaryDistances, \@BoundaryPositions); sub GetDistance my ($this, $kx0, $ky0, $kz0, $kx1, $ky1, $kz1, $crystal) = @_; return 0.0 if(not defined $kx0); return 0.0 if(not defined $kx1); return sqrt(($kx1-$kx0)^2+($ky1-$ky0)^2+($kz1-$kz0)^2); sub GetDistanceToPrevK my ($this, $i) = @_; return 0.0 if($i == 0); sub AddByKDE my ($this, $kx, $ky, $kz, $d, $e) = @_; return $i; return $i+1; sub AddByKDEN my ($this, $kx, $ky, $kz, $d, $e, $ne) = @_; return $i+1; sub CalXMinMax my ($this) = @_; return unless($pd); return if($nData <= 0); return ($min, $max); sub CalYMinMax my ($this) = @_; return unless($pe); return if($nData <= 0); return ($min, $max); sub CalMinMax my ($this) = @_; return 1;