tools
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
tools [2014/01/27 09:23] – ibethune | tools [2023/11/10 11:42] (current) – Remove dead link krack | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== CP2K Tools ====== | + | ~~NOCACHE~~ |
- | ===== Plugin | + | ====== Tools for simplifying your life with CP2K ====== |
- | {{ : | + | ===== 3rd party software that interacts with CP2K ===== |
- | Syntax highlighting for CP2K input files can be enabled with the (g)vim editor using the vim plugin file [[http:// | + | <nspages tools -h1 -simpleList -textPages="" |
+ | ===== Basis sets and potentials ===== | ||
- | < | + | * [[https://htmlpreview.github.io/? |
- | wget http:// | + | ===== Various script repositories from cp2k users and developers ===== |
- | mkdir -p ~/ | + | |
- | mv cp2k.vim ~/ | + | |
- | </ | + | |
- | + | ||
- | In addition create a file with the name filetype.vim in the ~/.vim folder containing the following lines | + | |
- | + | ||
- | < | + | |
- | if exists(" | + | |
- | | + | |
- | endif | + | |
- | augroup filetypedetect | + | |
- | au! BufNewFile, | + | |
- | augroup END | + | |
- | </ | + | |
- | which causes that all files with the name extension " | + | |
- | + | ||
- | === Syntax folding === | + | |
- | + | ||
- | The syntax folding based on the CP2K input line indentation is supported by default. The following Vim editor commands might be useful for large CP2K input files: | + | |
- | * za :: Toggle the folding of the current fold level | + | |
- | * zA :: Toggle the folding of all fold levels recursively | + | |
- | * zM :: Close all folds in the current buffer | + | |
- | * zR :: Open all folds in the current buffer | + | |
- | + | ||
- | === Automatic indenting === | + | |
- | + | ||
- | An automatic indenting of the CP2K input lines while typing in insert mode is activated by default. The number of blanks used for the indentation can be defined in the ~/.vimrc file by | + | |
- | < | + | |
- | au FileType cp2k setlocal shiftwidth=1 tabstop=1 | + | |
- | </code> | + | |
- | which changes the indentation only for the specified file type cp2k, whereas | + | |
- | < | + | |
- | set shiftwidth=1 tabstop=1 | + | |
- | </ | + | |
- | will change the indentation for all file types and buffers. | + | |
- | + | ||
- | The indentation can also be changed at any time during a Vim editing session by | + | |
- | < | + | |
- | :set shiftwidth=2 tabstop=2 | + | |
- | </code> | + | |
- | Likewise, the automatic indenting can be switched off by setting | + | |
- | < | + | |
- | :set shiftwidth=0 tabstop=0 | + | |
- | </ | + | |
- | + | ||
- | + | ||
- | ===== Plugin for the GNU EMACS editor ===== | + | |
- | + | ||
- | {{: | + | |
- | + | ||
- | cp2k-mode.el provides a major mode in emacs for editing CP2K input | + | |
- | files. It has been tested on emacs 21, 23 and 24. | + | |
- | + | ||
- | === Functionalities === | + | |
- | + | ||
- | == Recognises and font-locks == | + | |
- | + | ||
- | * the full CP2K input preprocessor syntax | + | |
- | * the sections and subsections | + | |
- | * the keywords | + | |
- | * the comment lines | + | |
- | + | ||
- | == Indents lines according to the CP2K input syntax using <tab> key == | + | |
- | + | ||
- | == Input sections can be folded or unfolded, using emacs '' | + | |
- | + | ||
- | * '' | + | |
- | * '' | + | |
- | * '' | + | |
- | + | ||
- | == New interactive functions == | + | |
- | + | ||
- | * '' | + | |
- | * '' | + | |
- | * '' | + | |
- | + | ||
- | == Key Bindings == | + | |
- | + | ||
- | * ''< | + | |
- | * '' | + | |
- | * '' | + | |
- | * '' | + | |
- | * '' | + | |
- | * '' | + | |
- | * '' | + | |
- | * '' | + | |
- | + | ||
- | === How to Obtain === | + | |
- | + | ||
- | You can download cp2k-mode.el from [[https:// | + | |
- | + | ||
- | It should also come with the latest version of CP2K source, in: | + | |
- | < | + | |
- | cp2k/tools/ | + | |
- | </ | + | |
- | + | ||
- | === Installation === | + | |
- | + | ||
- | You need to put cp2k-mode.el in one of your local emacs lisp directories, | + | |
- | + | ||
- | == Adding to emacs' | + | |
- | + | ||
- | If you have never installed any packages manually before, and do not know the search path of your emacs installation, | + | |
- | < | + | |
- | ~/.emacs.d/lisp/ | + | |
- | </code> | + | |
- | This is the usual place where the local/user defined emacs lisp files are installed. Move cp2k-mode.el to ~/ | + | |
- | + | ||
- | Then, add the following to your .emacs file (which should be in your home directory, and if it does not exist, create one): | + | |
- | < | + | |
- | (add-to-list ' | + | |
- | </ | + | |
- | This tells emacs to add ~/ | + | |
- | | + | |
- | == Tell emacs to load cp2k-mode.el at startup | + | |
- | + | ||
- | Once cp2k-mode.el is in the search path, we need to tell emacs to load it at start up, this is done by adding | + | |
- | < | + | |
- | (require ' | + | |
- | </ | + | |
- | to your .emacs file. | + | |
- | + | ||
- | == Tell emacs to recognise *.inp automatically as a cp2k input file == | + | |
- | + | ||
- | Add | + | |
- | < | + | |
- | (add-to-list ' | + | |
- | </ | + | |
- | to your .emacs file. | + | |
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// |
tools.1390814632.txt.gz · Last modified: 2020/08/21 10:15 (external edit)