Skip to content

Commit

Permalink
deploy: 280306f
Browse files Browse the repository at this point in the history
  • Loading branch information
Ameyanagi committed Aug 21, 2023
0 parents commit dface6b
Show file tree
Hide file tree
Showing 135 changed files with 15,477 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .buildinfo
Original file line number Diff line number Diff line change
@@ -0,0 +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: f91a651cb0694f4ce6275cbcec1c211e
tags: 645f666f9bcd5a90fca523b33c5a78b7
Binary file added .doctrees/authors.doctree
Binary file not shown.
Binary file added .doctrees/contributing.doctree
Binary file not shown.
Binary file added .doctrees/environment.pickle
Binary file not shown.
Binary file added .doctrees/history.doctree
Binary file not shown.
Binary file added .doctrees/index.doctree
Binary file not shown.
Binary file added .doctrees/installation.doctree
Binary file not shown.
Binary file added .doctrees/readme.doctree
Binary file not shown.
Binary file added .doctrees/usage.doctree
Binary file not shown.
Empty file added .nojekyll
Empty file.
1 change: 1 addition & 0 deletions _sources/authors.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.. include:: ../AUTHORS.rst
1 change: 1 addition & 0 deletions _sources/contributing.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.. include:: ../CONTRIBUTING.rst
1 change: 1 addition & 0 deletions _sources/history.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.. include:: ../HISTORY.rst
20 changes: 20 additions & 0 deletions _sources/index.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Welcome to DecomNano's documentation!
======================================

.. toctree::
:maxdepth: 2
:caption: Contents:

readme
installation
usage
modules
contributing
authors
history

Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
51 changes: 51 additions & 0 deletions _sources/installation.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
.. highlight:: shell

============
Installation
============


Stable release
--------------

To install DecomNano, run this command in your terminal:

.. code-block:: console
$ pip install decomnano
This is the preferred method to install DecomNano, as it will always install the most recent stable release.

If you don't have `pip`_ installed, this `Python installation guide`_ can guide
you through the process.

.. _pip: https://pip.pypa.io
.. _Python installation guide: http://docs.python-guide.org/en/latest/starting/installation/


From sources
------------

The sources for DecomNano can be downloaded from the `Github repo`_.

You can either clone the public repository:

.. code-block:: console
$ git clone git://github.com/Ameyanagi/decomnano
Or download the `tarball`_:

.. code-block:: console
$ curl -OJL https://github.com/Ameyanagi/decomnano/tarball/master
Once you have a copy of the source, you can install it with:

.. code-block:: console
$ python setup.py install
.. _Github repo: https://github.com/Ameyanagi/decomnano
.. _tarball: https://github.com/Ameyanagi/decomnano/tarball/master
1 change: 1 addition & 0 deletions _sources/readme.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.. include:: ../README.rst
87 changes: 87 additions & 0 deletions _sources/usage.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
=====
Usage
=====

Command Line Interface
~~~~~~~~~~~~~~~~~~~~~~

The decomnano package comes with a command line interface (CLI) that can be used to run the analysis. The configuration file can be found in the `examples`_ directory. Download the configuration file and run the following command.

.. _examples: https://github.com/Ameyanagi/DecomNano/tree/main/examples

.. code-block:: bash
decomnano -c sweep_example.toml -o sweep_results.csv
The results will be saved in the `sweep_results.csv` file.

The configuration file is a TOML file. The following parameters can be set in the configuration file.

.. code-block:: toml
# Example configuration file for DecomNano
# Single run is done if sweep is false
# Sweep is done if sweep is true
sweep = true
# You can specify the output file name. If not specified, the default name is "results.csv"
output = "sweep_results.csv"
[input]
# input section is used for input of DecomNano if sweep is false
# input section is used for input_default of SweepDecomNano if sweep is true
dP=2.77
dA=2.88
fA=0.8
nAA=6.2
nPP=9.8
nAP=0.5
nPA=0.53
DA=0
DAP=18
DP=0
[input_config]
# Input_config section is used for defining the sweep range of each parameter.
# It is required if sweep is true.
# It will be ignored if sweep is false.# Accepted types are number, list and dictionary.
# A dictionary will require start, end and step, and will generate a list of range(start, end, step). end is not included as in range() function in python.
nAA=0.1
DAP=[16, 17, 18]
DA={start=0, end=2, step=1}
The variables in the input dictionary different from the paper due to the naming rules of python. Following table shows the correspondence between the variables in the paper and the input dictionary.

