Docs: Remove XSLT-based manual
1
docs/_static/cp2k_manual_logo.png
vendored
|
|
@ -1 +0,0 @@
|
|||
../../tools/manual/cp2k_manual_logo.png
|
||||
|
Before Width: | Height: | Size: 39 B After Width: | Height: | Size: 59 KiB |
BIN
docs/_static/cp2k_manual_logo.png
vendored
Normal file
|
Before Width: | Height: | Size: 39 B After Width: | Height: | Size: 59 KiB |
|
Before Width: | Height: | Size: 55 KiB After Width: | Height: | Size: 55 KiB |
1
docs/_static/favicon.png
vendored
|
|
@ -1 +0,0 @@
|
|||
../../tools/manual/favicon.png
|
||||
|
Before Width: | Height: | Size: 30 B After Width: | Height: | Size: 966 B |
BIN
docs/_static/favicon.png
vendored
Normal file
|
Before Width: | Height: | Size: 30 B After Width: | Height: | Size: 966 B |
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
|
|
@ -80,9 +80,8 @@ COPY ./tests ./tests
|
|||
COPY ./tools/regtesting ./tools/regtesting
|
||||
|
||||
# Generate manual.
|
||||
COPY ./tools/manual ./tools/manual
|
||||
COPY ./tools/input_editing ./tools/input_editing
|
||||
COPY ./docs ./docs
|
||||
COPY ./tools/input_editing ./tools/input_editing
|
||||
COPY ./tools/docker/scripts/test_manual.sh .
|
||||
ARG ADD_EDIT_LINKS=yes
|
||||
RUN ./test_manual.sh "${ADD_EDIT_LINKS}" 2>&1 | tee report.log
|
||||
|
|
|
|||
|
|
@ -230,9 +230,8 @@ def manual() -> str:
|
|||
install_cp2k(version="psmp", arch="local", revision=True)
|
||||
+ rf"""
|
||||
# Generate manual.
|
||||
COPY ./tools/manual ./tools/manual
|
||||
COPY ./tools/input_editing ./tools/input_editing
|
||||
COPY ./docs ./docs
|
||||
COPY ./tools/input_editing ./tools/input_editing
|
||||
COPY ./tools/docker/scripts/test_manual.sh .
|
||||
ARG ADD_EDIT_LINKS=yes
|
||||
RUN ./test_manual.sh "${{ADD_EDIT_LINKS}}" 2>&1 | tee report.log
|
||||
|
|
|
|||
|
|
@ -1,14 +0,0 @@
|
|||
A CP2K input description can be generated automatically by
|
||||
|
||||
(1) running any up-to-date CP2K executable with the --xml flag
|
||||
to generate the XML database file cp2k_input.xml with the
|
||||
CP2K input description:
|
||||
|
||||
<path>/cp2k.<any> --xml
|
||||
|
||||
(2) creating a HTML document from the XML dump based on an
|
||||
XSL description, e.g. using Xalan:
|
||||
|
||||
./xml2htm
|
||||
|
||||
Please, check xml2htm for further details.
|
||||
|
|
@ -1,245 +0,0 @@
|
|||
/*****************************************************************************************************************
|
||||
Automatic collapsible list generation script written by Mark Wilton-Jones - 2002
|
||||
Version 3.0 - updated May 2004 to allow cookies to remember the collapse state - fully compatible with original script
|
||||
******************************************************************************************************************
|
||||
|
||||
Please see http://www.howtocreate.co.uk/jslibs/ for details and a demo of this script
|
||||
Please see http://www.howtocreate.co.uk/jslibs/termsOfUse.html for terms of use
|
||||
_________________________________________________________________________
|
||||
|
||||
You can put as lists on the page as you like, each list may have a different format
|
||||
|
||||
To use:
|
||||
_________________________________________________________________________
|
||||
|
||||
Inbetween the <head> tags, put:
|
||||
|
||||
<script src="PATH TO SCRIPT/collapsibleList.js" type="text/javascript" language="javascript1.2"></script>
|
||||
|
||||
If you want to be able to remember the expand/collapse state of all the branches so that it remains
|
||||
open if you open a new page or return to the page, you will also need to include my cookie script
|
||||
(available from http://www.howtocreate.co.uk/jslibs/)
|
||||
|
||||
<script src="PATH TO SCRIPT/cookie.js" type="text/javascript" language="javascript1.2"></script>
|
||||
_________________________________________________________________________
|
||||
|
||||
For best results, all images should be the same height, slightly taller than
|
||||
the text around them. I would recommend about 21px.
|
||||
|
||||
Now, wherever you want the list (not in a layer or positioned element due
|
||||
to Netscape 4 style bug), put:
|
||||
|
||||
<script type="text/javascript" language="javascript1.2"><!--
|
||||
|
||||
//The following is an example of a list which I have decided to call 'myList'
|
||||
|
||||
//if using classes (optional), define the class array here (see below):
|
||||
var classList = [
|
||||
['classForLevel_0_WithNoChildBranch','classForLevel_0_WithChildBranch'],
|
||||
['classForLevel_1_WithNoChildBranch','classForLevel_1_WithChildBranch'],
|
||||
... etc ...
|
||||
['classForLevel_n_WithNoChildBranch','classForLevel_n_WithChildBranch']
|
||||
];
|
||||
|
||||
//create a tree object and define all images to use
|
||||
var myList = new collapsibleList(
|
||||
[
|
||||
17, //width of tree and branch pictures
|
||||
21, //height of tree and branch pictures
|
||||
't.gif', //branch junction image, shaped like this |-
|
||||
'l.gif', //'last branch' image, shaped like this `-
|
||||
'i.gif', //tree trunk image, shaped like this |
|
||||
'e.gif' //blank spacer image, eg. a transparent gif
|
||||
],
|
||||
[
|
||||
25, //width of expand / collapse images
|
||||
21, //height of expand / collapse images
|
||||
'f.gif', //image used in place of expand or collapse images if the browser cannot expand / collapse
|
||||
'b.gif', //basic horizontal line image like this - for branches that do not expand
|
||||
'p.gif', //image used for expand link, looks like this [+]
|
||||
'm.gif' //image used for collapse link, looks like this [-]
|
||||
],
|
||||
false, //optional - set to true to automatically collapse branches when sibling branches are
|
||||
//expanded or parent branches are collapsed
|
||||
classList //optional - array list of classes for branch levels (NOT applied in Netscape 4 because of browser bugs)
|
||||
);
|
||||
|
||||
//then create branches
|
||||
//format is:
|
||||
// myList.SUB_REF = new sub('String: HTML content'[,bool:expandByDefault]);
|
||||
//expandByDefault is only used if list is not set to automatically collapse
|
||||
myList.sub[0] = new sub('List item 1',true);
|
||||
myList.sub[0].sub[0] = new sub('List <a href="canContainHTML.html">item</a> 1.1');
|
||||
myList.sub[0].sub[0].sub[0] = new sub('List item 1.1.1');
|
||||
myList.sub[0].sub[1] = new sub('List item 1.2',true);
|
||||
myList.sub[0].sub[1].sub[0] = new sub('List item 1.2.1');
|
||||
myList.sub[0].sub[1].sub[1] = new sub('List item 1.2.2',true);
|
||||
myList.sub[0].sub[1].sub[1].sub[0] = new sub('List item 1.2.2.1');
|
||||
myList.sub[0].sub[2] = new sub('List item 1.3');
|
||||
myList.sub[0].sub[2].sub[0] = new sub('List item 1.3.1');
|
||||
myList.sub[0].sub[3] = new sub('List item 1.4');
|
||||
myList.sub[0].sub[4] = new sub('List item 1.5');
|
||||
myList.sub[1] = new sub('List item 2');
|
||||
myList.sub[2] = new sub('List item 3');
|
||||
myList.sub[2].sub[0] = new sub('List item 3.1');
|
||||
myList.sub[2].sub[0].sub[0] = new sub('List item 3.1.1');
|
||||
|
||||
//then tell the browser to create the collapsible list
|
||||
createList(myList,'cookieNameToSave');
|
||||
|
||||
//'cookieNameToSave' is optional and will be used to save/recover the expand/collapse state of all branches
|
||||
//State can only be saved for collapsible lists that are not set to automatically collapse branches when sibling
|
||||
//branches are expanded or parent branches are collapsed
|
||||
|
||||
//--></script>
|
||||
|
||||
_________________________________________________________________________
|
||||
|
||||
To trigger saving of expand/collapse state of all branches in all lists where you have specified a cookie name, use:
|
||||
|
||||
saveCollapseState(lifeTime)
|
||||
|
||||
lifeTime is optional (defaults to browser session) and specifies the amount of time (in seconds)
|
||||
to remember the expand/collapse state of all branches
|
||||
|
||||
Usually, this would be used onunload, eg. <body onunload="saveCollapseState();">
|
||||
|
||||
*******************************************************************************************************
|
||||
And here's the actual code
|
||||
******************************************************************************************************/
|
||||
|
||||
window.collapsibleListRef = []; window.imageCache = []; window.autoCloseRef = [];
|
||||
//iCab can change display, but does not say so, and does notunderstand '' so I use a browser detect
|
||||
var is_Icab = window.ScriptEngine && ScriptEngine().indexOf( 'InScript' ) + 1;
|
||||
|
||||
function collapsibleList() {
|
||||
//hold tree information about the list and the images used
|
||||
this.treeImg = arguments[0];
|
||||
this.expdImg = arguments[1];
|
||||
this.isAutoClose = arguments[2];
|
||||
this.subClass = arguments[3];
|
||||
this.sub = [];
|
||||
}
|
||||
|
||||
function sub() {
|
||||
//hold information about the list item
|
||||
this.text = arguments[0];
|
||||
this.expanded = arguments[1];
|
||||
this.sub = [];
|
||||
}
|
||||
|
||||
//done because WebTV does not understand inline object syntax
|
||||
function ColLexPdOb(plI,miI,oSv,oAc) { this.plI = plI; this.miI = miI; this.subs = []; this.saveName = oSv; this.autoCol = oAc; }
|
||||
function ColLexPdIT(name,expanded) { this.name = name; this.expanded = expanded; }
|
||||
|
||||
function createList(listObject,currentExt,imgExt,oLev,oBase) {
|
||||
if( !currentExt || !currentExt.match(/^treeList_\d+(_\d+)+$/) ) {
|
||||
//create the list, start by defining aditional stuff that is required, counting the lists etc.
|
||||
window.collapsibleListRef[window.collapsibleListRef.length] = new ColLexPdOb( listObject.expdImg[4], listObject.expdImg[5], currentExt, listObject.isAutoClose );
|
||||
currentExt = 'treeList_'+( window.collapsibleListRef.length - 1 ); imgExt = ''; oLev = 0; oBase = listObject;
|
||||
document.write( '<p style="line-height:'+(document.layers?listObject.treeImg[1]+'px':'100%')+';">' );
|
||||
oBase.menuUniqueNum = window.collapsibleListRef.length - 1; window.autoCloseRef[oBase.menuUniqueNum] = [];
|
||||
}
|
||||
document.write( '<span style="display:;" id="'+currentExt+'">' );
|
||||
for( var x = 0; x < listObject.sub.length; x++ ) {
|
||||
//for every child object, create their line
|
||||
document.write(
|
||||
//the line break on all except the very first line
|
||||
( ( oLev || x ) ? '\n<br>' : '' ) +
|
||||
//what may or may not remain of the trunk
|
||||
( ( oBase.subClass && oBase.subClass[oLev] && oBase.subClass[oLev][listObject.sub[x].sub.length?1:0] && !( document.layers && navigator.mimeTypes['*'] ) ) ? ( '<span class="'+oBase.subClass[oLev][listObject.sub[x].sub.length?1:0]+'">' ) : '' ) + imgExt +
|
||||
//this branch
|
||||
( oLev ? '<img src="' + ( ( x < listObject.sub.length - 1 ) ? oBase.treeImg[2] : oBase.treeImg[3] ) + '" align="absmiddle" width="' + oBase.treeImg[0] + '" height="' + oBase.treeImg[1] + '" alt="' + ( ( x < listObject.sub.length - 1 ) ? '|-' : '`-' ) + '" border="0">' : '' ) +
|
||||
//the expand / collapse link or not as the case may be
|
||||
( listObject.sub[x].sub.length ? '<a href="#" onclick="expandList(\'' + currentExt + '_' + x + '\',\'' + currentExt + '_' + x + '_img\',\'' + oBase.expdImg[4] + '\',\'' + oBase.expdImg[5] + '\',\'' + oBase.menuUniqueNum + '\','+oLev+',' + ( oBase.isAutoClose ? 'true' : 'false' ) + ');if(this.blur){this.blur();}return false;"><img src="' + oBase.expdImg[2] + '" align="absmiddle" name="' + currentExt + '_' + x + '_img" width="' + oBase.expdImg[0] + '" height="' + oBase.expdImg[1] + '" alt="[+/-]" border="0"></a> ' : '<img src="' + oBase.expdImg[3] + '" align="absmiddle" width="' + oBase.expdImg[0] + '" height="' + oBase.expdImg[1] + '" alt="-----" border="0"> ' ) +
|
||||
//the text of the branch
|
||||
listObject.sub[x].text + ( ( oBase.subClass && oBase.subClass[oLev] && oBase.subClass[oLev][listObject.sub[x].sub.length?1:0] && !( document.layers && navigator.mimeTypes['*'] ) ) ? '</span>' : '' )
|
||||
);
|
||||
if( listObject.sub[x].sub.length ) {
|
||||
//add the span id to a list so we can easily find it and collapse it later
|
||||
window.collapsibleListRef[window.collapsibleListRef.length - 1].subs[window.collapsibleListRef[window.collapsibleListRef.length - 1].subs.length] = new ColLexPdIT( currentExt + '_' + x, listObject.sub[x].expanded && !oBase.isAutoClose );
|
||||
//create children
|
||||
createList( listObject.sub[x], currentExt + '_' + x, oLev ? ( imgExt + ( ( x < listObject.sub.length - 1 ) ? '<img src="' + oBase.treeImg[4] + '" align="absmiddle" width="' + oBase.treeImg[0] + '" height="' + oBase.treeImg[1] + '" alt="| ">' : '<img src="' + oBase.treeImg[5] + '" align="absmiddle" width="' + oBase.treeImg[0] + '" height="' + oBase.treeImg[1] + '" alt=" ">' ) ) : '', oLev + 1, oBase );
|
||||
}
|
||||
}
|
||||
document.write( '</span>' );
|
||||
if( !oLev ) {
|
||||
//end the list and prepare to collapse as soon as the browser lays it out
|
||||
document.write( '</p>\n' );
|
||||
if( document.all || document.getElementById ) { window.setTimeout('prepareForUse('+(window.collapsibleListRef.length-1)+')',100); }
|
||||
}
|
||||
}
|
||||
|
||||
function expandList(spanName,imgName,plsImg,minImg,oMenu,oLevel,oAutoClose) {
|
||||
var theSpan = document.getElementById ? document.getElementById(spanName) : document.all ? document.all[spanName] : (new Object());
|
||||
if( !theSpan ) { return; } if( theSpan.style ) { theSpan = theSpan.style; }
|
||||
if( typeof( theSpan.display ) == 'undefined' && !is_Icab ) {
|
||||
//if we could not access the span element or if its display style cannot be changed, say so
|
||||
window.alert( 'Sorry, your browser cannot collapse or expand these lists\nso the lists will remain constantly expanded.' );
|
||||
} else {
|
||||
//if required, collapse back down again
|
||||
for( var y = window.autoCloseRef[oMenu].length - 1; y >= oLevel; y-- ) {
|
||||
if( window.autoCloseRef[oMenu][y] && oAutoClose && window.autoCloseRef[oMenu][y][0] != spanName ) {
|
||||
var theSpan2 = document.getElementById ? document.getElementById(window.autoCloseRef[oMenu][y][0]) : document.all ? document.all[window.autoCloseRef[oMenu][y][0]] : (new Object());
|
||||
if( theSpan2.style ) { theSpan2 = theSpan2.style; } theSpan2.display = 'none';
|
||||
document.images[window.autoCloseRef[oMenu][y][1]].src = window.autoCloseRef[oMenu][y][2];
|
||||
window.autoCloseRef[oMenu][y] = null;
|
||||
}
|
||||
}
|
||||
if( theSpan.display == 'none' ) { window.autoCloseRef[oMenu][oLevel] = [spanName,imgName,plsImg]; }
|
||||
//expand / collapse the list and change the image
|
||||
theSpan.display = ( theSpan.display == 'none' ) ? ( is_Icab ? 'inline' : '' ) : 'none';
|
||||
document.images[imgName].src = theSpan.display ? plsImg : minImg;
|
||||
}
|
||||
}
|
||||
|
||||
function prepareForUse(listNum) {
|
||||
if( !window.collapsibleListRef[listNum].subs.length ) { return; } //no branches to collapse
|
||||
var lastPart = window.collapsibleListRef[listNum].subs[window.collapsibleListRef[listNum].subs.length - 1].name;
|
||||
lastPart = document.getElementById ? document.getElementById(lastPart) : document.all[lastPart];
|
||||
//if the page has not loaded enough, try again later
|
||||
if( !lastPart ) { window.setTimeout('prepareForUse('+listNum+')',100); } else {
|
||||
//if their browser cannot change the display style, don't try
|
||||
if( lastPart.style ) { lastPart = lastPart.style; }
|
||||
if( typeof( lastPart.display ) == 'undefined' && !is_Icab ) { return; }
|
||||
//cache images for faster changes
|
||||
window.imageCache[listNum] = [(new Image()),(new Image())];
|
||||
window.imageCache[listNum][0].src = window.collapsibleListRef[listNum].plI;
|
||||
window.imageCache[listNum][1].src = window.collapsibleListRef[listNum].miI;
|
||||
var svNm; if( svNm = window.collapsibleListRef[listNum].saveName ) { svNm = retrieveCookie(svNm); }
|
||||
if( typeof( svNm ) == 'string' ) { svNm = svNm.split(','); }
|
||||
for( var x = 0; x < window.collapsibleListRef[listNum].subs.length; x++ ) {
|
||||
var lastPart = window.collapsibleListRef[listNum].subs[x];
|
||||
if( svNm ) { var thisArray = mwjInArray(lastPart.name,svNm); }
|
||||
if( ( svNm && thisArray ) || ( !svNm && lastPart.expanded ) ) {
|
||||
//if they want it expanded by default, just change the image
|
||||
document.images[lastPart.name + '_img'].src = window.imageCache[listNum][1].src;
|
||||
} else {
|
||||
//collapse the branch and change the image
|
||||
document.images[lastPart.name + '_img'].src = window.imageCache[listNum][0].src;
|
||||
lastPart = document.getElementById ? document.getElementById(lastPart.name) : document.all[lastPart.name];
|
||||
if( lastPart.style ) { lastPart = lastPart.style; }
|
||||
lastPart.display = 'none';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function mwjInArray(oNeed,oHay) { for( var i = 0; i < oHay.length; i++ ) { if( oNeed == oHay[i] ) { return true; } } return false; }
|
||||
|
||||
function saveCollapseState(oLife) {
|
||||
var allSpans = document.getElementsByTagName ? document.getElementsByTagName('span') : ( document.all ? document.all.tags('SPAN') : [] );
|
||||
if( !allSpans.length ) { return; } //nothing to save
|
||||
//try to minimise the number of comparisons, to save processor time
|
||||
for( var x = 0, saveNums = ''; window.collapsibleListRef[x]; x++ ) {
|
||||
if( !window.collapsibleListRef[x].autoCol && window.collapsibleListRef[x].saveName ) { saveNums += ( saveNums ? '|' : '' ) + x; } }
|
||||
if( !saveNums ) { return; } //nothing to save
|
||||
for( var x = 0, brnch = [], frNm, rgxp = new RegExp('^treeList_('+saveNums+')_.*$',''); x < allSpans.length; x++ ) {
|
||||
if( allSpans[x].id && allSpans[x].id.match(rgxp) && allSpans[x].style.display != 'none' ) {
|
||||
frNm = allSpans[x].id.replace(rgxp,'$1');
|
||||
brnch[frNm] = ( brnch[frNm] ? ( brnch[frNm] + ',' ) : '' ) + allSpans[x].id;
|
||||
}
|
||||
}
|
||||
for( var x = 0, saveNums = ''; window.collapsibleListRef[x]; x++ ) {
|
||||
if( window.collapsibleListRef[x].saveName ) { setCookie(window.collapsibleListRef[x].saveName,brnch[x],oLife,'/'); } }
|
||||
}
|
||||
|
|
@ -1,849 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
|
||||
|
||||
<xsl:output doctype-public="html" doctype-system="html" indent="yes" method="html" name="html"/>
|
||||
|
||||
<xsl:param name="add_edit_links" select="'no'"/>
|
||||
<xsl:param name="version" select="'trunk'"/>
|
||||
<xsl:param name="release_path" select="'/trunk'"/>
|
||||
|
||||
<xsl:template match="/CP2K_INPUT">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
|
||||
<head>
|
||||
<title>CP2K input reference</title>
|
||||
<xsl:call-template name="head">
|
||||
<xsl:with-param name="root" select="''"/>
|
||||
</xsl:call-template>
|
||||
</head>
|
||||
<body>
|
||||
<xsl:call-template name="write_generate_manual_howto"/>
|
||||
<xsl:call-template name="write_html_tables"/>
|
||||
<h1 align="center">CP2K input reference</h1>
|
||||
<h2>Version information</h2>
|
||||
<p>
|
||||
This HTML manual refers to
|
||||
<a href="https://github.com/cp2k/cp2k/tree/{substring-after(/CP2K_INPUT/COMPILE_REVISION,':')}" target="_blank">
|
||||
<xsl:value-of select="/CP2K_INPUT/CP2K_VERSION"/> (<xsl:value-of select="/CP2K_INPUT/COMPILE_REVISION"/>)
|
||||
</a>
|
||||
and was generated automatically from a CP2K executable compiled on <xsl:value-of select="COMPILE_DATE"/> using the
|
||||
<code>--xml</code> command line option (see <a href="generate_manual_howto.html">how to generate this manual</a>).
|
||||
Thus the manual describes exactly this version of the code.
|
||||
</p>
|
||||
<p>
|
||||
<xsl:call-template name="searchform"/>
|
||||
</p>
|
||||
<h2>Journal papers</h2>
|
||||
<p>
|
||||
<a href="references.html">List of references</a> cited in the CP2K input manual.
|
||||
</p>
|
||||
<h2>CP2K units</h2>
|
||||
<p>
|
||||
<a href="units.html">Available units of measurement</a> which can be used in the CP2K input for keyword values.
|
||||
The units can be used to specify an alternative unit of measurement for keyword values, for which a
|
||||
default unit has been explicitly defined.
|
||||
They are specified in the form of a string <code>[unit]</code> as a separate token before any value.
|
||||
A unit specification is applied to all values on the same line following that specification, unless explicitly
|
||||
overwritten by a another unit specification.
|
||||
</p>
|
||||
<h2>Internal input preprocessor</h2>
|
||||
<p>
|
||||
Before the input is parsed, the input is run through a simple internal preprocessor.
|
||||
The preprocessor recognizes the following directives independent of capitalization:
|
||||
</p>
|
||||
<dl>
|
||||
<dt><b>@INCLUDE 'filename.inc'</b></dt>
|
||||
<dd>
|
||||
The file referenced by <i>filename.inc</i> is included into the input file and parsed.
|
||||
Recursive inclusions are not allowed and the files have to exist in the current working
|
||||
directory. There can be only one @INCLUDE statement per line. Single or double quotes
|
||||
have to be used if the filename contains blanks.
|
||||
</dd>
|
||||
<dt><b>@SET VAR value</b></dt>
|
||||
<dd>
|
||||
Assigns the text <i>value</i> to the preprocessing variable <i>VAR</i>. <i>value</i>
|
||||
is the text following <i>VAR</i> with the outer whitespace removed. The variable can be
|
||||
recalled with a <i>${VAR}</i> (or <i>$VAR</i>) statement. There can be only one @SET statement per line.
|
||||
A variable name can only contain alphanumerical characters plus the underscore and must not start with a number.
|
||||
</dd>
|
||||
<dt><b>${VAR}</b> or <b>$VAR</b></dt>
|
||||
<dd>
|
||||
Expand the variable <i>VAR</i>. The text <i>${VAR}</i> (or <i>$VAR</i>) is replaced
|
||||
with the value assigned to <i>VAR</i> in the last @SET directive.
|
||||
There can be multiple variable statements per line. The expansion process is repeated
|
||||
until no more variables are found.
|
||||
</dd>
|
||||
<dt><b>${VAR-DEFAULT}</b></dt>
|
||||
<dd>
|
||||
Expand the variable <i>VAR</i> if defined. The text <i>${VAR-DEFAULT}</i> is replaced
|
||||
with the value assigned to <i>VAR</i> in the last @SET directive if defined,
|
||||
otherwise with the value specified after the dash <i>-</i> (here: <i>DEFAULT</i>).
|
||||
</dd>
|
||||
<dt><b>@IF / @ENDIF</b></dt>
|
||||
<dd>
|
||||
Conditional block. The text from the @IF line up to the next line with a valid
|
||||
@ENDIF is skipped, if the expression following @IF resolves to <i>false</i>.
|
||||
Available expressions are lexical comparisons for equality '==' or inequality '/='.
|
||||
If none of the two operators are found, a '0' or whitespace resolves to <i>false</i>
|
||||
while any text resolves to <i>true</i>. @IF/@ENDIF blocks cannot be nested and
|
||||
cannot span across files. There can be only one test (== or /=) per @IF statement.
|
||||
</dd>
|
||||
</dl>
|
||||
<h2>Input structure</h2>
|
||||
All sections that can be part of a CP2K input file are shown here with their allowed nestings.
|
||||
A detailed description of each section and its keywords can be obtained by clicking on the
|
||||
section links. The links in the detailed descriptions switch back to the corresponding index
|
||||
entries. In this way a toggling between the index and the detailed description is feasible.
|
||||
<h2>Index of all input sections</h2>
|
||||
<ul class="noscript">
|
||||
<li>
|
||||
Double click on [−] / [+] to shrink or expand all subtrees contained in a section
|
||||
</li>
|
||||
<li>
|
||||
Single click on [−] / [+] to shrink or expand the top level subtree contained in a section
|
||||
</li>
|
||||
</ul>
|
||||
<h4>Last update: <xsl:value-of select="COMPILE_DATE"/></h4>
|
||||
<ul class="index">
|
||||
<li>
|
||||
<a href="CP2K_INPUT.html" id="CP2K_INPUT.html">CP2K_INPUT</a>
|
||||
</li>
|
||||
<xsl:call-template name="describe_sections">
|
||||
<xsl:with-param name="path" select="'CP2K_INPUT'"/>
|
||||
<xsl:with-param name="root" select="'../'"/>
|
||||
</xsl:call-template>
|
||||
</ul>
|
||||
<xsl:call-template name="footer">
|
||||
<xsl:with-param name="root" select="''"/>
|
||||
</xsl:call-template>
|
||||
</body>
|
||||
<xsl:result-document href="CP2K_INPUT.html" method="html" indent="yes" format="html">
|
||||
<html>
|
||||
<head>
|
||||
<title>CP2K input file</title>
|
||||
<xsl:call-template name="head">
|
||||
<xsl:with-param name="root" select="''"/>
|
||||
</xsl:call-template>
|
||||
</head>
|
||||
<body>
|
||||
<xsl:call-template name="header">
|
||||
<xsl:with-param name="root" select="''"/>
|
||||
</xsl:call-template>
|
||||
<h2><a href="index.html#CP2K_INPUT.html">CP2K input file</a></h2>
|
||||
<ul class="none">
|
||||
<li>
|
||||
<em>Input file of CP2K</em>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="none">
|
||||
<li>
|
||||
Section path:
|
||||
<code class="upper">
|
||||
<a href="CP2K_INPUT.html">CP2K_INPUT</a>
|
||||
</code>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="none">
|
||||
<li>
|
||||
This section cannot be repeated.
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="none">
|
||||
<h3>Subsections</h3>
|
||||
<xsl:for-each select="SECTION">
|
||||
<xsl:sort select="NAME"/>
|
||||
<ul class="disc">
|
||||
<li>
|
||||
<a href="{concat('CP2K_INPUT/',string(NAME),'.html')}"><xsl:value-of select="NAME"/></a>
|
||||
</li>
|
||||
</ul>
|
||||
</xsl:for-each>
|
||||
</ul>
|
||||
<ul class="none">
|
||||
<h3>Keywords</h3>
|
||||
<ul class="disc">
|
||||
<li>
|
||||
none
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
<xsl:call-template name="footer">
|
||||
<xsl:with-param name="root" select="''"/>
|
||||
</xsl:call-template>
|
||||
</body>
|
||||
</html>
|
||||
</xsl:result-document>
|
||||
</html>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="head">
|
||||
<xsl:param name="root"/>
|
||||
<xsl:variable name="description">
|
||||
<xsl:choose>
|
||||
<xsl:when test="string-length(DESCRIPTION) > 0">
|
||||
<xsl:value-of disable-output-escaping="yes" select="string(DESCRIPTION)"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of disable-output-escaping="yes" select="'CP2K input reference'"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<meta name="language" content="en"/>
|
||||
<meta name="copyright" content="2000 - {year-from-dateTime(current-dateTime())} CP2K developers group"/>
|
||||
<meta name="description" content="{$description}"/>
|
||||
<meta name="keywords" content="scientific,computing,chemistry,physics,documentation,help,manual,Fortran,parallel,molecular dynamics,MD,density functional theory,DFT,electronic structure,linear scaling,force field,Quickstep,GPW,GAPW,FIST,QM,MM"/>
|
||||
<link rel="shortcut icon" href="{$root}favicon.png" type="image/png"/>
|
||||
<style type="text/css">
|
||||
a {text-decoration: none;}
|
||||
body {background-color: #ffffff;}
|
||||
code.upper {text-transform: uppercase;}
|
||||
li {margin-left: 0em; padding-left: 0em; text-indent: 0em;}
|
||||
p.uctt {font-family: monospace; text-transform: uppercase;}
|
||||
table.default {table-layout: fixed; width: 100%;}
|
||||
td.l {width: 25%;}
|
||||
td.r {width: 75%;}
|
||||
ul.circle {list-style-type: circle;}
|
||||
ul.disc {list-style-type: disc;}
|
||||
ul.index {list-style-type: none; margin-left: 0em; padding-left: 1.8em; text-indent: 0em;}
|
||||
ul.none {list-style-type: none;}
|
||||
ul.noscript {list-style-type: disc;}
|
||||
ul.square {list-style-type: square;}
|
||||
.button {font-family: monospace; font-size: 100%; cursor: pointer;}
|
||||
#html_table
|
||||
{
|
||||
border: 1px solid #000000;
|
||||
border-collapse: collapse;
|
||||
margin-left: 25px;
|
||||
padding: 6px;
|
||||
text-align: left;
|
||||
vertical-align: middle;
|
||||
}
|
||||
</style>
|
||||
<noscript>
|
||||
<style>
|
||||
ul.index {list-style-type: disc; margin-left: 0px; padding-left: 1.8em; text-indent: 0px}
|
||||
ul.noscript {display: none}
|
||||
</style>
|
||||
</noscript>
|
||||
<script language="javascript" type="text/javascript" src="{$root}toggle_folding.js"></script>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="header">
|
||||
<xsl:param name="root"/>
|
||||
<table class="default" summary="header">
|
||||
<tr>
|
||||
<td align="left">
|
||||
Back to the <a href="{$root}index.html">main page</a> of this manual
|
||||
</td>
|
||||
<td align="center">
|
||||
Input reference of <xsl:value-of select="/CP2K_INPUT/CP2K_VERSION"/>
|
||||
</td>
|
||||
<td align="right">
|
||||
<xsl:call-template name="searchform"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="footer">
|
||||
<xsl:param name="root"/>
|
||||
<hr/>
|
||||
<table class="default" summary="footer">
|
||||
<tr>
|
||||
<td align="left">
|
||||
Back to the <a href="{$root}index.html">main page</a> of this manual or the <a href="https://www.cp2k.org">CP2K home page</a>
|
||||
</td>
|
||||
<td align="right">
|
||||
(Last update:
|
||||
<xsl:value-of select="day-from-dateTime(current-dateTime())"/>.<xsl:value-of select="month-from-dateTime(current-dateTime())"/>.<xsl:value-of select="year-from-dateTime(current-dateTime())"/>)
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="searchform">
|
||||
<form method="get" action="https://www.google.com/search">
|
||||
<input type="text" name="q" maxlength="255"/>
|
||||
<input type="submit" value="Search this manual (Google)"/>
|
||||
<input type="hidden" name="domains" value="https://manual.cp2k.org/{$version}/"/>
|
||||
<input type="radio" style="visibility:hidden" name="sitesearch" value="https://manual.cp2k.org/{$version}/" checked="checked"/>
|
||||
</form>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="describe_sections">
|
||||
<xsl:param name="path"/>
|
||||
<xsl:param name="root"/>
|
||||
<ul class="index">
|
||||
<xsl:for-each select="SECTION">
|
||||
<xsl:sort select="NAME"/>
|
||||
<xsl:variable name="section" select="string(NAME)"/>
|
||||
<xsl:variable name="local_path" select="concat($path,'/',string(NAME))"/>
|
||||
<xsl:variable name="section_filename" select="concat($local_path,'.html')"/>
|
||||
<li>
|
||||
<a href="{$section_filename}" id="{$section_filename}"><xsl:value-of select="NAME"/></a>
|
||||
</li>
|
||||
<xsl:result-document href="{$section_filename}" method="html" indent="yes" format="html">
|
||||
<html>
|
||||
<head>
|
||||
<title><xsl:value-of select="replace($local_path,'/',' / ')" /></title>
|
||||
<xsl:call-template name="head">
|
||||
<xsl:with-param name="root" select="$root"/>
|
||||
</xsl:call-template>
|
||||
</head>
|
||||
<body>
|
||||
<xsl:call-template name="header">
|
||||
<xsl:with-param name="root" select="$root"/>
|
||||
</xsl:call-template>
|
||||
<h2><a href="{$root}index.html#{$section_filename}">Section <xsl:value-of select="NAME"/></a></h2>
|
||||
<ul class="none">
|
||||
<li>
|
||||
<em>
|
||||
<xsl:if test="string-length(DESCRIPTION) > 0">
|
||||
<xsl:value-of disable-output-escaping="yes" select="DESCRIPTION"/>
|
||||
</xsl:if>
|
||||
<xsl:if test="string-length(DESCRIPTION) = 0">
|
||||
Without description, yet.
|
||||
</xsl:if>
|
||||
</em>
|
||||
<xsl:call-template name="link_edit_text">
|
||||
<xsl:with-param name="location" select="string(LOCATION)"/>
|
||||
</xsl:call-template>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="none">
|
||||
<li>
|
||||
Section path:
|
||||
<code class="upper">
|
||||
<xsl:call-template name="link_section_path">
|
||||
<xsl:with-param name="string" select="$local_path"/>
|
||||
<xsl:with-param name="separator" select="'/'"/>
|
||||
<xsl:with-param name="root" select="$root"/>
|
||||
</xsl:call-template>
|
||||
</code>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="none">
|
||||
<li>
|
||||
This section can<xsl:if test="@repeats = 'no'">not</xsl:if> be repeated.
|
||||
</li>
|
||||
</ul>
|
||||
<xsl:if test="count(REFERENCE) > 0">
|
||||
<ul class="none">
|
||||
<li>
|
||||
This section cites the following reference<xsl:if test="count(REFERENCE) > 1">s</xsl:if>:
|
||||
<xsl:for-each select="REFERENCE">
|
||||
<xsl:sort select="NAME"/>
|
||||
[<a href="{$root}references.html#reference_{string(NUMBER)}"><xsl:value-of select="NAME"/></a>]
|
||||
</xsl:for-each>
|
||||
</li>
|
||||
</ul>
|
||||
</xsl:if>
|
||||
<ul class="none">
|
||||
<li>
|
||||
<h3>Subsections</h3>
|
||||
<xsl:choose>
|
||||
<xsl:when test="count(SECTION) > 0">
|
||||
<ul class="disc">
|
||||
<xsl:for-each select="SECTION">
|
||||
<xsl:sort select="NAME"/>
|
||||
<xsl:variable name="subsection_filename" select="concat($section,'/',string(NAME),'.html')"/>
|
||||
<li>
|
||||
<a href="{$subsection_filename}"><xsl:value-of select="NAME"/></a>
|
||||
</li>
|
||||
</xsl:for-each>
|
||||
</ul>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<ul class="disc">
|
||||
<li>
|
||||
none
|
||||
</li>
|
||||
</ul>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="none">
|
||||
<li>
|
||||
<h3>Keywords</h3>
|
||||
<xsl:choose>
|
||||
<xsl:when test="count(SECTION_PARAMETERS) > 0 or count(DEFAULT_KEYWORD) > 0 or count(KEYWORD) > 0">
|
||||
<xsl:if test="count(SECTION_PARAMETERS) > 0">
|
||||
<xsl:call-template name="list_keywords">
|
||||
<xsl:with-param name="element" select="SECTION_PARAMETERS"/>
|
||||
</xsl:call-template>
|
||||
</xsl:if>
|
||||
<xsl:if test="count(DEFAULT_KEYWORD) > 0">
|
||||
<xsl:call-template name="list_keywords">
|
||||
<xsl:with-param name="element" select="DEFAULT_KEYWORD"/>
|
||||
</xsl:call-template>
|
||||
</xsl:if>
|
||||
<xsl:if test="count(KEYWORD) > 0">
|
||||
<xsl:call-template name="list_keywords">
|
||||
<xsl:with-param name="element" select="KEYWORD"/>
|
||||
</xsl:call-template>
|
||||
</xsl:if>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<ul class="disc">
|
||||
<li>
|
||||
none
|
||||
</li>
|
||||
</ul>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</li>
|
||||
</ul>
|
||||
<xsl:if test="count(SECTION_PARAMETERS) > 0 or count(DEFAULT_KEYWORD) > 0 or count(KEYWORD) > 0">
|
||||
<ul class="none">
|
||||
<li>
|
||||
<h3>Keyword descriptions</h3>
|
||||
<xsl:if test="count(SECTION_PARAMETERS) > 0">
|
||||
<xsl:call-template name="describe_keywords">
|
||||
<xsl:with-param name="element" select="SECTION_PARAMETERS"/>
|
||||
<xsl:with-param name="root" select="$root"/>
|
||||
<xsl:with-param name="section_filename" select="$section_filename"/>
|
||||
<xsl:with-param name="local_path" select="$local_path"/>
|
||||
</xsl:call-template>
|
||||
</xsl:if>
|
||||
<xsl:if test="count(DEFAULT_KEYWORD) > 0">
|
||||
<xsl:call-template name="describe_keywords">
|
||||
<xsl:with-param name="element" select="DEFAULT_KEYWORD"/>
|
||||
<xsl:with-param name="root" select="$root"/>
|
||||
<xsl:with-param name="section_filename" select="$section_filename"/>
|
||||
<xsl:with-param name="local_path" select="$local_path"/>
|
||||
</xsl:call-template>
|
||||
</xsl:if>
|
||||
<xsl:if test="count(KEYWORD) > 0">
|
||||
<xsl:call-template name="describe_keywords">
|
||||
<xsl:with-param name="element" select="KEYWORD"/>
|
||||
<xsl:with-param name="root" select="$root"/>
|
||||
<xsl:with-param name="section_filename" select="$section_filename"/>
|
||||
<xsl:with-param name="local_path" select="$local_path"/>
|
||||
</xsl:call-template>
|
||||
</xsl:if>
|
||||
</li>
|
||||
</ul>
|
||||
</xsl:if>
|
||||
<xsl:call-template name="footer">
|
||||
<xsl:with-param name="root" select="$root"/>
|
||||
</xsl:call-template>
|
||||
</body>
|
||||
</html>
|
||||
</xsl:result-document>
|
||||
<xsl:call-template name="describe_sections">
|
||||
<xsl:with-param name="path" select="$local_path"/>
|
||||
<xsl:with-param name="root" select="concat($root,'../')"/>
|
||||
</xsl:call-template>
|
||||
</xsl:for-each>
|
||||
</ul>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="list_keywords">
|
||||
<xsl:param name="element" select="KEYWORD"/>
|
||||
<ul class="disc">
|
||||
<xsl:for-each select="$element">
|
||||
<xsl:sort select="NAME[@type='default']"/>
|
||||
<xsl:if test="not(starts-with(NAME[@type='default'],'__CONTROL'))">
|
||||
<li>
|
||||
<a href="#{string(NAME[@type='default'])}" id="list_{string(NAME[@type='default'])}">
|
||||
<xsl:call-template name="keyword_name">
|
||||
<xsl:with-param name="element" select="$element"/>
|
||||
</xsl:call-template>
|
||||
</a>
|
||||
</li>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</ul>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="keyword_name">
|
||||
<xsl:param name="element" select="KEYWORD"/>
|
||||
<xsl:choose>
|
||||
<xsl:when test="@removed = 'yes' or string-length(DEPRECATION_NOTICE) > 0 ">
|
||||
<span style="text-decoration: line-through">
|
||||
<xsl:value-of select="NAME[@type='default']"/>
|
||||
</span>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="NAME[@type='default']"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="describe_keywords">
|
||||
<xsl:param name="element" select="KEYWORD"/>
|
||||
<xsl:param name="root"/>
|
||||
<xsl:param name="section_filename"/>
|
||||
<xsl:param name="local_path"/>
|
||||
<xsl:for-each select="$element">
|
||||
<xsl:sort select="NAME[@type='default']"/>
|
||||
<xsl:if test="not(starts-with(NAME[@type='default'],'__CONTROL'))">
|
||||
<xsl:variable name="keyword_path" select="concat($local_path,'/',string(NAME[@type='default']))"/>
|
||||
<table class="default" summary="keyword_description">
|
||||
<tr>
|
||||
<td class="l">
|
||||
<ul class="disc">
|
||||
<li>
|
||||
<a id="desc_{string(NAME[@type='default'])}"></a>
|
||||
<a href="#list_{string(NAME[@type='default'])}" id="{string(NAME[@type='default'])}">
|
||||
<xsl:call-template name="keyword_name">
|
||||
<xsl:with-param name="element" select="$element"/>
|
||||
</xsl:call-template>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</td>
|
||||
<td class="r">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="l">
|
||||
</td>
|
||||
<td class="r">
|
||||
<xsl:choose>
|
||||
<xsl:when test="NAME[@type='default'] = 'DEFAULT_KEYWORD'">
|
||||
<code><xsl:value-of disable-output-escaping="yes" select="USAGE"/></code>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:variable name="vartype" select="concat(upper-case(substring(DATA_TYPE/@kind,1,1)),substring(DATA_TYPE/@kind,2))"/>
|
||||
<xsl:if test="DATA_TYPE/N_VAR > 0">
|
||||
<xsl:choose>
|
||||
<xsl:when test="NAME[@type='default'] = 'SECTION_PARAMETERS'">
|
||||
<code class="upper">&<xsl:value-of disable-output-escaping="yes" select="../NAME"/></code>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<code class="upper"><xsl:value-of disable-output-escaping="yes" select="NAME[@type='default']"/></code>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:call-template name="repeat">
|
||||
<xsl:with-param name="ivar" select="1"/>
|
||||
<xsl:with-param name="nvar" select="DATA_TYPE/N_VAR"/>
|
||||
<xsl:with-param name="vartype" select="$vartype"/>
|
||||
</xsl:call-template>
|
||||
</xsl:if>
|
||||
<xsl:if test="DATA_TYPE/N_VAR = -1">
|
||||
<code class="upper"><xsl:value-of disable-output-escaping="yes" select="NAME[@type='default']"/></code>
|
||||
<code> {<xsl:value-of select="$vartype"/>} ...</code>
|
||||
<xsl:if test="contains(upper-case(NAME[@type='default']),'LIST')">
|
||||
<code> or a range {<xsl:value-of select="$vartype"/>}..{<xsl:value-of select="$vartype"/>}</code>
|
||||
</xsl:if>
|
||||
</xsl:if>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="l">
|
||||
</td>
|
||||
<td class="r">
|
||||
<em>
|
||||
<xsl:if test="@removed = 'yes'">
|
||||
<p style="font-weight:bold">
|
||||
This keyword was removed.
|
||||
<xsl:value-of select="DEPRECATION_NOTICE"/>
|
||||
</p>
|
||||
</xsl:if>
|
||||
<xsl:if test="@removed = 'no' and string-length(DEPRECATION_NOTICE) > 0">
|
||||
<p style="font-weight:bold">
|
||||
This keyword is deprecated.
|
||||
<xsl:value-of select="DEPRECATION_NOTICE"/>
|
||||
</p>
|
||||
</xsl:if>
|
||||
<xsl:if test="string-length(DESCRIPTION) > 0">
|
||||
<xsl:value-of disable-output-escaping="yes" select="DESCRIPTION"/>
|
||||
</xsl:if>
|
||||
<xsl:if test="string-length(DESCRIPTION) = 0">
|
||||
Without description, yet.
|
||||
</xsl:if>
|
||||
</em>
|
||||
<xsl:call-template name="link_edit_text">
|
||||
<xsl:with-param name="location" select="string(LOCATION)"/>
|
||||
</xsl:call-template>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="l">
|
||||
</td>
|
||||
<td class="r">
|
||||
This keyword can<xsl:if test="@repeats = 'no'">not</xsl:if> be repeated
|
||||
and it expects
|
||||
<xsl:if test="DATA_TYPE/N_VAR = -1">
|
||||
a list of <xsl:value-of select="DATA_TYPE/@kind"/>s.
|
||||
</xsl:if>
|
||||
<xsl:if test="DATA_TYPE/N_VAR = 1">
|
||||
precisely one <xsl:value-of select="DATA_TYPE/@kind"/>.
|
||||
</xsl:if>
|
||||
<xsl:if test="DATA_TYPE/N_VAR > 1">
|
||||
precisely <xsl:value-of select="DATA_TYPE/N_VAR"/> <xsl:value-of select="DATA_TYPE/@kind"/>s.
|
||||
</xsl:if>
|
||||
</td>
|
||||
</tr>
|
||||
<xsl:if test="LONE_KEYWORD_VALUE">
|
||||
<tr>
|
||||
<td class="l">
|
||||
</td>
|
||||
<td class="r">
|
||||
<xsl:if test="DATA_TYPE/@kind = 'logical'">
|
||||
The lone keyword behaves as a switch to
|
||||
<code class="upper">
|
||||
<xsl:if test="LONE_KEYWORD_VALUE = 'T'">.TRUE.</xsl:if>
|
||||
<xsl:if test="LONE_KEYWORD_VALUE = 'F'">.FALSE.</xsl:if>
|
||||
</code>
|
||||
</xsl:if>
|
||||
<xsl:if test="DATA_TYPE/@kind = 'integer' or DATA_TYPE/@kind = 'real'">
|
||||
The lone keyword defaults to
|
||||
<code class="upper">
|
||||
<xsl:value-of select="LONE_KEYWORD_VALUE"/>
|
||||
</code>
|
||||
</xsl:if>
|
||||
</td>
|
||||
</tr>
|
||||
</xsl:if>
|
||||
<xsl:if test="string-length(DEFAULT_VALUE) > 0">
|
||||
<tr>
|
||||
<td class="l">
|
||||
</td>
|
||||
<td class="r">
|
||||
Default value<xsl:if test="DATA_TYPE/N_VAR > 1">s</xsl:if>:
|
||||
<code class="upper">
|
||||
<xsl:choose>
|
||||
<xsl:when test="DATA_TYPE/@kind = 'logical'">
|
||||
<xsl:if test="DEFAULT_VALUE = 'T'">.TRUE.</xsl:if>
|
||||
<xsl:if test="DEFAULT_VALUE = 'F'">.FALSE.</xsl:if>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="DEFAULT_VALUE"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</code>
|
||||
</td>
|
||||
</tr>
|
||||
</xsl:if>
|
||||
<xsl:if test="string-length(DEFAULT_UNIT) > 0">
|
||||
<tr>
|
||||
<td class="l">
|
||||
</td>
|
||||
<td class="r">
|
||||
<a href="{$root}units.html">Default unit:</a>
|
||||
<code>
|
||||
[<xsl:value-of select="DEFAULT_UNIT"/>]
|
||||
</code>
|
||||
</td>
|
||||
</tr>
|
||||
</xsl:if>
|
||||
<xsl:if test="DATA_TYPE/ENUMERATION">
|
||||
<tr>
|
||||
<td class="l">
|
||||
</td>
|
||||
<td class="r">
|
||||
List of valid keywords:
|
||||
<ul class="square">
|
||||
<xsl:for-each select="DATA_TYPE/ENUMERATION/ITEM">
|
||||
<xsl:sort select="NAME"/>
|
||||
<li>
|
||||
<dl>
|
||||
<dt>
|
||||
<code class="upper">
|
||||
<xsl:value-of select="NAME"/>
|
||||
</code>
|
||||
</dt>
|
||||
<dd>
|
||||
<em>
|
||||
<xsl:if test="string-length(DESCRIPTION) > 0">
|
||||
<xsl:value-of disable-output-escaping="yes" select="DESCRIPTION"/>
|
||||
</xsl:if>
|
||||
<xsl:if test="string-length(DESCRIPTION) = 0">
|
||||
Without description, yet.
|
||||
</xsl:if>
|
||||
</em>
|
||||
</dd>
|
||||
</dl>
|
||||
</li>
|
||||
</xsl:for-each>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
</xsl:if>
|
||||
<xsl:if test="NAME[@type='alias']">
|
||||
<tr>
|
||||
<td class="l">
|
||||
</td>
|
||||
<td class="r">
|
||||
Alias names for this keyword:
|
||||
<xsl:for-each select="NAME[@type='alias']">
|
||||
<xsl:sort select="NAME[@type='alias']"/>
|
||||
<xsl:choose>
|
||||
<xsl:when test="position() = last()">
|
||||
<xsl:value-of select="."/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="."/>,
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:for-each>
|
||||
</td>
|
||||
</tr>
|
||||
</xsl:if>
|
||||
<xsl:if test="count(REFERENCE) > 0">
|
||||
<tr>
|
||||
<td class="l">
|
||||
</td>
|
||||
<td class="r">
|
||||
This keyword cites the following reference<xsl:if test="count(REFERENCE) > 1">s</xsl:if>:
|
||||
<xsl:for-each select="REFERENCE">
|
||||
<xsl:sort select="NAME"/>
|
||||
[<a href="{$root}references.html#reference_{string(NUMBER)}"><xsl:value-of select="NAME"/></a>]
|
||||
</xsl:for-each>
|
||||
</td>
|
||||
</tr>
|
||||
</xsl:if>
|
||||
</table>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="link_section_path">
|
||||
<xsl:param name="string"/>
|
||||
<xsl:param name="separator"/>
|
||||
<xsl:param name="root"/>
|
||||
<xsl:variable name="string_before" select="substring-before($string,$separator)"/>
|
||||
<xsl:variable name="string_after" select="substring-after($string,$separator)"/>
|
||||
<a href="{concat($root,$string_before,'.html')}"><xsl:value-of select="$string_before"/></a> /
|
||||
<xsl:choose>
|
||||
<xsl:when test="contains($string_after,$separator)">
|
||||
<xsl:call-template name="link_section_path">
|
||||
<xsl:with-param name="string" select="$string_after"/>
|
||||
<xsl:with-param name="separator" select="$separator"/>
|
||||
<xsl:with-param name="root" select="substring-after($root,'../')"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<a href="{concat($string_after,'.html')}"><xsl:value-of select="$string_after"/></a>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="write_generate_manual_howto">
|
||||
<xsl:result-document href="generate_manual_howto.html" method="html" indent="yes" format="html">
|
||||
<html>
|
||||
<head>
|
||||
<title>How to generate the CP2K input reference manual</title>
|
||||
<xsl:call-template name="head">
|
||||
<xsl:with-param name="root" select="''"/>
|
||||
</xsl:call-template>
|
||||
</head>
|
||||
<body>
|
||||
<xsl:call-template name="header">
|
||||
<xsl:with-param name="root" select="''"/>
|
||||
</xsl:call-template>
|
||||
<h2 align="center">How to generate the CP2K input reference manual</h2>
|
||||
<ul class="disc">
|
||||
<li>
|
||||
Prepare a CP2K executable. It does not matter which type of CP2K executable (e.g. psmp) you are using,
|
||||
since running a CP2K executable with the flag <code>--xml</code> like:
|
||||
<ul class="none">
|
||||
<li><code>cp2k.psmp --xml</code></li>
|
||||
</ul>
|
||||
will generate a file named <code>cp2k_input.xml</code> with an XML dump of the entire CP2K input structure
|
||||
in the same directory describing all features of the actual CP2K executable.<br/>
|
||||
That XML output in <code>cp2k_input.xml</code> has to be transformed to HTML using an XML 2.0 compliant
|
||||
translator like SAXON. Preferentially, you may want to employ the platform independent Java version of SAXON, which
|
||||
can be downloaded from <a href="https://sourceforge.net/projects/saxon">https://sourceforge.net/projects/saxon</a>.<br/>
|
||||
</li>
|
||||
<li>
|
||||
Alternatively, you can also run the script
|
||||
<ul class="none">
|
||||
<li><code>update_manual local psmp</code></li>
|
||||
</ul>
|
||||
in the folder cp2k/tools/manual/ which will perform all steps using the CP2K executable cp2k/exe/local/cp2k.psmp.
|
||||
</li>
|
||||
<li>
|
||||
Launch your favorite web browser and load the generated <code>index.html</code> file, e.g. in cp2k/tools/manual/local/psmp
|
||||
from the previous step.
|
||||
</li>
|
||||
<li>
|
||||
Happy browsing!
|
||||
</li>
|
||||
</ul>
|
||||
<xsl:call-template name="footer">
|
||||
<xsl:with-param name="root" select="''"/>
|
||||
</xsl:call-template>
|
||||
</body>
|
||||
</html>
|
||||
</xsl:result-document>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="link_edit_text">
|
||||
<xsl:param name="location"/>
|
||||
<xsl:if test="$add_edit_links = 'yes'">
|
||||
<xsl:variable name="link_path" select="concat(substring-before($location, ':'), '#L', substring-after($location, ':'))"/>
|
||||
<xsl:variable name="link_url" select="concat('https://github.com/cp2k/cp2k/blob/master/src/', $link_path)"/>
|
||||
<span style="font-size: small;">
|
||||
 [<a title="See corresponding source code location." href="{$link_url}">Edit on GitHub</a>]
|
||||
</span>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="write_html_tables">
|
||||
<xsl:result-document href="html_tables.html" method="html" indent="yes" format="html">
|
||||
<html>
|
||||
<head>
|
||||
<title>Supported HTML entities and tags</title>
|
||||
<xsl:call-template name="head">
|
||||
<xsl:with-param name="root" select="''"/>
|
||||
</xsl:call-template>
|
||||
</head>
|
||||
<body>
|
||||
<xsl:call-template name="header">
|
||||
<xsl:with-param name="root" select="''"/>
|
||||
</xsl:call-template>
|
||||
<h2 align="center">List of HTML tags supported by CP2K</h2>
|
||||
<p>The following HTML tags are supported by CP2K within the input descriptions:</p>
|
||||
<ul class="disc">
|
||||
<xsl:for-each select="CP2K_HTML/TAG">
|
||||
<li>
|
||||
<xsl:value-of disable-output-escaping="no" select="NAME"/>
|
||||
</li>
|
||||
</xsl:for-each>
|
||||
</ul>
|
||||
<h2 align="center">Table of HTML entities supported by CP2K</h2>
|
||||
<p>The following HTML entities are supported by CP2K within the input descriptions:</p>
|
||||
<table id="html_table">
|
||||
<tr id="html_table">
|
||||
<th id="html_table">Name</th>
|
||||
<th id="html_table">Code</th>
|
||||
<th id="html_table">Character</th>
|
||||
</tr>
|
||||
<xsl:for-each select="CP2K_HTML/ENTITY">
|
||||
<tr id="html_table">
|
||||
<td id="html_table"><xsl:value-of disable-output-escaping="no" select="NAME"/></td>
|
||||
<td id="html_table"><xsl:value-of disable-output-escaping="no" select="CODE"/></td>
|
||||
<td id="html_table"><xsl:value-of disable-output-escaping="yes" select="CODE"/></td>
|
||||
</tr>
|
||||
</xsl:for-each>
|
||||
</table>
|
||||
<xsl:call-template name="footer">
|
||||
<xsl:with-param name="root" select="''"/>
|
||||
</xsl:call-template>
|
||||
</body>
|
||||
</html>
|
||||
</xsl:result-document>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="repeat">
|
||||
<xsl:param name="ivar"/>
|
||||
<xsl:param name="nvar"/>
|
||||
<xsl:param name="vartype"/>
|
||||
<code> {<xsl:value-of select="concat(upper-case(substring($vartype,1,1)),substring($vartype,2))"/>}</code>
|
||||
<xsl:if test="not($ivar = $nvar)">
|
||||
<xsl:call-template name="repeat">
|
||||
<xsl:with-param name="ivar" select="$ivar + 1"/>
|
||||
<xsl:with-param name="nvar" select="$nvar"/>
|
||||
<xsl:with-param name="vartype" select="$vartype"/>
|
||||
</xsl:call-template>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
|
Before Width: | Height: | Size: 59 KiB |
|
Before Width: | Height: | Size: 966 B |
|
|
@ -1,49 +0,0 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import os
|
||||
import sys
|
||||
import gzip
|
||||
from os import path
|
||||
from datetime import datetime
|
||||
|
||||
# Generates a sitemap to guide for search engine crawlers
|
||||
# See http://www.sitemaps.org for more information.
|
||||
#
|
||||
# author: Ole Schuett
|
||||
|
||||
|
||||
def main():
|
||||
rootdir = "/var/www/cp2k.org/manual/"
|
||||
|
||||
entries = list()
|
||||
for dirname, subdirs, files in os.walk(rootdir, followlinks=True):
|
||||
reldir = dirname[len(rootdir) :]
|
||||
# print('Found directory: %s' % reldir)
|
||||
for fn in files:
|
||||
if not fn.lower().endswith(".html"):
|
||||
continue # skip non-html files
|
||||
absfn = path.join(dirname, fn)
|
||||
t = path.getmtime(absfn)
|
||||
d = datetime.utcfromtimestamp(t)
|
||||
lastmod = d.strftime("%Y-%m-%dT%H:%M:%SZ")
|
||||
relfn = path.join(reldir, fn)
|
||||
entry = "<url>"
|
||||
entry += "<loc>https://manual.cp2k.org/%s</loc>" % relfn
|
||||
entry += "<lastmod>%s</lastmod>" % lastmod
|
||||
entry += "</url>"
|
||||
entries.append(entry)
|
||||
|
||||
print("Found %d html-files." % len(entries))
|
||||
|
||||
fn_out = "sitemap.xml.gz"
|
||||
f = gzip.open("sitemap.xml.gz", "wt", encoding="utf8")
|
||||
f.write('<?xml version="1.0" encoding="UTF-8"?>\n')
|
||||
f.write('<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">\n')
|
||||
f.write("\n".join(entries))
|
||||
f.write("\n</urlset>\n")
|
||||
f.close()
|
||||
print("Wrote " + fn_out)
|
||||
|
||||
|
||||
# ===============================================================================
|
||||
main()
|
||||
|
|
@ -1,200 +0,0 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html><head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<!-- author: Ole Schuett -->
|
||||
<title>CP2K Input Reference Manual</title>
|
||||
<link rel="shortcut icon" href="/trunk/favicon.png" type="image/png">
|
||||
<style type="text/css">
|
||||
.linkbox {
|
||||
width: 15em;
|
||||
height: 12.5em;
|
||||
background: #f7f7f0;
|
||||
border: 1px solid gray;
|
||||
padding: 0.5em;
|
||||
margin: 1em;
|
||||
font-size: 70%;
|
||||
display: inline-block;
|
||||
}
|
||||
.linkbox h2 {
|
||||
margin: 0 0 0.5em 0;
|
||||
}
|
||||
.linkbox p {
|
||||
margin: 0.5em;
|
||||
}
|
||||
a:link, a:visited {
|
||||
color: black;
|
||||
text-decoration: none;
|
||||
}
|
||||
#flex-container {
|
||||
display: -webkit-flex; /* Safari */
|
||||
display: flex;
|
||||
-webkit-flex-flow: row wrap; /* Safari */
|
||||
flex-flow: row wrap;
|
||||
-webkit-justify-content: center; /* Safari */
|
||||
justify-content: center;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- Logo ****************************************************************** -->
|
||||
<center>
|
||||
<p style="margin:20px;"><img width="200px" src="cp2k_manual_logo.png" alt="Logo"></p>
|
||||
</center>
|
||||
|
||||
<!-- Search Box and Controls *********************************************** -->
|
||||
<center>
|
||||
<div id="searchbox-container" style="width:600px;">
|
||||
<div id="searchbox"><!--empty dummy --></div>
|
||||
</div>
|
||||
<select id="branch_selector" style="height:25px;margin:2px;">
|
||||
<option value="trunk">Development</option>
|
||||
<option value="cp2k-2023_2-branch" selected>Version 2023.2</option>
|
||||
<option value="cp2k-2023_1-branch">Version 2023.1</option>
|
||||
<option value="cp2k-2022_1-branch">Version 2022.1</option>
|
||||
<option value="cp2k-9_1-branch">Version 9.1</option>
|
||||
<option value="cp2k-8_2-branch">Version 8.2</option>
|
||||
<option value="cp2k-8_1-branch">Version 8.1</option>
|
||||
<option value="cp2k-7_1-branch">Version 7.1</option>
|
||||
<option value="cp2k-6_1-branch">Version 6.1</option>
|
||||
<option value="cp2k-5_1-branch">Version 5.1</option>
|
||||
<option value="cp2k-4_1-branch">Version 4.1</option>
|
||||
<option value="cp2k-3_0-branch">Version 3.0</option>
|
||||
<option value="cp2k-2_6-branch">Version 2.6</option>
|
||||
<option value="cp2k-2_5-branch">Version 2.5</option>
|
||||
<option value="cp2k-2_4-branch">Version 2.4</option>
|
||||
<option value="cp2k-2_3-branch">Version 2.3</option>
|
||||
<option value="cp2k-2_2-branch">Version 2.2</option>
|
||||
<option value="cp2k-2_1-branch">Version 2.1</option>
|
||||
</select>
|
||||
<a class="button" href="/trunk/index.html">
|
||||
<button style="height:25px;margin:2px;">Browse Tree</button>
|
||||
</a>
|
||||
</center>
|
||||
|
||||
<!-- Search Results ******************************************************** -->
|
||||
<div id="searchresults-container" style="min-height:100px">
|
||||
<div id="searchresults"><!--empty dummy --></div>
|
||||
</div>
|
||||
|
||||
<!-- Shortcut Links ******************************************************** -->
|
||||
<div id="flex-container">
|
||||
|
||||
<div class="linkbox">
|
||||
<div style="position:relative;width:0;height:0;font:small sans-serif;color:gray;">
|
||||
<div style="position:absolute;top:-30px;width:100px;">Quick Links:</div></div>
|
||||
<h2><a href="/trunk/CP2K_INPUT.html">CP2K_INPUT</a></h2>
|
||||
<p><a href="/trunk/CP2K_INPUT/TEST.html">TEST</a></p>
|
||||
<p><a href="/trunk/CP2K_INPUT/ATOM.html">ATOM</a></p>
|
||||
<p><a href="/trunk/CP2K_INPUT/GLOBAL.html">GLOBAL</a></p>
|
||||
<p><a href="/trunk/CP2K_INPUT/FARMING.html">FARMING</a></p>
|
||||
<p><a href="/trunk/CP2K_INPUT/EXT_RESTART.html">EXT_RESTART</a></p>
|
||||
<p><a href="/trunk/CP2K_INPUT/VIBRATIONAL_ANALYSIS.html">VIBRATIONAL_ANALYSIS</a></p>
|
||||
</div>
|
||||
|
||||
<div class="linkbox">
|
||||
<h2><a href="/trunk/CP2K_INPUT/MOTION.html">MOTION</a></h2>
|
||||
<p><a href="/trunk/CP2K_INPUT/MOTION/MD.html">MD</a></p>
|
||||
<p><a href="/trunk/CP2K_INPUT/MOTION/MC.html">MC</a></p>
|
||||
<p><a href="/trunk/CP2K_INPUT/MOTION/GEO_OPT.html">GEO_OPT</a></p>
|
||||
<p><a href="/trunk/CP2K_INPUT/MOTION/CELL_OPT.html">CELL_OPT</a></p>
|
||||
<p><a href="/trunk/CP2K_INPUT/MOTION/BAND.html">BAND</a></p>
|
||||
<p><a href="/trunk/CP2K_INPUT/MOTION/PRINT.html">PRINT</a></p>
|
||||
</div>
|
||||
|
||||
<div class="linkbox">
|
||||
<h2><a href="/trunk/CP2K_INPUT/FORCE_EVAL.html">FORCE_EVAL</a></h2>
|
||||
<p><a href="/trunk/CP2K_INPUT/FORCE_EVAL/MM.html">MM</a></p>
|
||||
<p><a href="/trunk/CP2K_INPUT/FORCE_EVAL/EIP.html">EIP</a></p>
|
||||
<p><a href="/trunk/CP2K_INPUT/FORCE_EVAL/QMMM.html">QMMM</a></p>
|
||||
<p><a href="/trunk/CP2K_INPUT/FORCE_EVAL/MIXED.html">MIXED</a></p>
|
||||
<p><a href="/trunk/CP2K_INPUT/FORCE_EVAL/SUBSYS.html">SUBSYS</a></p>
|
||||
<p><a href="/trunk/CP2K_INPUT/FORCE_EVAL/PROPERTIES.html">PROPERTIES</a></p>
|
||||
</div>
|
||||
|
||||
<div class="linkbox">
|
||||
<h2><a href="/trunk/CP2K_INPUT/FORCE_EVAL/DFT.html">DFT</a></h2>
|
||||
<p><a href="/trunk/CP2K_INPUT/FORCE_EVAL/DFT/QS.html">QS</a></p>
|
||||
<p><a href="/trunk/CP2K_INPUT/FORCE_EVAL/DFT/SCF.html">SCF</a></p>
|
||||
<p><a href="/trunk/CP2K_INPUT/FORCE_EVAL/DFT/LS_SCF.html">LS_SCF</a></p>
|
||||
<p><a href="/trunk/CP2K_INPUT/FORCE_EVAL/DFT/KPOINTS.html">KPOINTS</a></p>
|
||||
<p><a href="/trunk/CP2K_INPUT/FORCE_EVAL/DFT/PRINT.html">PRINT</a></p>
|
||||
<p><a href="/trunk/CP2K_INPUT/FORCE_EVAL/DFT/XC.html">XC</a> /
|
||||
<a href="/trunk/CP2K_INPUT/FORCE_EVAL/DFT/XC/WF_CORRELATION.html">WF_CORRELATION</a></p>
|
||||
</div>
|
||||
|
||||
<div class="linkbox">
|
||||
<h2>Misc...</h2>
|
||||
<p><a href="/trunk/units.html">Units</a></p>
|
||||
<p><a href="/trunk/references.html">References</a></p>
|
||||
</div>
|
||||
|
||||
</div> <!-- end flex-container -->
|
||||
|
||||
<!-- Java Script *********************************************************** -->
|
||||
<script type="text/javascript">
|
||||
(function() {
|
||||
var change_branch = function(){
|
||||
// get current branch and update cookie
|
||||
var branch = document.getElementById("branch_selector").value;
|
||||
document.cookie = "branch="+branch+"; expires=Fri, 31-Dec-9999 23:59:59 UTC; path=/";
|
||||
|
||||
// update shortcut links
|
||||
var links = document.getElementsByTagName("A");
|
||||
var i;
|
||||
for (i = 0; i < links.length; i++) {
|
||||
var parts = links[i].pathname.split("/");
|
||||
parts[1] = branch;
|
||||
links[i].pathname = parts.join("/");
|
||||
}
|
||||
|
||||
// rebuild searchbox
|
||||
var container = document.getElementById("searchbox-container");
|
||||
var old_elem = document.getElementById("searchbox");
|
||||
container.removeChild(old_elem);
|
||||
var new_elem = document.createElement('div');
|
||||
new_elem.setAttribute("id", "searchbox");
|
||||
new_elem.setAttribute("class", "gcse-searchbox");
|
||||
new_elem.setAttribute("data-as_oq", branch); // here it happens
|
||||
container.appendChild(new_elem);
|
||||
|
||||
// rebuild searchresult
|
||||
var container = document.getElementById("searchresults-container");
|
||||
var old_elem = document.getElementById("searchresults");
|
||||
container.removeChild(old_elem);
|
||||
var new_elem = document.createElement('div');
|
||||
new_elem.setAttribute("id", "searchresults");
|
||||
new_elem.setAttribute("class", "gcse-searchresults");
|
||||
container.appendChild(new_elem);
|
||||
};
|
||||
|
||||
var event_handler = function(){
|
||||
change_branch();
|
||||
google.search.cse.element.go();
|
||||
document.getElementsByName("search")[0].focus();
|
||||
}
|
||||
|
||||
var set_focus = function(){
|
||||
var inputs = document.getElementsByName("search");
|
||||
if(inputs.length>0) inputs[0].focus();
|
||||
}
|
||||
|
||||
// read cookie and setup branch accordingly
|
||||
if(document.cookie.indexOf("branch=") >= 0){
|
||||
var branch = document.cookie.split("=")[1];
|
||||
document.getElementById("branch_selector").value = branch;
|
||||
}
|
||||
change_branch();
|
||||
|
||||
// register event handler
|
||||
document.getElementById("branch_selector").addEventListener("change", event_handler);
|
||||
|
||||
// set focus once searchbar is instantiated
|
||||
window.setTimeout(set_focus, 500);
|
||||
})();
|
||||
</script>
|
||||
|
||||
<!-- google java script has to be loaded after initial call to change_branch(). -->
|
||||
<script type="text/javascript" src="https://cse.google.com/cse.js?cx=000324016156316545387:ddjlujwfaba"></script>
|
||||
|
||||
</body></html>
|
||||
|
|
@ -1,410 +0,0 @@
|
|||
/****** toggle_folding/main
|
||||
* PURPOSE
|
||||
* Allow collapsible section tree in CP2K manual
|
||||
* USAGE
|
||||
* load this script in the header of the CP2K manual font page or
|
||||
* the template file.
|
||||
*
|
||||
* If javascript is enabled, then the user should see [-] buttons in
|
||||
* front of all section titles. And:
|
||||
*
|
||||
* - Single clicking on a [-]/[+] button folds/unfolds the
|
||||
* subsection tree
|
||||
* - Double clicking on a [-]/[+] button folds/unfolds the entire
|
||||
* subsection tree recursively.
|
||||
*
|
||||
* The buttons are defined as HTML <a> elements, and have class name
|
||||
* "button", and one can change its font and appearance by setting
|
||||
* the corresponding style for .button in the CSS.
|
||||
* AUTHOR
|
||||
* L.Tong
|
||||
* CREATION DATE
|
||||
* 2013/11/06
|
||||
* MODIFICATION HISTORY
|
||||
* SOURCE
|
||||
*/
|
||||
// add the folding buttons to the manual tree
|
||||
document.addEventListener('DOMContentLoaded', parse_manual, false);
|
||||
/*****/
|
||||
|
||||
/****** toggle_folding/parse_manual
|
||||
* PURPOSE
|
||||
* Parses the CP2K manual front page and addes the tree folding
|
||||
* buttons to section titles
|
||||
* USAGE
|
||||
* parse_manual();
|
||||
* AUTHOR
|
||||
* L.Tong
|
||||
* CREATION DATE
|
||||
* 2013/11/06
|
||||
* MODIFICATION HISTORY
|
||||
* SOURCE
|
||||
*/
|
||||
function parse_manual() {
|
||||
// find the first element with id "CP2K_INPUT.html"
|
||||
var root = document.getElementById("CP2K_INPUT.html");
|
||||
// the parent element of root is the section title element
|
||||
var root_section = root.parentNode;
|
||||
// parse the root_section recursively
|
||||
add_button_recursively(root_section);
|
||||
return;
|
||||
}
|
||||
/*****/
|
||||
|
||||
/****f* toggle_folding/add_button_recursively
|
||||
* PURPOSE
|
||||
* Recursively adds the tree-folding buttons to a section tree
|
||||
* Inserts a blank button if a section does not subsections
|
||||
* USAGE
|
||||
* add_button_recursively(section)
|
||||
* INPUTS
|
||||
* section: the HTML <li> element in the CP2K input list containing
|
||||
* the section title
|
||||
* AUTHOR
|
||||
* L.Tong
|
||||
* CREATION DATE
|
||||
* 2013/11/06
|
||||
* MODIFICATION HISTORY
|
||||
* SOURCE
|
||||
*/
|
||||
function add_button_recursively(section) {
|
||||
var button;
|
||||
var title_element = first_element_child(section);
|
||||
var subsections = next_element_sibling(section);
|
||||
var subsection = subsections ? first_element_child(subsections) : null;
|
||||
// only add button if the subsections are not empty
|
||||
if (title_element) {
|
||||
// add button if the subsections are not empty
|
||||
if (subsection) {
|
||||
button = make_button("[\u2212]", "toggle");
|
||||
section.insertBefore(button, title_element);
|
||||
}
|
||||
// otherwise add a blank
|
||||
else {
|
||||
button = make_button("\u00a0\u00a0\u00a0", "blank");
|
||||
section.insertBefore(button, title_element);
|
||||
}
|
||||
}
|
||||
// do this recursively for all subsections
|
||||
while (subsection) {
|
||||
// the element is a section title and only needs parsing if it
|
||||
// contains an link element with a non-null id
|
||||
if (first_element_child(subsection).id) {
|
||||
add_button_recursively(subsection);
|
||||
// skip the subsections of the subsection
|
||||
subsection = next_element_sibling(subsection);
|
||||
}
|
||||
subsection = next_element_sibling(subsection);
|
||||
}
|
||||
return;
|
||||
}
|
||||
/*****/
|
||||
|
||||
/****f* toggle_folding/make_button
|
||||
* PURPOSE
|
||||
* Makes a button element, in the form of
|
||||
* <a onclick="toggle(event)" data-dblclick="nil" data-folding="open">text</a>
|
||||
*
|
||||
* If the button is of the type "blank", then it will not be
|
||||
* clickable, and will have the data-folding set to blank. The blank
|
||||
* buttons are used as place-holders to keep of section titles
|
||||
* properly aligned.
|
||||
* USAGE
|
||||
* make_button("[-]")
|
||||
* INPUTS
|
||||
* text: the text "image" of the button
|
||||
* type: "toggle" | "blank"
|
||||
* RETURN VALUE
|
||||
* a new <a> element representing a button
|
||||
* AUTHOR
|
||||
* L.Tong
|
||||
* CREATION DATE
|
||||
* 2013/11/06
|
||||
* MODIFICATION HISTORY
|
||||
* SOURCE
|
||||
*/
|
||||
function make_button(text, type) {
|
||||
var button;
|
||||
var button_text;
|
||||
button = document.createElement("a");
|
||||
button_text = document.createTextNode(text.concat(" "));
|
||||
button.appendChild(button_text);
|
||||
button.className = "button";
|
||||
switch (type) {
|
||||
case "toggle":
|
||||
// add onclick attribute
|
||||
button.setAttribute("onclick", "toggle(event)");
|
||||
// for recording double click
|
||||
button.setAttribute("data-dblclick", "nil");
|
||||
// for recording the open and closed status
|
||||
button.setAttribute("data-folding", "open");
|
||||
break;
|
||||
case "blank":
|
||||
default :
|
||||
button.setAttribute("data-folding", "blank");
|
||||
}
|
||||
return button;
|
||||
}
|
||||
/*****/
|
||||
|
||||
/****f* toggle_folding/toggle_button
|
||||
* PURPOSE
|
||||
* Toggle the button element to open or close status
|
||||
* Do nothing if the button is blank
|
||||
* USAGE
|
||||
* toggle_button(button, "open")
|
||||
* INPUTS
|
||||
* button: the <a> element representing button to toggle
|
||||
* openOrClose: "open" | "close"
|
||||
* AUTHOR
|
||||
* L.Tong
|
||||
* CREATION DATE
|
||||
* 2013/11/06
|
||||
* MODIFICATION HISTORY
|
||||
* SOURCE
|
||||
*/
|
||||
function toggle_button(button, openOrClose) {
|
||||
if (button.getAttribute("data-folding") === "blank")
|
||||
return;
|
||||
if (openOrClose === "open") {
|
||||
button.setAttribute("data-folding", "open");
|
||||
button.innerHTML = button.innerHTML.replace('[+]', '[\u2212]');
|
||||
}
|
||||
else if (openOrClose === "close") {
|
||||
button.setAttribute("data-folding", "close");
|
||||
button.innerHTML = button.innerHTML.replace('[\u2212]', '[+]');
|
||||
}
|
||||
return;
|
||||
}
|
||||
/*****/
|
||||
|
||||
/****f* toggle_folding/toggle
|
||||
* PURPOSE
|
||||
* Event interface function for putting functionality for folding and
|
||||
* unfolding the section trees in CP2K manual.
|
||||
*
|
||||
* - single click on the [-] or [+] in front of section headings
|
||||
* should fold/unfold the subtree corresponding to the section.
|
||||
*
|
||||
* - double click on the [-] or [+] in front of section headings
|
||||
* should fold/unfold the section subtree recursively.
|
||||
*
|
||||
* Note that one cannot use ondbclick attribute in HTML togeter with
|
||||
* onclick, as onclick will always fire first upon the first mouse
|
||||
* click. This function provides a work-around solution to this
|
||||
* problem.
|
||||
*
|
||||
* The local variable delay controls the interval between the
|
||||
* double-clicks.
|
||||
* USAGE
|
||||
* Set onclick attribute to toggle(event)
|
||||
* INPUTS
|
||||
* Mouse clicking event
|
||||
* AUTHOR
|
||||
* L.Tong
|
||||
* CREATION DATE
|
||||
* 2013/11/06
|
||||
* MODIFICATION HISTORY
|
||||
* SOURCE
|
||||
*/
|
||||
function toggle(event) {
|
||||
var delay = 300; // in milliseconds
|
||||
var el = event.target;
|
||||
var section = el.parentNode;
|
||||
if (el.getAttribute("data-dblclick") === "nil") {
|
||||
el.setAttribute("data-dblclick", "t");
|
||||
setTimeout(
|
||||
function() {
|
||||
if (el.getAttribute("data-dblclick") === "t") {
|
||||
// single click registered
|
||||
toggle_folding(section, false);
|
||||
}
|
||||
el.setAttribute("data-dblclick", "nil");
|
||||
},
|
||||
delay);
|
||||
}
|
||||
else {
|
||||
el.setAttribute("data-dblclick", "nil");
|
||||
// double click registered
|
||||
toggle_folding(section, true);
|
||||
}
|
||||
return;
|
||||
}
|
||||
/*****/
|
||||
|
||||
/****f* toggle_folding/toggle_folding
|
||||
* PURPOSE
|
||||
* Toggling folding and unfolding of subsections, recursively if
|
||||
* asked to.
|
||||
* USAGE
|
||||
* toggle_folding(section, recursive)
|
||||
* INPUTS
|
||||
* section: the HTML <li> element containing the section title,
|
||||
* corresponds to the section to be folded/unfolded
|
||||
* recursive: true | false, whether to do it recursively or not
|
||||
* AUTHOR
|
||||
* L.Tong
|
||||
* CREATION DATE
|
||||
* 2013/11/06
|
||||
* MODIFICATION HISTORY
|
||||
* SOURCE
|
||||
*/
|
||||
function toggle_folding(section, recursive) {
|
||||
if (! section)
|
||||
return;
|
||||
// get the next non-text sibling
|
||||
var subsections = next_element_sibling(section);
|
||||
if (! subsections)
|
||||
return;
|
||||
var button = first_element_child(section)
|
||||
if (button.className !== "button")
|
||||
return;
|
||||
if (button.getAttribute("data-folding") === "close")
|
||||
toggle_subtree(section, "open", recursive)
|
||||
else if (button.getAttribute("data-folding") === "open")
|
||||
toggle_subtree(section, "close", recursive)
|
||||
return;
|
||||
}
|
||||
/*****/
|
||||
|
||||
/****f* toggle_folding/toggle_subtree
|
||||
* PURPOSE
|
||||
* The main driver function for doing the folding and unfolding of
|
||||
* subsections
|
||||
*
|
||||
* If openOrClose == "open", then open the section tree, and
|
||||
* recursively open the section trees of the subsections if
|
||||
* recursive == true. Similarly, openOrClose == "close" closes the
|
||||
* section tree and recursively so if recursive == true.
|
||||
*
|
||||
* This function assumes that: the non-text element where the
|
||||
* folding function is triggered is always the title of the section.
|
||||
* The next non-text element should be the list of subsections. All
|
||||
* one needs to do, therefore, is to hide the subsections, i.e. the
|
||||
* next non-text element.
|
||||
* USAGE
|
||||
* toggle_folding(section, "open", false)
|
||||
* INPUTS
|
||||
* section: the HTML <li> element containing the section title,
|
||||
* corresponds to the section to be folded/unfolded
|
||||
* openOrClose: "open" | "close"
|
||||
* recursive: true | false, whether to do it recursively or not
|
||||
* AUTHOR
|
||||
* L.Tong
|
||||
* CREATION DATE
|
||||
* 2013/11/06
|
||||
* MODIFICATION HISTORY
|
||||
* SOURCE
|
||||
*/
|
||||
function toggle_subtree(section, openOrClose, recursive) {
|
||||
if (! section)
|
||||
return;
|
||||
var subsections = next_element_sibling(section);
|
||||
if (! subsections)
|
||||
return;
|
||||
var button = first_element_child(section)
|
||||
if (button.className !== "button")
|
||||
return;
|
||||
if (openOrClose === "open") {
|
||||
subsections.style.display = '';
|
||||
toggle_button(button, "open");
|
||||
}
|
||||
else if (openOrClose === "close") {
|
||||
subsections.style.display = "none";
|
||||
toggle_button(button, "close");
|
||||
}
|
||||
else {
|
||||
return;
|
||||
}
|
||||
// (un)fold recursively
|
||||
if (recursive) {
|
||||
var subsection = first_element_child(subsections);
|
||||
while (subsection) {
|
||||
// dump(subsection)
|
||||
if (first_element_child(subsection) &&
|
||||
(first_element_child(subsection).className === "button")) {
|
||||
toggle_subtree(subsection, openOrClose, true);
|
||||
subsection = next_element_sibling(subsection);
|
||||
}
|
||||
subsection = next_element_sibling(subsection);
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
/*****/
|
||||
|
||||
/****f* toggle_folding/first_element_child
|
||||
* PURPOSE
|
||||
* find the first non-text (element) child of a HTML element
|
||||
* USAGE
|
||||
* child = first_element_child(element)
|
||||
* INPUTS
|
||||
* node: the HTML element in question
|
||||
* RETURN VALUE
|
||||
* the first non-text child of node
|
||||
* returns null if node has no children
|
||||
* AUTHOR
|
||||
* L.Tong
|
||||
* CREATION DATE
|
||||
* 2013/11/06
|
||||
* MODIFICATION HISTORY
|
||||
* SOURCE
|
||||
*/
|
||||
function first_element_child(node) {
|
||||
var el = node.firstChild;
|
||||
while (el && el.nodeType !== 1)
|
||||
el = el.nextSibling;
|
||||
return el;
|
||||
}
|
||||
/*****/
|
||||
|
||||
/****f* toggle_folding/next_element_sibling
|
||||
* PURPOSE
|
||||
* find the next non-text (element) sibling of a HTML element
|
||||
* USAGE
|
||||
* sibling = next_element_sibling(element)
|
||||
* INPUTS
|
||||
* node: the HTML element in question
|
||||
* RETURN VALUE
|
||||
* the next non-text (element) sibling of node
|
||||
* returns null if node is the last element of its parent
|
||||
* AUTHOR
|
||||
* L.Tong
|
||||
* CREATION DATE
|
||||
* 2013/11/06
|
||||
* MODIFICATION HISTORY
|
||||
* SOURCE
|
||||
*/
|
||||
function next_element_sibling(node) {
|
||||
var el = node.nextSibling;
|
||||
while (el && el.nodeType !== 1)
|
||||
el = el.nextSibling;
|
||||
return el;
|
||||
}
|
||||
/*****/
|
||||
|
||||
/****f* toggle_folding/dump
|
||||
* PURPOSE
|
||||
* For debugging. Dumps the contents of a HTML element via alert
|
||||
* USAGE
|
||||
* dump(element)
|
||||
* INPUTS
|
||||
* element: the HTML element in question
|
||||
* AUTHOR
|
||||
* L.Tong
|
||||
* CREATION DATE
|
||||
* 2013/11/06
|
||||
* MODIFICATION HISTORY
|
||||
* SOURCE
|
||||
*/
|
||||
function dump(element) {
|
||||
var a = ["Element dump:"];
|
||||
for (var k in element) {
|
||||
if (element.hasOwnProperty(k)) {
|
||||
a.push(k + ": " + element[k]);
|
||||
}
|
||||
}
|
||||
a.push("HTML: " + element.innerHTML);
|
||||
alert(a.join('\n'));
|
||||
}
|
||||
/*****/
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
#!/bin/bash
|
||||
cwd=${PWD}
|
||||
if [[ -z $1 ]]; then
|
||||
arch=local
|
||||
else
|
||||
arch=$1
|
||||
shift
|
||||
fi
|
||||
if [[ -z $1 ]]; then
|
||||
version=psmp
|
||||
else
|
||||
version=$1
|
||||
shift
|
||||
fi
|
||||
cp2kexe=${cwd}/../../exe/${arch}/cp2k.${version}
|
||||
echo "CP2K executable: ${cp2kexe}"
|
||||
version_string=$(${cp2kexe} -v | head -1)
|
||||
if [[ -n $(echo ${version_string} | grep Development) ]]; then
|
||||
version_string=trunk
|
||||
else
|
||||
version_string=$(echo "${version_string}" | awk '{print $3}')
|
||||
fi
|
||||
echo Update CP2K manual: ${version_string}
|
||||
if [[ -z $1 ]]; then
|
||||
mandir=${arch}/${version}
|
||||
else
|
||||
mandir=$1
|
||||
shift
|
||||
fi
|
||||
echo "CP2K manual path: ${mandir}"
|
||||
if [[ -s ${cp2kexe} ]]; then
|
||||
[[ -d ${mandir} ]] && rm -rf ${mandir}
|
||||
mkdir -p ${mandir}
|
||||
cp collapsibleList.js cp2k_input.xsl cp2k_manual_logo.png cp2k_manual_logo.svg favicon.png favicon.svg toggle_folding.js xml2htm ../input_editing/vim/vim.xsl ${mandir}
|
||||
cd ${mandir}
|
||||
${cp2kexe} --xml
|
||||
./xml2htm ${version_string}
|
||||
echo "CP2K manual update done."
|
||||
cd ${cwd} >/dev/null
|
||||
else
|
||||
echo "ERROR in $(basename $0): CP2K executable file ${cp2kexe} not found"
|
||||
fi
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Provide path to saxon
|
||||
# Java version from http://sourceforge.net/projects/saxon
|
||||
export SAXON=${SAXON:-~/bin/saxon9he.jar}
|
||||
|
||||
if [[ -z $1 ]]; then
|
||||
java -Xmx256m -jar $SAXON -o:index.html cp2k_input.xml cp2k_input.xsl add_edit_links=no
|
||||
else
|
||||
java -Xmx256m -jar $SAXON -o:index.html cp2k_input.xml cp2k_input.xsl add_edit_links=no version=$1
|
||||
fi
|
||||
# Update the CP2K syntax file for the (g)vim editor
|
||||
java -Xmx256m -jar $SAXON -o:cp2k.vim cp2k_input.xml vim.xsl
|
||||