VMD-L Mailing List
From: Axel Kohlmeyer (axel.kohlmeyer_at_theochem.ruhr-uni-bochum.de)
Date: Thu Jun 09 2005 - 02:38:35 CDT
- Next message: Tatyana Kuznetsova: "Selection basing on the number of hydrogen bonds"
- Previous message: Tamal Banerjee: "Query"
- In reply to: nordgren_at_sas.upenn.edu: "multiple automated calls to NAMD"
- Next in thread: nordgren_at_sas.upenn.edu: "Re: namd-l: Re: multiple automated calls to NAMD"
- Reply: nordgren_at_sas.upenn.edu: "Re: namd-l: Re: multiple automated calls to NAMD"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
On Wed, 8 Jun 2005 nordgren_at_sas.upenn.edu wrote:
EN> I have need for running NAMD multiple times (for short minimization runs)
EN> in a semi-automated way, driven by a VMD (Tcl) script. My inquiry is this:
EN>
EN> Is it possible to send command-line parameters to NAMD? Something
erik,
since VMD uses the tcl interpreter, you should be able
to use the tcl 'exec' command without problems and use
VMD/tcl variables as arguments. you may have to build the
command line as a tcl list beforehand. some of the VMD plugins
do spawn external programs, so you may try to grep through
the bundled tcl scripts for examples that are similar to
your needs.
EN> analogous to the "args" command for VMD or simple Tcl procs? If not, how can
EN> I communicate the values of variable parameters from a higher-level script
EN> into a particular instance of NAMD? I see in the manual that NAMD can
EN> read shell environment variables, and this works if I set the variables from
EN> my C-shell and run NAMD once; but when I tried this using "exec setenv"
EN> commands from within a VMD/Tcl script, the environment variables were not
EN> readable by NAMD. I also tried reading/writing my variables from/to a text
true. since each 'exec' will spawn a new shell, the environment
won't be carried over. however, you can try to run NAMD via 'env'
and get the environment exported. totally stupid example:
please compare
exec sh -c {echo $PATH}
with
exec env PATH=/bin:/usr/bin sh -c {echo $PATH}
and especially
set my_path {/bin:/usr/bin}
exec env PATH=$my_path sh -c {echo $PATH}
EN> file, using Tcl commands from within VMD and NAMD, but again to no avail.
EN> (Again, running my NAMD job directly from the Unix shell, taking its input
EN> parameters from my VMD-written text file, DOES work; but this time, when I
EN> try running the same NAMD config file from within VMD, I get this message:
EN> "ERROR:src/NamdState.C(158): Number of pdb and psf atoms are not the same".)
if the suggestions from above don't help you, could you provide a
(small) example that demonstrates the problem, so we could try
locating the root of the problem. your current discription is
rather vague to me.
regards,
axel.
EN> I had hoped that, since NAMD and VMD come from the same "house" and are
EN> supposed to play well together, that there might be a simple solution to
EN> my problem. Maybe I've just missed something obvious? Well, anyone who
EN> has any experience and could shed some light, I'd be most grateful.
EN>
EN> thanks, as always,
EN> - Erik
EN>
EN> C. Erik Nordgren, Ph.D.
EN> Department of Chemistry
EN> University of Pennsylvania
EN>
EN>
-- ======================================================================= Dr. Axel Kohlmeyer e-mail: axel.kohlmeyer_at_theochem.ruhr-uni-bochum.de Lehrstuhl fuer Theoretische Chemie Phone: ++49 (0)234/32-26673 Ruhr-Universitaet Bochum - NC 03/53 Fax: ++49 (0)234/32-14045 D-44780 Bochum http://www.theochem.ruhr-uni-bochum.de/~axel.kohlmeyer/ ======================================================================= If you make something idiot-proof, the universe creates a better idiot.
- Next message: Tatyana Kuznetsova: "Selection basing on the number of hydrogen bonds"
- Previous message: Tamal Banerjee: "Query"
- In reply to: nordgren_at_sas.upenn.edu: "multiple automated calls to NAMD"
- Next in thread: nordgren_at_sas.upenn.edu: "Re: namd-l: Re: multiple automated calls to NAMD"
- Reply: nordgren_at_sas.upenn.edu: "Re: namd-l: Re: multiple automated calls to NAMD"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]