remove TAGINT_FORMAT from ntopo styles

This commit is contained in:
Axel Kohlmeyer 2020-06-05 08:45:18 -04:00
parent 0ee1393955
commit d874e8a2be
No known key found for this signature in database
GPG Key ID: D9B44E93BF0C375A
12 changed files with 119 additions and 187 deletions

View File

@ -21,6 +21,7 @@
#include "thermo.h"
#include "memory.h"
#include "error.h"
#include "fmt/format.h"
using namespace LAMMPS_NS;
@ -58,15 +59,11 @@ void NTopoAngleAll::build()
atom3 = atom->map(angle_atom3[i][m]);
if (atom1 == -1 || atom2 == -1 || atom3 == -1) {
nmissing++;
if (lostbond == Thermo::ERROR) {
char str[128];
sprintf(str,"Angle atoms "
TAGINT_FORMAT " " TAGINT_FORMAT " " TAGINT_FORMAT
" missing on proc %d at step " BIGINT_FORMAT,
angle_atom1[i][m],angle_atom2[i][m],angle_atom3[i][m],
me,update->ntimestep);
error->one(FLERR,str);
}
if (lostbond == Thermo::ERROR)
error->one(FLERR,fmt::format("Angle atoms {} {} {} missing on "
"proc {} at step {}",angle_atom1[i][m],
angle_atom2[i][m],angle_atom3[i][m],
me,update->ntimestep));
continue;
}
atom1 = domain->closest_image(i,atom1);
@ -90,10 +87,7 @@ void NTopoAngleAll::build()
int all;
MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world);
if (all) {
char str[128];
sprintf(str,
"Angle atoms missing at step " BIGINT_FORMAT,update->ntimestep);
if (me == 0) error->warning(FLERR,str);
}
if (all && (me == 0))
error->warning(FLERR,fmt::format("Angle atoms missing at step {}",
update->ntimestep));
}

View File

@ -21,6 +21,7 @@
#include "thermo.h"
#include "memory.h"
#include "error.h"
#include "fmt/format.h"
using namespace LAMMPS_NS;
@ -59,15 +60,11 @@ void NTopoAnglePartial::build()
atom3 = atom->map(angle_atom3[i][m]);
if (atom1 == -1 || atom2 == -1 || atom3 == -1) {
nmissing++;
if (lostbond == Thermo::ERROR) {
char str[128];
sprintf(str,"Angle atoms "
TAGINT_FORMAT " " TAGINT_FORMAT " " TAGINT_FORMAT
" missing on proc %d at step " BIGINT_FORMAT,
angle_atom1[i][m],angle_atom2[i][m],angle_atom3[i][m],
me,update->ntimestep);
error->one(FLERR,str);
}
if (lostbond == Thermo::ERROR)
error->one(FLERR,fmt::format("Angle atoms {} {} {} missing on "
"proc {} at step {}",angle_atom1[i][m],
angle_atom2[i][m],angle_atom3[i][m],
me,update->ntimestep));
continue;
}
atom1 = domain->closest_image(i,atom1);
@ -91,10 +88,7 @@ void NTopoAnglePartial::build()
int all;
MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world);
if (all) {
char str[128];
sprintf(str,
"Angle atoms missing at step " BIGINT_FORMAT,update->ntimestep);
if (me == 0) error->warning(FLERR,str);
}
if (all && (me == 0))
error->warning(FLERR,fmt::format("Angle atoms missing at step {}",
update->ntimestep));
}

View File

