The chemical formula from the GUI (qt3) will be added to the _Seq_Results.dat file header and used by the root macro when plotting the fractions.
This commit is contained in:
parent
cf1611c6e5
commit
a97c72f59d
@ -2158,7 +2158,7 @@ sub removeRowFromTable
|
|||||||
}
|
}
|
||||||
|
|
||||||
sub ProjSmartDefaults
|
sub ProjSmartDefaults
|
||||||
{
|
{
|
||||||
|
|
||||||
my %All=();
|
my %All=();
|
||||||
# Get typeof projectile
|
# Get typeof projectile
|
||||||
@ -2475,6 +2475,17 @@ sub StartSequenceOne
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# 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);
|
||||||
|
}
|
||||||
|
# Change work directory accordingly
|
||||||
|
chdir ($All{"Path"});
|
||||||
|
|
||||||
|
|
||||||
# Cleanup from old files
|
# Cleanup from old files
|
||||||
if (-e "ausgabe1.inp") {
|
if (-e "ausgabe1.inp") {
|
||||||
system("rm -f ausgabe*");
|
system("rm -f ausgabe*");
|
||||||
@ -2594,8 +2605,25 @@ sub StartSequenceOne
|
|||||||
# $cmd="mv -f $FILENAME.* ".$All{"Path"};
|
# $cmd="mv -f $FILENAME.* ".$All{"Path"};
|
||||||
# system($cmd);
|
# system($cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# An easy way to keep track of chemical formula is to replace impL_i by the corresponding chemical formula of layer i
|
||||||
|
open (INF,q{<}, "fort.33" );
|
||||||
|
my @lines = <INF>;
|
||||||
|
close(INF);
|
||||||
|
my $all_lines = join("",@lines);
|
||||||
|
for (my $i=1;$i<=$All{"NL"};$i++){
|
||||||
|
my $LComp = "L".$i."Comp";
|
||||||
|
my $chem_formula = $All{"$LComp"};
|
||||||
|
my $place_holder = "impL".$i;
|
||||||
|
$all_lines =~ s/$place_holder/$chem_formula/g;
|
||||||
|
}
|
||||||
|
my $seq_file = $All{"FNPre"}."_Seq_Results.dat";
|
||||||
|
open (SEQF,q{>}, "$seq_file" );
|
||||||
|
print SEQF $all_lines;
|
||||||
|
close(SEQF);
|
||||||
|
|
||||||
# Move the fort.33 file into the subdirectory and change its name
|
# 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";
|
$cmd="rm -f eingabe1.inp; rm -f fort.33";
|
||||||
system($cmd);
|
system($cmd);
|
||||||
$Progress=100;
|
$Progress=100;
|
||||||
Progress->setProgress($Progress);
|
Progress->setProgress($Progress);
|
||||||
@ -2661,7 +2689,7 @@ sub PlotProfiles
|
|||||||
# "Warning:\nClose the plot using the menu FILE -> Quit ROOT\nDO NOT CLOSE USING X.");
|
# "Warning:\nClose the plot using the menu FILE -> Quit ROOT\nDO NOT CLOSE USING X.");
|
||||||
my $TrimPath = $ENV{'PERLLIB'};
|
my $TrimPath = $ENV{'PERLLIB'};
|
||||||
# Now that we have the file list send it to root macro for plotting.
|
# Now that we have the file list send it to root macro for plotting.
|
||||||
my $cmd='root -n -l "'.$TrimPath.'/plotRge.C(\"'.$filenames.'\")"&';
|
my $cmd='root -n -l "'.$TrimPath.'/../plotRge.C(\"'.$filenames.'\")"&';
|
||||||
|
|
||||||
# my $pid = open(FTO,"$cmd");
|
# my $pid = open(FTO,"$cmd");
|
||||||
# my $pid = open(FTO,"$cmd 2>&1 |");
|
# my $pid = open(FTO,"$cmd 2>&1 |");
|
||||||
@ -2688,10 +2716,12 @@ sub PlotFraction
|
|||||||
if ($file ne "" ) {
|
if ($file ne "" ) {
|
||||||
my $TrimPath = $ENV{'PERLLIB'};
|
my $TrimPath = $ENV{'PERLLIB'};
|
||||||
# Now that we have the file name send it to root macro for plotting.
|
# Now that we have the file name send it to root macro for plotting.
|
||||||
my $cmd='root -n -l "'.$TrimPath.'/plotFrc.C(\"'.$file.'\")"&';
|
my $cmd='root -n -l "'.$TrimPath.'/../plotFrc.C(\"'.$file.'\")"&';
|
||||||
|
|
||||||
my $pid=system($cmd);
|
my $pid=system($cmd);
|
||||||
}
|
}
|
||||||
|
my $pid=system($cmd);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -2702,8 +2732,6 @@ sub OpenAboutWindow
|
|||||||
my $HelpText="TrimSPGUI is free software: you can redistribute it and/or modify
|
my $HelpText="TrimSPGUI is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
TrimSPGUI is distributed in the hope that it will be useful,
|
TrimSPGUI is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
@ -2943,7 +2971,6 @@ sub GUIPath
|
|||||||
return $FileBrowser ;
|
return $FileBrowser ;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sub TrimBin
|
sub TrimBin
|
||||||
@ -2965,8 +2992,8 @@ sub TrimBin
|
|||||||
TRIMBIN->setText($file);
|
TRIMBIN->setText($file);
|
||||||
return $file;
|
return $file;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sub findDensity
|
sub findDensity
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -684,7 +684,7 @@ void TrimSPGUI::PlotProfiles()
|
|||||||
# "Warning:\nClose the plot using the menu FILE -> Quit ROOT\nDO NOT CLOSE USING X.");
|
# "Warning:\nClose the plot using the menu FILE -> Quit ROOT\nDO NOT CLOSE USING X.");
|
||||||
my $TrimPath = $ENV{'PERLLIB'};
|
my $TrimPath = $ENV{'PERLLIB'};
|
||||||
# Now that we have the file list send it to root macro for plotting.
|
# Now that we have the file list send it to root macro for plotting.
|
||||||
my $cmd='root -n -l "'.$TrimPath.'/plotRge.C(\"'.$filenames.'\")"&';
|
my $cmd='root -n -l "'.$TrimPath.'/../plotRge.C(\"'.$filenames.'\")"&';
|
||||||
|
|
||||||
# my $pid = open(FTO,"$cmd");
|
# my $pid = open(FTO,"$cmd");
|
||||||
# my $pid = open(FTO,"$cmd 2>&1 |");
|
# my $pid = open(FTO,"$cmd 2>&1 |");
|
||||||
@ -710,7 +710,7 @@ void TrimSPGUI::PlotFraction()
|
|||||||
if ($file ne "" ) {
|
if ($file ne "" ) {
|
||||||
my $TrimPath = $ENV{'PERLLIB'};
|
my $TrimPath = $ENV{'PERLLIB'};
|
||||||
# Now that we have the file name send it to root macro for plotting.
|
# Now that we have the file name send it to root macro for plotting.
|
||||||
my $cmd='root -n -l "'.$TrimPath.'/plotFrc.C(\"'.$file.'\")"&';
|
my $cmd='root -n -l "'.$TrimPath.'/../plotFrc.C(\"'.$file.'\")"&';
|
||||||
|
|
||||||
my $pid=system($cmd);
|
my $pid=system($cmd);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user