def create_portable_topology(topol, struct, **kwargs):
_topoldir, _topol = os.path.split(topol)<EOL>processed = kwargs.pop('<STR_LIT>', os.path.join(_topoldir, '<STR_LIT>'+_topol))<EOL>grompp_kwargs, mdp_kwargs = filter_grompp_options(**kwargs)<EOL>mdp_kwargs = add_mdp_includes(topol, mdp_kwargs)<EOL>with tempfile.NamedTemporaryFile(suffix='<STR_LIT>') as mdp:<EOL><INDENT>mdp.write('<STR_LIT>'.format(**mdp_kwargs))<EOL>mdp.flush()<EOL>grompp_kwargs['<STR_LIT:p>'] = topol<EOL>grompp_kwargs['<STR_LIT>'] = processed<EOL>grompp_kwargs['<STR_LIT:f>'] =  mdp.name<EOL>grompp_kwargs['<STR_LIT:c>'] = struct<EOL>grompp_kwargs['<STR_LIT:v>'] = False<EOL>try:<EOL><INDENT>gromacs.grompp(**grompp_kwargs)<EOL><DEDENT>finally:<EOL><INDENT>utilities.unlink_gmx('<STR_LIT>', '<STR_LIT>')<EOL><DEDENT><DEDENT>return utilities.realpath(processed)<EOL>
Create a processed topology.

    The processed (or portable) topology file does not contain any
    ``#include`` statements and hence can be easily copied around. It
    also makes it possible to re-grompp without having any special itp
    files available.

    :Arguments:
      *topol*
          topology file
      *struct*
          coordinat (structure) file

    :Keywords:
      *processed*
          name of the new topology file; if not set then it is named like
          *topol* but with ``pp_`` prepended
      *includes*
          path or list of paths of directories in which itp files are
          searched for
      *grompp_kwargs**
          other options for :program:`grompp` such as ``maxwarn=2`` can
          also be supplied

    :Returns: full path to the processed topology