From aa80ce4f46f9ff1a2851ba9ba873a55a8f6ebc6d Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Tue, 19 Feb 2019 17:17:48 +0100 Subject: Change package URL to github to get source code links --- DESCRIPTION | 2 +- docs/authors.html | 54 +++++++---- docs/docsearch.css | 148 ++++++++++++++++++++++++++++++ docs/docsearch.js | 85 ++++++++++++++++++ docs/index.html | 82 +++++++++++------ docs/jquery.sticky-kit.min.js | 9 -- docs/pkgdown.css | 60 +++++++++++-- docs/pkgdown.js | 165 +++++++++++++++++++--------------- docs/pkgdown.yml | 5 ++ docs/reference/chent-1.png | Bin 34969 -> 34374 bytes docs/reference/chent-22.png | Bin 12574 -> 0 bytes docs/reference/chent.html | 81 +++++++++++------ docs/reference/draw_svg.chent.html | 60 +++++++++---- docs/reference/index.html | 180 ++++++++++++++++++++----------------- docs/reference/pai.html | 58 ++++++++---- docs/reference/plot.chent-1.png | Bin 34969 -> 34374 bytes docs/reference/plot.chent-11.png | Bin 12574 -> 0 bytes docs/reference/plot.chent.html | 68 +++++++++----- docs/reference/pp.html | 56 ++++++++---- docs/reference/print.chent.html | 60 +++++++++---- docs/reference/print.pai.html | 60 +++++++++---- 21 files changed, 880 insertions(+), 353 deletions(-) create mode 100644 docs/docsearch.css create mode 100644 docs/docsearch.js delete mode 100644 docs/jquery.sticky-kit.min.js create mode 100644 docs/pkgdown.yml delete mode 100644 docs/reference/chent-22.png delete mode 100644 docs/reference/plot.chent-11.png diff --git a/DESCRIPTION b/DESCRIPTION index 2722c19..f45a6c3 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -27,5 +27,5 @@ LazyLoad: yes LazyData: yes Encoding: UTF-8 VignetteBuilder: knitr -URL: http://cgit.jrwb.de/chents +URL: https://github.com/jranke/chents RoxygenNote: 6.1.1 diff --git a/docs/authors.html b/docs/authors.html index 7e1fe6b..5ac526d 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -1,6 +1,6 @@ - + @@ -9,27 +9,34 @@ Authors • chents - + - - + + - + - + + + + - - - + + + + + + - + + @@ -75,8 +93,8 @@ -
-
+
+
@@ -99,11 +117,13 @@
-

Site built with pkgdown.

+

Site built with pkgdown 1.3.0.

