parameters: ()
return_statement: return data
docstring: Create the data structure available to the Jinja2 renderer when
      filling in the templates.
  
      This function extracts all of classes in ``openmm.openmm`` and returns
      a dictionary with them grouped into three lists, the integrators, the forces,
      and the remainder (library_extras).
  
      A couple core classes are skipped, because they're included manually in the
      template.
docstring_summary: Create the data structure available to the Jinja2 renderer when
      filling in the templates.
docstring_tokens: Create the data structure available to the Jinja2 renderer when filling in the templates .
function: def library_template_variables():
      """Create the data structure available to the Jinja2 renderer when
      filling in the templates.
  
      This function extracts all of classes in ``openmm.openmm`` and returns
      a dictionary with them grouped into three lists, the integrators, the forces,
      and the remainder (library_extras).
  
      A couple core classes are skipped, because they're included manually in the
      template.
      """
      data = {
          'integrators': [],
          'forces': [],
          'library_extras': [],
          'units': [],
      }
  
      mm_klasses = inspect.getmembers(openmm, predicate=inspect.isclass)
  
  
      # gather all Force subclasses
      for name, klass in mm_klasses:
          if issubclass(klass, openmm.openmm.Force):
              data['forces'].append(fullname(klass))
  
      # gather all Integrator subclasses
      for _, klass in mm_klasses:
          if issubclass(klass, openmm.openmm.Integrator):
              data['integrators'].append(fullname(klass))
  
      # gather all extra subclasses in openmm.openmm
  
      # core classes that are already included in library.rst.jinja2
      exclude = ['openmm.openmm.Platform', 'openmm.openmm.Context',
                'openmm.openmm.System', 'openmm.openmm.State']
      exclude.extend(data['forces'])
      exclude.extend(data['integrators'])
  
      # these classes are useless and not worth documenting.
      exclude.extend([
          'openmm.openmm.SwigPyIterator',
          'openmm.openmm.OpenMMException'])
  
      for _, klass in mm_klasses:
          full = fullname(klass)
          if full not in exclude and not klass.__name__[0].islower():
              data['library_extras'].append(full)
  
      # gather units related classes
      unit_klasses = inspect.getmembers(openmm.unit, predicate=inspect.isclass)
      for name, klass in unit_klasses:
          data['units'].append(fullname(klass))
  
      return data
function_tokens: def library_template_variables ( ) : data = { 'integrators' : [ ] , 'forces' : [ ] , 'library_extras' : [ ] , 'units' : [ ] , } mm_klasses = inspect . getmembers ( openmm , predicate = inspect . isclass ) # gather all Force subclasses for name , klass in mm_klasses : if issubclass ( klass , openmm . openmm . Force ) : data [ 'forces' ] . append ( fullname ( klass ) ) # gather all Integrator subclasses for _ , klass in mm_klasses : if issubclass ( klass , openmm . openmm . Integrator ) : data [ 'integrators' ] . append ( fullname ( klass ) ) # gather all extra subclasses in openmm.openmm # core classes that are already included in library.rst.jinja2 exclude = [ 'openmm.openmm.Platform' , 'openmm.openmm.Context' , 'openmm.openmm.System' , 'openmm.openmm.State' ] exclude . extend ( data [ 'forces' ] ) exclude . extend ( data [ 'integrators' ] ) # these classes are useless and not worth documenting. exclude . extend ( [ 'openmm.openmm.SwigPyIterator' , 'openmm.openmm.OpenMMException' ] ) for _ , klass in mm_klasses : full = fullname ( klass ) if full not in exclude and not klass . __name__ [ 0 ] . islower ( ) : data [ 'library_extras' ] . append ( full ) # gather units related classes unit_klasses = inspect . getmembers ( openmm . unit , predicate = inspect . isclass ) for name , klass in unit_klasses : data [ 'units' ] . append ( fullname ( klass ) ) return data