Merge branch 'release-2019' into master
[alexxy/gromacs.git] / src / gromacs / trajectoryanalysis / topologyinformation.cpp
index a4db1c3a55d580b44973f3d833c573c70c3d7497..15f100aa9f11f87b357d07fd232c119b433b9d2c 100644 (file)
@@ -43,7 +43,8 @@
 
 #include "topologyinformation.h"
 
-#include "gromacs/compat/make_unique.h"
+#include <memory>
+
 #include "gromacs/fileio/confio.h"
 #include "gromacs/math/vec.h"
 #include "gromacs/pbcutil/rmpbc.h"
@@ -73,7 +74,7 @@ TopologyInformation::~TopologyInformation()
 
 void TopologyInformation::fillFromInputFile(const std::string &filename)
 {
-    mtop_ = gmx::compat::make_unique<gmx_mtop_t>();
+    mtop_ = std::make_unique<gmx_mtop_t>();
     // TODO When filename is not a .tpr, then using readConfAndAtoms
     // would be efficient for not doing multiple conversions for
     // makeAtomsData. However we'd also need to be able to copy the
@@ -106,7 +107,8 @@ const gmx_localtop_t *TopologyInformation::expandedTopology() const
     // Do lazy initialization
     if (expandedTopology_ == nullptr && hasTopology())
     {
-        expandedTopology_.reset(gmx_mtop_generate_local_top(mtop_.get(), false));
+        expandedTopology_ = std::make_unique<gmx_localtop_t>();
+        gmx_mtop_generate_local_top(*mtop_, expandedTopology_.get(), false);
     }
 
     return expandedTopology_.get();