Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
17ce9a8
DRR - Cpptraj: Start using forward declares.
May 17, 2019
40a4ef7
DRR - Cpptraj: Test adding DataSetList to processWriteArgs
May 17, 2019
c31018f
DRR - Add bfacdata keyword.
May 17, 2019
f126354
DRR - Cpptraj: Update definition of processWriteArgs
May 17, 2019
cbfb937
DRR - Cpptraj: Fix dependencies for TrajectoryIO classes
May 17, 2019
342a374
DRR - Cpptraj: Finish fixing up dependencies. Ensure master data set …
May 17, 2019
9754a72
Merge branch 'master' into pdb-custom-bfactor
May 20, 2019
5234894
DRR - Cpptraj: Add printout for b-factor data
May 20, 2019
ea743b5
DRR - Cpptraj: Test for writing bfacdata
May 20, 2019
1545d72
DRR - Cpptraj: Change variable name
May 20, 2019
d55dd09
DRR - Cpptraj: Split out DataSet assignment into separate function so…
May 20, 2019
03cfb43
DRR - Cpptraj: Add 'occdata' keyword and clean up output
May 20, 2019
93710e2
DRR - Cpptraj: Add occdata test
May 20, 2019
a5b8bd0
DRR - Cpptraj: Add bfacscale and occscale keywords
May 20, 2019
b323470
DRR - Cpptraj: Add occmax and bfacmax keywords.
May 20, 2019
24ef753
DRR - Cpptraj: Add test for scaling
May 20, 2019
85fa406
Merge branch 'master' into pdb-custom-bfactor
May 20, 2019
53d47c2
DRR - Cpptraj: Update manual.
May 20, 2019
886f853
DRR - Cpptraj: Revision bump for new PDB format keywords bfacdata etc
May 20, 2019
88e0967
DRR - Cpptraj: Add bfacbyres and occbyres keywords.
May 20, 2019
cdef02c
DRR - Cpptraj: Test bfacbyres
May 20, 2019
817725c
DRR - Cpptraj: Update manual
May 20, 2019
a0b1bd4
DRR - Cpptraj: Use more forward declarations
May 21, 2019
8b4d1c8
DRR - Cpptraj: More forward declare stuff
May 21, 2019
3ca7ae8
DRR - Cpptraj: Add back old version of AddTrajout() with blank DataSe…
May 21, 2019
63e235f
DRR - Cpptraj: More forward declarations.
May 21, 2019
f6600c5
DRR - Cpptraj: Forward declarations.
May 21, 2019
4247bda
DRR - Cpptraj: More forward declarations
May 21, 2019
957ae4a
DRR - Cpptraj: One more round of dependency juggling
May 21, 2019
1af375a
DRR - Cpptraj: Add missing includes for MPI build
May 21, 2019
cc9960b
DRR - Cpptraj: Attempt to add parallel netcdf to jenkins MPI build.
May 21, 2019
10d0e35
DRR - Add ssh to docker container to try to fix this error:
May 21, 2019
fbee75a
DRR - Cpptraj: Give up on pnetcdf test for now. Will try again in a f…
May 21, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified doc/CpptrajManual.pdf
Binary file not shown.
70 changes: 66 additions & 4 deletions doc/cpptraj.lyx
Original file line number Diff line number Diff line change
Expand Up @@ -13929,15 +13929,27 @@ Options for pdb format:
\end_layout

\begin_layout LyX-Code
[model | multi] [dumpq | parse | vdw] [chainid <ID>]
[dumpq | parse | vdw] [pdbres] [pdbatom]
\end_layout

\begin_layout LyX-Code
[pdbres] [pdbatom] [pdbv3] [teradvance] [usecol21]
\begin_inset Separator latexpar
\end_inset
[pdbv3] [teradvance] [terbyres | pdbter | noter]
\end_layout

\begin_layout LyX-Code
[model | multi] [chainid <ID>] [sg <group>]
\end_layout

\begin_layout LyX-Code
[include_ep] [conect] [keepext] [usecol21]
\end_layout

\begin_layout LyX-Code
[bfacdata <set>] [occdata <set>] [bfacbyres] [occbyres]
\end_layout

\begin_layout LyX-Code
[bfacscale] [occscale] [bfacmax <max>] [occmax <max>]
\end_layout

