parameters: (self)
return_statement: return text, options
docstring: Format the molecule into an orca xyz format
docstring_summary: Format the molecule into an orca xyz format
docstring_tokens: Format the molecule into an orca xyz format
function: def format_molecule_for_orca(self):
          """
          Format the molecule into an orca xyz format
          """
          options = collections.defaultdict(lambda: collections.defaultdict(dict))
          self.update_geometry()
          factor = 1.0 if self.PYunits == 'Angstrom' else qcel.constants.bohr2angstroms
  
          text = ""
          text += '* xyz {} {}\n'.format(self.molecular_charge(), self.multiplicity())
  
          n_frags = self.nfragments()
          for fr in range(n_frags):
              if self.fragment_types[fr] == 'Absent':
                  pass
              else:
                  for at in range(self.fragments[fr][0], self.fragments[fr][1] + 1):
                      if self.fragment_types[fr] == 'Ghost':
                          # TODO: add support for ghost atoms
                          # atom += ':'
                          continue
                      x, y, z = self.atoms[at].compute()
                      atom = self.symbol(at)
                      if n_frags > 1:
                          text += '    {:2s}({:d}) {:> 17.12f} {:> 17.12f} {:> 17.12f}\n'.format(\
                                  atom, fr + 1, x * factor, y * factor, z * factor)
                      else:
                          text += '    {:2s} {:> 17.12f} {:> 17.12f} {:> 17.12f}\n'.format(\
                                  atom, x * factor, y * factor, z * factor)
          text += '*'
  
          return text, options
function_tokens: def format_molecule_for_orca ( self ) : options = collections . defaultdict ( lambda : collections . defaultdict ( dict ) ) self . update_geometry ( ) factor = 1.0 if self . PYunits == 'Angstrom' else qcel . constants . bohr2angstroms text = "" text += '* xyz {} {}\n' . format ( self . molecular_charge ( ) , self . multiplicity ( ) ) n_frags = self . nfragments ( ) for fr in range ( n_frags ) : if self . fragment_types [ fr ] == 'Absent' : pass else : for at in range ( self . fragments [ fr ] [ 0 ] , self . fragments [ fr ] [ 1 ] + 1 ) : if self . fragment_types [ fr ] == 'Ghost' : # TODO: add support for ghost atoms # atom += ':' continue x , y , z = self . atoms [ at ] . compute ( ) atom = self . symbol ( at ) if n_frags > 1 : text += '    {:2s}({:d}) {:> 17.12f} {:> 17.12f} {:> 17.12f}\n' . format ( atom , fr + 1 , x * factor , y * factor , z * factor ) else : text += '    {:2s} {:> 17.12f} {:> 17.12f} {:> 17.12f}\n' . format ( atom , x * factor , y * factor , z * factor ) text += '*' return text , options