File: README.developer

package info (click to toggle)
espresso 6.7-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 311,068 kB
  • sloc: f90: 447,429; ansic: 52,566; sh: 40,631; xml: 37,561; tcl: 20,077; lisp: 5,923; makefile: 4,503; python: 4,379; perl: 1,219; cpp: 761; fortran: 618; java: 568; awk: 128
file content (84 lines) | stat: -rw-r--r-- 3,184 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
 ==============================================================================
           * * * 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