Topic Options
#18481 - 07/10/08 01:28 AM charmm-mode.el Emacs Major mode for editing CHARMM scripts
jrperillaj Offline
Forum Member

Registered: 08/17/07
Posts: 4
Loc: Johns Hopkins University, Scho...
charmm-mode.el --- Major mode for editing Charmm scripts with emacs
Includes color highlighting and other extras

Comments, suggestions:

Juan Roberto Perilla (jrperillaj _at_ jhu.edu)
Oliver Beckstein (orbeckst _at_ jhmi.edu)


the script can be downloaded from:

Charmm-mode ===> http://gonzo.med.jhmi.edu/download/charmm-mode.el


;; ------------------------------------------------------------
;; INSTALL
;; ------------------------------------------------------------
;; (1) Either copy this file into your site-lisp preferred directory,
;; then add the following lines to you .emacs file:
;;
;;;; (autoload 'charmm-mode "charmm-mode" "Charmm input files" t)
;;;; (setq auto-mode-alist (cons '("\\.inp\\'\\|\\.str\\'\\|\\.charmm\\'" . charmm-mode) auto-mode-alist))
;;
;; (2) or put it somewhere else, eg save it as '~/.emacs.d/charmm-mode.el'. Then use in .emacs:
;;
;;;; (autoload 'charmm-mode "~/.emacs.d/charmm-mode.el" "Charmm input files" t)
;;;; (setq auto-mode-alist (cons '("\\.inp\\'\\|\\.str\\'\\|\\.charmm\\'" . charmm-mode) auto-mode-alist))
;;
;;

Questions suggestions can be sent directly to the authors.
Happy scripting !


Attachments
18649-charmm-mode-ss.jpg (794 downloads)


Top
#18482 - 09/21/08 01:56 AM Re: charmm-mode.el Emacs Major mode for editing CHARMM scripts [Re: jrperillaj]
Todd Offline
Forum Member

Registered: 07/12/08
Posts: 12
Very nice!
Thank you!

Top
#18483 - 09/23/08 05:51 PM Re: charmm-mode.el Emacs Major mode for editing CHARMM scripts [Re: jrperillaj]
mglerner Offline
Forum Member

Registered: 01/31/08
Posts: 1
Hi,

I took a slightly different route in making an emacs mode. The parser is a little more generic, so it may have some issues, but it seems to work for my purposes. It also does some basic indentation. Here are the comments:

Code:

;; NOTES:
;; - Indentation:
;; This does some very basic indentation. Follow these rules:
;; 1. If blocks that are contained entirely on one line must
;; not use the word "then". e.g.:
;;
;; if something .gt. somethingelse goto somelabel
;;
;; 2. If blocks that span multiple lines must contain the word
;; "then" on the first line. e.g.:
;;
;; if ?NUMNODE .gt. 1 then ! These things cannot be run in parallel
;; echo "This cannot be run in parallel!"
;; stop
;; endif
;;
;; 3. Labels that control loops must begin with the word "loop". e.g.:
;;
;; label looptraj
;; various loopy things
;; if something .lt. somethingelse goto looptraj
;;
;; 4. You can indent a block by beginning it with a label that
;; starts with the word "start" and ending it with a label
;; that starts with the word "end". e.g.:
;;
;; label startsetup
;; do lots of setup calculations
;; that only need to be run once
;; even though you may want to run
;; this script several times
;; label startminimization
;; generate a minimized structure
;; and save it for later, etc.
;; label endminimization
;; label endsetup



Maybe we should combine our work somehow?


Attachments
19124-charmm-el.txt (756 downloads)


Top
#18484 - 10/02/08 05:00 PM Re: charmm-mode.el Emacs Major mode for editing CHARMM scripts [Re: mglerner]
jrperillaj Offline
Forum Member

Registered: 08/17/07
Posts: 4
Loc: Johns Hopkins University, Scho...
Our codes had been merged, the new version of charmm-mode.el can be downloaded from the original
link. Thanks a lot Michael for your help.

Top
#18485 - 10/02/08 06:07 PM Re: charmm-mode.el Emacs Major mode for editing CHARMM scripts [Re: jrperillaj]
rmv Online   content

Forum Member

Registered: 09/17/03
Posts: 8379
Loc: 39 03 48 N, 77 06 54 W
Sounds great; now if only someone would do the same for the 'vim' color schemes ...

Top
#29285 - 02/07/12 04:19 PM Re: charmm-mode.el Emacs Major mode for editing CHARMM scripts [Re: rmv]
jrperillaj Offline
Forum Member

Registered: 08/17/07
Posts: 4
Loc: Johns Hopkins University, Scho...
the original server has been down for quite some time, so I have uploaded the script to:

CHARMM-mode for emacs

- Juan R. Perilla


Attachments
charmm-mode.zip (422 downloads)


Top

Moderator:  chmgr, John Legato, petrella