diff --git a/src/compute_gyration.cpp b/src/compute_gyration.cpp index 8c4c7d0305..551cfc85bb 100644 --- a/src/compute_gyration.cpp +++ b/src/compute_gyration.cpp @@ -113,5 +113,5 @@ void ComputeGyration::compute_vector() MPI_Allreduce(rg,vector,6,MPI_DOUBLE,MPI_SUM,world); if (masstotal == 0.0) return; - for (int i = 0; i < 6; i++) vector[i] = sqrt(vector[i]/masstotal); + for (int i = 0; i < 6; i++) vector[i] /= masstotal; } diff --git a/src/compute_gyration_molecule.cpp b/src/compute_gyration_molecule.cpp index df107e8303..412a64e2e7 100644 --- a/src/compute_gyration_molecule.cpp +++ b/src/compute_gyration_molecule.cpp @@ -222,7 +222,7 @@ void ComputeGyrationMolecule::compute_array() for (i = 0; i < nmolecules; i++) for (j = 0; j < 6; j++) - array[i][j] = sqrt(array[i][j]/masstotal[i]); + array[i][j] /= masstotal[i]; }