-
+ + + diff --git a/docs/docsearch.css b/docs/docsearch.css new file mode 100644 index 0000000..e5f1fe1 --- /dev/null +++ b/docs/docsearch.css @@ -0,0 +1,148 @@ +/* Docsearch -------------------------------------------------------------- */ +/* + Source: https://github.com/algolia/docsearch/ + License: MIT +*/ + +.algolia-autocomplete { + display: block; + -webkit-box-flex: 1; + -ms-flex: 1; + flex: 1 +} + +.algolia-autocomplete .ds-dropdown-menu { + width: 100%; + min-width: none; + max-width: none; + padding: .75rem 0; + background-color: #fff; + background-clip: padding-box; + border: 1px solid rgba(0, 0, 0, .1); + box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .175); +} + +@media (min-width:768px) { + .algolia-autocomplete .ds-dropdown-menu { + width: 175% + } +} + +.algolia-autocomplete .ds-dropdown-menu::before { + display: none +} + +.algolia-autocomplete .ds-dropdown-menu [class^=ds-dataset-] { + padding: 0; + background-color: rgb(255,255,255); + border: 0; + max-height: 80vh; +} + +.algolia-autocomplete .ds-dropdown-menu .ds-suggestions { + margin-top: 0 +} + +.algolia-autocomplete .algolia-docsearch-suggestion { + padding: 0; + overflow: visible +} + +.algolia-autocomplete .algolia-docsearch-suggestion--category-header { + padding: .125rem 1rem; + margin-top: 0; + font-size: 1.3em; + font-weight: 500; + color: #00008B; + border-bottom: 0 +} + +.algolia-autocomplete .algolia-docsearch-suggestion--wrapper { + float: none; + padding-top: 0 +} + +.algolia-autocomplete .algolia-docsearch-suggestion--subcategory-column { + float: none; + width: auto; + padding: 0; + text-align: left +} + +.algolia-autocomplete .algolia-docsearch-suggestion--content { + float: none; + width: auto; + padding: 0 +} + +.algolia-autocomplete .algolia-docsearch-suggestion--content::before { + display: none +} + +.algolia-autocomplete .ds-suggestion:not(:first-child) .algolia-docsearch-suggestion--category-header { + padding-top: .75rem; + margin-top: .75rem; + border-top: 1px solid rgba(0, 0, 0, .1) +} + +.algolia-autocomplete .ds-suggestion .algolia-docsearch-suggestion--subcategory-column { + display: block; + padding: .1rem 1rem; + margin-bottom: 0.1; + font-size: 1.0em; + font-weight: 400 + /* display: none */ +} + +.algolia-autocomplete .algolia-docsearch-suggestion--title { + display: block; + padding: .25rem 1rem; + margin-bottom: 0; + font-size: 0.9em; + font-weight: 400 +} + +.algolia-autocomplete .algolia-docsearch-suggestion--text { + padding: 0 1rem .5rem; + margin-top: -.25rem; + font-size: 0.8em; + font-weight: 400; + line-height: 1.25 +} + +.algolia-autocomplete .algolia-docsearch-footer { + width: 110px; + height: 20px; + z-index: 3; + margin-top: 10.66667px; + float: right; + font-size: 0; + line-height: 0; +} + +.algolia-autocomplete .algolia-docsearch-footer--logo { + background-image: url("data:image/svg+xml;utf8,"); + background-repeat: no-repeat; + background-position: 50%; + background-size: 100%; + overflow: hidden; + text-indent: -9000px; + width: 100%; + height: 100%; + display: block; + transform: translate(-8px); +} + +.algolia-autocomplete .algolia-docsearch-suggestion--highlight { + color: #FF8C00; + background: rgba(232, 189, 54, 0.1) +} + + +.algolia-autocomplete .algolia-docsearch-suggestion--text .algolia-docsearch-suggestion--highlight { + box-shadow: inset 0 -2px 0 0 rgba(105, 105, 105, .5) +} + +.algolia-autocomplete .ds-suggestion.ds-cursor .algolia-docsearch-suggestion--content { + background-color: rgba(192, 192, 192, .15) +} diff --git a/docs/docsearch.js b/docs/docsearch.js new file mode 100644 index 0000000..b35504c --- /dev/null +++ b/docs/docsearch.js @@ -0,0 +1,85 @@ +$(function() { + + // register a handler to move the focus to the search bar + // upon pressing shift + "/" (i.e. "?") + $(document).on('keydown', function(e) { + if (e.shiftKey && e.keyCode == 191) { + e.preventDefault(); + $("#search-input").focus(); + } + }); + + $(document).ready(function() { + // do keyword highlighting + /* modified from https://jsfiddle.net/julmot/bL6bb5oo/ */ + var mark = function() { + + var referrer = document.URL ; + var paramKey = "q" ; + + if (referrer.indexOf("?") !== -1) { + var qs = referrer.substr(referrer.indexOf('?') + 1); + var qs_noanchor = qs.split('#')[0]; + var qsa = qs_noanchor.split('&'); + var keyword = ""; + + for (var i = 0; i < qsa.length; i++) { + var currentParam = qsa[i].split('='); + + if (currentParam.length !== 2) { + continue; + } + + if (currentParam[0] == paramKey) { + keyword = decodeURIComponent(currentParam[1].replace(/\+/g, "%20")); + } + } + + if (keyword !== "") { + $(".contents").unmark({ + done: function() { + $(".contents").mark(keyword); + } + }); + } + } + }; + + mark(); + }); +}); + +/* Search term highlighting ------------------------------*/ + +function matchedWords(hit) { + var words = []; + + var hierarchy = hit._highlightResult.hierarchy; + // loop to fetch from lvl0, lvl1, etc. + for (var idx in hierarchy) { + words = words.concat(hierarchy[idx].matchedWords); + } + + var content = hit._highlightResult.content; + if (content) { + words = words.concat(content.matchedWords); + } + + // return unique words + var words_uniq = [...new Set(words)]; + return words_uniq; +} + +function updateHitURL(hit) { + + var words = matchedWords(hit); + var url = ""; + + if (hit.anchor) { + url = hit.url_without_anchor + '?q=' + escape(words.join(" ")) + '#' + hit.anchor; + } else { + url = hit.url + '?q=' + escape(words.join(" ")); + } + + return url; +} diff --git a/docs/index.html b/docs/index.html index f16ddf7..5e6442f 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,15 +1,15 @@ - + Chemical Entities as R Objects • chents - - - - + + + + - @@ -27,13 +27,18 @@
-
+

The R package chents provides some utilities for working with chemical entities in R, made available under the GNU public license. This means:

-
This program is free software: you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free Software
-Foundation, either version 3 of the License, or (at your option) any later
-version.
-
-This program is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
-details.
-
-You should have received a copy of the GNU General Public License along with
-this program. If not, see <http://www.gnu.org/licenses/>
+

Features

@@ -86,27 +98,41 @@ this program. If not, see <http://www.gnu.org/license
- +
-

Site built with pkgdown.

+

Site built with pkgdown 1.3.0.

-
+ + diff --git a/docs/jquery.sticky-kit.min.js b/docs/jquery.sticky-kit.min.js deleted file mode 100644 index e2a3c6d..0000000 --- a/docs/jquery.sticky-kit.min.js +++ /dev/null @@ -1,9 +0,0 @@ -/* - Sticky-kit v1.1.2 | WTFPL | Leaf Corcoran 2015 | http://leafo.net -*/ -(function(){var b,f;b=this.jQuery||window.jQuery;f=b(window);b.fn.stick_in_parent=function(d){var A,w,J,n,B,K,p,q,k,E,t;null==d&&(d={});t=d.sticky_class;B=d.inner_scrolling;E=d.recalc_every;k=d.parent;q=d.offset_top;p=d.spacer;w=d.bottoming;null==q&&(q=0);null==k&&(k=void 0);null==B&&(B=!0);null==t&&(t="is_stuck");A=b(document);null==w&&(w=!0);J=function(a,d,n,C,F,u,r,G){var v,H,m,D,I,c,g,x,y,z,h,l;if(!a.data("sticky_kit")){a.data("sticky_kit",!0);I=A.height();g=a.parent();null!=k&&(g=g.closest(k)); -if(!g.length)throw"failed to find stick parent";v=m=!1;(h=null!=p?p&&a.closest(p):b("
"))&&h.css("position",a.css("position"));x=function(){var c,f,e;if(!G&&(I=A.height(),c=parseInt(g.css("border-top-width"),10),f=parseInt(g.css("padding-top"),10),d=parseInt(g.css("padding-bottom"),10),n=g.offset().top+c+f,C=g.height(),m&&(v=m=!1,null==p&&(a.insertAfter(h),h.detach()),a.css({position:"",top:"",width:"",bottom:""}).removeClass(t),e=!0),F=a.offset().top-(parseInt(a.css("margin-top"),10)||0)-q, -u=a.outerHeight(!0),r=a.css("float"),h&&h.css({width:a.outerWidth(!0),height:u,display:a.css("display"),"vertical-align":a.css("vertical-align"),"float":r}),e))return l()};x();if(u!==C)return D=void 0,c=q,z=E,l=function(){var b,l,e,k;if(!G&&(e=!1,null!=z&&(--z,0>=z&&(z=E,x(),e=!0)),e||A.height()===I||x(),e=f.scrollTop(),null!=D&&(l=e-D),D=e,m?(w&&(k=e+u+c>C+n,v&&!k&&(v=!1,a.css({position:"fixed",bottom:"",top:c}).trigger("sticky_kit:unbottom"))),eb&&!v&&(c-=l,c=Math.max(b-u,c),c=Math.min(q,c),m&&a.css({top:c+"px"})))):e>F&&(m=!0,b={position:"fixed",top:c},b.width="border-box"===a.css("box-sizing")?a.outerWidth()+"px":a.width()+"px",a.css(b).addClass(t),null==p&&(a.after(h),"left"!==r&&"right"!==r||h.append(a)),a.trigger("sticky_kit:stick")),m&&w&&(null==k&&(k=e+u+c>C+n),!v&&k)))return v=!0,"static"===g.css("position")&&g.css({position:"relative"}), -a.css({position:"absolute",bottom:d,top:"auto"}).trigger("sticky_kit:bottom")},y=function(){x();return l()},H=function(){G=!0;f.off("touchmove",l);f.off("scroll",l);f.off("resize",y);b(document.body).off("sticky_kit:recalc",y);a.off("sticky_kit:detach",H);a.removeData("sticky_kit");a.css({position:"",bottom:"",top:"",width:""});g.position("position","");if(m)return null==p&&("left"!==r&&"right"!==r||a.insertAfter(h),h.remove()),a.removeClass(t)},f.on("touchmove",l),f.on("scroll",l),f.on("resize", -y),b(document.body).on("sticky_kit:recalc",y),a.on("sticky_kit:detach",H),setTimeout(l,0)}};n=0;for(K=this.length;n body > .container + * .Site-content -> body > .container .row + * .footer -> footer + * + * Key idea seems to be to ensure that .container and __all its parents__ + * have height set to 100% + * + */ + +html, body { + height: 100%; +} + body > .container { display: flex; - padding-top: 60px; - min-height: calc(100vh); + height: 100%; flex-direction: column; + + padding-top: 60px; } body > .container .row { - flex: 1; + flex: 1 0 auto; } footer { @@ -16,6 +35,7 @@ footer { border-top: 1px solid #e5e5e5; color: #666; display: flex; + flex-shrink: 0; } footer p { margin-bottom: 0; @@ -38,6 +58,17 @@ img { max-width: 100%; } +/* Fix bug in bootstrap (only seen in firefox) */ +summary { + display: list-item; +} + +/* Typographic tweaking ---------------------------------*/ + +.contents .page-header { + margin-top: calc(-60px + 1em); +} + /* Section anchors ---------------------------------*/ a.anchor { @@ -68,7 +99,7 @@ a.anchor { .contents h1, .contents h2, .contents h3, .contents h4 { padding-top: 60px; - margin-top: -60px; + margin-top: -40px; } /* Static header placement on mobile devices */ @@ -108,13 +139,11 @@ a.anchor { /* Reference index & topics ----------------------------------------------- */ .ref-index th {font-weight: normal;} -.ref-index h2 {font-size: 20px;} .ref-index td {vertical-align: top;} +.ref-index .icon {width: 40px;} .ref-index .alias {width: 40%;} -.ref-index .title {width: 60%;} - -.ref-index .alias {width: 40%;} +.ref-index-icons .alias {width: calc(40% - 40px);} .ref-index .title {width: 60%;} .ref-arguments th {text-align: right; padding-right: 10px;} @@ -192,3 +221,16 @@ a.sourceLine:hover { .hasCopyButton:hover button.btn-copy-ex { visibility: visible; } + +/* mark.js ----------------------------*/ + +mark { + background-color: rgba(255, 255, 51, 0.5); + border-bottom: 2px solid rgba(255, 153, 51, 0.3); + padding: 1px; +} + +/* vertical spacing after htmlwidgets */ +.html-widget { + margin-bottom: 10px; +} diff --git a/docs/pkgdown.js b/docs/pkgdown.js index 64b20df..eb7e83d 100644 --- a/docs/pkgdown.js +++ b/docs/pkgdown.js @@ -1,94 +1,115 @@ -$(function() { - - $("#sidebar") - .stick_in_parent({offset_top: 40}) - .on('sticky_kit:bottom', function(e) { - $(this).parent().css('position', 'static'); - }) - .on('sticky_kit:unbottom', function(e) { - $(this).parent().css('position', 'relative'); +/* http://gregfranko.com/blog/jquery-best-practices/ */ +(function($) { + $(function() { + + $("#sidebar") + .stick_in_parent({offset_top: 40}) + .on('sticky_kit:bottom', function(e) { + $(this).parent().css('position', 'static'); + }) + .on('sticky_kit:unbottom', function(e) { + $(this).parent().css('position', 'relative'); + }); + + $('body').scrollspy({ + target: '#sidebar', + offset: 60 }); - $('body').scrollspy({ - target: '#sidebar', - offset: 60 - }); + $('[data-toggle="tooltip"]').tooltip(); + + var cur_path = paths(location.pathname); + var links = $("#navbar ul li a"); + var max_length = -1; + var pos = -1; + for (var i = 0; i < links.length; i++) { + if (links[i].getAttribute("href") === "#") + continue; + // Ignore external links + if (links[i].host !== location.host) + continue; + + var nav_path = paths(links[i].pathname); + + var length = prefix_length(nav_path, cur_path); + if (length > max_length) { + max_length = length; + pos = i; + } + } - var cur_path = paths(location.pathname); - $("#navbar ul li a").each(function(index, value) { - if (value.text == "Home") - return; - if (value.getAttribute("href") === "#") - return; - - var path = paths(value.pathname); - if (is_prefix(cur_path, path)) { - // Add class to parent
  • , and enclosing
  • if in dropdown - var menu_anchor = $(value); + // Add class to parent
  • , and enclosing
  • if in dropdown + if (pos >= 0) { + var menu_anchor = $(links[pos]); menu_anchor.parent().addClass("active"); menu_anchor.closest("li.dropdown").addClass("active"); } }); -}); -function paths(pathname) { - var pieces = pathname.split("/"); - pieces.shift(); // always starts with / + function paths(pathname) { + var pieces = pathname.split("/"); + pieces.shift(); // always starts with / + + var end = pieces[pieces.length - 1]; + if (end === "index.html" || end === "") + pieces.pop(); + return(pieces); + } - var end = pieces[pieces.length - 1]; - if (end === "index.html" || end === "") - pieces.pop(); - return(pieces); -} + // Returns -1 if not found + function prefix_length(needle, haystack) { + if (needle.length > haystack.length) + return(-1); -function is_prefix(needle, haystack) { - if (needle.length > haystack.lengh) - return(false); + // Special case for length-0 haystack, since for loop won't run + if (haystack.length === 0) { + return(needle.length === 0 ? 0 : -1); + } - for (var i = 0; i < haystack.length; i++) { - if (needle[i] != haystack[i]) - return(false); - } + for (var i = 0; i < haystack.length; i++) { + if (needle[i] != haystack[i]) + return(i); + } - return(true); -} + return(haystack.length); + } -/* Clipboard --------------------------*/ + /* Clipboard --------------------------*/ -function changeTooltipMessage(element, msg) { - var tooltipOriginalTitle=element.getAttribute('data-original-title'); - element.setAttribute('data-original-title', msg); - $(element).tooltip('show'); - element.setAttribute('data-original-title', tooltipOriginalTitle); -} + function changeTooltipMessage(element, msg) { + var tooltipOriginalTitle=element.getAttribute('data-original-title'); + element.setAttribute('data-original-title', msg); + $(element).tooltip('show'); + element.setAttribute('data-original-title', tooltipOriginalTitle); + } -if(Clipboard.isSupported()) { - $(document).ready(function() { - var copyButton = ""; + if(ClipboardJS.isSupported()) { + $(document).ready(function() { + var copyButton = ""; - $(".examples").addClass("hasCopyButton"); + $(".examples, div.sourceCode").addClass("hasCopyButton"); - // Insert copy buttons: - $(copyButton).prependTo(".hasCopyButton"); + // Insert copy buttons: + $(copyButton).prependTo(".hasCopyButton"); - // Initialize tooltips: - $('.btn-copy-ex').tooltip({container: 'body'}); + // Initialize tooltips: + $('.btn-copy-ex').tooltip({container: 'body'}); - // Initialize clipboard: - var clipboardBtnCopies = new Clipboard('[data-clipboard-copy]', { - text: function(trigger) { - return trigger.parentNode.textContent; - } - }); + // Initialize clipboard: + var clipboardBtnCopies = new ClipboardJS('[data-clipboard-copy]', { + text: function(trigger) { + return trigger.parentNode.textContent; + } + }); - clipboardBtnCopies.on('success', function(e) { - changeTooltipMessage(e.trigger, 'Copied!'); - e.clearSelection(); - }); + clipboardBtnCopies.on('success', function(e) { + changeTooltipMessage(e.trigger, 'Copied!'); + e.clearSelection(); + }); - clipboardBtnCopies.on('error', function() { - changeTooltipMessage(e.trigger,'Press Ctrl+C or Command+C to copy'); + clipboardBtnCopies.on('error', function() { + changeTooltipMessage(e.trigger,'Press Ctrl+C or Command+C to copy'); + }); }); - }); -} - + } +})(window.jQuery || window.$) diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml new file mode 100644 index 0000000..1dc6ec1 --- /dev/null +++ b/docs/pkgdown.yml @@ -0,0 +1,5 @@ +pandoc: 2.2.1 +pkgdown: 1.3.0 +pkgdown_sha: ~ +articles: [] + diff --git a/docs/reference/chent-1.png b/docs/reference/chent-1.png index 8731cf1..a1798d9 100644 Binary files a/docs/reference/chent-1.png and b/docs/reference/chent-1.png differ diff --git a/docs/reference/chent-22.png b/docs/reference/chent-22.png deleted file mode 100644 index 69b3b08..0000000 Binary files a/docs/reference/chent-22.png and /dev/null differ diff --git a/docs/reference/chent.html b/docs/reference/chent.html index ef683ef..aa367f6 100644 --- a/docs/reference/chent.html +++ b/docs/reference/chent.html @@ -1,6 +1,6 @@ - + @@ -9,32 +9,39 @@ An R6 class for chemical entities with associated data — chent • chents - + - - + + - + - + + + + - - - + + + + + + - + +
  • @@ -80,17 +98,21 @@ python bindings are installed and configured for use with PythonInR." /> -
    +
    +

    The class is initialised with an identifier. Chemical information is retrieved from the internet. Additionally, it can be generated using RDKit if RDKit and its python bindings are installed and configured for use with PythonInR.

    +
    chent
    @@ -113,16 +135,21 @@ configured for use with PythonInR

    Picture

    Graph as a picture object obtained using grImport

    Pict_font_size

    Font size as extracted from the intermediate PostScript file

    pdf_height

    Height of the MediaBox in the pdf after cropping

    +
    p0

    Vapour pressure in Pa

    +
    cwsat

    Water solubility in mg/L

    chyaml

    List of information obtained from a YAML file

    -
    degradation

    List of degradation endpoints

    +
    soil_degradation

    Dataframe of modelling DT50 values

    +
    soil_ff

    Dataframe of formation fractions

    +
    soil_sorption

    Dataframe of soil sorption data

    +
    PUF

    Plant uptake factor

    Examples

    oct <- chent$new("1-octanol", smiles = "CCCCCCCCO")
    #> PubChem:
    #> https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/name/cids/JSON
    #> https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/cid/property/MolecularFormula,MolecularWeight,CanonicalSMILES,IsomericSMILES,InChI,InChIKey,IUPACName,XLogP,TPSA,Complexity,Charge,HBondDonorCount,HBondAcceptorCount/JSON
    #> https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/cid/synonyms/JSON
    #> -#> Initialize Python Version 2.7.13 (default, Nov 24 2017, 17:33:09) -#> [GCC 6.3.0 20170516]
    #> Trying to get chemical information from RDKit using user SMILES -#> CCCCCCCCO
    #> Loading required namespace: grConvert
    #> Did not find chyaml file ./1-octanol.yaml
    print(oct)
    #> <chent> +#> Initialize Python Version 2.7.13 (default, Sep 26 2018, 18:42:22) +#> [GCC 6.3.0 20170516]
    #> Trying to get chemical information from RDKit using User SMILES +#> CCCCCCCCO
    #> Lade nötigen Namensraum: grConvert
    #> Did not find chyaml file ./1-octanol.yaml
    print(oct)
    #> <chent> #> Identifier $identifier 1-octanol #> InChI Key $inchikey KBPLFHHGFOOTCA-UHFFFAOYSA-N #> SMILES string $smiles: @@ -131,9 +158,9 @@ configured for use with PythonInR

    #> Molecular weight $mw: 130.2 #> PubChem synonyms (up to 10): #> [1] "957" "1-octanol" "Octan-1-ol" "octanol" -#> [5] "Octyl alcohol" "N-octanol" "111-87-5" "Capryl alcohol" -#> [9] "caprylic alcohol" "n-Octyl alcohol"
    plot(oct)
    caffeine <- chent$new("caffeine")
    #> PubChem:
    #> https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/name/cids/JSON
    #> https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/cid/property/MolecularFormula,MolecularWeight,CanonicalSMILES,IsomericSMILES,InChI,InChIKey,IUPACName,XLogP,TPSA,Complexity,Charge,HBondDonorCount,HBondAcceptorCount/JSON
    #> https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/cid/synonyms/JSON
    #> Trying to get chemical information from RDKit using PubChem_Canonical SMILES -#> CN1C=NC2=C1C(=O)N(C(=O)N2C)C
    #> Did not find chyaml file ./caffeine.yaml
    print(caffeine)
    #> <chent> +#> [5] "111-87-5" "N-octanol" "Capryl alcohol" "Octyl alcohol" +#> [9] "caprylic alcohol" "n-Octyl alcohol"
    plot(oct)
    caffeine <- chent$new("caffeine")
    #> PubChem:
    #> https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/name/cids/JSON
    #> https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/cid/property/MolecularFormula,MolecularWeight,CanonicalSMILES,IsomericSMILES,InChI,InChIKey,IUPACName,XLogP,TPSA,Complexity,Charge,HBondDonorCount,HBondAcceptorCount/JSON
    #> https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/cid/synonyms/JSON
    #> Trying to get chemical information from RDKit using PubChem_Canonical SMILES +#> CN1C=NC2=C1C(=O)N(C(=O)N2C)C
    #> Did not find chyaml file ./caffeine.yaml
    print(caffeine)
    #> <chent> #> Identifier $identifier caffeine #> InChI Key $inchikey RYYVLZVUVIJVGH-UHFFFAOYSA-N #> SMILES string $smiles: @@ -142,10 +169,10 @@ configured for use with PythonInR

    #> Molecular weight $mw: 194.2 #> PubChem synonyms (up to 10): #> [1] "2519" "caffeine" -#> [3] "1,3,7-Trimethylxanthine" "58-08-2" -#> [5] "Guaranine" "Thein" +#> [3] "58-08-2" "Guaranine" +#> [5] "1,3,7-Trimethylxanthine" "Thein" #> [7] "Cafeina" "Methyltheobromine" -#> [9] "Koffein" "Mateina"
    plot(caffeine)
    +#> [9] "Koffein" "Mateina"
    plot(caffeine)
    -

    Site built with pkgdown.

    +

    Site built with pkgdown 1.3.0.

    -
    + + + diff --git a/docs/reference/draw_svg.chent.html b/docs/reference/draw_svg.chent.html index 5342eca..54fec7c 100644 --- a/docs/reference/draw_svg.chent.html +++ b/docs/reference/draw_svg.chent.html @@ -1,6 +1,6 @@ - + @@ -9,30 +9,37 @@ Draw SVG graph from a chent object using RDKit — draw_svg.chent • chents - + - - + + - + - + + + + - - - + + + + + + - + +
    @@ -78,20 +96,24 @@ -
    +
    +

    Draw SVG graph from a chent object using RDKit

    +
    draw_svg.chent(x, width = 300, height = 150,
    -  filename = paste0(names(x$identifier), ".svg"), subdir = "svg")
    + filename = paste0(names(x$identifier), ".svg"), subdir = "svg") -

    Arguments

    +

    Arguments

    @@ -133,11 +155,13 @@
    -

    Site built with pkgdown.

    +

    Site built with pkgdown 1.3.0.

    - + + + diff --git a/docs/reference/index.html b/docs/reference/index.html index 29771c9..e05a1c4 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -1,6 +1,6 @@ - + @@ -9,27 +9,34 @@ Function reference • chents - + - - + + - + - + + + + - - - + + + + + + - + + @@ -75,76 +93,72 @@ -
    -
    +
    +
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    R6 Class definitions and methods

    -

    -
    -

    chent

    -

    An R6 class for chemical entities with associated data

    -

    draw_svg.chent

    -

    Draw SVG graph from a chent object using RDKit

    -

    plot

    -

    Plot method for chent objects

    -

    print

    -

    Printing method for chent objects

    -

    pai

    -

    An R6 class for pesticidal active ingredients and associated data

    -

    print

    -

    Printing method for pai objects (pesticidal active ingredients)

    -

    pp

    -

    R6 class for holding a product with at least one active ingredient

    -
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +

    R6 Class definitions and methods

    +

    +
    +

    chent

    +

    An R6 class for chemical entities with associated data

    +

    draw_svg.chent()

    +

    Draw SVG graph from a chent object using RDKit

    +

    plot(<chent>)

    +

    Plot method for chent objects

    +

    print(<chent>)

    +

    Printing method for chent objects

    +

    pai

    +

    An R6 class for pesticidal active ingredients and associated data

    +

    print(<pai>)

    +

    Printing method for pai objects (pesticidal active ingredients)

    +

    pp

    +

    R6 class for holding a product with at least one active ingredient

    -

    Site built with pkgdown.

    +

    Site built with pkgdown 1.3.0.

    -
    + + + diff --git a/docs/reference/pai.html b/docs/reference/pai.html index 30a5b77..d90bcc9 100644 --- a/docs/reference/pai.html +++ b/docs/reference/pai.html @@ -1,6 +1,6 @@ - + @@ -9,31 +9,38 @@ An R6 class for pesticidal active ingredients and associated data — pai • chents - + - - + + - + - + + + + - - - + + + + + + - + + @@ -79,16 +97,20 @@ Additional chemical information is retrieved from the internet if available." /> -
    +
    +

    The class is initialised with an identifier which is generally an ISO common name. Additional chemical information is retrieved from the internet if available.

    +
    pai
    @@ -107,7 +129,7 @@ Additional chemical information is retrieved from the internet if available.

    Examples

    atr <- pai$new("atrazine")
    #> alanwood.net:
    #> Querying atrazine.html
    #> PubChem:
    #> https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/inchikey/cids/JSON
    #> https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/cid/property/MolecularFormula,MolecularWeight,CanonicalSMILES,IsomericSMILES,InChI,InChIKey,IUPACName,XLogP,TPSA,Complexity,Charge,HBondDonorCount,HBondAcceptorCount/JSON
    #> https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/cid/synonyms/JSON
    #> Trying to get chemical information from RDKit using PubChem_Canonical SMILES -#> CCNC1=NC(=NC(=N1)Cl)NC(C)C
    #> Did not find chyaml file ./atrazine.yaml
    print(atr)
    #> <pai> with ISO common name $iso atrazine +#> CCNC1=NC(=NC(=N1)Cl)NC(C)C
    #> Did not find chyaml file ./atrazine.yaml
    print(atr)
    #> <pai> with ISO common name $iso atrazine #> <chent> #> Identifier $identifier atrazine #> InChI Key $inchikey MXWJVTOOROXGIU-UHFFFAOYSA-N @@ -139,11 +161,13 @@ Additional chemical information is retrieved from the internet if available.

    -

    Site built with pkgdown.

    +

    Site built with pkgdown 1.3.0.

    -
    + + + diff --git a/docs/reference/plot.chent-1.png b/docs/reference/plot.chent-1.png index 8731cf1..a1798d9 100644 Binary files a/docs/reference/plot.chent-1.png and b/docs/reference/plot.chent-1.png differ diff --git a/docs/reference/plot.chent-11.png b/docs/reference/plot.chent-11.png deleted file mode 100644 index 69b3b08..0000000 Binary files a/docs/reference/plot.chent-11.png and /dev/null differ diff --git a/docs/reference/plot.chent.html b/docs/reference/plot.chent.html index cc3b96b..cde7a87 100644 --- a/docs/reference/plot.chent.html +++ b/docs/reference/plot.chent.html @@ -1,6 +1,6 @@ - + @@ -9,30 +9,37 @@ Plot method for chent objects — plot.chent • chents - + - - + + - + - + + + + - - - + + + + + + - + +
    @@ -78,20 +96,24 @@ -
    +
    +

    Plot method for chent objects

    +
    # S3 method for chent
    -plot(x, ...)
    +plot(x, ...) -

    Arguments

    +

    Arguments

    @@ -107,7 +129,7 @@

    Examples

    caffeine <- chent$new("caffeine")
    #> PubChem:
    #> https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/name/cids/JSON
    #> https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/cid/property/MolecularFormula,MolecularWeight,CanonicalSMILES,IsomericSMILES,InChI,InChIKey,IUPACName,XLogP,TPSA,Complexity,Charge,HBondDonorCount,HBondAcceptorCount/JSON
    #> https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/cid/synonyms/JSON
    #> Trying to get chemical information from RDKit using PubChem_Canonical SMILES -#> CN1C=NC2=C1C(=O)N(C(=O)N2C)C
    #> Did not find chyaml file ./caffeine.yaml
    print(caffeine)
    #> <chent> +#> CN1C=NC2=C1C(=O)N(C(=O)N2C)C
    #> Did not find chyaml file ./caffeine.yaml
    print(caffeine)
    #> <chent> #> Identifier $identifier caffeine #> InChI Key $inchikey RYYVLZVUVIJVGH-UHFFFAOYSA-N #> SMILES string $smiles: @@ -116,10 +138,10 @@ #> Molecular weight $mw: 194.2 #> PubChem synonyms (up to 10): #> [1] "2519" "caffeine" -#> [3] "1,3,7-Trimethylxanthine" "58-08-2" -#> [5] "Guaranine" "Thein" +#> [3] "58-08-2" "Guaranine" +#> [5] "1,3,7-Trimethylxanthine" "Thein" #> [7] "Cafeina" "Methyltheobromine" -#> [9] "Koffein" "Mateina"
    plot(caffeine)
    +#> [9] "Koffein" "Mateina"
    plot(caffeine)
    -

    Site built with pkgdown.

    +

    Site built with pkgdown 1.3.0.

    - + + + diff --git a/docs/reference/pp.html b/docs/reference/pp.html index 538b885..8dbed29 100644 --- a/docs/reference/pp.html +++ b/docs/reference/pp.html @@ -1,6 +1,6 @@ - + @@ -9,30 +9,37 @@ R6 class for holding a product with at least one active ingredient — pp • chents - + - - + + - + - + + + + - - - + + + + + + - + + @@ -78,15 +96,19 @@ -
    +
    +

    An R6 class for holding information about a product with at least one active ingredient

    +
    pp
    @@ -124,11 +146,13 @@
    -

    Site built with pkgdown.

    +

    Site built with pkgdown 1.3.0.

    -
    + + + diff --git a/docs/reference/print.chent.html b/docs/reference/print.chent.html index 81fde0d..8ab91bc 100644 --- a/docs/reference/print.chent.html +++ b/docs/reference/print.chent.html @@ -1,6 +1,6 @@ - + @@ -9,30 +9,37 @@ Printing method for chent objects — print.chent • chents - + - - + + - + - + + + + - - - + + + + + + - + +
    @@ -78,20 +96,24 @@ -
    +
    +

    Printing method for chent objects

    +
    # S3 method for chent
    -print(x, ...)
    +print(x, ...) -

    Arguments

    +

    Arguments

    @@ -121,11 +143,13 @@
    -

    Site built with pkgdown.

    +

    Site built with pkgdown 1.3.0.

    - + + + diff --git a/docs/reference/print.pai.html b/docs/reference/print.pai.html index 08966de..7f8c6f3 100644 --- a/docs/reference/print.pai.html +++ b/docs/reference/print.pai.html @@ -1,6 +1,6 @@ - + @@ -9,30 +9,37 @@ Printing method for pai objects (pesticidal active ingredients) — print.pai • chents - + - - + + - + - + + + + - - - + + + + + + - + + @@ -78,20 +96,24 @@ -
    +
    +

    Printing method for pai objects (pesticidal active ingredients)

    +
    # S3 method for pai
    -print(x, ...)
    +print(x, ...) -

    Arguments

    +

    Arguments

    @@ -121,11 +143,13 @@
    -

    Site built with pkgdown.

    +

    Site built with pkgdown 1.3.0.

    - + + + -- cgit v1.2.1