remove TAGINT_FORMAT from ntopo styles
This commit is contained in:
@ -21,6 +21,7 @@
|
|||||||
#include "thermo.h"
|
#include "thermo.h"
|
||||||
#include "memory.h"
|
#include "memory.h"
|
||||||
#include "error.h"
|
#include "error.h"
|
||||||
|
#include "fmt/format.h"
|
||||||
|
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
@ -58,15 +59,11 @@ void NTopoAngleAll::build()
|
|||||||
atom3 = atom->map(angle_atom3[i][m]);
|
atom3 = atom->map(angle_atom3[i][m]);
|
||||||
if (atom1 == -1 || atom2 == -1 || atom3 == -1) {
|
if (atom1 == -1 || atom2 == -1 || atom3 == -1) {
|
||||||
nmissing++;
|
nmissing++;
|
||||||
if (lostbond == Thermo::ERROR) {
|
if (lostbond == Thermo::ERROR)
|
||||||
char str[128];
|
error->one(FLERR,fmt::format("Angle atoms {} {} {} missing on "
|
||||||
sprintf(str,"Angle atoms "
|
"proc {} at step {}",angle_atom1[i][m],
|
||||||
TAGINT_FORMAT " " TAGINT_FORMAT " " TAGINT_FORMAT
|
angle_atom2[i][m],angle_atom3[i][m],
|
||||||
" missing on proc %d at step " BIGINT_FORMAT,
|
me,update->ntimestep));
|
||||||
angle_atom1[i][m],angle_atom2[i][m],angle_atom3[i][m],
|
|
||||||
me,update->ntimestep);
|
|
||||||
error->one(FLERR,str);
|
|
||||||
}
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
atom1 = domain->closest_image(i,atom1);
|
atom1 = domain->closest_image(i,atom1);
|
||||||
@ -90,10 +87,7 @@ void NTopoAngleAll::build()
|
|||||||
|
|
||||||
int all;
|
int all;
|
||||||
MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world);
|
MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world);
|
||||||
if (all) {
|
if (all && (me == 0))
|
||||||
char str[128];
|
error->warning(FLERR,fmt::format("Angle atoms missing at step {}",
|
||||||
sprintf(str,
|
update->ntimestep));
|
||||||
"Angle atoms missing at step " BIGINT_FORMAT,update->ntimestep);
|
|
||||||
if (me == 0) error->warning(FLERR,str);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -21,6 +21,7 @@
|
|||||||
#include "thermo.h"
|
#include "thermo.h"
|
||||||
#include "memory.h"
|
#include "memory.h"
|
||||||
#include "error.h"
|
#include "error.h"
|
||||||
|
#include "fmt/format.h"
|
||||||
|
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
@ -59,15 +60,11 @@ void NTopoAnglePartial::build()
|
|||||||
atom3 = atom->map(angle_atom3[i][m]);
|
atom3 = atom->map(angle_atom3[i][m]);
|
||||||
if (atom1 == -1 || atom2 == -1 || atom3 == -1) {
|
if (atom1 == -1 || atom2 == -1 || atom3 == -1) {
|
||||||
nmissing++;
|
nmissing++;
|
||||||
if (lostbond == Thermo::ERROR) {
|
if (lostbond == Thermo::ERROR)
|
||||||
char str[128];
|
error->one(FLERR,fmt::format("Angle atoms {} {} {} missing on "
|
||||||
sprintf(str,"Angle atoms "
|
"proc {} at step {}",angle_atom1[i][m],
|
||||||
TAGINT_FORMAT " " TAGINT_FORMAT " " TAGINT_FORMAT
|
angle_atom2[i][m],angle_atom3[i][m],
|
||||||
" missing on proc %d at step " BIGINT_FORMAT,
|
me,update->ntimestep));
|
||||||
angle_atom1[i][m],angle_atom2[i][m],angle_atom3[i][m],
|
|
||||||
me,update->ntimestep);
|
|
||||||
error->one(FLERR,str);
|
|
||||||
}
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
atom1 = domain->closest_image(i,atom1);
|
atom1 = domain->closest_image(i,atom1);
|
||||||
@ -91,10 +88,7 @@ void NTopoAnglePartial::build()
|
|||||||
|
|
||||||
int all;
|
int all;
|
||||||
MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world);
|
MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world);
|
||||||
if (all) {
|
if (all && (me == 0))
|
||||||
char str[128];
|
error->warning(FLERR,fmt::format("Angle atoms missing at step {}",
|
||||||
sprintf(str,
|
update->ntimestep));
|
||||||
"Angle atoms missing at step " BIGINT_FORMAT,update->ntimestep);
|
|
||||||
if (me == 0) error->warning(FLERR,str);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -23,6 +23,7 @@
|
|||||||
#include "molecule.h"
|
#include "molecule.h"
|
||||||
#include "memory.h"
|
#include "memory.h"
|
||||||
#include "error.h"
|
#include "error.h"
|
||||||
|
#include "fmt/format.h"
|
||||||
|
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
@ -76,16 +77,13 @@ void NTopoAngleTemplate::build()
|
|||||||
atom3 = atom->map(angle_atom3[iatom][m]+tagprev);
|
atom3 = atom->map(angle_atom3[iatom][m]+tagprev);
|
||||||
if (atom1 == -1 || atom2 == -1 || atom3 == -1) {
|
if (atom1 == -1 || atom2 == -1 || atom3 == -1) {
|
||||||
nmissing++;
|
nmissing++;
|
||||||
if (lostbond == Thermo::ERROR) {
|
if (lostbond == Thermo::ERROR)
|
||||||
char str[128];
|
error->one(FLERR,fmt::format("Angle atoms {} {} {} missing on "
|
||||||
sprintf(str,"Angle atoms "
|
"proc {} at step {}",
|
||||||
TAGINT_FORMAT " " TAGINT_FORMAT " " TAGINT_FORMAT
|
angle_atom1[iatom][m]+tagprev,
|
||||||
" missing on proc %d at step " BIGINT_FORMAT,
|
angle_atom2[iatom][m]+tagprev,
|
||||||
angle_atom1[iatom][m]+tagprev,angle_atom2[iatom][m]+tagprev,
|
angle_atom3[iatom][m]+tagprev,
|
||||||
angle_atom3[iatom][m]+tagprev,
|
me,update->ntimestep));
|
||||||
me,update->ntimestep);
|
|
||||||
error->one(FLERR,str);
|
|
||||||
}
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
atom1 = domain->closest_image(i,atom1);
|
atom1 = domain->closest_image(i,atom1);
|
||||||
@ -110,10 +108,7 @@ void NTopoAngleTemplate::build()
|
|||||||
|
|
||||||
int all;
|
int all;
|
||||||
MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world);
|
MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world);
|
||||||
if (all) {
|
if (all && (me == 0))
|
||||||
char str[128];
|
error->warning(FLERR,fmt::format("Angle atoms missing at step {}",
|
||||||
sprintf(str,
|
update->ntimestep));
|
||||||
"Angle atoms missing at step " BIGINT_FORMAT,update->ntimestep);
|
|
||||||
if (me == 0) error->warning(FLERR,str);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -21,6 +21,7 @@
|
|||||||
#include "thermo.h"
|
#include "thermo.h"
|
||||||
#include "memory.h"
|
#include "memory.h"
|
||||||
#include "error.h"
|
#include "error.h"
|
||||||
|
#include "fmt/format.h"
|
||||||
|
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
@ -55,13 +56,10 @@ void NTopoBondAll::build()
|
|||||||
atom1 = atom->map(bond_atom[i][m]);
|
atom1 = atom->map(bond_atom[i][m]);
|
||||||
if (atom1 == -1) {
|
if (atom1 == -1) {
|
||||||
nmissing++;
|
nmissing++;
|
||||||
if (lostbond == Thermo::ERROR) {
|
if (lostbond == Thermo::ERROR)
|
||||||
char str[128];
|
error->one(FLERR,fmt::format("Bond atoms {} {} missing on "
|
||||||
sprintf(str,"Bond atoms " TAGINT_FORMAT " " TAGINT_FORMAT
|
"proc {} at step {}",tag[i],
|
||||||
" missing on proc %d at step " BIGINT_FORMAT,
|
bond_atom[i][m],me,update->ntimestep));
|
||||||
tag[i],bond_atom[i][m],me,update->ntimestep);
|
|
||||||
error->one(FLERR,str);
|
|
||||||
}
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
atom1 = domain->closest_image(i,atom1);
|
atom1 = domain->closest_image(i,atom1);
|
||||||
@ -82,10 +80,7 @@ void NTopoBondAll::build()
|
|||||||
|
|
||||||
int all;
|
int all;
|
||||||
MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world);
|
MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world);
|
||||||
if (all) {
|
if (all && (me == 0))
|
||||||
char str[128];
|
error->warning(FLERR,fmt::format("Bond atoms missing at step {}",
|
||||||
sprintf(str,
|
update->ntimestep));
|
||||||
"Bond atoms missing at step " BIGINT_FORMAT,update->ntimestep);
|
|
||||||
if (me == 0) error->warning(FLERR,str);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -21,6 +21,7 @@
|
|||||||
#include "thermo.h"
|
#include "thermo.h"
|
||||||
#include "memory.h"
|
#include "memory.h"
|
||||||
#include "error.h"
|
#include "error.h"
|
||||||
|
#include "fmt/format.h"
|
||||||
|
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
@ -56,13 +57,10 @@ void NTopoBondPartial::build()
|
|||||||
atom1 = atom->map(bond_atom[i][m]);
|
atom1 = atom->map(bond_atom[i][m]);
|
||||||
if (atom1 == -1) {
|
if (atom1 == -1) {
|
||||||
nmissing++;
|
nmissing++;
|
||||||
if (lostbond == Thermo::ERROR) {
|
if (lostbond == Thermo::ERROR)
|
||||||
char str[128];
|
error->one(FLERR,fmt::format("Bond atoms {} {} missing on "
|
||||||
sprintf(str,"Bond atoms " TAGINT_FORMAT " " TAGINT_FORMAT
|
"proc {} at step {}",tag[i],
|
||||||
" missing on proc %d at step " BIGINT_FORMAT,
|
bond_atom[i][m],me,update->ntimestep));
|
||||||
tag[i],bond_atom[i][m],me,update->ntimestep);
|
|
||||||
error->one(FLERR,str);
|
|
||||||
}
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
atom1 = domain->closest_image(i,atom1);
|
atom1 = domain->closest_image(i,atom1);
|
||||||
@ -83,10 +81,7 @@ void NTopoBondPartial::build()
|
|||||||
|
|
||||||
int all;
|
int all;
|
||||||
MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world);
|
MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world);
|
||||||
if (all) {
|
if (all && (me == 0))
|
||||||
char str[128];
|
error->warning(FLERR,fmt::format("Bond atoms missing at step {}",
|
||||||
sprintf(str,
|
update->ntimestep));
|
||||||
"Bond atoms missing at step " BIGINT_FORMAT,update->ntimestep);
|
|
||||||
if (me == 0) error->warning(FLERR,str);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -23,6 +23,7 @@
|
|||||||
#include "molecule.h"
|
#include "molecule.h"
|
||||||
#include "memory.h"
|
#include "memory.h"
|
||||||
#include "error.h"
|
#include "error.h"
|
||||||
|
#include "fmt/format.h"
|
||||||
|
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
@ -72,13 +73,11 @@ void NTopoBondTemplate::build()
|
|||||||
atom1 = atom->map(bond_atom[iatom][m]+tagprev);
|
atom1 = atom->map(bond_atom[iatom][m]+tagprev);
|
||||||
if (atom1 == -1) {
|
if (atom1 == -1) {
|
||||||
nmissing++;
|
nmissing++;
|
||||||
if (lostbond == Thermo::ERROR) {
|
if (lostbond == Thermo::ERROR)
|
||||||
char str[128];
|
error->one(FLERR,fmt::format("Bond atoms {} {} missing on "
|
||||||
sprintf(str,"Bond atoms " TAGINT_FORMAT " " TAGINT_FORMAT
|
"proc {} at step {}",tag[i],
|
||||||
" missing on proc %d at step " BIGINT_FORMAT,
|
bond_atom[iatom][m]+tagprev,
|
||||||
tag[i],bond_atom[iatom][m]+tagprev,me,update->ntimestep);
|
me,update->ntimestep));
|
||||||
error->one(FLERR,str);
|
|
||||||
}
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
atom1 = domain->closest_image(i,atom1);
|
atom1 = domain->closest_image(i,atom1);
|
||||||
@ -100,10 +99,7 @@ void NTopoBondTemplate::build()
|
|||||||
|
|
||||||
int all;
|
int all;
|
||||||
MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world);
|
MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world);
|
||||||
if (all) {
|
if (all && (me == 0))
|
||||||
char str[128];
|
error->warning(FLERR,fmt::format("Bond atoms missing at step {}",
|
||||||
sprintf(str,
|
update->ntimestep));
|
||||||
"Bond atoms missing at step " BIGINT_FORMAT,update->ntimestep);
|
|
||||||
if (me == 0) error->warning(FLERR,str);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -21,6 +21,7 @@
|
|||||||
#include "thermo.h"
|
#include "thermo.h"
|
||||||
#include "memory.h"
|
#include "memory.h"
|
||||||
#include "error.h"
|
#include "error.h"
|
||||||
|
#include "fmt/format.h"
|
||||||
|
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
@ -60,17 +61,12 @@ void NTopoDihedralAll::build()
|
|||||||
atom4 = atom->map(dihedral_atom4[i][m]);
|
atom4 = atom->map(dihedral_atom4[i][m]);
|
||||||
if (atom1 == -1 || atom2 == -1 || atom3 == -1 || atom4 == -1) {
|
if (atom1 == -1 || atom2 == -1 || atom3 == -1 || atom4 == -1) {
|
||||||
nmissing++;
|
nmissing++;
|
||||||
if (lostbond == Thermo::ERROR) {
|
if (lostbond == Thermo::ERROR)
|
||||||
char str[128];
|
error->one(FLERR,fmt::format("Dihedral atoms {} {} {} {} missing on "
|
||||||
sprintf(str,"Dihedral atoms "
|
"proc {} at step {}",
|
||||||
TAGINT_FORMAT " " TAGINT_FORMAT " "
|
dihedral_atom1[i][m],dihedral_atom2[i][m],
|
||||||
TAGINT_FORMAT " " TAGINT_FORMAT
|
dihedral_atom3[i][m],dihedral_atom4[i][m],
|
||||||
" missing on proc %d at step " BIGINT_FORMAT,
|
me,update->ntimestep));
|
||||||
dihedral_atom1[i][m],dihedral_atom2[i][m],
|
|
||||||
dihedral_atom3[i][m],dihedral_atom4[i][m],
|
|
||||||
me,update->ntimestep);
|
|
||||||
error->one(FLERR,str);
|
|
||||||
}
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
atom1 = domain->closest_image(i,atom1);
|
atom1 = domain->closest_image(i,atom1);
|
||||||
@ -97,10 +93,7 @@ void NTopoDihedralAll::build()
|
|||||||
|
|
||||||
int all;
|
int all;
|
||||||
MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world);
|
MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world);
|
||||||
if (all) {
|
if (all && (me == 0))
|
||||||
char str[128];
|
error->warning(FLERR,fmt::format("Dihedral atoms missing at step {}",
|
||||||
sprintf(str,
|
update->ntimestep));
|
||||||
"Dihedral atoms missing at step " BIGINT_FORMAT,update->ntimestep);
|
|
||||||
if (me == 0) error->warning(FLERR,str);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -21,6 +21,7 @@
|
|||||||
#include "thermo.h"
|
#include "thermo.h"
|
||||||
#include "memory.h"
|
#include "memory.h"
|
||||||
#include "error.h"
|
#include "error.h"
|
||||||
|
#include "fmt/format.h"
|
||||||
|
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
@ -62,17 +63,12 @@ void NTopoDihedralPartial::build()
|
|||||||
atom4 = atom->map(dihedral_atom4[i][m]);
|
atom4 = atom->map(dihedral_atom4[i][m]);
|
||||||
if (atom1 == -1 || atom2 == -1 || atom3 == -1 || atom4 == -1) {
|
if (atom1 == -1 || atom2 == -1 || atom3 == -1 || atom4 == -1) {
|
||||||
nmissing++;
|
nmissing++;
|
||||||
if (lostbond == Thermo::ERROR) {
|
if (lostbond == Thermo::ERROR)
|
||||||
char str[128];
|
error->one(FLERR,fmt::format("Dihedral atoms {} {} {} {} missing on "
|
||||||
sprintf(str,"Dihedral atoms "
|
"proc {} at step {}",
|
||||||
TAGINT_FORMAT " " TAGINT_FORMAT " "
|
dihedral_atom1[i][m],dihedral_atom2[i][m],
|
||||||
TAGINT_FORMAT " " TAGINT_FORMAT
|
dihedral_atom3[i][m],dihedral_atom4[i][m],
|
||||||
" missing on proc %d at step " BIGINT_FORMAT,
|
me,update->ntimestep));
|
||||||
dihedral_atom1[i][m],dihedral_atom2[i][m],
|
|
||||||
dihedral_atom3[i][m],dihedral_atom4[i][m],
|
|
||||||
me,update->ntimestep);
|
|
||||||
error->one(FLERR,str);
|
|
||||||
}
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
atom1 = domain->closest_image(i,atom1);
|
atom1 = domain->closest_image(i,atom1);
|
||||||
@ -99,10 +95,7 @@ void NTopoDihedralPartial::build()
|
|||||||
|
|
||||||
int all;
|
int all;
|
||||||
MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world);
|
MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world);
|
||||||
if (all) {
|
if (all && (me == 0))
|
||||||
char str[128];
|
error->warning(FLERR,fmt::format("Dihedral atoms missing at step {}",
|
||||||
sprintf(str,
|
update->ntimestep));
|
||||||
"Dihedral atoms missing at step " BIGINT_FORMAT,update->ntimestep);
|
|
||||||
if (me == 0) error->warning(FLERR,str);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -23,6 +23,7 @@
|
|||||||
#include "molecule.h"
|
#include "molecule.h"
|
||||||
#include "memory.h"
|
#include "memory.h"
|
||||||
#include "error.h"
|
#include "error.h"
|
||||||
|
#include "fmt/format.h"
|
||||||
|
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
@ -78,19 +79,14 @@ void NTopoDihedralTemplate::build()
|
|||||||
atom4 = atom->map(dihedral_atom4[iatom][m]+tagprev);
|
atom4 = atom->map(dihedral_atom4[iatom][m]+tagprev);
|
||||||
if (atom1 == -1 || atom2 == -1 || atom3 == -1 || atom4 == -1) {
|
if (atom1 == -1 || atom2 == -1 || atom3 == -1 || atom4 == -1) {
|
||||||
nmissing++;
|
nmissing++;
|
||||||
if (lostbond == Thermo::ERROR) {
|
if (lostbond == Thermo::ERROR)
|
||||||
char str[128];
|
error->one(FLERR,fmt::format("Dihedral atoms {} {} {} {} missing on "
|
||||||
sprintf(str,"Dihedral atoms "
|
"proc {} at step {}",
|
||||||
TAGINT_FORMAT " " TAGINT_FORMAT " "
|
dihedral_atom1[iatom][m]+tagprev,
|
||||||
TAGINT_FORMAT " " TAGINT_FORMAT
|
dihedral_atom2[iatom][m]+tagprev,
|
||||||
" missing on proc %d at step " BIGINT_FORMAT,
|
dihedral_atom3[iatom][m]+tagprev,
|
||||||
dihedral_atom1[iatom][m]+tagprev,
|
dihedral_atom4[iatom][m]+tagprev,
|
||||||
dihedral_atom2[iatom][m]+tagprev,
|
me,update->ntimestep));
|
||||||
dihedral_atom3[iatom][m]+tagprev,
|
|
||||||
dihedral_atom4[iatom][m]+tagprev,
|
|
||||||
me,update->ntimestep);
|
|
||||||
error->one(FLERR,str);
|
|
||||||
}
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
atom1 = domain->closest_image(i,atom1);
|
atom1 = domain->closest_image(i,atom1);
|
||||||
@ -118,10 +114,7 @@ void NTopoDihedralTemplate::build()
|
|||||||
|
|
||||||
int all;
|
int all;
|
||||||
MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world);
|
MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world);
|
||||||
if (all) {
|
if (all && (me == 0))
|
||||||
char str[128];
|
error->warning(FLERR,fmt::format("Dihedral atoms missing at step {}",
|
||||||
sprintf(str,
|
update->ntimestep));
|
||||||
"Dihedral atoms missing at step " BIGINT_FORMAT,update->ntimestep);
|
|
||||||
if (me == 0) error->warning(FLERR,str);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -21,6 +21,7 @@
|
|||||||
#include "thermo.h"
|
#include "thermo.h"
|
||||||
#include "memory.h"
|
#include "memory.h"
|
||||||
#include "error.h"
|
#include "error.h"
|
||||||
|
#include "fmt/format.h"
|
||||||
|
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
@ -60,23 +61,18 @@ void NTopoImproperAll::build()
|
|||||||
atom4 = atom->map(improper_atom4[i][m]);
|
atom4 = atom->map(improper_atom4[i][m]);
|
||||||
if (atom1 == -1 || atom2 == -1 || atom3 == -1 || atom4 == -1) {
|
if (atom1 == -1 || atom2 == -1 || atom3 == -1 || atom4 == -1) {
|
||||||
nmissing++;
|
nmissing++;
|
||||||
if (lostbond == Thermo::ERROR) {
|
if (lostbond == Thermo::ERROR)
|
||||||
char str[128];
|
error->one(FLERR,fmt::format("Improper atoms {} {} {} {} missing on "
|
||||||
sprintf(str,"Improper atoms "
|
"proc {} at step {}",
|
||||||
TAGINT_FORMAT " " TAGINT_FORMAT " "
|
improper_atom1[i][m],improper_atom2[i][m],
|
||||||
TAGINT_FORMAT " " TAGINT_FORMAT
|
improper_atom3[i][m],improper_atom4[i][m],
|
||||||
" missing on proc %d at step " BIGINT_FORMAT,
|
me,update->ntimestep));
|
||||||
improper_atom1[i][m],improper_atom2[i][m],
|
|
||||||
improper_atom3[i][m],improper_atom4[i][m],
|
|
||||||
me,update->ntimestep);
|
|
||||||
error->one(FLERR,str);
|
|
||||||
}
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
atom1 = domain->closest_image(i,atom1);
|
atom1 = domain->closest_image(i,atom1);
|
||||||
atom2 = domain->closest_image(i,atom2);
|
atom2 = domain->closest_image(i,atom2);
|
||||||
atom3 = domain->closest_image(i,atom3);
|
atom3 = domain->closest_image(i,atom3);
|
||||||
atom4 = domain-> closest_image(i,atom4);
|
atom4 = domain->closest_image(i,atom4);
|
||||||
if (newton_bond ||
|
if (newton_bond ||
|
||||||
(i <= atom1 && i <= atom2 && i <= atom3 && i <= atom4)) {
|
(i <= atom1 && i <= atom2 && i <= atom3 && i <= atom4)) {
|
||||||
if (nimproperlist == maximproper) {
|
if (nimproperlist == maximproper) {
|
||||||
@ -97,10 +93,7 @@ void NTopoImproperAll::build()
|
|||||||
|
|
||||||
int all;
|
int all;
|
||||||
MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world);
|
MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world);
|
||||||
if (all) {
|
if (all && (me == 0))
|
||||||
char str[128];
|
error->warning(FLERR,fmt::format("Improper atoms missing at step {}",
|
||||||
sprintf(str,
|
update->ntimestep));
|
||||||
"Improper atoms missing at step " BIGINT_FORMAT,update->ntimestep);
|
|
||||||
if (me == 0) error->warning(FLERR,str);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -21,6 +21,7 @@
|
|||||||
#include "thermo.h"
|
#include "thermo.h"
|
||||||
#include "memory.h"
|
#include "memory.h"
|
||||||
#include "error.h"
|
#include "error.h"
|
||||||
|
#include "fmt/format.h"
|
||||||
|
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
@ -62,17 +63,14 @@ void NTopoImproperPartial::build()
|
|||||||
atom4 = atom->map(improper_atom4[i][m]);
|
atom4 = atom->map(improper_atom4[i][m]);
|
||||||
if (atom1 == -1 || atom2 == -1 || atom3 == -1 || atom4 == -1) {
|
if (atom1 == -1 || atom2 == -1 || atom3 == -1 || atom4 == -1) {
|
||||||
nmissing++;
|
nmissing++;
|
||||||
if (lostbond == Thermo::ERROR) {
|
if (lostbond == Thermo::ERROR)
|
||||||
char str[128];
|
error->one(FLERR,fmt::format("Improper atoms {} {} {} {}"
|
||||||
sprintf(str,"Improper atoms "
|
" missing on proc {} at step {}",
|
||||||
TAGINT_FORMAT " " TAGINT_FORMAT " "
|
improper_atom1[i][m],
|
||||||
TAGINT_FORMAT " " TAGINT_FORMAT
|
improper_atom2[i][m],
|
||||||
" missing on proc %d at step " BIGINT_FORMAT,
|
improper_atom3[i][m],
|
||||||
improper_atom1[i][m],improper_atom2[i][m],
|
improper_atom4[i][m],
|
||||||
improper_atom3[i][m],improper_atom4[i][m],
|
me,update->ntimestep));
|
||||||
me,update->ntimestep);
|
|
||||||
error->one(FLERR,str);
|
|
||||||
}
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
atom1 = domain->closest_image(i,atom1);
|
atom1 = domain->closest_image(i,atom1);
|
||||||
|
|||||||
@ -23,6 +23,7 @@
|
|||||||
#include "molecule.h"
|
#include "molecule.h"
|
||||||
#include "memory.h"
|
#include "memory.h"
|
||||||
#include "error.h"
|
#include "error.h"
|
||||||
|
#include "fmt/format.h"
|
||||||
|
|
||||||
using namespace LAMMPS_NS;
|
using namespace LAMMPS_NS;
|
||||||
|
|
||||||
@ -78,25 +79,20 @@ void NTopoImproperTemplate::build()
|
|||||||
atom4 = atom->map(improper_atom4[iatom][m]+tagprev);
|
atom4 = atom->map(improper_atom4[iatom][m]+tagprev);
|
||||||
if (atom1 == -1 || atom2 == -1 || atom3 == -1 || atom4 == -1) {
|
if (atom1 == -1 || atom2 == -1 || atom3 == -1 || atom4 == -1) {
|
||||||
nmissing++;
|
nmissing++;
|
||||||
if (lostbond == Thermo::ERROR) {
|
if (lostbond == Thermo::ERROR)
|
||||||
char str[128];
|
error->one(FLERR,fmt::format("Improper atoms {} {} {} {}"
|
||||||
sprintf(str,"Improper atoms "
|
" missing on proc {} at step {}",
|
||||||
TAGINT_FORMAT " " TAGINT_FORMAT " "
|
improper_atom1[iatom][m]+tagprev,
|
||||||
TAGINT_FORMAT " " TAGINT_FORMAT
|
improper_atom2[iatom][m]+tagprev,
|
||||||
" missing on proc %d at step " BIGINT_FORMAT,
|
improper_atom3[iatom][m]+tagprev,
|
||||||
improper_atom1[iatom][m]+tagprev,
|
improper_atom4[iatom][m]+tagprev,
|
||||||
improper_atom2[iatom][m]+tagprev,
|
me,update->ntimestep));
|
||||||
improper_atom3[iatom][m]+tagprev,
|
|
||||||
improper_atom4[iatom][m]+tagprev,
|
|
||||||
me,update->ntimestep);
|
|
||||||
error->one(FLERR,str);
|
|
||||||
}
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
atom1 = domain->closest_image(i,atom1);
|
atom1 = domain->closest_image(i,atom1);
|
||||||
atom2 = domain->closest_image(i,atom2);
|
atom2 = domain->closest_image(i,atom2);
|
||||||
atom3 = domain->closest_image(i,atom3);
|
atom3 = domain->closest_image(i,atom3);
|
||||||
atom4 = domain-> closest_image(i,atom4);
|
atom4 = domain->closest_image(i,atom4);
|
||||||
if (newton_bond ||
|
if (newton_bond ||
|
||||||
(i <= atom1 && i <= atom2 && i <= atom3 && i <= atom4)) {
|
(i <= atom1 && i <= atom2 && i <= atom3 && i <= atom4)) {
|
||||||
if (nimproperlist == maximproper) {
|
if (nimproperlist == maximproper) {
|
||||||
@ -118,10 +114,7 @@ void NTopoImproperTemplate::build()
|
|||||||
|
|
||||||
int all;
|
int all;
|
||||||
MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world);
|
MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world);
|
||||||
if (all) {
|
if (all && (me == 0))
|
||||||
char str[128];
|
error->warning(FLERR,fmt::format("Improper atoms missing at step {}",
|
||||||
sprintf(str,
|
update->ntimestep));
|
||||||
"Improper atoms missing at step " BIGINT_FORMAT,update->ntimestep);
|
|
||||||
if (me == 0) error->warning(FLERR,str);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user