Skip to content

Commit

Permalink
Doxyfile cannot be installed from pip, therefore I precompiled with d…
Browse files Browse the repository at this point in the history
…oxyfile to generated xml/ from C++. And then api_cc.rst can be generated by breathe from xml/.
  • Loading branch information
tuoping authored and tuoping committed May 25, 2021
1 parent cb2c118 commit 7bd3af5
Show file tree
Hide file tree
Showing 31 changed files with 9,258 additions and 2 deletions.
2,662 changes: 2,662 additions & 0 deletions doc/Doxyfile

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions doc/README
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
To run the HTML documention build, doxygen have to be installed.
6 changes: 5 additions & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,13 @@ def mkindex(dirname):
extensions = [
"sphinx_rtd_theme",
'myst_parser',
'sphinx.ext.autosummary'
'sphinx.ext.autosummary',
'breathe'
]

breathe_projects = {"myproject": "xml/"}
breathe_default_project = "myproject"

myst_heading_anchors = 4

# Add any paths that contain templates here, relative to this directory.
Expand Down
14 changes: 14 additions & 0 deletions doc/development/api_cc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
API of C++
==========

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

.. doxygenclass:: deepmd::DeepPot
:members:
:undoc-members:

.. doxygenclass:: deepmd::DeepPotModelDevi
:members:
:undoc-members:
1 change: 1 addition & 0 deletions doc/development/index.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Developer Guide

