Hello.
I've started using USPEX recently and tried to set up calculation with SIESTA.
However I faced some errors during it.
Calculation type was 300 (3 dimensional, non-molecular, non-variable compositions).
So there were some errors in file
writeCalcFilesSIESTA.m:
lines 5-7:
numMols = POP_STRUC.POPULATION(Ind_No).numMols;
MtypeLIST = POP_STRUC.POPULATION(Ind_No).MtypeLIST;
typesAList= POP_STRUC.POPULATION(Ind_No).typesAList;
Even though calculation was non-molecular they tried to initialize (as I understand,
they are engaged only in molecular calculations) so I add 'if' construction:
if ORG_STRUC.molecule==1
numMols = POP_STRUC.POPULATION(Ind_No).numMols;
MtypeLIST = POP_STRUC.POPULATION(Ind_No).MtypeLIST;
typesAList= POP_STRUC.POPULATION(Ind_No).typesAList;
end
Then line 44 inside AtomicCoordinatesAndAtomicSpecies block generator:
if ORG_STRUC.atomType(j)==typesAList(i)
typesAlist was not intialized on line 7 after my changes so this also did not work
so I rewrited it for my purposes as follows:
fprintf(fid,'AtomicCoordinatesFormat Fractional\n');
fprintf(fid,'%%block AtomicCoordinatesAndAtomicSpecies\n');
%%%%%%%%%%%%%%%%%%%%%%%%%%__fixed__%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
numbers=1:sum(ORG_STRUC.atomType);
tmpSpecices=zeros(1,sum(numIons));
tmpSpecices([1 cumsum(numIons(1:end-1))+1]) = 1;
SpecicesNumber=numbers(cumsum(tmpSpecices));
SpecicesTypes=ORG_STRUC.atomType(cumsum(tmpSpecices));
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
for i=1:sum(numIons)
fprintf(fid,'%10.6f %10.6f %10.6f %d %2d\n', COORDINATES(i,:), SpecicesNumber(i), SpecicesTypes(i));
end
fprintf(fid,'%%endblock AtomicCoordinatesAndAtomicSpecies\n');
%%%%%%%%%%%%%%%%%%%%%%%%__Block_added__%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%comment out if scpecificated in input.fdf
fprintf(fid,'%%%block ChemicalSpeciesLabel\n');
for i=1:length(ORG_STRUC.atomType)
fprintf(fid,'%d %2d %s\n', i, ORG_STRUC.atomType(i), megaDoof(ORG_STRUC.atomType(i)));
end
fprintf(fid,'%%endblock ChemicalSpeciesLabel\n');
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
I am not sure if this would work in case of molecular calculations.
But, anyway, after all this changes I was able to start my calculations.
Next error occurred during reading output files: "PROBLEM 1" (then "PROBLEM 2" ans so on).
This was caused by misprint on line 89 in file
readCalcFilesSIESTA.m instead of
POP_STRUC.POPULATION(Ind_No).Vol(end+1)=det(LATTICE);
should be:
POP_STRUC.POPULATION(Ind_No).Vol(end+1)=det(POP_STRUC.POPULATION(Ind_No).LATTICE);
After that all worked fine.
I hope that provided information will be useful.
Stepan Botman.