Previous Thread
Next Thread
Print Thread
charmm-mode.el Emacs Major mode for editing CHARMM scripts
#18481 07/10/08 05:28 AM
Joined: Aug 2007
Posts: 4
Forum Member
OP Offline
Forum Member
Joined: Aug 2007
Posts: 4
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 !

Attached Files
18649-charmm-mode-ss.jpg (0 Bytes, 831 downloads)
Re: charmm-mode.el Emacs Major mode for editing CHARMM scripts
jrperillaj #18482 09/21/08 05:56 AM
Joined: Jul 2008
Posts: 12
T
Forum Member
Offline
Forum Member
T
Joined: Jul 2008
Posts: 12
Very nice!
Thank you!

Re: charmm-mode.el Emacs Major mode for editing CHARMM scripts
jrperillaj #18483 09/23/08 09:51 PM
Joined: Jan 2008
Posts: 1
M
Forum Member
Offline
Forum Member
M
Joined: Jan 2008
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?

Attached Files
19124-charmm-el.txt (0 Bytes, 835 downloads)
Re: charmm-mode.el Emacs Major mode for editing CHARMM scripts
mglerner #18484 10/02/08 09:00 PM
Joined: Aug 2007
Posts: 4
Forum Member
OP Offline
Forum Member
Joined: Aug 2007
Posts: 4
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.

Re: charmm-mode.el Emacs Major mode for editing CHARMM scripts
jrperillaj #18485 10/02/08 10:07 PM
Joined: Sep 2003
Posts: 8,483
rmv Offline
Forum Member
Offline
Forum Member
Joined: Sep 2003
Posts: 8,483
Sounds great; now if only someone would do the same for the 'vim' color schemes ...

Re: charmm-mode.el Emacs Major mode for editing CHARMM scripts
rmv #29285 02/07/12 09:19 PM
Joined: Aug 2007
Posts: 4
Forum Member
OP Offline
Forum Member
Joined: Aug 2007
Posts: 4
the original server has been down for quite some time, so I have uploaded the script to:

CHARMM-mode for emacs

- Juan R. Perilla

Attached Files
charmm-mode.zip (8.68 KB, 449 downloads)

Moderated by  lennart, rmv 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 5.6.33-0+deb8u1 Page Time: 0.013s Queries: 29 (0.006s) Memory: 0.9353 MB (Peak: 1.0372 MB) Data Comp: Off Server Time: 2020-08-12 00:17:27 UTC
Valid HTML 5 and Valid CSS