@ -23,6 +23,7 @@
#include "molecule.h"
#include "memory.h"
#include "error.h"
#include "fmt/format.h"
using namespace LAMMPS_NS;
@ -76,16 +77,13 @@ void NTopoAngleTemplate::build()
atom3 = atom->map(angle_atom3[iatom][m]+tagprev);
if (atom1 == -1 || atom2 == -1 || atom3 == -1) {
nmissing++;
if (lostbond == Thermo::ERROR) {
char str[128];
sprintf(str,"Angle atoms "
TAGINT_FORMAT " " TAGINT_FORMAT " " TAGINT_FORMAT
" missing on proc %d at step " BIGINT_FORMAT,
angle_atom1[iatom][m]+tagprev,angle_atom2[iatom][m]+tagprev,
angle_atom3[iatom][m]+tagprev,
me,update->ntimestep);
error->one(FLERR,str);
}
if (lostbond == Thermo::ERROR)
error->one(FLERR,fmt::format("Angle atoms {} {} {} missing on "
"proc {} at step {}",
angle_atom1[iatom][m]+tagprev,
angle_atom2[iatom][m]+tagprev,
angle_atom3[iatom][m]+tagprev,
me,update->ntimestep));
continue;
}
atom1 = domain->closest_image(i,atom1);
@ -110,10 +108,7 @@ void NTopoAngleTemplate::build()
int all;
MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world);
if (all) {
char str[128];
sprintf(str,
"Angle atoms missing at step " BIGINT_FORMAT,update->ntimestep);
if (me == 0) error->warning(FLERR,str);
}
if (all && (me == 0))
error->warning(FLERR,fmt::format("Angle atoms missing at step {}",
update->ntimestep));
}

View File

@ -21,6 +21,7 @@
#include "thermo.h"
#include "memory.h"
#include "error.h"
#include "fmt/format.h"
using namespace LAMMPS_NS;
@ -55,13 +56,10 @@ void NTopoBondAll::build()
atom1 = atom->map(bond_atom[i][m]);
if (atom1 == -1) {
nmissing++;
if (lostbond == Thermo::ERROR) {
char str[128];
sprintf(str,"Bond atoms " TAGINT_FORMAT " " TAGINT_FORMAT
" missing on proc %d at step " BIGINT_FORMAT,
tag[i],bond_atom[i][m],me,update->ntimestep);
error->one(FLERR,str);
}
if (lostbond == Thermo::ERROR)
error->one(FLERR,fmt::format("Bond atoms {} {} missing on "
"proc {} at step {}",tag[i],
bond_atom[i][m],me,update->ntimestep));
continue;
}
atom1 = domain->closest_image(i,atom1);
@ -82,10 +80,7 @@ void NTopoBondAll::build()
int all;
MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world);
if (all) {
char str[128];
sprintf(str,
"Bond atoms missing at step " BIGINT_FORMAT,update->ntimestep);
if (me == 0) error->warning(FLERR,str);
}
if (all && (me == 0))
error->warning(FLERR,fmt::format("Bond atoms missing at step {}",
update->ntimestep));
}

View File

@ -21,6 +21,7 @@
#include "thermo.h"
#include "memory.h"
#include "error.h"
#include "fmt/format.h"
using namespace LAMMPS_NS;
@ -56,13 +57,10 @@ void NTopoBondPartial::build()
atom1 = atom->map(bond_atom[i][m]);
if (atom1 == -1) {
nmissing++;
if (lostbond == Thermo::ERROR) {
char str[128];
sprintf(str,"Bond atoms " TAGINT_FORMAT " " TAGINT_FORMAT
" missing on proc %d at step " BIGINT_FORMAT,
tag[i],bond_atom[i][m],me,update->ntimestep);
error->one(FLERR,str);
}
if (lostbond == Thermo::ERROR)
error->one(FLERR,fmt::format("Bond atoms {} {} missing on "
"proc {} at step {}",tag[i],
bond_atom[i][m],me,update->ntimestep));
continue;
}
atom1 = domain->closest_image(i,atom1);
@ -83,10 +81,7 @@ void NTopoBondPartial::build()
int all;
MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world);
if (all) {
char str[128];
sprintf(str,
"Bond atoms missing at step " BIGINT_FORMAT,update->ntimestep);
if (me == 0) error->warning(FLERR,str);
}
if (all && (me == 0))
error->warning(FLERR,fmt::format("Bond atoms missing at step {}",
update->ntimestep));
}

View File

