git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@12409 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp 2014-09-05 15:06:29 +00:00
parent 8dce3d380c
commit 31509b7528
11 changed files with 26 additions and 49 deletions

View File

@ -1638,13 +1638,7 @@ void AtomVecAngleKokkos::data_atom(double *coord, imageint imagetmp,
if (nlocal == nmax) grow(0);
h_tag(nlocal) = atoi(values[0]);
if (h_tag(nlocal) <= 0)
error->one(FLERR,"Invalid atom ID in Atoms section of data file");
h_molecule(nlocal) = atoi(values[1]);
if (h_molecule(nlocal) <= 0)
error->one(FLERR,"Invalid molecule ID in Atoms section of data file");
h_type(nlocal) = atoi(values[2]);
if (h_type(nlocal) <= 0 || h_type(nlocal) > atom->ntypes)
error->one(FLERR,"Invalid atom type in Atoms section of data file");

View File

@ -1277,9 +1277,6 @@ void AtomVecAtomicKokkos::data_atom(double *coord, tagint imagetmp,
if (nlocal == nmax) grow(0);
h_tag[nlocal] = atoi(values[0]);
if (tag[nlocal] <= 0)
error->one(FLERR,"Invalid atom ID in Atoms section of data file");
h_type[nlocal] = atoi(values[1]);
if (type[nlocal] <= 0 || type[nlocal] > atom->ntypes)
error->one(FLERR,"Invalid atom type in Atoms section of data file");

View File

@ -1509,13 +1509,7 @@ void AtomVecBondKokkos::data_atom(double *coord, imageint imagetmp,
if (nlocal == nmax) grow(0);
h_tag(nlocal) = atoi(values[0]);
if (h_tag(nlocal) <= 0)
error->one(FLERR,"Invalid atom ID in Atoms section of data file");
h_molecule(nlocal) = atoi(values[1]);
if (h_molecule(nlocal) <= 0)
error->one(FLERR,"Invalid molecule ID in Atoms section of data file");
h_type(nlocal) = atoi(values[2]);
if (h_type(nlocal) <= 0 || h_type(nlocal) > atom->ntypes)
error->one(FLERR,"Invalid atom type in Atoms section of data file");

View File

@ -1360,9 +1360,6 @@ void AtomVecChargeKokkos::data_atom(double *coord, imageint imagetmp,
if (nlocal == nmax) grow(0);
h_tag[nlocal] = atoi(values[0]);
if (tag[nlocal] <= 0)
error->one(FLERR,"Invalid atom ID in Atoms section of data file");
h_type[nlocal] = atoi(values[1]);
if (type[nlocal] <= 0 || type[nlocal] > atom->ntypes)
error->one(FLERR,"Invalid atom type in Atoms section of data file");

View File

@ -1972,13 +1972,7 @@ void AtomVecFullKokkos::data_atom(double *coord, imageint imagetmp,
if (nlocal == nmax) grow(0);
h_tag(nlocal) = atoi(values[0]);
if (h_tag(nlocal) <= 0)
error->one(FLERR,"Invalid atom ID in Atoms section of data file");
h_molecule(nlocal) = atoi(values[1]);
if (h_molecule(nlocal) <= 0)
error->one(FLERR,"Invalid molecule ID in Atoms section of data file");
h_type(nlocal) = atoi(values[2]);
if (h_type(nlocal) <= 0 || h_type(nlocal) > atom->ntypes)
error->one(FLERR,"Invalid atom type in Atoms section of data file");

View File

@ -1897,13 +1897,7 @@ void AtomVecMolecularKokkos::data_atom(double *coord, imageint imagetmp,
if (nlocal == nmax) grow(0);
h_tag(nlocal) = atoi(values[0]);
if (h_tag(nlocal) <= 0)
error->one(FLERR,"Invalid atom ID in Atoms section of data file");
h_molecule(nlocal) = atoi(values[1]);
if (h_molecule(nlocal) <= 0)
error->one(FLERR,"Invalid molecule ID in Atoms section of data file");
h_type(nlocal) = atoi(values[2]);
if (h_type(nlocal) <= 0 || h_type(nlocal) > atom->ntypes)
error->one(FLERR,"Invalid atom type in Atoms section of data file");

View File

@ -557,6 +557,8 @@ void PairREAX::init_style()
error->all(FLERR,"Pair style reax requires atom IDs");
if (force->newton_pair == 0)
error->all(FLERR,"Pair style reax requires newton pair on");
if (!atom->q_flag)
error->all(FLERR,"Pair style reax requires atom attribute q");
if (strcmp(update->unit_style,"real") != 0 && comm->me == 0)
error->warning(FLERR,"Not using real units with pair reax");

View File

@ -330,7 +330,8 @@ void PairReaxC::coeff( int nargs, char **args )
void PairReaxC::init_style( )
{
if (!atom->q_flag) error->all(FLERR,"Pair reax/c requires atom attribute q");
if (!atom->q_flag)
error->all(FLERR,"Pair style reax/c requires atom attribute q");
// firstwarn = 1;

View File

@ -293,7 +293,7 @@ void AtomVec::pack_dihedral(tagint **buf)
if (newton_bond) {
for (i = 0; i < nlocal; i++)
for (j = 0; j < num_dihedral[i]; j++) {
buf[m][0] = dihedral_type[i][j];
buf[m][0] = MAX(dihedral_type[i][j],-dihedral_type[i][j]);
buf[m][1] = dihedral_atom1[i][j];
buf[m][2] = dihedral_atom2[i][j];
buf[m][3] = dihedral_atom3[i][j];
@ -304,7 +304,7 @@ void AtomVec::pack_dihedral(tagint **buf)
for (i = 0; i < nlocal; i++)
for (j = 0; j < num_dihedral[i]; j++)
if (tag[i] == dihedral_atom2[i][j]) {
buf[m][0] = dihedral_type[i][j];
buf[m][0] = MAX(dihedral_type[i][j],-dihedral_type[i][j]);
buf[m][1] = dihedral_atom1[i][j];
buf[m][2] = dihedral_atom2[i][j];
buf[m][3] = dihedral_atom3[i][j];

View File

@ -109,7 +109,7 @@ void DeleteAtoms::command(int narg, char **arg)
atom->map_set();
}
if (mol_flag) recount_topology();
recount_topology();
// print before and after atom and topology counts
@ -143,9 +143,11 @@ void DeleteAtoms::command(int narg, char **arg)
ndelete_impropers,atom->nimpropers);
}
}
if (logfile) fprintf(logfile,"Deleted " BIGINT_FORMAT
" atoms, new total = " BIGINT_FORMAT "\n",
ndelete,atom->natoms);
if (logfile) {
fprintf(logfile,"Deleted " BIGINT_FORMAT
" atoms, new total = " BIGINT_FORMAT "\n",
ndelete,atom->natoms);
if (mol_flag) {
if (nbonds_previous)
fprintf(logfile,"Deleted " BIGINT_FORMAT
@ -164,6 +166,7 @@ void DeleteAtoms::command(int narg, char **arg)
" impropers, new total = " BIGINT_FORMAT "\n",
ndelete_impropers,atom->nimpropers);
}
}
}
}
@ -483,20 +486,21 @@ void DeleteAtoms::recount_topology()
}
}
if (atom->avec->bonds_allow)
if (atom->avec->bonds_allow) {
MPI_Allreduce(&nbonds,&atom->nbonds,1,MPI_LMP_BIGINT,MPI_SUM,world);
if (atom->avec->angles_allow)
if (!force->newton_bond) atom->nbonds /= 2;
}
if (atom->avec->angles_allow) {
MPI_Allreduce(&nangles,&atom->nangles,1,MPI_LMP_BIGINT,MPI_SUM,world);
if (atom->avec->dihedrals_allow)
if (!force->newton_bond) atom->nangles /= 3;
}
if (atom->avec->dihedrals_allow) {
MPI_Allreduce(&ndihedrals,&atom->ndihedrals,1,MPI_LMP_BIGINT,MPI_SUM,world);
if (atom->avec->impropers_allow)
if (!force->newton_bond) atom->ndihedrals /= 4;
}
if (atom->avec->impropers_allow) {
MPI_Allreduce(&nimpropers,&atom->nimpropers,1,MPI_LMP_BIGINT,MPI_SUM,world);
if (!force->newton_bond) {
atom->nbonds /= 2;
atom->nangles /= 3;
atom->ndihedrals /= 4;
atom->nimpropers /= 4;
if (!force->newton_bond) atom->nimpropers /= 4;
}
}

View File

@ -1007,8 +1007,8 @@ void Image::write_JPG(FILE *fp)
cinfo.in_color_space = JCS_RGB;
jpeg_set_defaults(&cinfo);
jpeg_set_quality(&cinfo,85,true);
jpeg_start_compress(&cinfo,true);
jpeg_set_quality(&cinfo,85,TRUE);
jpeg_start_compress(&cinfo,TRUE);
while (cinfo.next_scanline < cinfo.image_height) {
row_pointer = (JSAMPROW)