the better method of I/O from file
First, Where are you writing in ofile?

Second, ;) you can use with statement to opening and closing files like below:

pattern=r'species,subl,cmp=\s{4}(.*)\s{4}(.*)\s{4}(.*)\s{3}s1,torque=(.{12})(.{12})'
infile=sys.argv[1]; outfile=sys.argv[2]
with open(infile, "r") as ifile, open(outfile, "w") as ofile:
    for line in ifile:
        match = re.match(pattern, line)
        if match:
            ofile.write('%g %12.5e %12.5e' % (int(match.group(1)), float(match.group(4)), float(match.group(5))))