diff --git a/src/ASPHERE/fix_npt_asphere.cpp b/src/ASPHERE/fix_npt_asphere.cpp index e43de5d95c..cb543639e1 100755 --- a/src/ASPHERE/fix_npt_asphere.cpp +++ b/src/ASPHERE/fix_npt_asphere.cpp @@ -328,7 +328,7 @@ void FixNPTAsphere::omega_from_mq(double *q, double *m, double *inertia, void FixNPTAsphere::calculate_inertia(double mass, double *shape, double *inertia) { - inertia[0] = mass*(shape[1]*shape[1]+shape[2]*shape[2])/5.0; - inertia[1] = mass*(shape[0]*shape[0]+shape[2]*shape[2])/5.0; - inertia[2] = mass*(shape[0]*shape[0]+shape[1]*shape[1])/5.0; + inertia[0] = 0.2*mass*(shape[1]*shape[1]+shape[2]*shape[2]); + inertia[1] = 0.2*mass*(shape[0]*shape[0]+shape[2]*shape[2]); + inertia[2] = 0.2*mass*(shape[0]*shape[0]+shape[1]*shape[1]); } diff --git a/src/ASPHERE/fix_nve_asphere.cpp b/src/ASPHERE/fix_nve_asphere.cpp index 6d13adf675..c89b90fa65 100755 --- a/src/ASPHERE/fix_nve_asphere.cpp +++ b/src/ASPHERE/fix_nve_asphere.cpp @@ -218,11 +218,11 @@ void FixNVEAsphere::calculate_inertia() double **shape = atom->shape; for (int i = 1; i <= atom->ntypes; i++) { - inertia[i][0] = mass[i] * - (shape[i][1]*shape[i][1]+shape[i][2]*shape[i][2]) / 5.0; - inertia[i][1] = mass[i] * - (shape[i][0]*shape[i][0]+shape[i][2]*shape[i][2]) / 5.0; - inertia[i][2] = mass[i] * - (shape[i][0]*shape[i][0]+shape[i][1]*shape[i][1]) / 5.0; + inertia[i][0] = 0.2*mass[i] * + (shape[i][1]*shape[i][1]+shape[i][2]*shape[i][2]); + inertia[i][1] = 0.2*mass[i] * + (shape[i][0]*shape[i][0]+shape[i][2]*shape[i][2]); + inertia[i][2] = 0.2*mass[i] * + (shape[i][0]*shape[i][0]+shape[i][1]*shape[i][1]); } } diff --git a/src/ASPHERE/fix_nvt_asphere.cpp b/src/ASPHERE/fix_nvt_asphere.cpp index eaad9c7544..52c3a54e9e 100755 --- a/src/ASPHERE/fix_nvt_asphere.cpp +++ b/src/ASPHERE/fix_nvt_asphere.cpp @@ -276,7 +276,7 @@ void FixNVTAsphere::omega_from_mq(double *q, double *m, double *inertia, void FixNVTAsphere::calculate_inertia(double mass, double *shape, double *inertia) { - inertia[0] = mass*(shape[1]*shape[1]+shape[2]*shape[2])/5.0; - inertia[1] = mass*(shape[0]*shape[0]+shape[2]*shape[2])/5.0; - inertia[2] = mass*(shape[0]*shape[0]+shape[1]*shape[1])/5.0; + inertia[0] = 0.2*mass*(shape[1]*shape[1]+shape[2]*shape[2]); + inertia[1] = 0.2*mass*(shape[0]*shape[0]+shape[2]*shape[2]); + inertia[2] = 0.2*mass*(shape[0]*shape[0]+shape[1]*shape[1]); }