1# -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding:utf-8 -*-
2# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 fileencoding=utf-8
3#
4# MDAnalysis --- https://www.mdanalysis.org
5# Copyright (c) 2006-2017 The MDAnalysis Development Team and contributors
6# (see the file AUTHORS for the full list of names)
7#
8# Released under the GNU Public Licence, v2 or any higher version
9#
10# Please cite your use of MDAnalysis in published work:
11#
12# R. J. Gowers, M. Linke, J. Barnoud, T. J. E. Reddy, M. N. Melo, S. L. Seyler,
13# D. L. Dotson, J. Domanski, S. Buchoux, I. M. Kenney, and O. Beckstein.
14# MDAnalysis: A Python package for the rapid analysis of molecular dynamics
15# simulations. In S. Benthall and S. Rostrup editors, Proceedings of the 15th
16# Python in Science Conference, pages 102-109, Austin, TX, 2016. SciPy.
17#
18# N. Michaud-Agrawal, E. J. Denning, T. B. Woolf, and O. Beckstein.
19# MDAnalysis: A Toolkit for the Analysis of Molecular Dynamics Simulations.
20# J. Comput. Chem. 32 (2011), 2319--2327, doi:10.1002/jcc.21787
21#
22"""Analysis data files
23===================
24
25:mod:`MDAnalysis.analysis.data` contains data files that are used as part of
26analysis. These can be experimental or theoretical data. Files are stored
27inside the package and made accessible via variables in
28:mod:`MDAnalysis.analysis.data.filenames`. These variables are documented
29below, including references to the literature and where they are used
30inside :mod:`MDAnalysis.analysis`.
31
32Data files
33----------
34
35.. data:: Rama_ref
36
37   Reference Ramachandran histogram for :class:`MDAnalysis.analysis.dihedrals.Ramachandran`.
38   The data were calculated on a data set of 500 PDB structures taken from [Lovell2003]_.
39   This is a numpy array in the :math:`\phi` and :math:`psi` backbone dihedral angles.
40
41   Load and plot it with ::
42
43      import numpy as np
44      import matplotlib.pyplot as plt
45      from MDAnalysis.analysis.data.filenames import Rama_ref
46      X, Y = np.meshgrid(np.arange(-180, 180, 4), np.arange(-180, 180, 4))
47      Z = np.load(Rama_ref)
48      ax.contourf(X, Y, Z, levels=[1, 17, 15000])
49
50   The given levels will draw contours that contain 90% and 99% of the data
51   points. See the :ref:`Ramachandran plot figure <figure-ramachandran>` as an
52   example.
53
54.. data:: Janin_ref
55
56   Reference Janin histogram for :class:`MDAnalysis.analysis.dihedrals.Janin`.
57   The data were calculated on a data set of 500 PDB structures taken from [Lovell2003]_.
58   This is a numpy array in the :math:`\chi_1` and :math:`chi_2` sidechain dihedral angles.
59
60   Load and plot it with ::
61
62      import numpy as np
63      import matplotlib.pyplot as plt
64      from MDAnalysis.analysis.data.filenames import Janin_ref
65      X, Y = np.meshgrid(np.arange(-180, 180, 4), np.arange(-180, 180, 4))
66      Z = np.load(Janin_ref)
67      ax.contourf(X, Y, Z, levels=[1, 6, 600])
68
69   The given levels will draw contours that contain 90% and 98% of the
70   data. See the :ref:`Janin plot figure <figure-janin>` as an example.
71
72"""
73from __future__ import absolute_import
74
75__all__ = [
76    "Rama_ref", "Janin_ref" # reference plots for Ramachandran and Janin classes
77]
78
79from pkg_resources import resource_filename
80
81Rama_ref = resource_filename(__name__, 'rama_ref_data.npy')
82Janin_ref = resource_filename(__name__, 'janin_ref_data.npy')
83
84# This should be the last line: clean up namespace
85del resource_filename
86