Steve,
Thanks for the suggestions. Here is an update:
If I split my files into M files each with a single line, then it works. The problem is that I need to generate >10,000 files which is a potential issue for the cluster where I am running the calculations.
I have come up with a variation of this. I have one single file that I manipulate, with a series of head/tail shell commands, to give me the Nth atom id (see attached script). This is then read by a file variable (that I delete at the end of each run). This works fine!
However, I am encountering a different problem. I am using 32 partitions and looping using a uloop variable. It is my understanding that each value of the uloop variable should be used ONLY by one partition, right? However, in a very few cases (like 5 times out of 8000 calculations), two partitions get the same uloop value and therefore run the same calculation. This should not happen, right? FYI, I am using the Sep_30/2013 version of lammps.
Thanks,
D
INPUT SCRIPT
variable index uloop 8207
label loopb
variable ID world 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
read_restart restart_dislocation.*
kspace_style pppm 1e-4
thermo 10 #Output every 10 steps thermodinamic quantities
thermo_style custom step temp vol press pe lx fmax atoms cpu
set type 1 charge 1.84
set type 3 charge -1.4
variable energy equal ‘pe’
variable energy2 equal ‘pe +1934998.63’
shell head -{index} id.dat > ./files/head.dat_{ID}
shell tail -1 ./files/head.dat_{ID} > ./files/tail.dat_{ID}
variable number file ./files/tail.dat_{ID}
group oxygen_vacancy id {number}
variable oxygen delete
variable number delete
dump 1 oxygen_vacancy custom 1 ./files/test_${ID} x y z
run 0
undump 1
delete_atoms group oxygen_vacancy
set type 2 charge 2.3599463190
minimize 0.0 0.5 10000 100000
shell echo {index} {ID} {energy} >> ./files/energy.dat_{ID}
shell tail -1 ./files/test_{ID} >> ./files/positions_{ID}
shell echo {energy2} >> ./files/energy_{ID}
clear
next index
jump STO.in loopb