From 49c73275f123281c898aa7eff81817c93e390e20 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Fri, 31 May 2019 13:58:52 -0400 Subject: [PATCH 1/2] DRR - Cpptraj: Remove PrepareStdoutTrajWrite since only ambpdb needs it. Ambpdb will implement its own. --- src/Trajout_Single.cpp | 12 ------------ src/Trajout_Single.h | 8 +++----- 2 files changed, 3 insertions(+), 17 deletions(-) diff --git a/src/Trajout_Single.cpp b/src/Trajout_Single.cpp index 9fdea91bd3..b97658b8d4 100644 --- a/src/Trajout_Single.cpp +++ b/src/Trajout_Single.cpp @@ -26,18 +26,6 @@ int Trajout_Single::InitTrajWrite(FileName const& tnameIn, ArgList const& argIn, return InitTrajout(tnameIn, argIn, DSLin, writeFormatIn); } -// Trajout_Single::PrepareStdoutTrajWrite() -/** Initialize and set up output trajectory for STDOUT write. */ -int Trajout_Single::PrepareStdoutTrajWrite(ArgList const& argIn, DataSetList const& DSLin, - Topology *tparmIn, - CoordinateInfo const& cInfoIn, int nFrames, - TrajectoryFile::TrajFormatType writeFormatIn) -{ - if (InitTrajout("", argIn, DSLin, writeFormatIn)) return 1; - if (SetupTrajWrite(tparmIn, cInfoIn, nFrames)) return 1; - return 0; -} - /** Initialize trajectory for write. Append ensemble number to filename if given. */ int Trajout_Single::InitEnsembleTrajWrite(FileName const& tnameIn, ArgList const& argIn, DataSetList const& DSLin, diff --git a/src/Trajout_Single.h b/src/Trajout_Single.h index 7c161cbede..2e245774e0 100644 --- a/src/Trajout_Single.h +++ b/src/Trajout_Single.h @@ -19,7 +19,7 @@ class DataSetList; class Trajout_Single { public: Trajout_Single() : trajio_(0), debug_(0) {} - ~Trajout_Single(); + virtual ~Trajout_Single(); // NOTE: virtual because it can be inherited void SetDebug(int d) { debug_ = d; } // ----- Inherited functions ----------------- /// Prepare trajectory for writing to the given format, but no Topology setup. @@ -38,9 +38,6 @@ class Trajout_Single { /// Init and setup/open traj. int PrepareTrajWrite(FileName const&, ArgList const&, DataSetList const&, Topology*, CoordinateInfo const&, int, TrajectoryFile::TrajFormatType); - /// Init and setup/open traj for writing to STDOUT (e.g. ambpdb mode) - int PrepareStdoutTrajWrite(ArgList const&, DataSetList const&, Topology*, - CoordinateInfo const&, int, TrajectoryFile::TrajFormatType); /// Init traj; if given, append ensemble number to name (use in Actions) int InitEnsembleTrajWrite(FileName const&, ArgList const&, DataSetList const&, TrajectoryFile::TrajFormatType, int); @@ -48,8 +45,9 @@ class Trajout_Single { // Set the parallel communicator. int SetTrajComm(Parallel::Comm const& c) { trajComm_ = c; return 0; } # endif - private: + protected: int InitTrajout(FileName const&, ArgList const&, DataSetList const&, TrajectoryFile::TrajFormatType); + private: # ifdef MPI /// Peform Topology-related setup for trajectory and open in parallel. int ParallelSetupTrajWrite(); From a3e3e4d01de668a43ec5ea516da80b9ff80f39a7 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 3 Jun 2019 13:20:09 -0400 Subject: [PATCH 2/2] DRR - Cpptraj: Revision bump for removal of ambpdb trajout routine, making Trajout_Single inheritable. --- src/Version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Version.h b/src/Version.h index 468e445293..f8bafd5171 100644 --- a/src/Version.h +++ b/src/Version.h @@ -12,7 +12,7 @@ * Whenever a number that precedes is incremented, all subsequent * numbers should be reset to 0. */ -#define CPPTRAJ_INTERNAL_VERSION "V4.14.6" +#define CPPTRAJ_INTERNAL_VERSION "V4.14.7" /// PYTRAJ relies on this #define CPPTRAJ_VERSION_STRING CPPTRAJ_INTERNAL_VERSION #endif