forked from lijiext/lammps
git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@15270 f3b2605a-c512-4ea7-a41b-209d697bcdaa
This commit is contained in:
parent
526f95e050
commit
cdc9712261
|
@ -463,7 +463,8 @@ void Molecule::read(int flag)
|
|||
|
||||
// error checks
|
||||
|
||||
if (natoms < 1) error->all(FLERR,"No count or invalid atom count in molecule file");
|
||||
if (natoms < 1)
|
||||
error->all(FLERR,"No count or invalid atom count in molecule file");
|
||||
if (nbonds < 0) error->all(FLERR,"Invalid bond count in molecule file");
|
||||
if (nangles < 0) error->all(FLERR,"Invalid angle count in molecule file");
|
||||
if (ndihedrals < 0)
|
||||
|
@ -590,13 +591,16 @@ void Molecule::read(int flag)
|
|||
error->all(FLERR,"Molecule file has no Body Doubles section");
|
||||
}
|
||||
|
||||
// auto-generate special bonds
|
||||
// auto-generate special bonds if needed and not in file
|
||||
// set maxspecial on first pass, so allocate() has a size
|
||||
|
||||
if (bondflag && !specialflag) {
|
||||
if (bondflag && specialflag == 0) {
|
||||
maxspecial = atom->maxspecial;
|
||||
if (flag) {
|
||||
special_generate();
|
||||
specialflag = 1;
|
||||
nspecialflag = 1;
|
||||
maxspecial = atom->maxspecial;
|
||||
if (flag) special_generate();
|
||||
}
|
||||
}
|
||||
|
||||
// body particle must have natom = 1
|
||||
|
|
Loading…
Reference in New Issue