diff --git a/src/colvar/Volume.cpp b/src/colvar/Volume.cpp index f9fd3a7d14a976ba8cd1822ac51a3d4844a034c1..b022c75569b2215dc33149e512fe61dd343da9b8 100644 --- a/src/colvar/Volume.cpp +++ b/src/colvar/Volume.cpp @@ -78,7 +78,7 @@ void Volume::registerKeywords( Keywords& keys ){ Action::registerKeywords( keys ); ActionWithValue::registerKeywords( keys ); ActionAtomistic::registerKeywords( keys ); - keys.remove("NUMERICAL_DERIVATIVES"); +// keys.remove("NUMERICAL_DERIVATIVES"); keys.addFlag("COMPONENTS",false,"use xx, yy, zz, alpha, beta, gamma as the colvars rather than the box volume"); } @@ -89,8 +89,9 @@ void Volume::calculate(){ // todo }; - setBoxDerivatives(-1.0*Tensor::identity()); - setValue (getBox().determinant()); + double v=getBox().determinant(); + setBoxDerivatives(-v*Tensor::identity()); + setValue (v); } }