QMol_doc - fmauger1/QMol-grid GitHub Wiki
QMol_doc
Parent documentation class.
Description
QMol_doc
defines an abstract class interfacing run-time documentation capabilities of the QMol-grid package. It also defines citable references for the kernel components of the package.
Class properties
QMol_doc
does not define any member properties
Class methods
Creation
QMol_doc
is an abstract class and cannot be instantiated.
Run-time documentation
QMol_doc
defines common features that can be used to display a documentation of the specific simulation being considered at run time. All run-time-documentation methods are static and their access is restricted to QMol_suite
objects.
showComponents
Display the list of all components in QMol-grid package
QMol_doc.showComponents;
The list includes the (i) components, (ii) implementation-specific, and (iii) test-suite components.
showHeader
Display the header, including the kernel and implementation-specific versions, license, and external components.
QMol_doc.showHeader;
showLicense
Display the license
QMol_doc.showLicense;
showFunding
Display the funding information
QMol_doc.showFunding;
showFooter
Display the documentation footer
QMol_doc.showFooter;
showVersion
Display formatted version, last-modified date, and author information
QMol_doc.showVersion('00.00.000','00/00/0000','Author');
This displays the line
V-00.00.000 (00/00/0000) Author
with the Author name right aligned and matching the run-time documentation display width.
showSection
Display a section header in the run-time documentation
QMol_doc.showSection('Section name');
This displays the line
=== Section name =========================================================
with the trailing stream of equal signs fill up he width of the run-time documentation display.
showBibliography
Display the list of selected bibliographic references
QMol_doc.showBibliography({'ref1','ref2',___})
The input cell vector contains the list of bibliographic codes for the references to be cited. Codes are case insensitive and can be repeated. The showBibliography
automatically sort them alphabetically and removes duplicates to produce a condensed list of references. The list of citable references and their associated codes is available here.
Test suite
For consistency with the rest of the QMol-grid package, QMol_doc
defines an associated test suite. Run the test suite for the class in normal or summary mode respectively with
QMol_test.test('doc');
QMol_test.test('-summary','doc');
For developers
Cited references in parent-class run-time documentation
When overloading a class of the QMol-grid package, catch the parent-class list of cited references and add new ones using the following template
function ref = showDocumentation(obj)
%showDocumentation displays the documentation reflecting member property
% values
% Run parent documentation and catch associated reference list
ref = showDocumentation@QMol_parent_class(obj);
% Child class specific documentation goes here
% Add cited references to the list
ref = [ref,{'newRef1','newRef2',___}];
end
Note that the specific name of the run-time documentation method might not be showDocumentation
but the overall approach remains the same.
List of kernel components
The list of kernel components is not automatically generated and one need to add the relevant entry in the showComponents
method.
Notes
QMol_doc
was introduced in version 01.00.- Run-time documentation features were moved from
QMol_suite
in version 01.10.