@ -23,6 +23,7 @@
#include "molecule.h"
#include "memory.h"
#include "error.h"
#include "fmt/format.h"
using namespace LAMMPS_NS;
@ -72,13 +73,11 @@ void NTopoBondTemplate::build()
atom1 = atom->map(bond_atom[iatom][m]+tagprev);
if (atom1 == -1) {
nmissing++;
if (lostbond == Thermo::ERROR) {
char str[128];
sprintf(str,"Bond atoms " TAGINT_FORMAT " " TAGINT_FORMAT
" missing on proc %d at step " BIGINT_FORMAT,
tag[i],bond_atom[iatom][m]+tagprev,me,update->ntimestep);
error->one(FLERR,str);
}
if (lostbond == Thermo::ERROR)
error->one(FLERR,fmt::format("Bond atoms {} {} missing on "
"proc {} at step {}",tag[i],
bond_atom[iatom][m]+tagprev,
me,update->ntimestep));
continue;
}
atom1 = domain->closest_image(i,atom1);
@ -100,10 +99,7 @@ void NTopoBondTemplate::build()
int all;
MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world);
if (all) {
char str[128];
sprintf(str,
"Bond atoms missing at step " BIGINT_FORMAT,update->ntimestep);
if (me == 0) error->warning(FLERR,str);
}
if (all && (me == 0))
error->warning(FLERR,fmt::format("Bond atoms missing at step {}",
update->ntimestep));
}

View File

@ -21,6 +21,7 @@
#include "thermo.h"
#include "memory.h"
#include "error.h"
#include "fmt/format.h"
using namespace LAMMPS_NS;
@ -60,17 +61,12 @@ void NTopoDihedralAll::build()
atom4 = atom->map(dihedral_atom4[i][m]);
if (atom1 == -1 || atom2 == -1 || atom3 == -1 || atom4 == -1) {
nmissing++;
if (lostbond == Thermo::ERROR) {
char str[128];
sprintf(str,"Dihedral atoms "
TAGINT_FORMAT " " TAGINT_FORMAT " "
TAGINT_FORMAT " " TAGINT_FORMAT
" missing on proc %d at step " BIGINT_FORMAT,
dihedral_atom1[i][m],dihedral_atom2[i][m],
dihedral_atom3[i][m],dihedral_atom4[i][m],
me,update->ntimestep);
error->one(FLERR,str);
}
if (lostbond == Thermo::ERROR)
error->one(FLERR,fmt::format("Dihedral atoms {} {} {} {} missing on "
"proc {} at step {}",
dihedral_atom1[i][m],dihedral_atom2[i][m],
dihedral_atom3[i][m],dihedral_atom4[i][m],
me,update->ntimestep));
continue;
}
atom1 = domain->closest_image(i,atom1);
@ -97,10 +93,7 @@ void NTopoDihedralAll::build()
int all;
MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world);
if (all) {
char str[128];
sprintf(str,
"Dihedral atoms missing at step " BIGINT_FORMAT,update->ntimestep);
if (me == 0) error->warning(FLERR,str);
}
if (all && (me == 0))
error->warning(FLERR,fmt::format("Dihedral atoms missing at step {}",
update->ntimestep));
}

View File

@ -21,6 +21,7 @@
#include "thermo.h"
#include "memory.h"
#include "error.h"
#include "fmt/format.h"
using namespace LAMMPS_NS;
@ -62,17 +63,12 @@ void NTopoDihedralPartial::build()
atom4 = atom->map(dihedral_atom4[i][m]);
if (atom1 == -1 || atom2 == -1 || atom3 == -1 || atom4 == -1) {
nmissing++;
if (lostbond == Thermo::ERROR) {
char str[128];
sprintf(str,"Dihedral atoms "
TAGINT_FORMAT " " TAGINT_FORMAT " "
TAGINT_FORMAT " " TAGINT_FORMAT
" missing on proc %d at step " BIGINT_FORMAT,
dihedral_atom1[i][m],dihedral_atom2[i][m],
dihedral_atom3[i][m],dihedral_atom4[i][m],
me,update->ntimestep);
error->one(FLERR,str);
}
if (lostbond == Thermo::ERROR)
error->one(FLERR,fmt::format("Dihedral atoms {} {} {} {} missing on "
"proc {} at step {}",
dihedral_atom1[i][m],dihedral_atom2[i][m],
dihedral_atom3[i][m],dihedral_atom4[i][m],
me,update->ntimestep));
continue;
}
atom1 = domain->closest_image(i,atom1);
@ -99,10 +95,7 @@ void NTopoDihedralPartial::build()
int all;
MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world);
if (all) {
char str[128];
sprintf(str,
"Dihedral atoms missing at step " BIGINT_FORMAT,update->ntimestep);
if (me == 0) error->warning(FLERR,str);
}
if (all && (me == 0))
error->warning(FLERR,fmt::format("Dihedral atoms missing at step {}",
update->ntimestep));
}

