Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tsoc
openmm
Commits
063937fb
"examples/MakefileNotes.txt" did not exist on "2f51951e8db94334e2327419698da388a51c22f6"
Commit
063937fb
authored
Feb 28, 2014
by
peastman
Browse files
Fixed some errors in documentation generation
parent
91bf4fcd
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
12 additions
and
113 deletions
+12
-113
docs/developerguide/conf.py
docs/developerguide/conf.py
+2
-1
docs/usersguide/application.rst
docs/usersguide/application.rst
+5
-5
docs/usersguide/autonumber.py
docs/usersguide/autonumber.py
+0
-70
docs/usersguide/caption.py
docs/usersguide/caption.py
+0
-18
docs/usersguide/conf.py
docs/usersguide/conf.py
+2
-1
docs/usersguide/header.rst
docs/usersguide/header.rst
+2
-0
docs/usersguide/library.rst
docs/usersguide/library.rst
+1
-1
docs/usersguide/samepage.py
docs/usersguide/samepage.py
+0
-17
No files found.
docs/developerguide/conf.py
View file @
063937fb
...
...
@@ -17,6 +17,7 @@ import sys, os
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
sys
.
path
.
insert
(
0
,
os
.
path
.
abspath
(
'.'
))
sys
.
path
.
append
(
os
.
path
.
abspath
(
'../sphinx'
))
# -- General configuration -----------------------------------------------------
...
...
@@ -25,7 +26,7 @@ sys.path.insert(0, os.path.abspath('.'))
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions
=
[
'
../sphinx/
autonumber'
,
'
../sphinx/
numsec'
]
extensions
=
[
'autonumber'
,
'numsec'
]
# Add any paths that contain templates here, relative to this directory.
templates_path
=
[
'_templates'
]
...
...
docs/usersguide/application.rst
View file @
063937fb
...
...
@@ -63,8 +63,8 @@ install both the drivers and toolkit.
4.
(
Optional
)
If
you
plan
to
use
the
CPU
platform
,
it
is
recommended
that
you
install
FFTW
,
available
from
http
://
www
.
fftw
.
org
.
When
configuring
it
,
be
sure
to
specify
single
precision
and
multiple
threads
(
the
:
code
:`
--
enable
-
float
`
and
:
code
:`
--
enable
-
threads
`
options
).
OpenMM
will
still
work
without
FFTW
,
to
specify
single
precision
and
multiple
threads
(
the
|--|\
:
code
:`
enable
-
float
`
and
|--|\
:
code
:`
enable
-
threads
`
options
).
OpenMM
will
still
work
without
FFTW
,
but
the
performance
of
particle
mesh
Ewald
(
PME
)
will
be
much
worse
.
5.
Launch
the
Terminal
application
.
Change
to
the
OpenMM
directory
by
typing
...
...
@@ -127,7 +127,7 @@ Installing on Linux
2.
Make
sure
you
have
Python
2.6
or
higher
(
earlier
versions
will
not
work
)
and
a
C
++
compiler
(
typically
gcc
or
clang
)
installed
on
your
computer
.
You
can
check
what
version
of
Python
is
installed
by
typing
:
code
:`
python
--
version
`
check
what
version
of
Python
is
installed
by
typing
:
code
:`
python
`
|--|\
:
code
:`
version
`
into
a
console
window
.
3.
(
Optional
)
If
you
want
to
run
OpenMM
on
a
GPU
,
install
CUDA
and
/
or
OpenCL
.
...
...
@@ -142,8 +142,8 @@ into a console window.
install
FFTW
.
It
is
probably
available
through
your
system
’
s
package
manager
such
as
:
code
:`
yum
`
or
:
code
:`
apt
-
get
`\
.
Alternatively
,
you
can
download
it
from
http
://
www
.
fftw
.
org
.
When
configuring
it
,
be
sure
to
specify
single
precision
and
multiple
threads
(
the
:
code
:`
--
enable
-
float
`
and
:
code
:`
--
enable
-
threads
`
options
).
OpenMM
will
still
work
without
FFTW
,
but
the
precision
and
multiple
threads
(
the
|--|\
:
code
:`
enable
-
float
`
and
|--|\
:
code
:`
enable
-
threads
`
options
).
OpenMM
will
still
work
without
FFTW
,
but
the
performance
of
particle
mesh
Ewald
(
PME
)
will
be
much
worse
.
5.
In
a
console
window
,
change
to
the
OpenMM
directory
by
typing
...
...
docs/usersguide/autonumber.py
deleted
100644 → 0
View file @
91bf4fcd
from
docutils.parsers.rst
import
roles
from
docutils.nodes
import
Text
,
reference
,
section
from
sphinx.roles
import
XRefRole
class
autonumber
(
Text
):
pass
class
autonumber_ref
(
reference
):
pass
def
autonumber_role
(
name
,
rawtext
,
text
,
lineno
,
inliner
,
options
=
{},
content
=
[]):
return
([
autonumber
(
text
)],
[])
def
doctree_resolved
(
app
,
doctree
,
docname
):
index
=
{};
refTable
=
{}
if
app
.
config
.
autonumber_by_chapter
:
# Record the number of each chapter
env
=
app
.
builder
.
env
sectionNumbers
=
{}
for
doc
in
env
.
toc_secnumbers
:
sections
=
env
.
toc_secnumbers
[
doc
]
for
sectionId
in
sections
:
sectionNumbers
[
sectionId
[
1
:]]
=
sections
[
sectionId
]
lastChapter
=
-
1
# Assign numbers to all the autonumbered objects.
for
node
in
doctree
.
traverse
(
autonumber
):
category
=
node
.
astext
().
split
(
','
)[
0
]
if
category
in
index
:
nextNumber
=
index
[
category
]
+
1
else
:
nextNumber
=
1
if
app
.
config
.
autonumber_by_chapter
:
parent
=
node
.
parent
chapter
=
None
while
chapter
is
None
:
if
isinstance
(
parent
,
section
):
chapter
=
parent
parent
=
parent
.
parent
chapter
=
sectionNumbers
[
chapter
.
attributes
[
'ids'
][
0
]][
0
]
if
chapter
!=
lastChapter
:
index
=
{}
newNode
=
Text
(
'%s %d-%d'
%
(
category
,
chapter
,
nextNumber
))
lastChapter
=
chapter
else
:
newNode
=
Text
(
'%s %d'
%
(
category
,
nextNumber
))
index
[
category
]
=
nextNumber
refTable
[
node
.
astext
()]
=
newNode
node
.
parent
.
replace
(
node
,
newNode
)
# Replace references with the name of the referenced object
for
ref_info
in
doctree
.
traverse
(
autonumber_ref
):
target
=
ref_info
[
'reftarget'
]
if
target
not
in
refTable
:
raise
ValueError
(
'Unknown target for autonumber reference: '
+
target
)
ref_info
.
replace_self
(
Text
(
refTable
[
target
].
astext
()))
def
setup
(
app
):
app
.
add_config_value
(
'autonumber_by_chapter'
,
True
,
False
)
roles
.
register_local_role
(
'autonumber'
,
autonumber_role
)
app
.
add_node
(
autonumber
)
app
.
add_node
(
autonumber_ref
)
app
.
add_role
(
'numref'
,
XRefRole
(
nodeclass
=
autonumber_ref
))
app
.
connect
(
'doctree-resolved'
,
doctree_resolved
)
docs/usersguide/caption.py
deleted
100644 → 0
View file @
91bf4fcd
from
docutils.parsers.rst
import
Directive
from
docutils.nodes
import
compound
,
raw
class
CaptionDirective
(
Directive
):
has_content
=
True
def
run
(
self
):
latexPrefix
=
raw
(
''
,
'{
\\
centering'
,
format
=
'latex'
)
latexSuffix
=
raw
(
''
,
'
\\
par}
\\
bigskip'
,
format
=
'latex'
)
text
=
'
\n
'
.
join
(
self
.
content
)
content_node
=
compound
(
rawsource
=
text
)
self
.
state
.
nested_parse
(
self
.
content
,
self
.
content_offset
,
content_node
)
content_node
.
attributes
[
'classes'
].
append
(
'caption'
)
return
[
latexPrefix
,
content_node
,
latexSuffix
]
def
setup
(
app
):
app
.
add_directive
(
'caption'
,
CaptionDirective
)
docs/usersguide/conf.py
View file @
063937fb
...
...
@@ -17,6 +17,7 @@ import sys, os
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
sys
.
path
.
insert
(
0
,
os
.
path
.
abspath
(
'.'
))
sys
.
path
.
append
(
os
.
path
.
abspath
(
'../sphinx'
))
# -- General configuration -----------------------------------------------------
...
...
@@ -25,7 +26,7 @@ sys.path.insert(0, os.path.abspath('.'))
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions
=
[
'sphinx.ext.pngmath'
,
'sphinx.ext.mathjax'
,
'sphinxcontrib.bibtex'
,
'
../sphinx/
autonumber'
,
'
../sphinx/
samepage'
,
'
../sphinx/
caption'
,
'
../sphinx/
numsec'
]
extensions
=
[
'sphinx.ext.pngmath'
,
'sphinx.ext.mathjax'
,
'sphinxcontrib.bibtex'
,
'autonumber'
,
'samepage'
,
'caption'
,
'numsec'
]
# Add any paths that contain templates here, relative to this directory.
templates_path
=
[
'_templates'
]
...
...
docs/usersguide/header.rst
View file @
063937fb
...
...
@@ -3,3 +3,5 @@
<style> .code {font-family:monospace;} </style>
<style> .caption {text-align:center;} </style>
.. |--| replace:: :option:`--`
docs/usersguide/library.rst
View file @
063937fb
...
...
@@ -2490,7 +2490,7 @@ Make sure you have Python 2.6 or later installed. For Python installation
packages
and
instructions
,
go
to
http
://
python
.
org
.
If
you
do
not
have
the
correct
Python
version
,
install
a
valid
version
using
the
default
options
.
Most
versions
of
Linux
and
Mac
OS
X
have
a
suitable
Python
preinstalled
.
You
can
check
by
typing
“
\
:
code
:`
python
--
version
`\
”
in
a
terminal
window
.
check
by
typing
“
\
:
code
:`
python
`
|--|\
:
code
:`
version
`\
”
in
a
terminal
window
.
You
must
have
a
C
++
compiler
to
install
the
OpenMM
Python
API
.
If
you
are
using
a
Mac
,
install
Apple
's Xcode development tools
...
...
docs/usersguide/samepage.py
deleted
100644 → 0
View file @
91bf4fcd
from
docutils.parsers.rst
import
Directive
from
docutils.nodes
import
compound
,
raw
class
SamepageDirective
(
Directive
):
has_content
=
True
def
run
(
self
):
prefix
=
raw
(
''
,
'
\\
par
\\
begin{samepage}'
,
format
=
'latex'
)
suffix
=
raw
(
''
,
'
\\
end{samepage}
\\
par'
,
format
=
'latex'
)
text
=
'
\n
'
.
join
(
self
.
content
)
content_node
=
compound
(
rawsource
=
text
)
self
.
state
.
nested_parse
(
self
.
content
,
self
.
content_offset
,
content_node
)
return
[
prefix
,
content_node
,
suffix
]
def
setup
(
app
):
app
.
add_directive
(
'samepage'
,
SamepageDirective
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment