diff --git a/doc/cpptraj.lyx b/doc/cpptraj.lyx index 635a2ee234..9441fb3e5e 100644 --- a/doc/cpptraj.lyx +++ b/doc/cpptraj.lyx @@ -28082,7 +28082,7 @@ nastruct \end_layout \begin_layout LyX-Code - [baseref ] ... + [noframespaces] [baseref ] ... \end_layout \begin_layout LyX-Code @@ -28156,6 +28156,15 @@ naout bonds present between them. \end_layout +\begin_layout Description +[noframespaces] If specified there will be no spaces between frames in the + +\series bold +naout +\series default + files. +\end_layout + \begin_layout Description [baseref \begin_inset space ~ diff --git a/src/Action_NAstruct.cpp b/src/Action_NAstruct.cpp index e5795c4ce5..13337d2285 100644 --- a/src/Action_NAstruct.cpp +++ b/src/Action_NAstruct.cpp @@ -28,6 +28,7 @@ Action_NAstruct::Action_NAstruct() : printheader_(true), seriesUpdated_(false), skipIfNoHB_(true), + spaceBetweenFrames_(true), bpout_(0), stepout_(0), helixout_(0), masterDSL_(0) # ifdef NASTRUCTDEBUG @@ -38,7 +39,7 @@ Action_NAstruct::Action_NAstruct() : void Action_NAstruct::Help() const { mprintf("\t[] [resrange ] [naout ]\n" "\t[noheader] [resmap :{A,C,G,T,U} ...] [calcnohb]\n" - "\t[baseref ] ...\n" + "\t[noframespaces] [baseref ] ...\n" "\t[hbcut ] [origincut ] [altona | cremer]\n" "\t[zcut ] [zanglecut ] [groovecalc {simple | 3dna}]\n" "\t[{ %s | allframes | guessbp}]\n", DataSetList::RefArgs); @@ -58,7 +59,9 @@ void Action_NAstruct::Help() const { " hydrogen bonds present between base pairs.\n" " Base pair parameters are written to 'BP.', base pair step parameters\n" " are written to 'BPstep.', and helix parameters are written to\n" - " Helix.'\n"); + " Helix.'.\n" + " If 'noframespaces' is specified there will be no spaces between frames\n" + " in the 'naout' files.\n"); } // Action_NAstruct::Init() @@ -110,6 +113,7 @@ Action::RetType Action_NAstruct::Init(ArgList& actionArgs, ActionInit& init, int resRange_.ShiftBy(-1); // User res args start from 1 printheader_ = !actionArgs.hasKey("noheader"); skipIfNoHB_ = !actionArgs.hasKey("calcnohb"); + spaceBetweenFrames_ = !actionArgs.hasKey("noframespaces"); // Determine how base pairs will be found. ReferenceFrame REF = init.DSL().GetReferenceFrame( actionArgs ); if (REF.error()) return Action::ERR; @@ -197,6 +201,7 @@ Action::RetType Action_NAstruct::Init(ArgList& actionArgs, ActionInit& init, int mprintf("\tBase pair step parameters written to %s\n", stepout_->Filename().full()); mprintf("\tHelical parameters written to %s\n", helixout_->Filename().full()); if (!printheader_) mprintf("\tHeader line will not be written.\n"); + if (!spaceBetweenFrames_) mprintf("\tNo spaces will be written between frames.\n"); } mprintf("\tHydrogen bond cutoff for determining base pairs is %.2f Angstroms.\n", sqrt( HBdistCut2_ ) ); @@ -1776,7 +1781,7 @@ void Action_NAstruct::Print() { bpout_->Printf(GROOVE_FMT, BP.major_->Dval(frame), BP.minor_->Dval(frame)); bpout_->Printf("\n"); } - bpout_->Printf("\n"); + if (spaceBetweenFrames_) bpout_->Printf("\n"); } } @@ -1821,7 +1826,7 @@ void Action_NAstruct::Print() { } stepout_->Printf("\n"); } - stepout_->Printf("\n"); + if (spaceBetweenFrames_) stepout_->Printf("\n"); } // Helix frames if (printheader_) @@ -1840,7 +1845,7 @@ void Action_NAstruct::Print() { BS.tip_->Dval(frame), BS.htwist_->Dval(frame)); helixout_->Printf("\n"); } - helixout_->Printf("\n"); + if (spaceBetweenFrames_) helixout_->Printf("\n"); } } } diff --git a/src/Action_NAstruct.h b/src/Action_NAstruct.h index 3e78d5f1a8..42441f37d6 100644 --- a/src/Action_NAstruct.h +++ b/src/Action_NAstruct.h @@ -153,6 +153,7 @@ class Action_NAstruct: public Action { bool printheader_; ///< If true, print header to naout files. bool seriesUpdated_; ///< If false, check that time series data is nframes long bool skipIfNoHB_; ///< When true, do not calc parameters when BP not present + bool spaceBetweenFrames_; ///< If false do not print spaces between frames in naout CpptrajFile* bpout_; ///< Base pair out (BP.). CpptrajFile* stepout_; ///< Base pair step out (BPstep.). CpptrajFile* helixout_; ///< Helical parameters out (Helix.). diff --git a/src/Version.h b/src/Version.h index a9f87aacf9..afe41b2137 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.25.7" +#define CPPTRAJ_INTERNAL_VERSION "V4.25.8" /// PYTRAJ relies on this #define CPPTRAJ_VERSION_STRING CPPTRAJ_INTERNAL_VERSION #endif