Beispiel #1
0
int
AnalysisTemplate::initAnalysis(const TopologyInformation & /*top*/)
{
    _data.setColumns(_sel.size());
    registerAnalysisDataset(&_data, "avedist");

    _avem = new AnalysisDataAverageModule();
    _data.addModule(_avem);

    if (!_fnDist.empty())
    {
        AnalysisDataPlotModule *plotm = new AnalysisDataPlotModule(_options);
        plotm->setFileName(_fnDist);
        plotm->setTitle("Average distance");
        plotm->setXLabel("Time (ps)");
        plotm->setYLabel("Distance (nm)");
        _data.addModule(plotm);
    }
    return 0;
}
Beispiel #2
0
void
AnalysisTemplate::initAnalysis(const TrajectoryAnalysisSettings &settings,
                               const TopologyInformation         & /*top*/)
{
    nb_.setCutoff(cutoff_);

    data_.setColumnCount(0, sel_.size());

    avem_.reset(new AnalysisDataAverageModule());
    data_.addModule(avem_);

    if (!fnDist_.empty())
    {
        AnalysisDataPlotModulePointer plotm(
                new AnalysisDataPlotModule(settings.plotSettings()));
        plotm->setFileName(fnDist_);
        plotm->setTitle("Average distance");
        plotm->setXAxisIsTime();
        plotm->setYLabel("Distance (nm)");
        data_.addModule(plotm);
    }
}