
     i                         d Z ddlZddlZddlmZ ddlmZ ddlm	Z	 ddl
mZmZmZmZmZmZ  G d	 d
e          Z G d de          ZdS )a?  
GAMESS Topology Parser
======================

.. versionadded:: 0.9.1

Reads a GAMESS_ output file (also Firefly_ and `GAMESS-UK`_) and pulls
element information from it.  Symmetrical assembly is read (not
symmetry element!).  Atom names are read from the GAMESS section.  Any
information about residues or segments will not be populated.

.. _GAMESS: http://www.msg.ameslab.gov/gamess/
.. _Firefly: http://classic.chem.msu.su/gran/gamess/index.html
.. _`GAMESS-UK`: http://www.cfs.dl.ac.uk/


Classes
-------

.. autoclass:: GMSParser
   :members:
   :inherited-members:

    N   )openany   )TopologyReaderBase)Topology)Atomids	AtomnamesResidsResnumsSegidsAtomAttrc                       e Zd ZdZdZdZdS )AtomicChargesatomicchargesatomicchargeatomN)__name__
__module____qualname__attrnamesingular
per_object     g/srv/www/vhosts/g4struct/public_html/venv/lib/python3.11/site-packages/MDAnalysis/topology/GMSParser.pyr   r   @   s        HHJJJr   r   c                       e Zd ZdZdZd ZdS )	GMSParsera  GAMESS_ topology parser.

    Creates the following Attributes:
     - names
     - atomic charges


    .. note::

        By default, atomtypes and masses will be guessed on Universe creation.
        This may change in release 3.0.
        See :ref:`Guessers` for more information.

    .. versionadded:: 0.9.1
    .. versionchanged:: 2.8.0
        Removed type and mass guessing (attributes guessing takes place now
        through universe.guess_TopologyAttrs() API).

    GMSc                 :   g }g }t          | j                  5 }	 |                                }|st          t	          j        d|          rn4|                                }	 |                                }t	          j        d|          }|no|                    d          }t          t          |                    d                              }|	                    |           |	                    |           	 ddd           n# 1 swxY w Y   t          |          }	t          t          j        |	          dz             t          t          j        |t                               t#          t          j        |t          j                            t'          t          j        dg                    t)          t          j        dg                    t+          t          j        dgt                               g}
t-          |	dd|
	          }|S )
z&Read list of atoms from a GAMESS file.Tz,^\s+ATOM\s+ATOMIC\s+COORDINATES\s*\(BOHR\).*zs^\s*([A-Za-z_][A-Za-z_0-9]*)\s+([0-9]+\.[0-9]+)\s+(\-?[0-9]+\.[0-9]+)\s+(\-?[0-9]+\.[0-9]+)\s+(\-?[0-9]+\.[0-9]+).*Nr   r   )dtypeSYSTEM)attrs)r   filenamereadlineEOFErrorrematchgroupintfloatappendlenr   nparanger	   arrayobjectr   int32r
   r   r   r   )selfkwargsnames
at_chargesinfline_mname	at_chargen_atomsr"   tops               r   parsezGMSParser.parse]   s   
T]## 	-s||~~ #"N8CT    <<>>D-||~~X K  :xx{{bhhqkk 2 233	T"""!!),,,- %	- 	- 	- 	- 	- 	- 	- 	- 	- 	- 	- 	- 	- 	- 	-4 e**BIg&&*++bhuF33344"(:RX>>>??28QC==!!BHaSMM""28XJf55566
 w1E222
s   C&DDDN)r   r   r   __doc__formatr=   r   r   r   r   r   F   s4         ( F* * * * *r   r   )r>   r&   numpyr-   lib.utilr   baser   core.topologyr   core.topologyattrsr   r	   r
   r   r   r   r   r   r   r   r   <module>rE      s  0 0 
			           $ $ $ $ $ $ $ $ $ $ $ $                   H   A A A A A" A A A A Ar   