forked from lijiext/lammps
Merge pull request #2388 from jrgissing/molecule_fragments_check
molecule: findfragments correction
This commit is contained in:
commit
85fe94a6dd
|
@ -5708,6 +5708,9 @@ Doc page with :doc:`WARNING messages <Errors_warnings>`
|
|||
*Molecule file has dihedrals but no ndihedrals setting*
|
||||
Self-explanatory.
|
||||
|
||||
*Molecule file has fragments but no nfragments setting*
|
||||
Self-explanatory.
|
||||
|
||||
*Molecule file has impropers but no nimpropers setting*
|
||||
Self-explanatory.
|
||||
|
||||
|
@ -5717,6 +5720,9 @@ Doc page with :doc:`WARNING messages <Errors_warnings>`
|
|||
*Molecule file has no Body Integers section*
|
||||
Self-explanatory.
|
||||
|
||||
*Molecule file has no Fragments section*
|
||||
Self-explanatory.
|
||||
|
||||
*Molecule file has special flags but no bonds*
|
||||
Self-explanatory.
|
||||
|
||||
|
|
|
@ -535,6 +535,8 @@ void Molecule::read(int flag)
|
|||
if (flag) molecules(line);
|
||||
else skip_lines(natoms,line);
|
||||
} else if (strcmp(keyword,"Fragments") == 0) {
|
||||
if (nfragments == 0)
|
||||
error->all(FLERR,"Molecule file has fragments but no nfragments setting");
|
||||
fragmentflag = 1;
|
||||
if (flag) fragments(line);
|
||||
else skip_lines(nfragments,line);
|
||||
|
@ -634,6 +636,8 @@ void Molecule::read(int flag)
|
|||
error->all(FLERR,"Molecule file has no Body Integers section");
|
||||
if (bodyflag && ndbody && dbodyflag == 0)
|
||||
error->all(FLERR,"Molecule file has no Body Doubles section");
|
||||
if (nfragments > 0 && !fragmentflag)
|
||||
error->all(FLERR,"Molecule file has no Fragments section");
|
||||
}
|
||||
|
||||
// auto-generate special bonds if needed and not in file
|
||||
|
@ -1691,6 +1695,7 @@ void Molecule::initialize()
|
|||
nmolecules = 1;
|
||||
nbondtypes = nangletypes = ndihedraltypes = nimpropertypes = 0;
|
||||
nibody = ndbody = 0;
|
||||
nfragments = 0;
|
||||
|
||||
bond_per_atom = angle_per_atom = dihedral_per_atom = improper_per_atom = 0;
|
||||
maxspecial = 0;
|
||||
|
|
|
@ -241,6 +241,10 @@ E: Molecule file has impropers but no nimpropers setting
|
|||
|
||||
Self-explanatory.
|
||||
|
||||
E: Molecule file has fragments but no nfragments setting
|
||||
|
||||
Self-explanatory.
|
||||
|
||||
E: Molecule file shake flags not before shake atoms
|
||||
|
||||
The order of the two sections is important.
|
||||
|
@ -277,6 +281,10 @@ E: Molecule file has no Body Doubles section
|
|||
|
||||
Self-explanatory.
|
||||
|
||||
E: Molecule file has no Fragments section
|
||||
|
||||
Self-explanatory.
|
||||
|
||||
E: Cannot auto-generate special bonds before simulation box is defined
|
||||
|
||||
UNDOCUMENTED
|
||||
|
|
Loading…
Reference in New Issue