Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added new method for links to switching function documentation #1145

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

gtribello
Copy link
Member

Description

This commit addresses something that has bothered me for a while; namely, how we should provide the links to the parts of the manual on swiching function when you encounter a keyword like switch. I would ideally like to provide the link to this page both in the tooltip that is generated for the annotated inputs and in the tables that contain the syntax.

This commit addresses this problem. You can now use the command keys.linkActionInDocs when you register the keyword in registerKeywords. Links to the manual pages for relevant actions will then be included in the manual and in tooltips.

As part of this I have also moved the documentation for switching function to the action LESS_THAN and the documentation for HistogramBead to BETWEEN as this is where these classes are used in their most basic form.

Target release

I would like my code to appear in release 2.11

Type of contribution
  • changes to code or doc authored by PLUMED developers, or additions of code in the core or within the default modules
  • changes to a module not authored by you
  • new module contribution or edit of a module authored by you
Copyright
  • I agree to transfer the copyright of the code I have written to the PLUMED developers or to the author of the code I am modifying.
  • the module I added or modified contains a COPYRIGHT file with the correct license information. Code should be released under an open source license. I also used the command cd src && ./header.sh mymodulename in order to make sure the headers of the module are correct.
Tests
  • I added a new regtest or modified an existing regtest to validate my changes.
  • I verified that all regtests are passed successfully on GitHub Actions.

This commit addresses something that has bothered me for a while; namely, how we should
provide the links to the parts of the manual on swiching function when you encounter a keyword
like switch.  I would ideally like to provide the link to this page both in the tooltip that is
generated for the annotated inputs and in the tables that contain the syntax.

This commit addresses this problem.  You can now use the command keys.linkActionInDocs when you
register the keyword in registerKeywords.  Links to the manual pages for relevant actions will then
be included in the manual and in tooltips.

As part of this I have also moved the documentation for switching function to the action LESS_THAN
and the documentation for HistogramBead to BETWEEN as this is where these classes are used in their
most basic form.
@gtribello
Copy link
Member Author

If you want to see an example of what this would look like see:

https://gtribello.github.io/plumed-manual/new-manual/CONTACT_MATRIX.html

You can see the links in the tooltips in the example input here and how the links are also added to the syntax pages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants