User Tools

Site Tools


tools

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
tools [2014/01/27 09:22] ibethunetools [2023/11/10 11:42] (current) – Remove dead link krack
Line 1: Line 1:
-====== CP2K Tools ======+~~NOCACHE~~
  
-===== Plugin for the Vim editor =====+====== Tools for simplifying your life with CP2K  ======
  
-{{ :vim_screenshot.png?direcct&640 |  syntax highlighting and editing features for CP2K input files.}}+===== 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://manual.cp2k.org/trunk/cp2k.vim | cp2k.vim]]. Download the file cp2k.vim and copy it to the folder ~/.vim/syntax in your home directory, e.g. using+<nspages tools -h1 -simpleList -textPages=""
 +===== Basis sets and potentials =====
  
-<code> +  * [[https://htmlpreview.github.io/?https://github.com/cp2k/cp2k-data/blob/master/potentials/Goedecker/index.html|Goedecker-Teter-Hutter (GTHpseudopotential parameter sets]] 
-wget http://manual.cp2k.org/trunk/cp2k.vim +===== Various script repositories from cp2k users and developers =====
-mkdir -p ~/.vim/syntax +
-mv cp2k.vim ~/.vim/syntax +
-</code> +
- +
-In addition create a file with the name filetype.vim in the ~/.vim folder containing the following lines +
- +
-<code> +
-if exists("did_load_filetypes"+
-   finish +
-endif +
-augroup filetypedetect +
-   au! BufNewFile,BufRead *.inp setf cp2k +
-augroup END +
-</code> +
-which causes that all files with the name extension ".inp" will be considered as CP2K input files by the Vim editor. You may change the extension due to your favored settings. +
- +
-=== 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 +
-<code> +
-au FileType cp2k setlocal shiftwidth=1 tabstop=1 +
-</code> +
-which changes the indentation only for the specified file type cp2k, whereas +
-<code> +
-set shiftwidth=1 tabstop=1 +
-</code> +
-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 +
-<code> +
-:set shiftwidth=2 tabstop=2 +
-</code> +
-Likewise, the automatic indenting can be switched off by setting +
-<code> +
-:set shiftwidth=0 tabstop=0 +
-</code> +
- +
- +
-===== Plugin for the GNU EMACS editor ===== +
- +
-{{:emacs_screenshot.png?640|emacs screen shot for cp2k input}} +
- +
-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 ''outline-minor-mode'' == +
- +
-  * ''outline-toggle-children'' when called on an unfolded section, folds the section recursively; when called on a folded section, unfolds the top level tree +
-  * ''show-all'' when called unfolds all sections recursively +
-  * ''show-subtree'' when called unfolds a folded section recursively +
- +
-== New interactive functions == +
- +
-  * ''cp2k-indent-line''        :: indents the line according to CP2K input syntax. +
-  * ''cp2k-beginning-of-block'' :: goes to the beginning of the subsection, marks the current cursor position. +
-  * ''cp2k-end-of-block''       :: goes to the ending of the subsection, marks the current cursor position. +
- +
-== Key Bindings == +
- +
-  * ''<tab>''   :: cp2k-indent-line +
-  * ''C-j''     :: newline-and-indent +
-  * ''C-c ;''   :: comment-region +
-  * ''C-M-a''   :: cp2k-beginning-of-block +
-  * ''C-M-e''   :: cp2k-end-of-block +
-  * ''C-c C-c'' :: outline-toggle-children +
-  * ''C-c C-a'' :: show-all +
-  * ''C-c C-t'' :: show-subtree +
- +
-=== How to Obtain === +
- +
-You can download cp2k-mode.el from [[https://github.com/tonglianheng/cp2k-mode|GitHub]]. +
- +
-It should also come with the latest version of CP2K source, in: +
-<code> +
-cp2k/tools/input_editing/emacs/ +
-</code> +
- +
-=== Installation === +
- +
-You need to put cp2k-mode.el in one of your local emacs lisp directories, which is in the search path of your emacs installation. +
- +
-== Adding to emacs's search path == +
- +
-If you have never installed any packages manually before, and do not know the search path of your emacs installation, then in your home directory create directory: +
-<code> +
-~/.emacs.d/lisp/ +
-</code> +
-This is the usual place where the local/user defined emacs lisp files are installedMove cp2k-mode.el to ~/.emacs.d/lisp/ +
- +
-Then, add the following to your .emacs file (which should be in your home directory, and if it does not exist, create one)+
-<code> +
-(add-to-list 'load-path "~/.emacs.d/lisp/"+
-</code> +
-This tells emacs to add ~/.emacs.d/lisp/ to its search path for *.el files. +
-                                                         +
-== 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 +
-<code> +
-(require 'cp2k-mode nil 'noerror) +
-</code> +
-to your .emacs file. +
- +
-== Tell emacs to recognise *.inp automatically as a cp2k input file == +
- +
-Add +
-<code> +
-(add-to-list 'auto-mode-alist '("\\.inp\\'" . cp2k-mode)) +
-</code> +
-to your .emacs file. +
- +
-===== =====+
  
 +  * [[https://github.com/dev-zero/cp2k-tools|Simple python scripts by Tiziano Müller]] to mangle/generate cp2k input/output
 +  * [[https://github.com/pmamonov/pymol-cp2k-qmmm|&QMMM section generator for PyMOL by Peter Mamonov]]
 +  * [[https://github.com/glb96/cp2kRTPtools| Python package by Guillaume Le Breton]] to read time-dependent CP2K output and provide some analysis tool for Real Time analysis
tools.1390814573.txt.gz · Last modified: 2020/08/21 10:15 (external edit)