removing searchindex.js
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@15533 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
@ -43,6 +43,8 @@ html: $(OBJECTS)
|
|||||||
sphinx-build -j 8 -b html -c utils/sphinx-config -d $(BUILDDIR)/doctrees $(RSTDIR) html ;\
|
sphinx-build -j 8 -b html -c utils/sphinx-config -d $(BUILDDIR)/doctrees $(RSTDIR) html ;\
|
||||||
deactivate ;\
|
deactivate ;\
|
||||||
)
|
)
|
||||||
|
-rm html/searchindex.js
|
||||||
|
-rm -rf html/_sources
|
||||||
@echo "Build finished. The HTML pages are in doc/html."
|
@echo "Build finished. The HTML pages are in doc/html."
|
||||||
|
|
||||||
pdf: utils/txt2html/txt2html.exe
|
pdf: utils/txt2html/txt2html.exe
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@ -1,50 +1,20 @@
|
|||||||
{#
|
|
||||||
basic/search.html
|
|
||||||
~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
Template for the search page.
|
|
||||||
|
|
||||||
:copyright: Copyright 2007-2013 by the Sphinx team, see AUTHORS.
|
|
||||||
:license: BSD, see LICENSE for details.
|
|
||||||
#}
|
|
||||||
{%- extends "layout.html" %}
|
{%- extends "layout.html" %}
|
||||||
{% set title = _('Search') %}
|
{% set title = _('Search') %}
|
||||||
{% set script_files = script_files + ['_static/searchtools.js'] %}
|
|
||||||
{% block footer %}
|
{% block footer %}
|
||||||
<script type="text/javascript">
|
|
||||||
jQuery(function() { Search.loadIndex("{{ pathto('searchindex.js', 1) }}"); });
|
|
||||||
</script>
|
|
||||||
{# this is used when loading the search index using $.ajax fails,
|
|
||||||
such as on Chrome for documents on localhost #}
|
|
||||||
<script type="text/javascript" id="searchindexloader"></script>
|
|
||||||
{{ super() }}
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block body %}
|
{% block body %}
|
||||||
<noscript>
|
|
||||||
<div id="fallback" class="admonition warning">
|
|
||||||
<p class="last">
|
|
||||||
{% trans %}Please activate JavaScript to enable the search
|
|
||||||
functionality.{% endtrans %}
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</noscript>
|
|
||||||
|
|
||||||
{% if search_performed %}
|
|
||||||
<h2>{{ _('Search Results') }}</h2>
|
|
||||||
{% if not search_results %}
|
|
||||||
<p>{{ _('Your search did not match any documents. Please make sure that all words are spelled correctly and that you\'ve selected enough categories.') }}</p>
|
|
||||||
{% endif %}
|
|
||||||
{% endif %}
|
|
||||||
<div id="search-results">
|
<div id="search-results">
|
||||||
{% if search_results %}
|
<script>
|
||||||
<ul>
|
(function() {
|
||||||
{% for href, caption, context in search_results %}
|
var cx = '012685039201307511604:um7if1hinba';
|
||||||
<li>
|
var gcse = document.createElement('script');
|
||||||
<a href="{{ pathto(item.href) }}">{{ caption }}</a>
|
gcse.type = 'text/javascript';
|
||||||
<p class="context">{{ context|e }}</p>
|
gcse.async = true;
|
||||||
</li>
|
gcse.src = 'https://cse.google.com/cse.js?cx=' + cx;
|
||||||
{% endfor %}
|
var s = document.getElementsByTagName('script')[0];
|
||||||
</ul>
|
s.parentNode.insertBefore(gcse, s);
|
||||||
{% endif %}
|
})();
|
||||||
|
</script>
|
||||||
|
<gcse:searchresults-only></gcse:searchresults-only>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@ -309,6 +309,9 @@ class OutputCapture(object):
|
|||||||
|
|
||||||
def __exit__(self, type, value, tracebac):
|
def __exit__(self, type, value, tracebac):
|
||||||
os.dup2(self.stdout, self.stdout_fd)
|
os.dup2(self.stdout, self.stdout_fd)
|
||||||
|
os.close(self.stdout)
|
||||||
|
os.close(self.stdout_pipe_read)
|
||||||
|
os.close(self.stdout_pipe_write)
|
||||||
|
|
||||||
# check if we have more to read from the pipe
|
# check if we have more to read from the pipe
|
||||||
def more_data(self, pipe):
|
def more_data(self, pipe):
|
||||||
@ -350,8 +353,11 @@ class AtomList(object):
|
|||||||
def __init__(self, lammps_wrapper_instance):
|
def __init__(self, lammps_wrapper_instance):
|
||||||
self.lmp = lammps_wrapper_instance
|
self.lmp = lammps_wrapper_instance
|
||||||
self.natoms = self.lmp.system.natoms
|
self.natoms = self.lmp.system.natoms
|
||||||
|
self.dimensions = self.lmp.system.dimensions
|
||||||
|
|
||||||
def __getitem__(self, index):
|
def __getitem__(self, index):
|
||||||
|
if self.dimensions == 2:
|
||||||
|
return Atom2D(self.lmp, index + 1)
|
||||||
return Atom(self.lmp, index + 1)
|
return Atom(self.lmp, index + 1)
|
||||||
|
|
||||||
|
|
||||||
@ -382,6 +388,12 @@ class Atom(object):
|
|||||||
self.lmp.eval("y[%d]" % self.index),
|
self.lmp.eval("y[%d]" % self.index),
|
||||||
self.lmp.eval("z[%d]" % self.index))
|
self.lmp.eval("z[%d]" % self.index))
|
||||||
|
|
||||||
|
@position.setter
|
||||||
|
def position(self, value):
|
||||||
|
self.lmp.set("atom", self.index, "x", value[0])
|
||||||
|
self.lmp.set("atom", self.index, "y", value[1])
|
||||||
|
self.lmp.set("atom", self.index, "z", value[2])
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def velocity(self):
|
def velocity(self):
|
||||||
return (self.lmp.eval("vx[%d]" % self.index),
|
return (self.lmp.eval("vx[%d]" % self.index),
|
||||||
@ -399,6 +411,31 @@ class Atom(object):
|
|||||||
return self.lmp.eval("q[%d]" % self.index)
|
return self.lmp.eval("q[%d]" % self.index)
|
||||||
|
|
||||||
|
|
||||||
|
class Atom2D(Atom):
|
||||||
|
def __init__(self, lammps_wrapper_instance, index):
|
||||||
|
super(Atom2D, self).__init__(lammps_wrapper_instance, index)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def position(self):
|
||||||
|
return (self.lmp.eval("x[%d]" % self.index),
|
||||||
|
self.lmp.eval("y[%d]" % self.index))
|
||||||
|
|
||||||
|
@position.setter
|
||||||
|
def position(self, value):
|
||||||
|
self.lmp.set("atom", self.index, "x", value[0])
|
||||||
|
self.lmp.set("atom", self.index, "y", value[1])
|
||||||
|
|
||||||
|
@property
|
||||||
|
def velocity(self):
|
||||||
|
return (self.lmp.eval("vx[%d]" % self.index),
|
||||||
|
self.lmp.eval("vy[%d]" % self.index))
|
||||||
|
|
||||||
|
@property
|
||||||
|
def force(self):
|
||||||
|
return (self.lmp.eval("fx[%d]" % self.index),
|
||||||
|
self.lmp.eval("fy[%d]" % self.index))
|
||||||
|
|
||||||
|
|
||||||
class PyLammps(object):
|
class PyLammps(object):
|
||||||
"""
|
"""
|
||||||
More Python-like wrapper for LAMMPS (e.g., for iPython)
|
More Python-like wrapper for LAMMPS (e.g., for iPython)
|
||||||
@ -608,6 +645,10 @@ class PyLammps(object):
|
|||||||
with OutputCapture() as capture:
|
with OutputCapture() as capture:
|
||||||
self.lmp.command(' '.join(cmd_args))
|
self.lmp.command(' '.join(cmd_args))
|
||||||
output = capture.output
|
output = capture.output
|
||||||
|
|
||||||
|
if 'verbose' in kwargs and kwargs['verbose']:
|
||||||
|
print(output)
|
||||||
|
|
||||||
lines = output.splitlines()
|
lines = output.splitlines()
|
||||||
|
|
||||||
if len(lines) > 1:
|
if len(lines) > 1:
|
||||||
@ -662,3 +703,7 @@ class IPyLammps(PyLammps):
|
|||||||
self.write_dump(*cmd_args)
|
self.write_dump(*cmd_args)
|
||||||
from IPython.core.display import Image
|
from IPython.core.display import Image
|
||||||
return Image('snapshot.png')
|
return Image('snapshot.png')
|
||||||
|
|
||||||
|
def video(self, filename):
|
||||||
|
from IPython.display import HTML
|
||||||
|
return HTML("<video controls><source src=\"" + filename + "\"></video>")
|
||||||
|
|||||||
Reference in New Issue
Block a user