From cb9a18983e06b5f758e77d899c58765b23298ab2 Mon Sep 17 00:00:00 2001 From: sjplimp Date: Thu, 31 Jan 2008 18:10:42 +0000 Subject: [PATCH] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@1442 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- src/MOLECULE/dihedral_charmm.cpp | 4 +++- src/MOLECULE/dihedral_harmonic.cpp | 4 +++- src/MOLECULE/dihedral_helix.cpp | 4 +++- src/MOLECULE/dihedral_multi_harmonic.cpp | 4 +++- src/MOLECULE/dihedral_opls.cpp | 4 +++- src/MOLECULE/improper_cvff.cpp | 4 +++- src/MOLECULE/improper_harmonic.cpp | 4 +++- 7 files changed, 21 insertions(+), 7 deletions(-) diff --git a/src/MOLECULE/dihedral_charmm.cpp b/src/MOLECULE/dihedral_charmm.cpp index 339456ccb7..c9b015e334 100644 --- a/src/MOLECULE/dihedral_charmm.cpp +++ b/src/MOLECULE/dihedral_charmm.cpp @@ -147,9 +147,11 @@ void DihedralCharmm::compute(int eflag, int vflag) int me; MPI_Comm_rank(world,&me); if (screen) { - fprintf(screen,"Dihedral problem: %d %d %d %d %d %d\n", + char str[128]; + sprintf(str,"Dihedral problem: %d %d %d %d %d %d\n", me,update->ntimestep, atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); + error->warning(str); fprintf(screen," 1st atom: %d %g %g %g\n", me,x[i1][0],x[i1][1],x[i1][2]); fprintf(screen," 2nd atom: %d %g %g %g\n", diff --git a/src/MOLECULE/dihedral_harmonic.cpp b/src/MOLECULE/dihedral_harmonic.cpp index bcb43a1331..1959cc3194 100644 --- a/src/MOLECULE/dihedral_harmonic.cpp +++ b/src/MOLECULE/dihedral_harmonic.cpp @@ -136,9 +136,11 @@ void DihedralHarmonic::compute(int eflag, int vflag) int me; MPI_Comm_rank(world,&me); if (screen) { - fprintf(screen,"Dihedral problem: %d %d %d %d %d %d\n", + char str[128]; + sprintf(str,"Dihedral problem: %d %d %d %d %d %d\n", me,update->ntimestep, atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); + error->warning(str); fprintf(screen," 1st atom: %d %g %g %g\n", me,x[i1][0],x[i1][1],x[i1][2]); fprintf(screen," 2nd atom: %d %g %g %g\n", diff --git a/src/MOLECULE/dihedral_helix.cpp b/src/MOLECULE/dihedral_helix.cpp index f3adbb0f6a..80534868bc 100644 --- a/src/MOLECULE/dihedral_helix.cpp +++ b/src/MOLECULE/dihedral_helix.cpp @@ -168,9 +168,11 @@ void DihedralHelix::compute(int eflag, int vflag) int me; MPI_Comm_rank(world,&me); if (screen) { - fprintf(screen,"Dihedral problem: %d %d %d %d %d %d\n", + char str[128]; + sprintf(str,"Dihedral problem: %d %d %d %d %d %d\n", me,update->ntimestep, atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); + error->warning(str); fprintf(screen," 1st atom: %d %g %g %g\n", me,x[i1][0],x[i1][1],x[i1][2]); fprintf(screen," 2nd atom: %d %g %g %g\n", diff --git a/src/MOLECULE/dihedral_multi_harmonic.cpp b/src/MOLECULE/dihedral_multi_harmonic.cpp index f1124adf61..aeda564b96 100644 --- a/src/MOLECULE/dihedral_multi_harmonic.cpp +++ b/src/MOLECULE/dihedral_multi_harmonic.cpp @@ -159,9 +159,11 @@ void DihedralMultiHarmonic::compute(int eflag, int vflag) if (c > 1.0 + TOLERANCE || c < (-1.0 - TOLERANCE)) { if (screen) { - fprintf(screen,"Dihedral problem: %d %d %d %d %d %d\n", + char str[128]; + sprintf(str,"Dihedral problem: %d %d %d %d %d %d\n", comm->me,update->ntimestep, atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); + error->warning(str); fprintf(screen," 1st atom: %d %g %g %g\n", comm->me,x[i1][0],x[i1][1],x[i1][2]); fprintf(screen," 2nd atom: %d %g %g %g\n", diff --git a/src/MOLECULE/dihedral_opls.cpp b/src/MOLECULE/dihedral_opls.cpp index 41b0515240..84893aa9af 100644 --- a/src/MOLECULE/dihedral_opls.cpp +++ b/src/MOLECULE/dihedral_opls.cpp @@ -165,9 +165,11 @@ void DihedralOPLS::compute(int eflag, int vflag) if (c > 1.0 + TOLERANCE || c < (-1.0 - TOLERANCE)) { if (screen) { - fprintf(screen,"Dihedral problem: %d %d %d %d %d %d\n", + char str[128]; + sprintf(str,"Dihedral problem: %d %d %d %d %d %d\n", comm->me,update->ntimestep, atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); + error->warning(str); fprintf(screen," 1st atom: %d %g %g %g\n", comm->me,x[i1][0],x[i1][1],x[i1][2]); fprintf(screen," 2nd atom: %d %g %g %g\n", diff --git a/src/MOLECULE/improper_cvff.cpp b/src/MOLECULE/improper_cvff.cpp index 6328bc8ab4..69616c41bb 100644 --- a/src/MOLECULE/improper_cvff.cpp +++ b/src/MOLECULE/improper_cvff.cpp @@ -150,9 +150,11 @@ void ImproperCvff::compute(int eflag, int vflag) int me; MPI_Comm_rank(world,&me); if (screen) { - fprintf(screen,"Improper problem: %d %d %d %d %d %d\n", + char str[128]; + sprintf(str,"Improper problem: %d %d %d %d %d %d\n", me,update->ntimestep, atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); + error->warning(str); fprintf(screen," 1st atom: %d %g %g %g\n", me,x[i1][0],x[i1][1],x[i1][2]); fprintf(screen," 2nd atom: %d %g %g %g\n", diff --git a/src/MOLECULE/improper_harmonic.cpp b/src/MOLECULE/improper_harmonic.cpp index 700da09340..f19bae315e 100644 --- a/src/MOLECULE/improper_harmonic.cpp +++ b/src/MOLECULE/improper_harmonic.cpp @@ -121,9 +121,11 @@ void ImproperHarmonic::compute(int eflag, int vflag) int me; MPI_Comm_rank(world,&me); if (screen) { - fprintf(screen,"Improper problem: %d %d %d %d %d %d\n", + char str[128]; + sprintf(str,"Improper problem: %d %d %d %d %d %d\n", me,update->ntimestep, atom->tag[i1],atom->tag[i2],atom->tag[i3],atom->tag[i4]); + error->warning(str); fprintf(screen," 1st atom: %d %g %g %g\n", me,x[i1][0],x[i1][1],x[i1][2]); fprintf(screen," 2nd atom: %d %g %g %g\n",