def dump_molecule(self, filepath=None, include_coms=False, **kwargs):
<EOL>if filepath is None:<EOL><INDENT>filepath = "<STR_LIT:_>".join(<EOL>(str(self.parent_system), str(self.molecule_id)))<EOL>filepath = '<STR_LIT:/>'.join((os.getcwd(), filepath))<EOL>filepath = '<STR_LIT:.>'.join((filepath, '<STR_LIT>'))<EOL><DEDENT>if '<STR_LIT>' not in self.mol.keys():<EOL><INDENT>atom_ids = '<STR_LIT>'<EOL><DEDENT>else:<EOL><INDENT>atom_ids = '<STR_LIT>'<EOL><DEDENT>if include_coms is True:<EOL><INDENT>mmol = deepcopy(self.mol)<EOL>mmol['<STR_LIT>'] = np.concatenate(<EOL>(mmol['<STR_LIT>'], np.array(['<STR_LIT>'])))<EOL>if '<STR_LIT>' not in self.mol.keys():<EOL><INDENT>pass<EOL><DEDENT>else:<EOL><INDENT>mmol['<STR_LIT>'] = np.concatenate(<EOL>(mmol['<STR_LIT>'], np.array(['<STR_LIT>'])))<EOL><DEDENT>mmol['<STR_LIT>'] = np.concatenate(<EOL>(mmol['<STR_LIT>'],<EOL>np.array([self.properties['<STR_LIT>']])))<EOL>mmol['<STR_LIT>'] = np.concatenate(<EOL>(mmol['<STR_LIT>'], np.array(['<STR_LIT>'])))<EOL>if '<STR_LIT>' not in self.mol.keys():<EOL><INDENT>pass<EOL><DEDENT>else:<EOL><INDENT>mmol['<STR_LIT>'] = np.concatenate(<EOL>(mmol['<STR_LIT>'], np.array(['<STR_LIT>'])))<EOL><DEDENT>mmol['<STR_LIT>'] = np.concatenate(<EOL>(mmol['<STR_LIT>'], np.array(<EOL>[self.properties['<STR_LIT>']['<STR_LIT>']])))<EOL>if self.properties['<STR_LIT>']['<STR_LIT>'] is not None:<EOL><INDENT>range_ = range(<EOL>len(self.properties['<STR_LIT>']['<STR_LIT>']))<EOL>for com in range_:<EOL><INDENT>mmol['<STR_LIT>'] = np.concatenate(<EOL>(mmol['<STR_LIT>'], np.array(['<STR_LIT>'])))<EOL>if '<STR_LIT>' not in self.mol.keys():<EOL><INDENT>pass<EOL><DEDENT>else:<EOL><INDENT>mmol['<STR_LIT>'] = np.concatenate(<EOL>(mmol['<STR_LIT>'],<EOL>np.array(['<STR_LIT>'.format(com + <NUM_LIT:1>)])))<EOL><DEDENT>mmol['<STR_LIT>'] = np.concatenate(<EOL>(mmol['<STR_LIT>'], np.array([<EOL>self.properties['<STR_LIT>']['<STR_LIT>'][com]<EOL>])))<EOL><DEDENT><DEDENT>self._Output.dump2file(mmol, filepath, atom_ids=atom_ids, **kwargs)<EOL><DEDENT>else:<EOL><INDENT>self._Output.dump2file(<EOL>self.mol, filepath, atom_ids=atom_ids, **kwargs)<EOL><DEDENT>
Dump a :class:`Molecule` to a file (PDB or XYZ).

Kwargs are passed to :func:`pywindow.io_tools.Output.dump2file()`.

For validation purposes an overlay of window centres and COMs can also
be dumped as:

He - for the centre of mass

Ne - for the centre of the optimised cavity

Ar - for the centres of each found window

Parameters
----------
filepath : :class:`str`
   The filepath for the dumped file. If :class:`None`, the file is
   dumped localy with :attr:`molecule_id` as filename.
   (defualt=None)

include_coms : :class:`bool`
    If True, dump also with an overlay of window centres and COMs.
    (default=False)

Returns
-------
None : :class:`NoneType`