EnergyProfile.write_to_file() — write to file

write_to_file(filename)
This writes the energy profile to a named file, or an open file handle (see modfile.File()). Each line in the file contains the index of the residue (starting from 1, not the PDB numbering) and the residue's energy.