"vscode:/vscode.git/clone" did not exist on "ede48b85dc905d36a0314b7fcaf2c95b6d78635e"
Commit 4278a19d authored by peastman's avatar peastman Committed by GitHub
Browse files

Merge pull request #1524 from peastman/unitdocs

Added units classes to Python API docs
parents c902f110 3b256326
......@@ -21,6 +21,9 @@ Representation and Manipulation
:template: class.rst
~simtk.openmm.app.topology.Topology
~simtk.openmm.app.topology.Chain
~simtk.openmm.app.topology.Residue
~simtk.openmm.app.topology.Atom
~simtk.openmm.app.modeller.Modeller
Simulation
......@@ -53,3 +56,14 @@ Extras
{% for extra in app_extras %}
~{{ extra }}
{% endfor %}
Units
~~~~~~
.. autosummary::
:toctree: generated/
:template: class.rst
:nosignatures:
{% for unit in units %}
~{{ unit }}
{% endfor %}
......@@ -32,6 +32,7 @@ def library_template_variables():
'integrators': [],
'forces': [],
'library_extras': [],
'units': [],
}
mm_klasses = inspect.getmembers(simtk.openmm, predicate=inspect.isclass)
......@@ -65,6 +66,11 @@ def library_template_variables():
if full not in exclude and not klass.__name__[0].islower():
data['library_extras'].append(full)
# gather units related classes
unit_klasses = inspect.getmembers(simtk.unit, predicate=inspect.isclass)
for name, klass in unit_klasses:
data['units'].append(fullname(klass))
return data
......@@ -93,11 +99,14 @@ def app_template_variables():
# gather all classes with "File" in the name
for name, klass in app_klasses:
if 'File' in name:
if 'File' in name or 'CharmmParameterSet' in name:
data['fileclasses'].append(fullname(klass))
# gather all extra subclasses in simtk.openmm.app
exclude = ['simtk.openmm.app.topology.Topology',
'simtk.openmm.app.topology.Chain',
'simtk.openmm.app.topology.Residue',
'simtk.openmm.app.topology.Atom',
'simtk.openmm.app.modeller.Modeller',
'simtk.openmm.app.forcefield.ForceField',
'simtk.openmm.app.simulation.Simulation']
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment