git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@1302 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp
2008-01-04 15:22:54 +00:00
parent 6dd67908f6
commit 2cab8a49e6
5 changed files with 83 additions and 0 deletions

View File

@ -24,6 +24,7 @@ micelle2d create a data file of small lipid chains in solvent
msi2lmp use Accelrys Insight code to setup LAMMPS input msi2lmp use Accelrys Insight code to setup LAMMPS input
pymol_asphere convert LAMMPS output of ellipsoids to PyMol format pymol_asphere convert LAMMPS output of ellipsoids to PyMol format
restart2data convert a binary restart file to an input data file restart2data convert a binary restart file to an input data file
vim add-ons to VIM editor for editing LAMMPS input scripts
xmovie a quick/simple viz package (2d projections of 3d) xmovie a quick/simple viz package (2d projections of 3d)
For tools that are single C, C++, or Fortran files, a Makefile for For tools that are single C, C++, or Fortran files, a Makefile for

20
tools/vim/README.txt Normal file
View File

@ -0,0 +1,20 @@
=== Vim Syntax Highlighting ===
===============================
The files provided in this directory will enable syntax highlighting
for the lammps script syntax in vim. The simulation scripts have to
end on .lmp (see mysyntax.vim). By far not all commands are included
in the syntax file (lammps.vim). You can easily add new ones.
=To enable the highlighting:
============================
(0) Create a ~/.vimrc
You can have a look in /usr/local/share/vim/current/vimrc.example
(1) Insert in ~/.vimrc
let mysyntaxfile = "~/.vim/mysyntax.vim"
just before
syntax on
(2) Create directory ~/.vim and place mysyntax.vim and lammps.vim there
Gerolf Ziegenhain <gerolf@ziegenhain.com> 2007

57
tools/vim/lammps.vim Normal file
View File

@ -0,0 +1,57 @@
" Vim syntax file
" Language: Lammps Simulation Script File
" Maintainer: Gerolf Ziegenhain <gerolf@ziegenhain.com>
" Latest Revision: 2007-11-19
syn clear
syn keyword lammpsOutput log write_restart dump undump thermo thermo_modify thermo_style print
syn keyword lammpsRead include read read_restart read_data
syn keyword lammpsLattice boundary units atom_style lattice region create_box create_atoms
syn keyword lammpsLattice delete_atoms change_box dimension
syn keyword lammpsParticle pair_coeff pair_style mass angle_coeff angle_style atom_modify
syn keyword lammpsParticle atom_style bond_coeff bond_style delete_bonds
syn keyword lammpsSetup min_style fix_modify run_style timestep neighbor fix unfix
syn keyword lammpsRun minimize run
syn keyword lammpsDefine variable
syn keyword lammpsRepeat jump next loop
syn keyword lammpsOperator equal add sub mult div
syn keyword lammpsConditional if then else
syn region lammpsString start=+'+ end=+'+ oneline
syn region lammpsString start=+"+ end=+"+ oneline
syn match lammpsNumber "\<[0-9]\+[ij]\=\>"
syn match lammpsFloat "\<[0-9]\+\.[0-9]*\([edED][-+]\=[0-9]\+\)\=[ij]\=\>"
syn match lammpsFloat "\.[0-9]\+\([edED][-+]\=[0-9]\+\)\=[ij]\=\>"
syn match lammpsFloat "\<[0-9]\+[edED][-+]\=[0-9]\+[ij]\=\>"
syn match lammpsComment "#.*$"
syn match lammpsVariable "\$\({[a-zA-Z0-9]\+}\)"
syn match lammpsVariable "\$[A-Za-z]"
if !exists("did_lammps_syntax_inits")
let did_lammps_syntax_inits = 1
hi link lammpsOutput Function
hi link lammpsRepeat Repeat
hi link lammpsRead Include
hi link lammpsLattice Typedef
hi link lammpsParticle Typedef
hi link lammpsSetup Typedef
hi link lammpsDefine Define
hi link lammpsRun Statement
hi link lammpsNumber Number
hi link lammpsFloat Float
hi link lammpsString String
hi link lammpsComment Comment
hi link lammpsLoop Repeat
hi link lammpsVariable Identifier
hi link lammpsConditional Conditional
hi link lammpsOperator Operator
endif
let b:current_syntax = "lammps"

3
tools/vim/mysyntax.vim Normal file
View File

@ -0,0 +1,3 @@
augroup syntax
au BufNewFile,BufReadPost *.lmp so ~/.vim/lammps.vim
augroup END

2
tools/vim/vimrc Normal file
View File

@ -0,0 +1,2 @@
let mysyntaxfile = "~/.vim/mysyntax.vim"
syntax on