+-------------------------------------------+------------+-----------------------------------------------------------------------+
| Notation in paper | Keys | Descriptions |
+===========================================+============+=======================================================================+
|:math:`d_P` | dP | Interatomic spacing of Pt nanoparticles |
+-------------------------------------------+------------+-----------------------------------------------------------------------+
|:math:`d_A` | dA | Interatomic spacing of Au nanoparticles |
+-------------------------------------------+------------+-----------------------------------------------------------------------+
|:math:`\frac{M_A}{M_A + M_P}` | fA | Molar fraction of Au |
+-------------------------------------------+------------+-----------------------------------------------------------------------+
|:math:`n_{A-A}` | nAA | Total first nearest neighbor coordination number of Au-Au bonds. |
+-------------------------------------------+------------+-----------------------------------------------------------------------+
|:math:`n_{P-P}` | nPP | Total first nearest neighbor coordination number of Pt-Pt bonds. |
+-------------------------------------------+------------+-----------------------------------------------------------------------+
|:math:`n_{A-P}` | nAP | Total first nearest neighbor coordination number of Au-Pt bonds. |
+-------------------------------------------+------------+-----------------------------------------------------------------------+
|:math:`n_{P-A}` | nPA | Total first nearest neighbor coordination number of Pt-Au bonds. |
+-------------------------------------------+------------+-----------------------------------------------------------------------+
|:math:`D_A` | DA | Diameter of Au nanoparticles |
+-------------------------------------------+------------+-----------------------------------------------------------------------+
|:math:`D_{AP}` | DAP | Diameter of PtAu nanoparticles |
+-------------------------------------------+------------+-----------------------------------------------------------------------+
|:math:`D_P` | DP | Diameter of Pt nanoparticles |
+-------------------------------------------+------------+-----------------------------------------------------------------------+


Python API
~~~~~~~~~~

The decomanano package can be imported and used in python scripts.
Please refer to the `API documentation`_ for details.

.. _API documentation: https://ameyanagi.github.io/DecomNano/modules.html
123 changes: 123 additions & 0 deletions _static/_sphinx_javascript_frameworks_compat.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
/* Compatability shim for jQuery and underscores.js.
*
* Copyright Sphinx contributors
* Released under the two clause BSD licence
*/

/**
* small helper function to urldecode strings
*
* See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent#Decoding_query_parameters_from_a_URL
*/
jQuery.urldecode = function(x) {
if (!x) {
return x
}
return decodeURIComponent(x.replace(/\+/g, ' '));
};

/**
* small helper function to urlencode strings
*/
jQuery.urlencode = encodeURIComponent;

/**
* This function returns the parsed url parameters of the
* current request. Multiple values per key are supported,
* it will always return arrays of strings for the value parts.
*/
jQuery.getQueryParameters = function(s) {
if (typeof s === 'undefined')
s = document.location.search;
var parts = s.substr(s.indexOf('?') + 1).split('&');
var result = {};
for (var i = 0; i < parts.length; i++) {
var tmp = parts[i].split('=', 2);
var key = jQuery.urldecode(tmp[0]);
var value = jQuery.urldecode(tmp[1]);
if (key in result)
result[key].push(value);
else
result[key] = [value];
}
return result;
};

/**
* highlight a given string on a jquery object by wrapping it in
* span elements with the given class name.
*/
jQuery.fn.highlightText = function(text, className) {
function highlight(node, addItems) {
if (node.nodeType === 3) {
var val = node.nodeValue;
var pos = val.toLowerCase().indexOf(text);
if (pos >= 0 &&
!jQuery(node.parentNode).hasClass(className) &&
!jQuery(node.parentNode).hasClass("nohighlight")) {
var span;
var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg");
if (isInSVG) {
span = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
} else {
span = document.createElement("span");
span.className = className;
}
span.appendChild(document.createTextNode(val.substr(pos, text.length)));
node.parentNode.insertBefore(span, node.parentNode.insertBefore(
document.createTextNode(val.substr(pos + text.length)),
node.nextSibling));
node.nodeValue = val.substr(0, pos);
if (isInSVG) {
var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect");
var bbox = node.parentElement.getBBox();
rect.x.baseVal.value = bbox.x;
rect.y.baseVal.value = bbox.y;
rect.width.baseVal.value = bbox.width;
rect.height.baseVal.value = bbox.height;
rect.setAttribute('class', className);
addItems.push({
"parent": node.parentNode,
"target": rect});
}
}
}
else if (!jQuery(node).is("button, select, textarea")) {
jQuery.each(node.childNodes, function() {
highlight(this, addItems);
});
}
}
var addItems = [];
var result = this.each(function() {
highlight(this, addItems);
});
for (var i = 0; i < addItems.length; ++i) {
jQuery(addItems[i].parent).before(addItems[i].target);
}
return result;
};

/*
* backward compatibility for jQuery.browser
* This will be supported until firefox bug is fixed.
*/
if (!jQuery.browser) {
jQuery.uaMatch = function(ua) {
ua = ua.toLowerCase();

var match = /(chrome)[ \/]([\w.]+)/.exec(ua) ||
/(webkit)[ \/]([\w.]+)/.exec(ua) ||
/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) ||
/(msie) ([\w.]+)/.exec(ua) ||
ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) ||
[];

return {
browser: match[ 1 ] || "",
version: match[ 2 ] || "0"
};
};
jQuery.browser = {};
jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true;
}
Loading

0 comments on commit dface6b

Please sign in to comment.