Error

Dear All

I am getting this error for the if statement, i am continuously trying to fix the problem by following the manual and tried curly braces instead of square bracket, double and single quote, but getting the same error as mentioned below**.** Pls help me to sort out the problem.

ERROR: Invalid Boolean syntax in if command (…/variable.cpp:3954)

#Runs several series of heats from an initaial temperature to
#a final, and then relaxes it at that final temperature

Variables (d = name of dirs, t = test temp, l = last temp, c = steps during cooling, h = steps during hold, b,g = respective log sizes)

There exists a script to generate these lists (Used Fixed,EPeak: 64, 2, 1200, 37, 2)

variable d index T1 T2
variable t index 2075 2050
variable l index 2100 2075
variable c index 12364 12598
variable h index 37092 37794
variable b index 123 125
variable g index 185 188
variable s index 0.003

Read in data/initialize

units metal
boundary p p p

atom_style atomic
read_restart restart.liquid
pair_style eam/fs
pair_coeff * * …/…/…/…/…/potentials/CuZr_mm.eam.fs Cu Zr

thermo_style custom step temp press vol pe etotal pxx pyy pzz pxy pxz pyz lx ly lz

Beginning of loop

label loop

Move the counts back to zero

reset_timestep 0

Make a new directory and move to it

shell mkdir $d
shell cd $d
log log.$d

Heat to a stable temperature

fix 1 all npt temp $l $t 0.1 aniso 0.0 0.0 50
timestep $s
thermo $b
run $c

Hold it at that temperature for a time, record volume

unfix 1
thermo $g
fix 2 all npt temp $t $t 0.1 aniso 0.0 0.0 50
run $h
unfix 2
write_restart restart.$d_held
#Advance, and go back to the beginning
next d
next t
next l
next c
next h
next b
next g
shell cd …
jump in.hcmulti loop

# Once complete, summarize cooling curves into condensed files

if [ -e volcond.csv ]; then
rm volcond.csv engcond.csv
fi
for TD in ls -d T[0-9]*
do
cd $TD
pwd
ln -s log.$TD log.txt
ln -s …/volcond.csv
ln -s …/engcond.csv
time /home/physicist/Desktop/lammps-6Jun14/Glass-Formation/Programs/Volcond/volcond.exe
time /home/physicist/Desktop/lammps-6Jun14/Glass-Formation/Programs/Engcond/engcond.exe
rm log.txt volcond.csv engcond.csv
cd …
done
if [ -d T2 ]; then
qsub getdump.opt
fi
if [ -e …/…/…/viscsettings ]; then
cd …/VISCOSITY/
source #PATH#/viscmaker.bs cat ../../../viscsettings
qsub multivisc.opt
fi
echo “Done.”

Thanks in advance

Regards

Anik S

You are mixing lammps script and Bourne shell script. That cannot work this way. You need to put the lammps input part in a separate file.

Axel