package Rietan @ISA = qw() sub ClearAll sub ClearAll { my $this= sub GetpDiffractionPeakArray return shift->{'DiffractionPeakArray'}; sub GetnDiffractionPeakArray return scalar @$array; sub FileType return shift->{'FileType'}; sub FileName return shift->{'FileName'}; sub SetFileName sub SetFileName { my ($this,$f)= return $this->{'FileName'} = $f; sub DataArray return shift->{'DataArray'}; sub SetDataArray my ($this, $DataArray) = @_; return $this->{'DataArray'} = $DataArray; sub iLaueG return shift->{'iLaueG'}; sub iCenter return shift->{'iCenter'}; sub new my ($module) = @_; return $this; sub DESTROY my $this = shift; sub CheckFileType my ($path) = @_; return "Rietan Intensity File"; return "Rietan Input File"; return "Rietan Output File"; return "RINT2000 ASCIIFile"; return undef unless($ret); return "TOPAS Text File" if($line3 =~ /DIFFRAC/); return undef; return undef unless($ret); return "Rietan Pattern File (IGOR)" unless($line2 =~ /yobs/); return "Rietan Fitting Pattern File (IGOR)"; return "RietanFP Pattern File (RietPlot)"; return "Rietan Pattern File (RietPlot)"; return "Rietan Pattern File (gnuplot)"; return "Rietan Fitting Pattern File"; return undef; return undef; sub ReadIGORPatternFile my ($this, $filename) = @_; return undef unless($ret); return $filename; sub ReadRietPlotFile my ($this, $filename) = @_; return undef unless($ret); return $filename; sub ReadRietanFPRietPlotFile my ($this, $filename) = @_; return undef unless($ret); return $filename; sub ReadgnuplotFile my ($this, $filename) = @_; return undef unless($ret); return $filename; sub ReadIntFile my ($this, $filename) = @_; return undef unless($ret); return $filename; sub ReadIGORFittingPatternFile my ($this, $filename) = @_; return undef unless($ret); return $filename; sub ReadFittingPatternFile my ($this, $filename) = @_; return undef unless($ret); return $filename; sub ReadTOPASTextFile my ($this, $filename) = @_; return undef unless($ret); return $filename; sub ReadRINT2000ASCIIFile my ($this, $filename) = @_; return undef unless($in); return $filename; sub Read my ($this, $filename) = @_; return $this->ReadIntFile($filename); return $this->ReadIGORPatternFile($filename); return $this->ReadRietanFPRietPlotFile($filename); return $this->ReadRietPlotFile($filename); return $this->ReadgnuplotFile($filename); return $this->ReadIGORFittingPatternFile($filename); return $this->ReadFittingPatternFile($filename); return 1; return 1; return $this->ReadTOPASTextFile($filename); return $this->ReadRINT2000ASCIIFile($filename); sub SetSampleName my ($this, $name) = @_; return $this->{'SampleName'} = $name; sub SampleName my ($this) = @_; return $this->{'SampleName'}; sub SPGDBPath my ($this) = @_; return $SpaceGroupDBPath; sub GetASFDCAtoms my ($this, $asfdcfile) = @_; return undef; return @Atoms; sub ReadASFParameters my ($this, $AtomName, $asfdcfile, $XraySource) = @_; return undef; return undef if(!defined $line2); return @a1; sub AtomicScatteringFactor my ($this, $s) = @_; return $this->asf($s); sub asfElectron my ($this, $s) = @_; return $k * ($Z - $asfXray) / $s2; sub asf my ($this, $s) = @_; return cplx($asf + $pP->[10], $pP->[11]); return $asf; sub HydrogenAtomicScatteringFactor my ($this, $s) = @_; return 1.0 / $a / $a; sub ReadSpaceGroup my ($this, $ispg, $iset) = @_; return 0 unless(open(IN,"<$SpaceGroupDBPath")); return $SPG; return 0; sub ReadSpaceGroupFromSPGName my ($this, $SPGName) = @_; return $this->ReadSpaceGroup($iSPG, $iSet); sub GetiSPGFromSPGName my ($this, $SPGName) = @_; return 0 unless(open(IN,"<$SpaceGroupDBPath")); return ($count, $iSPG, $iSet); return (-1, -1, -1); sub GetSpaceGroupList my ($this) = @_; return 0 unless(open(IN,"<$SpaceGroupDBPath")); return \@list; sub FindNearestAtom my ($this, $name, $charge) = @_; return -1; return ($NearestName, @list); sub FindIdenticalSpaceGroup my ($this,$SPG) = @_; return $RSPG; return -1; sub Execute my ($this, $filepath, $Actgion, $Program) = @_; return 0; return 0; return; return; return; return; return ($inspath, $intpath, $patpath, $lstpath, $csvpath); sub SaveInsFile my ($this, $Crystal, $filename, $IsExpandCoordinate, $IsChooseRandomly, $IsSimulation, $StartAngle, $EndAngle, $StepAngle, $Program) = @_; return; return -1; return; return 1;