Corrected C error in stopicru and other tweeks.

This commit is contained in:
salman 2009-09-14 13:26:57 +00:00
parent aa61b3eee6
commit 4c8fd5730e
3 changed files with 44 additions and 28 deletions

View File

@ -541,7 +541,7 @@ sub Stopicru {
"Li", "1.41100,1.60000,725.59998,3013.00000,0.04578",
"Be", "2.24800,2.59000,966.00000,153.80000,0.03475",
"B", "2.47400,2.81500,1206.00000,1060.00000,0.02855",
"C", "0.00000,2.60100,1701.00000,1279.00000,0.01638",
"C", "2.60100,2.60100,1701.00000,1279.00000,0.01638",
"N", "2.95400,3.35000,1683.00000,1900.00000,0.02513",
"O", "2.65200,3.00000,1920.00000,2000.00000,0.02230",
"F", "2.08500,2.35200,2157.00000,2634.00000,0.01816",

View File

@ -1,6 +1,6 @@
# Form implementation generated from reading ui file 'TrimSPGUItabs.ui'
#
# Created: Wed Sep 9 15:14:26 2009
# Created: Mon Sep 14 15:05:11 2009
# by: The PerlQt User Interface Compiler (puic)
#
# WARNING! All changes made in this file will be lost!
@ -1631,7 +1631,7 @@ sub CreateInpFile
{
# use lib '$ENV{HOME}/Projects/TrimSPGUI/Chem';
push @INC, "$ENV{HOME}/Projects/TrimSPGUI";
# push @INC, "$ENV{HOME}/Projects/TrimSPGUI";
use Chem;
# The proper way I think is not to have scan sequences implimented here
# but rather call this multiple times to generate the scan
@ -1640,7 +1640,7 @@ sub CreateInpFile
# These will be stored in keys L1/2/3/4/5/6/7d, E, SigE and NProj, respectively.
# Chemical formulas will be parsed on the fly for each layer. However, we will check if
# all the layers have inputs for coposition, thickness and density. If not fail and crash :)
# all the layers have inputs for composition, thickness and density. If not fail and crash :)
# Values of Z,A as well as other needed parameters are obtained from Chem.pm.
@ -1828,13 +1828,6 @@ sub StartSequenceOne
my %All = CollectValues();
my @SValues=();
my $cmd="";
# Create a subdirectory where all input/output files are saved
if (-d $All{"Path"}) {
# Directory exists, do nothing
} else {
$cmd="mkdir ".$All{"Path"};
system($cmd);
}
# Cleanup from old files
if (-e "ausgabe1.inp") {
@ -1890,11 +1883,14 @@ sub StartSequenceOne
system($cmd);
$Progress=$Progress+90/$#SValues;
Progress->setProgress($Progress);
Progress->update();
foreach ("err","out","rge") {
system("mv -f ausgabe1.$_ $FILENAME.$_");
}
$cmd="mv -f $FILENAME.* ".$All{"Path"};
system($cmd);
# Not needed if work path is changed
# $cmd="mv -f $FILENAME.* ".$All{"Path"};
# system($cmd);
}
} else {
# For a single run
@ -1917,8 +1913,9 @@ sub StartSequenceOne
}
$Progress=90;
Progress->setProgress($Progress);
$cmd="mv -f $FILENAME.* ".$All{"Path"};
system($cmd);
# If we change work directory this is not needed
# $cmd="mv -f $FILENAME.* ".$All{"Path"};
# system($cmd);
}
# Move the fort.33 file into the subdirectory and change its name
$cmd="rm -f eingabe1.inp; mv -f fort.33 ".$All{"Path"}."/".$All{"FNPre"}."_Seq_Results.dat";
@ -1935,6 +1932,17 @@ sub DirectoryBrowse
my $FileBrowser = Qt::FileDialog::getExistingDirectory("./",this,"get existing directory","Choose a directory",1);
if ($FileBrowser eq "") {$FileBrowser="./";}
Path->setText($FileBrowser);
# Create a subdirectory where all input/output files are saved
my $cmd="";
if (-d $FileBrowser) {
# Directory exists, do nothing
} else {
$cmd="mkdir $FileBrowser";
system($cmd);
}
# Change work directory accordingly
chdir ("$FileBrowser");
}

View File

@ -253,7 +253,7 @@ void TrimSPGUI::CollectValues()
void TrimSPGUI::CreateInpFile()
{
# use lib '$ENV{HOME}/Projects/TrimSPGUI/Chem';
push @INC, "$ENV{HOME}/Projects/TrimSPGUI";
# push @INC, "$ENV{HOME}/Projects/TrimSPGUI";
use Chem;
# The proper way I think is not to have scan sequences implimented here
# but rather call this multiple times to generate the scan
@ -262,7 +262,7 @@ void TrimSPGUI::CreateInpFile()
# These will be stored in keys L1/2/3/4/5/6/7d, E, SigE and NProj, respectively.
# Chemical formulas will be parsed on the fly for each layer. However, we will check if
# all the layers have inputs for coposition, thickness and density. If not fail and crash :)
# all the layers have inputs for composition, thickness and density. If not fail and crash :)
# Values of Z,A as well as other needed parameters are obtained from Chem.pm.
@ -449,13 +449,6 @@ void TrimSPGUI::StartSequenceOne()
my %All = CollectValues();
my @SValues=();
my $cmd="";
# Create a subdirectory where all input/output files are saved
if (-d $All{"Path"}) {
# Directory exists, do nothing
} else {
$cmd="mkdir ".$All{"Path"};
system($cmd);
}
# Cleanup from old files
if (-e "ausgabe1.inp") {
@ -511,11 +504,14 @@ void TrimSPGUI::StartSequenceOne()
system($cmd);
$Progress=$Progress+90/$#SValues;
Progress->setProgress($Progress);
Progress->update();
foreach ("err","out","rge") {
system("mv -f ausgabe1.$_ $FILENAME.$_");
}
$cmd="mv -f $FILENAME.* ".$All{"Path"};
system($cmd);
# Not needed if work path is changed
# $cmd="mv -f $FILENAME.* ".$All{"Path"};
# system($cmd);
}
} else {
# For a single run
@ -538,8 +534,9 @@ void TrimSPGUI::StartSequenceOne()
}
$Progress=90;
Progress->setProgress($Progress);
$cmd="mv -f $FILENAME.* ".$All{"Path"};
system($cmd);
# If we change work directory this is not needed
# $cmd="mv -f $FILENAME.* ".$All{"Path"};
# system($cmd);
}
# Move the fort.33 file into the subdirectory and change its name
$cmd="rm -f eingabe1.inp; mv -f fort.33 ".$All{"Path"}."/".$All{"FNPre"}."_Seq_Results.dat";
@ -555,6 +552,17 @@ void TrimSPGUI::DirectoryBrowse()
my $FileBrowser = Qt::FileDialog::getExistingDirectory("./",this,"get existing directory","Choose a directory",1);
if ($FileBrowser eq "") {$FileBrowser="./";}
Path->setText($FileBrowser);
# Create a subdirectory where all input/output files are saved
my $cmd="";
if (-d $FileBrowser) {
# Directory exists, do nothing
} else {
$cmd="mkdir $FileBrowser";
system($cmd);
}
# Change work directory accordingly
chdir ("$FileBrowser");
}