
     iH                        U d Z g dZddlZddlZddlmZ  ej        d          Zddlm	Z	 	 ddl
mZ n"# e$ r e                    d	           g ZY nw xY wi Zeed
<   i Zeed<   i Zeed<   i Zeed<   i Zeed<   i Zeed<   i Zeed<   i Zeed<   i Zeed<   i Zeed<   i Zeed<   i Zeed<   ddlmZmZmZmZm Z m!Z!m"Z"m#Z# ddl$m%Z% ddl&m'Z'm(Z(  ej        d          )                     e%j*                               [ ej+        de,d           ddl-m.Z. ddl/m0Z0m1Z1 ddl2m3Z3m4Z4m5Z5 ddl6m7Z8 dd l-m9Z9 dd!l:m:Z:m;Z;m<Z<  e:j=         e;d"          d#dd$%            e:j=         e;d&          d#dd$%           [;[<dS )'a  
:mod:`MDAnalysis` --- analysis of molecular simulations in python
=================================================================

MDAnalysis (https://www.mdanalysis.org) is a python toolkit to analyze
molecular dynamics trajectories generated by CHARMM, NAMD, Amber,
Gromacs, or LAMMPS.

It allows one to read molecular dynamics trajectories and access the
atomic coordinates through numpy arrays. This provides a flexible and
relatively fast framework for complex analysis tasks. In addition,
CHARMM-style atom selection commands are implemented. Trajectories can
also be manipulated (for instance, fit to a reference structure) and
written out. Time-critical code is written in C for speed.

Help is also available through GitHub Discussions at
https://github.com/MDAnalysis/mdanalysis/discussions

Please report bugs and feature requests through the issue tracker at
https://github.com/MDAnalysis/mdanalysis/issues

Citation
--------

When using MDAnalysis in published work, please cite

    R. J. Gowers, M. Linke, J. Barnoud, T. J. E. Reddy, M. N. Melo, S. L. Seyler,
    D. L. Dotson, J. Domanski, S. Buchoux, I. M. Kenney, and O. Beckstein. 
    MDAnalysis: A Python package for the rapid analysis of molecular dynamics 
    simulations. In S. Benthall and S. Rostrup, editors, Proceedings of the 15th 
    Python in Science Conference, pages 98-105, Austin, TX, 2016. SciPy, 
    doi:10.25080/majora-629e541a-00e

    N. Michaud-Agrawal, E. J. Denning, T. B. Woolf, and
    O. Beckstein. MDAnalysis: A Toolkit for the Analysis of Molecular Dynamics
    Simulations. J. Comput. Chem. 32 (2011), 2319--2327, doi:`10.1002/jcc.21787`_
    https://www.mdanalysis.org

For citations of included algorithms and sub-modules please see the references_.

.. _`10.1002/jcc.21787`: http://dx.doi.org/10.1002/jcc.21787
.. _references: https://docs.mdanalysis.org/documentation_pages/references.html


Getting started
---------------

Import the package::

  >>> import MDAnalysis

(note that not everything in MDAnalysis is imported right away; for
additional functionality you might have to import sub-modules
separately, e.g. for RMS fitting ``import MDAnalysis.analysis.align``.)

Build a "universe" from a topology (PSF, PDB) and a trajectory (DCD, XTC/TRR);
here we are assuming that PSF, DCD, etc contain file names. If you don't have
trajectories at hand you can play with the ones that come with MDAnalysis for
testing (see below under `Examples`_)::

  >>> u = MDAnalysis.Universe(PSF, DCD)

Select the C-alpha atoms and store them as a group of atoms::

  >>> ca = u.select_atoms('name CA')
  >>> len(ca)
  214

Calculate the centre of mass of the CA and of all atoms::

  >>> ca.center_of_mass()
  array([ 0.06873595, -0.04605918, -0.24643682])
  >>> u.atoms.center_of_mass()
  array([-0.01094035,  0.05727601, -0.12885778])

Calculate the CA end-to-end distance (in angstroem)::
  >>> import numpy as np
  >>> coord = ca.positions
  >>> v = coord[-1] - coord[0]   # last Ca minus first one
  >>> np.sqrt(np.dot(v, v,))
  10.938133

Define a function eedist():
  >>> def eedist(atoms):
  ...     coord = atoms.positions
  ...     v = coord[-1] - coord[0]
  ...     return sqrt(dot(v, v,))
  ...
  >>> eedist(ca)
  10.938133

and analyze all timesteps *ts* of the trajectory::
  >>> for ts in u.trajectory:
  ...      print eedist(ca)
  10.9381
  10.8459
  10.4141
   9.72062
  ....

See Also
--------
:class:`MDAnalysis.core.universe.Universe` for details


Examples
--------

MDAnalysis comes with a number of real trajectories for testing. You
can also use them to explore the functionality and ensure that
everything is working properly::

  from MDAnalysis import *
  from MDAnalysis.tests.datafiles import PSF,DCD, PDB,XTC
  u_dims_adk = Universe(PSF,DCD)
  u_eq_adk = Universe(PDB, XTC)

The PSF and DCD file are a closed-form-to-open-form transition of
Adenylate Kinase (from [Beckstein2009]_) and the PDB+XTC file are ten
frames from a Gromacs simulation of AdK solvated in TIP4P water with
the OPLS/AA force field.

.. [Beckstein2009] O. Beckstein, E.J. Denning, J.R. Perilla and T.B. Woolf,
   Zipping and Unzipping of Adenylate Kinase: Atomistic Insights into the
   Ensemble of Open <--> Closed Transitions. J Mol Biol 394 (2009), 160--176,
   doi:10.1016/j.jmb.2009.09.009

)UniverseWriter	AtomGroupResidueGroupSegmentGroup    N)DictzMDAnalysis.__init__   )__version__)__authors__z5Could not find authors.py, __authors__ will be empty._READERS_READER_HINTS_SINGLEFRAME_WRITERS_MULTIFRAME_WRITERS_PARSERS_PARSER_HINTS_SELECTION_WRITERS_CONVERTERS_TOPOLOGY_ATTRS_TOPOLOGY_TRANSPLANTS_TOPOLOGY_ATTRNAMES	_GUESSERS)SelectionErrorNoDataErrorApplicationErrorSelectionWarningMissingDataWarningConversionWarningFileFormatWarningStreamWarning)log)start_loggingstop_logging
MDAnalysisonce)actioncategorymodule)units)r   Merge)r   r   r   )writer)
converters)dueDoiBibTeXz10.25080/majora-629e541a-00ez%Molecular simulation analysis libraryT)descriptionpathcite_modulez10.1002/jcc.21787)>__doc____all__loggingwarningstypingr   	getLoggerloggerversionr
   authorsr   ImportErrorinfor   __annotations__r   r   r   r   r   r   r   r   r   r   r   
exceptionsr   r   r   r   r   r   r   r   libr    lib.logr!   r"   
addHandlerNullHandlerfilterwarningsDeprecationWarning r(   core.universer   r)   core.groupsr   r   r   coordinates.corer*   r   r+   r,   r-   r.   cite     ]/srv/www/vhosts/g4struct/public_html/venv/lib/python3.11/site-packages/MDAnalysis/__init__.py<module>rM      sx  0  B N
M
M         
	0	1	1            $$$$$$$   
KKGHHHKKK $   t    d    T   $   t    D   T       t     T   	4   	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	       0 0 0 0 0 0 0 0  ,   * *?3?+<+< = = =  .|   
       + * * * * * * * > > > > > > > > > > . . . . . .       ! ! ! ! ! ! ! ! ! ! C&''7		    	C7		    s   4 AA