View File

@ -23,6 +23,7 @@
#include "molecule.h"
#include "memory.h"
#include "error.h"
#include "fmt/format.h"
using namespace LAMMPS_NS;
@ -78,19 +79,14 @@ void NTopoDihedralTemplate::build()
atom4 = atom->map(dihedral_atom4[iatom][m]+tagprev);
if (atom1 == -1 || atom2 == -1 || atom3 == -1 || atom4 == -1) {
nmissing++;
if (lostbond == Thermo::ERROR) {
char str[128];
sprintf(str,"Dihedral atoms "
TAGINT_FORMAT " " TAGINT_FORMAT " "
TAGINT_FORMAT " " TAGINT_FORMAT
" missing on proc %d at step " BIGINT_FORMAT,
dihedral_atom1[iatom][m]+tagprev,
dihedral_atom2[iatom][m]+tagprev,
dihedral_atom3[iatom][m]+tagprev,
dihedral_atom4[iatom][m]+tagprev,
me,update->ntimestep);
error->one(FLERR,str);
}
if (lostbond == Thermo::ERROR)
error->one(FLERR,fmt::format("Dihedral atoms {} {} {} {} missing on "
"proc {} at step {}",
dihedral_atom1[iatom][m]+tagprev,
dihedral_atom2[iatom][m]+tagprev,
dihedral_atom3[iatom][m]+tagprev,
dihedral_atom4[iatom][m]+tagprev,
me,update->ntimestep));
continue;
}
atom1 = domain->closest_image(i,atom1);
@ -118,10 +114,7 @@ void NTopoDihedralTemplate::build()
int all;
MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world);
if (all) {
char str[128];
sprintf(str,
"Dihedral atoms missing at step " BIGINT_FORMAT,update->ntimestep);
if (me == 0) error->warning(FLERR,str);
}
if (all && (me == 0))
error->warning(FLERR,fmt::format("Dihedral atoms missing at step {}",
update->ntimestep));
}

View File

@ -21,6 +21,7 @@
#include "thermo.h"
#include "memory.h"
#include "error.h"
#include "fmt/format.h"
using namespace LAMMPS_NS;
@ -60,23 +61,18 @@ void NTopoImproperAll::build()
atom4 = atom->map(improper_atom4[i][m]);
if (atom1 == -1 || atom2 == -1 || atom3 == -1 || atom4 == -1) {
nmissing++;
if (lostbond == Thermo::ERROR) {
char str[128];
sprintf(str,"Improper atoms "
TAGINT_FORMAT " " TAGINT_FORMAT " "
TAGINT_FORMAT " " TAGINT_FORMAT
" missing on proc %d at step " BIGINT_FORMAT,
improper_atom1[i][m],improper_atom2[i][m],
improper_atom3[i][m],improper_atom4[i][m],
me,update->ntimestep);
error->one(FLERR,str);
}
if (lostbond == Thermo::ERROR)
error->one(FLERR,fmt::format("Improper atoms {} {} {} {} missing on "
"proc {} at step {}",
improper_atom1[i][m],improper_atom2[i][m],
improper_atom3[i][m],improper_atom4[i][m],
me,update->ntimestep));
continue;
}
atom1 = domain->closest_image(i,atom1);
atom2 = domain->closest_image(i,atom2);
atom3 = domain->closest_image(i,atom3);
atom4 = domain-> closest_image(i,atom4);
atom4 = domain->closest_image(i,atom4);
if (newton_bond ||
(i <= atom1 && i <= atom2 && i <= atom3 && i <= atom4)) {
if (nimproperlist == maximproper) {
@ -97,10 +93,7 @@ void NTopoImproperAll::build()
int all;
MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world);
if (all) {
char str[128];
sprintf(str,
"Improper atoms missing at step " BIGINT_FORMAT,update->ntimestep);
if (me == 0) error->warning(FLERR,str);
}
if (all && (me == 0))
error->warning(FLERR,fmt::format("Improper atoms missing at step {}",
update->ntimestep));
}

