mirror of https://gitlab.com/QEF/q-e.git
84 lines
3.1 KiB
Plaintext
84 lines
3.1 KiB
Plaintext
==============================================================================
|
|
* * * README file for PWgui (and PWscf) developers * * *
|
|
==============================================================================
|
|
|
|
|
|
*** see INSTALL.svn for how to run SVN version of PWgui !!!
|
|
|
|
|
|
FOR PWscf DEVELOPERS: UPDATING the PWgui MODULES
|
|
--------------------------------------------------
|
|
|
|
If some new variables have been added to a given PWscf program, please
|
|
update corresponding module definition files, which are located in
|
|
modules/ directory.
|
|
|
|
Before committing changes to SVN repository, please check that the
|
|
updated module works!!! If you face troubles, please consult
|
|
tone.kokalj@ijs.si.
|
|
|
|
|
|
WHAT IS A "MODULE" IN PWgui
|
|
-----------------------------
|
|
|
|
A "module" stands for the definition of the input of a given PWscf
|
|
program. The description of the input is specified using the
|
|
GUIB-definition syntax. Such a description provides two items: (i) it
|
|
defines the input-syntax, and concomitantly (ii) defines the GUI.
|
|
|
|
The modules are located in the modules/ directory. Each module is
|
|
located in its own directory. For example the PW.X module is located
|
|
in directory modules/pw. The following files are located therein:
|
|
|
|
* pw.tcl - main module definition file, the rest of the
|
|
files are source from here
|
|
* pw-event.tcl - implementation of event-driven mechanism
|
|
* pw-help.tcl - help file describing all the pw.x variables
|
|
* commands.tcl - auxiliary commands used by file pw.tcl
|
|
|
|
Hereafter such files are called "module definition files".
|
|
|
|
|
|
HOW TO ADD A NEW MODULE TO PWgui
|
|
----------------------------------
|
|
|
|
Let's say we want to add a new module named "mymodule". We have to
|
|
perform two tasks:
|
|
|
|
(i) Write the Module Definition Files
|
|
|
|
Create a directory: modules/mymodule, and therein a file
|
|
mymodule.tcl. If needed create also files: mymodule-event.tcl,
|
|
mymodule-help.tcl, and commands.tcl.
|
|
|
|
For the syntax of the module definition file see some existing
|
|
modules. For example, see files in modules/pp (easy example), or in
|
|
modules/pw (complex example). For further documentation see also:
|
|
http://www-k3.ijs.si/kokalj/guib/documentation.html.
|
|
|
|
(ii) Inform the GUI About New Module
|
|
|
|
Now we should edit the file src-tcl/pwscf.itcl, and add the following
|
|
line on the proper place (search for addModule string):
|
|
|
|
$gui addModule module mymodule "MyModule.X" \
|
|
[file join $env(PWGUI) modules mymodule mymodule.tcl] {
|
|
{{MyModule.X Input File} {*.my.inp}}
|
|
}
|
|
|
|
|
|
We can also add extra documentation for the module. Let say that we
|
|
have an INPUT_MYMODULE file. We can either copy this file to directory
|
|
doc/pwdoc or alternatively we make a symbolic link. Then we edit a
|
|
Makefile and insert the INPUT_MYMODULE support (the purpose is to
|
|
convert INPUT_MYMODULE to INPUT_MYMODULE.html). Now we execute: make
|
|
input_html (this will create the INPUT_MYMODULE.html file). Finally,
|
|
we can edit the src-tcl/pwscf.itcl, and add the following line on the
|
|
proper place (search for addHelp string):
|
|
|
|
$gui addHelp help mymodule "MyModule.X Input Syntax" \
|
|
[file join $env(PWGUI) doc pwdocs INPUT_MYMODULE.html]
|
|
|
|
|
|
--
|
|
Anton Kokalj (tone.kokalj@ijs.si), Tue Feb 17 08:41:05 CET 2004 |