forked from lijiext/lammps
we must initialize the number of types with any "extra" values
so far, the "extra" value will only be applied if the "types" line is present in the header. if not, the "extra" value is ignored. now will first apply this and then lets it be overwritten in case a "types" line is present in the header.
This commit is contained in:
parent
a6df6cf84c
commit
c01ff34785
|
@ -917,6 +917,17 @@ void ReadData::header(int firstpass)
|
|||
int n;
|
||||
char *ptr;
|
||||
|
||||
// initialize type counts by the "extra" numbers so they get counted
|
||||
// in case the corresponding "types" line is missing and thus the extra
|
||||
// value will not be processed.
|
||||
if (addflag == NONE) {
|
||||
atom->ntypes = extra_atom_types;
|
||||
atom->nbondtypes = extra_bond_types;
|
||||
atom->nangletypes = extra_angle_types;
|
||||
atom->ndihedraltypes = extra_dihedral_types;
|
||||
atom->nimpropertypes = extra_improper_types;
|
||||
}
|
||||
|
||||
// customize for new sections
|
||||
|
||||
const char *section_keywords[NSECTIONS] =
|
||||
|
|
Loading…
Reference in New Issue