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

This commit is contained in:
sjplimp 2013-04-03 19:58:40 +00:00
parent 17acdd4096
commit 8ddd160c3c
2 changed files with 4 additions and 6 deletions

View File

@ -140,8 +140,8 @@ void WriteData::write(char *file)
if (natoms) atoms();
if (natoms) velocities();
if (atom->nbonds) bonds();
if (atom->nangles) angles();
if (nbonds) bonds();
if (nangles) angles();
if (atom->ndihedrals) dihedrals();
if (atom->nimpropers) impropers();
@ -167,14 +167,12 @@ void WriteData::header()
if (atom->nbonds || atom->nbondtypes) {
nbonds_local = atom->avec->pack_bond(NULL);
bigint nbonds;
MPI_Allreduce(&nbonds_local,&nbonds,1,MPI_LMP_BIGINT,MPI_SUM,world);
fprintf(fp,BIGINT_FORMAT " bonds\n",nbonds);
fprintf(fp,"%d bond types\n",atom->nbondtypes);
}
if (atom->nangles || atom->nangletypes) {
nangles_local = atom->avec->pack_angle(NULL);
bigint nangles;
MPI_Allreduce(&nangles_local,&nangles,1,MPI_LMP_BIGINT,MPI_SUM,world);
fprintf(fp,BIGINT_FORMAT " angles\n",nangles);
fprintf(fp,"%d angle types\n",atom->nangletypes);

View File

@ -34,8 +34,8 @@ class WriteData : protected Pointers {
private:
int me,nprocs;
FILE *fp;
bigint nbonds_local;
bigint nangles_local;
bigint nbonds_local,nbonds;
bigint nangles_local,nangles;
void header();
void type_arrays();