Keywords highlight and auto-completion for lammps input file in Notepad++

Lammps is a powerful multi-purpose  simulation software. To run a simulation with lammps, one needs to prepare an input script file in which commands are issued to control the work flow. There are MANY commands  and lots of keywords supported by lammps. I found it’s good if there is a text editor capable of highlighting the keywords and keyword auto-completion. Notepad++ is one of the best free text editor. To add support of highlighting and auto-completion is pretty easy in Notepad++ cause it has a user-friendly interface (a dialog) to allow user to define new keywords, symbols, comments, operators for a new language. I just made the support  for lammps commands.

1. adding kewords

click this button on Notepad++ toolbar userlang1

Then input keywords in the user language dialoguserlang2

2. As the new keywords input, you can see the color change instantly if you have a lammps input file opened. The effect will look like this

lammps_highlight

3. In preferences settings in Notepad++, you can find a tab “backup/auto-completion”, there you can enable “word completion” in order to use auto-completion feature while you are typing. An example will be similar like this

lammps_autocompletion

Beautiful, right? Thanks to Notepad++.

The newly added language settings can be exported. All the information is stored in a XML file (userDefineLang.xml)  in folder “C:\Documents and Settings\***\Application Data\Notepad++”. To save your time, I attach here the file generated on my computer. To use it, simply download and copy it to the aforementioned folder, you will get colorful texts and auto-completion support when you prepare a lammps input. Enjoy!

Download the XML file here. (zip file)

Any question is welcome!

Share this:
Facebook Linkedin Twitter Digg Email

7 Comments

  1. sd chen says:

    Dear Li

    I can not download the userdefineLang.xml, can you mail me a copy?

    best regards

    SD Chen

  2. 9rivers says:

    Sent!

  3. chen says:

    hi,I can’t download it either, can you send it to me,thanks.
    limitworld@163.com

  4. 9rivers says:

    sent

  5. 9rivers says:

    The file link has been corrected!

  6. Majid says:

    i’d suggest suggesting inclusion of this to lammps authors.

    maybe you can expand on this by having autocompletion of the whole command.

  7. 9rivers says:

    An email has been sent to the lammps user mailing list before. I’ll contact the author again. I hope people find it useful, although one can always live without it.

Leave a Reply