Commit f5f3bdc5 authored by giannozz's avatar giannozz

Merge branch 'develop' into 'develop'

Updating PWgui and QE-modes + some necessary helpdoc changes

See merge request !366
parents e7d58ca6 de66dab4
......@@ -12,7 +12,7 @@ The PWgui package comes in two flavors:
(ii) SOURCE PACKAGE
N.B.: for the usage of SVN version of PWgui see file INSTALL.svn
N.B.: for the usage of repository version of PWgui see file INSTALL.repository
________________________________________________________________________
......
==============================================================================
* * * INSTALLATION instructions for PWgui as obtained * * *
* * * from the QE SVN repository * * *
* * * from the QE repository * * *
==============================================================================
This INSTALL.svn file is located in GUI/PWgui/ directory. To "install"
the PWgui do the following:
This INSTALL.repository file is located in GUI/PWgui/ directory. To
make the PWgui functional do the following:
(i) from GUI/PWgui/ directory call: make svninit
^^^^^^^^^^^^
(ii) define the PWGUI environmental variable (optional for versions >= 4.0),
Either:
* from the QE root directory call: make gui
Or:
* or from the this directory (i.e. GUI/PWgui) call: make init
(iii) add $PWGUI to your path, and
(iv) to launch the PWgui program, type: pwgui
* to run the PWgui program, type from this directory: ./pwgui
BEWARE:
......@@ -22,7 +21,5 @@ See the INSTALL file, for the software-requirements of the PWgui
source-package.
--
Anton Kokalj (tone.kokalj@ijs.si), Wed Jun 08 2011
Anton Kokalj (tone.kokalj@ijs.si), Fri Mar 01 2019
......@@ -79,7 +79,7 @@ distclean: veryclean
-cd lib/; rm -f *
cd $(PWGUI_VFS); $(MAKE) distclean
svninit:
init:
-cd doc/pwdocs; $(MAKE)
-if test ! -d lib; then mkdir lib; fi
-cd lib/; rm -f Guib-*;
......
......@@ -44,13 +44,9 @@ make_user_guide: links
rm -rf user_guide/
cp -a $(QE_DOC_DIR)/user_guide .
cd user_guide/; \
for file in *.png; do \
convert $$file $${file%.png}.gif; \
rm -f $$file; \
done; \
for file in *.html; do \
cp $$file /tmp/$$file; \
cat /tmp/$$file | sed 's/\.png/\.gif/g' - | sed 's/ / /g' - > $$file; \
cat /tmp/$$file | sed 's/ / /g' - > $$file; \
rm -f /tmp/$$file; \
done
......
GUI/PWgui/images/pwgui-logo.gif

255 KB | W: | H:

GUI/PWgui/images/pwgui-logo.gif

258 KB | W: | H:

GUI/PWgui/images/pwgui-logo.gif
GUI/PWgui/images/pwgui-logo.gif
GUI/PWgui/images/pwgui-logo.gif
GUI/PWgui/images/pwgui-logo.gif
  • 2-up
  • Swipe
  • Onion skin
