VMD-L Mailing List
From: Justin Gullingsrud (jgulling_at_mccammon.ucsd.edu)
Date: Thu Mar 11 2004 - 09:25:32 CST
- Next message: John Stone: "Re: VMD as command line interface"
- Previous message: Justin Gullingsrud: "Re: Coloring based on POS"
- In reply to: Vlad Cojocaru: "VMD as command line interface"
- Next in thread: John Stone: "Re: VMD as command line interface"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Sure! Here's an example:
#!/bin/sh
vmd -dispdev text -eofexit << EOF
mol pdbload 1msl
set sel [atomselect top "name CA"]
\$sel writepdb ca.pdb
EOF
grep TYR ca.pdb
It becomes a little cumbersome to escape all the '$' characters, so it
might be easier to just source a script rather than inserting it inline
into the shell script. Example #2:
# file: foo.vmd
mol pdbload 1msl
set sel [atomselect top "name CA"]
$sel writepdb ca.pdb
# end of file: foo.vmd
#!/bin/sh
vmd -dispdev text -eofexit -e foo.vmd < /dev/null
grep TYR ca.pdb
You can use the python interface from the command line as well:
vmd -dispdev text -eofexit -python -e foo.py < /dev/null
Hope this helps,
Justin
On Thu, Mar 11, 2004 at 02:33:52PM +0100, Vlad Cojocaru wrote:
> Dear VMD community,
> Is there a way to use VMD only as a command line interface??? What I
> am trying to do is to set a shell script for some analysis. In this
> shell script I need VMD first to do some splitting (via its Tcl
> interface) and then I use some other commands to process the files
> created by VMD.
> By default the shell takes subsequent commands without waiting for VMD
> to finish its job.
> So I would like to avoid this behaviour and subsequent commands to be
> taken only after vmd has finished its job and also I would like to get
> rid of the graphical interface. In other words I would like to use vmd
> as a normal shell command.
> Is there a way to instruct VMD to behave like this?
> Thank you very much
> vlad
>
> --
> Vlad Cojocaru
> Max Planck Institute for Biophysical Chemistry
> Department: 060
> Am Fassberg 11, 37077 Goettingen, Germany
> tel: ++49-551-201.1327
> e-mail: Vlad.Cojocaru_at_mpi-bpc.mpg.de
> home tel: ++49-551-9963204
>
>
- Next message: John Stone: "Re: VMD as command line interface"
- Previous message: Justin Gullingsrud: "Re: Coloring based on POS"
- In reply to: Vlad Cojocaru: "VMD as command line interface"
- Next in thread: John Stone: "Re: VMD as command line interface"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]