\begin_deeper
Expand Down Expand Up @@ -14026,6 +14038,56 @@ keepext Keep filename extension; write '<name>.<num>.<ext>' instead (implies
usecol21 Use column 21 for 4-letter residue names.
\end_layout

\begin_layout Description
bfacdata
\begin_inset space ~
\end_inset

<set> Use data in <set> for B-factor column.
\end_layout

\begin_layout Description
occdata
\begin_inset space ~
\end_inset

<set> Use data in <set> for occupancy column.
\end_layout

\begin_layout Description
bfacbyres If specified assume X values in B-factor data set are residue
numbers.
\end_layout

\begin_layout Description
occbyres If specified assume X values in occupancy data set are residue
numbers.
\end_layout

\begin_layout Description
bfacscale If specified scale values in B-factor column between 0 and <bfacmax>.
\end_layout

\begin_layout Description
occscale If specified scale values in occupancy column between 0 and <occmax>.
\end_layout

\begin_layout Description
bfacmax
\begin_inset space ~
\end_inset

<max> Max value for bfacscale.
\end_layout

\begin_layout Description
occmax
\begin_inset space ~
\end_inset

<max> Max value for occscale.
\end_layout

\end_deeper
\begin_layout Subsubsection

Expand Down
1 change: 1 addition & 0 deletions src/Action_Average.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ Action::RetType Action_Average::Init(ArgList& actionArgs, ActionInit& init, int
if (crdset_ == 0) {
outtraj_.SetDebug( debug_ );
if (outtraj_.InitEnsembleTrajWrite(avgfilename, actionArgs.RemainingArgs(),
init.DSL(),
TrajectoryFile::UNKNOWN_TRAJ, init.DSL().EnsembleNum()))
return Action::ERR;
}
Expand Down
5 changes: 3 additions & 2 deletions src/Action_LESsplit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,13 @@ Action::RetType Action_LESsplit::Init(ArgList& actionArgs, ActionInit& init, int
// NOTE: Cannot yet init split traj since we dont know how many.
if (lesAverage_) {
avgTraj_.SetDebug( debugIn );
if (avgTraj_.InitTrajWrite( avgfilename, trajArgs_, TrajectoryFile::UNKNOWN_TRAJ ))
if (avgTraj_.InitTrajWrite( avgfilename, trajArgs_, init.DSL(), TrajectoryFile::UNKNOWN_TRAJ ))
return Action::ERR;
# ifdef MPI
avgTraj_.SetTrajComm( trajComm_ );
# endif
}
masterDSL_ = init.DslPtr();

mprintf(" LESSPLIT:\n");
if (lesSplit_) mprintf("\tSplit output to '%s.X'\n", splitfilename_.c_str());
Expand Down Expand Up @@ -93,7 +94,7 @@ Action::RetType Action_LESsplit::Setup(ActionSetup& setup) {
for (unsigned int idx = 0; idx != lesMasks_.size(); idx++) {
// FIXME this will have to be changed if lessplit every enabled for ensemble
lesTraj_.push_back( new Trajout_Single() );
if (lesTraj_.back()->InitEnsembleTrajWrite( splitfilename_, trajArgs_,
if (lesTraj_.back()->InitEnsembleTrajWrite( splitfilename_, trajArgs_, *masterDSL_,
TrajectoryFile::UNKNOWN_TRAJ, idx ))
return Action::ERR;
# ifdef MPI
Expand Down
1 change: 1 addition & 0 deletions src/Action_LESsplit.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class Action_LESsplit : public Action {
Frame lesFrame_; ///< Frame for LES split
Frame avgFrame_; ///< Frame for LES average
Topology* lesParm_; ///< Topology for LES split/average
DataSetList* masterDSL_;
# ifdef MPI
Parallel::Comm trajComm_;
# endif
Expand Down
2 changes: 1 addition & 1 deletion src/Action_Mask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Action::RetType Action_Mask::Init(ArgList& actionArgs, ActionInit& init, int deb
trajFmt = TrajectoryFile::MOL2FILE;
trajArgs = ArgList("multi nobox");
}
if (outtraj_.InitEnsembleTrajWrite(maskpdb, trajArgs, trajFmt, init.DSL().EnsembleNum()))
if (outtraj_.InitEnsembleTrajWrite(maskpdb, trajArgs, init.DSL(), trajFmt, init.DSL().EnsembleNum()))
return Action::ERR;
writeTraj_ = true;
} else
Expand Down
2 changes: 1 addition & 1 deletion src/Action_Outtraj.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ Action::RetType Action_Outtraj::Init(ArgList& actionArgs, ActionInit& init, int
// Initialize output trajectory with remaining arguments
if (isActive_) {
outtraj_.SetDebug(debugIn);
if ( outtraj_.InitEnsembleTrajWrite(trajfilename, actionArgs.RemainingArgs(),
if ( outtraj_.InitEnsembleTrajWrite(trajfilename, actionArgs.RemainingArgs(), init.DSL(),
TrajectoryFile::UNKNOWN_TRAJ, init.DSL().EnsembleNum()) )
return Action::ERR;
}
Expand Down
3 changes: 2 additions & 1 deletion src/Action_Pairwise.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,8 @@ int Action_Pairwise::WriteCutFrame(int frameNum, Topology const& Parm, AtomMask
CutParm->SetAtom(i).SetCharge( CutCharges[i] );
int err = 0;
Trajout_Single tout;
if (tout.PrepareTrajWrite(outfilename, "multi", CutParm, CoordinateInfo(), 1,
// NOTE: Since no user-specified arguments, pass in blank data set list.
if (tout.PrepareTrajWrite(outfilename, "multi", DataSetList(), CutParm, CoordinateInfo(), 1,
TrajectoryFile::MOL2FILE))
{
mprinterr("Error: Could not set up cut mol2 file %s\n", outfilename.c_str());
Expand Down
2 changes: 1 addition & 1 deletion src/Action_ReplicateCell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ Action::RetType Action_ReplicateCell::Init(ArgList& actionArgs, ActionInit& init
// Initialize output trajectory with remaining arguments
if (!trajfilename.empty()) {
outtraj_.SetDebug( debugIn );
if ( outtraj_.InitEnsembleTrajWrite(trajfilename, actionArgs.RemainingArgs(),
if ( outtraj_.InitEnsembleTrajWrite(trajfilename, actionArgs.RemainingArgs(), init.DSL(),
TrajectoryFile::UNKNOWN_TRAJ, init.DSL().EnsembleNum()) )
return Action::ERR;
writeTraj_ = true;
Expand Down
10 changes: 5 additions & 5 deletions src/Analysis_Clustering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1005,7 +1005,7 @@ void Analysis_Clustering::WriteClusterTraj( ClusterList const& CList ) {
std::string cfilename = clusterfile_ + ".c" + integerToString( cnum );
// Set up trajectory file
Trajout_Single clusterout;
if (clusterout.PrepareTrajWrite(cfilename, ArgList(), clusterparm,
if (clusterout.PrepareTrajWrite(cfilename, ArgList(), DataSetList(), clusterparm,
coords_->CoordsInfo(), C->Nframes(),
clusterfmt_))
{
Expand Down Expand Up @@ -1041,7 +1041,7 @@ void Analysis_Clustering::WriteAvgStruct( ClusterList const& CList ) {
std::string cfilename = avgfile_ + ".c" + integerToString( cnum ) + tmpExt;
// Set up trajectory file
Trajout_Single clusterout; // FIXME CoordinateInfo OK for just coords?
if (clusterout.PrepareTrajWrite(cfilename, ArgList(), &avgparm,
if (clusterout.PrepareTrajWrite(cfilename, ArgList(), DataSetList(), &avgparm,
CoordinateInfo(), 1, avgfmt_))
{
mprinterr("Error: Could not set up cluster average file %s for write.\n",
Expand Down Expand Up @@ -1075,7 +1075,7 @@ void Analysis_Clustering::WriteSingleRepTraj( ClusterList const& CList ) {
Trajout_Single clusterout;
// Set up trajectory file. Use parm from COORDS DataSet.
Topology *clusterparm = coords_->TopPtr();
if (clusterout.PrepareTrajWrite(singlerepfile_, ArgList(), clusterparm,
if (clusterout.PrepareTrajWrite(singlerepfile_, ArgList(), DataSetList(), clusterparm,
coords_->CoordsInfo(), CList.Nclusters() * nRepsToSave_,
singlerepfmt_))
{
Expand Down Expand Up @@ -1127,7 +1127,7 @@ void Analysis_Clustering::WriteRepTraj( ClusterList const& CList ) {
std::string cfilename = reptrajfile_ + ".c" + integerToString(C->Num()) +
("." + integerToString(framenum+1)) + tmpExt;
// Set up trajectory file.
if (clusterout.PrepareTrajWrite(cfilename, ArgList(), clusterparm,
if (clusterout.PrepareTrajWrite(cfilename, ArgList(), DataSetList(), clusterparm,
coords_->CoordsInfo(), 1, reptrajfmt_))
{
mprinterr("Error: Could not set up representative trajectory file %s for write.\n",
Expand All @@ -1146,7 +1146,7 @@ void Analysis_Clustering::WriteRepTraj( ClusterList const& CList ) {
// Create filename based on cluster number
std::string cfilename = reptrajfile_ + ".c" + integerToString(C->Num()) + tmpExt;
// Set up trajectory file.
if (clusterout.PrepareTrajWrite(cfilename, ArgList(), clusterparm,
if (clusterout.PrepareTrajWrite(cfilename, ArgList(), DataSetList(), clusterparm,
coords_->CoordsInfo(), nRepsToSave_, reptrajfmt_))
{
mprinterr("Error: Could not set up representative trajectory file %s for write.\n",
Expand Down
2 changes: 1 addition & 1 deletion src/Analysis_Hist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ Analysis::RetType Analysis_Hist::Analyze() {
mprinterr("Error: Could not write pseudo topology to '%s'\n", parmoutName_.c_str());
}
Trajout_Single out;
if (out.PrepareTrajWrite(traj3dName_, ArgList(), &pseudo, CoordinateInfo(),
if (out.PrepareTrajWrite(traj3dName_, ArgList(), DataSetList(), &pseudo, CoordinateInfo(),
Ndata, traj3dFmt_) == 0)
{
Frame outFrame(1);
Expand Down
2 changes: 1 addition & 1 deletion src/Analysis_Modes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ Analysis::RetType Analysis_Modes::Setup(ArgList& analyzeArgs, AnalysisSetup& set
return Analysis::ERR;
}
// Setup output traj
if (trajout_.InitTrajWrite( tOutName, ArgList(), tOutFmt ) != 0) {
if (trajout_.InitTrajWrite( tOutName, ArgList(), DataSetList(), tOutFmt ) != 0) {
mprinterr("Error: Could not init output trajectory.\n");
return Analysis::ERR;
}
Expand Down
3 changes: 2 additions & 1 deletion src/Analysis_Wavelet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ int Analysis_Wavelet::WAFEX(DataSet_MatrixFlt const& matrix) {
// Set up trajectory file
int nframes = CL->MaxCol() - CL->MinCol() + 1;
Trajout_Single clusterout;
if (clusterout.PrepareTrajWrite(cfilename, ArgList(), regionTop,
if (clusterout.PrepareTrajWrite(cfilename, ArgList(), DataSetList(), regionTop,
CoordinateInfo(), nframes, TrajectoryFile::PDBFILE))
return Analysis::ERR;
// Setup frame for region
Expand Down Expand Up @@ -564,6 +564,7 @@ int Analysis_Wavelet::WAFEX(DataSet_MatrixFlt const& matrix) {
int nframes = (int)coords_->Size();
Trajout_Single overlay;
if (overlay.PrepareTrajWrite(overlayName_, "title 'Wavelet trajectory'",
DataSetList(),
maskTop, CoordinateInfo(), nframes,
TrajectoryFile::UNKNOWN_TRAJ))
return Analysis::ERR;
Expand Down
1 change: 1 addition & 0 deletions src/Box.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#ifndef INC_BOX_H
#define INC_BOX_H
#include "Matrix_3x3.h"
#include "Vec3.h"
#ifdef MPI
# include "Parallel.h"
#endif
Expand Down
3 changes: 0 additions & 3 deletions src/CoordinateInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
#include <string>
#include "ReplicaDimArray.h"
#include "Box.h"
#ifdef MPI
# include "Parallel.h"
#endif
/// All metadata associated with a Frame.
class CoordinateInfo {
public:
Expand Down
1 change: 1 addition & 0 deletions src/Cpptraj.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include "TopInfo.h" // ProcessMask
#include "Timer.h"
#include "StringRoutines.h" // TimeString
#include "TrajectoryFile.h" // for autodetect
#ifdef CUDA
# include <cuda_runtime_api.h>
#endif
Expand Down
5 changes: 3 additions & 2 deletions src/CpptrajState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include "Action_CreateCrd.h" // in case default COORDS need to be created
#include "DataSet_Coords_REF.h" // AddReference
#include "DataSet_Topology.h" // AddTopology
#include "FrameArray.h" // RunEnsemble
#include "ProgressBar.h"
#ifdef MPI
# include "Parallel.h"
Expand Down Expand Up @@ -127,9 +128,9 @@ int CpptrajState::AddOutputTrajectory( ArgList& argIn ) {
Topology* top = DSL_.GetTopology( argIn );
int err = 1;
if (mode_ == NORMAL)
err = trajoutList_.AddTrajout( fname, argIn, top );
err = trajoutList_.AddTrajout( fname, argIn, DSL_, top );
else if (mode_ == ENSEMBLE)
err = ensembleOut_.AddEnsembleOut( fname, argIn, top, trajinList_.EnsembleSize() );
err = ensembleOut_.AddEnsembleOut( fname, argIn, DSL_, top, trajinList_.EnsembleSize() );
return err;
}

Expand Down
2 changes: 1 addition & 1 deletion src/DataIO_VecTraj.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ int DataIO_VecTraj::WriteData(FileName const& fname, DataSetList const& SetList)
}
// Write out vectors
Trajout_Single out;
if (out.PrepareTrajWrite(fname, ArgList(), &pseudo, CoordinateInfo(),
if (out.PrepareTrajWrite(fname, ArgList(), DataSetList(), &pseudo, CoordinateInfo(),
vec_size, trajoutFmt_) == 0)
{
Frame outFrame(pseudo.Natom());
Expand Down
5 changes: 3 additions & 2 deletions src/DataSetList.h
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
#ifndef INC_DATASETLIST_H
#define INC_DATASETLIST_H
#include <vector>
#include "DataSet.h"
#include "ArgList.h" // GetReferenceFrame, GetTopology
#include "ReferenceFrame.h" // GetReferenceFrame
#ifdef TIMER
# include "Timer.h"
#endif
// Forward declarations
class DataSet;
class ArgList;
/// Hold list of DataSets.
/** Main class for handling DataSets. All DataSet types can be allocated
* by DataSetList. There is a master DataSetList in CpptrajState that will
Expand Down
3 changes: 2 additions & 1 deletion src/DataSet_Coords_REF.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#ifndef INC_DATASET_COORDS_REF_H
#define INC_DATASET_COORDS_REF_H
#include "DataSet_Coords.h"
#include "ArgList.h"
// Forward declarations
class ArgList;
/// Store a single reference frame in double precision.
class DataSet_Coords_REF : public DataSet_Coords {
public:
Expand Down
6 changes: 5 additions & 1 deletion src/EnsembleIn.h
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
#ifndef INC_ENSEMBLEIN_H
#define INC_ENSEMBLEIN_H
#include "InputTrajCommon.h"
#include "FrameArray.h"
// Not forward-declared because is just a typedef
#include "FramePtrArray.h"
#include "ReplicaInfo.h"
#include "Frame.h" // For RemdIdxType TODO put RemdIdxType in ReplicaInfo
#ifdef MPI
# include "Parallel.h"
# ifdef TIMER
# include "Timer.h"
# endif
#endif
// Forward declarations
class FrameArray;
class CoordinateInfo;
/// Read in an array of frames at a time.
class EnsembleIn {
public:
Expand Down
1 change: 1 addition & 0 deletions src/EnsembleIn_Multi.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "EnsembleIn_Multi.h"
#include "FrameArray.h"
#include "CpptrajStdio.h"
#include "DataFile.h" // TODO remove
#include "StringRoutines.h" // integerToString TODO remove
Expand Down
3 changes: 3 additions & 0 deletions src/EnsembleIn_Single.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#ifdef ENABLE_SINGLE_ENSEMBLE
#include "EnsembleIn_Single.h"
#include "TrajectoryIO.h"
#include "Topology.h"
#include "FrameArray.h"
#include "TrajectoryFile.h"
#include "CpptrajStdio.h"

Expand Down
3 changes: 2 additions & 1 deletion src/EnsembleIn_Single.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
#define INC_ENSEMBLEIN_SINGLE_H
#ifdef ENABLE_SINGLE_ENSEMBLE
#include "EnsembleIn.h"
#include "TrajectoryIO.h"
// Forward declarations
class TrajectoryIO;
/// Read in an array of frames at a time from a single file.
class EnsembleIn_Single : public EnsembleIn {
public:
Expand Down
5 changes: 4 additions & 1 deletion src/EnsembleOut.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#ifndef INC_ENSEMBLEOUT_H
#define INC_ENSEMBLEOUT_H
#include "OutputTrajCommon.h"
#include "FramePtrArray.h"
// Forward Declarations
class DataSetList;
/// Write out an array of frames at a time.
class EnsembleOut {
public:
Expand All @@ -9,7 +12,7 @@ class EnsembleOut {
void SetDebug(int d) { debug_ = d; }
// ----- Inherited Functions -----------------
/// Prepare ensemble for writing given format, no Topology setup.
virtual int InitEnsembleWrite(std::string const&, ArgList const&,
virtual int InitEnsembleWrite(std::string const&, ArgList const&, DataSetList const&,
int, TrajectoryFile::TrajFormatType) = 0;
/// Perform Topology-related setup for ensemble and open. TODO const&
virtual int SetupEnsembleWrite(Topology*, CoordinateInfo const&, int) = 0;
Expand Down
Loading