The CMG Help extension provides detailed descriptions for keywords used in CMG simulation models, helping users better understand the commands they are using, particularly in High-Performance Computing (HPC) environments. The extension supports both GEM and IMEX solvers, with a customizable keyword system that loads from a CMGKeywords.json file.
Please note that the CMG manuals are not bundled with the installation of this extension due to the intellectual property rights of the software manufacturer.
This extension includes a file called CMGKeywords.json, which maps keywords to the location of the HTML manuals on disk, following a standard CMG installation. Eventually, it may be necessary to generate a new version of this file to update the paths or to accommodate a newly installed version. To assist with this, there is a script called parsedoc.py that can scan the disk and create the JSON file, as detailed below.
- Hover over CMG simulation keywords to see a description of the command.
- Click on "More Information/Mais informações" in the hover tooltip to open the detailed documentation of the keyword in a webview.
- Supports both GEM and IMEX solvers, allowing keyword lookup from either or both, depending on user configuration.
To use the CMG Help extension, you'll need to perform some initial configuration:
After installing the extension, you must configure the following settings for it to work correctly:
cmghelp.rootPrefix: The root directory where the CMG Manuals are stored (default:C:\Program Files\CMG\Manuals).cmghelp.version: The version of the CMG Manuals you are using (default:2022.10).cmghelp.solver: The solver being used, either IMEX, GEM or STARS.cmghelp.keywordDataPath: The path to theCMGKeywords.jsonfile, which contains the keyword data. By default, it uses one that is bundled.cmghelp.disable: Toggles the plugin functionality on or off. You can also enable or disable the plugin through the command palette by searching forCMG: Enable PluginorCMG: Disable Plugin.
The extension requires a CMGKeywords.json file to function, which contains the links for the CMG htm on disk. You can generate this file by using a Python script provided in the project's github.
-
Ensure you have Python installed.
-
Download
parsedoc.pyscript used to generate theCMGKeywords.json: GitHub repository file. -
Install the BeautifulSoup4 package using the following command
pip install beautifulsoup4
-
Edit parsedoc.py to change/add/remove htm documentation directories, if needed
-
Run
python .\parsedoc.py. A CMGKeywords.json will be created at the same script's directory -
Copy the CMGKeyword.json to any dir
-
Setup the
cmghelp.keywordDataPathon extension configuration.
If you encounter any issues, please attach the plugin log on the GitHub issue page. The log can be accessed using the command CMG: Show Logs.