From cf1611c6e5bc4e4afd01ca563d069373a733e294 Mon Sep 17 00:00:00 2001 From: Zaher Salman Date: Thu, 3 Sep 2015 12:00:52 +0200 Subject: [PATCH] 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. --- trimsp/src/TrimSPGUI/TrimSPGUI.ui.h | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/trimsp/src/TrimSPGUI/TrimSPGUI.ui.h b/trimsp/src/TrimSPGUI/TrimSPGUI.ui.h index 9143262..30d782c 100644 --- a/trimsp/src/TrimSPGUI/TrimSPGUI.ui.h +++ b/trimsp/src/TrimSPGUI/TrimSPGUI.ui.h @@ -602,8 +602,25 @@ void TrimSPGUI::StartSequenceOne() # $cmd="mv -f $FILENAME.* ".$All{"Path"}; # 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 = ; + 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 - $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); $Progress=100; Progress->setProgress($Progress);