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

Write :class:`MDAnalysis.core.groups.AtomGroup` selection to a
script `pml`_ file that defines PyMOL_ atomselect macros. To be used
in PyMOL like this::

  @macros.pml

The selections should appear in the user interface.

.. _PyMOL: http://www.pymol.org
.. _pml: http://pymol.sourceforge.net/newman/user/S0210start_cmds.html#6_5_1

.. autoclass:: SelectionWriter
   :inherited-members:
   )basec                   2    e Zd ZddgZdZdZdZdZd Zd Z	dS )	SelectionWriterPyMolpml\z# %s   c                 4    d }t          j        |d|          S )Nc                 <    d                     | j        dz             S )Nzindex {0:d}r   )formatindex)atoms    e/srv/www/vhosts/g4struct/public_html/venv/lib/python3.11/site-packages/MDAnalysis/selections/pymol.py_indexz*SelectionWriter._translate.<locals>._index7   s     ''a999    z |)r   join)selfatomskwargsr   s       r   
_translatezSelectionWriter._translate5   s'    	: 	: 	: yf---r   c                     |                     |                     d                     |                      dj        di || j        z   dz              d S )NzMDAnalysis PyMol selectionzselect {name!s}, 
 )writecommentr   continuation)r   outr   s      r   _write_headzSelectionWriter._write_head<   se    		$,,;<<===		&&000043DDtK	
 	
 	
 	
 	
r   N)
__name__
__module____qualname__r   extr   
commentfmtdefault_numtermsr   r   r   r   r   r   r   .   sQ        uF
CLJ. . .
 
 
 
 
r   r   N)__doc__ r   SelectionWriterBaser   r   r   r   <module>r(      sZ   2 $      
 
 
 
 
d. 
 
 
 
 
r   