Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
jvsguerra committed Oct 19, 2022
1 parent 8fb3c25 commit e9ef6e1
Show file tree
Hide file tree
Showing 20 changed files with 71 additions and 31 deletions.
2 changes: 1 addition & 1 deletion docs/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: a8e686330cd82d1e1e428ef58223c494
config: dc0dc5212cfdc73f6c712028918bddd0
tags: 645f666f9bcd5a90fca523b33c5a78b7
Binary file modified docs/.doctrees/_about/index.doctree
Binary file not shown.
Binary file modified docs/.doctrees/_api_reference/index.doctree
Binary file not shown.
Binary file modified docs/.doctrees/_installation/index.doctree
Binary file not shown.
Binary file modified docs/.doctrees/_tutorial/index.doctree
Binary file not shown.
Binary file modified docs/.doctrees/index.doctree
Binary file not shown.
4 changes: 2 additions & 2 deletions docs/_about/index.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Issues &mdash; SERD 0.1.1 documentation</title>
<title>Issues &mdash; SERD 0.1.2 documentation</title>
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="shortcut icon" href="../_static/icon.ico"/>
Expand Down
6 changes: 3 additions & 3 deletions docs/_api_reference/index.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>SERD.detect &mdash; SERD 0.1.1 documentation</title>
<title>SERD.detect &mdash; SERD 0.1.2 documentation</title>
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="shortcut icon" href="../_static/icon.ico"/>
Expand Down Expand Up @@ -278,7 +278,7 @@ <h1>SERD.r2g<a class="headerlink" href="#serd-r2g" title="Permalink to this head
<li><p><strong>cutoff</strong> (<em>Optional</em><em>[</em><a class="reference external" href="https://docs.python.org/3/library/functions.html#float" title="(in Python v3.10)"><em>float</em></a><em>]</em><em>, </em><em>optional</em>) – A limit of distance to define an edge between two solvent-exposed residues, by default None.
If None, cutoff depends on selection argument. If “CA”, cutoff is 10.0. If “CB”, cutoff is 8.0.</p></li>
<li><p><strong>intraresidual</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.10)"><em>bool</em></a><em>, </em><em>optional</em>) – Whether to consider intraresidual contacts to create adjacency matrix, by default False.</p></li>
<li><p><strong>weighted_edges</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.10)"><em>bool</em></a><em>, </em><em>False</em>) – Whether to include the interresidual distances as edge weights, by default False.</p></li>
<li><p><strong>weighted_edges</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.10)"><em>bool</em></a><em>, </em><em>optional</em>) – Whether to include the distances as weight of the edges.</p></li>
</ul>
</dd>
<dt class="field-even">Returns<span class="colon">:</span></dt>
Expand Down
4 changes: 2 additions & 2 deletions docs/_installation/index.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Requirements &mdash; SERD 0.1.1 documentation</title>
<title>Requirements &mdash; SERD 0.1.2 documentation</title>
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="shortcut icon" href="../_static/icon.ico"/>
Expand Down
15 changes: 12 additions & 3 deletions docs/_modules/SERD/SERD.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>SERD.SERD &mdash; SERD 0.1.1 documentation</title>
<title>SERD.SERD &mdash; SERD 0.1.2 documentation</title>
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
<link rel="shortcut icon" href="../../_static/icon.ico"/>
Expand Down Expand Up @@ -874,8 +874,8 @@ <h1>Source code for SERD.SERD</h1><div class="highlight"><pre>
<span class="sd"> If None, cutoff depends on selection argument. If &quot;CA&quot;, cutoff is 10.0. If &quot;CB&quot;, cutoff is 8.0.</span>
<span class="sd"> intraresidual : bool, optional</span>
<span class="sd"> Whether to consider intraresidual contacts to create adjacency matrix, by default False.</span>
<span class="sd"> weighted_edges : bool, False</span>
<span class="sd"> Whether to include the interresidual distances as edge weights, by default False.</span>
<span class="sd"> weighted_edges : bool, optional</span>
<span class="sd"> Whether to include the distances as weight of the edges.</span>

