diff --git a/src/RIGID/fix_rigid_small.cpp b/src/RIGID/fix_rigid_small.cpp index 39bfc82c29..c4f3ccaab4 100644 --- a/src/RIGID/fix_rigid_small.cpp +++ b/src/RIGID/fix_rigid_small.cpp @@ -2138,7 +2138,7 @@ void FixRigidSmall::setup_bodies_dynamic() which = 0 to read total mass and center-of-mass which = 1 to read 6 moments of inertia, store in array flag inbody = 0 for local bodies whose info is read from file - nlines = # of lines of rigid body info + nlines = # of lines of rigid body info, 0 is OK one line = rigid-ID mass xcm ycm zcm ixx iyy izz ixy ixz iyz and rigid-ID = mol-ID for fix rigid/small ------------------------------------------------------------------------- */ @@ -2184,7 +2184,6 @@ void FixRigidSmall::readfile(int which, double **array, int *inbody) } MPI_Bcast(&nlines,1,MPI_INT,0,world); - if (nlines == 0) error->all(FLERR,"Fix rigid file has no lines"); char *buffer = new char[CHUNK*MAXLINE]; char **values = new char*[ATTRIBUTE_PERBODY]; @@ -2502,6 +2501,10 @@ void FixRigidSmall::set_molecule(int nlocalprev, tagint tagprev, nlocal_body++; } } + + // increment total # of rigid bodies + + nbody++; } /* ----------------------------------------------------------------------