Re: Multiple input and output files

From: Jim Phillips (jim_at_ks.uiuc.edu)
Date: Thu Nov 06 2014 - 12:50:36 CST

Here are five other options:

1) Use the Tcl "source" command to include the common parts of the
configuration file, so each file only has unique filenames, etc., e.g.,
in dir<n>/dir<n>.namd add "source ../common.namd"

2) Include multiple config files on the NAMD command line. The working
directory will be the directory of the file that contains the run command,
or of the last file. Files are parsed in order. E.g.:

  namd2 ... common.namd dir1/dir1.namd
  namd2 ... common.namd dir2/dir2.namd

3) Use command line options (just prepend "--" to any option + value):

  namd2 ... --structure s1.psf --coordinates s1.pdb --outputname s1 common.namd
  namd2 ... --structure s2.psf --coordinates s2.pdb --outputname s2 common.namd

4) Use Tcl variables (Since "--" options just call the Tcl interpreter):

  namd2 ... -- 'set basename s1' common.namd
  namd2 ... -- 'set basename s2' common.namd

5) Use environment variables (access as $env(BASENAME) in common.namd):

  env BASENAME=s1 namd2 ... common.namd
  env BASENAME=s2 namd2 ... common.namd

But no, you can't do this without restarting NAMD.

Jim

On Wed, 5 Nov 2014, Josh Vermaas wrote:

> Hi Debashis,
>
> If I understand your question properly, this is more of a personal
> organization question. If I have highly similar systems, I'll put the psf
> file and the different starting pdbs in a "build" directory, place sequential
> NAMD configuration files in the root directory of the project, and use
> symlinks to place the files in the appropriate directories. This lets me have
> a "system.psf" and a "system.pdb" in each systematically named directory,
> which lets me use the same NAMD configuration files (also symlinked) in every
> directory. If you prefer to use the *exact* same configuration file for
> repeated runs, it is also possible using tcl commands to set variables so
> that you can use an identical NAMD configuration file for successive runs,
> but I find this approach to be very easy to break if something unexpected
> happens during runtime.
>
> In short, unless I am misunderstanding the question, there is not per se a
> NAMD-specific way of doing what you want, but with a combination of a
> scripting language (bash, tcl, etc.), you can figure something out. What's
> wrong with just copying the file in several places?
>
> -Josh Vermaas
>
> On 11/5/14, 8:20 PM, Debashis Kundu wrote:
>> Hello NAMD users,
>>
>> My name is Debashis. I am new to NAMD and this is my first mail. I am
>> trying to run NPT of 4 configurations of a system. The configurations have
>> same number of atoms. The topology and pdb files are in respective
>> directories. I am trying to generate a single NPT script which will take
>> input from each directory one after another and dump the output in
>> respective directory. The simulation will run in series. I have tried to
>> search suitable command in user guide but unable to find it. Please suggest
>> me about the suitable commands for that.
>>
>> --
>> ****************************************************
>> *Thanks and Regards*/*,*
>> /
>> Debashis Kundu
>> PhD student
>> Drexel University
>> Dept. of Chemical & Biological Engg.
>> ***************************************************
>
>

This archive was generated by hypermail 2.1.6 : Wed Dec 31 2014 - 23:22:58 CST