detect and error out on unsupported/old bop potential files

This commit is contained in:
Axel Kohlmeyer 2018-03-21 19:40:25 -04:00
parent a19f550c1e
commit 9f785a4f0b
1 changed files with 4 additions and 3 deletions

View File

@ -5031,15 +5031,16 @@ void PairBOP::read_table(char *filename)
} }
} }
} }
if(nws==3) { if (nws==3) {
sscanf(s,"%d %d %d",&nr,&ntheta,&nBOt); sscanf(s,"%d %d %d",&nr,&ntheta,&nBOt);
npower=2; npower=2;
if(ntheta<=10) npower=ntheta; if(ntheta<=10) npower=ntheta;
} } else if (nws==2) {
else {
sscanf(s,"%d %d",&nr,&nBOt); sscanf(s,"%d %d",&nr,&nBOt);
ntheta=0; ntheta=0;
npower=3; npower=3;
} else {
error->one(FLERR,"Unsupported BOP potential file format");
} }
fclose(fp); fclose(fp);
npairs=bop_types*(bop_types+1)/2; npairs=bop_types*(bop_types+1)/2;