I am a chemistry student and just started working on Computational Chemistry. I am a new user of perl and just strated learning it. I want to complete the following code. This is what I have done till now.
#!/usr/bin/perl # Write a single output file with # Bond_length Delocalization_range EDR # from each calculation here use strict; my $ELowSoFar = 0.0; # The lowest energy found so far my $FileLowSoFar = ''; # The file containing the lowest energy so far foreach my $files (<*log>){ # Loop over all of the files my $E=`grep "SCF Done" $files|awk "{print \\\$5}"`; chomp($E); +# Find the energy in this file # Check if the energy in this file is LOWER than the lowest en +ergy so far # If it is, then it is the NEW lowest energy so far # and the file containing is the new FileLowSoFar print "File $files has energy $E and the lowest energy so far +is $ELowSoFar\n"; } print "The lowest total energy was $ELowSoFar\n"; print "This was in file $FileLowSoFar\n";
In reply to Re^2: Making commond for large number of files
by acrobat118
in thread Making commond for large number of files
by acrobat118
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |