Merge branch release-2021 into master
[alexxy/gromacs.git] / api / gmxapi / cpp / system.cpp
index a41c021b78fd6381b24dbf5292e59af26ad5b179..4b93afededc4739a52bb54b5cae0bf979263d4d3 100644 (file)
@@ -45,7 +45,6 @@
 #include "gmxapi/md.h"
 #include "gmxapi/session.h"
 #include "gmxapi/status.h"
-#include "gmxapi/system.h"
 
 #include "system_impl.h"
 #include "workflow.h"
@@ -78,6 +77,10 @@ System::System(std::unique_ptr<Impl> implementation) : impl_{ std::move(implemen
 {
     GMX_ASSERT(impl_, "Constructor requires valid implementation object.");
 }
+System::Impl* System::get() const
+{
+    return impl_.get();
+}
 
 System::~System() = default;
 //! \endcond
@@ -116,6 +119,11 @@ System fromTprFile(const std::string& filename)
     return system;
 }
 
+std::shared_ptr<Workflow> getWork(const System::Impl& system)
+{
+    return system.workflow_;
+}
+
 System::Impl::Impl(std::unique_ptr<gmxapi::Workflow> workflow) noexcept :
     workflow_(std::move(workflow)), spec_(std::make_shared<MDWorkSpec>())
 {