diff --git a/source/api_c/include/deepmd.hpp b/source/api_c/include/deepmd.hpp index 9e1a611869..dd212e9dec 100644 --- a/source/api_c/include/deepmd.hpp +++ b/source/api_c/include/deepmd.hpp @@ -2585,7 +2585,7 @@ class DeepSpinModelDevi : public DeepBaseModelDevi { ener.resize(numb_models); force.resize(numb_models); force_mag.resize(numb_models); - // virial.resize(numb_models); + virial.resize(numb_models); for (int i = 0; i < numb_models; i++) { ener[i] = energy_flat[i]; force[i].resize(static_cast(natoms) * 3);