code: def get_internal_energy(self, assign_ff=True, ff=None, mol2=False,
                              force_ff_assign=False):
          
          if not ff:
              ff = global_settings['buff']['force_field']
          if assign_ff:
              self.update_ff(ff, mol2=mol2, force_ff_assign=force_ff_assign)
          interactions = find_intra_ampal(self, ff.distance_cutoff)
          buff_score = score_interactions(interactions, ff)
          return buff_score
docs: Calculates the internal energy of the AMPAL object.
  
          This method is assigned to the buff_internal_energy property,
          using the default arguments.
  
          Parameters
          ----------
          assign_ff: bool, optional
              If true the force field will be updated if required.
          ff: BuffForceField, optional
              The force field to be used for scoring.
          mol2: bool, optional
              If true, mol2 style labels will also be used.
          force_ff_assign: bool, optional
              If true, the force field will be completely reassigned, ignoring the
              cached parameters.
  
          Returns
          -------
          BUFF_score: BUFFScore
              A BUFFScore object with information about each of the interactions and
              the atoms involved.