AW: Pass a runtime parameter into the configuration file

From: Norman Geist (norman.geist_at_uni-greifswald.de)
Date: Wed Oct 16 2013 - 00:45:18 CDT

You need to differ between the namd input language TCL and your BASH. This
are linux basics. I usually use script looking like to generate my
jobscripts while putting in some options:

 

 

#/bin/bash

NAMD=/my/path/namd2

CHARMRUN="/my/path/charmrun"

 

cellx="10"

celly="10"

cellz="10"

temp="300"

runname="myjob"

 

jobname="_min"

cat > ${runname}${jobname}.in <<END

amber on

parmfile myjob.top

ambercoor myjob.crd

 

outputname ${runname}${jobname}

 

cellbasisvector1 ${cellx} 0 0

cellbasisvector2 0 ${celly} 0

cellbasisvector3 0 0 ${cellz}

 

cutoff 10

switching on

switchdist 9

pairlistdist 12

 

temperature ${temp}

 

[etc.]

 

END

$CHARMRUN +p$SLOTS ++nodelist $TMPDIR/nodes $NAMD ++idlepoll
${runname}${jobname}.in >> ${runname}${jobname}.out 2>>
${runname}${jobname}.e

 

restartname=$jobname

jobname="300K"

 

cat > ${runname}${jobname}.in <<END

amber on

parmfile myjob.top

coordinates ${restartname}.coor

 

outputname ${runname}${jobname}

 

cellbasisvector1 ${cellx} 0 0

cellbasisvector2 0 ${celly} 0

cellbasisvector3 0 0 ${cellz}

 

cutoff 10

switching on

switchdist 9

pairlistdist 12

 

temperature ${temp}

 

[etc.]

 

END

$CHARMRUN +p$NSLOTS ++nodelist $TMPDIR/nodes $NAMD ++idlepoll
${runname}${jobname}.in >> ${runname}${jobname}.out 2>>
${runname}${jobname}.e

 

exit

 

 

You can put as many runs after each other as you like and also as many
configurable options like the example for the cell and temperature above.

 

Norman Geist.

 

Von: owner-namd-l_at_ks.uiuc.edu [mailto:owner-namd-l_at_ks.uiuc.edu] Im Auftrag
von Xingcheng Lin
Gesendet: Mittwoch, 16. Oktober 2013 00:56
An: namd-l_at_ks.uiuc.edu
Betreff: namd-l: Pass a runtime parameter into the configuration file

 

Hi,

 

When I was trying to set up a NAMD simulation for a cluster, I need to pass
a runtime parameter "outputname" into configuration file so that NAMD can
give me different .dcd files at different run. I tried "export
outputname=**" in the bash script launching NAMD but it didn't work. Is
there any way to fix that?

 

Thank you,

 

Arrow

This archive was generated by hypermail 2.1.6 : Wed Dec 31 2014 - 23:21:46 CST