def __init__(self, s="<STR_LIT>", f="<STR_LIT>", n=None, force=None,<EOL>dirname=os.path.curdir, outdir=None):
self.tpr = self.filename(s, ext="<STR_LIT>", use_my_ext=True)<EOL>self.xtc = self.filename(f, ext="<STR_LIT>", use_my_ext=True)<EOL>self.ndx = n<EOL>self.dirname = dirname<EOL>self.outdir = utilities.realpath(outdir) if outdir is not None else None<EOL>self.force = force<EOL>self.nowater = {}     <EOL>self.proteinonly = {} <EOL>with utilities.in_dir(self.dirname, create=False):<EOL><INDENT>for f in (self.tpr, self.xtc, self.ndx):<EOL><INDENT>if f is None:<EOL><INDENT>continue<EOL><DEDENT>if not os.path.exists(f):<EOL><INDENT>msg = "<STR_LIT>".format(**vars())<EOL>warnings.warn(msg, category=MissingDataWarning)<EOL>logger.warn(msg)<EOL><DEDENT><DEDENT><DEDENT>logger.info("<STR_LIT>", self)<EOL>
Set up Transformer with structure and trajectory.

        Supply *n* = tpr, *f* = xtc (and *n* = ndx) relative to dirname.

        :Keywords:
           *s*
              tpr file (or similar); note that this should not contain
              position restraints if it is to be used with a reduced
              system (see :meth:`~Transformer.strip_water`)
           *f*
              trajectory (xtc, trr, ...)
           *n*
              index file (it is typically safe to leave this as ``None``; in
              cases where a trajectory needs to be centered on non-standard
              groups this should contain those groups)
           *force*
              Set the default behaviour for handling existing files:
                - ``True``: overwrite existing trajectories
                - ``False``: throw a IOError exception
                - ``None``: skip existing and log a warning [default]
           *dirname*
              directory in which all operations are performed, relative paths
              are interpreted relative to *dirname* [.]
           *outdir*
              directory under which output files are placed; by default
              the same directory where the input files live