<span class="sd"> Returns</span>
<span class="sd"> -------</span>
Expand Down Expand Up @@ -926,6 +926,15 @@ <h1>Source code for SERD.SERD</h1><div class="highlight"><pre>
<span class="c1"># Create networkx.Graph</span>
<span class="n">G</span> <span class="o">=</span> <span class="n">networkx</span><span class="o">.</span><span class="n">Graph</span><span class="p">()</span>
<span class="n">G</span><span class="o">.</span><span class="n">add_edges_from</span><span class="p">(</span><span class="n">numpy</span><span class="o">.</span><span class="n">argwhere</span><span class="p">(</span><span class="n">adjacency</span><span class="p">))</span>
<span class="k">if</span> <span class="n">weighted_edges</span><span class="p">:</span>
<span class="n">weighted_edges</span> <span class="o">=</span> <span class="p">[</span>
<span class="p">(</span><span class="n">edges</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="n">edges</span><span class="p">[</span><span class="mi">1</span><span class="p">],</span> <span class="n">distance</span><span class="p">[</span><span class="n">edges</span><span class="p">[</span><span class="mi">0</span><span class="p">]][</span><span class="n">edges</span><span class="p">[</span><span class="mi">1</span><span class="p">]])</span>
<span class="k">for</span> <span class="n">edges</span> <span class="ow">in</span> <span class="n">G</span><span class="o">.</span><span class="n">edges</span><span class="p">(</span><span class="n">data</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
<span class="p">]</span>
<span class="n">G</span><span class="o">.</span><span class="n">add_weighted_edges_from</span><span class="p">(</span><span class="n">weighted_edges</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">weighted_edges</span> <span class="o">=</span> <span class="p">[(</span><span class="n">edges</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="n">edges</span><span class="p">[</span><span class="mi">1</span><span class="p">],</span> <span class="mf">1.0</span><span class="p">)</span> <span class="k">for</span> <span class="n">edges</span> <span class="ow">in</span> <span class="n">G</span><span class="o">.</span><span class="n">edges</span><span class="p">(</span><span class="n">data</span><span class="o">=</span><span class="kc">True</span><span class="p">)]</span>
<span class="n">G</span><span class="o">.</span><span class="n">add_weighted_edges_from</span><span class="p">(</span><span class="n">weighted_edges</span><span class="p">)</span>

<span class="c1"># Add interresidual distances as edge weights</span>
<span class="k">if</span> <span class="n">weighted_edges</span><span class="p">:</span>
Expand Down
2 changes: 1 addition & 1 deletion docs/_modules/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Overview: module code &mdash; SERD 0.1.1 documentation</title>
<title>Overview: module code &mdash; SERD 0.1.2 documentation</title>
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="shortcut icon" href="../_static/icon.ico"/>
Expand Down
4 changes: 2 additions & 2 deletions docs/_modules/pyKVFinder/utils.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>pyKVFinder.utils &mdash; SERD 0.1.1 documentation</title>
<title>pyKVFinder.utils &mdash; SERD 0.1.2 documentation</title>
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
<link rel="shortcut icon" href="../../_static/icon.ico"/>
Expand Down Expand Up @@ -353,7 +353,7 @@ <h1>Source code for pyKVFinder.utils</h1><div class="highlight"><pre>
<span class="n">line</span> <span class="o">=</span> <span class="n">line</span><span class="o">.</span><span class="n">split</span><span class="p">()</span>
<span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">line</span><span class="p">)</span> <span class="o">==</span> <span class="mi">4</span><span class="p">:</span>
<span class="c1"># Get PDB information</span>
<span class="n">atom_symbol</span> <span class="o">=</span> <span class="n">line</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span>
<span class="n">atom_symbol</span> <span class="o">=</span> <span class="n">line</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span><span class="o">.</span><span class="n">upper</span><span class="p">()</span>
<span class="n">x</span> <span class="o">=</span> <span class="nb">float</span><span class="p">(</span><span class="n">line</span><span class="p">[</span><span class="mi">1</span><span class="p">])</span>
<span class="n">y</span> <span class="o">=</span> <span class="nb">float</span><span class="p">(</span><span class="n">line</span><span class="p">[</span><span class="mi">2</span><span class="p">])</span>
<span class="n">z</span> <span class="o">=</span> <span class="nb">float</span><span class="p">(</span><span class="n">line</span><span class="p">[</span><span class="mi">3</span><span class="p">])</span>
Expand Down
30 changes: 30 additions & 0 deletions docs/_static/basic.css
Original file line number Diff line number Diff line change
Expand Up @@ -326,13 +326,15 @@ p.sidebar-title {
}
nav.contents,
aside.topic,

div.admonition, div.topic, blockquote {
clear: left;
}

/* -- topics ---------------------------------------------------------------- */
nav.contents,
aside.topic,

div.topic {
border: 1px solid #ccc;
padding: 7px;
Expand Down Expand Up @@ -373,6 +375,7 @@ div.sidebar > :last-child,
aside.sidebar > :last-child,
nav.contents > :last-child,
aside.topic > :last-child,

div.topic > :last-child,
div.admonition > :last-child {
margin-bottom: 0;
Expand All @@ -382,6 +385,7 @@ div.sidebar::after,
aside.sidebar::after,
nav.contents::after,
aside.topic::after,

div.topic::after,
div.admonition::after,
blockquote::after {
Expand Down Expand Up @@ -606,6 +610,26 @@ ol.simple p,
ul.simple p {
margin-bottom: 0;
}

/* Docutils 0.17 and older (footnotes & citations) */
dl.footnote > dt,
dl.citation > dt {
float: left;
margin-right: 0.5em;
}

dl.footnote > dd,
dl.citation > dd {
margin-bottom: 0em;
}

dl.footnote > dd:after,
dl.citation > dd:after {
content: "";
clear: both;
}

/* Docutils 0.18+ (footnotes & citations) */
aside.footnote > span,
div.citation > span {
float: left;
Expand All @@ -630,6 +654,8 @@ div.citation > p:last-of-type:after {
clear: both;
}

/* Footnotes & citations ends */

dl.field-list {
display: grid;
grid-template-columns: fit-content(30%) auto;
Expand All @@ -642,6 +668,10 @@ dl.field-list > dt {
padding-right: 5px;
}

dl.field-list > dt:after {
content: ":";
}

dl.field-list > dd {
padding-left: 0.5em;
margin-top: 0em;
Expand Down
4 changes: 2 additions & 2 deletions docs/_static/documentation_options.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var DOCUMENTATION_OPTIONS = {
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
VERSION: '0.1.1',
VERSION: '0.1.2',
LANGUAGE: 'en',
COLLAPSE_INDEX: false,
BUILDER: 'html',
Expand All @@ -10,5 +10,5 @@ var DOCUMENTATION_OPTIONS = {
SOURCELINK_SUFFIX: '.txt',
NAVIGATION_WITH_KEYS: false,
SHOW_SEARCH_SUMMARY: true,
ENABLE_SEARCH_SHORTCUTS: true,
ENABLE_SEARCH_SHORTCUTS: false,
};
17 changes: 9 additions & 8 deletions docs/_static/searchtools.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ const _displayItem = (item, highlightTerms, searchTerms) => {
linkEl.href = linkUrl + "?" + params.toString() + anchor;
linkEl.innerHTML = title;
if (descr)
listItem.appendChild(document.createElement("span")).innerHTML =
listItem.appendChild(document.createElement("span")).innerText =
" (" + descr + ")";
else if (showSearchSummary)
fetch(requestUrl)
Expand Down Expand Up @@ -155,8 +155,10 @@ const Search = {
_pulse_status: -1,

htmlToText: (htmlString) => {
const htmlElement = new DOMParser().parseFromString(htmlString, 'text/html');
htmlElement.querySelectorAll(".headerlink").forEach((el) => { el.remove() });
const htmlElement = document
.createRange()
.createContextualFragment(htmlString);
_removeChildren(htmlElement.querySelectorAll(".headerlink"));
const docContent = htmlElement.querySelector('[role="main"]');
if (docContent !== undefined) return docContent.textContent;
console.warn(
Expand Down Expand Up @@ -502,22 +504,21 @@ const Search = {
* latter for highlighting it.
*/
makeSearchSummary: (htmlText, keywords, highlightWords) => {
const text = Search.htmlToText(htmlText);
const text = Search.htmlToText(htmlText).toLowerCase();
if (text === "") return null;

const textLower = text.toLowerCase();
const actualStartPosition = [...keywords]
.map((k) => textLower.indexOf(k.toLowerCase()))
.map((k) => text.indexOf(k.toLowerCase()))
.filter((i) => i > -1)
.slice(-1)[0];
const startWithContext = Math.max(actualStartPosition - 120, 0);

const top = startWithContext === 0 ? "" : "...";
const tail = startWithContext + 240 < text.length ? "..." : "";

let summary = document.createElement("p");
let summary = document.createElement("div");
summary.classList.add("context");
summary.textContent = top + text.substr(startWithContext, 240).trim() + tail;
summary.innerText = top + text.substr(startWithContext, 240).trim() + tail;

highlightWords.forEach((highlightWord) =>
_highlightText(summary, highlightWord, "highlighted")
Expand Down
4 changes: 2 additions & 2 deletions docs/_tutorial/index.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Full workflow &mdash; SERD 0.1.1 documentation</title>
<title>Full workflow &mdash; SERD 0.1.2 documentation</title>
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="shortcut icon" href="../_static/icon.ico"/>
Expand Down
2 changes: 1 addition & 1 deletion docs/genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Index &mdash; SERD 0.1.1 documentation</title>
<title>Index &mdash; SERD 0.1.2 documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="shortcut icon" href="_static/icon.ico"/>
Expand Down
4 changes: 2 additions & 2 deletions docs/index.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.19: https://docutils.sourceforge.io/" />
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Welcome to SERD’s documentation! &mdash; SERD 0.1.1 documentation</title>
<title>Welcome to SERD’s documentation! &mdash; SERD 0.1.2 documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="shortcut icon" href="_static/icon.ico"/>
Expand Down
2 changes: 1 addition & 1 deletion docs/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Search &mdash; SERD 0.1.1 documentation</title>
<title>Search &mdash; SERD 0.1.2 documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="shortcut icon" href="_static/icon.ico"/>
Expand Down
Loading

0 comments on commit e9ef6e1

Please sign in to comment.