View File

@ -21,6 +21,7 @@
#include "thermo.h"
#include "memory.h"
#include "error.h"
#include "fmt/format.h"
using namespace LAMMPS_NS;
@ -62,17 +63,14 @@ void NTopoImproperPartial::build()
atom4 = atom->map(improper_atom4[i][m]);
if (atom1 == -1 || atom2 == -1 || atom3 == -1 || atom4 == -1) {
nmissing++;
if (lostbond == Thermo::ERROR) {
char str[128];
sprintf(str,"Improper atoms "
TAGINT_FORMAT " " TAGINT_FORMAT " "
TAGINT_FORMAT " " TAGINT_FORMAT
" missing on proc %d at step " BIGINT_FORMAT,
improper_atom1[i][m],improper_atom2[i][m],
improper_atom3[i][m],improper_atom4[i][m],
me,update->ntimestep);
error->one(FLERR,str);
}
if (lostbond == Thermo::ERROR)
error->one(FLERR,fmt::format("Improper atoms {} {} {} {}"
" missing on proc {} at step {}",
improper_atom1[i][m],
improper_atom2[i][m],
improper_atom3[i][m],
improper_atom4[i][m],
me,update->ntimestep));
continue;
}
atom1 = domain->closest_image(i,atom1);

View File

@ -23,6 +23,7 @@
#include "molecule.h"
#include "memory.h"
#include "error.h"
#include "fmt/format.h"
using namespace LAMMPS_NS;
@ -78,25 +79,20 @@ void NTopoImproperTemplate::build()
atom4 = atom->map(improper_atom4[iatom][m]+tagprev);
if (atom1 == -1 || atom2 == -1 || atom3 == -1 || atom4 == -1) {
nmissing++;
if (lostbond == Thermo::ERROR) {
char str[128];
sprintf(str,"Improper atoms "
TAGINT_FORMAT " " TAGINT_FORMAT " "
TAGINT_FORMAT " " TAGINT_FORMAT
" missing on proc %d at step " BIGINT_FORMAT,
improper_atom1[iatom][m]+tagprev,
improper_atom2[iatom][m]+tagprev,
improper_atom3[iatom][m]+tagprev,
improper_atom4[iatom][m]+tagprev,
me,update->ntimestep);
error->one(FLERR,str);
}
if (lostbond == Thermo::ERROR)
error->one(FLERR,fmt::format("Improper atoms {} {} {} {}"
" missing on proc {} at step {}",
improper_atom1[iatom][m]+tagprev,
improper_atom2[iatom][m]+tagprev,
improper_atom3[iatom][m]+tagprev,
improper_atom4[iatom][m]+tagprev,
me,update->ntimestep));
continue;
}
atom1 = domain->closest_image(i,atom1);
atom2 = domain->closest_image(i,atom2);
atom3 = domain->closest_image(i,atom3);
atom4 = domain-> closest_image(i,atom4);
atom4 = domain->closest_image(i,atom4);
if (newton_bond ||
(i <= atom1 && i <= atom2 && i <= atom3 && i <= atom4)) {
if (nimproperlist == maximproper) {
@ -118,10 +114,7 @@ void NTopoImproperTemplate::build()
int all;
MPI_Allreduce(&nmissing,&all,1,MPI_INT,MPI_SUM,world);
if (all) {
char str[128];
sprintf(str,
"Improper atoms missing at step " BIGINT_FORMAT,update->ntimestep);
if (me == 0) error->warning(FLERR,str);
}
if (all && (me == 0))
error->warning(FLERR,fmt::format("Improper atoms missing at step {}",
update->ntimestep));
}