original_docstring: 
          Save the scan energies to the file using the given `angles` in radians
          and corresponding energies `energies` in J/mol. The file is created to
          use the given `angleUnits` for angles and `energyUnits` for energies.
          
docstring: Save the scan energies to the file using the given `angles` in radians
  and corresponding energies `energies` in J/mol. The file is created to
  use the given `angleUnits` for angles and `energyUnits` for energies.
docstring_tokens: Save the scan energies to the file using the given ` angles ` in radians and corresponding energies ` energies ` in J / mol . The file is created to use the given ` angleUnits ` for angles and ` energyUnits ` for energies .
code: def save(self, angles, energies, angleUnits='radians', energyUnits='kJ/mol'):
          """
          Save the scan energies to the file using the given `angles` in radians
          and corresponding energies `energies` in J/mol. The file is created to
          use the given `angleUnits` for angles and `energyUnits` for energies.
          """
          assert len(angles) == len(energies)
          
          try:
              angleFactor = ScanLog.angleFactors[angleUnits]
          except KeyError:
              raise ValueError('Invalid angle units {0!r}.'.format(angleUnits))
          try:
              energyFactor = ScanLog.energyFactors[energyUnits]
          except KeyError:
              raise ValueError('Invalid energy units {0!r}.'.format(energyUnits))
          
          with open(self.path, 'w') as stream:
              stream.write('{0:>24} {1:>24}\n'.format(
                  'Angle ({0})'.format(angleUnits),
                  'Energy ({0})'.format(energyUnits),
              ))
              for angle, energy in zip(angles, energies):
                  stream.write('{0:23.10f} {1:23.10f}\n'.format(angle * angleFactor, energy * energyFactor))
code_tokens: def save ( self , angles , energies , angleUnits = 'radians' , energyUnits = 'kJ/mol' ) : assert len ( angles ) == len ( energies ) try : angleFactor = ScanLog . angleFactors [ angleUnits ] except KeyError : raise ValueError ( 'Invalid angle units {0!r}.' . format ( angleUnits ) ) try : energyFactor = ScanLog . energyFactors [ energyUnits ] except KeyError : raise ValueError ( 'Invalid energy units {0!r}.' . format ( energyUnits ) ) with open ( self . path , 'w' ) as stream : stream . write ( '{0:>24} {1:>24}\n' . format ( 'Angle ({0})' . format ( angleUnits ) , 'Energy ({0})' . format ( energyUnits ) , ) ) for angle , energy in zip ( angles , energies ) : stream . write ( '{0:23.10f} {1:23.10f}\n' . format ( angle * angleFactor , energy * energyFactor ) )
short_docstring: Save the scan energies to the file using the given `angles` in radians
  and corresponding energies `energies` in J/mol.
short_docstring_tokens: Save the scan energies to the file using the given ` angles ` in radians and corresponding energies ` energies ` in J / mol .
comment: """
          Save the scan energies to the file using the given `angles` in radians
          and corresponding energies `energies` in J/mol. The file is created to
          use the given `angleUnits` for angles and `energyUnits` for energies.
          """