{"action":"created","comment":{"url":"https://api.github.com/repos/MDAnalysis/mdanalysis/pulls/comments/53996156","id":53996156,"diff_hunk":"@@ -773,3 +536,325 @@ def plot_qavg(self, filename=None, **kwargs):\n \n         if filename is not None:\n             savefig(filename)\n+\n+\n+def best_hummer_q(r, r0, beta=5.0, lambda_constant=1.8):\n+    \"\"\"Calculate the Best-Hummer fraction of native contacts (Q)\n+\n+    A soft-cutoff contacts analysis\n+\n+    Parameters\n+    ----------\n+    r: array\n+      Contact distances at time t \n+    r0: array\n+      Contact distances at time t=0, reference distances\n+    beta: float (default 5.0 Angstrom)\n+      Softness of the switching function\n+    lambda_constant: float (default 1.8, unitless)\n+      Reference distance tolerance\n+\n+    Returns\n+    -------\n+    Q : float\n+      Fraction of native contacts\n+    result : array\n+      Intermediate, r-r0 array transformed by the switching function\n+    \"\"\"\n+    result = 1/(1 + np.exp(beta*(r - lambda_constant * r0)))\n+\n+    return result.sum() / len(r0), result\n+\n+\n+class Contacts(AnalysisBase):\n+    \"\"\"Calculate fraction of native contacts (Q) from a trajectory\n+\n+    Inputs\n+    ------\n+    Two string selections for the contacting AtomGroups, \n+    the groups could be protein-lipid or protein-protein. \n+\n+    Use two reference AtomGroups to obtain reference distances (r0)\n+    for the cotacts. \n+\n+    Methods available\n+    -----------------\n+    Supports either hard-cutoff or soft-cutoff (Best-Hummer like) contacts. \n+\n+    Returns\n+    -------\n+    list \n+        Returns a list of following structure::\n+            {\n+                [[t1, q1], [t2, q2], ... [tn, qn]]\n+            }\n+        where t is time in ps and q is the fraction of native contacts\n+\n+    Examples\n+    --------\n+\n+    1. Protein folding\n+\n+        ref = Universe(\"villin.gro\")\n+        u = Universe(\"conf_protein.gro\", \"traj_protein.xtc\")\n+        Q = calculate_contacts(u, ref, \"protein and not name H*\", \"protein and not name H*\")\n+\n+    2. A pair of helices\n+\n+        ref = Universe(\"glycophorin_dimer.pdb\")\n+        u = Universe(\"conf_protein.gro\", \"traj_protein.xtc\")\n+        Q = calculate_contacts(u, ref, \"protein and resid 75-92 and not name H* and segid A\", \"protein and resid 75-92 and not name H* and segid B\")\n+\n+    Parater choices\n+    ---------------\n+    There are recommendations and not strict orders. \n+    These parameters should be insensitive to small changes. \n+    * For all-atom simulations, radius = 4.5 A and lambda_constant = 1.8 (unitless)\n+    * For coarse-grained simulations, radius = 6.0 A and lambda_constant = 1.5 (unitless)\n+\n+    Additional\n+    ----------\n+    Supports writing and reading the analysis results to and from a text file. \n+    Supports simple plotting operations, for exploratory data analysis. \n+\n+    Reference\n+    ---------\n+    Using the definition from Best, Hummer, and Eaton, \"Native contacts determine protein folding mechanisms in atomistic simulations\" PNAS (2013) 10.1073/pnas.1311599110        \n+\n+    Eq. (1) of the SI defines the expression for the fraction of native contacts, $Q(X)$:\n+    .. math:: \n+\n+        Q(X) = \\frac{1}{|S|} \\sum_{(i,j) \\in S} \\frac{1}{1 + \\exp[\\beta(r_{ij}(X) - \\lambda r_{ij}^0)]}\n+\n+    where:\n+\n+    * :math:`X` is a conformation,\n+    * :math:`r_{ij}(X)` is the distance between atoms $i$ and $j$ in conformation $X$,\n+    * :math:`r^0_{ij}` is the distance from heavy atom i to j in the native state conformation,\n+    * :math:`S` is the set of all pairs of heavy atoms $(i,j)$ belonging to residues $\\theta_i$ and $\\theta_j$ such that $|\\theta_i - \\theta_j| > 3$ and $r^0_{i,} < 4.5 \\unicode{x212B}$,\n+    * :math:`\\beta=5 \\unicode{x212B}^{-1},\n+    * :math:`\\lambda=1.8` for all-atom simulations\n+\n+\n+    \"\"\"\n+    def __init__(self, u, selection, refgroup, method=\"cutoff\", radius=4.5, outfile=None,\n+                 start=None, stop=None, step=None, **kwargs):\n+        \"\"\"Calculate the persistence length for polymer chains\n+\n+        Parameters\n+        ----------\n+        u: Universe\n+            trajectory\n+        selection: tuple(string, string)\n+            two contacting groups that change over time\n+        refgroup: tuple(AtomGroup, AtomGroup)\n+            two contacting groups in their reference conformation\n+        radius: float, optional (4.5 Angstroms)\n+            radius within which contacts exist\n+        method: string\n+            either 'cutoff' or 'best-hummer'\n+\n+        start : int, optional\n+            First frame of trajectory to analyse, Default: 0\n+        stop : int, optional\n+            Last frame of trajectory to analyse, Default: -1\n+        step : int, optional\n+            Step between frames to analyse, Default: 1\n+\n+        Parameters for 'best-hummer' method\n+        -----------------------------------\n+        lambda_constant: float, optional (1.8 unitless)\n+            contact is considered formed between (lambda*r0,r0)\n+        beta: float, optional (5 Angstroms^-1)\n+            softness of the switching function, the lower the softer\n+\n+        Attributes\n+        ----------\n+        results: list \n+            Fraction of native contacts for each frame\n+        \"\"\"\n+\n+        # check method\n+        if not method in (\"cutoff\", \"best-hummer\"): \n+            raise ValueError(\"method has to be 'cutoff' or 'best-hummer'\")\n+        self._method = method\n+\n+        # method-specific parameters\n+        if method == \"best-hummer\":\n+            self.beta = kwargs.get('beta', 5.0)\n+            self.lambda_constant  = kwargs.get('lambda_constant', 1.8)\n+\n+        # steup boilerplate\n+        self.u = u\n+        self._setup_frames(self.u.trajectory,\n+                           start=start,\n+                           stop=stop,\n+                           step=step)\n+\n+        self.selection = selection\n+        grA, grB = u.select_atoms(selection[0]), u.select_atoms(selection[1])\n+        self.grA, self.grB = grA, grB        \n+        refA, refB = refgroup\n+\n+        # contacts formed in reference\n+        r0 = distance_array(refA.positions, refB.positions)\n+        self.r0 = r0\n+        self.mask = r0 < radius\n+\n+        self.contact_matrix = []\n+        self.timeseries = []\n+        self.outfile = outfile\n+\n+    @staticmethod\n+    def load(self, filename):\n+        \"\"\"Load the data file.\"\"\"\n+        records = []\n+        with openany(filename) as data:\n+            for line in data:\n+                if line.startswith('#'):\n+                    continue\n+                records.append(map(float, line.split()))\n+        self.timeseries = np.array(records).T\n+        try:\n+            self.qavg = np.loadtxt(self.outarray)\n+        except IOError as err:\n+            if err.errno != errno.ENOENT:\n+                raise\n+\n+    def _single_frame(self):\n+        grA, grB, r0, mask = self.grA, self.grB, self.r0, self.mask\n+\n+        # compute distance array for a frame\n+        d = distance_array(grA.positions, grB.positions)\n+\n+        # select only the contacts that were formed in the reference state\n+        # r, r0 are 1D array\n+        r, r0 = d[mask], r0[mask]\n+\n+        if self._method == \"cutoff\":\n+            y = r <= r0\n+            y = float(y.sum())/mask.sum()\n+        elif self._method == \"best-hummer\":\n+            y, _ = best_hummer_q(r, r0, self.beta, self.lambda_constant)\n+        else:\n+            raise ValueError(\"Unknown method type, has to be 'cutoff' or 'best-hummer'\")\n+\n+        cm = np.zeros((grA.positions.shape[0], grB.positions.shape[0]))\n+        cm[mask] = y\n+        self.contact_matrix.append(cm)\n+        self.timeseries.append((self._ts.frame , y, mask.sum()))\n+\n+    def _conclude(self):\n+        \"\"\"Finalise the timeseries you've gathered.\n+\n+        Called at the end of the run() method to finish everything up.\n+        \"\"\"\n+        # write output\n+        if not self.outfile: return\n+        with open(self.outfile, \"w\") as f:\n+            f.write(\"# q1 analysis\\n# nref = {0:d}\\n\".format(self.mask.sum()))\n+            f.write(\"# frame  q1  n1\\n\")\n+            for frame, q1, n1 in self.timeseries:\n+                f.write(\"{frame:4d}  {q1:8.6f} {n1:5d}\\n\".format(**vars()))            \n+\n+    def qarray(self, d, out=None):\n+        \"\"\"Return distance array with True for contacts.\n+\n+        *d* is the matrix of distances. The method uses the value of\n+        :attr:`ContactAnalysis1.radius` to determine if a ``distance < radius``\n+        is considered a contact.\n+\n+        If *out* is supplied as a pre-allocated array of the correct\n+        shape then it is filled instead of allocating a new one in\n+        order to increase performance.\n+\n+        This method is typically only used internally.\n+        \"\"\"\n+        if out:\n+            out[:] = (d <= self.radius)\n+        else:\n+            out = (d <= self.radius)            \n+        return out\n+\n+    def qN(self, q, out=None):\n+        \"\"\"Calculate native contacts relative to reference state.\n+\n+        *q* is the matrix of contacts (e.g. :attr:`~ContactAnalysis1.q`).\n+\n+        If *out* is supplied as a pre-allocated array of the correct\n+        shape then it is filled instead of allocating a new one in\n+        order to increase performance.\n+\n+        This method is typically only used internally.\n+        \"\"\"\n+        if out:\n+            np.logical_and(q, self.mask, out)\n+        else:\n+            out = np.logical_and(q, self.mask)\n+        contacts = out.sum()\n+        return contacts, float(contacts) / self.mask.sum()\n+\n+    def plot(self, filename=None, **kwargs):\n+        \"\"\"Plot q(t).\n+\n+        .. function:: ContactAnalysis1.plot([filename, ...])\n+\n+        If *filename* is supplied then the figure is also written to file (the\n+        suffix determines the file type, e.g. pdf, png, eps, ...). All other\n+        keyword arguments are passed on to :func:`pylab.plot`.\n+        \"\"\"\n+        if not self.timeseries :\n+            raise ValueError(\"No timeseries data; do 'Contacts.run()' first.\")\n+        x, y, _ = zip(*self.timeseries)\n+\n+        import matplotlib.pyplot as plt\n+        kwargs.setdefault('color', 'black')\n+        kwargs.setdefault('linewidth', 2)       \n+\n+        fig = plt.figure()\n+        ax = fig.add_subplot(111)\n+        ax.plot(x, y, **kwargs)\n+        ax.set_xlabel(r\"frame number $t$\")\n+        ax.set_ylabel(r\"contacts $q_1$\")\n+\n+        if filename:\n+            fig.savefig(filename)            \n+        else:\n+            fig.show()\n+\n+\n+    def plot_qavg(self, filename=None, **kwargs):\n+        \"\"\"Plot :attr:`Contacts.qavg`, the matrix of average contacts.\n+\n+        .. function:: Contacts.plot_qavg([filename, ...])\n+\n+        If *filename* is supplied then the figure is also written to file (the\n+        suffix determines the file type, e.g. pdf, png, eps, ...). All other\n+        keyword arguments are passed on to :func:`pylab.imshow`.\n+        \"\"\"\n+        if not self.contact_matrix :\n+            raise ValueError(\"No timeseries data; do 'Contacts.run()' first.\")\n+        # collapse on the time-axis\n+        data = np.array(self.contact_matrix)\n+        data = data.mean(axis=0)\n+\n+        import matplotlib.pyplot as plt\n+        import matplotlib.cm as cm\n+\n+        kwargs['origin'] = 'lower'\n+        kwargs.setdefault('aspect', 'equal')\n+        kwargs.setdefault('interpolation', 'nearest')\n+        kwargs.setdefault('vmin', 0)\n+        kwargs.setdefault('vmax', 1)\n+        kwargs.setdefault('cmap', cm.hot)\n+\n+        fig = plt.figure()\n+        ax = fig.add_subplot(111)\n+        cax = ax.imshow(data, **kwargs)\n+\n+        cbar = fig.colorbar(cax)\n+\n+        if filename:\n+            fig.savefig(filename)            \n+        else: \n+            fig.show()","path":"package/MDAnalysis/analysis/contacts.py","position":598,"original_position":598,"commit_id":"e18b55cec9395ad698ededff5c8f2863f3104f1d","original_commit_id":"e18b55cec9395ad698ededff5c8f2863f3104f1d","user":{"login":"jandom","id":395931,"avatar_url":"https://avatars.githubusercontent.com/u/395931?v=3","gravatar_id":"","url":"https://api.github.com/users/jandom","html_url":"https://github.com/jandom","followers_url":"https://api.github.com/users/jandom/followers","following_url":"https://api.github.com/users/jandom/following{/other_user}","gists_url":"https://api.github.com/users/jandom/gists{/gist_id}","starred_url":"https://api.github.com/users/jandom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jandom/subscriptions","organizations_url":"https://api.github.com/users/jandom/orgs","repos_url":"https://api.github.com/users/jandom/repos","events_url":"https://api.github.com/users/jandom/events{/privacy}","received_events_url":"https://api.github.com/users/jandom/received_events","type":"User","site_admin":false},"body":"I don't get this one? As in, what if variable `filename` has a weird file ending?","created_at":"2016-02-24T19:50:18Z","updated_at":"2016-02-24T19:50:18Z","html_url":"https://github.com/MDAnalysis/mdanalysis/pull/708#discussion_r53996156","pull_request_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/pulls/708","_links":{"self":{"href":"https://api.github.com/repos/MDAnalysis/mdanalysis/pulls/comments/53996156"},"html":{"href":"https://github.com/MDAnalysis/mdanalysis/pull/708#discussion_r53996156"},"pull_request":{"href":"https://api.github.com/repos/MDAnalysis/mdanalysis/pulls/708"}}},"pull_request":{"url":"https://api.github.com/repos/MDAnalysis/mdanalysis/pulls/708","id":58815578,"html_url":"https://github.com/MDAnalysis/mdanalysis/pull/708","diff_url":"https://github.com/MDAnalysis/mdanalysis/pull/708.diff","patch_url":"https://github.com/MDAnalysis/mdanalysis/pull/708.patch","issue_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/issues/708","number":708,"state":"open","locked":false,"title":"Improved, Best-like contact analysis (Issue #702)","user":{"login":"jandom","id":395931,"avatar_url":"https://avatars.githubusercontent.com/u/395931?v=3","gravatar_id":"","url":"https://api.github.com/users/jandom","html_url":"https://github.com/jandom","followers_url":"https://api.github.com/users/jandom/followers","following_url":"https://api.github.com/users/jandom/following{/other_user}","gists_url":"https://api.github.com/users/jandom/gists{/gist_id}","starred_url":"https://api.github.com/users/jandom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jandom/subscriptions","organizations_url":"https://api.github.com/users/jandom/orgs","repos_url":"https://api.github.com/users/jandom/repos","events_url":"https://api.github.com/users/jandom/events{/privacy}","received_events_url":"https://api.github.com/users/jandom/received_events","type":"User","site_admin":false},"body":"Addresses #702.\r\n\r\nA worked example with GpA dimer in a bilayer\r\n\r\nAdded tests to the BestHummerContacts calculation\r\n\r\nTests for fraction of native contacts (Q)","created_at":"2016-02-09T22:00:47Z","updated_at":"2016-02-24T19:50:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f220dcb74849dce0e2c99db1df64eb1809b15eed","assignee":{"login":"orbeckst","id":237980,"avatar_url":"https://avatars.githubusercontent.com/u/237980?v=3","gravatar_id":"","url":"https://api.github.com/users/orbeckst","html_url":"https://github.com/orbeckst","followers_url":"https://api.github.com/users/orbeckst/followers","following_url":"https://api.github.com/users/orbeckst/following{/other_user}","gists_url":"https://api.github.com/users/orbeckst/gists{/gist_id}","starred_url":"https://api.github.com/users/orbeckst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orbeckst/subscriptions","organizations_url":"https://api.github.com/users/orbeckst/orgs","repos_url":"https://api.github.com/users/orbeckst/repos","events_url":"https://api.github.com/users/orbeckst/events{/privacy}","received_events_url":"https://api.github.com/users/orbeckst/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/MDAnalysis/mdanalysis/milestones/7","html_url":"https://github.com/MDAnalysis/mdanalysis/milestones/0.14","labels_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/milestones/7/labels","id":1454545,"number":7,"title":"0.14","description":"","creator":{"login":"orbeckst","id":237980,"avatar_url":"https://avatars.githubusercontent.com/u/237980?v=3","gravatar_id":"","url":"https://api.github.com/users/orbeckst","html_url":"https://github.com/orbeckst","followers_url":"https://api.github.com/users/orbeckst/followers","following_url":"https://api.github.com/users/orbeckst/following{/other_user}","gists_url":"https://api.github.com/users/orbeckst/gists{/gist_id}","starred_url":"https://api.github.com/users/orbeckst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orbeckst/subscriptions","organizations_url":"https://api.github.com/users/orbeckst/orgs","repos_url":"https://api.github.com/users/orbeckst/repos","events_url":"https://api.github.com/users/orbeckst/events{/privacy}","received_events_url":"https://api.github.com/users/orbeckst/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":61,"state":"open","created_at":"2015-12-10T17:34:28Z","updated_at":"2016-02-24T00:37:16Z","due_on":"2016-01-31T00:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/pulls/708/commits","review_comments_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/pulls/708/comments","review_comment_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/pulls/comments{/number}","comments_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/issues/708/comments","statuses_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/statuses/e18b55cec9395ad698ededff5c8f2863f3104f1d","head":{"label":"jandom:issue-702-contacts","ref":"issue-702-contacts","sha":"e18b55cec9395ad698ededff5c8f2863f3104f1d","user":{"login":"jandom","id":395931,"avatar_url":"https://avatars.githubusercontent.com/u/395931?v=3","gravatar_id":"","url":"https://api.github.com/users/jandom","html_url":"https://github.com/jandom","followers_url":"https://api.github.com/users/jandom/followers","following_url":"https://api.github.com/users/jandom/following{/other_user}","gists_url":"https://api.github.com/users/jandom/gists{/gist_id}","starred_url":"https://api.github.com/users/jandom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jandom/subscriptions","organizations_url":"https://api.github.com/users/jandom/orgs","repos_url":"https://api.github.com/users/jandom/repos","events_url":"https://api.github.com/users/jandom/events{/privacy}","received_events_url":"https://api.github.com/users/jandom/received_events","type":"User","site_admin":false},"repo":{"id":49064500,"name":"mdanalysis","full_name":"jandom/mdanalysis","owner":{"login":"jandom","id":395931,"avatar_url":"https://avatars.githubusercontent.com/u/395931?v=3","gravatar_id":"","url":"https://api.github.com/users/jandom","html_url":"https://github.com/jandom","followers_url":"https://api.github.com/users/jandom/followers","following_url":"https://api.github.com/users/jandom/following{/other_user}","gists_url":"https://api.github.com/users/jandom/gists{/gist_id}","starred_url":"https://api.github.com/users/jandom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jandom/subscriptions","organizations_url":"https://api.github.com/users/jandom/orgs","repos_url":"https://api.github.com/users/jandom/repos","events_url":"https://api.github.com/users/jandom/events{/privacy}","received_events_url":"https://api.github.com/users/jandom/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jandom/mdanalysis","description":"MDAnalysis is a Python library to analyze molecular dynamics trajectories.","fork":true,"url":"https://api.github.com/repos/jandom/mdanalysis","forks_url":"https://api.github.com/repos/jandom/mdanalysis/forks","keys_url":"https://api.github.com/repos/jandom/mdanalysis/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jandom/mdanalysis/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jandom/mdanalysis/teams","hooks_url":"https://api.github.com/repos/jandom/mdanalysis/hooks","issue_events_url":"https://api.github.com/repos/jandom/mdanalysis/issues/events{/number}","events_url":"https://api.github.com/repos/jandom/mdanalysis/events","assignees_url":"https://api.github.com/repos/jandom/mdanalysis/assignees{/user}","branches_url":"https://api.github.com/repos/jandom/mdanalysis/branches{/branch}","tags_url":"https://api.github.com/repos/jandom/mdanalysis/tags","blobs_url":"https://api.github.com/repos/jandom/mdanalysis/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jandom/mdanalysis/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jandom/mdanalysis/git/refs{/sha}","trees_url":"https://api.github.com/repos/jandom/mdanalysis/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jandom/mdanalysis/statuses/{sha}","languages_url":"https://api.github.com/repos/jandom/mdanalysis/languages","stargazers_url":"https://api.github.com/repos/jandom/mdanalysis/stargazers","contributors_url":"https://api.github.com/repos/jandom/mdanalysis/contributors","subscribers_url":"https://api.github.com/repos/jandom/mdanalysis/subscribers","subscription_url":"https://api.github.com/repos/jandom/mdanalysis/subscription","commits_url":"https://api.github.com/repos/jandom/mdanalysis/commits{/sha}","git_commits_url":"https://api.github.com/repos/jandom/mdanalysis/git/commits{/sha}","comments_url":"https://api.github.com/repos/jandom/mdanalysis/comments{/number}","issue_comment_url":"https://api.github.com/repos/jandom/mdanalysis/issues/comments{/number}","contents_url":"https://api.github.com/repos/jandom/mdanalysis/contents/{+path}","compare_url":"https://api.github.com/repos/jandom/mdanalysis/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jandom/mdanalysis/merges","archive_url":"https://api.github.com/repos/jandom/mdanalysis/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jandom/mdanalysis/downloads","issues_url":"https://api.github.com/repos/jandom/mdanalysis/issues{/number}","pulls_url":"https://api.github.com/repos/jandom/mdanalysis/pulls{/number}","milestones_url":"https://api.github.com/repos/jandom/mdanalysis/milestones{/number}","notifications_url":"https://api.github.com/repos/jandom/mdanalysis/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jandom/mdanalysis/labels{/name}","releases_url":"https://api.github.com/repos/jandom/mdanalysis/releases{/id}","deployments_url":"https://api.github.com/repos/jandom/mdanalysis/deployments","created_at":"2016-01-05T12:29:18Z","updated_at":"2016-02-23T22:07:14Z","pushed_at":"2016-02-23T22:06:55Z","git_url":"git://github.com/jandom/mdanalysis.git","ssh_url":"git@github.com:jandom/mdanalysis.git","clone_url":"https://github.com/jandom/mdanalysis.git","svn_url":"https://github.com/jandom/mdanalysis","homepage":"http://www.mdanalysis.org","size":216385,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"MDAnalysis:develop","ref":"develop","sha":"eee993292a1686b1c9328ec56c1c5601a375449b","user":{"login":"MDAnalysis","id":11445951,"avatar_url":"https://avatars.githubusercontent.com/u/11445951?v=3","gravatar_id":"","url":"https://api.github.com/users/MDAnalysis","html_url":"https://github.com/MDAnalysis","followers_url":"https://api.github.com/users/MDAnalysis/followers","following_url":"https://api.github.com/users/MDAnalysis/following{/other_user}","gists_url":"https://api.github.com/users/MDAnalysis/gists{/gist_id}","starred_url":"https://api.github.com/users/MDAnalysis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MDAnalysis/subscriptions","organizations_url":"https://api.github.com/users/MDAnalysis/orgs","repos_url":"https://api.github.com/users/MDAnalysis/repos","events_url":"https://api.github.com/users/MDAnalysis/events{/privacy}","received_events_url":"https://api.github.com/users/MDAnalysis/received_events","type":"Organization","site_admin":false},"repo":{"id":33389183,"name":"mdanalysis","full_name":"MDAnalysis/mdanalysis","owner":{"login":"MDAnalysis","id":11445951,"avatar_url":"https://avatars.githubusercontent.com/u/11445951?v=3","gravatar_id":"","url":"https://api.github.com/users/MDAnalysis","html_url":"https://github.com/MDAnalysis","followers_url":"https://api.github.com/users/MDAnalysis/followers","following_url":"https://api.github.com/users/MDAnalysis/following{/other_user}","gists_url":"https://api.github.com/users/MDAnalysis/gists{/gist_id}","starred_url":"https://api.github.com/users/MDAnalysis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MDAnalysis/subscriptions","organizations_url":"https://api.github.com/users/MDAnalysis/orgs","repos_url":"https://api.github.com/users/MDAnalysis/repos","events_url":"https://api.github.com/users/MDAnalysis/events{/privacy}","received_events_url":"https://api.github.com/users/MDAnalysis/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/MDAnalysis/mdanalysis","description":"MDAnalysis is a Python library to analyze molecular dynamics trajectories.","fork":false,"url":"https://api.github.com/repos/MDAnalysis/mdanalysis","forks_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/forks","keys_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/teams","hooks_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/hooks","issue_events_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/issues/events{/number}","events_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/events","assignees_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/assignees{/user}","branches_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/branches{/branch}","tags_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/tags","blobs_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/git/refs{/sha}","trees_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/statuses/{sha}","languages_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/languages","stargazers_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/stargazers","contributors_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/contributors","subscribers_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/subscribers","subscription_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/subscription","commits_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/commits{/sha}","git_commits_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/git/commits{/sha}","comments_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/comments{/number}","issue_comment_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/issues/comments{/number}","contents_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/contents/{+path}","compare_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/merges","archive_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/downloads","issues_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/issues{/number}","pulls_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/pulls{/number}","milestones_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/milestones{/number}","notifications_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/labels{/name}","releases_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/releases{/id}","deployments_url":"https://api.github.com/repos/MDAnalysis/mdanalysis/deployments","created_at":"2015-04-04T00:39:41Z","updated_at":"2016-02-22T18:50:26Z","pushed_at":"2016-02-23T22:07:09Z","git_url":"git://github.com/MDAnalysis/mdanalysis.git","ssh_url":"git@github.com:MDAnalysis/mdanalysis.git","clone_url":"https://github.com/MDAnalysis/mdanalysis.git","svn_url":"https://github.com/MDAnalysis/mdanalysis","homepage":"http://www.mdanalysis.org","size":254892,"stargazers_count":55,"watchers_count":55,"language":"Python","has_issues":true,"has_downloads":false,"has_wiki":true,"has_pages":true,"forks_count":34,"mirror_url":null,"open_issues_count":82,"forks":34,"open_issues":82,"watchers":55,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/MDAnalysis/mdanalysis/pulls/708"},"html":{"href":"https://github.com/MDAnalysis/mdanalysis/pull/708"},"issue":{"href":"https://api.github.com/repos/MDAnalysis/mdanalysis/issues/708"},"comments":{"href":"https://api.github.com/repos/MDAnalysis/mdanalysis/issues/708/comments"},"review_comments":{"href":"https://api.github.com/repos/MDAnalysis/mdanalysis/pulls/708/comments"},"review_comment":{"href":"https://api.github.com/repos/MDAnalysis/mdanalysis/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/MDAnalysis/mdanalysis/pulls/708/commits"},"statuses":{"href":"https://api.github.com/repos/MDAnalysis/mdanalysis/statuses/e18b55cec9395ad698ededff5c8f2863f3104f1d"}}}}