
     i                     <    d Z ddlmZ  G d dej                  ZdS )a  
VMD selections
==============

Write :class:`MDAnalysis.core.groups.AtomGroup` selection to a VMD_ `tcl` file
(for example, "macros.vmd") that defines `atomselect macros`_. To be used in
VMD like this (assuming the default macro name "mdanalysis001"):

.. code-block:: tcl

   source macros.vmd
   set sel [atomselect top mdanalysis001]

In the VMD_ GUI the macro "mdanalysis001" appears in the
:menuselection:`Graphics --> Representations` window under
:guilabel:`Selections: Singlewords`.


.. _VMD: http://www.ks.uiuc.edu/Research/vmd/
.. _atomselect macros: http://www.ks.uiuc.edu/Research/vmd/current/ug/node120.html

.. autoclass:: SelectionWriter
   :inherited-members:

   )basec                   0    e Zd ZdZdZdZdZd Zd Zd Z	dS )	SelectionWriterVMDvmd\z# %sc                     |                     |                     d                     |                      dj        di |           d S )NzMDAnalysis VMD selectionz"atomselect macro {name!s} {{index  )writecommentformatselfoutkwargss      c/srv/www/vhosts/g4struct/public_html/venv/lib/python3.11/site-packages/MDAnalysis/selections/vmd.py_write_headzSelectionWriter._write_head;   sN    		$,,9::;;;		=6=GGGGHHHHH    c                     d |D             S )Nc                 6    g | ]}t          |j                  S r
   )strindex).0atoms     r   
<listcomp>z.SelectionWriter._translate.<locals>.<listcomp>A   s     222DDJ222r   r
   )r   atomsr   s      r   
_translatezSelectionWriter._translate?   s    22E2222r   c                 0    |                     d           d S )N})r   r   s      r   _write_tailzSelectionWriter._write_tailC   s    		#r   N)
__name__
__module____qualname__r   extcontinuation
commentfmtr   r   r    r
   r   r   r   r   5   sX        F
CLJI I I3 3 3    r   r   N)__doc__ r   SelectionWriterBaser   r
   r   r   <module>r*      sZ   2 2          d.     r   