- [API](api.rst)
- [API of C++](api_cc.rst)
- [Coding Conventions](coding-conventions.rst)
87 changes: 87 additions & 0 deletions doc/xml/AtomMap_8h.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.9.2" xml:lang="en-US">
<compounddef id="AtomMap_8h" kind="file" language="C++">
<compoundname>AtomMap.h</compoundname>
<includes local="no">vector</includes>
<includedby refid="common_8h" local="yes">/home/abby/deepmd-kit/source/api_cc/include/common.h</includedby>
<incdepgraph>
<node id="1">
<label>/home/abby/deepmd-kit/source/api_cc/include/AtomMap.h</label>
<link refid="AtomMap_8h"/>
<childnode refid="2" relation="include">
</childnode>
</node>
<node id="2">
<label>vector</label>
</node>
</incdepgraph>
<invincdepgraph>
<node id="1">
<label>/home/abby/deepmd-kit/source/api_cc/include/AtomMap.h</label>
<link refid="AtomMap_8h"/>
<childnode refid="2" relation="include">
</childnode>
</node>
<node id="4">
<label>/home/abby/deepmd-kit/source/api_cc/include/DataModifier.h</label>
<link refid="DataModifier_8h_source"/>
</node>
<node id="3">
<label>/home/abby/deepmd-kit/source/api_cc/include/DeepPot.h</label>
<link refid="DeepPot_8h_source"/>
<childnode refid="4" relation="include">
</childnode>
</node>
<node id="5">
<label>/home/abby/deepmd-kit/source/api_cc/include/DeepTensor.h</label>
<link refid="DeepTensor_8h_source"/>
</node>
<node id="2">
<label>/home/abby/deepmd-kit/source/api_cc/include/common.h</label>
<link refid="common_8h_source"/>
<childnode refid="3" relation="include">
</childnode>
<childnode refid="5" relation="include">
</childnode>
</node>
</invincdepgraph>
<innerclass refid="classdeepmd_1_1AtomMap" prot="public">deepmd::AtomMap</innerclass>
<innernamespace refid="namespacedeepmd">deepmd</innernamespace>
<briefdescription>
</briefdescription>
<detaileddescription>
</detaileddescription>
<programlisting>
<codeline lineno="1"><highlight class="preprocessor">#pragma<sp/>once</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="2"><highlight class="normal"></highlight></codeline>
<codeline lineno="3"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;vector&gt;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="4"><highlight class="normal"></highlight></codeline>
<codeline lineno="5"><highlight class="normal"></highlight><highlight class="comment">//<sp/>using<sp/>namespace<sp/>std;</highlight><highlight class="normal"></highlight></codeline>
<codeline lineno="6"><highlight class="normal"></highlight></codeline>
<codeline lineno="7"><highlight class="normal"></highlight><highlight class="keyword">namespace<sp/></highlight><highlight class="normal">deepmd{</highlight></codeline>
<codeline lineno="8"><highlight class="normal"></highlight><highlight class="keyword">template</highlight><highlight class="normal"><sp/>&lt;</highlight><highlight class="keyword">typename</highlight><highlight class="normal"><sp/>VALUETYPE&gt;</highlight></codeline>
<codeline lineno="9" refid="classdeepmd_1_1AtomMap" refkind="compound"><highlight class="normal"></highlight><highlight class="keyword">class<sp/></highlight><highlight class="normal"><ref refid="classdeepmd_1_1AtomMap" kindref="compound">AtomMap</ref><sp/></highlight></codeline>
<codeline lineno="10"><highlight class="normal">{</highlight></codeline>
<codeline lineno="11"><highlight class="normal"></highlight><highlight class="keyword">public</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="12"><highlight class="normal"><sp/><sp/><ref refid="classdeepmd_1_1AtomMap" kindref="compound">AtomMap</ref>();</highlight></codeline>
<codeline lineno="13"><highlight class="normal"><sp/><sp/><ref refid="classdeepmd_1_1AtomMap" kindref="compound">AtomMap</ref>(</highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>std::vector&lt;int<sp/>&gt;::const_iterator<sp/>in_begin,<sp/></highlight></codeline>
<codeline lineno="14"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>std::vector&lt;int<sp/>&gt;::const_iterator<sp/>in_end);</highlight></codeline>
<codeline lineno="15"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>forward<sp/>(</highlight><highlight class="keyword">typename</highlight><highlight class="normal"><sp/>std::vector&lt;VALUETYPE<sp/>&gt;::iterator<sp/>out,</highlight></codeline>
<codeline lineno="16"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">typename</highlight><highlight class="normal"><sp/>std::vector&lt;VALUETYPE<sp/>&gt;::const_iterator<sp/>in,<sp/></highlight></codeline>
<codeline lineno="17"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>stride<sp/>=<sp/>1)<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>;</highlight></codeline>
<codeline lineno="18"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>backward<sp/>(</highlight><highlight class="keyword">typename</highlight><highlight class="normal"><sp/>std::vector&lt;VALUETYPE<sp/>&gt;::iterator<sp/>out,</highlight></codeline>
<codeline lineno="19"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keyword">typename</highlight><highlight class="normal"><sp/>std::vector&lt;VALUETYPE<sp/>&gt;::const_iterator<sp/>in,<sp/></highlight></codeline>
<codeline lineno="20"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>stride<sp/>=<sp/>1)<sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>;</highlight></codeline>
<codeline lineno="21"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>std::vector&lt;int<sp/>&gt;<sp/>&amp;<sp/>get_type<sp/>()</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{</highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>atype;}</highlight></codeline>
<codeline lineno="22"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>std::vector&lt;int<sp/>&gt;<sp/>&amp;<sp/>get_fwd_map<sp/>()</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{</highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>fwd_idx_map;}</highlight></codeline>
<codeline lineno="23"><highlight class="normal"><sp/><sp/></highlight><highlight class="keyword">const</highlight><highlight class="normal"><sp/>std::vector&lt;int<sp/>&gt;<sp/>&amp;<sp/>get_bkw_map<sp/>()</highlight><highlight class="keyword"><sp/>const<sp/></highlight><highlight class="normal">{</highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>idx_map;}</highlight></codeline>
<codeline lineno="24"><highlight class="normal"></highlight><highlight class="keyword">private</highlight><highlight class="normal">:</highlight></codeline>
<codeline lineno="25"><highlight class="normal"><sp/><sp/>std::vector&lt;int&gt;<sp/>idx_map;</highlight></codeline>
<codeline lineno="26"><highlight class="normal"><sp/><sp/>std::vector&lt;int&gt;<sp/>fwd_idx_map;</highlight></codeline>
<codeline lineno="27"><highlight class="normal"><sp/><sp/>std::vector&lt;int&gt;<sp/>atype;</highlight></codeline>
<codeline lineno="28"><highlight class="normal">};</highlight></codeline>
<codeline lineno="29"><highlight class="normal">}</highlight></codeline>
</programlisting>
<location file="/home/abby/deepmd-kit/source/api_cc/include/AtomMap.h"/>
</compounddef>
</doxygen>
Loading

0 comments on commit 7bd3af5

Please sign in to comment.