forked from lijiext/lammps
detect and error out on unsupported/old bop potential files
This commit is contained in:
parent
a19f550c1e
commit
9f785a4f0b
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue