Page 1 of 1

ERROR: there must be 1 or 3 items on line 2 of POSCAR

Posted: Fri Sep 26, 2008 6:17 am
by cosmos
I wanted to optimize the structure of a simple system using the following script:

#!/bin/bash
#BSUB -q parallel
#BSUB -J system
#BSUB -o test.out
#BSUB -n 8
#---- end of options4 to batch queue ----------
#
echo $LSB_HOSTS > machinefile
rm WAVECAR
for i in 4.70, 4.71, 4.72
do
cat >POSCAR <<!
system
$i
0.5 0 0.5
0 0.5 0.5
0.5 0.5 0
1
Direct
0.000, 0.000, 0.000
!
echo "a= $i"
mpirun -nolocal -np 8 -machinefile machinefile vasp
E=`tail -1 OSZICAR` ; echo $i $E >>LATTICE_a.out
done
cat LATTICE_a.out

There was no output in LATTICE_a.out except the three numbers (4.70, 4.71, 4.72). In the test.out file I fount out the error message "ERROR: there must be 1 or 3 items on line 2 of POSCAR".

I have searched this forum and found a related question (The answer was that this problem is due to format error in POSCAR, such as hidden characters). But mine seems different (I did input POSCAR and/or the script manually to make sure there is no hidden characgter), since there is no problem at all if "$i" is put anywhere in the lattice vectors area, e.g. (I did a test on hcp structure)

3.250
1.00 0.00 0.00
-0.5 0.866 0.0
0.00 0.00 $i

Anyone has any clue? Thanks a lot. VASP version is 4.6.31, parallel version.

<span class='smallblacktext'>[ Edited ]</span>

Re: ERROR: there must be 1 or 3 items on line 2 of POSCAR

Posted: Wed Sep 11, 2024 1:55 pm
by support_vasp

Hi,

We're sorry that we didn’t answer your question. This does not live up to the quality of support that we aim to provide. The team has since expanded. If we can still help with your problem, please ask again in a new post, linking to this one, and we will answer as quickly as possible.

Best wishes,

VASP