......@@ -8,9 +8,9 @@
If you donwloaded any of the *.tgz package, you do not need to
call "make". See INSTALL file instead.
* SVN-related target:
* Repository-related target:
svninit ... initialize the PWgui after it was SVN-downloaded
init ... initialize the PWgui after it was downloaded from repository
* Distribution-related targets:
......
tracevar bz_sum w {
switch -glob -- [varvalue bz_sum] {
*tetrahedra* {
widget ngauss disable
widget degauss disable
}
default {
widget ngauss enable
widget degauss enable
}
}
}
varset bz_sum -value {}
......@@ -45,6 +45,58 @@ directory containing the input data, i.e. the same as in pw.x
}
# ------------------------------------------------------------------------
help bz_sum -helpfmt helpdoc -helptext {
<ul>
<li> <em>Variable: </em><big><b>bz_sum</b></big>
</li>
<br><li> <em>Type: </em>CHARACTER</li>
<br><li> <em>Default: </em>
'smearing' if degauss in given in input 'smearing',
options read from the xml data file otherwise.
</li>
<br><li> <em>Description:</em>
</li>
<blockquote>
<pre> Keyword selecting the method for BZ summation. Available options are:
</pre>
<dl style="margin-left: 1.5em;">
<dt><tt><b>'smearing'</b> :</tt></dt>
<dd><pre style="margin-top: 0em; margin-bottom: -1em;">
integration using gaussian smearing. In fact currently
any string not related to tetrahedra defaults to smearing;
</pre></dd>
</dl>
<dl style="margin-left: 1.5em;">
<dt><tt><b>'tetrahedra'</b> :</tt></dt>
<dd><pre style="margin-top: 0em; margin-bottom: -1em;">
Tetrahedron method, Bloechl's version:
P.E. Bloechl, "PRB 49, 16223 (1994)"
Requires uniform grid of k-points, to be
automatically generated in pw.x.
</pre></dd>
</dl>
<dl style="margin-left: 1.5em;">
<dt><tt><b>'tetrahedra_lin'</b> :</tt></dt>
<dd><pre style="margin-top: 0em; margin-bottom: -1em;">
Original linear tetrahedron method.
To be used only as a reference;
the optimized tetrahedron method is more efficient.
</pre></dd>
</dl>
<dl style="margin-left: 1.5em;">
<dt><tt><b>'tetrahedra_opt'</b> :</tt></dt>
<dd><pre style="margin-top: 0em; margin-bottom: -1em;">
Optimized tetrahedron method:
see M. Kawamura, "PRB 89, 094515 (2014)".
</pre></dd>
</dl>
</blockquote>
</ul>
}
# ------------------------------------------------------------------------
help ngauss -helpfmt helpdoc -helptext {
<ul>
......
......@@ -24,22 +24,34 @@ module Dos\#auto -title "PWSCF GUI: module Dos.x" -script {
separator -label "--- DOS ploting options ---"
var ngauss {
-label "Type of gaussian broadening (ngauss):"
-widget radiobox
-value {0 1 -1 99}
-textvalue {
"Simple Gaussian (default)"
"Methfessel-Paxton of order 1"
"Marzari-Vanderbilt \"cold smearing\""
"Fermi-Dirac function"
}
}
var bz_sum {
-label "Method for BZ summation (bz_sum):"
-widget radiobox
-value {
'smearing'
'tetrahedra'
'tetrahedra_lin'
'tetrahedra_opt'
}
-validate string
}
var degauss {
-label "Gaussian broadening \[in Ry\] (degauss):"
-validate fortranreal
}
var ngauss {
-label "Type of gaussian broadening (ngauss):"
-widget radiobox
-value {0 1 -1 99}
-textvalue {
"Simple Gaussian (default)"
"Methfessel-Paxton of order 1"
"Marzari-Vanderbilt \"cold smearing\""
"Fermi-Dirac function"
}
}
var degauss {
-label "Gaussian broadening \[in Ry\] (degauss):"
-validate fortranreal
}
var DeltaE {
-label "Resolution of PDOS plots \[in eV\] (DeltaE):"
......@@ -59,6 +71,11 @@ module Dos\#auto -title "PWSCF GUI: module Dos.x" -script {
}
}
# ----------------------------------------------------------------------
# take care of specialties
# ----------------------------------------------------------------------
source dos-event.tcl
# ------------------------------------------------------------------------
# source the HELP file
# ------------------------------------------------------------------------
......
......@@ -741,9 +741,7 @@ up calculations at q=0 (phonon wavevector) if the sum over
the Brillouin Zone includes k=0 only. The gamma_gamma
trick exploits symmetry and acoustic sum rule to reduce
the number of linear response calculations to the strict
minimum, as it is done in code phcg.x. This option MUST
BE USED if a run with ph.x is to be followed by a run
with d3.x for third-order terms calculation.
minimum, as it is done in code phcg.x.
</pre></blockquote>
</ul>
......@@ -877,6 +875,32 @@ with offset determined by k1,k2,k3.
}
# ------------------------------------------------------------------------
help read_dns_bare -helpfmt helpdoc -helptext {
<ul>
<li> <em>Variable: </em><big><b>read_dns_bare</b></big>
</li>
<br><li> <em>Type: </em>LOGICAL</li>
<br><li> <em>Default: </em> .false.
</li>
<br><li> <em>Description:</em>
</li>
<blockquote><pre>
If .true. the PH code tries to read three files in the DFPT+U
calculation: dns_orth, dns_bare, d2ns_bare.
dns_orth and dns_bare are the first-order variations of
the occupation matrix, while d2ns_bare is the second-order
variation of the occupation matrix. These matrices are
computed only once during the DFPT+U calculation. However,
their calculation (especially of d2ns_bare) is computationally
expensive, this is why they are written to file and then can be
read (e.g. for restart) in order to save time.
</pre></blockquote>
</ul>
}
# ------------------------------------------------------------------------
help start_irr -helpfmt helpdoc -helptext {
<ul>
......
......@@ -477,7 +477,16 @@ module PH\#auto -title "PWSCF GUI: module PH.x" -script {
-label "Number of iterations used in mixing of potential (nmix_ph):"
-widget spinint
-fmt %d
}
}
separator -label "--- Miscellaneous ---"
var read_dns_bare {
-label "For DFPT+U: read the dns_* files (read_dns_bare):"
-widget radiobox
-textvalue { Yes No }
-value { .true. .false. }
}
}
page q_k_points -name "q- and k-points" {
......
......@@ -519,14 +519,13 @@ help output_format -helpfmt helpdoc -helptext {
0 = format suitable for gnuplot (1D)
1 = format suitable for contour.x (2D)
1 = obsolete format no longer supported
2 = format suitable for plotrho (2D)
3 = format suitable for XCRYSDEN (2D or user-supplied 3D region)
4 = format suitable for gOpenMol (3D)
(formatted: convert to unformatted *.plt)
4 = obsolete format no longer supported
5 = format suitable for XCRYSDEN (3D, using entire FFT grid)
......@@ -765,12 +764,12 @@ rho(i,j,k) = rho( x0 + e1 * (i-1)/nx
are ignored, the entire FFT grid is written in the
XCRYSDEN format - works for any crystal axis (VERY FAST)
- If "e1", "e2", "e3", "x0" are present, and "e1", "e2", "e3" are parallel
to xyz and parallel to crystal axis, a subset of the
FFT grid that approximately covers the parallelepiped
defined by "e1", "e2", "e3", "x0", is written (presently only
if "output_format" = 4, i.e. gopenmol format) - works only
if the crystal axis are parallel to xyz
- If "e1", "e2", "e3", "x0" are present,
and "e1", "e2", "e3" are parallel to xyz
and parallel to crystal axis, a subset of the FFT
grid that approximately covers the parallelepiped
defined by "e1", "e2", "e3", "x0", is
written - untested, might be obsolete
- Otherwise, the required 3D grid is generated from the
Fourier components (may be VERY slow)
......
......@@ -189,13 +189,11 @@ module PP\#auto -title "PWSCF GUI: module PP.x" -script {
"XCRYSDEN's XSF format (2D or 3D)"
"XCRYSDEN's XSF format (whole unit cell) (3D)"
"format suitable for gnuplot (1D)"
"format suitable for contour.x (2D)"
"format suitable for plotrho (2D)"
"format suitable for gOpenMol (3D)"
"Gaussian cube-file format (3D)"
"format suitable for gnuplot (2D)"
}
-value { 3 5 0 1 2 4 6 7 }
-value { 3 5 0 2 6 7 }
-widget optionmenu
}
var interpolation {
......
......@@ -539,6 +539,7 @@ proc ::pwscf::pwReadFilter {moduleObj channel} {
{'martyna-tuckerman' 'm-t' 'mt'}
}
vdw_corr {
{'grimme-d3' 'Grimme-D3' 'DFT-D3' 'dft-d3'}
{'grimme-d2' 'Grimme-D2' 'DFT-D' 'dft-d'}
{'ts-vdw' 'TS', 'ts', ''ts-vdW', 'tkatchenko-scheffler'}
{'xdm''XDM'}
......
......@@ -357,21 +357,18 @@ tracevar xdm w {
}
tracevar vdw_corr w {
groupwidget dftdG disable
groupwidget xdmG disable
groupwidget tsG disable
groupwidget dftdG disable
groupwidget dftd3G disable
groupwidget xdmG disable
groupwidget tsG disable
if { [varvalue vdw_corr] == "'grimme-d2'" } {
groupwidget dftdG enable
groupwidget xdmG disable
groupwidget tsG disable
} elseif { [varvalue vdw_corr] == "'grimme-d3'" } {
groupwidget dftd3G enable
} elseif { [varvalue vdw_corr] == "'xdm'" } {
groupwidget dftdG disable
groupwidget xdmG enable
groupwidget tsG disable
} elseif { [varvalue vdw_corr] == "'ts-vdw'" } {
groupwidget dftdG disable
groupwidget xdmG disable
groupwidget tsG enable
}
}
......
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -5,10 +5,9 @@
# ----------------------------------------------------------------------
# Anton Kokalj
# Jozef Stefan Institute, Ljubljana, Slovenia
# INFM DEMOCRITOS National Simulation Center, Trieste, Italy
# Email: Tone.Kokalj@ijs.si
# ======================================================================
# Copyright (c) 2003--2004 Anton Kokalj
# Copyright (c) 2003--2019 Anton Kokalj
# ======================================================================
#
#
......
......@@ -4,10 +4,9 @@
# ----------------------------------------------------------------------
# Anton Kokalj
# Jozef Stefan Institute, Ljubljana, Slovenia
# INFM DEMOCRITOS National Simulation Center, Trieste, Italy
# Email: Tone.Kokalj@ijs.si
# ======================================================================
# Copyright (c) 2003--2004 Anton Kokalj
# Copyright (c) 2003--2019 Anton Kokalj
# ======================================================================
#
#
......@@ -34,11 +33,10 @@ if { [info exists env(PWGUI)] } {
# we arrive here, if we are using SVN version of code
if { [file isdirectory [file join $env(PWGUI) .. Guib]] } {
puts " "
puts " It seems you are using SVN version of PWgui/Quantum-Espresso."
puts " It seems you are using a repository QE version of PWgui."
puts " "
puts " For the SVN version you need to do the following:"
puts " * cd into GUI/PWgui directory, and"
puts " * execute: make svninit"
puts " You need to initialize PWgui first."
puts " Use \"make gui\" from the QE root directory."
puts " "
exit
}
......
LATEX = pdflatex
LATEX2HTML = latex2html
VERSION = svn
VERSION = 6.4
PDFS = user_guide.pdf
AUXS = $(PDFS:.pdf=.aux)
......
\documentclass[12pt,a4paper]{article}
\def\version{6.2}
\def\version{6.4}
\def\qe{{\sc Quantum ESPRESSO}}
\sloppy
......
TOPDIR = $(shell cd ../..; pwd)
VERSION = svn
VERSION = 6.4
GEN_MODE = $(TOPDIR)/dev-tools/gen-emacs-mode
LATEX = pdflatex
......
This diff is collapsed.
;; ld1-mode.el
;;
;; Copyright (C) 2016 Quantum ESPRESSO group
;; This file is distributed under the terms of the
;; GNU General Public License. See the file `License'
;; in the root directory of the present distribution,
;; or http://www.gnu.org/copyleft/gpl.txt .
;;
;; Author: Anton Kokalj (tone.kokalj at ijs.si)
;;
;; Acknowledgments:
;;
;; The implementation of qe-modes package was made possible by several
;; useful and helpful resources that are gratefully acknowledged, in
;; particular: "Mode Tutorial" of Scott Andrew Borton
;; (https://www.emacswiki.org/emacs/ModeTutorial, for indentation
;; code), "Derived Mode" and "Sample Mode" pages
;; (https://www.emacswiki.org/emacs/DerivedMode,
;; https://www.emacswiki.org/emacs/SampleMode) as well as the very
;; useful resources of Xah Lee
;; (http://ergoemacs.org/emacs/elisp_syntax_coloring.html). Last but
;; not the least Sebastijan Peljhan is acknowledged for his work on
;; `xsf-mode' that inspired the idea of writing the qe-modes.
;; This file is not part of GNU Emacs.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 2, or (at your option)
;; any later version.
;;
;; This lisp script is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
;;
;; Permission is granted to distribute copies of this lisp script
;; provided the copyright notice and this permission are preserved in
;; all copies.
;;
;; You should have received a copy of the GNU General Public License
;; along with this program; if not, you can either send email to this
;; program's maintainer or write to: The Free Software Foundation,
;; Inc.; 675 Massachusetts Avenue; Cambridge, MA 02139, USA.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; send bug reports to the author (tone.kokalj at ijs.si)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Commentary:
;; This is the `ld1-mode', a major mode for composing the Quantum ESPRESSO
;; QE-ld1.x (atomic) input files. For the installation and usage, see the
;; user_guide.pdf in the Doc/ subdirectory of the original package
;; (quick installation instructions are also available in the README
;; file of the original package).
;;; Code:
(require 'font-lock)
(require 'regexp-opt)
(defvar ld1-mode-hook nil)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; basic variables
;; ld1's supercards (if any)
(defvar ld1-open-supercards (list ))
(defvar ld1-closed-supercards (list ))
;; ld1's namelists
(defvar ld1-namelists (list "&INPUT" "&INPUTP" "&TEST" ))
(defvar qe-end-namelist (list "&END" "/"))
;; ld1's variables
(defvar ld1-vars (list "atom" "author" "beta" "cau_fact" "config" "configts" "decut" "deld" "dft" "dx" "ecutmax" "ecutmin" "emaxld" "eminld" "file_beta" "file_charge" "file_chi" "file_core" "file_pseudo" "file_pseudopw" "file_qvan" "file_recon" "file_screen" "file_wfcaegen" "file_wfcncgen" "file_wfcusgen" "frozen_core" "isic" "iswitch" "latt" "lgipaw_reconstruction" "lloc" "lpaw" "lsave_wfc" "lsd" "lsdts" "lsmall" "max_out_wfc" "nconf" "new_core_ps" "nlcc" "nld" "noscf" "prefix" "pseudotype" "rcloc" "rcore" "rcutv" "rel" "rel_dist" "relpert" "rho0" "rlderiv" "rm" "rmatch_augfun" "rmatch_augfun_nc" "rmax" "rpwe" "rytoev_fact" "title" "tm" "tr2" "use_paw_as_gipaw" "vdw" "verbosity" "which_augfun" "write_coulomb" "xmin" "zed" "zval" ))
;; ld1's cards & keywords
(defvar ld1-cards (list "__NO-CARDS" ))
;; ld1's flags
(defvar ld1-flags (list ))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; derived variables
(defvar ld1-open-supercards-regexp (regexp-opt ld1-open-supercards 'symbols)) ; may not exists
(defvar ld1-closed-supercards-regexp (regexp-opt ld1-closed-supercards 'symbols)) ; may not exists
(defvar ld1-cards-regexp (regexp-opt
(append ld1-cards ld1-open-supercards) 'symbols))
(defvar ld1-flags-regexp (regexp-opt ld1-flags 'symbols))
(defvar ld1-namelist-face (cons (regexp-opt (append ld1-namelists qe-end-namelist) 'symbols) font-lock-function-name-face))
(defvar ld1-variable-face (cons (regexp-opt ld1-vars 'symbols) font-lock-variable-name-face))
;; logical values as constants
(defvar qe-logic-face (cons (regexp-opt (list ".t." ".true." ".f." ".false.")) font-lock-constant-face))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; regexp for indentation
(defvar ld1-decr-indent-fold-t-re (concat "^[ \t]*" (regexp-opt qe-end-namelist t)))
(defvar ld1-decr-indent-re (concat "^[ \t]*" (regexp-opt
(append ld1-cards ld1-open-supercards ld1-closed-supercards) t)))
;;
(defvar ld1-deindent-fold-t-re (concat "^[ \t]*" (regexp-opt qe-end-namelist t)))
;;
(defvar ld1-indent-fold-t-re (concat "^[ \t]*" (regexp-opt ld1-namelists t)))
(defvar ld1-indent-re (concat "^[ \t]*" (regexp-opt ld1-cards t)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; supercards, cards and flags are case sensitive -- here are the corresponding matchers
(defun ld1-closed-supercards-matcher (limit)
(let ((case-fold-search nil))
(re-search-forward ld1-closed-supercards-regexp limit 'no-error)))
(defun ld1-cards-matcher (limit)
(let ((case-fold-search nil))
(re-search-forward ld1-cards-regexp limit 'no-error)))
(defun ld1-flags-matcher (limit)
(let ((case-fold-search nil))
(re-search-forward ld1-flags-regexp limit 'no-error)))
(font-lock-add-keywords 'ld1-mode (list
ld1-namelist-face
ld1-variable-face
qe-logic-face
'("," . font-lock-builtin-face)
'("(" . font-lock-builtin-face)
'(")" . font-lock-builtin-face)
))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; register the keywords
(font-lock-add-keywords 'ld1-mode '(
(ld1-closed-supercards-matcher 1 font-lock-preprocessor-face t)
(ld1-cards-matcher 1 font-lock-keyword-face t)
(ld1-flags-matcher 1 font-lock-type-face t)
))
;;(defvar ld1-keywords '(ld1-namelist-face ld1-variable-face))
(defvar ld1-keywords '(((list "") . font-lock-constant-face)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; define the sytnax of strings
(defvar ld1-mode-syntax-table
(let ((table (make-syntax-table)))
(modify-syntax-entry ?\' "\"'" table)
(modify-syntax-entry ?\" "\"\"" table)
table)
"Syntax table in use in `ld1-mode' buffers.")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; code for auto-indenting
(defvar qe-indent 3)
(defun ld1-indent-line ()
"Indent current line according to ld1 input syntax."
(interactive)
(beginning-of-line)
(if (bobp)
(indent-line-to 0) ; First line indented to column 0
(let ((not-indented t) cur-indent)
(if (or (looking-at ld1-decr-indent-fold-t-re)
(let ((case-fold-search nil)) (looking-at ld1-decr-indent-re))) ; If the line we are looking at is the end of a block, then decrease the indentation
(progn
(save-excursion
(forward-line -1)
(setq cur-indent (- (current-indentation) qe-indent)))
(if (< cur-indent 0) ; We can't indent past the left margin
(setq cur-indent 0)))
(save-excursion
(while not-indented ; Iterate backwards until we find an indentation hint
(forward-line -1)
(if (looking-at ld1-deindent-fold-t-re) ; This hint indicates that we need to indent at the level of the "/" token
(progn
(setq cur-indent (current-indentation))
(setq not-indented nil))
(if (or (looking-at ld1-indent-fold-t-re)
(let ((case-fold-search nil)) (looking-at ld1-indent-re))) ; This hint indicates that we need to indent an extra level
(progn
(setq cur-indent (+ (current-indentation) qe-indent)) ; Do the actual indenting
(setq not-indented nil))
(if (bobp)
(setq not-indented nil)))))))
(if cur-indent
(indent-line-to cur-indent)
(indent-line-to 0))))) ; If we didn't see an indentation hint, then allow no indentation
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; define the ld1-mode as derived-mode
(define-derived-mode ld1-mode prog-mode
"QE-ld1.x (atomic)"
"Major mode for editing Qunatum-ESPRESSO input files (QE-ld1.x (atomic) mode)"
(setq font-lock-defaults '((ld1-keywords) nil t))
(set (make-local-variable 'indent-line-function) 'ld1-indent-line)
;; define the syntax of comments
(setq comment-start "!")
(setq comment-end "")
(modify-syntax-entry ?! "< b" ld1-mode-syntax-table)
(modify-syntax-entry ?\n "> b" ld1-mode-syntax-table)
(modify-syntax-entry ?= " " ld1-mode-syntax-table) ;; treat "=" non symbol constituent
;; end
)
;; free memory
(setq ld1-namelists nil)
(setq ld1-vars nil)
(setq ld1-cards nil)
(setq ld1-flags nil)
(setq ld1-open-supercards nil)
(setq ld1-closed-supercards nil)
(require 'qe-funcs)
(provide 'ld1-mode)
This diff is collapsed.
;; ph-mode.el
;;
;; Copyright (C) 2016 Quantum ESPRESSO group
;; This file is distributed under the terms of the
;; GNU General Public License. See the file `License'
;; in the root directory of the present distribution,
;; or http://www.gnu.org/copyleft/gpl.txt .
;;
;; Author: Anton Kokalj (tone.kokalj at ijs.si)
;;
;; Acknowledgments:
;;
;; The implementation of qe-modes package was made possible by several
;; useful and helpful resources that are gratefully acknowledged, in
;; particular: "Mode Tutorial" of Scott Andrew Borton
;; (https://www.emacswiki.org/emacs/ModeTutorial, for indentation
;; code), "Derived Mode" and "Sample Mode" pages
;; (https://www.emacswiki.org/emacs/DerivedMode,
;; https://www.emacswiki.org/emacs/SampleMode) as well as the very
;; useful resources of Xah Lee
;; (http://ergoemacs.org/emacs/elisp_syntax_coloring.html). Last but
;; not the least Sebastijan Peljhan is acknowledged for his work on
;; `xsf-mode' that inspired the idea of writing the qe-modes.