From 9c4a0e678d121b20350e8628520ec6d71305436c Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 25 Nov 2019 10:12:57 -0500 Subject: [PATCH 01/58] DRR - Initial incarnation of evalequilibration --- src/Analysis_EvalEquilibration.cpp | 68 ++++++++++++++++++++++++++++++ src/Analysis_EvalEquilibration.h | 18 ++++++++ 2 files changed, 86 insertions(+) create mode 100644 src/Analysis_EvalEquilibration.cpp create mode 100644 src/Analysis_EvalEquilibration.h diff --git a/src/Analysis_EvalEquilibration.cpp b/src/Analysis_EvalEquilibration.cpp new file mode 100644 index 0000000000..12f965529f --- /dev/null +++ b/src/Analysis_EvalEquilibration.cpp @@ -0,0 +1,68 @@ +#include "Analysis_EvalEquilibration.h" +#include "CpptrajStdio.h" +#include "DataSet_1D.h" +#include "RPNcalc.h" + +Analysis_EvalEquilibration::Analysis_EvalEquilibration() : + Analysis(HIDDEN), + setIn_(0), + debug_(0) +{} + +// Analysis_EvalEquilibration::Help() +void Analysis_EvalEquilibration::Help() const { + mprintf("\n"); +} + +// Analysis_EvalEquilibration::Setup() +Analysis::RetType Analysis_EvalEquilibration::Setup(ArgList& analyzeArgs, AnalysisSetup& setup, int debugIn) +{ + debug_ = debugIn; + std::string setInName = analyzeArgs.GetStringKey("set"); + if (setInName.empty()) { + mprinterr("Error: Must specify input data set.\n"); + return Analysis::ERR; + } + setIn_ = setup.DSL().GetDataSet( setInName ); + if (setIn_ == 0) { + mprinterr("Error: '%s' matches no data sets.\n", setInName.c_str()); + return Analysis::ERR; + } + if (setIn_->Group() != DataSet::SCALAR_1D) { + mprinterr("Error: '%s' is not a 1D scalar set.\n", setIn_->legend()); + return Analysis::ERR; + } + dsname_ = analyzeArgs.GetStringKey("name"); + if (dsname_.empty()) + dsname_ = setup.DSL().GenerateDefaultName("EvalEquil"); + + mprintf(" EVALEQUILIBRATION: Evaluate equilibration of set '%s'\n", setIn_->legend()); + mprintf("\tOutput set name: %s\n", dsname_.c_str()); + + return Analysis::OK; +} + +// Analysis_EvalEquilibration::Analyze() +Analysis::RetType Analysis_EvalEquilibration::Analyze() { + // First do a linear fit. + if (setIn_->Size() < 2) { + mprinterr("Error: Not enough data in '%s' to evaluate.\n", setIn_->legend()); + return Analysis::ERR; + } + double slope, intercept, correl; + DataSet_1D const& DS = static_cast( *setIn_ ); + CpptrajFile statsout; + statsout.OpenWrite(""); + int err = DS.LinearRegression( slope, intercept, correl, &statsout ); + + if (err != 0) { + mprinterr("Error: Could not perform linear regression fit.\n"); + return Analysis::ERR; + } + + RPNcalc calc; + calc.SetDebug(debug_); + + //if (calc.ProcessExpression( dsname_ + " + return Analysis::OK; +} diff --git a/src/Analysis_EvalEquilibration.h b/src/Analysis_EvalEquilibration.h new file mode 100644 index 0000000000..59c6fbd6e7 --- /dev/null +++ b/src/Analysis_EvalEquilibration.h @@ -0,0 +1,18 @@ +#ifndef INC_ANALYSIS_EVALEQUILIBRATION_H +#define INC_ANALYSIS_EVALEQUILIBRATION_H +#include "Analysis.h" +/// +class Analysis_EvalEquilibration : public Analysis { + public: + Analysis_EvalEquilibration(); + DispatchObject* Alloc() const { return (DispatchObject*)new Analysis_EvalEquilibration(); } + void Help() const; + + Analysis::RetType Setup(ArgList&, AnalysisSetup&, int); + Analysis::RetType Analyze(); + private: + DataSet* setIn_; + std::string dsname_; ///< Output set name + int debug_; +}; +#endif From 9cd4e390b01840afe37f255b46da061c0b2e13ad Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 25 Nov 2019 10:31:39 -0500 Subject: [PATCH 02/58] DRR - Enable evalequil --- src/Command.cpp | 2 ++ src/cpptrajdepend | 3 ++- src/cpptrajfiles | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Command.cpp b/src/Command.cpp index b0923e42ba..07fcd3efe7 100644 --- a/src/Command.cpp +++ b/src/Command.cpp @@ -182,6 +182,7 @@ #include "Analysis_ConstantPHStats.h" #include "Analysis_HausdorffDistance.h" #include "Analysis_Slope.h" +#include "Analysis_EvalEquilibration.h" CmdList Command::commands_ = CmdList(); @@ -377,6 +378,7 @@ void Command::Init() { Command::AddCmd( new Analysis_CurveFit(), Cmd::ANA, 1, "curvefit" ); Command::AddCmd( new Analysis_Matrix(), Cmd::ANA, 2, "diagmatrix", "matrix" ); Command::AddCmd( new Analysis_Divergence(), Cmd::ANA, 1, "divergence" ); + Command::AddCmd( new Analysis_EvalEquilibration(), Cmd::ANA, 1, "evalequil" ); Command::AddCmd( new Analysis_FFT(), Cmd::ANA, 1, "fft" ); Command::AddCmd( new Analysis_HausdorffDistance,Cmd::ANA,1,"hausdorff" ); Command::AddCmd( new Analysis_Hist(), Cmd::ANA, 2, "hist", "histogram" ); diff --git a/src/cpptrajdepend b/src/cpptrajdepend index 8791a26e10..6f965b991b 100644 --- a/src/cpptrajdepend +++ b/src/cpptrajdepend @@ -99,6 +99,7 @@ Analysis_CrdFluct.o : Analysis_CrdFluct.cpp ActionState.h Analysis.h AnalysisSta Analysis_CrossCorr.o : Analysis_CrossCorr.cpp ActionState.h Analysis.h AnalysisState.h Analysis_CrossCorr.h ArgList.h Array1D.h ArrayIterator.h AssociatedData.h Atom.h AtomExtra.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataFile.h DataFileList.h DataIO.h DataSet.h DataSetList.h DataSet_1D.h DataSet_2D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_MatrixFlt.h Dimension.h DispatchObject.h FileIO.h FileName.h FileTypes.h Frame.h MaskToken.h Matrix.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h StringRoutines.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Vec3.h Analysis_CurveFit.o : Analysis_CurveFit.cpp ActionState.h Analysis.h AnalysisState.h Analysis_CurveFit.h ArgList.h AssociatedData.h Atom.h AtomExtra.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h CurveFit.h DataFile.h DataFileList.h DataIO.h DataSet.h DataSetList.h DataSet_1D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_Mesh.h Dimension.h DispatchObject.h FileIO.h FileName.h FileTypes.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h RPNcalc.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Spline.h StringRoutines.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Vec3.h Analysis_Divergence.o : Analysis_Divergence.cpp ActionState.h Analysis.h AnalysisState.h Analysis_Divergence.h ArgList.h AssociatedData.h Atom.h AtomExtra.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataFile.h DataFileList.h DataIO.h DataSet.h DataSetList.h DataSet_1D.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h FileIO.h FileName.h FileTypes.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Vec3.h +Analysis_EvalEquilibration.o : Analysis_EvalEquilibration.cpp ActionState.h Analysis.h AnalysisState.h Analysis_EvalEquilibration.h ArgList.h AssociatedData.h Atom.h AtomExtra.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataFile.h DataFileList.h DataIO.h DataSet.h DataSetList.h DataSet_1D.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h FileIO.h FileName.h FileTypes.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h RPNcalc.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Vec3.h Analysis_FFT.o : Analysis_FFT.cpp ActionState.h Analysis.h AnalysisState.h Analysis_FFT.h ArgList.h Array1D.h ArrayIterator.h AssociatedData.h Atom.h AtomExtra.h AtomMask.h AtomType.h BaseIOtype.h Box.h ComplexArray.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataFile.h DataFileList.h DataIO.h DataSet.h DataSetList.h DataSet_1D.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h FileIO.h FileName.h FileTypes.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h PubFFT.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Vec3.h Analysis_HausdorffDistance.o : Analysis_HausdorffDistance.cpp ActionState.h Analysis.h AnalysisState.h Analysis_HausdorffDistance.h ArgList.h ArrayIterator.h AssociatedData.h Atom.h AtomExtra.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataFile.h DataFileList.h DataIO.h DataSet.h DataSetList.h DataSet_2D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_MatrixFlt.h Dimension.h DispatchObject.h FileIO.h FileName.h FileTypes.h Frame.h MaskToken.h Matrix.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Vec3.h Analysis_Hist.o : Analysis_Hist.cpp ActionFrameCounter.h ActionState.h Analysis.h AnalysisState.h Analysis_Hist.h ArgList.h ArrayIterator.h AssociatedData.h Atom.h AtomExtra.h AtomMask.h AtomType.h BaseIOtype.h BondSearch.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataFile.h DataFileList.h DataIO.h DataSet.h DataSetList.h DataSet_1D.h DataSet_2D.h DataSet_3D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_GridFlt.h DataSet_MatrixDbl.h DataSet_double.h Dimension.h DispatchObject.h FileIO.h FileName.h FileTypes.h Frame.h Grid.h GridBin.h HistBin.h MaskToken.h Matrix.h Matrix_3x3.h MetaData.h Molecule.h NameType.h OutputTrajCommon.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h ParmFile.h ParmIO.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h StringRoutines.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajectoryFile.h Trajout_Single.h TypeNameHolder.h Vec3.h @@ -157,7 +158,7 @@ Cluster_ReadInfo.o : Cluster_ReadInfo.cpp ArgList.h ArrayIterator.h AssociatedDa Cmd.o : Cmd.cpp Cmd.h DispatchObject.h CmdInput.o : CmdInput.cpp CmdInput.h StringRoutines.h CmdList.o : CmdList.cpp Cmd.h CmdList.h DispatchObject.h -Command.o : Command.cpp Action.h ActionFrameCounter.h ActionList.h ActionState.h Action_Align.h Action_Angle.h Action_AreaPerMol.h Action_AtomMap.h Action_AtomicCorr.h Action_AtomicFluct.h Action_AutoImage.h Action_Average.h Action_Bounds.h Action_Box.h Action_Center.h Action_Channel.h Action_CheckChirality.h Action_CheckStructure.h Action_Closest.h Action_ClusterDihedral.h Action_Contacts.h Action_CreateCrd.h Action_CreateReservoir.h Action_DNAionTracker.h Action_DSSP.h Action_Density.h Action_Diffusion.h Action_Dihedral.h Action_DihedralRMS.h Action_Dipole.h Action_DistRmsd.h Action_Distance.h Action_Energy.h Action_Esander.h Action_FilterByData.h Action_FixAtomOrder.h Action_FixImagedBonds.h Action_GIST.h Action_Grid.h Action_GridFreeEnergy.h Action_HydrogenBond.h Action_Image.h Action_InfraredSpectrum.h Action_Jcoupling.h Action_LESsplit.h Action_LIE.h Action_LipidOrder.h Action_MakeStructure.h Action_Mask.h Action_Matrix.h Action_MinImage.h Action_Molsurf.h Action_MultiDihedral.h Action_MultiVector.h Action_NAstruct.h Action_NMRrst.h Action_NativeContacts.h Action_OrderParameter.h Action_Outtraj.h Action_PairDist.h Action_Pairwise.h Action_Principal.h Action_Projection.h Action_Pucker.h Action_Radgyr.h Action_Radial.h Action_RandomizeIons.h Action_Remap.h Action_ReplicateCell.h Action_Rmsd.h Action_Rotate.h Action_RunningAvg.h Action_STFC_Diffusion.h Action_Scale.h Action_SetVelocity.h Action_Spam.h Action_Strip.h Action_Surf.h Action_SymmetricRmsd.h Action_Temperature.h Action_Time.h Action_Translate.h Action_Unstrip.h Action_Unwrap.h Action_Vector.h Action_VelocityAutoCorr.h Action_Volmap.h Action_Volume.h Action_Watershell.h Action_XtalSymm.h Analysis.h AnalysisList.h AnalysisState.h Analysis_AmdBias.h Analysis_AutoCorr.h Analysis_Average.h Analysis_Clustering.h Analysis_ConstantPHStats.h Analysis_Corr.h Analysis_CrankShaft.h Analysis_CrdFluct.h Analysis_CrossCorr.h Analysis_CurveFit.h Analysis_Divergence.h Analysis_FFT.h Analysis_HausdorffDistance.h Analysis_Hist.h Analysis_IRED.h Analysis_Integrate.h Analysis_KDE.h Analysis_Lifetime.h Analysis_LowestCurve.h Analysis_Matrix.h Analysis_MeltCurve.h Analysis_Modes.h Analysis_MultiHist.h Analysis_Multicurve.h Analysis_Overlap.h Analysis_PhiPsi.h Analysis_Regression.h Analysis_RemLog.h Analysis_Rms2d.h Analysis_RmsAvgCorr.h Analysis_Rotdif.h Analysis_RunningAvg.h Analysis_Slope.h Analysis_Spline.h Analysis_State.h Analysis_Statistics.h Analysis_TI.h Analysis_Timecorr.h Analysis_VectorMath.h Analysis_Wavelet.h ArgList.h Array1D.h ArrayIterator.h AssociatedData.h Atom.h AtomExtra.h AtomMap.h AtomMask.h AtomType.h AxisType.h BaseIOtype.h Box.h BufferedLine.h CharMask.h ClusterDist.h ClusterList.h ClusterMap.h ClusterNode.h ClusterSieve.h Cmd.h CmdInput.h CmdList.h Command.h ComplexArray.h Constants.h Constraints.h Control.h CoordinateInfo.h Corr.h Cph.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataIO.h DataSet.h DataSetList.h DataSet_1D.h DataSet_2D.h DataSet_3D.h DataSet_Cmatrix.h DataSet_Coords.h DataSet_Coords_CRD.h DataSet_Coords_REF.h DataSet_GridFlt.h DataSet_Mat3x3.h DataSet_MatrixDbl.h DataSet_MatrixFlt.h DataSet_Mesh.h DataSet_Modes.h DataSet_RemLog.h DataSet_Vector.h DataSet_double.h DataSet_float.h DataSet_integer.h DataSet_integer_mem.h DataSet_pH.h DataSet_string.h Deprecated.h DihedralSearch.h Dimension.h DispatchObject.h DistRoutines.h Energy.h Energy_Sander.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Analyze.h Exec_Calc.h Exec_CatCrd.h Exec_Change.h Exec_ClusterMap.h Exec_CombineCoords.h Exec_Commands.h Exec_CompareTop.h Exec_CrdAction.h Exec_CrdOut.h Exec_CreateSet.h Exec_DataFile.h Exec_DataFilter.h Exec_DataSetCmd.h Exec_GenerateAmberRst.h Exec_Help.h Exec_LoadCrd.h Exec_LoadTraj.h Exec_ParallelAnalysis.h Exec_ParmBox.h Exec_ParmSolvent.h Exec_ParmStrip.h Exec_ParmWrite.h Exec_PermuteDihedrals.h Exec_Precision.h Exec_PrintData.h Exec_ReadData.h Exec_ReadEnsembleData.h Exec_ReadInput.h Exec_RotateDihedral.h Exec_RunAnalysis.h Exec_ScaleDihedralK.h Exec_SequenceAlign.h Exec_SortEnsembleData.h Exec_SplitCoords.h Exec_System.h Exec_Top.h Exec_Traj.h Exec_UpdateParameters.h Exec_ViewRst.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h Grid.h GridAction.h GridBin.h HistBin.h Hungarian.h ImageTypes.h ImagedAction.h InputTrajCommon.h MapAtom.h MaskArray.h MaskToken.h Matrix.h Matrix_3x3.h MetaData.h Molecule.h NameType.h NetcdfFile.h OnlineVarT.h OutputTrajCommon.h PDBfile.h PairList.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h PubFFT.h RPNcalc.h Random.h Range.h ReferenceAction.h ReferenceFrame.h RemdReservoirNC.h ReplicaDimArray.h ReplicaInfo.h Residue.h Spline.h StructureCheck.h SymbolExporting.h SymmetricRmsdCalc.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h TrajectoryFile.h Trajin.h TrajinList.h TrajoutList.h Trajout_Single.h TypeNameHolder.h VariableArray.h Vec3.h molsurf.h +Command.o : Command.cpp Action.h ActionFrameCounter.h ActionList.h ActionState.h Action_Align.h Action_Angle.h Action_AreaPerMol.h Action_AtomMap.h Action_AtomicCorr.h Action_AtomicFluct.h Action_AutoImage.h Action_Average.h Action_Bounds.h Action_Box.h Action_Center.h Action_Channel.h Action_CheckChirality.h Action_CheckStructure.h Action_Closest.h Action_ClusterDihedral.h Action_Contacts.h Action_CreateCrd.h Action_CreateReservoir.h Action_DNAionTracker.h Action_DSSP.h Action_Density.h Action_Diffusion.h Action_Dihedral.h Action_DihedralRMS.h Action_Dipole.h Action_DistRmsd.h Action_Distance.h Action_Energy.h Action_Esander.h Action_FilterByData.h Action_FixAtomOrder.h Action_FixImagedBonds.h Action_GIST.h Action_Grid.h Action_GridFreeEnergy.h Action_HydrogenBond.h Action_Image.h Action_InfraredSpectrum.h Action_Jcoupling.h Action_LESsplit.h Action_LIE.h Action_LipidOrder.h Action_MakeStructure.h Action_Mask.h Action_Matrix.h Action_MinImage.h Action_Molsurf.h Action_MultiDihedral.h Action_MultiVector.h Action_NAstruct.h Action_NMRrst.h Action_NativeContacts.h Action_OrderParameter.h Action_Outtraj.h Action_PairDist.h Action_Pairwise.h Action_Principal.h Action_Projection.h Action_Pucker.h Action_Radgyr.h Action_Radial.h Action_RandomizeIons.h Action_Remap.h Action_ReplicateCell.h Action_Rmsd.h Action_Rotate.h Action_RunningAvg.h Action_STFC_Diffusion.h Action_Scale.h Action_SetVelocity.h Action_Spam.h Action_Strip.h Action_Surf.h Action_SymmetricRmsd.h Action_Temperature.h Action_Time.h Action_Translate.h Action_Unstrip.h Action_Unwrap.h Action_Vector.h Action_VelocityAutoCorr.h Action_Volmap.h Action_Volume.h Action_Watershell.h Action_XtalSymm.h Analysis.h AnalysisList.h AnalysisState.h Analysis_AmdBias.h Analysis_AutoCorr.h Analysis_Average.h Analysis_Clustering.h Analysis_ConstantPHStats.h Analysis_Corr.h Analysis_CrankShaft.h Analysis_CrdFluct.h Analysis_CrossCorr.h Analysis_CurveFit.h Analysis_Divergence.h Analysis_EvalEquilibration.h Analysis_FFT.h Analysis_HausdorffDistance.h Analysis_Hist.h Analysis_IRED.h Analysis_Integrate.h Analysis_KDE.h Analysis_Lifetime.h Analysis_LowestCurve.h Analysis_Matrix.h Analysis_MeltCurve.h Analysis_Modes.h Analysis_MultiHist.h Analysis_Multicurve.h Analysis_Overlap.h Analysis_PhiPsi.h Analysis_Regression.h Analysis_RemLog.h Analysis_Rms2d.h Analysis_RmsAvgCorr.h Analysis_Rotdif.h Analysis_RunningAvg.h Analysis_Slope.h Analysis_Spline.h Analysis_State.h Analysis_Statistics.h Analysis_TI.h Analysis_Timecorr.h Analysis_VectorMath.h Analysis_Wavelet.h ArgList.h Array1D.h ArrayIterator.h AssociatedData.h Atom.h AtomExtra.h AtomMap.h AtomMask.h AtomType.h AxisType.h BaseIOtype.h Box.h BufferedLine.h CharMask.h ClusterDist.h ClusterList.h ClusterMap.h ClusterNode.h ClusterSieve.h Cmd.h CmdInput.h CmdList.h Command.h ComplexArray.h Constants.h Constraints.h Control.h CoordinateInfo.h Corr.h Cph.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataIO.h DataSet.h DataSetList.h DataSet_1D.h DataSet_2D.h DataSet_3D.h DataSet_Cmatrix.h DataSet_Coords.h DataSet_Coords_CRD.h DataSet_Coords_REF.h DataSet_GridFlt.h DataSet_Mat3x3.h DataSet_MatrixDbl.h DataSet_MatrixFlt.h DataSet_Mesh.h DataSet_Modes.h DataSet_RemLog.h DataSet_Vector.h DataSet_double.h DataSet_float.h DataSet_integer.h DataSet_integer_mem.h DataSet_pH.h DataSet_string.h Deprecated.h DihedralSearch.h Dimension.h DispatchObject.h DistRoutines.h Energy.h Energy_Sander.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Analyze.h Exec_Calc.h Exec_CatCrd.h Exec_Change.h Exec_ClusterMap.h Exec_CombineCoords.h Exec_Commands.h Exec_CompareTop.h Exec_CrdAction.h Exec_CrdOut.h Exec_CreateSet.h Exec_DataFile.h Exec_DataFilter.h Exec_DataSetCmd.h Exec_GenerateAmberRst.h Exec_Help.h Exec_LoadCrd.h Exec_LoadTraj.h Exec_ParallelAnalysis.h Exec_ParmBox.h Exec_ParmSolvent.h Exec_ParmStrip.h Exec_ParmWrite.h Exec_PermuteDihedrals.h Exec_Precision.h Exec_PrintData.h Exec_ReadData.h Exec_ReadEnsembleData.h Exec_ReadInput.h Exec_RotateDihedral.h Exec_RunAnalysis.h Exec_ScaleDihedralK.h Exec_SequenceAlign.h Exec_SortEnsembleData.h Exec_SplitCoords.h Exec_System.h Exec_Top.h Exec_Traj.h Exec_UpdateParameters.h Exec_ViewRst.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h Grid.h GridAction.h GridBin.h HistBin.h Hungarian.h ImageTypes.h ImagedAction.h InputTrajCommon.h MapAtom.h MaskArray.h MaskToken.h Matrix.h Matrix_3x3.h MetaData.h Molecule.h NameType.h NetcdfFile.h OnlineVarT.h OutputTrajCommon.h PDBfile.h PairList.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h PubFFT.h RPNcalc.h Random.h Range.h ReferenceAction.h ReferenceFrame.h RemdReservoirNC.h ReplicaDimArray.h ReplicaInfo.h Residue.h Spline.h StructureCheck.h SymbolExporting.h SymmetricRmsdCalc.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h TrajectoryFile.h Trajin.h TrajinList.h TrajoutList.h Trajout_Single.h TypeNameHolder.h VariableArray.h Vec3.h molsurf.h ComplexArray.o : ComplexArray.cpp ArrayIterator.h ComplexArray.h Constraints.o : Constraints.cpp ArgList.h Atom.h AtomExtra.h AtomMask.h AtomType.h Box.h CharMask.h Constants.h Constraints.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h SymbolExporting.h Topology.h TypeNameHolder.h Vec3.h Control.o : Control.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomExtra.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h Control.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataIO.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h StringRoutines.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h VariableArray.h Vec3.h diff --git a/src/cpptrajfiles b/src/cpptrajfiles index 4c67cbea53..dd9450cf5e 100644 --- a/src/cpptrajfiles +++ b/src/cpptrajfiles @@ -102,6 +102,7 @@ COMMON_SOURCES= \ Analysis_CrossCorr.cpp \ Analysis_CurveFit.cpp \ Analysis_Divergence.cpp \ + Analysis_EvalEquilibration.cpp \ Analysis_FFT.cpp \ Analysis_HausdorffDistance.cpp \ Analysis_Hist.cpp \ From 14db65dd4e7d980cf4368385424531dba1810d4f Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 25 Nov 2019 10:31:53 -0500 Subject: [PATCH 03/58] DRR - Start to determine direction of relaxation --- src/Analysis_EvalEquilibration.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/Analysis_EvalEquilibration.cpp b/src/Analysis_EvalEquilibration.cpp index 12f965529f..cde7e7028c 100644 --- a/src/Analysis_EvalEquilibration.cpp +++ b/src/Analysis_EvalEquilibration.cpp @@ -60,6 +60,17 @@ Analysis::RetType Analysis_EvalEquilibration::Analyze() { return Analysis::ERR; } + // Determine relaxation direction + int relaxationDir = 0; + if (slope < 0) + relaxationDir = -1; + else if (slope > 0) + relaxationDir = 1; + + // Special case: if slope was exactly 0 (should be rare). Consider this + // equilibrated. + + RPNcalc calc; calc.SetDebug(debug_); From 577086ccdc4baabede2f47b76a436c356194850f Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 25 Nov 2019 10:32:06 -0500 Subject: [PATCH 04/58] DRR - Use forward declares. --- src/Array1D.cpp | 3 +++ src/Array1D.h | 8 +++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/Array1D.cpp b/src/Array1D.cpp index 0096907fba..468f9f4ac1 100644 --- a/src/Array1D.cpp +++ b/src/Array1D.cpp @@ -1,6 +1,9 @@ #include // sort #include "Array1D.h" #include "CpptrajStdio.h" +#include "DataSetList.h" +#include "DataSet_1D.h" +#include "ArgList.h" // COPY CONSTRUCTOR Array1D::Array1D(const Array1D& rhs) : array_(rhs.array_) {} diff --git a/src/Array1D.h b/src/Array1D.h index f9240319c1..e3da93a8d2 100644 --- a/src/Array1D.h +++ b/src/Array1D.h @@ -1,8 +1,10 @@ #ifndef INC_ARRAY1D_H #define INC_ARRAY1D_H -#include "DataSetList.h" -#include "DataSet_1D.h" -#include "ArgList.h" +#include +class DataSetList; +class DataSet; +class DataSet_1D; +class ArgList; /// Hold 1D Scalar DataSets class Array1D { public: From 5130ff01deaa02fda28557e4de9b5982c10e8994 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 25 Nov 2019 10:38:05 -0500 Subject: [PATCH 05/58] DRR - Fix up includes for forward declares in Array1D.h --- src/Action_FilterByData.cpp | 1 + src/Action_Projection.cpp | 1 + src/Analysis_Average.cpp | 1 + src/Analysis_FFT.cpp | 3 ++- src/Analysis_Lifetime.cpp | 1 + src/Analysis_LowestCurve.cpp | 1 + src/Analysis_MeltCurve.cpp | 1 + src/Analysis_PhiPsi.cpp | 5 +++-- src/Analysis_Slope.h | 1 + src/DataIO_Gnuplot.cpp | 1 + src/cpptrajdepend | 4 ++-- 11 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/Action_FilterByData.cpp b/src/Action_FilterByData.cpp index 4d1b4d86d6..c62d8d27ce 100644 --- a/src/Action_FilterByData.cpp +++ b/src/Action_FilterByData.cpp @@ -1,5 +1,6 @@ #include "Action_FilterByData.h" #include "CpptrajStdio.h" +#include "DataSet_1D.h" void Action_FilterByData::Help() const { mprintf("\t{ min max ...} [out ] [name ]\n" diff --git a/src/Action_Projection.cpp b/src/Action_Projection.cpp index f6104018f1..7d1d151ef9 100644 --- a/src/Action_Projection.cpp +++ b/src/Action_Projection.cpp @@ -3,6 +3,7 @@ #include "CpptrajStdio.h" #include "StringRoutines.h" // integerToString #include "Constants.h" // DEGRAD +#include "DataSet_1D.h" // CONSTRUCTOR Action_Projection::Action_Projection() : diff --git a/src/Analysis_Average.cpp b/src/Analysis_Average.cpp index 80d235184a..3641d355fa 100644 --- a/src/Analysis_Average.cpp +++ b/src/Analysis_Average.cpp @@ -1,6 +1,7 @@ #include #include "Analysis_Average.h" #include "CpptrajStdio.h" +#include "DataSet_1D.h" Analysis_Average::Analysis_Average() : avgOfSets_(0), diff --git a/src/Analysis_FFT.cpp b/src/Analysis_FFT.cpp index 2ca1401bab..3d37adbeea 100644 --- a/src/Analysis_FFT.cpp +++ b/src/Analysis_FFT.cpp @@ -2,6 +2,7 @@ #include "Analysis_FFT.h" #include "CpptrajStdio.h" #include "PubFFT.h" +#include "DataSet_1D.h" // CONSTRUCTOR Analysis_FFT::Analysis_FFT() : dt_(0.0) {} @@ -39,7 +40,7 @@ Analysis::RetType Analysis_FFT::Setup(ArgList& analyzeArgs, AnalysisSetup& setup DataSet* dsout = setup.DSL().AddSet( DataSet::DOUBLE, MetaData(setname, idx++) ); if (dsout==0) return Analysis::ERR; dsout->SetLegend( (*DS)->Meta().Legend() ); - output_dsets_.push_back( (DataSet_1D*)dsout ); + output_dsets_.push_back( dsout ); if (outfile != 0) outfile->AddDataSet( dsout ); } diff --git a/src/Analysis_Lifetime.cpp b/src/Analysis_Lifetime.cpp index fb0b49c3fa..207c96c6a7 100644 --- a/src/Analysis_Lifetime.cpp +++ b/src/Analysis_Lifetime.cpp @@ -2,6 +2,7 @@ #include "CpptrajStdio.h" #include "ProgressBar.h" #include "StringRoutines.h" // integerToString +#include "DataSet_1D.h" // CONSTRUCTOR Analysis_Lifetime::Analysis_Lifetime() : diff --git a/src/Analysis_LowestCurve.cpp b/src/Analysis_LowestCurve.cpp index f3f8a776a0..15a78c6bae 100644 --- a/src/Analysis_LowestCurve.cpp +++ b/src/Analysis_LowestCurve.cpp @@ -2,6 +2,7 @@ #include "Analysis_LowestCurve.h" #include "CpptrajStdio.h" #include "HistBin.h" +#include "DataSet_1D.h" Analysis_LowestCurve::Analysis_LowestCurve() : points_(0), step_(0.0) {} diff --git a/src/Analysis_MeltCurve.cpp b/src/Analysis_MeltCurve.cpp index 50389b8376..5961ce55f3 100644 --- a/src/Analysis_MeltCurve.cpp +++ b/src/Analysis_MeltCurve.cpp @@ -1,5 +1,6 @@ #include "Analysis_MeltCurve.h" #include "CpptrajStdio.h" +#include "DataSet_1D.h" void Analysis_MeltCurve::Help() const { mprintf("\t [ ...] [out ] [name ] cut \n" diff --git a/src/Analysis_PhiPsi.cpp b/src/Analysis_PhiPsi.cpp index 7bca2a7051..f8053ef3a6 100644 --- a/src/Analysis_PhiPsi.cpp +++ b/src/Analysis_PhiPsi.cpp @@ -1,5 +1,6 @@ #include "Analysis_PhiPsi.h" #include "CpptrajStdio.h" +#include "DataSet_1D.h" Analysis_PhiPsi::Analysis_PhiPsi() {} @@ -49,8 +50,8 @@ Analysis::RetType Analysis_PhiPsi::Setup(ArgList& analyzeArgs, AnalysisSetup& se } } if (phi != 0 && psi != 0) { - input_dsets_.push_back((DataSet_1D*)phi); - input_dsets_.push_back((DataSet_1D*)psi); + input_dsets_.push_back(phi); + input_dsets_.push_back(psi); } else { if (phi == 0) mprintf("Warning: PHI not found for residue %i\n", *res); if (psi == 0) mprintf("Warning: PSI not found for residue %i\n", *res); diff --git a/src/Analysis_Slope.h b/src/Analysis_Slope.h index c2a63db6fa..12a6f7c2f4 100644 --- a/src/Analysis_Slope.h +++ b/src/Analysis_Slope.h @@ -2,6 +2,7 @@ #define INC_ANALYSIS_SLOPE_H #include "Analysis.h" #include "Array1D.h" +#include "DataSet_1D.h" class DataSet_Mesh; /// Calculate the slope (finite difference) for input DataSets class Analysis_Slope : public Analysis { diff --git a/src/DataIO_Gnuplot.cpp b/src/DataIO_Gnuplot.cpp index fb06881651..e906ae19d9 100644 --- a/src/DataIO_Gnuplot.cpp +++ b/src/DataIO_Gnuplot.cpp @@ -2,6 +2,7 @@ #include "DataIO_Gnuplot.h" #include "CpptrajStdio.h" #include "Array1D.h" +#include "DataSet_1D.h" #include "DataSet_2D.h" // CONSTRUCTOR diff --git a/src/cpptrajdepend b/src/cpptrajdepend index 6f965b991b..62c43f7322 100644 --- a/src/cpptrajdepend +++ b/src/cpptrajdepend @@ -112,7 +112,7 @@ Analysis_Matrix.o : Analysis_Matrix.cpp ActionState.h Analysis.h AnalysisState.h Analysis_MeltCurve.o : Analysis_MeltCurve.cpp ActionState.h Analysis.h AnalysisState.h Analysis_MeltCurve.h ArgList.h Array1D.h AssociatedData.h Atom.h AtomExtra.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataFile.h DataFileList.h DataIO.h DataSet.h DataSetList.h DataSet_1D.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h FileIO.h FileName.h FileTypes.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Vec3.h Analysis_Modes.o : Analysis_Modes.cpp ActionFrameCounter.h ActionState.h Analysis.h AnalysisState.h Analysis_Modes.h ArgList.h ArrayIterator.h AssociatedData.h Atom.h AtomExtra.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataFile.h DataFileList.h DataIO.h DataSet.h DataSetList.h DataSet_2D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_MatrixDbl.h DataSet_Modes.h Dimension.h DispatchObject.h FileIO.h FileName.h FileTypes.h Frame.h MaskToken.h Matrix.h Matrix_3x3.h MetaData.h Molecule.h NameType.h OutputTrajCommon.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajectoryFile.h Trajout_Single.h TypeNameHolder.h Vec3.h Analysis_MultiHist.o : Analysis_MultiHist.cpp ActionState.h Analysis.h AnalysisState.h Analysis_Hist.h Analysis_KDE.h Analysis_MultiHist.h ArgList.h Array1D.h AssociatedData.h Atom.h AtomExtra.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataFile.h DataFileList.h DataIO.h DataSet.h DataSetList.h DataSet_1D.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h FileIO.h FileName.h FileTypes.h Frame.h HistBin.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajectoryFile.h TypeNameHolder.h Vec3.h -Analysis_Multicurve.o : Analysis_Multicurve.cpp ActionState.h Analysis.h AnalysisState.h Analysis_CurveFit.h Analysis_Multicurve.h ArgList.h Array1D.h AssociatedData.h Atom.h AtomExtra.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataFile.h DataFileList.h DataIO.h DataSet.h DataSetList.h DataSet_1D.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h FileIO.h FileName.h FileTypes.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Vec3.h +Analysis_Multicurve.o : Analysis_Multicurve.cpp ActionState.h Analysis.h AnalysisState.h Analysis_CurveFit.h Analysis_Multicurve.h ArgList.h Array1D.h AssociatedData.h Atom.h AtomExtra.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataFile.h DataFileList.h DataIO.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h FileIO.h FileName.h FileTypes.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Vec3.h Analysis_Overlap.o : Analysis_Overlap.cpp ActionState.h Analysis.h AnalysisState.h Analysis_Overlap.h ArgList.h AssociatedData.h Atom.h AtomExtra.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataFile.h DataFileList.h DataIO.h DataSet.h DataSetList.h DataSet_1D.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h FileIO.h FileName.h FileTypes.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Vec3.h Analysis_PhiPsi.o : Analysis_PhiPsi.cpp ActionState.h Analysis.h AnalysisState.h Analysis_PhiPsi.h ArgList.h Array1D.h AssociatedData.h Atom.h AtomExtra.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataFile.h DataFileList.h DataIO.h DataSet.h DataSetList.h DataSet_1D.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h FileIO.h FileName.h FileTypes.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Vec3.h Analysis_Regression.o : Analysis_Regression.cpp ActionState.h Analysis.h AnalysisState.h Analysis_Regression.h ArgList.h Array1D.h AssociatedData.h Atom.h AtomExtra.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataFile.h DataFileList.h DataIO.h DataSet.h DataSetList.h DataSet_1D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_Mesh.h Dimension.h DispatchObject.h FileIO.h FileName.h FileTypes.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Spline.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Vec3.h @@ -251,7 +251,7 @@ Exec_CrdAction.o : Exec_CrdAction.cpp Action.h ActionList.h ActionState.h Analys Exec_CrdOut.o : Exec_CrdOut.cpp Action.h ActionFrameCounter.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomExtra.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataIO.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_CrdOut.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h OutputTrajCommon.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h ProgressBar.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h TrajectoryFile.h Trajin.h TrajinList.h TrajoutList.h Trajout_Single.h TypeNameHolder.h Vec3.h Exec_CreateSet.o : Exec_CreateSet.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomExtra.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataIO.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_CreateSet.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h RPNcalc.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Vec3.h Exec_DataFile.o : Exec_DataFile.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomExtra.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataIO.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_DataFile.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h StringRoutines.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Vec3.h -Exec_DataFilter.o : Exec_DataFilter.cpp Action.h ActionList.h ActionState.h Action_FilterByData.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h Array1D.h AssociatedData.h Atom.h AtomExtra.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataIO.h DataSet.h DataSetList.h DataSet_1D.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_DataFilter.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h ProgressBar.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Vec3.h +Exec_DataFilter.o : Exec_DataFilter.cpp Action.h ActionList.h ActionState.h Action_FilterByData.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h Array1D.h AssociatedData.h Atom.h AtomExtra.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataIO.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_DataFilter.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h ProgressBar.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Vec3.h Exec_DataSetCmd.o : Exec_DataSetCmd.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h ArrayIterator.h AssociatedData.h Atom.h AtomExtra.h AtomMask.h AtomType.h BaseIOtype.h Box.h ComplexArray.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataIO.h DataSet.h DataSetList.h DataSet_1D.h DataSet_2D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_MatrixDbl.h DataSet_Mesh.h DataSet_Vector.h DataSet_string.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_DataSetCmd.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h Spline.h StringRoutines.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Vec3.h Exec_GenerateAmberRst.o : Exec_GenerateAmberRst.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomExtra.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataIO.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h DistRoutines.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_GenerateAmberRst.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h SymbolExporting.h TextFormat.h Timer.h Topology.h TorsionRoutines.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Vec3.h Exec_Help.o : Exec_Help.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomExtra.h AtomMask.h AtomType.h BaseIOtype.h BondSearch.h Box.h Cmd.h CmdList.h Command.h Constants.h Control.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataIO.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Help.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h ParmFile.h ParmIO.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h TrajectoryFile.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h VariableArray.h Vec3.h From 2fbc2ce5b8559513024b41e6309bc17e570e5259 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 25 Nov 2019 10:45:15 -0500 Subject: [PATCH 06/58] DRR - use Array1D --- src/Analysis_EvalEquilibration.cpp | 66 ++++++++++++++---------------- src/Analysis_EvalEquilibration.h | 3 +- src/cpptrajdepend | 2 +- 3 files changed, 34 insertions(+), 37 deletions(-) diff --git a/src/Analysis_EvalEquilibration.cpp b/src/Analysis_EvalEquilibration.cpp index cde7e7028c..59fc358adb 100644 --- a/src/Analysis_EvalEquilibration.cpp +++ b/src/Analysis_EvalEquilibration.cpp @@ -5,7 +5,6 @@ Analysis_EvalEquilibration::Analysis_EvalEquilibration() : Analysis(HIDDEN), - setIn_(0), debug_(0) {} @@ -23,20 +22,15 @@ Analysis::RetType Analysis_EvalEquilibration::Setup(ArgList& analyzeArgs, Analys mprinterr("Error: Must specify input data set.\n"); return Analysis::ERR; } - setIn_ = setup.DSL().GetDataSet( setInName ); - if (setIn_ == 0) { - mprinterr("Error: '%s' matches no data sets.\n", setInName.c_str()); - return Analysis::ERR; - } - if (setIn_->Group() != DataSet::SCALAR_1D) { - mprinterr("Error: '%s' is not a 1D scalar set.\n", setIn_->legend()); - return Analysis::ERR; - } + dsname_ = analyzeArgs.GetStringKey("name"); if (dsname_.empty()) dsname_ = setup.DSL().GenerateDefaultName("EvalEquil"); - mprintf(" EVALEQUILIBRATION: Evaluate equilibration of set '%s'\n", setIn_->legend()); + if (inputSets_.AddSetsFromArgs( analyzeArgs, setup.DSL() )) + return Analysis::ERR; + + mprintf(" EVALEQUILIBRATION: Evaluate equilibration of %zu sets.\n", inputSets_.size()); mprintf("\tOutput set name: %s\n", dsname_.c_str()); return Analysis::OK; @@ -44,36 +38,38 @@ Analysis::RetType Analysis_EvalEquilibration::Setup(ArgList& analyzeArgs, Analys // Analysis_EvalEquilibration::Analyze() Analysis::RetType Analysis_EvalEquilibration::Analyze() { - // First do a linear fit. - if (setIn_->Size() < 2) { - mprinterr("Error: Not enough data in '%s' to evaluate.\n", setIn_->legend()); - return Analysis::ERR; - } - double slope, intercept, correl; - DataSet_1D const& DS = static_cast( *setIn_ ); CpptrajFile statsout; statsout.OpenWrite(""); - int err = DS.LinearRegression( slope, intercept, correl, &statsout ); - if (err != 0) { - mprinterr("Error: Could not perform linear regression fit.\n"); - return Analysis::ERR; - } + RPNcalc calc; + calc.SetDebug(debug_); - // Determine relaxation direction - int relaxationDir = 0; - if (slope < 0) - relaxationDir = -1; - else if (slope > 0) - relaxationDir = 1; + for (Array1D::const_iterator it = inputSets_.begin(); it != inputSets_.end(); ++it) + { + DataSet_1D const& DS = static_cast( *(*it) ); + // First do a linear fit. + if (DS.Size() < 2) { + mprintf("Warning: Not enough data in '%s' to evaluate.\n", DS.legend()); + continue; + } + double slope, intercept, correl; + int err = DS.LinearRegression( slope, intercept, correl, &statsout ); + if (err != 0) { + mprinterr("Error: Could not perform linear regression fit.\n"); + return Analysis::ERR; + } - // Special case: if slope was exactly 0 (should be rare). Consider this - // equilibrated. - + // Determine relaxation direction + int relaxationDir = 0; + if (slope < 0) + relaxationDir = -1; + else if (slope > 0) + relaxationDir = 1; - RPNcalc calc; - calc.SetDebug(debug_); + // Special case: if slope was exactly 0 (should be rare). Consider this + // equilibrated. - //if (calc.ProcessExpression( dsname_ + " + //if (calc.ProcessExpression( dsname_ + " + } return Analysis::OK; } diff --git a/src/Analysis_EvalEquilibration.h b/src/Analysis_EvalEquilibration.h index 59c6fbd6e7..95dd33e349 100644 --- a/src/Analysis_EvalEquilibration.h +++ b/src/Analysis_EvalEquilibration.h @@ -1,6 +1,7 @@ #ifndef INC_ANALYSIS_EVALEQUILIBRATION_H #define INC_ANALYSIS_EVALEQUILIBRATION_H #include "Analysis.h" +#include "Array1D.h" /// class Analysis_EvalEquilibration : public Analysis { public: @@ -11,7 +12,7 @@ class Analysis_EvalEquilibration : public Analysis { Analysis::RetType Setup(ArgList&, AnalysisSetup&, int); Analysis::RetType Analyze(); private: - DataSet* setIn_; + Array1D inputSets_; std::string dsname_; ///< Output set name int debug_; }; diff --git a/src/cpptrajdepend b/src/cpptrajdepend index 62c43f7322..1f3979d810 100644 --- a/src/cpptrajdepend +++ b/src/cpptrajdepend @@ -99,7 +99,7 @@ Analysis_CrdFluct.o : Analysis_CrdFluct.cpp ActionState.h Analysis.h AnalysisSta Analysis_CrossCorr.o : Analysis_CrossCorr.cpp ActionState.h Analysis.h AnalysisState.h Analysis_CrossCorr.h ArgList.h Array1D.h ArrayIterator.h AssociatedData.h Atom.h AtomExtra.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataFile.h DataFileList.h DataIO.h DataSet.h DataSetList.h DataSet_1D.h DataSet_2D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_MatrixFlt.h Dimension.h DispatchObject.h FileIO.h FileName.h FileTypes.h Frame.h MaskToken.h Matrix.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h StringRoutines.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Vec3.h Analysis_CurveFit.o : Analysis_CurveFit.cpp ActionState.h Analysis.h AnalysisState.h Analysis_CurveFit.h ArgList.h AssociatedData.h Atom.h AtomExtra.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h CurveFit.h DataFile.h DataFileList.h DataIO.h DataSet.h DataSetList.h DataSet_1D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_Mesh.h Dimension.h DispatchObject.h FileIO.h FileName.h FileTypes.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h RPNcalc.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Spline.h StringRoutines.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Vec3.h Analysis_Divergence.o : Analysis_Divergence.cpp ActionState.h Analysis.h AnalysisState.h Analysis_Divergence.h ArgList.h AssociatedData.h Atom.h AtomExtra.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataFile.h DataFileList.h DataIO.h DataSet.h DataSetList.h DataSet_1D.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h FileIO.h FileName.h FileTypes.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Vec3.h -Analysis_EvalEquilibration.o : Analysis_EvalEquilibration.cpp ActionState.h Analysis.h AnalysisState.h Analysis_EvalEquilibration.h ArgList.h AssociatedData.h Atom.h AtomExtra.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataFile.h DataFileList.h DataIO.h DataSet.h DataSetList.h DataSet_1D.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h FileIO.h FileName.h FileTypes.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h RPNcalc.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Vec3.h +Analysis_EvalEquilibration.o : Analysis_EvalEquilibration.cpp ActionState.h Analysis.h AnalysisState.h Analysis_EvalEquilibration.h ArgList.h Array1D.h AssociatedData.h Atom.h AtomExtra.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataFile.h DataFileList.h DataIO.h DataSet.h DataSetList.h DataSet_1D.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h FileIO.h FileName.h FileTypes.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h RPNcalc.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Vec3.h Analysis_FFT.o : Analysis_FFT.cpp ActionState.h Analysis.h AnalysisState.h Analysis_FFT.h ArgList.h Array1D.h ArrayIterator.h AssociatedData.h Atom.h AtomExtra.h AtomMask.h AtomType.h BaseIOtype.h Box.h ComplexArray.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataFile.h DataFileList.h DataIO.h DataSet.h DataSetList.h DataSet_1D.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h FileIO.h FileName.h FileTypes.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h PubFFT.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Vec3.h Analysis_HausdorffDistance.o : Analysis_HausdorffDistance.cpp ActionState.h Analysis.h AnalysisState.h Analysis_HausdorffDistance.h ArgList.h ArrayIterator.h AssociatedData.h Atom.h AtomExtra.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataFile.h DataFileList.h DataIO.h DataSet.h DataSetList.h DataSet_2D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_MatrixFlt.h Dimension.h DispatchObject.h FileIO.h FileName.h FileTypes.h Frame.h MaskToken.h Matrix.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Vec3.h Analysis_Hist.o : Analysis_Hist.cpp ActionFrameCounter.h ActionState.h Analysis.h AnalysisState.h Analysis_Hist.h ArgList.h ArrayIterator.h AssociatedData.h Atom.h AtomExtra.h AtomMask.h AtomType.h BaseIOtype.h BondSearch.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataFile.h DataFileList.h DataIO.h DataSet.h DataSetList.h DataSet_1D.h DataSet_2D.h DataSet_3D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_GridFlt.h DataSet_MatrixDbl.h DataSet_double.h Dimension.h DispatchObject.h FileIO.h FileName.h FileTypes.h Frame.h Grid.h GridBin.h HistBin.h MaskToken.h Matrix.h Matrix_3x3.h MetaData.h Molecule.h NameType.h OutputTrajCommon.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h ParmFile.h ParmIO.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h StringRoutines.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajectoryFile.h Trajout_Single.h TypeNameHolder.h Vec3.h From 2c01a63915229e8f0a28a13f54d43cb583d6bc6f Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 25 Nov 2019 11:39:12 -0500 Subject: [PATCH 07/58] DRR - Add non linear curve fitting and final curve output --- src/Analysis_EvalEquilibration.cpp | 132 +++++++++++++++++++++++++---- src/Analysis_EvalEquilibration.h | 7 +- src/cpptrajdepend | 2 +- 3 files changed, 122 insertions(+), 19 deletions(-) diff --git a/src/Analysis_EvalEquilibration.cpp b/src/Analysis_EvalEquilibration.cpp index 59fc358adb..96942dad21 100644 --- a/src/Analysis_EvalEquilibration.cpp +++ b/src/Analysis_EvalEquilibration.cpp @@ -1,10 +1,13 @@ #include "Analysis_EvalEquilibration.h" #include "CpptrajStdio.h" #include "DataSet_1D.h" -#include "RPNcalc.h" +#include "DataSet_Mesh.h" +#include "CurveFit.h" Analysis_EvalEquilibration::Analysis_EvalEquilibration() : Analysis(HIDDEN), + tolerance_(0), + maxIt_(0), debug_(0) {} @@ -17,35 +20,82 @@ void Analysis_EvalEquilibration::Help() const { Analysis::RetType Analysis_EvalEquilibration::Setup(ArgList& analyzeArgs, AnalysisSetup& setup, int debugIn) { debug_ = debugIn; - std::string setInName = analyzeArgs.GetStringKey("set"); - if (setInName.empty()) { - mprinterr("Error: Must specify input data set.\n"); - return Analysis::ERR; - } dsname_ = analyzeArgs.GetStringKey("name"); if (dsname_.empty()) dsname_ = setup.DSL().GenerateDefaultName("EvalEquil"); - if (inputSets_.AddSetsFromArgs( analyzeArgs, setup.DSL() )) + tolerance_ = analyzeArgs.getKeyDouble("tol", 0.00001); + if (tolerance_ < 0.0) { + mprinterr("Error: Tolerance must be greater than or equal to 0.0\n"); + return Analysis::ERR; + } + maxIt_ = analyzeArgs.getKeyInt("maxit", 500); + if (maxIt_ < 1) { + mprinterr("Error: Max iterations must be greater than or equal to 1.\n"); + return Analysis::ERR; + } + + DataFile* outfile = setup.DFL().AddDataFile( analyzeArgs.GetStringKey("out"), analyzeArgs ); + // get input data sets + if (inputSets_.AddSetsFromArgs( analyzeArgs.RemainingArgs(), setup.DSL() )) return Analysis::ERR; + // Create output sets. + int idx = 0; + for (Array1D::const_iterator it = inputSets_.begin(); it != inputSets_.end(); ++it, ++idx) + { + DataSet* setOut = setup.DSL().AddSet( DataSet::XYMESH, MetaData( dsname_, idx ) ); + if (setOut == 0) return Analysis::ERR; + outputSets_.push_back( setOut ); + if (outfile != 0) { + outfile->AddDataSet( *it ); + outfile->AddDataSet( setOut ); + } + } + mprintf(" EVALEQUILIBRATION: Evaluate equilibration of %zu sets.\n", inputSets_.size()); mprintf("\tOutput set name: %s\n", dsname_.c_str()); + mprintf("\tTolerance for curve fit: %g\n", tolerance_); + mprintf("\tMax iterations for curve fit: %i\n", maxIt_); + if (outfile != 0) + mprintf("\tFit curve output to '%s'\n", outfile->DataFilename().full()); return Analysis::OK; } +// A0*(exp(A1*(X))) +int EQ_relax(CurveFit::Darray const& Xvals, CurveFit::Darray const& Params, + CurveFit::Darray& Yvals) +{ + double A0 = Params[0]; + double A1 = Params[1]; + for (unsigned int n = 0; n != Xvals.size(); ++n) + Yvals[n] = A0 * ( exp( A1 * Xvals[n] ) ); + return 0; +} + +// A0*(exp(A1*(1/X))) +int EQ_invRelax(CurveFit::Darray const& Xvals, CurveFit::Darray const& Params, + CurveFit::Darray& Yvals) +{ + double A0 = Params[0]; + double A1 = Params[1]; + for (unsigned int n = 0; n != Xvals.size(); ++n) + Yvals[n] = A0 * ( exp( A1 * (1/Xvals[n]) ) ); + return 0; +} + + // Analysis_EvalEquilibration::Analyze() Analysis::RetType Analysis_EvalEquilibration::Analyze() { CpptrajFile statsout; statsout.OpenWrite(""); - RPNcalc calc; - calc.SetDebug(debug_); - - for (Array1D::const_iterator it = inputSets_.begin(); it != inputSets_.end(); ++it) + std::vector::const_iterator ot = outputSets_.begin(); + for (Array1D::const_iterator it = inputSets_.begin(); it != inputSets_.end(); ++it, ++ot) { + mprintf("\tEvaluating '%s'\n", (*it)->legend()); DataSet_1D const& DS = static_cast( *(*it) ); // First do a linear fit. if (DS.Size() < 2) { @@ -59,17 +109,67 @@ Analysis::RetType Analysis_EvalEquilibration::Analyze() { return Analysis::ERR; } + // Process expression to fit + //if (calc.ProcessExpression( dsname_ + "=A0*(exp(A1*(1/X)))" )) { + // mprinterr("Error: Unable to process equation expression.\n"); + // return Analysis::ERR; + //} + // Determine relaxation direction + CurveFit::FitFunctionType fxn = 0; int relaxationDir = 0; - if (slope < 0) + if (slope < 0) { + mprintf("\tUsing relaxation form: A0*exp(A1*x)\n"); relaxationDir = -1; - else if (slope > 0) + fxn = EQ_relax; + } else if (slope > 0) { + mprintf("\tUsing inverse relaxation form: A0*exp(A1*(1/x))\n"); relaxationDir = 1; + fxn = EQ_invRelax; + } else { + // Special case: if slope was exactly 0 (should be rare). Consider this + // equilibrated. + mprintf("\tSlope of linear fit is 0.\n"); + continue; + } + + // Set up initial X and Y values + CurveFit::Darray Xvals, Yvals; + Xvals.reserve( DS.Size() ); + Yvals.reserve( DS.Size() ); + for (unsigned int i = 0; i != DS.Size(); i++) { + double xval = DS.Xcrd(i); + if (xval <= 0) { + mprintf("Warning: Ignoring X value <= 0: %g\n", xval); + } else { + Xvals.push_back( xval ); + Yvals.push_back( DS.Dval(i) ); + } + } + + // Set initial guesses for parameters: A0 = intercept, A1 = slope + CurveFit::Darray Params(2); + Params[0] = intercept; + Params[1] = slope; + + // Perform curve fitting + CurveFit fit; + int info = fit.LevenbergMarquardt( fxn, Xvals, Yvals, Params, tolerance_, maxIt_ ); + mprintf("\t%s\n", fit.Message(info)); + if (info == 0) { + mprinterr("Error: %s\n", fit.ErrorMessage()); + return Analysis::ERR; + } + for (CurveFit::Darray::const_iterator ip = Params.begin(); ip != Params.end(); ++ip) { + statsout.Printf("\tFinal Param A%li = %g\n", ip - Params.begin(), *ip); + } - // Special case: if slope was exactly 0 (should be rare). Consider this - // equilibrated. + // Create output curve + DataSet_Mesh& OUT = static_cast( *(*ot) ); + for (unsigned int i = 0; i != Xvals.size(); i++) + OUT.AddXY( Xvals[i], fit.FinalY()[i] ); - //if (calc.ProcessExpression( dsname_ + " + } return Analysis::OK; } diff --git a/src/Analysis_EvalEquilibration.h b/src/Analysis_EvalEquilibration.h index 95dd33e349..5a96c27f63 100644 --- a/src/Analysis_EvalEquilibration.h +++ b/src/Analysis_EvalEquilibration.h @@ -12,8 +12,11 @@ class Analysis_EvalEquilibration : public Analysis { Analysis::RetType Setup(ArgList&, AnalysisSetup&, int); Analysis::RetType Analyze(); private: - Array1D inputSets_; - std::string dsname_; ///< Output set name + Array1D inputSets_; ///< Will hold data to evaluate + std::vector outputSets_; ///< Will hold final fit curves + std::string dsname_; ///< Output set(s) base name + double tolerance_; + int maxIt_; int debug_; }; #endif diff --git a/src/cpptrajdepend b/src/cpptrajdepend index 1f3979d810..8bc2d49ce4 100644 --- a/src/cpptrajdepend +++ b/src/cpptrajdepend @@ -99,7 +99,7 @@ Analysis_CrdFluct.o : Analysis_CrdFluct.cpp ActionState.h Analysis.h AnalysisSta Analysis_CrossCorr.o : Analysis_CrossCorr.cpp ActionState.h Analysis.h AnalysisState.h Analysis_CrossCorr.h ArgList.h Array1D.h ArrayIterator.h AssociatedData.h Atom.h AtomExtra.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataFile.h DataFileList.h DataIO.h DataSet.h DataSetList.h DataSet_1D.h DataSet_2D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_MatrixFlt.h Dimension.h DispatchObject.h FileIO.h FileName.h FileTypes.h Frame.h MaskToken.h Matrix.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h StringRoutines.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Vec3.h Analysis_CurveFit.o : Analysis_CurveFit.cpp ActionState.h Analysis.h AnalysisState.h Analysis_CurveFit.h ArgList.h AssociatedData.h Atom.h AtomExtra.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h CurveFit.h DataFile.h DataFileList.h DataIO.h DataSet.h DataSetList.h DataSet_1D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_Mesh.h Dimension.h DispatchObject.h FileIO.h FileName.h FileTypes.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h RPNcalc.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Spline.h StringRoutines.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Vec3.h Analysis_Divergence.o : Analysis_Divergence.cpp ActionState.h Analysis.h AnalysisState.h Analysis_Divergence.h ArgList.h AssociatedData.h Atom.h AtomExtra.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataFile.h DataFileList.h DataIO.h DataSet.h DataSetList.h DataSet_1D.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h FileIO.h FileName.h FileTypes.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Vec3.h -Analysis_EvalEquilibration.o : Analysis_EvalEquilibration.cpp ActionState.h Analysis.h AnalysisState.h Analysis_EvalEquilibration.h ArgList.h Array1D.h AssociatedData.h Atom.h AtomExtra.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataFile.h DataFileList.h DataIO.h DataSet.h DataSetList.h DataSet_1D.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h FileIO.h FileName.h FileTypes.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h RPNcalc.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Vec3.h +Analysis_EvalEquilibration.o : Analysis_EvalEquilibration.cpp ActionState.h Analysis.h AnalysisState.h Analysis_EvalEquilibration.h ArgList.h Array1D.h AssociatedData.h Atom.h AtomExtra.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h CurveFit.h DataFile.h DataFileList.h DataIO.h DataSet.h DataSetList.h DataSet_1D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_Mesh.h Dimension.h DispatchObject.h FileIO.h FileName.h FileTypes.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Spline.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Vec3.h Analysis_FFT.o : Analysis_FFT.cpp ActionState.h Analysis.h AnalysisState.h Analysis_FFT.h ArgList.h Array1D.h ArrayIterator.h AssociatedData.h Atom.h AtomExtra.h AtomMask.h AtomType.h BaseIOtype.h Box.h ComplexArray.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataFile.h DataFileList.h DataIO.h DataSet.h DataSetList.h DataSet_1D.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h FileIO.h FileName.h FileTypes.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h PubFFT.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Vec3.h Analysis_HausdorffDistance.o : Analysis_HausdorffDistance.cpp ActionState.h Analysis.h AnalysisState.h Analysis_HausdorffDistance.h ArgList.h ArrayIterator.h AssociatedData.h Atom.h AtomExtra.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataFile.h DataFileList.h DataIO.h DataSet.h DataSetList.h DataSet_2D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_MatrixFlt.h Dimension.h DispatchObject.h FileIO.h FileName.h FileTypes.h Frame.h MaskToken.h Matrix.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Vec3.h Analysis_Hist.o : Analysis_Hist.cpp ActionFrameCounter.h ActionState.h Analysis.h AnalysisState.h Analysis_Hist.h ArgList.h ArrayIterator.h AssociatedData.h Atom.h AtomExtra.h AtomMask.h AtomType.h BaseIOtype.h BondSearch.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataFile.h DataFileList.h DataIO.h DataSet.h DataSetList.h DataSet_1D.h DataSet_2D.h DataSet_3D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_GridFlt.h DataSet_MatrixDbl.h DataSet_double.h Dimension.h DispatchObject.h FileIO.h FileName.h FileTypes.h Frame.h Grid.h GridBin.h HistBin.h MaskToken.h Matrix.h Matrix_3x3.h MetaData.h Molecule.h NameType.h OutputTrajCommon.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h ParmFile.h ParmIO.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h StringRoutines.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajectoryFile.h Trajout_Single.h TypeNameHolder.h Vec3.h From 5bf7442e49b05c564ab92990b5d382bb75d76555 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 25 Nov 2019 11:43:52 -0500 Subject: [PATCH 08/58] DRR - Add nonlinear fit stats printout --- src/Analysis_EvalEquilibration.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/Analysis_EvalEquilibration.cpp b/src/Analysis_EvalEquilibration.cpp index 96942dad21..504295b752 100644 --- a/src/Analysis_EvalEquilibration.cpp +++ b/src/Analysis_EvalEquilibration.cpp @@ -169,6 +169,15 @@ Analysis::RetType Analysis_EvalEquilibration::Analyze() { for (unsigned int i = 0; i != Xvals.size(); i++) OUT.AddXY( Xvals[i], fit.FinalY()[i] ); + // Statistics + double corr_coeff, ChiSq, TheilU, rms_percent_error; + err = fit.Statistics( Yvals, corr_coeff, ChiSq, TheilU, rms_percent_error); + if (err != 0) mprintf("Warning: %s\n", fit.Message(err)); + statsout.Printf("\tCorrelation coefficient: %g\n" + "\tChi squared: %g\n" + "\tUncertainty coefficient: %g\n" + "\tRMS percent error: %g\n", + corr_coeff, ChiSq, TheilU, rms_percent_error); } return Analysis::OK; From f7e7b459ee8d1072c7092b429a45febe6ac3409c Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 25 Nov 2019 12:26:30 -0500 Subject: [PATCH 09/58] DRR - Ensure A1 parameter guess starts out < 0 (improves convergence) --- src/Analysis_EvalEquilibration.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Analysis_EvalEquilibration.cpp b/src/Analysis_EvalEquilibration.cpp index 504295b752..ab669c94f2 100644 --- a/src/Analysis_EvalEquilibration.cpp +++ b/src/Analysis_EvalEquilibration.cpp @@ -151,6 +151,9 @@ Analysis::RetType Analysis_EvalEquilibration::Analyze() { CurveFit::Darray Params(2); Params[0] = intercept; Params[1] = slope; + // For exponential fit, the A1 param should be < 0 + if (Params[1] > 0) + Params[1] = -Params[1]; // Perform curve fitting CurveFit fit; From 27e62bea96084ad9275ed6a1d74b83c2b9eed59f Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Mon, 25 Nov 2019 12:52:34 -0500 Subject: [PATCH 10/58] DRR - Try adding an offset to X. I think the incoming X values will need to be shifted as well. --- src/Analysis_EvalEquilibration.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/Analysis_EvalEquilibration.cpp b/src/Analysis_EvalEquilibration.cpp index ab669c94f2..8952134c1e 100644 --- a/src/Analysis_EvalEquilibration.cpp +++ b/src/Analysis_EvalEquilibration.cpp @@ -70,8 +70,9 @@ int EQ_relax(CurveFit::Darray const& Xvals, CurveFit::Darray const& Params, { double A0 = Params[0]; double A1 = Params[1]; + double A2 = Params[2]; for (unsigned int n = 0; n != Xvals.size(); ++n) - Yvals[n] = A0 * ( exp( A1 * Xvals[n] ) ); + Yvals[n] = A0 * ( exp( A1 * (Xvals[n]+A2) ) ); return 0; } @@ -81,8 +82,9 @@ int EQ_invRelax(CurveFit::Darray const& Xvals, CurveFit::Darray const& Params, { double A0 = Params[0]; double A1 = Params[1]; + double A2 = Params[2]; for (unsigned int n = 0; n != Xvals.size(); ++n) - Yvals[n] = A0 * ( exp( A1 * (1/Xvals[n]) ) ); + Yvals[n] = A0 * ( exp( A1 * (1/(Xvals[n]+A2)) ) ); return 0; } @@ -147,13 +149,14 @@ Analysis::RetType Analysis_EvalEquilibration::Analyze() { } } - // Set initial guesses for parameters: A0 = intercept, A1 = slope - CurveFit::Darray Params(2); + // Set initial guesses for parameters: A0 = intercept, A1 = slope, A2 = offset + CurveFit::Darray Params(3); Params[0] = intercept; Params[1] = slope; // For exponential fit, the A1 param should be < 0 if (Params[1] > 0) Params[1] = -Params[1]; + Params[2] = 0; // Perform curve fitting CurveFit fit; From 15516ec0698c7bfd74a1b34b2c968fd34b1b171f Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 26 Nov 2019 08:47:57 -0500 Subject: [PATCH 11/58] DRR - Use an offset so that when fitting, the first X value is always 1. With the addition of the A2 parameter, we're saying we dont know exactly where on the exponential curve the data starts. --- src/Analysis_EvalEquilibration.cpp | 31 +++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/src/Analysis_EvalEquilibration.cpp b/src/Analysis_EvalEquilibration.cpp index 8952134c1e..fa4eefff6d 100644 --- a/src/Analysis_EvalEquilibration.cpp +++ b/src/Analysis_EvalEquilibration.cpp @@ -135,28 +135,37 @@ Analysis::RetType Analysis_EvalEquilibration::Analyze() { continue; } - // Set up initial X and Y values + // Set up initial X and Y values. Offset the X values so we start from + // 1. + double offset = DS.Xcrd(0) - 1.0; + mprintf("\tFirst X value is %g, Using an offset of %g\n", DS.Xcrd(0), offset); CurveFit::Darray Xvals, Yvals; Xvals.reserve( DS.Size() ); Yvals.reserve( DS.Size() ); for (unsigned int i = 0; i != DS.Size(); i++) { double xval = DS.Xcrd(i); - if (xval <= 0) { - mprintf("Warning: Ignoring X value <= 0: %g\n", xval); - } else { - Xvals.push_back( xval ); + //if (xval <= 0) { + // mprintf("Warning: Ignoring X value <= 0: %g\n", xval); + //} else { + Xvals.push_back( xval - offset ); Yvals.push_back( DS.Dval(i) ); - } + //} } - // Set initial guesses for parameters: A0 = intercept, A1 = slope, A2 = offset + // Set initial guesses for parameters: A0 = intercept, A2 = offset + // A1 could be slope, but if it is too small this can lead to convergence + // issues. Just use -1. CurveFit::Darray Params(3); Params[0] = intercept; - Params[1] = slope; + Params[1] = -1.0; // For exponential fit, the A1 param should be < 0 - if (Params[1] > 0) - Params[1] = -Params[1]; + //Params[1] = slope; + //if (Params[1] > 0) + // Params[1] = -Params[1]; Params[2] = 0; + for (CurveFit::Darray::const_iterator ip = Params.begin(); ip != Params.end(); ++ip) { + statsout.Printf("\tInitial Param A%li = %g\n", ip - Params.begin(), *ip); + } // Perform curve fitting CurveFit fit; @@ -173,7 +182,7 @@ Analysis::RetType Analysis_EvalEquilibration::Analyze() { // Create output curve DataSet_Mesh& OUT = static_cast( *(*ot) ); for (unsigned int i = 0; i != Xvals.size(); i++) - OUT.AddXY( Xvals[i], fit.FinalY()[i] ); + OUT.AddXY( Xvals[i] + offset, fit.FinalY()[i] ); // Statistics double corr_coeff, ChiSq, TheilU, rms_percent_error; From 76c5171e8bfab849f12ec214831e0afd0aab4bf7 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 26 Nov 2019 09:04:00 -0500 Subject: [PATCH 12/58] DRR - Allow stats to be redirected to a file. --- src/Analysis_EvalEquilibration.cpp | 35 +++++++++++++++++++----------- src/Analysis_EvalEquilibration.h | 1 + 2 files changed, 23 insertions(+), 13 deletions(-) diff --git a/src/Analysis_EvalEquilibration.cpp b/src/Analysis_EvalEquilibration.cpp index fa4eefff6d..deff26710f 100644 --- a/src/Analysis_EvalEquilibration.cpp +++ b/src/Analysis_EvalEquilibration.cpp @@ -6,6 +6,7 @@ Analysis_EvalEquilibration::Analysis_EvalEquilibration() : Analysis(HIDDEN), + statsout_(0), tolerance_(0), maxIt_(0), debug_(0) @@ -37,6 +38,12 @@ Analysis::RetType Analysis_EvalEquilibration::Setup(ArgList& analyzeArgs, Analys } DataFile* outfile = setup.DFL().AddDataFile( analyzeArgs.GetStringKey("out"), analyzeArgs ); + // Allocate output stats file. Allow STDOUT. + statsout_ = setup.DFL().AddCpptrajFile( analyzeArgs.GetStringKey("statsout"), + "EvalEquil stats", + DataFileList::TEXT, true ); + if (statsout_ == 0) return Analysis::ERR; + // get input data sets if (inputSets_.AddSetsFromArgs( analyzeArgs.RemainingArgs(), setup.DSL() )) return Analysis::ERR; @@ -60,6 +67,7 @@ Analysis::RetType Analysis_EvalEquilibration::Setup(ArgList& analyzeArgs, Analys mprintf("\tMax iterations for curve fit: %i\n", maxIt_); if (outfile != 0) mprintf("\tFit curve output to '%s'\n", outfile->DataFilename().full()); + mprintf("\tStatistics output to '%s'\n", statsout_->Filename().full()); return Analysis::OK; } @@ -91,21 +99,21 @@ int EQ_invRelax(CurveFit::Darray const& Xvals, CurveFit::Darray const& Params, // Analysis_EvalEquilibration::Analyze() Analysis::RetType Analysis_EvalEquilibration::Analyze() { - CpptrajFile statsout; - statsout.OpenWrite(""); - std::vector::const_iterator ot = outputSets_.begin(); for (Array1D::const_iterator it = inputSets_.begin(); it != inputSets_.end(); ++it, ++ot) { - mprintf("\tEvaluating '%s'\n", (*it)->legend()); + mprintf("\tEvaluating: %s\n", (*it)->legend()); + if (!statsout_->IsStream()) + statsout_->Printf("# %s\n", (*it)->legend()); DataSet_1D const& DS = static_cast( *(*it) ); // First do a linear fit. + statsout_->Printf("\t----- Linear Fit -----\n"); if (DS.Size() < 2) { mprintf("Warning: Not enough data in '%s' to evaluate.\n", DS.legend()); continue; } double slope, intercept, correl; - int err = DS.LinearRegression( slope, intercept, correl, &statsout ); + int err = DS.LinearRegression( slope, intercept, correl, statsout_ ); if (err != 0) { mprinterr("Error: Could not perform linear regression fit.\n"); return Analysis::ERR; @@ -117,6 +125,7 @@ Analysis::RetType Analysis_EvalEquilibration::Analyze() { // return Analysis::ERR; //} + statsout_->Printf("\t----- Nonlinear Fit -----\n"); // Determine relaxation direction CurveFit::FitFunctionType fxn = 0; int relaxationDir = 0; @@ -164,7 +173,7 @@ Analysis::RetType Analysis_EvalEquilibration::Analyze() { // Params[1] = -Params[1]; Params[2] = 0; for (CurveFit::Darray::const_iterator ip = Params.begin(); ip != Params.end(); ++ip) { - statsout.Printf("\tInitial Param A%li = %g\n", ip - Params.begin(), *ip); + statsout_->Printf("\tInitial Param A%li = %g\n", ip - Params.begin(), *ip); } // Perform curve fitting @@ -176,7 +185,7 @@ Analysis::RetType Analysis_EvalEquilibration::Analyze() { return Analysis::ERR; } for (CurveFit::Darray::const_iterator ip = Params.begin(); ip != Params.end(); ++ip) { - statsout.Printf("\tFinal Param A%li = %g\n", ip - Params.begin(), *ip); + statsout_->Printf("\tFinal Param A%li = %g\n", ip - Params.begin(), *ip); } // Create output curve @@ -188,12 +197,12 @@ Analysis::RetType Analysis_EvalEquilibration::Analyze() { double corr_coeff, ChiSq, TheilU, rms_percent_error; err = fit.Statistics( Yvals, corr_coeff, ChiSq, TheilU, rms_percent_error); if (err != 0) mprintf("Warning: %s\n", fit.Message(err)); - statsout.Printf("\tCorrelation coefficient: %g\n" - "\tChi squared: %g\n" - "\tUncertainty coefficient: %g\n" - "\tRMS percent error: %g\n", - corr_coeff, ChiSq, TheilU, rms_percent_error); - + statsout_->Printf("\tCorrelation coefficient: %g\n" + "\tChi squared: %g\n" + "\tUncertainty coefficient: %g\n" + "\tRMS percent error: %g\n", + corr_coeff, ChiSq, TheilU, rms_percent_error); + statsout_->Printf("\n"); } return Analysis::OK; } diff --git a/src/Analysis_EvalEquilibration.h b/src/Analysis_EvalEquilibration.h index 5a96c27f63..d62a1e75c2 100644 --- a/src/Analysis_EvalEquilibration.h +++ b/src/Analysis_EvalEquilibration.h @@ -15,6 +15,7 @@ class Analysis_EvalEquilibration : public Analysis { Array1D inputSets_; ///< Will hold data to evaluate std::vector outputSets_; ///< Will hold final fit curves std::string dsname_; ///< Output set(s) base name + CpptrajFile* statsout_; ///< File to write stats to. double tolerance_; int maxIt_; int debug_; From 44b9494a4c89d50730c0bf352f71c96ca3618150 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 26 Nov 2019 09:35:25 -0500 Subject: [PATCH 13/58] DRR - Add some documentation --- src/Analysis_EvalEquilibration.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Analysis_EvalEquilibration.cpp b/src/Analysis_EvalEquilibration.cpp index deff26710f..09c0370fe6 100644 --- a/src/Analysis_EvalEquilibration.cpp +++ b/src/Analysis_EvalEquilibration.cpp @@ -188,6 +188,11 @@ Analysis::RetType Analysis_EvalEquilibration::Analyze() { statsout_->Printf("\tFinal Param A%li = %g\n", ip - Params.begin(), *ip); } + // For inverse fit + // Params[0] = A0 = Long-time (final) density + // Params[1] = A1 = relaxation constant^-1 + // Params[2] = A2 = time offset + // Create output curve DataSet_Mesh& OUT = static_cast( *(*ot) ); for (unsigned int i = 0; i != Xvals.size(); i++) From ba62b72fece3ef02705559d27b203dbfc10af2c3 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 26 Nov 2019 09:53:37 -0500 Subject: [PATCH 14/58] DRR - More docs --- src/Analysis_EvalEquilibration.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Analysis_EvalEquilibration.cpp b/src/Analysis_EvalEquilibration.cpp index 09c0370fe6..b38db089fc 100644 --- a/src/Analysis_EvalEquilibration.cpp +++ b/src/Analysis_EvalEquilibration.cpp @@ -72,7 +72,9 @@ Analysis::RetType Analysis_EvalEquilibration::Setup(ArgList& analyzeArgs, Analys return Analysis::OK; } -// A0*(exp(A1*(X))) +/** Exponential (high relax to low) + * A0*(exp(A1*(X))) + */ int EQ_relax(CurveFit::Darray const& Xvals, CurveFit::Darray const& Params, CurveFit::Darray& Yvals) { @@ -84,7 +86,9 @@ int EQ_relax(CurveFit::Darray const& Xvals, CurveFit::Darray const& Params, return 0; } -// A0*(exp(A1*(1/X))) +/** Inverse exponential (low relax to high). + * A0*(exp(A1*(1/X))) + */ int EQ_invRelax(CurveFit::Darray const& Xvals, CurveFit::Darray const& Params, CurveFit::Darray& Yvals) { From e54d91f5401a3b099386043be93e511bd6cdf578 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 26 Nov 2019 10:08:36 -0500 Subject: [PATCH 15/58] DRR - Start adding results --- src/Analysis_EvalEquilibration.cpp | 20 ++++++++++++++++++++ src/Analysis_EvalEquilibration.h | 2 ++ 2 files changed, 22 insertions(+) diff --git a/src/Analysis_EvalEquilibration.cpp b/src/Analysis_EvalEquilibration.cpp index b38db089fc..88cf852ce3 100644 --- a/src/Analysis_EvalEquilibration.cpp +++ b/src/Analysis_EvalEquilibration.cpp @@ -37,7 +37,11 @@ Analysis::RetType Analysis_EvalEquilibration::Setup(ArgList& analyzeArgs, Analys return Analysis::ERR; } + // Curves out DataFile* outfile = setup.DFL().AddDataFile( analyzeArgs.GetStringKey("out"), analyzeArgs ); + // Results out + DataFile* resultsOut = setup.DFL().AddDataFile( analyzeArgs.GetStringKey("resultsout"), analyzeArgs ); + // Allocate output stats file. Allow STDOUT. statsout_ = setup.DFL().AddCpptrajFile( analyzeArgs.GetStringKey("statsout"), "EvalEquil stats", @@ -60,6 +64,15 @@ Analysis::RetType Analysis_EvalEquilibration::Setup(ArgList& analyzeArgs, Analys outfile->AddDataSet( setOut ); } } + dataChiSq_ = setup.DSL().AddSet( DataSet::DOUBLE, MetaData( dsname_, "chisq" ) ); + dataName_ = setup.DSL().AddSet( DataSet::STRING, MetaData( dsname_, "name" ) ); + DataSet::SizeArray nData(1, inputSets_.size()); + dataChiSq_->Allocate( nData ); + dataName_->Allocate( nData ); + if (resultsOut != 0) { + resultsOut->AddDataSet( dataChiSq_ ); + resultsOut->AddDataSet( dataName_ ); + } mprintf(" EVALEQUILIBRATION: Evaluate equilibration of %zu sets.\n", inputSets_.size()); mprintf("\tOutput set name: %s\n", dsname_.c_str()); @@ -68,6 +81,8 @@ Analysis::RetType Analysis_EvalEquilibration::Setup(ArgList& analyzeArgs, Analys if (outfile != 0) mprintf("\tFit curve output to '%s'\n", outfile->DataFilename().full()); mprintf("\tStatistics output to '%s'\n", statsout_->Filename().full()); + if (resultsOut != 0) + mprintf("\tResults output to '%s'\n", resultsOut->DataFilename().full()); return Analysis::OK; } @@ -211,6 +226,11 @@ Analysis::RetType Analysis_EvalEquilibration::Analyze() { "\tUncertainty coefficient: %g\n" "\tRMS percent error: %g\n", corr_coeff, ChiSq, TheilU, rms_percent_error); + + long int oidx = (it - inputSets_.begin()); + dataChiSq_->Add(oidx, &ChiSq); + dataName_->Add(oidx, (*it)->legend()); + statsout_->Printf("\n"); } return Analysis::OK; diff --git a/src/Analysis_EvalEquilibration.h b/src/Analysis_EvalEquilibration.h index d62a1e75c2..632315d4fc 100644 --- a/src/Analysis_EvalEquilibration.h +++ b/src/Analysis_EvalEquilibration.h @@ -16,6 +16,8 @@ class Analysis_EvalEquilibration : public Analysis { std::vector outputSets_; ///< Will hold final fit curves std::string dsname_; ///< Output set(s) base name CpptrajFile* statsout_; ///< File to write stats to. + DataSet* dataChiSq_; ///< Hold chi^2 of fit for each input set + DataSet* dataName_; ///< Hold name for each input set double tolerance_; int maxIt_; int debug_; From 1a492385793da83dcf20f703f955a2b441333848 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 26 Nov 2019 11:48:58 -0500 Subject: [PATCH 16/58] DRR - Make blocks respect noexitonerror --- src/Command.cpp | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/src/Command.cpp b/src/Command.cpp index 07fcd3efe7..6c2dc8194d 100644 --- a/src/Command.cpp +++ b/src/Command.cpp @@ -586,23 +586,41 @@ int Command::ExecuteControlBlock(int block, CpptrajState& State) mprintf("DEBUG: Start: CurrentVars:"); CurrentVars_.PrintVariables(); } + int blockErrors = 0; while (ret == ControlBlock::NOT_DONE) { for (ControlBlock::const_iterator it = control_[block]->begin(); it != control_[block]->end(); ++it) { if (it->CommandIs(NEW_BLOCK)) { // Execute next control block - if (ExecuteControlBlock(block+1, State)) return 1; + int cbret = ExecuteControlBlock(block+1, State); + if (cbret != 0) { + if (State.ExitOnError()) + return 1; + else + blockErrors += (1 + cbret); + } } else { for (int i = 0; i < block; i++) mprintf(" "); // Execute command - if ( ExecuteCommand(State, *it) != CpptrajState::OK ) return 1; + CpptrajState::RetType cmret = ExecuteCommand(State, *it); + if (cmret != CpptrajState::OK) { + if (State.ExitOnError()) + return 1; + else + blockErrors++; + } } } ret = control_[block]->CheckDone(CurrentVars_); } - if (ret == ControlBlock::ERROR) return 1; - return 0; + if (ret == ControlBlock::ERROR) { + if (State.ExitOnError()) + return 1; + else + blockErrors++; + } + return blockErrors; } /** Handle the given command. If inside a control block, if the command is @@ -632,6 +650,8 @@ CpptrajState::RetType Command::Dispatch(CpptrajState& State, std::string const& mprintf("CONTROL: Executing %zu control block(s).\n", control_.size()); if (State.QuietBlocks()) SetWorldSilent(true); int cbret = ExecuteControlBlock(0, State); + if (cbret > 1) + mprinterr("Error: %i errors encountered in control block.\n", cbret); ClearControlBlocks(); if (State.QuietBlocks()) SetWorldSilent(false); if (cbret != 0) return CpptrajState::ERR; @@ -817,6 +837,7 @@ CpptrajState::RetType Command::ProcessInput(CpptrajState& State, std::string con # endif if (cmode == CpptrajState::ERR) { nInputErrors++; + //mprintf("DEBUG: Error encountered and ExitOnError is %i\n", (int)State.ExitOnError()); if (State.ExitOnError()) break; } else if (cmode == CpptrajState::QUIT) break; From cbe268dab7cf0ce75337b0f30fe6cdf057f38656 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 26 Nov 2019 11:49:24 -0500 Subject: [PATCH 17/58] DRR - Add calculation of difference of last half of data from long-time estimate --- src/Analysis_EvalEquilibration.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/Analysis_EvalEquilibration.cpp b/src/Analysis_EvalEquilibration.cpp index 88cf852ce3..42beafb73a 100644 --- a/src/Analysis_EvalEquilibration.cpp +++ b/src/Analysis_EvalEquilibration.cpp @@ -207,11 +207,22 @@ Analysis::RetType Analysis_EvalEquilibration::Analyze() { statsout_->Printf("\tFinal Param A%li = %g\n", ip - Params.begin(), *ip); } - // For inverse fit - // Params[0] = A0 = Long-time (final) density + // Params[0] = A0 = Long-time (final) value // Params[1] = A1 = relaxation constant^-1 // Params[2] = A2 = time offset + // Determine the absolute difference of the long-time estimated value + // from the average value of the last half of the data. + unsigned int halfwayPt = (Yvals.size() / 2); + double Yavg = 0; + for (unsigned int hidx = halfwayPt; hidx < Yvals.size(); hidx++) + Yavg += Yvals[hidx]; + Yavg /= (double)(Yvals.size() - halfwayPt); + mprintf("\tLast half = %g\n", Yavg); + double ValA = Yavg - Params[0]; + if (ValA < 0) ValA = -ValA; + mprintf("\tValA = %g\n", ValA); + // Create output curve DataSet_Mesh& OUT = static_cast( *(*ot) ); for (unsigned int i = 0; i != Xvals.size(); i++) From e68ff12bdc1ad73b172b774ec096ca60427a6810 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 26 Nov 2019 12:11:38 -0500 Subject: [PATCH 18/58] DRR - New forms of exponentials that are more consistent with each other and with first order decay. Bounded by A0 OP A2 (where OP is + for decay and - for inverse) and A2 at times 0 and infinity --- src/Analysis_EvalEquilibration.cpp | 66 ++++++++++++++++++++---------- 1 file changed, 45 insertions(+), 21 deletions(-) diff --git a/src/Analysis_EvalEquilibration.cpp b/src/Analysis_EvalEquilibration.cpp index 42beafb73a..15eb74c9bb 100644 --- a/src/Analysis_EvalEquilibration.cpp +++ b/src/Analysis_EvalEquilibration.cpp @@ -88,7 +88,7 @@ Analysis::RetType Analysis_EvalEquilibration::Setup(ArgList& analyzeArgs, Analys } /** Exponential (high relax to low) - * A0*(exp(A1*(X))) + * A2 + (A0*(exp(A1*X))) */ int EQ_relax(CurveFit::Darray const& Xvals, CurveFit::Darray const& Params, CurveFit::Darray& Yvals) @@ -97,12 +97,12 @@ int EQ_relax(CurveFit::Darray const& Xvals, CurveFit::Darray const& Params, double A1 = Params[1]; double A2 = Params[2]; for (unsigned int n = 0; n != Xvals.size(); ++n) - Yvals[n] = A0 * ( exp( A1 * (Xvals[n]+A2) ) ); + Yvals[n] = A2 + ( A0 * exp( -A1 * Xvals[n] ) ); return 0; } /** Inverse exponential (low relax to high). - * A0*(exp(A1*(1/X))) + * A2 - (A0*(exp(A1*X))) */ int EQ_invRelax(CurveFit::Darray const& Xvals, CurveFit::Darray const& Params, CurveFit::Darray& Yvals) @@ -111,7 +111,7 @@ int EQ_invRelax(CurveFit::Darray const& Xvals, CurveFit::Darray const& Params, double A1 = Params[1]; double A2 = Params[2]; for (unsigned int n = 0; n != Xvals.size(); ++n) - Yvals[n] = A0 * ( exp( A1 * (1/(Xvals[n]+A2)) ) ); + Yvals[n] = A2 - ( A0 * exp( -A1 * Xvals[n] ) ); return 0; } @@ -163,6 +163,21 @@ Analysis::RetType Analysis_EvalEquilibration::Analyze() { continue; } + // Set up initial X and Y values. + double offset = 0.0; // TODO remove + CurveFit::Darray Xvals, Yvals; + Xvals.reserve( DS.Size() ); + Yvals.reserve( DS.Size() ); + for (unsigned int i = 0; i != DS.Size(); i++) { + double xval = DS.Xcrd(i); + if (xval <= 0) { + mprintf("Warning: Ignoring X value <= 0: %g\n", xval); + } else { + Xvals.push_back( xval - offset ); + Yvals.push_back( DS.Dval(i) ); + } + } +/* // Set up initial X and Y values. Offset the X values so we start from // 1. double offset = DS.Xcrd(0) - 1.0; @@ -172,14 +187,29 @@ Analysis::RetType Analysis_EvalEquilibration::Analyze() { Yvals.reserve( DS.Size() ); for (unsigned int i = 0; i != DS.Size(); i++) { double xval = DS.Xcrd(i); - //if (xval <= 0) { - // mprintf("Warning: Ignoring X value <= 0: %g\n", xval); - //} else { - Xvals.push_back( xval - offset ); - Yvals.push_back( DS.Dval(i) ); - //} + Xvals.push_back( xval - offset ); + Yvals.push_back( DS.Dval(i) ); } +*/ + // Determine the average value of the last half of the data. + unsigned int halfwayPt = (Yvals.size() / 2); + double Yavg = 0; + for (unsigned int hidx = halfwayPt; hidx < Yvals.size(); hidx++) + Yavg += Yvals[hidx]; + Yavg /= (double)(Yvals.size() - halfwayPt); + mprintf("\tLast half = %g\n", Yavg); + // Set initial guesses for parameters. + CurveFit::Darray Params(3); + //Params[0] = 0.01; // TODO long avg minus first? + //Params[1] = 0.1; // TODO abs slope? + //Params[2] = intercept; // TODO long avg? + Params[0] = Yavg - DS.Dval(0); + if (Params[0] < 0) Params[0] = -Params[0]; + Params[1] = 0.1; + Params[2] = Yavg; + +/* // Set initial guesses for parameters: A0 = intercept, A2 = offset // A1 could be slope, but if it is too small this can lead to convergence // issues. Just use -1. @@ -191,6 +221,7 @@ Analysis::RetType Analysis_EvalEquilibration::Analyze() { //if (Params[1] > 0) // Params[1] = -Params[1]; Params[2] = 0; +*/ for (CurveFit::Darray::const_iterator ip = Params.begin(); ip != Params.end(); ++ip) { statsout_->Printf("\tInitial Param A%li = %g\n", ip - Params.begin(), *ip); } @@ -207,19 +238,12 @@ Analysis::RetType Analysis_EvalEquilibration::Analyze() { statsout_->Printf("\tFinal Param A%li = %g\n", ip - Params.begin(), *ip); } - // Params[0] = A0 = Long-time (final) value - // Params[1] = A1 = relaxation constant^-1 - // Params[2] = A2 = time offset - + // Params[0] = A0 = + // Params[1] = A1 = + // Params[2] = A2 = // Determine the absolute difference of the long-time estimated value // from the average value of the last half of the data. - unsigned int halfwayPt = (Yvals.size() / 2); - double Yavg = 0; - for (unsigned int hidx = halfwayPt; hidx < Yvals.size(); hidx++) - Yavg += Yvals[hidx]; - Yavg /= (double)(Yvals.size() - halfwayPt); - mprintf("\tLast half = %g\n", Yavg); - double ValA = Yavg - Params[0]; + double ValA = Yavg - Params[2]; if (ValA < 0) ValA = -ValA; mprintf("\tValA = %g\n", ValA); From 54588a8e9f5376c25cff07fd3b184f1d0c6f6aae Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 26 Nov 2019 12:43:32 -0500 Subject: [PATCH 19/58] DRR - Remove obsolete code --- src/Analysis_EvalEquilibration.cpp | 56 +++++++----------------------- 1 file changed, 13 insertions(+), 43 deletions(-) diff --git a/src/Analysis_EvalEquilibration.cpp b/src/Analysis_EvalEquilibration.cpp index 15eb74c9bb..481484974a 100644 --- a/src/Analysis_EvalEquilibration.cpp +++ b/src/Analysis_EvalEquilibration.cpp @@ -145,16 +145,16 @@ Analysis::RetType Analysis_EvalEquilibration::Analyze() { //} statsout_->Printf("\t----- Nonlinear Fit -----\n"); - // Determine relaxation direction + // Determine general relaxation direction CurveFit::FitFunctionType fxn = 0; - int relaxationDir = 0; + //int relaxationDir = 0; if (slope < 0) { mprintf("\tUsing relaxation form: A0*exp(A1*x)\n"); - relaxationDir = -1; + //relaxationDir = -1; fxn = EQ_relax; } else if (slope > 0) { mprintf("\tUsing inverse relaxation form: A0*exp(A1*(1/x))\n"); - relaxationDir = 1; + //relaxationDir = 1; fxn = EQ_invRelax; } else { // Special case: if slope was exactly 0 (should be rare). Consider this @@ -164,33 +164,19 @@ Analysis::RetType Analysis_EvalEquilibration::Analyze() { } // Set up initial X and Y values. - double offset = 0.0; // TODO remove CurveFit::Darray Xvals, Yvals; Xvals.reserve( DS.Size() ); Yvals.reserve( DS.Size() ); for (unsigned int i = 0; i != DS.Size(); i++) { double xval = DS.Xcrd(i); - if (xval <= 0) { - mprintf("Warning: Ignoring X value <= 0: %g\n", xval); + if (xval < 0) { + mprintf("Warning: Ignoring X value < 0: %g\n", xval); } else { - Xvals.push_back( xval - offset ); + Xvals.push_back( xval ); Yvals.push_back( DS.Dval(i) ); } } -/* - // Set up initial X and Y values. Offset the X values so we start from - // 1. - double offset = DS.Xcrd(0) - 1.0; - mprintf("\tFirst X value is %g, Using an offset of %g\n", DS.Xcrd(0), offset); - CurveFit::Darray Xvals, Yvals; - Xvals.reserve( DS.Size() ); - Yvals.reserve( DS.Size() ); - for (unsigned int i = 0; i != DS.Size(); i++) { - double xval = DS.Xcrd(i); - Xvals.push_back( xval - offset ); - Yvals.push_back( DS.Dval(i) ); - } -*/ + // Determine the average value of the last half of the data. unsigned int halfwayPt = (Yvals.size() / 2); double Yavg = 0; @@ -201,27 +187,11 @@ Analysis::RetType Analysis_EvalEquilibration::Analyze() { // Set initial guesses for parameters. CurveFit::Darray Params(3); - //Params[0] = 0.01; // TODO long avg minus first? - //Params[1] = 0.1; // TODO abs slope? - //Params[2] = intercept; // TODO long avg? Params[0] = Yavg - DS.Dval(0); if (Params[0] < 0) Params[0] = -Params[0]; - Params[1] = 0.1; + Params[1] = 0.1; // TODO absolute slope? Params[2] = Yavg; -/* - // Set initial guesses for parameters: A0 = intercept, A2 = offset - // A1 could be slope, but if it is too small this can lead to convergence - // issues. Just use -1. - CurveFit::Darray Params(3); - Params[0] = intercept; - Params[1] = -1.0; - // For exponential fit, the A1 param should be < 0 - //Params[1] = slope; - //if (Params[1] > 0) - // Params[1] = -Params[1]; - Params[2] = 0; -*/ for (CurveFit::Darray::const_iterator ip = Params.begin(); ip != Params.end(); ++ip) { statsout_->Printf("\tInitial Param A%li = %g\n", ip - Params.begin(), *ip); } @@ -238,9 +208,9 @@ Analysis::RetType Analysis_EvalEquilibration::Analyze() { statsout_->Printf("\tFinal Param A%li = %g\n", ip - Params.begin(), *ip); } - // Params[0] = A0 = - // Params[1] = A1 = - // Params[2] = A2 = + // Params[0] = A0 = Gap between final and initial values + // Params[1] = A1 = Relaxation constant + // Params[2] = A2 = Final value at long time // Determine the absolute difference of the long-time estimated value // from the average value of the last half of the data. double ValA = Yavg - Params[2]; @@ -250,7 +220,7 @@ Analysis::RetType Analysis_EvalEquilibration::Analyze() { // Create output curve DataSet_Mesh& OUT = static_cast( *(*ot) ); for (unsigned int i = 0; i != Xvals.size(); i++) - OUT.AddXY( Xvals[i] + offset, fit.FinalY()[i] ); + OUT.AddXY( Xvals[i], fit.FinalY()[i] ); // Statistics double corr_coeff, ChiSq, TheilU, rms_percent_error; From bdbcb27146383d84d9702da197f6b889dec92e22 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 26 Nov 2019 12:57:13 -0500 Subject: [PATCH 20/58] DRR - Make it easier to add more results data sets --- src/Analysis_EvalEquilibration.cpp | 31 +++++++++++++++++++++--------- src/Analysis_EvalEquilibration.h | 14 ++++++++++++-- 2 files changed, 34 insertions(+), 11 deletions(-) diff --git a/src/Analysis_EvalEquilibration.cpp b/src/Analysis_EvalEquilibration.cpp index 481484974a..cc182363c9 100644 --- a/src/Analysis_EvalEquilibration.cpp +++ b/src/Analysis_EvalEquilibration.cpp @@ -12,6 +12,16 @@ Analysis_EvalEquilibration::Analysis_EvalEquilibration() : debug_(0) {} +const char* Analysis_EvalEquilibration::OdataStr_[NDATA] = { + "chisq", + "name" +}; + +DataSet::DataType Analysis_EvalEquilibration::OdataType_[NDATA] = { + DataSet::DOUBLE, + DataSet::STRING +}; + // Analysis_EvalEquilibration::Help() void Analysis_EvalEquilibration::Help() const { mprintf("\n"); @@ -64,14 +74,17 @@ Analysis::RetType Analysis_EvalEquilibration::Setup(ArgList& analyzeArgs, Analys outfile->AddDataSet( setOut ); } } - dataChiSq_ = setup.DSL().AddSet( DataSet::DOUBLE, MetaData( dsname_, "chisq" ) ); - dataName_ = setup.DSL().AddSet( DataSet::STRING, MetaData( dsname_, "name" ) ); + // Results data sets + data_.reserve( inputSets_.size() ); DataSet::SizeArray nData(1, inputSets_.size()); - dataChiSq_->Allocate( nData ); - dataName_->Allocate( nData ); - if (resultsOut != 0) { - resultsOut->AddDataSet( dataChiSq_ ); - resultsOut->AddDataSet( dataName_ ); + for (int idx = 0; idx != (int)NDATA; idx++) + { + DataSet* ds = setup.DSL().AddSet( OdataType_[idx], MetaData( dsname_, OdataStr_[idx] ) ); + if (ds == 0) return Analysis::ERR; + ds->Allocate( nData ); + if (resultsOut != 0) + resultsOut->AddDataSet( ds ); + data_.push_back( ds ); } mprintf(" EVALEQUILIBRATION: Evaluate equilibration of %zu sets.\n", inputSets_.size()); @@ -233,8 +246,8 @@ Analysis::RetType Analysis_EvalEquilibration::Analyze() { corr_coeff, ChiSq, TheilU, rms_percent_error); long int oidx = (it - inputSets_.begin()); - dataChiSq_->Add(oidx, &ChiSq); - dataName_->Add(oidx, (*it)->legend()); + data_[CHISQ]->Add(oidx, &ChiSq); + data_[NAME]->Add(oidx, (*it)->legend()); statsout_->Printf("\n"); } diff --git a/src/Analysis_EvalEquilibration.h b/src/Analysis_EvalEquilibration.h index 632315d4fc..2ed15a0afc 100644 --- a/src/Analysis_EvalEquilibration.h +++ b/src/Analysis_EvalEquilibration.h @@ -12,12 +12,22 @@ class Analysis_EvalEquilibration : public Analysis { Analysis::RetType Setup(ArgList&, AnalysisSetup&, int); Analysis::RetType Analyze(); private: + /// Enumeration for output data + enum OdataType { + CHISQ = 0, ///< Hold chi^2 of fit for each input set + NAME, ///< Hold name of each input set + NDATA + }; + /// Hold aspect for each output data + static const char* OdataStr_[NDATA]; + /// Hold data type for each output data + static DataSet::DataType OdataType_[NDATA]; + Array1D inputSets_; ///< Will hold data to evaluate std::vector outputSets_; ///< Will hold final fit curves std::string dsname_; ///< Output set(s) base name CpptrajFile* statsout_; ///< File to write stats to. - DataSet* dataChiSq_; ///< Hold chi^2 of fit for each input set - DataSet* dataName_; ///< Hold name for each input set + std::vector data_; ///< Will hold output data double tolerance_; int maxIt_; int debug_; From 8c2e21193d5305958be954bb7ed842180248fc5d Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 26 Nov 2019 12:59:57 -0500 Subject: [PATCH 21/58] DRR - Add final fit parameters to results --- src/Analysis_EvalEquilibration.cpp | 9 +++++++++ src/Analysis_EvalEquilibration.h | 3 +++ 2 files changed, 12 insertions(+) diff --git a/src/Analysis_EvalEquilibration.cpp b/src/Analysis_EvalEquilibration.cpp index cc182363c9..9e714cbcd9 100644 --- a/src/Analysis_EvalEquilibration.cpp +++ b/src/Analysis_EvalEquilibration.cpp @@ -14,10 +14,16 @@ Analysis_EvalEquilibration::Analysis_EvalEquilibration() : const char* Analysis_EvalEquilibration::OdataStr_[NDATA] = { "chisq", + "A0", + "A1", + "A2", "name" }; DataSet::DataType Analysis_EvalEquilibration::OdataType_[NDATA] = { + DataSet::DOUBLE, + DataSet::DOUBLE, + DataSet::DOUBLE, DataSet::DOUBLE, DataSet::STRING }; @@ -247,6 +253,9 @@ Analysis::RetType Analysis_EvalEquilibration::Analyze() { long int oidx = (it - inputSets_.begin()); data_[CHISQ]->Add(oidx, &ChiSq); + data_[A0]->Add(oidx, &Params[0]); + data_[A1]->Add(oidx, &Params[0] + 1); + data_[A2]->Add(oidx, &Params[0] + 2); data_[NAME]->Add(oidx, (*it)->legend()); statsout_->Printf("\n"); diff --git a/src/Analysis_EvalEquilibration.h b/src/Analysis_EvalEquilibration.h index 2ed15a0afc..ad07ffbb92 100644 --- a/src/Analysis_EvalEquilibration.h +++ b/src/Analysis_EvalEquilibration.h @@ -15,6 +15,9 @@ class Analysis_EvalEquilibration : public Analysis { /// Enumeration for output data enum OdataType { CHISQ = 0, ///< Hold chi^2 of fit for each input set + A0, + A1, + A2, NAME, ///< Hold name of each input set NDATA }; From 64d0b31c7b9c45938337c2740cf55bb30d965952 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 26 Nov 2019 13:10:46 -0500 Subject: [PATCH 22/58] DRR - Add determination of equilibrated via cutoffs --- src/Analysis_EvalEquilibration.cpp | 30 ++++++++++++++++++++++++++++-- src/Analysis_EvalEquilibration.h | 9 +++++++-- 2 files changed, 35 insertions(+), 4 deletions(-) diff --git a/src/Analysis_EvalEquilibration.cpp b/src/Analysis_EvalEquilibration.cpp index 9e714cbcd9..5e7159eb59 100644 --- a/src/Analysis_EvalEquilibration.cpp +++ b/src/Analysis_EvalEquilibration.cpp @@ -8,16 +8,21 @@ Analysis_EvalEquilibration::Analysis_EvalEquilibration() : Analysis(HIDDEN), statsout_(0), tolerance_(0), + valaCut_(0), + chisqCut_(0), maxIt_(0), debug_(0) {} const char* Analysis_EvalEquilibration::OdataStr_[NDATA] = { - "chisq", "A0", "A1", "A2", - "name" + "corr", + "vala", + "chisq", + "name", + "result" }; DataSet::DataType Analysis_EvalEquilibration::OdataType_[NDATA] = { @@ -25,6 +30,9 @@ DataSet::DataType Analysis_EvalEquilibration::OdataType_[NDATA] = { DataSet::DOUBLE, DataSet::DOUBLE, DataSet::DOUBLE, + DataSet::DOUBLE, + DataSet::DOUBLE, + DataSet::STRING, DataSet::STRING }; @@ -47,6 +55,16 @@ Analysis::RetType Analysis_EvalEquilibration::Setup(ArgList& analyzeArgs, Analys mprinterr("Error: Tolerance must be greater than or equal to 0.0\n"); return Analysis::ERR; } + valaCut_ = analyzeArgs.getKeyDouble("valacut", 0.01); + if (valaCut_ <= 0) { + mprinterr("Error: valacut must be > 0\n"); + return Analysis::ERR; + } + chisqCut_ = analyzeArgs.getKeyDouble("chisqcut", 0.05); + if (chisqCut_ <= 0) { + mprinterr("Error: chisqcut must be > 0\n"); + return Analysis::ERR; + } maxIt_ = analyzeArgs.getKeyInt("maxit", 500); if (maxIt_ < 1) { mprinterr("Error: Max iterations must be greater than or equal to 1.\n"); @@ -102,6 +120,8 @@ Analysis::RetType Analysis_EvalEquilibration::Setup(ArgList& analyzeArgs, Analys mprintf("\tStatistics output to '%s'\n", statsout_->Filename().full()); if (resultsOut != 0) mprintf("\tResults output to '%s'\n", resultsOut->DataFilename().full()); + mprintf("\tCutoff for last half average vs estimated long term value: %g\n", valaCut_); + mprintf("\tCutoff for non-linear fit chi^2: %g\n", chisqCut_); return Analysis::OK; } @@ -256,7 +276,13 @@ Analysis::RetType Analysis_EvalEquilibration::Analyze() { data_[A0]->Add(oidx, &Params[0]); data_[A1]->Add(oidx, &Params[0] + 1); data_[A2]->Add(oidx, &Params[0] + 2); + data_[CORR]->Add(oidx, &corr_coeff); + data_[VALA]->Add(oidx, &ValA); data_[NAME]->Add(oidx, (*it)->legend()); + if ( ValA < valaCut_ && ChiSq < chisqCut_ ) + data_[RESULT]->Add(oidx, "yes"); + else + data_[RESULT]->Add(oidx, "no"); statsout_->Printf("\n"); } diff --git a/src/Analysis_EvalEquilibration.h b/src/Analysis_EvalEquilibration.h index ad07ffbb92..46b85ee1fa 100644 --- a/src/Analysis_EvalEquilibration.h +++ b/src/Analysis_EvalEquilibration.h @@ -14,11 +14,14 @@ class Analysis_EvalEquilibration : public Analysis { private: /// Enumeration for output data enum OdataType { - CHISQ = 0, ///< Hold chi^2 of fit for each input set - A0, + A0 = 0, A1, A2, + CORR, + VALA, + CHISQ, ///< Hold chi^2 of fit for each input set NAME, ///< Hold name of each input set + RESULT, NDATA }; /// Hold aspect for each output data @@ -32,6 +35,8 @@ class Analysis_EvalEquilibration : public Analysis { CpptrajFile* statsout_; ///< File to write stats to. std::vector data_; ///< Will hold output data double tolerance_; + double valaCut_; + double chisqCut_; int maxIt_; int debug_; }; From 80d8d54895025a5e927d7faceca580c0b8f5ccdb Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 26 Nov 2019 13:29:06 -0500 Subject: [PATCH 23/58] DRR - Add slope calculation --- src/Analysis_EvalEquilibration.cpp | 24 ++++++++++++++++++++++++ src/Analysis_EvalEquilibration.h | 9 +++++---- 2 files changed, 29 insertions(+), 4 deletions(-) diff --git a/src/Analysis_EvalEquilibration.cpp b/src/Analysis_EvalEquilibration.cpp index 5e7159eb59..86bcc60240 100644 --- a/src/Analysis_EvalEquilibration.cpp +++ b/src/Analysis_EvalEquilibration.cpp @@ -10,6 +10,7 @@ Analysis_EvalEquilibration::Analysis_EvalEquilibration() : tolerance_(0), valaCut_(0), chisqCut_(0), + slopeCut_(0), maxIt_(0), debug_(0) {} @@ -65,6 +66,12 @@ Analysis::RetType Analysis_EvalEquilibration::Setup(ArgList& analyzeArgs, Analys mprinterr("Error: chisqcut must be > 0\n"); return Analysis::ERR; } + slopeCut_ = analyzeArgs.getKeyDouble("slopecut", 0.000001); + if (slopeCut_ <= 0) { + mprinterr("Error: slopecut must be > 0\n"); + return Analysis::ERR; + } + maxIt_ = analyzeArgs.getKeyInt("maxit", 500); if (maxIt_ < 1) { mprinterr("Error: Max iterations must be greater than or equal to 1.\n"); @@ -122,6 +129,7 @@ Analysis::RetType Analysis_EvalEquilibration::Setup(ArgList& analyzeArgs, Analys mprintf("\tResults output to '%s'\n", resultsOut->DataFilename().full()); mprintf("\tCutoff for last half average vs estimated long term value: %g\n", valaCut_); mprintf("\tCutoff for non-linear fit chi^2: %g\n", chisqCut_); + mprintf("\tCutoff for slope: %g\n", slopeCut_); return Analysis::OK; } @@ -261,6 +269,22 @@ Analysis::RetType Analysis_EvalEquilibration::Analyze() { for (unsigned int i = 0; i != Xvals.size(); i++) OUT.AddXY( Xvals[i], fit.FinalY()[i] ); + // Calculate where slope reaches slopeCut_ + DataSet_1D::Darray slopeX, slopeY; + OUT.FiniteDifference(DataSet_1D::FORWARD, slopeX, slopeY); + double finalx=-1, finaly=0; + for (unsigned int sidx = 0; sidx != slopeY.size(); ++sidx) { + //mprintf("DEBUG: slope %g %g\n", slopeX[sidx], slopeY[sidx]); + double absSlope = slopeY[sidx]; + if (absSlope < 0) absSlope = -absSlope; + if (absSlope < slopeCut_) { + finalx = slopeX[sidx]; + finaly = slopeY[sidx]; + break; + } + } + statsout_->Printf("\tSlope cutoff satisfied at %g %g\n", finalx, finaly); + // Statistics double corr_coeff, ChiSq, TheilU, rms_percent_error; err = fit.Statistics( Yvals, corr_coeff, ChiSq, TheilU, rms_percent_error); diff --git a/src/Analysis_EvalEquilibration.h b/src/Analysis_EvalEquilibration.h index 46b85ee1fa..10bda54adb 100644 --- a/src/Analysis_EvalEquilibration.h +++ b/src/Analysis_EvalEquilibration.h @@ -34,10 +34,11 @@ class Analysis_EvalEquilibration : public Analysis { std::string dsname_; ///< Output set(s) base name CpptrajFile* statsout_; ///< File to write stats to. std::vector data_; ///< Will hold output data - double tolerance_; - double valaCut_; - double chisqCut_; - int maxIt_; + double tolerance_; ///< Tolerance for non-linear curve fit + double valaCut_; ///< Cutoff for long-term estimate from last half of data + double chisqCut_; ///< Cutoff for non-linear fit chi^2 + double slopeCut_; ///< Cutoff for non-linear fit slope + int maxIt_; ///< Max iterations to perform non-linear fit int debug_; }; #endif From 3bcb826c8c3875804bd20b5c2d716cafec8b9731 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 26 Nov 2019 13:38:53 -0500 Subject: [PATCH 24/58] DRR - Fix equation forms in output --- src/Analysis_EvalEquilibration.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Analysis_EvalEquilibration.cpp b/src/Analysis_EvalEquilibration.cpp index 86bcc60240..faa7e90a14 100644 --- a/src/Analysis_EvalEquilibration.cpp +++ b/src/Analysis_EvalEquilibration.cpp @@ -196,11 +196,11 @@ Analysis::RetType Analysis_EvalEquilibration::Analyze() { CurveFit::FitFunctionType fxn = 0; //int relaxationDir = 0; if (slope < 0) { - mprintf("\tUsing relaxation form: A0*exp(A1*x)\n"); + mprintf("\tUsing relaxation form: A2 + (A0*exp(-A1*x))\n"); //relaxationDir = -1; fxn = EQ_relax; } else if (slope > 0) { - mprintf("\tUsing inverse relaxation form: A0*exp(A1*(1/x))\n"); + mprintf("\tUsing inverse relaxation form: A2 - (A0*exp(-A1*x))\n"); //relaxationDir = 1; fxn = EQ_invRelax; } else { From f00e40c0a96bfc004b0887f5e3f5945e4c7e3dce Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 26 Nov 2019 13:55:38 -0500 Subject: [PATCH 25/58] DRR - Add 1st half avg calc. Make sure printing to statsout --- src/Analysis_EvalEquilibration.cpp | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/src/Analysis_EvalEquilibration.cpp b/src/Analysis_EvalEquilibration.cpp index faa7e90a14..7a1d759fab 100644 --- a/src/Analysis_EvalEquilibration.cpp +++ b/src/Analysis_EvalEquilibration.cpp @@ -226,18 +226,23 @@ Analysis::RetType Analysis_EvalEquilibration::Analyze() { // Determine the average value of the last half of the data. unsigned int halfwayPt = (Yvals.size() / 2); - double Yavg = 0; + double Yavg1half = 0; + for (unsigned int hidx = 0; hidx < halfwayPt; hidx++) + Yavg1half += Yvals[hidx]; + Yavg1half /= (double)halfwayPt; + statsout_->Printf("\tFirst half = %g\n", Yavg1half); + double Yavg2half = 0; for (unsigned int hidx = halfwayPt; hidx < Yvals.size(); hidx++) - Yavg += Yvals[hidx]; - Yavg /= (double)(Yvals.size() - halfwayPt); - mprintf("\tLast half = %g\n", Yavg); + Yavg2half += Yvals[hidx]; + Yavg2half /= (double)(Yvals.size() - halfwayPt); + statsout_->Printf("\tLast half = %g\n", Yavg2half); // Set initial guesses for parameters. CurveFit::Darray Params(3); - Params[0] = Yavg - DS.Dval(0); + Params[0] = Yavg2half - DS.Dval(0); if (Params[0] < 0) Params[0] = -Params[0]; Params[1] = 0.1; // TODO absolute slope? - Params[2] = Yavg; + Params[2] = Yavg2half; for (CurveFit::Darray::const_iterator ip = Params.begin(); ip != Params.end(); ++ip) { statsout_->Printf("\tInitial Param A%li = %g\n", ip - Params.begin(), *ip); @@ -260,9 +265,9 @@ Analysis::RetType Analysis_EvalEquilibration::Analyze() { // Params[2] = A2 = Final value at long time // Determine the absolute difference of the long-time estimated value // from the average value of the last half of the data. - double ValA = Yavg - Params[2]; + double ValA = Yavg2half - Params[2]; if (ValA < 0) ValA = -ValA; - mprintf("\tValA = %g\n", ValA); + statsout_->Printf("\tValA = %g\n", ValA); // Create output curve DataSet_Mesh& OUT = static_cast( *(*ot) ); From 99699590a20c1d3445ef3b81a58451511a743886 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 26 Nov 2019 14:41:14 -0500 Subject: [PATCH 26/58] DRR - Add equil. time --- src/Analysis_EvalEquilibration.cpp | 4 ++++ src/Analysis_EvalEquilibration.h | 1 + 2 files changed, 5 insertions(+) diff --git a/src/Analysis_EvalEquilibration.cpp b/src/Analysis_EvalEquilibration.cpp index 7a1d759fab..7a77375c33 100644 --- a/src/Analysis_EvalEquilibration.cpp +++ b/src/Analysis_EvalEquilibration.cpp @@ -22,6 +22,7 @@ const char* Analysis_EvalEquilibration::OdataStr_[NDATA] = { "corr", "vala", "chisq", + "eqtime", "name", "result" }; @@ -33,6 +34,7 @@ DataSet::DataType Analysis_EvalEquilibration::OdataType_[NDATA] = { DataSet::DOUBLE, DataSet::DOUBLE, DataSet::DOUBLE, + DataSet::DOUBLE, DataSet::STRING, DataSet::STRING }; @@ -288,6 +290,7 @@ Analysis::RetType Analysis_EvalEquilibration::Analyze() { break; } } + statsout_->Printf("\tFinal slope: %g\n", slopeY.back()); statsout_->Printf("\tSlope cutoff satisfied at %g %g\n", finalx, finaly); // Statistics @@ -307,6 +310,7 @@ Analysis::RetType Analysis_EvalEquilibration::Analyze() { data_[A2]->Add(oidx, &Params[0] + 2); data_[CORR]->Add(oidx, &corr_coeff); data_[VALA]->Add(oidx, &ValA); + data_[EQTIME]->Add(oidx, &finalx); data_[NAME]->Add(oidx, (*it)->legend()); if ( ValA < valaCut_ && ChiSq < chisqCut_ ) data_[RESULT]->Add(oidx, "yes"); diff --git a/src/Analysis_EvalEquilibration.h b/src/Analysis_EvalEquilibration.h index 10bda54adb..a222c23651 100644 --- a/src/Analysis_EvalEquilibration.h +++ b/src/Analysis_EvalEquilibration.h @@ -20,6 +20,7 @@ class Analysis_EvalEquilibration : public Analysis { CORR, VALA, CHISQ, ///< Hold chi^2 of fit for each input set + EQTIME, ///< Time at which slope cutoff was satisfied NAME, ///< Hold name of each input set RESULT, NDATA From f123a429cfbd859a45c35df0d70ec5cb1346ca07 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 26 Nov 2019 14:55:47 -0500 Subject: [PATCH 27/58] DRR - Get F value from regression --- src/Action_Diffusion.cpp | 3 ++- src/Analysis_EvalEquilibration.cpp | 4 ++-- src/Analysis_Regression.cpp | 4 ++-- src/Analysis_RemLog.cpp | 4 ++-- src/DataSet_1D.cpp | 4 ++-- src/DataSet_1D.h | 4 ++-- src/DataSet_Mesh.cpp | 3 ++- 7 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/Action_Diffusion.cpp b/src/Action_Diffusion.cpp index 6bb6c86f13..cecee59e99 100644 --- a/src/Action_Diffusion.cpp +++ b/src/Action_Diffusion.cpp @@ -494,7 +494,8 @@ void Action_Diffusion::CalcDiffusionConst(unsigned int& set, DataSet* ds, int Nd double Factor = 10.0 / ((double)Ndim * 2.0); double slope, intercept, corr; double Dval = 0.0; - if (data.LinearRegression( slope, intercept, corr, 0 ) == 0) + double Fval = 0; + if (data.LinearRegression( slope, intercept, corr, Fval, 0 ) == 0) Dval = slope * Factor; if (diffout_ == 0) mprintf("\t'%s' D= %g Slope= %g Int= %g Corr= %g\n", data.legend(), Dval, diff --git a/src/Analysis_EvalEquilibration.cpp b/src/Analysis_EvalEquilibration.cpp index 7a77375c33..5b3ab8664e 100644 --- a/src/Analysis_EvalEquilibration.cpp +++ b/src/Analysis_EvalEquilibration.cpp @@ -180,8 +180,8 @@ Analysis::RetType Analysis_EvalEquilibration::Analyze() { mprintf("Warning: Not enough data in '%s' to evaluate.\n", DS.legend()); continue; } - double slope, intercept, correl; - int err = DS.LinearRegression( slope, intercept, correl, statsout_ ); + double slope, intercept, correl, Fval; + int err = DS.LinearRegression( slope, intercept, correl, Fval, statsout_ ); if (err != 0) { mprinterr("Error: Could not perform linear regression fit.\n"); return Analysis::ERR; diff --git a/src/Analysis_Regression.cpp b/src/Analysis_Regression.cpp index 5e84287ee2..3434fd2677 100644 --- a/src/Analysis_Regression.cpp +++ b/src/Analysis_Regression.cpp @@ -90,11 +90,11 @@ Analysis::RetType Analysis_Regression::Analyze() { DS->legend(), DS->Size()); else { DataSet_1D* dsout = output_dsets_[idx]; - double slope, intercept, correl; + double slope, intercept, correl, Fval; mprintf(" %u: %s\n", idx, DS->legend()); if (!statsout_->IsStream()) statsout_->Printf("#Stats for %s\n", DS->legend()); - int err = DS->LinearRegression( slope, intercept, correl, statsout_ ); + int err = DS->LinearRegression( slope, intercept, correl, Fval, statsout_ ); slope_dsets_[idx]->Add(0, &slope); int_dsets_[idx]->Add(0, &intercept); nerr += err; diff --git a/src/Analysis_RemLog.cpp b/src/Analysis_RemLog.cpp index 32a78935b8..6d18cc3b47 100644 --- a/src/Analysis_RemLog.cpp +++ b/src/Analysis_RemLog.cpp @@ -291,8 +291,8 @@ Analysis::RetType Analysis_RemLog::Analyze() { for (int crdidx = 0; crdidx < (int)remlog_->Size(); crdidx++) { for (int replica = 0; replica < (int)remlog_->Size(); replica++) mesh.SetY(replica, (double)replicaFrac[replica][crdidx] / (double)frame); - double slope, intercept, correl; - mesh.LinearRegression(slope, intercept, correl, 0); + double slope, intercept, correl, Fval; + mesh.LinearRegression(slope, intercept, correl, Fval, 0); repFracSlope_->Printf(" %14.7g %14.7g", slope * 100.0, correl); //frame+1, crdidx, slope * 100.0, intercept * 100.0, correl } diff --git a/src/DataSet_1D.cpp b/src/DataSet_1D.cpp index 25e5933cd5..cd9764332e 100644 --- a/src/DataSet_1D.cpp +++ b/src/DataSet_1D.cpp @@ -253,7 +253,7 @@ double DataSet_1D::CorrCoeff( DataSet_1D const& D2 ) const { * fit.c:linear_regression(). */ int DataSet_1D::LinearRegression( double& slope, double& intercept, - double& correl, CpptrajFile* outfile ) const + double& correl, double& Fval, CpptrajFile* outfile ) const { if (Size() < 2) { mprinterr("Error: '%s' has less than 2 values, cannot calculate regression.\n", @@ -311,7 +311,7 @@ int DataSet_1D::LinearRegression( double& slope, double& intercept, double stdErrIntercept = sqrt( residualMeanSq * (1.0 / mesh_size + xavg * xavg / sxx) ); double stdErrSlope = sqrt( residualMeanSq / sxx ); double sumSqRegression = syy - residualSumSq; - double Fval = sumSqRegression / residualMeanSq; + Fval = sumSqRegression / residualMeanSq; //double R2 = sumSqRegression / syy; if (outfile != 0) { outfile->Printf("\tStandard error of slope= %g\n" diff --git a/src/DataSet_1D.h b/src/DataSet_1D.h index 4d9aaddf03..671f760549 100644 --- a/src/DataSet_1D.h +++ b/src/DataSet_1D.h @@ -31,8 +31,8 @@ class DataSet_1D : public DataSet { int CrossCorr(DataSet_1D const&, DataSet_1D&, int, bool, bool) const; /// Calculate auto-correlation double CorrCoeff(DataSet_1D const&) const; - /// Calculate linear regression; report slope, intercept, and correlation. - int LinearRegression(double&, double&, double&, CpptrajFile*) const; + /// Calculate linear regression; report slope, intercept, correlation, and F-value. + int LinearRegression(double&, double&, double&, double&, CpptrajFile*) const; /// Integration types. enum IntegrationType { TRAPEZOID = 0 }; /// \return sum of integration over DataSet. diff --git a/src/DataSet_Mesh.cpp b/src/DataSet_Mesh.cpp index 28494a59f5..306de00315 100644 --- a/src/DataSet_Mesh.cpp +++ b/src/DataSet_Mesh.cpp @@ -173,7 +173,8 @@ int DataSet_Mesh::SingleExpRegression(double& slope, double& intercept, } mesh_y_[i] = log( mesh_y_[i] ); } - int err = LinearRegression(slope, intercept, correl, out); + double Fval; + int err = LinearRegression(slope, intercept, correl, Fval, out); // Restore original Y values mesh_y_ = yorig; return err; From 01d46b168b0ceb3046aa666059e4175271e396d7 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 26 Nov 2019 15:01:46 -0500 Subject: [PATCH 28/58] DRR - Save regression F value --- src/Analysis_EvalEquilibration.cpp | 3 +++ src/Analysis_EvalEquilibration.h | 1 + 2 files changed, 4 insertions(+) diff --git a/src/Analysis_EvalEquilibration.cpp b/src/Analysis_EvalEquilibration.cpp index 5b3ab8664e..e720fc8a08 100644 --- a/src/Analysis_EvalEquilibration.cpp +++ b/src/Analysis_EvalEquilibration.cpp @@ -19,6 +19,7 @@ const char* Analysis_EvalEquilibration::OdataStr_[NDATA] = { "A0", "A1", "A2", + "F", "corr", "vala", "chisq", @@ -35,6 +36,7 @@ DataSet::DataType Analysis_EvalEquilibration::OdataType_[NDATA] = { DataSet::DOUBLE, DataSet::DOUBLE, DataSet::DOUBLE, + DataSet::DOUBLE, DataSet::STRING, DataSet::STRING }; @@ -308,6 +310,7 @@ Analysis::RetType Analysis_EvalEquilibration::Analyze() { data_[A0]->Add(oidx, &Params[0]); data_[A1]->Add(oidx, &Params[0] + 1); data_[A2]->Add(oidx, &Params[0] + 2); + data_[FVAL]->Add(oidx, &Fval); data_[CORR]->Add(oidx, &corr_coeff); data_[VALA]->Add(oidx, &ValA); data_[EQTIME]->Add(oidx, &finalx); diff --git a/src/Analysis_EvalEquilibration.h b/src/Analysis_EvalEquilibration.h index a222c23651..2d744359bf 100644 --- a/src/Analysis_EvalEquilibration.h +++ b/src/Analysis_EvalEquilibration.h @@ -17,6 +17,7 @@ class Analysis_EvalEquilibration : public Analysis { A0 = 0, A1, A2, + FVAL, ///< F value from linear regression CORR, VALA, CHISQ, ///< Hold chi^2 of fit for each input set From 351a94894fc34459769e21a088dbe1a9284c0b03 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 26 Nov 2019 15:11:30 -0500 Subject: [PATCH 29/58] DRR - Use offset so X values start at 0. This gives proper weight to the t=0 case where the first value should be close to A0+A2 or A2-A0 --- src/Analysis_EvalEquilibration.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Analysis_EvalEquilibration.cpp b/src/Analysis_EvalEquilibration.cpp index e720fc8a08..5e82cc9e27 100644 --- a/src/Analysis_EvalEquilibration.cpp +++ b/src/Analysis_EvalEquilibration.cpp @@ -215,6 +215,7 @@ Analysis::RetType Analysis_EvalEquilibration::Analyze() { } // Set up initial X and Y values. + double offset = DS.Xcrd(0); CurveFit::Darray Xvals, Yvals; Xvals.reserve( DS.Size() ); Yvals.reserve( DS.Size() ); @@ -223,7 +224,7 @@ Analysis::RetType Analysis_EvalEquilibration::Analyze() { if (xval < 0) { mprintf("Warning: Ignoring X value < 0: %g\n", xval); } else { - Xvals.push_back( xval ); + Xvals.push_back( xval - offset ); Yvals.push_back( DS.Dval(i) ); } } @@ -276,7 +277,7 @@ Analysis::RetType Analysis_EvalEquilibration::Analyze() { // Create output curve DataSet_Mesh& OUT = static_cast( *(*ot) ); for (unsigned int i = 0; i != Xvals.size(); i++) - OUT.AddXY( Xvals[i], fit.FinalY()[i] ); + OUT.AddXY( Xvals[i] + offset, fit.FinalY()[i] ); // Calculate where slope reaches slopeCut_ DataSet_1D::Darray slopeX, slopeY; From fade0c1d820d48845a423956ab3d087970f2f1fa Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 26 Nov 2019 15:35:47 -0500 Subject: [PATCH 30/58] DRR - Try out new equation --- src/Analysis_EvalEquilibration.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/Analysis_EvalEquilibration.cpp b/src/Analysis_EvalEquilibration.cpp index 5e82cc9e27..9bdcc072f6 100644 --- a/src/Analysis_EvalEquilibration.cpp +++ b/src/Analysis_EvalEquilibration.cpp @@ -166,6 +166,16 @@ int EQ_invRelax(CurveFit::Darray const& Xvals, CurveFit::Darray const& Params, return 0; } +int EQ_plateau(CurveFit::Darray const& Xvals, CurveFit::Darray const& Params, + CurveFit::Darray& Yvals) +{ + double A0 = Params[0]; + double A1 = Params[1]; + double A2 = Params[2]; + for (unsigned int n = 0; n != Xvals.size(); ++n) + Yvals[n] = A0 + ((A2 - A0) * (1 - exp(-A1 * Xvals[n]))); + return 0; +} // Analysis_EvalEquilibration::Analyze() Analysis::RetType Analysis_EvalEquilibration::Analyze() { @@ -199,6 +209,7 @@ Analysis::RetType Analysis_EvalEquilibration::Analyze() { // Determine general relaxation direction CurveFit::FitFunctionType fxn = 0; //int relaxationDir = 0; +/* if (slope < 0) { mprintf("\tUsing relaxation form: A2 + (A0*exp(-A1*x))\n"); //relaxationDir = -1; @@ -213,6 +224,8 @@ Analysis::RetType Analysis_EvalEquilibration::Analyze() { mprintf("\tSlope of linear fit is 0.\n"); continue; } +*/ + fxn = EQ_plateau; // Set up initial X and Y values. double offset = DS.Xcrd(0); From e540bebf5ad4e01d77ad4ed6b79c13f24de7ee92 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 27 Nov 2019 09:50:47 -0500 Subject: [PATCH 31/58] DRR - Use average of first 10% of data as a guess for A0 --- src/Analysis_EvalEquilibration.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Analysis_EvalEquilibration.cpp b/src/Analysis_EvalEquilibration.cpp index 9bdcc072f6..182557efaa 100644 --- a/src/Analysis_EvalEquilibration.cpp +++ b/src/Analysis_EvalEquilibration.cpp @@ -242,6 +242,14 @@ Analysis::RetType Analysis_EvalEquilibration::Analyze() { } } + // Get the average of the first 1% of data + unsigned int tenpctPt = (double)Yvals.size() * 0.01; + if (tenpctPt < 1) tenpctPt = 1; + double Y10pctAvg = 0; + for (unsigned int hidx = 0; hidx < tenpctPt; hidx++) + Y10pctAvg += Yvals[hidx]; + Y10pctAvg /= (double)tenpctPt; + statsout_->Printf("\tAvg of first 10%% of the data: %g\n", Y10pctAvg); // Determine the average value of the last half of the data. unsigned int halfwayPt = (Yvals.size() / 2); double Yavg1half = 0; @@ -257,7 +265,7 @@ Analysis::RetType Analysis_EvalEquilibration::Analyze() { // Set initial guesses for parameters. CurveFit::Darray Params(3); - Params[0] = Yavg2half - DS.Dval(0); + Params[0] = Y10pctAvg; if (Params[0] < 0) Params[0] = -Params[0]; Params[1] = 0.1; // TODO absolute slope? Params[2] = Yavg2half; From 7a4701b01b264adf49f9fa8bb8c9fab205c0e51a Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 27 Nov 2019 14:52:20 -0500 Subject: [PATCH 32/58] DRR - Remove old functions --- src/Analysis_EvalEquilibration.cpp | 49 +++--------------------------- 1 file changed, 4 insertions(+), 45 deletions(-) diff --git a/src/Analysis_EvalEquilibration.cpp b/src/Analysis_EvalEquilibration.cpp index 182557efaa..b5f1ea1990 100644 --- a/src/Analysis_EvalEquilibration.cpp +++ b/src/Analysis_EvalEquilibration.cpp @@ -138,34 +138,9 @@ Analysis::RetType Analysis_EvalEquilibration::Setup(ArgList& analyzeArgs, Analys return Analysis::OK; } -/** Exponential (high relax to low) - * A2 + (A0*(exp(A1*X))) +/** Exponential decay with time constant A1 from an initial value A0 + * to a plateau A2. */ -int EQ_relax(CurveFit::Darray const& Xvals, CurveFit::Darray const& Params, - CurveFit::Darray& Yvals) -{ - double A0 = Params[0]; - double A1 = Params[1]; - double A2 = Params[2]; - for (unsigned int n = 0; n != Xvals.size(); ++n) - Yvals[n] = A2 + ( A0 * exp( -A1 * Xvals[n] ) ); - return 0; -} - -/** Inverse exponential (low relax to high). - * A2 - (A0*(exp(A1*X))) - */ -int EQ_invRelax(CurveFit::Darray const& Xvals, CurveFit::Darray const& Params, - CurveFit::Darray& Yvals) -{ - double A0 = Params[0]; - double A1 = Params[1]; - double A2 = Params[2]; - for (unsigned int n = 0; n != Xvals.size(); ++n) - Yvals[n] = A2 - ( A0 * exp( -A1 * Xvals[n] ) ); - return 0; -} - int EQ_plateau(CurveFit::Darray const& Xvals, CurveFit::Darray const& Params, CurveFit::Darray& Yvals) { @@ -207,24 +182,8 @@ Analysis::RetType Analysis_EvalEquilibration::Analyze() { statsout_->Printf("\t----- Nonlinear Fit -----\n"); // Determine general relaxation direction - CurveFit::FitFunctionType fxn = 0; - //int relaxationDir = 0; -/* - if (slope < 0) { - mprintf("\tUsing relaxation form: A2 + (A0*exp(-A1*x))\n"); - //relaxationDir = -1; - fxn = EQ_relax; - } else if (slope > 0) { - mprintf("\tUsing inverse relaxation form: A2 - (A0*exp(-A1*x))\n"); - //relaxationDir = 1; - fxn = EQ_invRelax; - } else { - // Special case: if slope was exactly 0 (should be rare). Consider this - // equilibrated. - mprintf("\tSlope of linear fit is 0.\n"); - continue; - } -*/ + CurveFit::FitFunctionType fxn = EQ_plateau; + fxn = EQ_plateau; // Set up initial X and Y values. From 13bf81223b4c8cf899403bf6f6f5a07b309d0d0a Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 27 Nov 2019 14:54:05 -0500 Subject: [PATCH 33/58] DRR - Add comment --- src/Analysis_EvalEquilibration.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Analysis_EvalEquilibration.cpp b/src/Analysis_EvalEquilibration.cpp index b5f1ea1990..420a18ec6e 100644 --- a/src/Analysis_EvalEquilibration.cpp +++ b/src/Analysis_EvalEquilibration.cpp @@ -161,7 +161,7 @@ Analysis::RetType Analysis_EvalEquilibration::Analyze() { if (!statsout_->IsStream()) statsout_->Printf("# %s\n", (*it)->legend()); DataSet_1D const& DS = static_cast( *(*it) ); - // First do a linear fit. + // First do a linear fit. TODO may not need this anymore statsout_->Printf("\t----- Linear Fit -----\n"); if (DS.Size() < 2) { mprintf("Warning: Not enough data in '%s' to evaluate.\n", DS.legend()); From 4b475a4bca15e1930e85002deb2428db80c31714 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 3 Dec 2019 09:10:56 -0500 Subject: [PATCH 34/58] DRR - Add slope criterion in final determination. Add more output when criteria not satisfied. --- src/Analysis_EvalEquilibration.cpp | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/src/Analysis_EvalEquilibration.cpp b/src/Analysis_EvalEquilibration.cpp index 420a18ec6e..bb3f57dc5b 100644 --- a/src/Analysis_EvalEquilibration.cpp +++ b/src/Analysis_EvalEquilibration.cpp @@ -263,6 +263,7 @@ Analysis::RetType Analysis_EvalEquilibration::Analyze() { DataSet_1D::Darray slopeX, slopeY; OUT.FiniteDifference(DataSet_1D::FORWARD, slopeX, slopeY); double finalx=-1, finaly=0; + bool slopeCutSatisfied = false; for (unsigned int sidx = 0; sidx != slopeY.size(); ++sidx) { //mprintf("DEBUG: slope %g %g\n", slopeX[sidx], slopeY[sidx]); double absSlope = slopeY[sidx]; @@ -270,11 +271,15 @@ Analysis::RetType Analysis_EvalEquilibration::Analyze() { if (absSlope < slopeCut_) { finalx = slopeX[sidx]; finaly = slopeY[sidx]; + slopeCutSatisfied = true; break; } } statsout_->Printf("\tFinal slope: %g\n", slopeY.back()); - statsout_->Printf("\tSlope cutoff satisfied at %g %g\n", finalx, finaly); + if (slopeCutSatisfied) + statsout_->Printf("\tSlope cutoff satisfied at %g %g\n", finalx, finaly); + else + statsout_->Printf("\tSlope cutoff not satisfied.\n"); // Statistics double corr_coeff, ChiSq, TheilU, rms_percent_error; @@ -296,7 +301,21 @@ Analysis::RetType Analysis_EvalEquilibration::Analyze() { data_[VALA]->Add(oidx, &ValA); data_[EQTIME]->Add(oidx, &finalx); data_[NAME]->Add(oidx, (*it)->legend()); - if ( ValA < valaCut_ && ChiSq < chisqCut_ ) + // Determine if criteria met. + bool longAvgCutSatisfied, chiCutSatisfied; + if (ValA < valaCut_) + longAvgCutSatisfied = true; + else { + longAvgCutSatisfied = false; + mprintf("\tLong-time average cut not satisfied.\n"); + } + if (ChiSq < chisqCut_) + chiCutSatisfied = true; + else { + chiCutSatisfied = false; + mprintf("\tNon-linear fit chi-squared not satisfied.\n"); + } + if ( longAvgCutSatisfied && chiCutSatisfied && slopeCutSatisfied) data_[RESULT]->Add(oidx, "yes"); else data_[RESULT]->Add(oidx, "no"); From 837969cc26e469581128c651c6199d48743f47bd Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 3 Dec 2019 09:36:23 -0500 Subject: [PATCH 35/58] DRR - In for loops with files, warn if an expression with wildcards does not expand to a file, dont add it. --- src/Control.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Control.cpp b/src/Control.cpp index e299cedfc1..35f9c336b8 100644 --- a/src/Control.cpp +++ b/src/Control.cpp @@ -291,8 +291,13 @@ int ControlBlock_For::SetupBlock(CpptrajState& State, ArgList& argIn) { // Check if file name expansion should occur if (list[il].find_first_of("*?") != std::string::npos) { File::NameArray files = File::ExpandToFilenames( list[il] ); - for (File::NameArray::const_iterator fn = files.begin(); fn != files.end(); ++fn) - MH.List_.push_back( fn->Full() ); + // Special case. Check if no expansion occurred. + if (files.size() == 1 && list[il] == files.front().Full()) { + mprintf("Warning: '%s' matches no files.\n", list[il].c_str()); + } else { + for (File::NameArray::const_iterator fn = files.begin(); fn != files.end(); ++fn) + MH.List_.push_back( fn->Full() ); + } } else MH.List_.push_back( list[il] ); } From 9e3cb59203b30d8932f57660555ba0191255d472 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 3 Dec 2019 09:49:55 -0500 Subject: [PATCH 36/58] DRR - Revision bump for evalquil. May need to be updated in the future since the command is not fully ready yet. --- src/Version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Version.h b/src/Version.h index e517e628e2..a8529c23c7 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.23.1" +#define CPPTRAJ_INTERNAL_VERSION "V4.23.2" /// PYTRAJ relies on this #define CPPTRAJ_VERSION_STRING CPPTRAJ_INTERNAL_VERSION #endif From ae5a6bbf2fc51917ff3b15f08288f676a7f81c31 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 3 Dec 2019 10:49:28 -0500 Subject: [PATCH 37/58] DRR - When output from actions/analyses is directed to stdout, ensure it is properly directed to output file if one has been specified. --- src/CpptrajStdio.cpp | 5 +++++ src/CpptrajStdio.h | 1 + src/FileIO_Std.cpp | 3 ++- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/CpptrajStdio.cpp b/src/CpptrajStdio.cpp index fd7ac57615..84c99964b2 100644 --- a/src/CpptrajStdio.cpp +++ b/src/CpptrajStdio.cpp @@ -171,3 +171,8 @@ int OutputToFile(const char* fname) { } return 0; } + +/** \return STDOUT_ cast to a void pointer. */ +void* CpptrajStdout() { + return (void*)STDOUT_; +} diff --git a/src/CpptrajStdio.h b/src/CpptrajStdio.h index 704cc3af00..c2063a0dab 100644 --- a/src/CpptrajStdio.h +++ b/src/CpptrajStdio.h @@ -21,4 +21,5 @@ void SuppressAllOutput(); void SuppressErrorMsg(bool); void FinalizeIO(); int OutputToFile(const char*); +void* CpptrajStdout(); #endif diff --git a/src/FileIO_Std.cpp b/src/FileIO_Std.cpp index 5cbd21c166..128fc262f2 100644 --- a/src/FileIO_Std.cpp +++ b/src/FileIO_Std.cpp @@ -1,6 +1,7 @@ // FileIO_Std: Standard C file operations #include // std::min, std::max #include "FileIO_Std.h" // FileIO.h, cstdio +#include "CpptrajStdio.h" // CpptrajStdout // CONSTRUCTOR FileIO_Std::FileIO_Std() : fp_(NULL), isStream_(false) {} @@ -13,7 +14,7 @@ int FileIO_Std::OpenStream(StreamType type) { Close(); switch (type) { case STDIN : fp_ = stdin; break; - case STDOUT: fp_ = stdout; break; + case STDOUT: fp_ = (FILE*)CpptrajStdout(); break; case STDERR: fp_ = stderr; break; } isStream_ = true; From 7fb8ce9336e9896eb0490f7166a48db858da0d53 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 3 Dec 2019 12:44:46 -0500 Subject: [PATCH 38/58] DRR - Ensure residue IsTerminal info is preserved on strip so things like 'pdbter' still work properly --- src/Topology.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Topology.cpp b/src/Topology.cpp index e004e622b9..2ed2567bed 100644 --- a/src/Topology.cpp +++ b/src/Topology.cpp @@ -1255,6 +1255,7 @@ Topology* Topology::ModifyByMap(std::vector const& MapIn, bool setupFullPar newParm->residues_.push_back( Residue(cr.Name(), cr.OriginalResNum(), cr.Icode(), cr.ChainID()) ); newParm->residues_.back().SetFirstAtom( newatom ); + newParm->residues_.back().SetTerminal( cr.IsTerminal() ); oldres = curres; } // Clear bond information from new atom From 827251892635e7f8779e433479885f70e87fa606 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 3 Dec 2019 14:09:58 -0500 Subject: [PATCH 39/58] DRR - Use not isdigit so single wildcard is properly handled --- src/MaskToken.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MaskToken.cpp b/src/MaskToken.cpp index a5898ba671..4d4e80ce18 100644 --- a/src/MaskToken.cpp +++ b/src/MaskToken.cpp @@ -90,7 +90,7 @@ int MaskToken::SetToken( MaskTokenType typeIn, std::string const& tokenString ) // Check that all chars are digits or - for number range if (type_ == ResNum || type_ == AtomNum || type_ == MolNum || type_ == OresNum) { for (std::string::const_iterator p = tokenString.begin(); p != tokenString.end(); ++p) { - if (*p != '-' && isalpha(*p, loc)) { + if (*p != '-' && !isdigit(*p, loc)) { //mprintf("DEBUG: making name type because of %c\n",*p); if (MakeNameType()) return 1; break; From c8589e62fc7d672946c01468396b48cc5bed2c60 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 4 Dec 2019 11:53:14 -0500 Subject: [PATCH 40/58] DRR - Add gamma function code. Use cmath version if c++11 support available, otherwise use an approximation --- src/GammaFn.cpp | 162 ++++++++++++++++++++++++++++++++++++++++++++++++ src/GammaFn.h | 11 ++++ 2 files changed, 173 insertions(+) create mode 100644 src/GammaFn.cpp create mode 100644 src/GammaFn.h diff --git a/src/GammaFn.cpp b/src/GammaFn.cpp new file mode 100644 index 0000000000..aa3f57ba87 --- /dev/null +++ b/src/GammaFn.cpp @@ -0,0 +1,162 @@ +#include "GammaFn.h" +#include +#ifndef C11_SUPPORT +#include // DBL_MAX +#include "Constants.h" +#include "CpptrajStdio.h" + // The code below is adapted from the Gamma code found here: + // https://www.johndcook.com/blog/stand_alone_code/ + // It is only intended for use when C++11 support is not available since + // the errors from the "real" gamma function increase for large X + // (about X=14 and above). + // When C++11 support is available, the functions from cmath are used. +#endif + +/** \return the Gamma function value of xIn. + * The Gamma function is defined as: + * GammaFn(x) = Integral(0, inf)[ exp(-t) * t^(x-1) dt ] for x > 0 + * GammaFn(n+1) = n! for n = 1,2,3... + * GammaFn(.5) = sqrt(PI) + */ +double Cpptraj::Math::GammaFn(double xIn) { +# ifdef C11_SUPPORT + return tgamma(xIn); +# else + if (xIn <= 0) { + mprinterr("Error: GammaFn argument is <= 0 (%g)\n", xIn); + return 0; + } + + // --------------------------------------------- + if (xIn < 0.001) { + // For small x, 1/Gamma(x) has power series x + gamma x^2 - ... + // So in this range, 1/Gamma(x) = x + gamma x^2 with error on the order of x^3. + // The relative error over this interval is less than 6e-7. + return 1.0 / (xIn * (1.0 + Constants::EULER_MASC * xIn)); + } + + // --------------------------------------------- + if (xIn < 12.0) { + // The algorithm directly approximates gamma over (1,2) and uses + // reduction identities to reduce other arguments to this interval. + double y = xIn; + int n = 0; + bool lt_one = (xIn < 1.0); + + // Add or subtract integers as necessary to bring y into 1 < y < 2 + if (lt_one) + y += 1.0; + else { + n = (int)(floor(y)) - 1; + y -= n; + } + + // numerator coefficients for approximation over 1 < y < 2 + static const double p[] = + { + -1.71618513886549492533811E+0, + 2.47656508055759199108314E+1, + -3.79804256470945635097577E+2, + 6.29331155312818442661052E+2, + 8.66966202790413211295064E+2, + -3.14512729688483675254357E+4, + -3.61444134186911729807069E+4, + 6.64561438202405440627855E+4 + }; + + // denominator coefficients for approximation over the interval (1,2) + static const double q[] = + { + -3.08402300119738975254353E+1, + 3.15350626979604161529144E+2, + -1.01515636749021914166146E+3, + -3.10777167157231109440444E+3, + 2.25381184209801510330112E+4, + 4.75584627752788110767815E+3, + -1.34659959864969306392456E+5, + -1.15132259675553483497211E+5 + }; + double num = 0.0; + double den = 1.0; + int i; + + double z = y - 1; + for (i = 0; i < 8; i++) + { + num = (num + p[i])*z; + den = den*z + q[i]; + } + double result = num/den + 1.0; + + // Apply correction if argument was not initially in (1,2) + if (lt_one) { + // Use identity gamma(z) = gamma(z+1)/z + // The variable "result" now holds gamma of the original y + 1 + // Thus we use y-1 to get back the orginal y. + result /= (y-1.0); + } else { + // Use the identity gamma(z+n) = z*(z+1)* ... *(z+n-1)*gamma(z) + for (i = 0; i < n; i++) + result *= y++; + } + + return result; + } // END if xIn < 12 + + // --------------------------------------------- + if (xIn > 171.624) { + // Answer is out of range. Return +inf + double temp = DBL_MAX; + return 2 * temp; + } + + // --------------------------------------------- + return exp(LogGammaFn(xIn)); +# endif /* C11_SUPPORT */ +} + +/** \return the natural log-Gamma function value of xIn. */ +double Cpptraj::Math::LogGammaFn(double xIn) { +# ifdef C11_SUPPORT + return lgamma( xIn ); +# else + if (xIn <= 0) { + mprinterr("Error: GammaFn argument is <= 0 (%g)\n", xIn); + return 0; + } + + if (xIn < 12.0) { + return log(fabs(GammaFn(xIn))); + } + + // Abramowitz and Stegun 6.1.41 + // Asymptotic series should be good to at least 11 or 12 figures + // For error analysis, see Whittiker and Watson + // A Course in Modern Analysis (1927), page 252 + + static const double c[8] = + { + 1.0/12.0, + -1.0/360.0, + 1.0/1260.0, + -1.0/1680.0, + 1.0/1188.0, + -691.0/360360.0, + 1.0/156.0, + -3617.0/122400.0 + }; + double z = 1.0/(xIn*xIn); + double sum = c[7]; + for (int i=6; i >= 0; i--) + { + sum *= z; + sum += c[i]; + } + double series = sum/xIn; + + static const double halfLogTwoPi = 0.91893853320467274178032973640562; + double logGamma = (xIn - 0.5)*log(xIn) - xIn + halfLogTwoPi + series; + return logGamma; +# endif /* C11_SUPPORT */ +} + diff --git a/src/GammaFn.h b/src/GammaFn.h new file mode 100644 index 0000000000..6a098f52dc --- /dev/null +++ b/src/GammaFn.h @@ -0,0 +1,11 @@ +#ifndef INC_GAMMAFN_H +#define INC_GAMMAFN_H +namespace Cpptraj { +namespace Math { + +double GammaFn(double); +double LogGammaFn(double); + +} // END namespace Math +} // END namespace Cpptraj +#endif From 6249070e07d451defd7c94744de4fcd55a6bc99a Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 4 Dec 2019 11:53:55 -0500 Subject: [PATCH 41/58] DRR - Add C11_SUPPORT define when c++11 support available --- configure | 1 + src/Analysis_EvalEquilibration.cpp | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 648ce124c6..406e22fdf0 100755 --- a/configure +++ b/configure @@ -681,6 +681,7 @@ SetupFinalFlags() { if [ $USE_SINGLEENSEMBLE -ne 0 ] ; then DIRECTIVES="$DIRECTIVES -DENABLE_SINGLE_ENSEMBLE" ; fi if [ ! -z "$LFS" ] ; then DIRECTIVES="$DIRECTIVES $LFS" ; fi if [ "$C11_SUPPORT" = 'yes' ] ; then + DIRECTIVES="$DIRECTIVES -DC11_SUPPORT" if [ "${LIB_STAT[$LFFTW3]}" != 'off' ] ; then DIRECTIVES="$DIRECTIVES -DLIBPME -DHAVE_FFTWD=1" fi diff --git a/src/Analysis_EvalEquilibration.cpp b/src/Analysis_EvalEquilibration.cpp index bb3f57dc5b..7cdc964644 100644 --- a/src/Analysis_EvalEquilibration.cpp +++ b/src/Analysis_EvalEquilibration.cpp @@ -5,7 +5,6 @@ #include "CurveFit.h" Analysis_EvalEquilibration::Analysis_EvalEquilibration() : - Analysis(HIDDEN), statsout_(0), tolerance_(0), valaCut_(0), From 7aa01ee28dca4f56c2cfc313768182c5641b0598 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 4 Dec 2019 11:55:17 -0500 Subject: [PATCH 42/58] DRR - Add GammaFn to build --- src/cpptrajdepend | 3 ++- src/cpptrajfiles | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/cpptrajdepend b/src/cpptrajdepend index 831f4978a4..03b4b44934 100644 --- a/src/cpptrajdepend +++ b/src/cpptrajdepend @@ -283,11 +283,12 @@ FileIO_Bzip2.o : FileIO_Bzip2.cpp CpptrajStdio.h FileIO.h FileIO_Bzip2.h FileIO_Gzip.o : FileIO_Gzip.cpp CpptrajStdio.h FileIO.h FileIO_Gzip.h FileIO_Mpi.o : FileIO_Mpi.cpp FileIO.h FileIO_Mpi.h Parallel.h FileIO_MpiShared.o : FileIO_MpiShared.cpp FileIO.h FileIO_Mpi.h FileIO_MpiShared.h Parallel.h -FileIO_Std.o : FileIO_Std.cpp FileIO.h FileIO_Std.h +FileIO_Std.o : FileIO_Std.cpp CpptrajStdio.h FileIO.h FileIO_Std.h FileName.o : FileName.cpp CpptrajStdio.h FileName.h StringRoutines.h FileTypes.o : FileTypes.cpp ArgList.h BaseIOtype.h CpptrajStdio.h FileTypes.h File_TempName.o : File_TempName.cpp CpptrajStdio.h FileName.h File_TempName.h StringRoutines.h Frame.o : Frame.cpp Atom.h AtomMask.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ReplicaDimArray.h Residue.h SymbolExporting.h Vec3.h +GammaFn.o : GammaFn.cpp Constants.h CpptrajStdio.h GammaFn.h GridAction.o : GridAction.cpp ArgList.h ArrayIterator.h AssociatedData.h Atom.h AtomExtra.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataSet.h DataSetList.h DataSet_3D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_GridFlt.h Dimension.h FileIO.h FileName.h Frame.h Grid.h GridAction.h GridBin.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Vec3.h HistBin.o : HistBin.cpp Constants.h CpptrajStdio.h Dimension.h HistBin.h Hungarian.o : Hungarian.cpp ArrayIterator.h Constants.h CpptrajStdio.h Hungarian.h Matrix.h diff --git a/src/cpptrajfiles b/src/cpptrajfiles index dd9450cf5e..794b3e40eb 100644 --- a/src/cpptrajfiles +++ b/src/cpptrajfiles @@ -288,6 +288,7 @@ COMMON_SOURCES= \ FileName.cpp \ FileTypes.cpp \ Frame.cpp \ + GammaFn.cpp \ GridAction.cpp \ HistBin.cpp \ Hungarian.cpp \ From 6f3eeed71d954cf47c8f6764299994b82a46b5e6 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 4 Dec 2019 13:34:02 -0500 Subject: [PATCH 43/58] DRR - Add file for calculating chi squared PDF --- src/ChiSqDist.cpp | 24 ++++++++++++++++++++++++ src/ChiSqDist.h | 10 ++++++++++ src/cpptrajdepend | 1 + src/cpptrajfiles | 1 + 4 files changed, 36 insertions(+) create mode 100644 src/ChiSqDist.cpp create mode 100644 src/ChiSqDist.h diff --git a/src/ChiSqDist.cpp b/src/ChiSqDist.cpp new file mode 100644 index 0000000000..5094319542 --- /dev/null +++ b/src/ChiSqDist.cpp @@ -0,0 +1,24 @@ +#include "ChiSqDist.h" +#include +#include "CpptrajStdio.h" +#include "GammaFn.h" + +double Cpptraj::Math::ChiSqDist(double chisq, int dof) { + if (chisq < 0) { + mprinterr("Error: ChiSqDist: Chi^2 value is < 0 (%g).\n", chisq); + return 0; + } + if (dof < 2) { + mprintf("Warning: ChiSqDist: Less than 2 degrees of freedom (%i)\n", dof); + } + + double n_over_2 = (double)dof / 2.0; + + double two_no2 = pow(2.0, n_over_2); + double chisq_no21 = pow(chisq, n_over_2 - 1.0); + double exp_chisq = exp(-chisq / 2.0); + double gamma_dof = GammaFn(n_over_2); + + double pval = (chisq_no21 * exp_chisq) / (two_no2 * gamma_dof); + return pval; +} diff --git a/src/ChiSqDist.h b/src/ChiSqDist.h new file mode 100644 index 0000000000..1e1a0db12d --- /dev/null +++ b/src/ChiSqDist.h @@ -0,0 +1,10 @@ +#ifndef INC_CHISQDIST_H +#define INC_CHISQDIST_H +namespace Cpptraj { +namespace Math { +/// \return the value of the chi^2 PDF given a chi^2 value and # of d.o.f. +double ChiSqDist(double, int); + +} +} +#endif diff --git a/src/cpptrajdepend b/src/cpptrajdepend index 03b4b44934..2e647c171e 100644 --- a/src/cpptrajdepend +++ b/src/cpptrajdepend @@ -144,6 +144,7 @@ ByteRoutines.o : ByteRoutines.cpp CIFfile.o : CIFfile.cpp Atom.h BufferedLine.h CIFfile.h CpptrajFile.h CpptrajStdio.h FileIO.h FileName.h NameType.h Parallel.h SymbolExporting.h CharMask.o : CharMask.cpp Atom.h CharMask.h CpptrajStdio.h MaskToken.h Molecule.h NameType.h Residue.h SymbolExporting.h CharmmParamFile.o : CharmmParamFile.cpp ArgList.h AtomType.h BufferedLine.h CharmmParamFile.h Constants.h CpptrajFile.h CpptrajStdio.h FileIO.h FileName.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h StringRoutines.h TypeNameHolder.h +ChiSqDist.o : ChiSqDist.cpp ChiSqDist.h CpptrajStdio.h GammaFn.h ClusterDist.o : ClusterDist.cpp ArgList.h ArrayIterator.h AssociatedData.h Atom.h AtomExtra.h AtomMap.h AtomMask.h AtomType.h Box.h ClusterDist.h Constants.h CoordinateInfo.h CpptrajFile.h DataSet.h DataSet_1D.h DataSet_Coords.h Dimension.h FileIO.h FileName.h Frame.h Hungarian.h MapAtom.h MaskToken.h Matrix.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h SymbolExporting.h SymmetricRmsdCalc.h TextFormat.h Topology.h TypeNameHolder.h Vec3.h ClusterList.o : ClusterList.cpp ArgList.h ArrayIterator.h AssociatedData.h Atom.h AtomExtra.h AtomMap.h AtomMask.h AtomType.h Box.h ClusterDist.h ClusterList.h ClusterNode.h ClusterSieve.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataSet.h DataSet_1D.h DataSet_Cmatrix.h DataSet_Coords.h Dimension.h FileIO.h FileName.h Frame.h Hungarian.h MapAtom.h MaskToken.h Matrix.h Matrix_3x3.h MetaData.h Molecule.h NameType.h PDBfile.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h ProgressBar.h Range.h ReplicaDimArray.h Residue.h StringRoutines.h SymbolExporting.h SymmetricRmsdCalc.h TextFormat.h Topology.h TypeNameHolder.h Vec3.h ClusterMap.o : ClusterMap.cpp ArgList.h AssociatedData.h ClusterMap.h Constants.h CpptrajFile.h CpptrajStdio.h DataSet.h DataSet_2D.h Dimension.h FileIO.h FileName.h MetaData.h Parallel.h ProgressBar.h ProgressTimer.h Range.h TextFormat.h Timer.h diff --git a/src/cpptrajfiles b/src/cpptrajfiles index 794b3e40eb..a4c7570148 100644 --- a/src/cpptrajfiles +++ b/src/cpptrajfiles @@ -146,6 +146,7 @@ COMMON_SOURCES= \ ByteRoutines.cpp \ CharMask.cpp \ CharmmParamFile.cpp \ + ChiSqDist.cpp \ CIFfile.cpp \ ClusterDist.cpp \ ClusterList.cpp \ From 92b0c6b72075c62a4ddd7901bb4ac792c4929d1e Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Wed, 4 Dec 2019 19:37:34 -0500 Subject: [PATCH 44/58] DRR - Create default cut --- src/Analysis_EvalEquilibration.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Analysis_EvalEquilibration.cpp b/src/Analysis_EvalEquilibration.cpp index 7cdc964644..2370317098 100644 --- a/src/Analysis_EvalEquilibration.cpp +++ b/src/Analysis_EvalEquilibration.cpp @@ -64,7 +64,7 @@ Analysis::RetType Analysis_EvalEquilibration::Setup(ArgList& analyzeArgs, Analys mprinterr("Error: valacut must be > 0\n"); return Analysis::ERR; } - chisqCut_ = analyzeArgs.getKeyDouble("chisqcut", 0.05); + chisqCut_ = analyzeArgs.getKeyDouble("chisqcut", 0.5); if (chisqCut_ <= 0) { mprinterr("Error: chisqcut must be > 0\n"); return Analysis::ERR; From 0b2939c074501ab7544283cdfeb55be8658dae22 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 5 Dec 2019 13:45:41 -0500 Subject: [PATCH 45/58] DRR - Improve strip warning message --- src/Action_Strip.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Action_Strip.cpp b/src/Action_Strip.cpp index 9a67a370a1..65bd3a3930 100644 --- a/src/Action_Strip.cpp +++ b/src/Action_Strip.cpp @@ -56,15 +56,15 @@ Action::RetType Action_Strip::Init(ArgList& actionArgs, ActionInit& init, int de Action::RetType Action_Strip::Setup(ActionSetup& setup) { if (setup.Top().SetupIntegerMask( M1_ )) return Action::ERR; if (M1_.None()) { - mprintf("Warning: strip: Mask [%s] has no atoms.\n",M1_.MaskString()); + // If no atoms will be kept, no need for this command. SKIP. + mprintf("Warning: Mask [%s] would strip all atoms. Skipping.\n", M1_.MaskString()); return Action::SKIP; } int numStripped = setup.Top().Natom() - M1_.Nselected(); mprintf("\tStripping %i atoms.\n", numStripped); - // If no atoms will be stripped, no need to use this command. SKIP + // SANITY CHECK: If no atoms will be stripped, no need to use this command. SKIP if ( numStripped == 0 ) { - mprintf("Warning: No atoms to strip. Skipping 'strip' for topology '%s'\n", - setup.Top().c_str()); + mprintf("Warning: No atoms to strip. Skipping.\n"); return Action::SKIP; } From d5d17b85236ecaf2de7a80a1ba650fc61188d695 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 5 Dec 2019 13:46:09 -0500 Subject: [PATCH 46/58] DRR - Add topresnum keyword for pdb output to use topology residue numbering instead of original --- src/Traj_PDBfile.cpp | 14 +++++++++++--- src/Traj_PDBfile.h | 2 ++ 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/Traj_PDBfile.cpp b/src/Traj_PDBfile.cpp index 82674a43c8..506c7fdcab 100644 --- a/src/Traj_PDBfile.cpp +++ b/src/Traj_PDBfile.cpp @@ -15,6 +15,7 @@ Traj_PDBfile::Traj_PDBfile() : terMode_(BY_MOL), conectMode_(NO_CONECT), pdbWriteMode_(NONE), + resNumType_(ORIGINAL), pdbAtom_(0), currentSet_(0), ter_num_(0), @@ -186,6 +187,7 @@ void Traj_PDBfile::WriteHelp() { "\tpdbres : Use PDB V3 residue names.\n" "\tpdbatom : Use PDB V3 atom names.\n" "\tpdbv3 : Use PDB V3 residue/atom names.\n" + "\ttopresnum : Use topology residue numbers; otherwise use original residue numbers.\n" "\tteradvance : Increment record (atom) # for TER records (default no).\n" "\tterbyres : Print TER cards based on residue sequence instead of molecules.\n" "\tpdbter : Print TER cards according to original PDB TER (if available).\n" @@ -223,6 +225,7 @@ int Traj_PDBfile::processWriteArgs(ArgList& argIn, DataSetList const& DSLin) { dumpq_ = true; radiiMode_ = VDW; } + if (argIn.hasKey("topresnum")) resNumType_ = TOPOLOGY; if (argIn.hasKey("terbyres")) terMode_ = BY_RES; else if (argIn.hasKey("noter")) terMode_ = NO_TER; else if (argIn.hasKey("pdbter"))terMode_ = ORIGINAL_PDB; @@ -774,6 +777,11 @@ int Traj_PDBfile::writeFrame(int set, Frame const& frameOut) { for (int aidx = 0; aidx != pdbTop_->Natom(); aidx++, Xptr += 3) { Atom const& atom = (*pdbTop_)[aidx]; int res = atom.ResNum(); + int resnum; + if (resNumType_ == ORIGINAL) + resnum = pdbTop_->Res(res).OriginalResNum(); + else // TOPOLOGY + resnum = res+1; if (include_ep_ || atom.Element() != Atom::EXTRAPT) { PDBfile::PDB_RECTYPE rectype; if ( resIsHet_[res] ) @@ -809,7 +817,7 @@ int Traj_PDBfile::writeFrame(int set, Frame const& frameOut) { } // TODO determine formal charges? file_.WriteCoord(rectype, anum, atomName, altLoc, resNames_[res], - chainID_[res], pdbTop_->Res(res).OriginalResNum(), + chainID_[res], resnum, pdbTop_->Res(res).Icode(), Xptr[0], Xptr[1], Xptr[2], Occ, Bfac, atom.ElementName(), 0, dumpq_); @@ -821,7 +829,7 @@ int Traj_PDBfile::writeFrame(int set, Frame const& frameOut) { if ( currentIdx == (unsigned int)(aidx + 1) ) { DataSet_Tensor::Ttype const& UM = ADP.Tensor(adpidx); file_.WriteANISOU( anum, atomName, resNames_[res], chainID_[res], - pdbTop_->Res(res).OriginalResNum(), + resnum, UM.Ptr(), atom.ElementName(), 0 ); adpidx++; } @@ -834,7 +842,7 @@ int Traj_PDBfile::writeFrame(int set, Frame const& frameOut) { if (aidx == *terIdx) { // FIXME: Should anum not be incremented until after? file_.WriteRecordHeader(PDBfile::TER, anum, "", ' ', resNames_[res], - chainID_[res], pdbTop_->Res(res).OriginalResNum(), + chainID_[res], resnum, pdbTop_->Res(res).Icode(), atom.ElementName()); anum += ter_num_; ++terIdx; diff --git a/src/Traj_PDBfile.h b/src/Traj_PDBfile.h index f340d3e1e6..679d5b63a2 100644 --- a/src/Traj_PDBfile.h +++ b/src/Traj_PDBfile.h @@ -55,10 +55,12 @@ class Traj_PDBfile: public TrajectoryIO { enum TER_Mode { BY_MOL = 0, BY_RES, ORIGINAL_PDB, NO_TER }; enum Radii_Mode { GB = 0, PARSE, VDW }; enum CONECT_Mode { NO_CONECT = 0, HETATM_ONLY, ALL_BONDS }; + enum RESNUM_Mode { ORIGINAL = 0, TOPOLOGY }; Radii_Mode radiiMode_; ///< Radii to use if PQR. TER_Mode terMode_; ///< TER card mode. CONECT_Mode conectMode_; ///< CONECT record mode. PDBWRITEMODE pdbWriteMode_; + RESNUM_Mode resNumType_; ///< What residue numbers will be used int pdbAtom_; int currentSet_; int ter_num_; ///< Amount to increment atom number for TER From 4e81e8191510ba3cee140a2af0029289dba87a31 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Thu, 5 Dec 2019 15:13:30 -0500 Subject: [PATCH 47/58] DRR - Update pdb trajout documentation --- doc/cpptraj.lyx | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/doc/cpptraj.lyx b/doc/cpptraj.lyx index f529086be0..6f5e145b46 100644 --- a/doc/cpptraj.lyx +++ b/doc/cpptraj.lyx @@ -14819,35 +14819,38 @@ vdw PQR format; write charges and vdW radii to occupancy/B-factor columns. \end_layout \begin_layout Description -pdbres: Use PDB V3 residue names. +pdbres Use PDB V3 residue names. Will write a default chain ID ('Z') for each residue if the corresponding topology does not have chain ID information. \end_layout \begin_layout Description -pdbatom: Use PDB V3 atom names. +pdbatom Use PDB V3 atom names. \end_layout \begin_layout Description -pdbv3: Use PDB V3 residue/atom names. +pdbv3 Use PDB V3 residue/atom names. Same as specifying 'pdbres' and 'pdbatom'. \end_layout \begin_layout Description -teradvance: Increment record (atom) number for TER records (not done by - default). +topresnum Use topology residue numbers; otherwise use original residue numbers. \end_layout \begin_layout Description -terbyres: Print TER cards based on residue sequence instead of molecules. +teradvance Increment record (atom) number for TER records (not done by default). \end_layout \begin_layout Description -pdbter: Print TER cards according to original PDB TER (if available). +terbyres Print TER cards based on residue sequence instead of molecules. \end_layout \begin_layout Description -noter: Do not write TER cards. +pdbter Print TER cards according to original PDB TER (if available). +\end_layout + +\begin_layout Description +noter Do not write TER cards. \end_layout \begin_layout Description @@ -14996,7 +14999,7 @@ cpptraj \end_layout \begin_layout Description -highprecision: (EXPERT USE ONLY) Write with 8.6 precision instead of 8.3. +highprecision (EXPERT USE ONLY) Write with 8.6 precision instead of 8.3. Note that since the width does not change, the precision of large coords may be lower than 6. \end_layout From a33bd29abf39627aaf32f0315a517ffe5e7b8388 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Fri, 31 Jan 2020 14:01:12 -0500 Subject: [PATCH 48/58] DRR - Fix missing include from forward declare --- src/Action_Matrix.cpp | 1 + src/cpptrajdepend | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Action_Matrix.cpp b/src/Action_Matrix.cpp index 99156812d8..ad93f3f5fe 100644 --- a/src/Action_Matrix.cpp +++ b/src/Action_Matrix.cpp @@ -3,6 +3,7 @@ #include "CpptrajStdio.h" #include "DistRoutines.h" #include "Constants.h" // DEGRAD +#include "DataSet_1D.h" // CONSTRUCTOR Action_Matrix::Action_Matrix() : diff --git a/src/cpptrajdepend b/src/cpptrajdepend index 0c36e6b420..0307f06b54 100644 --- a/src/cpptrajdepend +++ b/src/cpptrajdepend @@ -46,7 +46,7 @@ Action_LIE.o : Action_LIE.cpp Action.h ActionState.h Action_LIE.h ArgList.h Asso Action_LipidOrder.o : Action_LipidOrder.cpp Action.h ActionState.h Action_LipidOrder.h ArgList.h AssociatedData.h Atom.h AtomExtra.h AtomMask.h AtomType.h BaseIOtype.h Box.h CharMask.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h FileIO.h FileName.h FileTypes.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Vec3.h Action_MakeStructure.o : Action_MakeStructure.cpp Action.h ActionState.h Action_MakeStructure.h ArgList.h AssociatedData.h Atom.h AtomExtra.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h DihedralSearch.h Dimension.h DispatchObject.h FileIO.h FileName.h FileTypes.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h StringRoutines.h SymbolExporting.h TextFormat.h Timer.h Topology.h TorsionRoutines.h TypeNameHolder.h Vec3.h Action_Mask.o : Action_Mask.cpp Action.h ActionFrameCounter.h ActionState.h Action_Mask.h ArgList.h AssociatedData.h Atom.h AtomExtra.h AtomMask.h AtomType.h BaseIOtype.h Box.h CharMask.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h FileIO.h FileName.h FileTypes.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h OutputTrajCommon.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajectoryFile.h Trajout_Single.h TypeNameHolder.h Vec3.h -Action_Matrix.o : Action_Matrix.cpp Action.h ActionFrameCounter.h ActionState.h Action_Matrix.h ArgList.h Array1D.h ArrayIterator.h AssociatedData.h Atom.h AtomExtra.h AtomMask.h AtomType.h BaseIOtype.h Box.h ComplexArray.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_2D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_MatrixDbl.h DataSet_Vector.h Dimension.h DispatchObject.h DistRoutines.h FileIO.h FileName.h FileTypes.h Frame.h MaskToken.h Matrix.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Vec3.h +Action_Matrix.o : Action_Matrix.cpp Action.h ActionFrameCounter.h ActionState.h Action_Matrix.h ArgList.h Array1D.h ArrayIterator.h AssociatedData.h Atom.h AtomExtra.h AtomMask.h AtomType.h BaseIOtype.h Box.h ComplexArray.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_1D.h DataSet_2D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_MatrixDbl.h DataSet_Vector.h Dimension.h DispatchObject.h DistRoutines.h FileIO.h FileName.h FileTypes.h Frame.h MaskToken.h Matrix.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Vec3.h Action_MinImage.o : Action_MinImage.cpp Action.h ActionState.h Action_MinImage.h ArgList.h AssociatedData.h Atom.h AtomExtra.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h DistRoutines.h FileIO.h FileName.h FileTypes.h Frame.h ImagedAction.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Vec3.h Action_Molsurf.o : Action_Molsurf.cpp Action.h ActionState.h Action_Molsurf.h ArgList.h AssociatedData.h Atom.h AtomExtra.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h FileIO.h FileName.h FileTypes.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Vec3.h molsurf.h Action_MultiDihedral.o : Action_MultiDihedral.cpp Action.h ActionState.h Action_MultiDihedral.h ArgList.h AssociatedData.h Atom.h AtomExtra.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_1D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_double.h DihedralSearch.h Dimension.h DispatchObject.h FileIO.h FileName.h FileTypes.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h StringRoutines.h SymbolExporting.h TextFormat.h Timer.h Topology.h TorsionRoutines.h TypeNameHolder.h Vec3.h From a12491741cf13ce8ee1f487cbc25d0dbe3e84ff8 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 3 Mar 2020 09:07:04 -0500 Subject: [PATCH 49/58] DRR - Analysis_EvalEquilibration -> EvalPlateau; better name for what it actually does. --- ...libration.cpp => Analysis_EvalPlateau.cpp} | 20 +++++++++---------- ...Equilibration.h => Analysis_EvalPlateau.h} | 12 +++++------ 2 files changed, 16 insertions(+), 16 deletions(-) rename src/{Analysis_EvalEquilibration.cpp => Analysis_EvalPlateau.cpp} (94%) rename src/{Analysis_EvalEquilibration.h => Analysis_EvalPlateau.h} (85%) diff --git a/src/Analysis_EvalEquilibration.cpp b/src/Analysis_EvalPlateau.cpp similarity index 94% rename from src/Analysis_EvalEquilibration.cpp rename to src/Analysis_EvalPlateau.cpp index 2370317098..0584244ded 100644 --- a/src/Analysis_EvalEquilibration.cpp +++ b/src/Analysis_EvalPlateau.cpp @@ -1,10 +1,10 @@ -#include "Analysis_EvalEquilibration.h" +#include "Analysis_EvalPlateau.h" #include "CpptrajStdio.h" #include "DataSet_1D.h" #include "DataSet_Mesh.h" #include "CurveFit.h" -Analysis_EvalEquilibration::Analysis_EvalEquilibration() : +Analysis_EvalPlateau::Analysis_EvalPlateau() : statsout_(0), tolerance_(0), valaCut_(0), @@ -14,7 +14,7 @@ Analysis_EvalEquilibration::Analysis_EvalEquilibration() : debug_(0) {} -const char* Analysis_EvalEquilibration::OdataStr_[NDATA] = { +const char* Analysis_EvalPlateau::OdataStr_[NDATA] = { "A0", "A1", "A2", @@ -27,7 +27,7 @@ const char* Analysis_EvalEquilibration::OdataStr_[NDATA] = { "result" }; -DataSet::DataType Analysis_EvalEquilibration::OdataType_[NDATA] = { +DataSet::DataType Analysis_EvalPlateau::OdataType_[NDATA] = { DataSet::DOUBLE, DataSet::DOUBLE, DataSet::DOUBLE, @@ -40,13 +40,13 @@ DataSet::DataType Analysis_EvalEquilibration::OdataType_[NDATA] = { DataSet::STRING }; -// Analysis_EvalEquilibration::Help() -void Analysis_EvalEquilibration::Help() const { +// Analysis_EvalPlateau::Help() +void Analysis_EvalPlateau::Help() const { mprintf("\n"); } -// Analysis_EvalEquilibration::Setup() -Analysis::RetType Analysis_EvalEquilibration::Setup(ArgList& analyzeArgs, AnalysisSetup& setup, int debugIn) +// Analysis_EvalPlateau::Setup() +Analysis::RetType Analysis_EvalPlateau::Setup(ArgList& analyzeArgs, AnalysisSetup& setup, int debugIn) { debug_ = debugIn; @@ -151,8 +151,8 @@ int EQ_plateau(CurveFit::Darray const& Xvals, CurveFit::Darray const& Params, return 0; } -// Analysis_EvalEquilibration::Analyze() -Analysis::RetType Analysis_EvalEquilibration::Analyze() { +// Analysis_EvalPlateau::Analyze() +Analysis::RetType Analysis_EvalPlateau::Analyze() { std::vector::const_iterator ot = outputSets_.begin(); for (Array1D::const_iterator it = inputSets_.begin(); it != inputSets_.end(); ++it, ++ot) { diff --git a/src/Analysis_EvalEquilibration.h b/src/Analysis_EvalPlateau.h similarity index 85% rename from src/Analysis_EvalEquilibration.h rename to src/Analysis_EvalPlateau.h index 2d744359bf..08540cc2a1 100644 --- a/src/Analysis_EvalEquilibration.h +++ b/src/Analysis_EvalPlateau.h @@ -1,12 +1,12 @@ -#ifndef INC_ANALYSIS_EVALEQUILIBRATION_H -#define INC_ANALYSIS_EVALEQUILIBRATION_H +#ifndef INC_ANALYSIS_EVALPLATEAU_H +#define INC_ANALYSIS_EVALPLATEAU_H #include "Analysis.h" #include "Array1D.h" -/// -class Analysis_EvalEquilibration : public Analysis { +/// Can be used to evaluate if a time series has reached a plateau (i.e. near zero slope). +class Analysis_EvalPlateau : public Analysis { public: - Analysis_EvalEquilibration(); - DispatchObject* Alloc() const { return (DispatchObject*)new Analysis_EvalEquilibration(); } + Analysis_EvalPlateau(); + DispatchObject* Alloc() const { return (DispatchObject*)new Analysis_EvalPlateau(); } void Help() const; Analysis::RetType Setup(ArgList&, AnalysisSetup&, int); From 523eb2936e7e76896048f3525a65d7b0a76f3695 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 3 Mar 2020 09:08:49 -0500 Subject: [PATCH 50/58] DRR - Ignore mkl.h (helpme_standalone.h) --- src/FindDepend.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/FindDepend.cpp b/src/FindDepend.cpp index 5d5fd9ee53..5ce46c111d 100644 --- a/src/FindDepend.cpp +++ b/src/FindDepend.cpp @@ -36,6 +36,7 @@ enum FileType { SOURCE = 0, HEADER }; /** \return true if this header should be ignored. */ bool IgnoreHeader(const char* headername) { if (strcmp(headername,"mpi.h")==0) return true; + if (strcmp(headername,"mkl.h")==0) return true; if (strcmp(headername,"zlib.h")==0) return true; if (strcmp(headername,"bzlib.h")==0) return true; if (strcmp(headername,"netcdf.h")==0) return true; From 5b060d60ead937f8edfcf8020cd81079bbfeb2c2 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 3 Mar 2020 09:09:01 -0500 Subject: [PATCH 51/58] DRR - Update for EvalPlateau --- src/Command.cpp | 4 ++-- src/cpptrajdepend | 4 ++-- src/cpptrajfiles | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Command.cpp b/src/Command.cpp index 06b3842959..2168d4c398 100644 --- a/src/Command.cpp +++ b/src/Command.cpp @@ -185,7 +185,7 @@ #include "Analysis_ConstantPHStats.h" #include "Analysis_HausdorffDistance.h" #include "Analysis_Slope.h" -#include "Analysis_EvalEquilibration.h" +#include "Analysis_EvalPlateau.h" CmdList Command::commands_ = CmdList(); @@ -379,7 +379,7 @@ void Command::Init() { Command::AddCmd( new Analysis_CurveFit(), Cmd::ANA, 1, "curvefit" ); Command::AddCmd( new Analysis_Matrix(), Cmd::ANA, 2, "diagmatrix", "matrix" ); Command::AddCmd( new Analysis_Divergence(), Cmd::ANA, 1, "divergence" ); - Command::AddCmd( new Analysis_EvalEquilibration(), Cmd::ANA, 1, "evalequil" ); + Command::AddCmd( new Analysis_EvalPlateau(), Cmd::ANA, 1, "evalplateau" ); Command::AddCmd( new Analysis_FFT(), Cmd::ANA, 1, "fft" ); Command::AddCmd( new Analysis_HausdorffDistance,Cmd::ANA,1,"hausdorff" ); Command::AddCmd( new Analysis_Hist(), Cmd::ANA, 2, "hist", "histogram" ); diff --git a/src/cpptrajdepend b/src/cpptrajdepend index 3b730dea27..8ee8f8192d 100644 --- a/src/cpptrajdepend +++ b/src/cpptrajdepend @@ -99,7 +99,7 @@ Analysis_CrdFluct.o : Analysis_CrdFluct.cpp ActionState.h Analysis.h AnalysisSta Analysis_CrossCorr.o : Analysis_CrossCorr.cpp ActionState.h Analysis.h AnalysisState.h Analysis_CrossCorr.h ArgList.h Array1D.h ArrayIterator.h AssociatedData.h Atom.h AtomExtra.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_1D.h DataSet_2D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_MatrixFlt.h Dimension.h DispatchObject.h FileIO.h FileName.h FileTypes.h Frame.h MaskToken.h Matrix.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h StringRoutines.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Vec3.h Analysis_CurveFit.o : Analysis_CurveFit.cpp ActionState.h Analysis.h AnalysisState.h Analysis_CurveFit.h ArgList.h AssociatedData.h Atom.h AtomExtra.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h CurveFit.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_1D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_Mesh.h Dimension.h DispatchObject.h FileIO.h FileName.h FileTypes.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h RPNcalc.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Spline.h StringRoutines.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Vec3.h Analysis_Divergence.o : Analysis_Divergence.cpp ActionState.h Analysis.h AnalysisState.h Analysis_Divergence.h ArgList.h AssociatedData.h Atom.h AtomExtra.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_1D.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h FileIO.h FileName.h FileTypes.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Vec3.h -Analysis_EvalEquilibration.o : Analysis_EvalEquilibration.cpp ActionState.h Analysis.h AnalysisState.h Analysis_EvalEquilibration.h ArgList.h Array1D.h AssociatedData.h Atom.h AtomExtra.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h CurveFit.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_1D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_Mesh.h Dimension.h DispatchObject.h FileIO.h FileName.h FileTypes.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Spline.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Vec3.h +Analysis_EvalPlateau.o : Analysis_EvalPlateau.cpp ActionState.h Analysis.h AnalysisState.h Analysis_EvalPlateau.h ArgList.h Array1D.h AssociatedData.h Atom.h AtomExtra.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h CurveFit.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_1D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_Mesh.h Dimension.h DispatchObject.h FileIO.h FileName.h FileTypes.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h Spline.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Vec3.h Analysis_FFT.o : Analysis_FFT.cpp ActionState.h Analysis.h AnalysisState.h Analysis_FFT.h ArgList.h Array1D.h ArrayIterator.h AssociatedData.h Atom.h AtomExtra.h AtomMask.h AtomType.h BaseIOtype.h Box.h ComplexArray.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_1D.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h FileIO.h FileName.h FileTypes.h Frame.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h PubFFT.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Vec3.h Analysis_HausdorffDistance.o : Analysis_HausdorffDistance.cpp ActionState.h Analysis.h AnalysisState.h Analysis_HausdorffDistance.h ArgList.h ArrayIterator.h AssociatedData.h Atom.h AtomExtra.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_2D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_MatrixFlt.h Dimension.h DispatchObject.h FileIO.h FileName.h FileTypes.h Frame.h MaskToken.h Matrix.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Vec3.h Analysis_Hist.o : Analysis_Hist.cpp ActionFrameCounter.h ActionState.h Analysis.h AnalysisState.h Analysis_Hist.h ArgList.h ArrayIterator.h AssociatedData.h Atom.h AtomExtra.h AtomMask.h AtomType.h BaseIOtype.h BondSearch.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_1D.h DataSet_2D.h DataSet_3D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_GridFlt.h DataSet_MatrixDbl.h DataSet_double.h Dimension.h DispatchObject.h FileIO.h FileName.h FileTypes.h Frame.h Grid.h GridBin.h HistBin.h MaskToken.h Matrix.h Matrix_3x3.h MetaData.h Molecule.h NameType.h OutputTrajCommon.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h ParmFile.h ParmIO.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h StringRoutines.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajectoryFile.h Trajout_Single.h TypeNameHolder.h Vec3.h @@ -159,7 +159,7 @@ Cluster_ReadInfo.o : Cluster_ReadInfo.cpp ArgList.h ArrayIterator.h AssociatedDa Cmd.o : Cmd.cpp Cmd.h DispatchObject.h CmdInput.o : CmdInput.cpp CmdInput.h StringRoutines.h CmdList.o : CmdList.cpp Cmd.h CmdList.h DispatchObject.h -Command.o : Command.cpp Action.h ActionFrameCounter.h ActionList.h ActionState.h Action_Align.h Action_Angle.h Action_AreaPerMol.h Action_AtomMap.h Action_AtomicCorr.h Action_AtomicFluct.h Action_AutoImage.h Action_Average.h Action_Bounds.h Action_Box.h Action_Center.h Action_Channel.h Action_CheckChirality.h Action_CheckStructure.h Action_Closest.h Action_ClusterDihedral.h Action_Contacts.h Action_CreateCrd.h Action_CreateReservoir.h Action_DNAionTracker.h Action_DSSP.h Action_Density.h Action_Diffusion.h Action_Dihedral.h Action_DihedralRMS.h Action_Dipole.h Action_DistRmsd.h Action_Distance.h Action_Energy.h Action_Esander.h Action_FilterByData.h Action_FixAtomOrder.h Action_FixImagedBonds.h Action_GIST.h Action_Grid.h Action_GridFreeEnergy.h Action_HydrogenBond.h Action_Image.h Action_InfraredSpectrum.h Action_Jcoupling.h Action_LESsplit.h Action_LIE.h Action_LipidOrder.h Action_MakeStructure.h Action_Mask.h Action_Matrix.h Action_MinImage.h Action_Molsurf.h Action_MultiDihedral.h Action_MultiVector.h Action_NAstruct.h Action_NMRrst.h Action_NativeContacts.h Action_OrderParameter.h Action_Outtraj.h Action_PairDist.h Action_Pairwise.h Action_Principal.h Action_Projection.h Action_Pucker.h Action_Radgyr.h Action_Radial.h Action_RandomizeIons.h Action_Remap.h Action_ReplicateCell.h Action_Rmsd.h Action_Rotate.h Action_RunningAvg.h Action_STFC_Diffusion.h Action_Scale.h Action_SetVelocity.h Action_Spam.h Action_Strip.h Action_Surf.h Action_SymmetricRmsd.h Action_Temperature.h Action_Time.h Action_Translate.h Action_Unstrip.h Action_Unwrap.h Action_Vector.h Action_VelocityAutoCorr.h Action_Volmap.h Action_Volume.h Action_Watershell.h Action_XtalSymm.h Analysis.h AnalysisList.h AnalysisState.h Analysis_AmdBias.h Analysis_AutoCorr.h Analysis_Average.h Analysis_Clustering.h Analysis_ConstantPHStats.h Analysis_Corr.h Analysis_CrankShaft.h Analysis_CrdFluct.h Analysis_CrossCorr.h Analysis_CurveFit.h Analysis_Divergence.h Analysis_EvalEquilibration.h Analysis_FFT.h Analysis_HausdorffDistance.h Analysis_Hist.h Analysis_IRED.h Analysis_Integrate.h Analysis_KDE.h Analysis_Lifetime.h Analysis_LowestCurve.h Analysis_Matrix.h Analysis_MeltCurve.h Analysis_Modes.h Analysis_MultiHist.h Analysis_Multicurve.h Analysis_Overlap.h Analysis_PhiPsi.h Analysis_Regression.h Analysis_RemLog.h Analysis_Rms2d.h Analysis_RmsAvgCorr.h Analysis_Rotdif.h Analysis_RunningAvg.h Analysis_Slope.h Analysis_Spline.h Analysis_State.h Analysis_Statistics.h Analysis_TI.h Analysis_Timecorr.h Analysis_VectorMath.h Analysis_Wavelet.h ArgList.h Array1D.h ArrayIterator.h AssociatedData.h Atom.h AtomExtra.h AtomMap.h AtomMask.h AtomType.h AxisType.h BaseIOtype.h Box.h BufferedLine.h CharMask.h ClusterDist.h ClusterList.h ClusterMap.h ClusterNode.h ClusterSieve.h Cmd.h CmdInput.h CmdList.h Command.h ComplexArray.h Constants.h Constraints.h ControlBlock.h ControlBlock_For.h CoordinateInfo.h Corr.h Cph.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_1D.h DataSet_2D.h DataSet_3D.h DataSet_Cmatrix.h DataSet_Coords.h DataSet_Coords_CRD.h DataSet_Coords_REF.h DataSet_GridFlt.h DataSet_Mat3x3.h DataSet_MatrixDbl.h DataSet_MatrixFlt.h DataSet_Mesh.h DataSet_Modes.h DataSet_RemLog.h DataSet_Vector.h DataSet_double.h DataSet_float.h DataSet_integer.h DataSet_integer_mem.h DataSet_pH.h DataSet_string.h Deprecated.h DihedralSearch.h Dimension.h DispatchObject.h DistRoutines.h Energy.h Energy_Sander.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Analyze.h Exec_Calc.h Exec_CatCrd.h Exec_Change.h Exec_ClusterMap.h Exec_CombineCoords.h Exec_Commands.h Exec_CompareTop.h Exec_CrdAction.h Exec_CrdOut.h Exec_CreateSet.h Exec_DataFile.h Exec_DataFilter.h Exec_DataSetCmd.h Exec_GenerateAmberRst.h Exec_Help.h Exec_LoadCrd.h Exec_LoadTraj.h Exec_ParallelAnalysis.h Exec_ParmBox.h Exec_ParmSolvent.h Exec_ParmStrip.h Exec_ParmWrite.h Exec_PermuteDihedrals.h Exec_Precision.h Exec_PrintData.h Exec_ReadData.h Exec_ReadEnsembleData.h Exec_ReadInput.h Exec_RotateDihedral.h Exec_RunAnalysis.h Exec_ScaleDihedralK.h Exec_SequenceAlign.h Exec_Set.h Exec_Show.h Exec_SortEnsembleData.h Exec_SplitCoords.h Exec_System.h Exec_Top.h Exec_Traj.h Exec_UpdateParameters.h Exec_ViewRst.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h Grid.h GridAction.h GridBin.h HistBin.h Hungarian.h ImageTypes.h ImagedAction.h InputTrajCommon.h MapAtom.h MaskArray.h MaskToken.h Matrix.h Matrix_3x3.h MetaData.h Molecule.h NameType.h NetcdfFile.h OnlineVarT.h OutputTrajCommon.h PDBfile.h PairList.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h PubFFT.h RPNcalc.h Random.h Range.h ReferenceAction.h ReferenceFrame.h RemdReservoirNC.h ReplicaDimArray.h ReplicaInfo.h Residue.h Spline.h StructureCheck.h SymbolExporting.h SymmetricRmsdCalc.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h TrajectoryFile.h Trajin.h TrajinList.h TrajoutList.h Trajout_Single.h TypeNameHolder.h Vec3.h cuda_kernels/GistCudaSetup.cuh molsurf.h +Command.o : Command.cpp Action.h ActionFrameCounter.h ActionList.h ActionState.h Action_Align.h Action_Angle.h Action_AreaPerMol.h Action_AtomMap.h Action_AtomicCorr.h Action_AtomicFluct.h Action_AutoImage.h Action_Average.h Action_Bounds.h Action_Box.h Action_Center.h Action_Channel.h Action_CheckChirality.h Action_CheckStructure.h Action_Closest.h Action_ClusterDihedral.h Action_Contacts.h Action_CreateCrd.h Action_CreateReservoir.h Action_DNAionTracker.h Action_DSSP.h Action_Density.h Action_Diffusion.h Action_Dihedral.h Action_DihedralRMS.h Action_Dipole.h Action_DistRmsd.h Action_Distance.h Action_Energy.h Action_Esander.h Action_FilterByData.h Action_FixAtomOrder.h Action_FixImagedBonds.h Action_GIST.h Action_Grid.h Action_GridFreeEnergy.h Action_HydrogenBond.h Action_Image.h Action_InfraredSpectrum.h Action_Jcoupling.h Action_LESsplit.h Action_LIE.h Action_LipidOrder.h Action_MakeStructure.h Action_Mask.h Action_Matrix.h Action_MinImage.h Action_Molsurf.h Action_MultiDihedral.h Action_MultiVector.h Action_NAstruct.h Action_NMRrst.h Action_NativeContacts.h Action_OrderParameter.h Action_Outtraj.h Action_PairDist.h Action_Pairwise.h Action_Principal.h Action_Projection.h Action_Pucker.h Action_Radgyr.h Action_Radial.h Action_RandomizeIons.h Action_Remap.h Action_ReplicateCell.h Action_Rmsd.h Action_Rotate.h Action_RunningAvg.h Action_STFC_Diffusion.h Action_Scale.h Action_SetVelocity.h Action_Spam.h Action_Strip.h Action_Surf.h Action_SymmetricRmsd.h Action_Temperature.h Action_Time.h Action_Translate.h Action_Unstrip.h Action_Unwrap.h Action_Vector.h Action_VelocityAutoCorr.h Action_Volmap.h Action_Volume.h Action_Watershell.h Action_XtalSymm.h Analysis.h AnalysisList.h AnalysisState.h Analysis_AmdBias.h Analysis_AutoCorr.h Analysis_Average.h Analysis_Clustering.h Analysis_ConstantPHStats.h Analysis_Corr.h Analysis_CrankShaft.h Analysis_CrdFluct.h Analysis_CrossCorr.h Analysis_CurveFit.h Analysis_Divergence.h Analysis_EvalPlateau.h Analysis_FFT.h Analysis_HausdorffDistance.h Analysis_Hist.h Analysis_IRED.h Analysis_Integrate.h Analysis_KDE.h Analysis_Lifetime.h Analysis_LowestCurve.h Analysis_Matrix.h Analysis_MeltCurve.h Analysis_Modes.h Analysis_MultiHist.h Analysis_Multicurve.h Analysis_Overlap.h Analysis_PhiPsi.h Analysis_Regression.h Analysis_RemLog.h Analysis_Rms2d.h Analysis_RmsAvgCorr.h Analysis_Rotdif.h Analysis_RunningAvg.h Analysis_Slope.h Analysis_Spline.h Analysis_State.h Analysis_Statistics.h Analysis_TI.h Analysis_Timecorr.h Analysis_VectorMath.h Analysis_Wavelet.h ArgList.h Array1D.h ArrayIterator.h AssociatedData.h Atom.h AtomExtra.h AtomMap.h AtomMask.h AtomType.h AxisType.h BaseIOtype.h Box.h BufferedLine.h CharMask.h ClusterDist.h ClusterList.h ClusterMap.h ClusterNode.h ClusterSieve.h Cmd.h CmdInput.h CmdList.h Command.h ComplexArray.h Constants.h Constraints.h ControlBlock.h ControlBlock_For.h CoordinateInfo.h Corr.h Cph.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_1D.h DataSet_2D.h DataSet_3D.h DataSet_Cmatrix.h DataSet_Coords.h DataSet_Coords_CRD.h DataSet_Coords_REF.h DataSet_GridFlt.h DataSet_Mat3x3.h DataSet_MatrixDbl.h DataSet_MatrixFlt.h DataSet_Mesh.h DataSet_Modes.h DataSet_RemLog.h DataSet_Vector.h DataSet_double.h DataSet_float.h DataSet_integer.h DataSet_integer_mem.h DataSet_pH.h DataSet_string.h Deprecated.h DihedralSearch.h Dimension.h DispatchObject.h DistRoutines.h Energy.h Energy_Sander.h EnsembleIn.h EnsembleOutList.h Exec.h Exec_Analyze.h Exec_Calc.h Exec_CatCrd.h Exec_Change.h Exec_ClusterMap.h Exec_CombineCoords.h Exec_Commands.h Exec_CompareTop.h Exec_CrdAction.h Exec_CrdOut.h Exec_CreateSet.h Exec_DataFile.h Exec_DataFilter.h Exec_DataSetCmd.h Exec_GenerateAmberRst.h Exec_Help.h Exec_LoadCrd.h Exec_LoadTraj.h Exec_ParallelAnalysis.h Exec_ParmBox.h Exec_ParmSolvent.h Exec_ParmStrip.h Exec_ParmWrite.h Exec_PermuteDihedrals.h Exec_Precision.h Exec_PrintData.h Exec_ReadData.h Exec_ReadEnsembleData.h Exec_ReadInput.h Exec_RotateDihedral.h Exec_RunAnalysis.h Exec_ScaleDihedralK.h Exec_SequenceAlign.h Exec_Set.h Exec_Show.h Exec_SortEnsembleData.h Exec_SplitCoords.h Exec_System.h Exec_Top.h Exec_Traj.h Exec_UpdateParameters.h Exec_ViewRst.h FileIO.h FileName.h FileTypes.h Frame.h FramePtrArray.h Grid.h GridAction.h GridBin.h HistBin.h Hungarian.h ImageTypes.h ImagedAction.h InputTrajCommon.h MapAtom.h MaskArray.h MaskToken.h Matrix.h Matrix_3x3.h MetaData.h Molecule.h NameType.h NetcdfFile.h OnlineVarT.h OutputTrajCommon.h PDBfile.h PairList.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h PubFFT.h RPNcalc.h Random.h Range.h ReferenceAction.h ReferenceFrame.h RemdReservoirNC.h ReplicaDimArray.h ReplicaInfo.h Residue.h Spline.h StructureCheck.h SymbolExporting.h SymmetricRmsdCalc.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h TrajectoryFile.h Trajin.h TrajinList.h TrajoutList.h Trajout_Single.h TypeNameHolder.h Vec3.h cuda_kernels/GistCudaSetup.cuh molsurf.h ComplexArray.o : ComplexArray.cpp ArrayIterator.h ComplexArray.h Constraints.o : Constraints.cpp ArgList.h Atom.h AtomExtra.h AtomMask.h AtomType.h Box.h CharMask.h Constants.h Constraints.h CoordinateInfo.h CpptrajStdio.h FileName.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h SymbolExporting.h Topology.h TypeNameHolder.h Vec3.h ControlBlock_For.o : ControlBlock_For.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomExtra.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h ControlBlock.h ControlBlock_For.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h FileIO.h FileName.h FileTypes.h ForLoop.h ForLoop_dataSetBlocks.h ForLoop_integer.h ForLoop_list.h ForLoop_mask.h ForLoop_overSets.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Vec3.h diff --git a/src/cpptrajfiles b/src/cpptrajfiles index 43624de8f7..34cf8dcc85 100644 --- a/src/cpptrajfiles +++ b/src/cpptrajfiles @@ -102,7 +102,7 @@ COMMON_SOURCES= \ Analysis_CrossCorr.cpp \ Analysis_CurveFit.cpp \ Analysis_Divergence.cpp \ - Analysis_EvalEquilibration.cpp \ + Analysis_EvalPlateau.cpp \ Analysis_FFT.cpp \ Analysis_HausdorffDistance.cpp \ Analysis_Hist.cpp \ From ee8fe86b306c8cfa4bac65ac5f79e57a426fcff2 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Tue, 3 Mar 2020 10:19:38 -0500 Subject: [PATCH 52/58] DRR - Recast everything as plateau --- src/Analysis_EvalPlateau.cpp | 6 +++--- src/Analysis_EvalPlateau.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Analysis_EvalPlateau.cpp b/src/Analysis_EvalPlateau.cpp index 0584244ded..1572bc19d2 100644 --- a/src/Analysis_EvalPlateau.cpp +++ b/src/Analysis_EvalPlateau.cpp @@ -22,7 +22,7 @@ const char* Analysis_EvalPlateau::OdataStr_[NDATA] = { "corr", "vala", "chisq", - "eqtime", + "pltime", "name", "result" }; @@ -121,7 +121,7 @@ Analysis::RetType Analysis_EvalPlateau::Setup(ArgList& analyzeArgs, AnalysisSetu data_.push_back( ds ); } - mprintf(" EVALEQUILIBRATION: Evaluate equilibration of %zu sets.\n", inputSets_.size()); + mprintf(" EVALPLATEAU: Evaluate plateau time of %zu sets.\n", inputSets_.size()); mprintf("\tOutput set name: %s\n", dsname_.c_str()); mprintf("\tTolerance for curve fit: %g\n", tolerance_); mprintf("\tMax iterations for curve fit: %i\n", maxIt_); @@ -298,7 +298,7 @@ Analysis::RetType Analysis_EvalPlateau::Analyze() { data_[FVAL]->Add(oidx, &Fval); data_[CORR]->Add(oidx, &corr_coeff); data_[VALA]->Add(oidx, &ValA); - data_[EQTIME]->Add(oidx, &finalx); + data_[PLTIME]->Add(oidx, &finalx); data_[NAME]->Add(oidx, (*it)->legend()); // Determine if criteria met. bool longAvgCutSatisfied, chiCutSatisfied; diff --git a/src/Analysis_EvalPlateau.h b/src/Analysis_EvalPlateau.h index 08540cc2a1..6dc1257a4d 100644 --- a/src/Analysis_EvalPlateau.h +++ b/src/Analysis_EvalPlateau.h @@ -21,7 +21,7 @@ class Analysis_EvalPlateau : public Analysis { CORR, VALA, CHISQ, ///< Hold chi^2 of fit for each input set - EQTIME, ///< Time at which slope cutoff was satisfied + PLTIME, ///< Time at which slope cutoff was satisfied NAME, ///< Hold name of each input set RESULT, NDATA From 59cee8b4c1ce2fbe6ef3e4137f7cf9f85564d88b Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Fri, 29 May 2020 14:29:11 -0400 Subject: [PATCH 53/58] Add evalplateau test --- test/Test_EvalPlateau/Eval.agr.save | 2011 +++++++++++++++++++++++ test/Test_EvalPlateau/Eval.results.save | 2 + test/Test_EvalPlateau/RunTest.sh | 19 + test/Test_EvalPlateau/density.dat | 1001 +++++++++++ 4 files changed, 3033 insertions(+) create mode 100644 test/Test_EvalPlateau/Eval.agr.save create mode 100644 test/Test_EvalPlateau/Eval.results.save create mode 100755 test/Test_EvalPlateau/RunTest.sh create mode 100644 test/Test_EvalPlateau/density.dat diff --git a/test/Test_EvalPlateau/Eval.agr.save b/test/Test_EvalPlateau/Eval.agr.save new file mode 100644 index 0000000000..ba44ec1157 --- /dev/null +++ b/test/Test_EvalPlateau/Eval.agr.save @@ -0,0 +1,2011 @@ +@with g0 +@ xaxis label "Time" +@ yaxis label "" +@ legend 0.2, 0.995 +@ legend char size 0.60 +@ s0 legend "MD_Density" +@target G0.S0 +@type xy + 31.000 1.0357 + 32.000 1.0354 + 33.000 1.0354 + 34.000 1.0354 + 35.000 1.0354 + 36.000 1.0354 + 37.000 1.0354 + 38.000 1.0347 + 39.000 1.0347 + 40.000 1.0347 + 41.000 1.0347 + 42.000 1.0347 + 43.000 1.0342 + 44.000 1.0342 + 45.000 1.0342 + 46.000 1.0339 + 47.000 1.0328 + 48.000 1.0328 + 49.000 1.0328 + 50.000 1.0312 + 51.000 1.0322 + 52.000 1.0317 + 53.000 1.0332 + 54.000 1.0314 + 55.000 1.0314 + 56.000 1.0319 + 57.000 1.0336 + 58.000 1.0351 + 59.000 1.0369 + 60.000 1.0368 + 61.000 1.0359 + 62.000 1.0361 + 63.000 1.0383 + 64.000 1.0383 + 65.000 1.0387 + 66.000 1.0387 + 67.000 1.0394 + 68.000 1.0394 + 69.000 1.0397 + 70.000 1.0387 + 71.000 1.0387 + 72.000 1.0372 + 73.000 1.0380 + 74.000 1.0380 + 75.000 1.0380 + 76.000 1.0380 + 77.000 1.0386 + 78.000 1.0382 + 79.000 1.0385 + 80.000 1.0390 + 81.000 1.0397 + 82.000 1.0397 + 83.000 1.0407 + 84.000 1.0382 + 85.000 1.0388 + 86.000 1.0388 + 87.000 1.0388 + 88.000 1.0378 + 89.000 1.0385 + 90.000 1.0383 + 91.000 1.0365 + 92.000 1.0365 + 93.000 1.0363 + 94.000 1.0365 + 95.000 1.0362 + 96.000 1.0362 + 97.000 1.0366 + 98.000 1.0372 + 99.000 1.0370 + 100.000 1.0378 + 101.000 1.0378 + 102.000 1.0370 + 103.000 1.0355 + 104.000 1.0381 + 105.000 1.0397 + 106.000 1.0397 + 107.000 1.0397 + 108.000 1.0397 + 109.000 1.0379 + 110.000 1.0362 + 111.000 1.0362 + 112.000 1.0365 + 113.000 1.0400 + 114.000 1.0400 + 115.000 1.0392 + 116.000 1.0392 + 117.000 1.0392 + 118.000 1.0410 + 119.000 1.0410 + 120.000 1.0410 + 121.000 1.0410 + 122.000 1.0423 + 123.000 1.0402 + 124.000 1.0402 + 125.000 1.0395 + 126.000 1.0395 + 127.000 1.0397 + 128.000 1.0386 + 129.000 1.0352 + 130.000 1.0390 + 131.000 1.0374 + 132.000 1.0374 + 133.000 1.0380 + 134.000 1.0380 + 135.000 1.0387 + 136.000 1.0337 + 137.000 1.0346 + 138.000 1.0337 + 139.000 1.0345 + 140.000 1.0345 + 141.000 1.0350 + 142.000 1.0350 + 143.000 1.0342 + 144.000 1.0367 + 145.000 1.0366 + 146.000 1.0375 + 147.000 1.0367 + 148.000 1.0382 + 149.000 1.0399 + 150.000 1.0405 + 151.000 1.0401 + 152.000 1.0399 + 153.000 1.0399 + 154.000 1.0401 + 155.000 1.0389 + 156.000 1.0382 + 157.000 1.0392 + 158.000 1.0389 + 159.000 1.0393 + 160.000 1.0391 + 161.000 1.0412 + 162.000 1.0412 + 163.000 1.0420 + 164.000 1.0403 + 165.000 1.0405 + 166.000 1.0401 + 167.000 1.0392 + 168.000 1.0380 + 169.000 1.0363 + 170.000 1.0360 + 171.000 1.0345 + 172.000 1.0364 + 173.000 1.0366 + 174.000 1.0365 + 175.000 1.0371 + 176.000 1.0392 + 177.000 1.0384 + 178.000 1.0374 + 179.000 1.0364 + 180.000 1.0352 + 181.000 1.0345 + 182.000 1.0358 + 183.000 1.0351 + 184.000 1.0341 + 185.000 1.0334 + 186.000 1.0334 + 187.000 1.0321 + 188.000 1.0319 + 189.000 1.0343 + 190.000 1.0374 + 191.000 1.0374 + 192.000 1.0373 + 193.000 1.0377 + 194.000 1.0380 + 195.000 1.0392 + 196.000 1.0386 + 197.000 1.0362 + 198.000 1.0365 + 199.000 1.0365 + 200.000 1.0365 + 201.000 1.0380 + 202.000 1.0362 + 203.000 1.0369 + 204.000 1.0373 + 205.000 1.0387 + 206.000 1.0391 + 207.000 1.0387 + 208.000 1.0393 + 209.000 1.0399 + 210.000 1.0378 + 211.000 1.0398 + 212.000 1.0402 + 213.000 1.0419 + 214.000 1.0403 + 215.000 1.0427 + 216.000 1.0424 + 217.000 1.0405 + 218.000 1.0400 + 219.000 1.0413 + 220.000 1.0431 + 221.000 1.0413 + 222.000 1.0422 + 223.000 1.0423 + 224.000 1.0423 + 225.000 1.0427 + 226.000 1.0398 + 227.000 1.0400 + 228.000 1.0401 + 229.000 1.0388 + 230.000 1.0382 + 231.000 1.0387 + 232.000 1.0395 + 233.000 1.0381 + 234.000 1.0382 + 235.000 1.0389 + 236.000 1.0389 + 237.000 1.0386 + 238.000 1.0418 + 239.000 1.0400 + 240.000 1.0404 + 241.000 1.0401 + 242.000 1.0401 + 243.000 1.0392 + 244.000 1.0392 + 245.000 1.0430 + 246.000 1.0421 + 247.000 1.0427 + 248.000 1.0425 + 249.000 1.0450 + 250.000 1.0449 + 251.000 1.0431 + 252.000 1.0442 + 253.000 1.0439 + 254.000 1.0393 + 255.000 1.0400 + 256.000 1.0382 + 257.000 1.0382 + 258.000 1.0388 + 259.000 1.0376 + 260.000 1.0382 + 261.000 1.0391 + 262.000 1.0393 + 263.000 1.0398 + 264.000 1.0399 + 265.000 1.0396 + 266.000 1.0370 + 267.000 1.0395 + 268.000 1.0408 + 269.000 1.0383 + 270.000 1.0405 + 271.000 1.0398 + 272.000 1.0398 + 273.000 1.0398 + 274.000 1.0396 + 275.000 1.0396 + 276.000 1.0420 + 277.000 1.0425 + 278.000 1.0400 + 279.000 1.0396 + 280.000 1.0400 + 281.000 1.0411 + 282.000 1.0398 + 283.000 1.0396 + 284.000 1.0388 + 285.000 1.0380 + 286.000 1.0372 + 287.000 1.0372 + 288.000 1.0370 + 289.000 1.0353 + 290.000 1.0353 + 291.000 1.0371 + 292.000 1.0378 + 293.000 1.0380 + 294.000 1.0381 + 295.000 1.0394 + 296.000 1.0386 + 297.000 1.0377 + 298.000 1.0377 + 299.000 1.0384 + 300.000 1.0391 + 301.000 1.0411 + 302.000 1.0390 + 303.000 1.0390 + 304.000 1.0394 + 305.000 1.0401 + 306.000 1.0397 + 307.000 1.0396 + 308.000 1.0395 + 309.000 1.0386 + 310.000 1.0386 + 311.000 1.0387 + 312.000 1.0385 + 313.000 1.0375 + 314.000 1.0376 + 315.000 1.0368 + 316.000 1.0393 + 317.000 1.0391 + 318.000 1.0400 + 319.000 1.0401 + 320.000 1.0382 + 321.000 1.0405 + 322.000 1.0411 + 323.000 1.0404 + 324.000 1.0389 + 325.000 1.0387 + 326.000 1.0385 + 327.000 1.0363 + 328.000 1.0363 + 329.000 1.0386 + 330.000 1.0406 + 331.000 1.0405 + 332.000 1.0394 + 333.000 1.0401 + 334.000 1.0368 + 335.000 1.0385 + 336.000 1.0371 + 337.000 1.0371 + 338.000 1.0365 + 339.000 1.0376 + 340.000 1.0366 + 341.000 1.0369 + 342.000 1.0372 + 343.000 1.0378 + 344.000 1.0385 + 345.000 1.0372 + 346.000 1.0366 + 347.000 1.0349 + 348.000 1.0363 + 349.000 1.0361 + 350.000 1.0364 + 351.000 1.0381 + 352.000 1.0382 + 353.000 1.0382 + 354.000 1.0377 + 355.000 1.0404 + 356.000 1.0370 + 357.000 1.0366 + 358.000 1.0372 + 359.000 1.0365 + 360.000 1.0369 + 361.000 1.0374 + 362.000 1.0399 + 363.000 1.0393 + 364.000 1.0406 + 365.000 1.0384 + 366.000 1.0389 + 367.000 1.0370 + 368.000 1.0348 + 369.000 1.0362 + 370.000 1.0367 + 371.000 1.0364 + 372.000 1.0367 + 373.000 1.0390 + 374.000 1.0391 + 375.000 1.0396 + 376.000 1.0396 + 377.000 1.0385 + 378.000 1.0384 + 379.000 1.0384 + 380.000 1.0376 + 381.000 1.0375 + 382.000 1.0397 + 383.000 1.0412 + 384.000 1.0385 + 385.000 1.0381 + 386.000 1.0395 + 387.000 1.0417 + 388.000 1.0429 + 389.000 1.0427 + 390.000 1.0399 + 391.000 1.0410 + 392.000 1.0396 + 393.000 1.0394 + 394.000 1.0385 + 395.000 1.0399 + 396.000 1.0396 + 397.000 1.0408 + 398.000 1.0413 + 399.000 1.0399 + 400.000 1.0399 + 401.000 1.0378 + 402.000 1.0375 + 403.000 1.0383 + 404.000 1.0376 + 405.000 1.0365 + 406.000 1.0368 + 407.000 1.0364 + 408.000 1.0364 + 409.000 1.0398 + 410.000 1.0397 + 411.000 1.0401 + 412.000 1.0404 + 413.000 1.0402 + 414.000 1.0359 + 415.000 1.0351 + 416.000 1.0363 + 417.000 1.0371 + 418.000 1.0372 + 419.000 1.0372 + 420.000 1.0350 + 421.000 1.0342 + 422.000 1.0359 + 423.000 1.0353 + 424.000 1.0366 + 425.000 1.0375 + 426.000 1.0365 + 427.000 1.0365 + 428.000 1.0381 + 429.000 1.0376 + 430.000 1.0385 + 431.000 1.0398 + 432.000 1.0400 + 433.000 1.0401 + 434.000 1.0416 + 435.000 1.0420 + 436.000 1.0381 + 437.000 1.0377 + 438.000 1.0373 + 439.000 1.0376 + 440.000 1.0393 + 441.000 1.0399 + 442.000 1.0410 + 443.000 1.0412 + 444.000 1.0404 + 445.000 1.0405 + 446.000 1.0405 + 447.000 1.0405 + 448.000 1.0405 + 449.000 1.0391 + 450.000 1.0399 + 451.000 1.0399 + 452.000 1.0424 + 453.000 1.0396 + 454.000 1.0409 + 455.000 1.0408 + 456.000 1.0413 + 457.000 1.0404 + 458.000 1.0394 + 459.000 1.0393 + 460.000 1.0387 + 461.000 1.0400 + 462.000 1.0388 + 463.000 1.0388 + 464.000 1.0409 + 465.000 1.0401 + 466.000 1.0415 + 467.000 1.0415 + 468.000 1.0406 + 469.000 1.0406 + 470.000 1.0398 + 471.000 1.0401 + 472.000 1.0402 + 473.000 1.0401 + 474.000 1.0396 + 475.000 1.0400 + 476.000 1.0408 + 477.000 1.0406 + 478.000 1.0406 + 479.000 1.0406 + 480.000 1.0404 + 481.000 1.0404 + 482.000 1.0375 + 483.000 1.0373 + 484.000 1.0364 + 485.000 1.0359 + 486.000 1.0367 + 487.000 1.0360 + 488.000 1.0357 + 489.000 1.0369 + 490.000 1.0378 + 491.000 1.0378 + 492.000 1.0379 + 493.000 1.0377 + 494.000 1.0384 + 495.000 1.0392 + 496.000 1.0383 + 497.000 1.0387 + 498.000 1.0390 + 499.000 1.0397 + 500.000 1.0399 + 501.000 1.0383 + 502.000 1.0391 + 503.000 1.0390 + 504.000 1.0416 + 505.000 1.0385 + 506.000 1.0390 + 507.000 1.0390 + 508.000 1.0408 + 509.000 1.0408 + 510.000 1.0419 + 511.000 1.0431 + 512.000 1.0412 + 513.000 1.0416 + 514.000 1.0427 + 515.000 1.0443 + 516.000 1.0433 + 517.000 1.0439 + 518.000 1.0425 + 519.000 1.0428 + 520.000 1.0422 + 521.000 1.0423 + 522.000 1.0405 + 523.000 1.0405 + 524.000 1.0394 + 525.000 1.0384 + 526.000 1.0385 + 527.000 1.0374 + 528.000 1.0370 + 529.000 1.0372 + 530.000 1.0372 + 531.000 1.0395 + 532.000 1.0396 + 533.000 1.0401 + 534.000 1.0404 + 535.000 1.0404 + 536.000 1.0404 + 537.000 1.0406 + 538.000 1.0391 + 539.000 1.0392 + 540.000 1.0377 + 541.000 1.0378 + 542.000 1.0394 + 543.000 1.0368 + 544.000 1.0361 + 545.000 1.0366 + 546.000 1.0373 + 547.000 1.0369 + 548.000 1.0362 + 549.000 1.0356 + 550.000 1.0365 + 551.000 1.0357 + 552.000 1.0357 + 553.000 1.0348 + 554.000 1.0347 + 555.000 1.0346 + 556.000 1.0336 + 557.000 1.0344 + 558.000 1.0344 + 559.000 1.0335 + 560.000 1.0362 + 561.000 1.0349 + 562.000 1.0347 + 563.000 1.0356 + 564.000 1.0363 + 565.000 1.0374 + 566.000 1.0377 + 567.000 1.0395 + 568.000 1.0402 + 569.000 1.0393 + 570.000 1.0383 + 571.000 1.0383 + 572.000 1.0394 + 573.000 1.0383 + 574.000 1.0387 + 575.000 1.0405 + 576.000 1.0424 + 577.000 1.0424 + 578.000 1.0415 + 579.000 1.0424 + 580.000 1.0420 + 581.000 1.0420 + 582.000 1.0432 + 583.000 1.0424 + 584.000 1.0423 + 585.000 1.0436 + 586.000 1.0435 + 587.000 1.0456 + 588.000 1.0445 + 589.000 1.0447 + 590.000 1.0450 + 591.000 1.0434 + 592.000 1.0401 + 593.000 1.0403 + 594.000 1.0403 + 595.000 1.0399 + 596.000 1.0387 + 597.000 1.0387 + 598.000 1.0391 + 599.000 1.0401 + 600.000 1.0415 + 601.000 1.0396 + 602.000 1.0394 + 603.000 1.0388 + 604.000 1.0380 + 605.000 1.0396 + 606.000 1.0401 + 607.000 1.0387 + 608.000 1.0387 + 609.000 1.0390 + 610.000 1.0406 + 611.000 1.0406 + 612.000 1.0414 + 613.000 1.0414 + 614.000 1.0408 + 615.000 1.0400 + 616.000 1.0409 + 617.000 1.0409 + 618.000 1.0418 + 619.000 1.0436 + 620.000 1.0427 + 621.000 1.0427 + 622.000 1.0423 + 623.000 1.0411 + 624.000 1.0400 + 625.000 1.0400 + 626.000 1.0393 + 627.000 1.0403 + 628.000 1.0400 + 629.000 1.0419 + 630.000 1.0424 + 631.000 1.0435 + 632.000 1.0430 + 633.000 1.0413 + 634.000 1.0412 + 635.000 1.0389 + 636.000 1.0378 + 637.000 1.0376 + 638.000 1.0377 + 639.000 1.0395 + 640.000 1.0387 + 641.000 1.0393 + 642.000 1.0399 + 643.000 1.0397 + 644.000 1.0397 + 645.000 1.0401 + 646.000 1.0401 + 647.000 1.0383 + 648.000 1.0375 + 649.000 1.0384 + 650.000 1.0400 + 651.000 1.0415 + 652.000 1.0413 + 653.000 1.0425 + 654.000 1.0439 + 655.000 1.0427 + 656.000 1.0427 + 657.000 1.0420 + 658.000 1.0415 + 659.000 1.0394 + 660.000 1.0394 + 661.000 1.0368 + 662.000 1.0363 + 663.000 1.0365 + 664.000 1.0358 + 665.000 1.0362 + 666.000 1.0382 + 667.000 1.0383 + 668.000 1.0386 + 669.000 1.0390 + 670.000 1.0377 + 671.000 1.0377 + 672.000 1.0375 + 673.000 1.0377 + 674.000 1.0380 + 675.000 1.0380 + 676.000 1.0380 + 677.000 1.0386 + 678.000 1.0386 + 679.000 1.0372 + 680.000 1.0381 + 681.000 1.0376 + 682.000 1.0375 + 683.000 1.0355 + 684.000 1.0358 + 685.000 1.0382 + 686.000 1.0360 + 687.000 1.0370 + 688.000 1.0379 + 689.000 1.0393 + 690.000 1.0391 + 691.000 1.0390 + 692.000 1.0391 + 693.000 1.0399 + 694.000 1.0417 + 695.000 1.0390 + 696.000 1.0384 + 697.000 1.0380 + 698.000 1.0378 + 699.000 1.0377 + 700.000 1.0389 + 701.000 1.0391 + 702.000 1.0373 + 703.000 1.0369 + 704.000 1.0362 + 705.000 1.0358 + 706.000 1.0362 + 707.000 1.0376 + 708.000 1.0367 + 709.000 1.0375 + 710.000 1.0342 + 711.000 1.0342 + 712.000 1.0348 + 713.000 1.0343 + 714.000 1.0356 + 715.000 1.0364 + 716.000 1.0374 + 717.000 1.0389 + 718.000 1.0358 + 719.000 1.0357 + 720.000 1.0387 + 721.000 1.0394 + 722.000 1.0402 + 723.000 1.0394 + 724.000 1.0379 + 725.000 1.0386 + 726.000 1.0376 + 727.000 1.0367 + 728.000 1.0367 + 729.000 1.0367 + 730.000 1.0390 + 731.000 1.0389 + 732.000 1.0415 + 733.000 1.0415 + 734.000 1.0383 + 735.000 1.0374 + 736.000 1.0421 + 737.000 1.0420 + 738.000 1.0434 + 739.000 1.0427 + 740.000 1.0443 + 741.000 1.0426 + 742.000 1.0406 + 743.000 1.0404 + 744.000 1.0424 + 745.000 1.0418 + 746.000 1.0419 + 747.000 1.0414 + 748.000 1.0414 + 749.000 1.0430 + 750.000 1.0417 + 751.000 1.0415 + 752.000 1.0406 + 753.000 1.0397 + 754.000 1.0407 + 755.000 1.0405 + 756.000 1.0405 + 757.000 1.0391 + 758.000 1.0427 + 759.000 1.0427 + 760.000 1.0391 + 761.000 1.0416 + 762.000 1.0433 + 763.000 1.0430 + 764.000 1.0436 + 765.000 1.0431 + 766.000 1.0430 + 767.000 1.0425 + 768.000 1.0410 + 769.000 1.0409 + 770.000 1.0414 + 771.000 1.0388 + 772.000 1.0394 + 773.000 1.0396 + 774.000 1.0403 + 775.000 1.0395 + 776.000 1.0414 + 777.000 1.0414 + 778.000 1.0415 + 779.000 1.0428 + 780.000 1.0419 + 781.000 1.0419 + 782.000 1.0421 + 783.000 1.0408 + 784.000 1.0418 + 785.000 1.0410 + 786.000 1.0418 + 787.000 1.0392 + 788.000 1.0396 + 789.000 1.0380 + 790.000 1.0397 + 791.000 1.0362 + 792.000 1.0362 + 793.000 1.0401 + 794.000 1.0401 + 795.000 1.0387 + 796.000 1.0368 + 797.000 1.0368 + 798.000 1.0363 + 799.000 1.0371 + 800.000 1.0364 + 801.000 1.0369 + 802.000 1.0358 + 803.000 1.0347 + 804.000 1.0375 + 805.000 1.0375 + 806.000 1.0378 + 807.000 1.0385 + 808.000 1.0392 + 809.000 1.0383 + 810.000 1.0393 + 811.000 1.0398 + 812.000 1.0402 + 813.000 1.0411 + 814.000 1.0414 + 815.000 1.0425 + 816.000 1.0413 + 817.000 1.0405 + 818.000 1.0401 + 819.000 1.0412 + 820.000 1.0429 + 821.000 1.0401 + 822.000 1.0401 + 823.000 1.0409 + 824.000 1.0409 + 825.000 1.0418 + 826.000 1.0418 + 827.000 1.0417 + 828.000 1.0399 + 829.000 1.0396 + 830.000 1.0394 + 831.000 1.0405 + 832.000 1.0397 + 833.000 1.0413 + 834.000 1.0411 + 835.000 1.0424 + 836.000 1.0417 + 837.000 1.0417 + 838.000 1.0421 + 839.000 1.0413 + 840.000 1.0418 + 841.000 1.0425 + 842.000 1.0408 + 843.000 1.0420 + 844.000 1.0404 + 845.000 1.0400 + 846.000 1.0394 + 847.000 1.0401 + 848.000 1.0404 + 849.000 1.0418 + 850.000 1.0418 + 851.000 1.0430 + 852.000 1.0415 + 853.000 1.0403 + 854.000 1.0424 + 855.000 1.0433 + 856.000 1.0421 + 857.000 1.0415 + 858.000 1.0407 + 859.000 1.0403 + 860.000 1.0393 + 861.000 1.0388 + 862.000 1.0388 + 863.000 1.0400 + 864.000 1.0391 + 865.000 1.0391 + 866.000 1.0400 + 867.000 1.0394 + 868.000 1.0405 + 869.000 1.0395 + 870.000 1.0401 + 871.000 1.0412 + 872.000 1.0390 + 873.000 1.0393 + 874.000 1.0425 + 875.000 1.0418 + 876.000 1.0418 + 877.000 1.0422 + 878.000 1.0444 + 879.000 1.0446 + 880.000 1.0446 + 881.000 1.0439 + 882.000 1.0439 + 883.000 1.0432 + 884.000 1.0433 + 885.000 1.0428 + 886.000 1.0404 + 887.000 1.0414 + 888.000 1.0391 + 889.000 1.0395 + 890.000 1.0391 + 891.000 1.0393 + 892.000 1.0393 + 893.000 1.0395 + 894.000 1.0379 + 895.000 1.0373 + 896.000 1.0383 + 897.000 1.0385 + 898.000 1.0374 + 899.000 1.0425 + 900.000 1.0408 + 901.000 1.0403 + 902.000 1.0407 + 903.000 1.0412 + 904.000 1.0418 + 905.000 1.0426 + 906.000 1.0442 + 907.000 1.0440 + 908.000 1.0414 + 909.000 1.0414 + 910.000 1.0423 + 911.000 1.0423 + 912.000 1.0428 + 913.000 1.0429 + 914.000 1.0409 + 915.000 1.0401 + 916.000 1.0399 + 917.000 1.0407 + 918.000 1.0391 + 919.000 1.0394 + 920.000 1.0410 + 921.000 1.0410 + 922.000 1.0408 + 923.000 1.0416 + 924.000 1.0405 + 925.000 1.0405 + 926.000 1.0410 + 927.000 1.0410 + 928.000 1.0427 + 929.000 1.0421 + 930.000 1.0421 + 931.000 1.0411 + 932.000 1.0402 + 933.000 1.0414 + 934.000 1.0421 + 935.000 1.0429 + 936.000 1.0406 + 937.000 1.0406 + 938.000 1.0405 + 939.000 1.0400 + 940.000 1.0382 + 941.000 1.0362 + 942.000 1.0392 + 943.000 1.0401 + 944.000 1.0401 + 945.000 1.0409 + 946.000 1.0389 + 947.000 1.0389 + 948.000 1.0388 + 949.000 1.0386 + 950.000 1.0399 + 951.000 1.0395 + 952.000 1.0388 + 953.000 1.0399 + 954.000 1.0396 + 955.000 1.0396 + 956.000 1.0408 + 957.000 1.0410 + 958.000 1.0411 + 959.000 1.0410 + 960.000 1.0410 + 961.000 1.0417 + 962.000 1.0414 + 963.000 1.0459 + 964.000 1.0448 + 965.000 1.0448 + 966.000 1.0444 + 967.000 1.0430 + 968.000 1.0417 + 969.000 1.0404 + 970.000 1.0404 + 971.000 1.0399 + 972.000 1.0405 + 973.000 1.0409 + 974.000 1.0414 + 975.000 1.0411 + 976.000 1.0425 + 977.000 1.0413 + 978.000 1.0413 + 979.000 1.0413 + 980.000 1.0408 + 981.000 1.0419 + 982.000 1.0422 + 983.000 1.0433 + 984.000 1.0424 + 985.000 1.0422 + 986.000 1.0424 + 987.000 1.0438 + 988.000 1.0432 + 989.000 1.0413 + 990.000 1.0412 + 991.000 1.0401 + 992.000 1.0401 + 993.000 1.0383 + 994.000 1.0407 + 995.000 1.0421 + 996.000 1.0411 + 997.000 1.0411 + 998.000 1.0415 + 999.000 1.0415 +1000.000 1.0412 +1001.000 1.0427 +1002.000 1.0435 +1003.000 1.0424 +1004.000 1.0399 +1005.000 1.0381 +1006.000 1.0401 +1007.000 1.0401 +1008.000 1.0399 +1009.000 1.0387 +1010.000 1.0388 +1011.000 1.0384 +1012.000 1.0383 +1013.000 1.0383 +1014.000 1.0386 +1015.000 1.0386 +1016.000 1.0386 +1017.000 1.0380 +1018.000 1.0380 +1019.000 1.0380 +1020.000 1.0382 +1021.000 1.0386 +1022.000 1.0387 +1023.000 1.0387 +1024.000 1.0382 +1025.000 1.0371 +1026.000 1.0374 +1027.000 1.0379 +1028.000 1.0385 +1029.000 1.0400 +1030.000 1.0406 +@ s1 legend "EQ:0" +@target G0.S1 +@type xy + 31.000 1.0366 + 32.000 1.0366 + 33.000 1.0366 + 34.000 1.0367 + 35.000 1.0367 + 36.000 1.0367 + 37.000 1.0367 + 38.000 1.0367 + 39.000 1.0367 + 40.000 1.0367 + 41.000 1.0367 + 42.000 1.0367 + 43.000 1.0368 + 44.000 1.0368 + 45.000 1.0368 + 46.000 1.0368 + 47.000 1.0368 + 48.000 1.0368 + 49.000 1.0368 + 50.000 1.0368 + 51.000 1.0368 + 52.000 1.0368 + 53.000 1.0369 + 54.000 1.0369 + 55.000 1.0369 + 56.000 1.0369 + 57.000 1.0369 + 58.000 1.0369 + 59.000 1.0369 + 60.000 1.0369 + 61.000 1.0369 + 62.000 1.0369 + 63.000 1.0370 + 64.000 1.0370 + 65.000 1.0370 + 66.000 1.0370 + 67.000 1.0370 + 68.000 1.0370 + 69.000 1.0370 + 70.000 1.0370 + 71.000 1.0370 + 72.000 1.0370 + 73.000 1.0370 + 74.000 1.0371 + 75.000 1.0371 + 76.000 1.0371 + 77.000 1.0371 + 78.000 1.0371 + 79.000 1.0371 + 80.000 1.0371 + 81.000 1.0371 + 82.000 1.0371 + 83.000 1.0371 + 84.000 1.0372 + 85.000 1.0372 + 86.000 1.0372 + 87.000 1.0372 + 88.000 1.0372 + 89.000 1.0372 + 90.000 1.0372 + 91.000 1.0372 + 92.000 1.0372 + 93.000 1.0372 + 94.000 1.0372 + 95.000 1.0373 + 96.000 1.0373 + 97.000 1.0373 + 98.000 1.0373 + 99.000 1.0373 + 100.000 1.0373 + 101.000 1.0373 + 102.000 1.0373 + 103.000 1.0373 + 104.000 1.0373 + 105.000 1.0373 + 106.000 1.0373 + 107.000 1.0374 + 108.000 1.0374 + 109.000 1.0374 + 110.000 1.0374 + 111.000 1.0374 + 112.000 1.0374 + 113.000 1.0374 + 114.000 1.0374 + 115.000 1.0374 + 116.000 1.0374 + 117.000 1.0374 + 118.000 1.0375 + 119.000 1.0375 + 120.000 1.0375 + 121.000 1.0375 + 122.000 1.0375 + 123.000 1.0375 + 124.000 1.0375 + 125.000 1.0375 + 126.000 1.0375 + 127.000 1.0375 + 128.000 1.0375 + 129.000 1.0375 + 130.000 1.0376 + 131.000 1.0376 + 132.000 1.0376 + 133.000 1.0376 + 134.000 1.0376 + 135.000 1.0376 + 136.000 1.0376 + 137.000 1.0376 + 138.000 1.0376 + 139.000 1.0376 + 140.000 1.0376 + 141.000 1.0376 + 142.000 1.0376 + 143.000 1.0377 + 144.000 1.0377 + 145.000 1.0377 + 146.000 1.0377 + 147.000 1.0377 + 148.000 1.0377 + 149.000 1.0377 + 150.000 1.0377 + 151.000 1.0377 + 152.000 1.0377 + 153.000 1.0377 + 154.000 1.0377 + 155.000 1.0377 + 156.000 1.0378 + 157.000 1.0378 + 158.000 1.0378 + 159.000 1.0378 + 160.000 1.0378 + 161.000 1.0378 + 162.000 1.0378 + 163.000 1.0378 + 164.000 1.0378 + 165.000 1.0378 + 166.000 1.0378 + 167.000 1.0378 + 168.000 1.0378 + 169.000 1.0379 + 170.000 1.0379 + 171.000 1.0379 + 172.000 1.0379 + 173.000 1.0379 + 174.000 1.0379 + 175.000 1.0379 + 176.000 1.0379 + 177.000 1.0379 + 178.000 1.0379 + 179.000 1.0379 + 180.000 1.0379 + 181.000 1.0379 + 182.000 1.0379 + 183.000 1.0380 + 184.000 1.0380 + 185.000 1.0380 + 186.000 1.0380 + 187.000 1.0380 + 188.000 1.0380 + 189.000 1.0380 + 190.000 1.0380 + 191.000 1.0380 + 192.000 1.0380 + 193.000 1.0380 + 194.000 1.0380 + 195.000 1.0380 + 196.000 1.0380 + 197.000 1.0381 + 198.000 1.0381 + 199.000 1.0381 + 200.000 1.0381 + 201.000 1.0381 + 202.000 1.0381 + 203.000 1.0381 + 204.000 1.0381 + 205.000 1.0381 + 206.000 1.0381 + 207.000 1.0381 + 208.000 1.0381 + 209.000 1.0381 + 210.000 1.0381 + 211.000 1.0381 + 212.000 1.0382 + 213.000 1.0382 + 214.000 1.0382 + 215.000 1.0382 + 216.000 1.0382 + 217.000 1.0382 + 218.000 1.0382 + 219.000 1.0382 + 220.000 1.0382 + 221.000 1.0382 + 222.000 1.0382 + 223.000 1.0382 + 224.000 1.0382 + 225.000 1.0382 + 226.000 1.0382 + 227.000 1.0382 + 228.000 1.0383 + 229.000 1.0383 + 230.000 1.0383 + 231.000 1.0383 + 232.000 1.0383 + 233.000 1.0383 + 234.000 1.0383 + 235.000 1.0383 + 236.000 1.0383 + 237.000 1.0383 + 238.000 1.0383 + 239.000 1.0383 + 240.000 1.0383 + 241.000 1.0383 + 242.000 1.0383 + 243.000 1.0383 + 244.000 1.0384 + 245.000 1.0384 + 246.000 1.0384 + 247.000 1.0384 + 248.000 1.0384 + 249.000 1.0384 + 250.000 1.0384 + 251.000 1.0384 + 252.000 1.0384 + 253.000 1.0384 + 254.000 1.0384 + 255.000 1.0384 + 256.000 1.0384 + 257.000 1.0384 + 258.000 1.0384 + 259.000 1.0384 + 260.000 1.0384 + 261.000 1.0385 + 262.000 1.0385 + 263.000 1.0385 + 264.000 1.0385 + 265.000 1.0385 + 266.000 1.0385 + 267.000 1.0385 + 268.000 1.0385 + 269.000 1.0385 + 270.000 1.0385 + 271.000 1.0385 + 272.000 1.0385 + 273.000 1.0385 + 274.000 1.0385 + 275.000 1.0385 + 276.000 1.0385 + 277.000 1.0385 + 278.000 1.0385 + 279.000 1.0386 + 280.000 1.0386 + 281.000 1.0386 + 282.000 1.0386 + 283.000 1.0386 + 284.000 1.0386 + 285.000 1.0386 + 286.000 1.0386 + 287.000 1.0386 + 288.000 1.0386 + 289.000 1.0386 + 290.000 1.0386 + 291.000 1.0386 + 292.000 1.0386 + 293.000 1.0386 + 294.000 1.0386 + 295.000 1.0386 + 296.000 1.0386 + 297.000 1.0386 + 298.000 1.0387 + 299.000 1.0387 + 300.000 1.0387 + 301.000 1.0387 + 302.000 1.0387 + 303.000 1.0387 + 304.000 1.0387 + 305.000 1.0387 + 306.000 1.0387 + 307.000 1.0387 + 308.000 1.0387 + 309.000 1.0387 + 310.000 1.0387 + 311.000 1.0387 + 312.000 1.0387 + 313.000 1.0387 + 314.000 1.0387 + 315.000 1.0387 + 316.000 1.0387 + 317.000 1.0388 + 318.000 1.0388 + 319.000 1.0388 + 320.000 1.0388 + 321.000 1.0388 + 322.000 1.0388 + 323.000 1.0388 + 324.000 1.0388 + 325.000 1.0388 + 326.000 1.0388 + 327.000 1.0388 + 328.000 1.0388 + 329.000 1.0388 + 330.000 1.0388 + 331.000 1.0388 + 332.000 1.0388 + 333.000 1.0388 + 334.000 1.0388 + 335.000 1.0388 + 336.000 1.0388 + 337.000 1.0388 + 338.000 1.0389 + 339.000 1.0389 + 340.000 1.0389 + 341.000 1.0389 + 342.000 1.0389 + 343.000 1.0389 + 344.000 1.0389 + 345.000 1.0389 + 346.000 1.0389 + 347.000 1.0389 + 348.000 1.0389 + 349.000 1.0389 + 350.000 1.0389 + 351.000 1.0389 + 352.000 1.0389 + 353.000 1.0389 + 354.000 1.0389 + 355.000 1.0389 + 356.000 1.0389 + 357.000 1.0389 + 358.000 1.0389 + 359.000 1.0389 + 360.000 1.0390 + 361.000 1.0390 + 362.000 1.0390 + 363.000 1.0390 + 364.000 1.0390 + 365.000 1.0390 + 366.000 1.0390 + 367.000 1.0390 + 368.000 1.0390 + 369.000 1.0390 + 370.000 1.0390 + 371.000 1.0390 + 372.000 1.0390 + 373.000 1.0390 + 374.000 1.0390 + 375.000 1.0390 + 376.000 1.0390 + 377.000 1.0390 + 378.000 1.0390 + 379.000 1.0390 + 380.000 1.0390 + 381.000 1.0390 + 382.000 1.0390 + 383.000 1.0391 + 384.000 1.0391 + 385.000 1.0391 + 386.000 1.0391 + 387.000 1.0391 + 388.000 1.0391 + 389.000 1.0391 + 390.000 1.0391 + 391.000 1.0391 + 392.000 1.0391 + 393.000 1.0391 + 394.000 1.0391 + 395.000 1.0391 + 396.000 1.0391 + 397.000 1.0391 + 398.000 1.0391 + 399.000 1.0391 + 400.000 1.0391 + 401.000 1.0391 + 402.000 1.0391 + 403.000 1.0391 + 404.000 1.0391 + 405.000 1.0391 + 406.000 1.0391 + 407.000 1.0391 + 408.000 1.0392 + 409.000 1.0392 + 410.000 1.0392 + 411.000 1.0392 + 412.000 1.0392 + 413.000 1.0392 + 414.000 1.0392 + 415.000 1.0392 + 416.000 1.0392 + 417.000 1.0392 + 418.000 1.0392 + 419.000 1.0392 + 420.000 1.0392 + 421.000 1.0392 + 422.000 1.0392 + 423.000 1.0392 + 424.000 1.0392 + 425.000 1.0392 + 426.000 1.0392 + 427.000 1.0392 + 428.000 1.0392 + 429.000 1.0392 + 430.000 1.0392 + 431.000 1.0392 + 432.000 1.0392 + 433.000 1.0392 + 434.000 1.0392 + 435.000 1.0393 + 436.000 1.0393 + 437.000 1.0393 + 438.000 1.0393 + 439.000 1.0393 + 440.000 1.0393 + 441.000 1.0393 + 442.000 1.0393 + 443.000 1.0393 + 444.000 1.0393 + 445.000 1.0393 + 446.000 1.0393 + 447.000 1.0393 + 448.000 1.0393 + 449.000 1.0393 + 450.000 1.0393 + 451.000 1.0393 + 452.000 1.0393 + 453.000 1.0393 + 454.000 1.0393 + 455.000 1.0393 + 456.000 1.0393 + 457.000 1.0393 + 458.000 1.0393 + 459.000 1.0393 + 460.000 1.0393 + 461.000 1.0393 + 462.000 1.0393 + 463.000 1.0393 + 464.000 1.0394 + 465.000 1.0394 + 466.000 1.0394 + 467.000 1.0394 + 468.000 1.0394 + 469.000 1.0394 + 470.000 1.0394 + 471.000 1.0394 + 472.000 1.0394 + 473.000 1.0394 + 474.000 1.0394 + 475.000 1.0394 + 476.000 1.0394 + 477.000 1.0394 + 478.000 1.0394 + 479.000 1.0394 + 480.000 1.0394 + 481.000 1.0394 + 482.000 1.0394 + 483.000 1.0394 + 484.000 1.0394 + 485.000 1.0394 + 486.000 1.0394 + 487.000 1.0394 + 488.000 1.0394 + 489.000 1.0394 + 490.000 1.0394 + 491.000 1.0394 + 492.000 1.0394 + 493.000 1.0394 + 494.000 1.0394 + 495.000 1.0395 + 496.000 1.0395 + 497.000 1.0395 + 498.000 1.0395 + 499.000 1.0395 + 500.000 1.0395 + 501.000 1.0395 + 502.000 1.0395 + 503.000 1.0395 + 504.000 1.0395 + 505.000 1.0395 + 506.000 1.0395 + 507.000 1.0395 + 508.000 1.0395 + 509.000 1.0395 + 510.000 1.0395 + 511.000 1.0395 + 512.000 1.0395 + 513.000 1.0395 + 514.000 1.0395 + 515.000 1.0395 + 516.000 1.0395 + 517.000 1.0395 + 518.000 1.0395 + 519.000 1.0395 + 520.000 1.0395 + 521.000 1.0395 + 522.000 1.0395 + 523.000 1.0395 + 524.000 1.0395 + 525.000 1.0395 + 526.000 1.0395 + 527.000 1.0395 + 528.000 1.0395 + 529.000 1.0396 + 530.000 1.0396 + 531.000 1.0396 + 532.000 1.0396 + 533.000 1.0396 + 534.000 1.0396 + 535.000 1.0396 + 536.000 1.0396 + 537.000 1.0396 + 538.000 1.0396 + 539.000 1.0396 + 540.000 1.0396 + 541.000 1.0396 + 542.000 1.0396 + 543.000 1.0396 + 544.000 1.0396 + 545.000 1.0396 + 546.000 1.0396 + 547.000 1.0396 + 548.000 1.0396 + 549.000 1.0396 + 550.000 1.0396 + 551.000 1.0396 + 552.000 1.0396 + 553.000 1.0396 + 554.000 1.0396 + 555.000 1.0396 + 556.000 1.0396 + 557.000 1.0396 + 558.000 1.0396 + 559.000 1.0396 + 560.000 1.0396 + 561.000 1.0396 + 562.000 1.0396 + 563.000 1.0396 + 564.000 1.0396 + 565.000 1.0396 + 566.000 1.0397 + 567.000 1.0397 + 568.000 1.0397 + 569.000 1.0397 + 570.000 1.0397 + 571.000 1.0397 + 572.000 1.0397 + 573.000 1.0397 + 574.000 1.0397 + 575.000 1.0397 + 576.000 1.0397 + 577.000 1.0397 + 578.000 1.0397 + 579.000 1.0397 + 580.000 1.0397 + 581.000 1.0397 + 582.000 1.0397 + 583.000 1.0397 + 584.000 1.0397 + 585.000 1.0397 + 586.000 1.0397 + 587.000 1.0397 + 588.000 1.0397 + 589.000 1.0397 + 590.000 1.0397 + 591.000 1.0397 + 592.000 1.0397 + 593.000 1.0397 + 594.000 1.0397 + 595.000 1.0397 + 596.000 1.0397 + 597.000 1.0397 + 598.000 1.0397 + 599.000 1.0397 + 600.000 1.0397 + 601.000 1.0397 + 602.000 1.0397 + 603.000 1.0397 + 604.000 1.0397 + 605.000 1.0397 + 606.000 1.0397 + 607.000 1.0398 + 608.000 1.0398 + 609.000 1.0398 + 610.000 1.0398 + 611.000 1.0398 + 612.000 1.0398 + 613.000 1.0398 + 614.000 1.0398 + 615.000 1.0398 + 616.000 1.0398 + 617.000 1.0398 + 618.000 1.0398 + 619.000 1.0398 + 620.000 1.0398 + 621.000 1.0398 + 622.000 1.0398 + 623.000 1.0398 + 624.000 1.0398 + 625.000 1.0398 + 626.000 1.0398 + 627.000 1.0398 + 628.000 1.0398 + 629.000 1.0398 + 630.000 1.0398 + 631.000 1.0398 + 632.000 1.0398 + 633.000 1.0398 + 634.000 1.0398 + 635.000 1.0398 + 636.000 1.0398 + 637.000 1.0398 + 638.000 1.0398 + 639.000 1.0398 + 640.000 1.0398 + 641.000 1.0398 + 642.000 1.0398 + 643.000 1.0398 + 644.000 1.0398 + 645.000 1.0398 + 646.000 1.0398 + 647.000 1.0398 + 648.000 1.0398 + 649.000 1.0398 + 650.000 1.0398 + 651.000 1.0398 + 652.000 1.0398 + 653.000 1.0399 + 654.000 1.0399 + 655.000 1.0399 + 656.000 1.0399 + 657.000 1.0399 + 658.000 1.0399 + 659.000 1.0399 + 660.000 1.0399 + 661.000 1.0399 + 662.000 1.0399 + 663.000 1.0399 + 664.000 1.0399 + 665.000 1.0399 + 666.000 1.0399 + 667.000 1.0399 + 668.000 1.0399 + 669.000 1.0399 + 670.000 1.0399 + 671.000 1.0399 + 672.000 1.0399 + 673.000 1.0399 + 674.000 1.0399 + 675.000 1.0399 + 676.000 1.0399 + 677.000 1.0399 + 678.000 1.0399 + 679.000 1.0399 + 680.000 1.0399 + 681.000 1.0399 + 682.000 1.0399 + 683.000 1.0399 + 684.000 1.0399 + 685.000 1.0399 + 686.000 1.0399 + 687.000 1.0399 + 688.000 1.0399 + 689.000 1.0399 + 690.000 1.0399 + 691.000 1.0399 + 692.000 1.0399 + 693.000 1.0399 + 694.000 1.0399 + 695.000 1.0399 + 696.000 1.0399 + 697.000 1.0399 + 698.000 1.0399 + 699.000 1.0399 + 700.000 1.0399 + 701.000 1.0399 + 702.000 1.0399 + 703.000 1.0399 + 704.000 1.0399 + 705.000 1.0399 + 706.000 1.0400 + 707.000 1.0400 + 708.000 1.0400 + 709.000 1.0400 + 710.000 1.0400 + 711.000 1.0400 + 712.000 1.0400 + 713.000 1.0400 + 714.000 1.0400 + 715.000 1.0400 + 716.000 1.0400 + 717.000 1.0400 + 718.000 1.0400 + 719.000 1.0400 + 720.000 1.0400 + 721.000 1.0400 + 722.000 1.0400 + 723.000 1.0400 + 724.000 1.0400 + 725.000 1.0400 + 726.000 1.0400 + 727.000 1.0400 + 728.000 1.0400 + 729.000 1.0400 + 730.000 1.0400 + 731.000 1.0400 + 732.000 1.0400 + 733.000 1.0400 + 734.000 1.0400 + 735.000 1.0400 + 736.000 1.0400 + 737.000 1.0400 + 738.000 1.0400 + 739.000 1.0400 + 740.000 1.0400 + 741.000 1.0400 + 742.000 1.0400 + 743.000 1.0400 + 744.000 1.0400 + 745.000 1.0400 + 746.000 1.0400 + 747.000 1.0400 + 748.000 1.0400 + 749.000 1.0400 + 750.000 1.0400 + 751.000 1.0400 + 752.000 1.0400 + 753.000 1.0400 + 754.000 1.0400 + 755.000 1.0400 + 756.000 1.0400 + 757.000 1.0400 + 758.000 1.0400 + 759.000 1.0400 + 760.000 1.0400 + 761.000 1.0400 + 762.000 1.0400 + 763.000 1.0400 + 764.000 1.0400 + 765.000 1.0400 + 766.000 1.0400 + 767.000 1.0400 + 768.000 1.0401 + 769.000 1.0401 + 770.000 1.0401 + 771.000 1.0401 + 772.000 1.0401 + 773.000 1.0401 + 774.000 1.0401 + 775.000 1.0401 + 776.000 1.0401 + 777.000 1.0401 + 778.000 1.0401 + 779.000 1.0401 + 780.000 1.0401 + 781.000 1.0401 + 782.000 1.0401 + 783.000 1.0401 + 784.000 1.0401 + 785.000 1.0401 + 786.000 1.0401 + 787.000 1.0401 + 788.000 1.0401 + 789.000 1.0401 + 790.000 1.0401 + 791.000 1.0401 + 792.000 1.0401 + 793.000 1.0401 + 794.000 1.0401 + 795.000 1.0401 + 796.000 1.0401 + 797.000 1.0401 + 798.000 1.0401 + 799.000 1.0401 + 800.000 1.0401 + 801.000 1.0401 + 802.000 1.0401 + 803.000 1.0401 + 804.000 1.0401 + 805.000 1.0401 + 806.000 1.0401 + 807.000 1.0401 + 808.000 1.0401 + 809.000 1.0401 + 810.000 1.0401 + 811.000 1.0401 + 812.000 1.0401 + 813.000 1.0401 + 814.000 1.0401 + 815.000 1.0401 + 816.000 1.0401 + 817.000 1.0401 + 818.000 1.0401 + 819.000 1.0401 + 820.000 1.0401 + 821.000 1.0401 + 822.000 1.0401 + 823.000 1.0401 + 824.000 1.0401 + 825.000 1.0401 + 826.000 1.0401 + 827.000 1.0401 + 828.000 1.0401 + 829.000 1.0401 + 830.000 1.0401 + 831.000 1.0401 + 832.000 1.0401 + 833.000 1.0401 + 834.000 1.0401 + 835.000 1.0401 + 836.000 1.0401 + 837.000 1.0401 + 838.000 1.0401 + 839.000 1.0401 + 840.000 1.0401 + 841.000 1.0401 + 842.000 1.0402 + 843.000 1.0402 + 844.000 1.0402 + 845.000 1.0402 + 846.000 1.0402 + 847.000 1.0402 + 848.000 1.0402 + 849.000 1.0402 + 850.000 1.0402 + 851.000 1.0402 + 852.000 1.0402 + 853.000 1.0402 + 854.000 1.0402 + 855.000 1.0402 + 856.000 1.0402 + 857.000 1.0402 + 858.000 1.0402 + 859.000 1.0402 + 860.000 1.0402 + 861.000 1.0402 + 862.000 1.0402 + 863.000 1.0402 + 864.000 1.0402 + 865.000 1.0402 + 866.000 1.0402 + 867.000 1.0402 + 868.000 1.0402 + 869.000 1.0402 + 870.000 1.0402 + 871.000 1.0402 + 872.000 1.0402 + 873.000 1.0402 + 874.000 1.0402 + 875.000 1.0402 + 876.000 1.0402 + 877.000 1.0402 + 878.000 1.0402 + 879.000 1.0402 + 880.000 1.0402 + 881.000 1.0402 + 882.000 1.0402 + 883.000 1.0402 + 884.000 1.0402 + 885.000 1.0402 + 886.000 1.0402 + 887.000 1.0402 + 888.000 1.0402 + 889.000 1.0402 + 890.000 1.0402 + 891.000 1.0402 + 892.000 1.0402 + 893.000 1.0402 + 894.000 1.0402 + 895.000 1.0402 + 896.000 1.0402 + 897.000 1.0402 + 898.000 1.0402 + 899.000 1.0402 + 900.000 1.0402 + 901.000 1.0402 + 902.000 1.0402 + 903.000 1.0402 + 904.000 1.0402 + 905.000 1.0402 + 906.000 1.0402 + 907.000 1.0402 + 908.000 1.0402 + 909.000 1.0402 + 910.000 1.0402 + 911.000 1.0402 + 912.000 1.0402 + 913.000 1.0402 + 914.000 1.0402 + 915.000 1.0402 + 916.000 1.0402 + 917.000 1.0402 + 918.000 1.0402 + 919.000 1.0402 + 920.000 1.0402 + 921.000 1.0402 + 922.000 1.0402 + 923.000 1.0402 + 924.000 1.0402 + 925.000 1.0402 + 926.000 1.0402 + 927.000 1.0402 + 928.000 1.0402 + 929.000 1.0402 + 930.000 1.0402 + 931.000 1.0402 + 932.000 1.0402 + 933.000 1.0402 + 934.000 1.0403 + 935.000 1.0403 + 936.000 1.0403 + 937.000 1.0403 + 938.000 1.0403 + 939.000 1.0403 + 940.000 1.0403 + 941.000 1.0403 + 942.000 1.0403 + 943.000 1.0403 + 944.000 1.0403 + 945.000 1.0403 + 946.000 1.0403 + 947.000 1.0403 + 948.000 1.0403 + 949.000 1.0403 + 950.000 1.0403 + 951.000 1.0403 + 952.000 1.0403 + 953.000 1.0403 + 954.000 1.0403 + 955.000 1.0403 + 956.000 1.0403 + 957.000 1.0403 + 958.000 1.0403 + 959.000 1.0403 + 960.000 1.0403 + 961.000 1.0403 + 962.000 1.0403 + 963.000 1.0403 + 964.000 1.0403 + 965.000 1.0403 + 966.000 1.0403 + 967.000 1.0403 + 968.000 1.0403 + 969.000 1.0403 + 970.000 1.0403 + 971.000 1.0403 + 972.000 1.0403 + 973.000 1.0403 + 974.000 1.0403 + 975.000 1.0403 + 976.000 1.0403 + 977.000 1.0403 + 978.000 1.0403 + 979.000 1.0403 + 980.000 1.0403 + 981.000 1.0403 + 982.000 1.0403 + 983.000 1.0403 + 984.000 1.0403 + 985.000 1.0403 + 986.000 1.0403 + 987.000 1.0403 + 988.000 1.0403 + 989.000 1.0403 + 990.000 1.0403 + 991.000 1.0403 + 992.000 1.0403 + 993.000 1.0403 + 994.000 1.0403 + 995.000 1.0403 + 996.000 1.0403 + 997.000 1.0403 + 998.000 1.0403 + 999.000 1.0403 +1000.000 1.0403 +1001.000 1.0403 +1002.000 1.0403 +1003.000 1.0403 +1004.000 1.0403 +1005.000 1.0403 +1006.000 1.0403 +1007.000 1.0403 +1008.000 1.0403 +1009.000 1.0403 +1010.000 1.0403 +1011.000 1.0403 +1012.000 1.0403 +1013.000 1.0403 +1014.000 1.0403 +1015.000 1.0403 +1016.000 1.0403 +1017.000 1.0403 +1018.000 1.0403 +1019.000 1.0403 +1020.000 1.0403 +1021.000 1.0403 +1022.000 1.0403 +1023.000 1.0403 +1024.000 1.0403 +1025.000 1.0403 +1026.000 1.0403 +1027.000 1.0403 +1028.000 1.0403 +1029.000 1.0403 +1030.000 1.0403 diff --git a/test/Test_EvalPlateau/Eval.results.save b/test/Test_EvalPlateau/Eval.results.save new file mode 100644 index 0000000000..39bbcb2005 --- /dev/null +++ b/test/Test_EvalPlateau/Eval.results.save @@ -0,0 +1,2 @@ +#Frame EQ[A0] EQ[A1] EQ[A2] EQ[F] EQ[corr] EQ[vala] EQ[chisq] EQ[pltime] EQ[name] EQ[result] + 1 1.0366 0.0027 1.0406 200.9515 0.4204 0.0007 0.0048 918.0000 MD_Density yes diff --git a/test/Test_EvalPlateau/RunTest.sh b/test/Test_EvalPlateau/RunTest.sh new file mode 100755 index 0000000000..40c778d361 --- /dev/null +++ b/test/Test_EvalPlateau/RunTest.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +. ../MasterTest.sh + +TESTNAME='Evalulate plateau test' + +INPUT='-i evalp.in' + +CleanFiles evalp.in Eval.agr Eval.results + +cat > evalp.in < Date: Fri, 29 May 2020 14:30:15 -0400 Subject: [PATCH 54/58] Add to list of tests. --- test/Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/Makefile b/test/Makefile index 28a60decad..89547aaea6 100644 --- a/test/Makefile +++ b/test/Makefile @@ -468,6 +468,9 @@ test.diagmatrix: test.emin: @-cd Test_Emin && ./RunTest.sh $(OPT) +test.evalplateau: + @-cd Test_EvalPlateau && ./RunTest.sh $(OPT) + # Every test target should go here. COMPLETETESTS=test.general \ test.strip \ @@ -617,7 +620,8 @@ COMPLETETESTS=test.general \ test.dihedralrms \ test.slope \ test.diagmatrix \ - test.emin + test.emin \ + test.evalplateau test.all: $(MAKE) test.complete summary From ca3333d869734caa2df4f36f344869d06fabd13e Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Sat, 13 Jun 2020 15:58:35 -0400 Subject: [PATCH 55/58] DRR - Ended up not needing the chi^2 function yet. Remove for now. --- src/ChiSqDist.cpp | 24 ------- src/ChiSqDist.h | 10 --- src/GammaFn.cpp | 162 ---------------------------------------------- src/GammaFn.h | 11 ---- src/cpptrajdepend | 2 - src/cpptrajfiles | 2 - 6 files changed, 211 deletions(-) delete mode 100644 src/ChiSqDist.cpp delete mode 100644 src/ChiSqDist.h delete mode 100644 src/GammaFn.cpp delete mode 100644 src/GammaFn.h diff --git a/src/ChiSqDist.cpp b/src/ChiSqDist.cpp deleted file mode 100644 index 5094319542..0000000000 --- a/src/ChiSqDist.cpp +++ /dev/null @@ -1,24 +0,0 @@ -#include "ChiSqDist.h" -#include -#include "CpptrajStdio.h" -#include "GammaFn.h" - -double Cpptraj::Math::ChiSqDist(double chisq, int dof) { - if (chisq < 0) { - mprinterr("Error: ChiSqDist: Chi^2 value is < 0 (%g).\n", chisq); - return 0; - } - if (dof < 2) { - mprintf("Warning: ChiSqDist: Less than 2 degrees of freedom (%i)\n", dof); - } - - double n_over_2 = (double)dof / 2.0; - - double two_no2 = pow(2.0, n_over_2); - double chisq_no21 = pow(chisq, n_over_2 - 1.0); - double exp_chisq = exp(-chisq / 2.0); - double gamma_dof = GammaFn(n_over_2); - - double pval = (chisq_no21 * exp_chisq) / (two_no2 * gamma_dof); - return pval; -} diff --git a/src/ChiSqDist.h b/src/ChiSqDist.h deleted file mode 100644 index 1e1a0db12d..0000000000 --- a/src/ChiSqDist.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef INC_CHISQDIST_H -#define INC_CHISQDIST_H -namespace Cpptraj { -namespace Math { -/// \return the value of the chi^2 PDF given a chi^2 value and # of d.o.f. -double ChiSqDist(double, int); - -} -} -#endif diff --git a/src/GammaFn.cpp b/src/GammaFn.cpp deleted file mode 100644 index aa3f57ba87..0000000000 --- a/src/GammaFn.cpp +++ /dev/null @@ -1,162 +0,0 @@ -#include "GammaFn.h" -#include -#ifndef C11_SUPPORT -#include // DBL_MAX -#include "Constants.h" -#include "CpptrajStdio.h" - // The code below is adapted from the Gamma code found here: - // https://www.johndcook.com/blog/stand_alone_code/ - // It is only intended for use when C++11 support is not available since - // the errors from the "real" gamma function increase for large X - // (about X=14 and above). - // When C++11 support is available, the functions from cmath are used. -#endif - -/** \return the Gamma function value of xIn. - * The Gamma function is defined as: - * GammaFn(x) = Integral(0, inf)[ exp(-t) * t^(x-1) dt ] for x > 0 - * GammaFn(n+1) = n! for n = 1,2,3... - * GammaFn(.5) = sqrt(PI) - */ -double Cpptraj::Math::GammaFn(double xIn) { -# ifdef C11_SUPPORT - return tgamma(xIn); -# else - if (xIn <= 0) { - mprinterr("Error: GammaFn argument is <= 0 (%g)\n", xIn); - return 0; - } - - // --------------------------------------------- - if (xIn < 0.001) { - // For small x, 1/Gamma(x) has power series x + gamma x^2 - ... - // So in this range, 1/Gamma(x) = x + gamma x^2 with error on the order of x^3. - // The relative error over this interval is less than 6e-7. - return 1.0 / (xIn * (1.0 + Constants::EULER_MASC * xIn)); - } - - // --------------------------------------------- - if (xIn < 12.0) { - // The algorithm directly approximates gamma over (1,2) and uses - // reduction identities to reduce other arguments to this interval. - double y = xIn; - int n = 0; - bool lt_one = (xIn < 1.0); - - // Add or subtract integers as necessary to bring y into 1 < y < 2 - if (lt_one) - y += 1.0; - else { - n = (int)(floor(y)) - 1; - y -= n; - } - - // numerator coefficients for approximation over 1 < y < 2 - static const double p[] = - { - -1.71618513886549492533811E+0, - 2.47656508055759199108314E+1, - -3.79804256470945635097577E+2, - 6.29331155312818442661052E+2, - 8.66966202790413211295064E+2, - -3.14512729688483675254357E+4, - -3.61444134186911729807069E+4, - 6.64561438202405440627855E+4 - }; - - // denominator coefficients for approximation over the interval (1,2) - static const double q[] = - { - -3.08402300119738975254353E+1, - 3.15350626979604161529144E+2, - -1.01515636749021914166146E+3, - -3.10777167157231109440444E+3, - 2.25381184209801510330112E+4, - 4.75584627752788110767815E+3, - -1.34659959864969306392456E+5, - -1.15132259675553483497211E+5 - }; - double num = 0.0; - double den = 1.0; - int i; - - double z = y - 1; - for (i = 0; i < 8; i++) - { - num = (num + p[i])*z; - den = den*z + q[i]; - } - double result = num/den + 1.0; - - // Apply correction if argument was not initially in (1,2) - if (lt_one) { - // Use identity gamma(z) = gamma(z+1)/z - // The variable "result" now holds gamma of the original y + 1 - // Thus we use y-1 to get back the orginal y. - result /= (y-1.0); - } else { - // Use the identity gamma(z+n) = z*(z+1)* ... *(z+n-1)*gamma(z) - for (i = 0; i < n; i++) - result *= y++; - } - - return result; - } // END if xIn < 12 - - // --------------------------------------------- - if (xIn > 171.624) { - // Answer is out of range. Return +inf - double temp = DBL_MAX; - return 2 * temp; - } - - // --------------------------------------------- - return exp(LogGammaFn(xIn)); -# endif /* C11_SUPPORT */ -} - -/** \return the natural log-Gamma function value of xIn. */ -double Cpptraj::Math::LogGammaFn(double xIn) { -# ifdef C11_SUPPORT - return lgamma( xIn ); -# else - if (xIn <= 0) { - mprinterr("Error: GammaFn argument is <= 0 (%g)\n", xIn); - return 0; - } - - if (xIn < 12.0) { - return log(fabs(GammaFn(xIn))); - } - - // Abramowitz and Stegun 6.1.41 - // Asymptotic series should be good to at least 11 or 12 figures - // For error analysis, see Whittiker and Watson - // A Course in Modern Analysis (1927), page 252 - - static const double c[8] = - { - 1.0/12.0, - -1.0/360.0, - 1.0/1260.0, - -1.0/1680.0, - 1.0/1188.0, - -691.0/360360.0, - 1.0/156.0, - -3617.0/122400.0 - }; - double z = 1.0/(xIn*xIn); - double sum = c[7]; - for (int i=6; i >= 0; i--) - { - sum *= z; - sum += c[i]; - } - double series = sum/xIn; - - static const double halfLogTwoPi = 0.91893853320467274178032973640562; - double logGamma = (xIn - 0.5)*log(xIn) - xIn + halfLogTwoPi + series; - return logGamma; -# endif /* C11_SUPPORT */ -} - diff --git a/src/GammaFn.h b/src/GammaFn.h deleted file mode 100644 index 6a098f52dc..0000000000 --- a/src/GammaFn.h +++ /dev/null @@ -1,11 +0,0 @@ -#ifndef INC_GAMMAFN_H -#define INC_GAMMAFN_H -namespace Cpptraj { -namespace Math { - -double GammaFn(double); -double LogGammaFn(double); - -} // END namespace Math -} // END namespace Cpptraj -#endif diff --git a/src/cpptrajdepend b/src/cpptrajdepend index c38a51bd15..0fe251d71f 100644 --- a/src/cpptrajdepend +++ b/src/cpptrajdepend @@ -144,7 +144,6 @@ ByteRoutines.o : ByteRoutines.cpp CIFfile.o : CIFfile.cpp Atom.h BufferedLine.h CIFfile.h CpptrajFile.h CpptrajStdio.h FileIO.h FileName.h NameType.h Parallel.h SymbolExporting.h CharMask.o : CharMask.cpp Atom.h CharMask.h CpptrajStdio.h MaskToken.h Molecule.h NameType.h Residue.h SymbolExporting.h CharmmParamFile.o : CharmmParamFile.cpp ArgList.h AtomType.h BufferedLine.h CharmmParamFile.h Constants.h CpptrajFile.h CpptrajStdio.h FileIO.h FileName.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h StringRoutines.h TypeNameHolder.h -ChiSqDist.o : ChiSqDist.cpp ChiSqDist.h CpptrajStdio.h GammaFn.h ClusterDist.o : ClusterDist.cpp ArrayIterator.h AssociatedData.h Atom.h AtomExtra.h AtomMap.h AtomMask.h AtomType.h Box.h ClusterDist.h Constants.h CoordinateInfo.h CpptrajFile.h DataSet.h DataSet_1D.h DataSet_Coords.h Dimension.h FileIO.h FileName.h Frame.h Hungarian.h MapAtom.h MaskToken.h Matrix.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReplicaDimArray.h Residue.h SymbolExporting.h SymmetricRmsdCalc.h TextFormat.h Topology.h TypeNameHolder.h Vec3.h ClusterList.o : ClusterList.cpp ArgList.h ArrayIterator.h AssociatedData.h Atom.h AtomExtra.h AtomMap.h AtomMask.h AtomType.h Box.h ClusterDist.h ClusterList.h ClusterNode.h ClusterSieve.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataSet.h DataSet_1D.h DataSet_Cmatrix.h DataSet_Coords.h Dimension.h FileIO.h FileName.h Frame.h Hungarian.h MapAtom.h MaskToken.h Matrix.h Matrix_3x3.h MetaData.h Molecule.h NameType.h PDBfile.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h ProgressBar.h Range.h ReplicaDimArray.h Residue.h StringRoutines.h SymbolExporting.h SymmetricRmsdCalc.h TextFormat.h Topology.h TypeNameHolder.h Vec3.h ClusterMap.o : ClusterMap.cpp AssociatedData.h ClusterMap.h Constants.h CpptrajFile.h CpptrajStdio.h DataSet.h DataSet_2D.h Dimension.h FileIO.h FileName.h MetaData.h Parallel.h ProgressBar.h ProgressTimer.h Range.h TextFormat.h Timer.h @@ -302,7 +301,6 @@ ForLoop_list.o : ForLoop_list.cpp Action.h ActionList.h ActionState.h Analysis.h ForLoop_mask.o : ForLoop_mask.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomExtra.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h FileIO.h FileName.h FileTypes.h ForLoop.h ForLoop_mask.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h StringRoutines.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Vec3.h ForLoop_overSets.o : ForLoop_overSets.cpp Action.h ActionList.h ActionState.h Analysis.h AnalysisList.h AnalysisState.h ArgList.h AssociatedData.h Atom.h AtomExtra.h AtomMask.h AtomType.h BaseIOtype.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajState.h CpptrajStdio.h DataFile.h DataFileList.h DataSet.h DataSetList.h DataSet_Coords.h DataSet_Coords_REF.h Dimension.h DispatchObject.h EnsembleIn.h EnsembleOutList.h FileIO.h FileName.h FileTypes.h ForLoop.h ForLoop_overSets.h Frame.h FramePtrArray.h InputTrajCommon.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h ReplicaInfo.h Residue.h SymbolExporting.h TextFormat.h Timer.h Topology.h TrajFrameCounter.h Trajin.h TrajinList.h TrajoutList.h TypeNameHolder.h Vec3.h Frame.o : Frame.cpp Atom.h AtomMask.h Box.h Constants.h CoordinateInfo.h CpptrajStdio.h Frame.h MaskToken.h Matrix_3x3.h Molecule.h NameType.h Parallel.h ReplicaDimArray.h Residue.h SymbolExporting.h Vec3.h -GammaFn.o : GammaFn.cpp Constants.h CpptrajStdio.h GammaFn.h GridAction.o : GridAction.cpp ArgList.h ArrayIterator.h AssociatedData.h Atom.h AtomExtra.h AtomMask.h AtomType.h Box.h Constants.h CoordinateInfo.h CpptrajFile.h CpptrajStdio.h DataSet.h DataSetList.h DataSet_3D.h DataSet_Coords.h DataSet_Coords_REF.h DataSet_GridFlt.h Dimension.h FileIO.h FileName.h Frame.h Grid.h GridAction.h GridBin.h MaskToken.h Matrix_3x3.h MetaData.h Molecule.h NameType.h Parallel.h ParameterHolders.h ParameterSet.h ParameterTypes.h Range.h ReferenceFrame.h ReplicaDimArray.h Residue.h SymbolExporting.h TextFormat.h Timer.h Topology.h TypeNameHolder.h Vec3.h HistBin.o : HistBin.cpp Constants.h CpptrajStdio.h Dimension.h HistBin.h Hungarian.o : Hungarian.cpp ArrayIterator.h Constants.h CpptrajStdio.h Hungarian.h Matrix.h diff --git a/src/cpptrajfiles b/src/cpptrajfiles index ce6d5543f2..b83147a0cc 100644 --- a/src/cpptrajfiles +++ b/src/cpptrajfiles @@ -146,7 +146,6 @@ COMMON_SOURCES= \ ByteRoutines.cpp \ CharMask.cpp \ CharmmParamFile.cpp \ - ChiSqDist.cpp \ CIFfile.cpp \ ClusterDist.cpp \ ClusterList.cpp \ @@ -302,7 +301,6 @@ COMMON_SOURCES= \ ForLoop_mask.cpp \ ForLoop_overSets.cpp \ Frame.cpp \ - GammaFn.cpp \ GridAction.cpp \ HistBin.cpp \ Hungarian.cpp \ From f7d56d86255d8b72ff1c19ae7acd20aa2e630535 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Sat, 13 Jun 2020 16:01:30 -0400 Subject: [PATCH 56/58] Revision bump for evalplateau --- src/Version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Version.h b/src/Version.h index 942de1d73a..1006188a0c 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.26.6" +#define CPPTRAJ_INTERNAL_VERSION "V4.26.7" /// PYTRAJ relies on this #define CPPTRAJ_VERSION_STRING CPPTRAJ_INTERNAL_VERSION #endif From a22c42fe374ef7bdffd293079eb6a80d68567998 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Sat, 13 Jun 2020 16:11:27 -0400 Subject: [PATCH 57/58] Hide evalplateau, not quite ready for prime time. Add onboard help. --- src/Analysis_EvalPlateau.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Analysis_EvalPlateau.cpp b/src/Analysis_EvalPlateau.cpp index 1572bc19d2..26a7e2f607 100644 --- a/src/Analysis_EvalPlateau.cpp +++ b/src/Analysis_EvalPlateau.cpp @@ -5,6 +5,7 @@ #include "CurveFit.h" Analysis_EvalPlateau::Analysis_EvalPlateau() : + Analysis(HIDDEN), statsout_(0), tolerance_(0), valaCut_(0), @@ -42,7 +43,12 @@ DataSet::DataType Analysis_EvalPlateau::OdataType_[NDATA] = { // Analysis_EvalPlateau::Help() void Analysis_EvalPlateau::Help() const { - mprintf("\n"); + mprintf("\t[name ] [tol ] [valacut ]\n" + "\t[chisqcut ] [slopecut ] [maxit ]\n" + "\t[out ] [resultsout ] [statsout ]\n" + "\t ...\n" + " Evaluate whether the input data sets have reached a plateau after\n" + " fitting to a single exponential.\n"); } // Analysis_EvalPlateau::Setup() From 61c7a713508420dee901a7bc6327204e59d4f474 Mon Sep 17 00:00:00 2001 From: "Daniel R. Roe" Date: Sun, 14 Jun 2020 14:20:53 -0400 Subject: [PATCH 58/58] Revamp how hidden commands are defined. Instead of making a separate category, add a flag that marks the command as hidden. This allows the command to retain its underlying category and so things like 'runanalysis' work as intended with hidden commands. --- src/Action.h | 2 -- src/Action_Channel.cpp | 8 ++++-- src/Action_DNAionTracker.cpp | 6 +++-- src/Action_GridFreeEnergy.cpp | 6 +++-- src/Action_InfraredSpectrum.cpp | 6 +++-- src/Action_NMRrst.cpp | 24 +++++++++++++----- src/Action_Spam.cpp | 2 +- src/Analysis.h | 2 -- src/Analysis_AmdBias.cpp | 6 +++-- src/Analysis_EvalPlateau.cpp | 5 ++-- src/Analysis_Overlap.cpp | 9 +++++-- src/Command.cpp | 45 ++++++++++++++++----------------- src/DispatchObject.h | 18 ++++++++----- src/Exec_Analyze.h | 2 +- src/Exec_ClusterMap.cpp | 5 +++- src/Exec_Commands.h | 2 +- src/Exec_Emin.h | 2 +- src/Exec_PrepareForLeap.h | 2 +- src/Exec_SequenceAlign.h | 2 +- src/Exec_ViewRst.h | 2 +- 20 files changed, 94 insertions(+), 62 deletions(-) diff --git a/src/Action.h b/src/Action.h index 968b07ea70..0516c6e3bc 100644 --- a/src/Action.h +++ b/src/Action.h @@ -28,8 +28,6 @@ class Action : public DispatchObject { public: /// Constructor Action() : DispatchObject(ACTION) {} - /// Constructor - override ACTION (e.g. HIDDEN) - Action(DispatchObject::Otype o) : DispatchObject(o) {} /// Enumerate potential return states from Init, Setup, and DoAction. enum RetType { OK=0, ///< Everything OK, normal return. ERR, ///< Problem occurred. diff --git a/src/Action_Channel.cpp b/src/Action_Channel.cpp index 670b0a7d9e..82b3cca287 100644 --- a/src/Action_Channel.cpp +++ b/src/Action_Channel.cpp @@ -4,8 +4,12 @@ #include "DataSet_GridFlt.h" // CONSTRUCTOR -Action_Channel::Action_Channel() : Action(HIDDEN), - grid_(0), dxyz_(-1.0) {} +Action_Channel::Action_Channel() : + grid_(0), + dxyz_(-1.0) +{ + SetHidden(true); +} void Action_Channel::Help() const { mprintf("\t [] [out ] [dx [dy ] [dz ]]\n"); diff --git a/src/Action_DNAionTracker.cpp b/src/Action_DNAionTracker.cpp index 2d8d2eaf1e..f82634015b 100644 --- a/src/Action_DNAionTracker.cpp +++ b/src/Action_DNAionTracker.cpp @@ -4,12 +4,14 @@ #include "CpptrajStdio.h" // CONSTRUCTOR -Action_DNAionTracker::Action_DNAionTracker() : Action(HIDDEN), +Action_DNAionTracker::Action_DNAionTracker() : distance_(0), bintype_(COUNT), poffset_(0), useMass_(true) -{ } +{ + SetHidden(true); +} void Action_DNAionTracker::Help() const { mprintf("\tname mask_p1 mask_p2 mask_base mask_ions\n" diff --git a/src/Action_GridFreeEnergy.cpp b/src/Action_GridFreeEnergy.cpp index 31188f907c..5f1e14e485 100644 --- a/src/Action_GridFreeEnergy.cpp +++ b/src/Action_GridFreeEnergy.cpp @@ -7,11 +7,13 @@ #include "Constants.h" // GASK_KCAL, SMALL // CONSTRUCTOR -Action_GridFreeEnergy::Action_GridFreeEnergy() : Action(HIDDEN), +Action_GridFreeEnergy::Action_GridFreeEnergy() : maxVoxelOccupancyCount_(600), // NOTE: See header for comments. tempInKevin_(293.0), grid_(0) -{} +{ + SetHidden(true); +} void Action_GridFreeEnergy::Help() const { mprintf("\t\n%s\n\t\n", GridAction::HelpText); diff --git a/src/Action_InfraredSpectrum.cpp b/src/Action_InfraredSpectrum.cpp index 0118324e24..a281588ceb 100644 --- a/src/Action_InfraredSpectrum.cpp +++ b/src/Action_InfraredSpectrum.cpp @@ -9,7 +9,7 @@ # include #endif -Action_InfraredSpectrum::Action_InfraredSpectrum() : Action(HIDDEN), +Action_InfraredSpectrum::Action_InfraredSpectrum() : Vel_(0), VAC_(0), currentTop_(0), @@ -17,7 +17,9 @@ Action_InfraredSpectrum::Action_InfraredSpectrum() : Action(HIDDEN), maxLag_(-1), previousNselected_(-1), useFFT_(true) -{} +{ + SetHidden(true); +} // Action_InfraredSpectrum::Help() void Action_InfraredSpectrum::Help() const { diff --git a/src/Action_NMRrst.cpp b/src/Action_NMRrst.cpp index a7301fe9f1..b89514f43c 100644 --- a/src/Action_NMRrst.cpp +++ b/src/Action_NMRrst.cpp @@ -11,13 +11,25 @@ #include "BufferedLine.h" // CONSTRUCTOR -Action_NMRrst::Action_NMRrst() : Action(HIDDEN), - findOutput_(0), specOutput_(0), masterDSL_(0), numNoePairs_(0), max_cut_(6.0), - strong_cut_(2.9), medium_cut_(3.5), weak_cut_(5.0), - resOffset_(0), debug_(0), nframes_(0), useMass_(false), - findNOEs_(false), series_(false), +Action_NMRrst::Action_NMRrst() : + findOutput_(0), + specOutput_(0), + masterDSL_(0), + numNoePairs_(0), + max_cut_(6.0), + strong_cut_(2.9), + medium_cut_(3.5), + weak_cut_(5.0), + resOffset_(0), + debug_(0), + nframes_(0), + useMass_(false), + findNOEs_(false), + series_(false), rsttop_(0) -{} +{ + SetHidden(true); +} void Action_NMRrst::Help() const { mprintf("\t[file ] [name ] [geom] [noimage] [resoffset ]\n" diff --git a/src/Action_Spam.cpp b/src/Action_Spam.cpp index 47500b9372..2368a3e141 100644 --- a/src/Action_Spam.cpp +++ b/src/Action_Spam.cpp @@ -14,7 +14,7 @@ #include "DataSet_Mesh.h" // CONSTRUCTOR -Action_Spam::Action_Spam() : Action(HIDDEN), +Action_Spam::Action_Spam() : debug_(0), DG_BULK_(-30.3), // Free energy of bulk SPCE water DH_BULK_(-22.2), // Enthalpy of bulk SPCE water diff --git a/src/Analysis.h b/src/Analysis.h index 82edbb864d..8130f579af 100644 --- a/src/Analysis.h +++ b/src/Analysis.h @@ -11,8 +11,6 @@ class Analysis : public DispatchObject { public: /// Constructor Analysis() : DispatchObject(ANALYSIS) {} - /// Constructor - override ANALYSIS (e.g. HIDDEN) - Analysis(DispatchObject::Otype o) : DispatchObject(o) {} /// Enumerate potential return stats from Setup and Analyze. enum RetType { OK = 0, ERR }; /// Destructor - virtual since this class is inherited diff --git a/src/Analysis_AmdBias.cpp b/src/Analysis_AmdBias.cpp index deede99d38..0237390840 100644 --- a/src/Analysis_AmdBias.cpp +++ b/src/Analysis_AmdBias.cpp @@ -2,12 +2,14 @@ #include "CpptrajStdio.h" #include "DataSet_double.h" -Analysis_AmdBias::Analysis_AmdBias() : Analysis(HIDDEN), +Analysis_AmdBias::Analysis_AmdBias() : ds1_(0), Ethresh_(0.0), alpha_(0.0), bias_(0) -{} +{ + SetHidden(true); +} void Analysis_AmdBias::Help() const { mprintf("\tds ethresh alpha out \n"); diff --git a/src/Analysis_EvalPlateau.cpp b/src/Analysis_EvalPlateau.cpp index 26a7e2f607..86e1e75b31 100644 --- a/src/Analysis_EvalPlateau.cpp +++ b/src/Analysis_EvalPlateau.cpp @@ -5,7 +5,6 @@ #include "CurveFit.h" Analysis_EvalPlateau::Analysis_EvalPlateau() : - Analysis(HIDDEN), statsout_(0), tolerance_(0), valaCut_(0), @@ -13,7 +12,9 @@ Analysis_EvalPlateau::Analysis_EvalPlateau() : slopeCut_(0), maxIt_(0), debug_(0) -{} +{ + SetHidden(true); +} const char* Analysis_EvalPlateau::OdataStr_[NDATA] = { "A0", diff --git a/src/Analysis_Overlap.cpp b/src/Analysis_Overlap.cpp index 47418ce5e4..c290560940 100644 --- a/src/Analysis_Overlap.cpp +++ b/src/Analysis_Overlap.cpp @@ -4,8 +4,13 @@ #include "CpptrajStdio.h" #include "DataSet_1D.h" -Analysis_Overlap::Analysis_Overlap() : Analysis(HIDDEN), - ds1_(0), ds2_(0), useDeviation_(false) {} +Analysis_Overlap::Analysis_Overlap() : + ds1_(0), + ds2_(0), + useDeviation_(false) +{ + SetHidden(true); +} void Analysis_Overlap::Help() const { mprintf("\tds1 ds2 [rmsd]\n"); diff --git a/src/Command.cpp b/src/Command.cpp index 7a4aad6e16..558ad036b7 100644 --- a/src/Command.cpp +++ b/src/Command.cpp @@ -203,10 +203,10 @@ int Command::ctlidx_ = -1; void Command::Init() { // GENERAL Command::AddCmd( new Exec_ActiveRef(), Cmd::EXE, 1, "activeref" ); - Command::AddCmd( new Exec_Analyze(), Cmd::EXE, 1, "analyze" ); // HIDDEN + Command::AddCmd( new Exec_Analyze(), Cmd::EXE, 1, "analyze" ); // hidden Command::AddCmd( new Exec_Calc(), Cmd::EXE, 1, "calc" ); Command::AddCmd( new Exec_Clear(), Cmd::EXE, 1, "clear" ); - Command::AddCmd( new Exec_ClusterMap(), Cmd::EXE, 1, "clustermap" ); // HIDDEN + Command::AddCmd( new Exec_ClusterMap(), Cmd::EXE, 1, "clustermap" ); // hidden Command::AddCmd( new Exec_CreateDataFile(), Cmd::EXE, 1, "create" ); Command::AddCmd( new Exec_CreateSet(), Cmd::EXE, 1, "createset" ); Command::AddCmd( new Exec_DataFileCmd(), Cmd::EXE, 1, "datafile" ); @@ -233,13 +233,13 @@ void Command::Init() { Command::AddCmd( new Exec_SelectDS(), Cmd::EXE, 1, "selectds" ); Command::AddCmd( new Exec_SetListDebug(), Cmd::EXE, 2, "debug", "prnlev" ); Command::AddCmd( new Exec_SilenceActions(), Cmd::EXE, 1, "silenceactions" ); - Command::AddCmd( new Exec_SequenceAlign(), Cmd::EXE, 1, "sequencealign" ); + Command::AddCmd( new Exec_SequenceAlign(), Cmd::EXE, 1, "sequencealign" ); // hidden Command::AddCmd( new Exec_SortEnsembleData(),Cmd::EXE, 1, "sortensembledata" ); Command::AddCmd( new Exec_WriteDataFile(), Cmd::EXE, 2, "write", "writedata" ); Command::AddCmd( new Exec_UseDiskCache(), Cmd::EXE, 1, "usediskcache" ); - Command::AddCmd( new Exec_ViewRst(), Cmd::EXE, 1, "viewrst" ); // HIDDEN + Command::AddCmd( new Exec_ViewRst(), Cmd::EXE, 1, "viewrst" ); // hidden # ifdef MPI - Command::AddCmd( new Exec_ForceParaEnsemble(), Cmd::EXE, 1, "forceparaensemble" ); + Command::AddCmd( new Exec_ForceParaEnsemble(), Cmd::EXE, 1, "forceparaensemble" ); // hidden # endif // SYSTEM Command::AddCmd( new Exec_System(), Cmd::EXE, 6, "gnuplot", "head", "less", "ls", "pwd", "xmgrace" ); @@ -248,11 +248,11 @@ void Command::Init() { Command::AddCmd( new Exec_CombineCoords(), Cmd::EXE, 1, "combinecrd" ); Command::AddCmd( new Exec_CrdAction(), Cmd::EXE, 1, "crdaction" ); Command::AddCmd( new Exec_CrdOut(), Cmd::EXE, 1, "crdout" ); - Command::AddCmd( new Exec_Emin(), Cmd::EXE, 1, "emin"); + Command::AddCmd( new Exec_Emin(), Cmd::EXE, 1, "emin"); // hidden Command::AddCmd( new Exec_LoadCrd(), Cmd::EXE, 1, "loadcrd" ); Command::AddCmd( new Exec_LoadTraj(), Cmd::EXE, 1, "loadtraj" ); Command::AddCmd( new Exec_PermuteDihedrals(), Cmd::EXE, 1, "permutedihedrals" ); - Command::AddCmd( new Exec_PrepareForLeap(), Cmd::EXE, 1, "prepareforleap" ); + Command::AddCmd( new Exec_PrepareForLeap(), Cmd::EXE, 1, "prepareforleap" ); // hidden Command::AddCmd( new Exec_RotateDihedral(), Cmd::EXE, 1, "rotatedihedral" ); Command::AddCmd( new Exec_SplitCoords(), Cmd::EXE, 1, "splitcoords" ); // TRAJECTORY @@ -294,7 +294,7 @@ void Command::Init() { Command::AddCmd( new Action_Bounds(), Cmd::ACT, 1, "bounds" ); Command::AddCmd( new Action_Box(), Cmd::ACT, 1, "box" ); Command::AddCmd( new Action_Center(), Cmd::ACT, 1, "center" ); - Command::AddCmd( new Action_Channel(), Cmd::ACT, 1, "channel" ); // HIDDEN + Command::AddCmd( new Action_Channel(), Cmd::ACT, 1, "channel" ); // hidden Command::AddCmd( new Action_CheckStructure(),Cmd::ACT, 3,"check","checkoverlap","checkstructure"); Command::AddCmd( new Action_CheckChirality(),Cmd::ACT, 1, "checkchirality" ); Command::AddCmd( new Action_Closest(), Cmd::ACT, 2, "closest", "closestwaters" ); @@ -308,7 +308,7 @@ void Command::Init() { Command::AddCmd( new Action_DihedralRMS(), Cmd::ACT, 2, "dihrms", "dihedralrms" ); Command::AddCmd( new Action_Dipole(), Cmd::ACT, 1, "dipole" ); Command::AddCmd( new Action_Distance(), Cmd::ACT, 1, "distance" ); - Command::AddCmd( new Action_DNAionTracker(), Cmd::ACT, 1, "dnaiontracker" ); // HIDDEN + Command::AddCmd( new Action_DNAionTracker(), Cmd::ACT, 1, "dnaiontracker" ); // hidden Command::AddCmd( new Action_DistRmsd(), Cmd::ACT, 2, "drms", "drmsd" ); Command::AddCmd( new Action_DSSP(), Cmd::ACT, 2, "dssp", "secstruct" ); Command::AddCmd( new Action_Energy(), Cmd::ACT, 1, "energy" ); @@ -317,11 +317,11 @@ void Command::Init() { Command::AddCmd( new Action_FixAtomOrder(), Cmd::ACT, 1, "fixatomorder" ); Command::AddCmd( new Action_FixImagedBonds(),Cmd::ACT, 1, "fiximagedbonds" ); Command::AddCmd( new Action_GIST(), Cmd::ACT, 1, "gist" ); - Command::AddCmd( new Action_GridFreeEnergy(),Cmd::ACT, 1, "gfe" ); // HIDDEN + Command::AddCmd( new Action_GridFreeEnergy(),Cmd::ACT, 1, "gfe" ); // hidden Command::AddCmd( new Action_Grid(), Cmd::ACT, 1, "grid" ); Command::AddCmd( new Action_HydrogenBond(), Cmd::ACT, 1, "hbond" ); Command::AddCmd( new Action_Image(), Cmd::ACT, 1, "image" ); - Command::AddCmd( new Action_InfraredSpectrum(),Cmd::ACT,2,"irspec","infraredspec"); + Command::AddCmd( new Action_InfraredSpectrum(),Cmd::ACT,2,"irspec","infraredspec"); // hidden Command::AddCmd( new Action_Jcoupling(), Cmd::ACT, 1, "jcoupling" ); Command::AddCmd( new Action_LESsplit(), Cmd::ACT, 1, "lessplit" ); Command::AddCmd( new Action_LIE(), Cmd::ACT, 1, "lie" ); @@ -336,7 +336,7 @@ void Command::Init() { Command::AddCmd( new Action_MultiVector(), Cmd::ACT, 1, "multivector" ); Command::AddCmd( new Action_NAstruct(), Cmd::ACT, 1, "nastruct" ); Command::AddCmd( new Action_NativeContacts(),Cmd::ACT, 1, "nativecontacts" ); - Command::AddCmd( new Action_NMRrst(), Cmd::ACT, 1, "nmrrst" ); // HIDDEN + Command::AddCmd( new Action_NMRrst(), Cmd::ACT, 1, "nmrrst" ); // hidden Command::AddCmd( new Action_Outtraj(), Cmd::ACT, 1, "outtraj" ); Command::AddCmd( new Action_PairDist(), Cmd::ACT, 1, "pairdist" ); Command::AddCmd( new Action_Pairwise(), Cmd::ACT, 1, "pairwise" ); @@ -353,7 +353,7 @@ void Command::Init() { Command::AddCmd( new Action_RunningAvg(), Cmd::ACT, 2, "runavg", "runningaverage" ); Command::AddCmd( new Action_Scale(), Cmd::ACT, 1, "scale" ); Command::AddCmd( new Action_SetVelocity(), Cmd::ACT, 1, "setvelocity" ); - Command::AddCmd( new Action_Spam(), Cmd::ACT, 1, "spam" ); // HIDDEN + Command::AddCmd( new Action_Spam(), Cmd::ACT, 1, "spam" ); Command::AddCmd( new Action_STFC_Diffusion(),Cmd::ACT, 1, "stfcdiffusion" ); Command::AddCmd( new Action_Strip(), Cmd::ACT, 1, "strip" ); Command::AddCmd( new Action_Surf(), Cmd::ACT, 1, "surf" ); @@ -370,7 +370,7 @@ void Command::Init() { Command::AddCmd( new Action_Watershell(), Cmd::ACT, 1, "watershell" ); Command::AddCmd( new Action_XtalSymm(), Cmd::ACT, 1, "xtalsymm" ); // ANALYSIS - Command::AddCmd( new Analysis_AmdBias(), Cmd::ANA, 1, "amdbias" ); // HIDDEN + Command::AddCmd( new Analysis_AmdBias(), Cmd::ANA, 1, "amdbias" ); // hidden Command::AddCmd( new Analysis_AutoCorr(), Cmd::ANA, 1, "autocorr" ); Command::AddCmd( new Analysis_Average(), Cmd::ANA, 1, "avg" ); Command::AddCmd( new Analysis_State(), Cmd::ANA, 1, "calcstate" ); @@ -383,7 +383,7 @@ void Command::Init() { Command::AddCmd( new Analysis_CurveFit(), Cmd::ANA, 1, "curvefit" ); Command::AddCmd( new Analysis_Matrix(), Cmd::ANA, 2, "diagmatrix", "matrix" ); Command::AddCmd( new Analysis_Divergence(), Cmd::ANA, 1, "divergence" ); - Command::AddCmd( new Analysis_EvalPlateau(), Cmd::ANA, 1, "evalplateau" ); + Command::AddCmd( new Analysis_EvalPlateau(), Cmd::ANA, 1, "evalplateau" ); // hidden Command::AddCmd( new Analysis_FFT(), Cmd::ANA, 1, "fft" ); Command::AddCmd( new Analysis_HausdorffDistance,Cmd::ANA,1,"hausdorff" ); Command::AddCmd( new Analysis_Hist(), Cmd::ANA, 2, "hist", "histogram" ); @@ -396,7 +396,7 @@ void Command::Init() { Command::AddCmd( new Analysis_Modes(), Cmd::ANA, 1, "modes" ); Command::AddCmd( new Analysis_Multicurve(), Cmd::ANA, 1, "multicurve" ); Command::AddCmd( new Analysis_MultiHist(), Cmd::ANA, 1, "multihist" ); - Command::AddCmd( new Analysis_Overlap(), Cmd::ANA, 1, "overlap" ); // HIDDEN + Command::AddCmd( new Analysis_Overlap(), Cmd::ANA, 1, "overlap" ); // hidden Command::AddCmd( new Analysis_PhiPsi(), Cmd::ANA, 1, "phipsi" ); Command::AddCmd( new Analysis_Regression(), Cmd::ANA, 1, "regress" ); Command::AddCmd( new Analysis_RemLog(), Cmd::ANA, 1, "remlog" ); @@ -498,7 +498,7 @@ Cmd const& Command::SearchToken(ArgList& argIn) { return EMPTY_; } -/** 0 are hidden categories (i.e. should not appear in help). */ +/** \return Text corresponding to given category. */ static const char* ObjKeyword(DispatchObject::Otype typeIn) { switch (typeIn) { case DispatchObject::NONE: return 0; @@ -510,22 +510,21 @@ static const char* ObjKeyword(DispatchObject::Otype typeIn) { case DispatchObject::GENERAL: return "General"; case DispatchObject::SYSTEM: return "System"; case DispatchObject::CONTROL: return "Control"; - case DispatchObject::HIDDEN: return 0; - case DispatchObject::DEPRECATED: return 0; + case DispatchObject::DEPRECATED: return "Deprecated"; } return 0; } /** First list the command category, then the commands for that category - * in alphabetical order. Should not be called with NONE, HIDDEN, or - * DEPRECATED. + * in alphabetical order. Should not be called with NONE. */ void Command::ListCommandsForType(DispatchObject::Otype typeIn) { + if (typeIn == DispatchObject::NONE) return; std::vector< std::string > command_keys; mprintf("%s Commands:\n", ObjKeyword(typeIn)); for (CmdList::const_iterator cmd = commands_.begin(); cmd != commands_.end(); ++cmd) { - if (cmd->Obj().Type() == typeIn) + if (cmd->Obj().Type() == typeIn && !cmd->Obj().Hidden()) for (Cmd::key_iterator key = cmd->keysBegin(); key != cmd->keysEnd(); ++key) command_keys.push_back( *key ); } @@ -549,7 +548,7 @@ void Command::ListCommandsForType(DispatchObject::Otype typeIn) { */ void Command::ListCommands(DispatchObject::Otype typeIn) { if (typeIn == DispatchObject::NONE) { - for (int idx = 1; idx != DispatchObject::HIDDEN; idx++) + for (int idx = 1; idx != DispatchObject::DEPRECATED; idx++) ListCommandsForType( (DispatchObject::Otype)idx ); } else ListCommandsForType( typeIn ); diff --git a/src/DispatchObject.h b/src/DispatchObject.h index d8dae83d37..4643da3b40 100644 --- a/src/DispatchObject.h +++ b/src/DispatchObject.h @@ -8,14 +8,13 @@ class ArgList; class DispatchObject { public: - /// Object categories. HIDDEN and DEPRECATED should always be last. - enum Otype { NONE=0, GENERAL, SYSTEM, COORDS, TRAJ, PARM, ACTION, ANALYSIS, - CONTROL, - HIDDEN, DEPRECATED }; + /// Object categories. DEPRECATED should always be last. + enum Otype { NONE=0, GENERAL, SYSTEM, COORDS, TRAJ, PARM, + ACTION, ANALYSIS, CONTROL, DEPRECATED }; /// CONSTRUCTOR - DispatchObject() : type_(NONE) {} + DispatchObject() : type_(NONE), hidden_(false) {} /// CONSTRUCTOR - take object type - DispatchObject(Otype o) : type_(o) {} + DispatchObject(Otype o) : type_(o), hidden_(false) {} /// DESTRUCTOR - virtual since this will be inherited virtual ~DispatchObject() {} /// Print help for this object to screen. @@ -26,7 +25,12 @@ class DispatchObject { virtual DispatchObject* Alloc() const = 0; /// \return Object category Otype Type() const { return type_; } + /// \return True if object should be hidden. + bool Hidden() const { return hidden_; } + /// Set object hidden status. + void SetHidden(bool h) { hidden_ = h; } private: - Otype type_; ///< The object type. + Otype type_; ///< The object type. + bool hidden_; ///< True if object should be hidden, i.e. should not show up in 'help'. }; #endif diff --git a/src/Exec_Analyze.h b/src/Exec_Analyze.h index c00630f44f..0331b63e97 100644 --- a/src/Exec_Analyze.h +++ b/src/Exec_Analyze.h @@ -4,7 +4,7 @@ /// Add an analysis command to the analysis queue. For backwards compat. class Exec_Analyze : public Exec { public: - Exec_Analyze() : Exec(HIDDEN) {} + Exec_Analyze() : Exec(GENERAL) { SetHidden(true); } void Help() const; DispatchObject* Alloc() const { return (DispatchObject*)new Exec_Analyze(); } RetType Execute(CpptrajState&, ArgList&); diff --git a/src/Exec_ClusterMap.cpp b/src/Exec_ClusterMap.cpp index c48713218b..2ffcdcac0c 100644 --- a/src/Exec_ClusterMap.cpp +++ b/src/Exec_ClusterMap.cpp @@ -3,7 +3,10 @@ #include "ClusterMap.h" #include "DataSet_MatrixFlt.h" -Exec_ClusterMap::Exec_ClusterMap() : Exec(HIDDEN) {} +Exec_ClusterMap::Exec_ClusterMap() : Exec(GENERAL) +{ + SetHidden(true); +} void Exec_ClusterMap::Help() const { mprintf("\t<2D set> [minpoints <#>] [epsilon ] [name ]\n" diff --git a/src/Exec_Commands.h b/src/Exec_Commands.h index 4641b9d4b2..849acb6bd7 100644 --- a/src/Exec_Commands.h +++ b/src/Exec_Commands.h @@ -44,7 +44,7 @@ class Exec_QuietBlocks : public Exec { /// Tell CpptrajState to run parallel ensemble even with 1 thread/member class Exec_ForceParaEnsemble : public Exec { public: - Exec_ForceParaEnsemble() : Exec(HIDDEN) {} + Exec_ForceParaEnsemble() : Exec(GENERAL) { SetHidden(true); } void Help() const; DispatchObject* Alloc() const { return (DispatchObject*)new Exec_ForceParaEnsemble(); } RetType Execute(CpptrajState&, ArgList&); diff --git a/src/Exec_Emin.h b/src/Exec_Emin.h index dc06c7595b..297ff2dced 100644 --- a/src/Exec_Emin.h +++ b/src/Exec_Emin.h @@ -4,7 +4,7 @@ /// class Exec_Emin : public Exec { public: - Exec_Emin() : Exec(HIDDEN) {} + Exec_Emin() : Exec(COORDS) { SetHidden(true); } void Help() const; DispatchObject* Alloc() const { return (DispatchObject*)new Exec_Emin(); } RetType Execute(CpptrajState&, ArgList&); diff --git a/src/Exec_PrepareForLeap.h b/src/Exec_PrepareForLeap.h index 1aa39cbb70..21861074f3 100644 --- a/src/Exec_PrepareForLeap.h +++ b/src/Exec_PrepareForLeap.h @@ -4,7 +4,7 @@ /// Do common tasks to prepare a structure to be loaded into tleap class Exec_PrepareForLeap : public Exec { public: - Exec_PrepareForLeap() : Exec(HIDDEN) {} + Exec_PrepareForLeap() : Exec(COORDS) { SetHidden(true); } void Help() const; DispatchObject* Alloc() const { return (DispatchObject*)new Exec_PrepareForLeap(); } RetType Execute(CpptrajState&, ArgList&); diff --git a/src/Exec_SequenceAlign.h b/src/Exec_SequenceAlign.h index 1a2dc5cba0..f23f43cae1 100644 --- a/src/Exec_SequenceAlign.h +++ b/src/Exec_SequenceAlign.h @@ -4,7 +4,7 @@ // EXPERIMENTAL ALPHA CODE class Exec_SequenceAlign : public Exec { public: - Exec_SequenceAlign() : Exec(HIDDEN) {} + Exec_SequenceAlign() : Exec(GENERAL) { SetHidden(true); } void Help() const; DispatchObject* Alloc() const { return (DispatchObject*)new Exec_SequenceAlign(); } RetType Execute(CpptrajState&, ArgList&); diff --git a/src/Exec_ViewRst.h b/src/Exec_ViewRst.h index c3a3aaed31..b62d541275 100644 --- a/src/Exec_ViewRst.h +++ b/src/Exec_ViewRst.h @@ -5,7 +5,7 @@ /// View Amber restraints class Exec_ViewRst : public Exec { public: - Exec_ViewRst() : Exec(HIDDEN) {} + Exec_ViewRst() : Exec(GENERAL) { SetHidden(true); } void Help() const; DispatchObject* Alloc() const { return (DispatchObject*)new Exec_ViewRst(); } RetType Execute(CpptrajState&, ArgList&);