AnalysisDataPlotModulePointer plotm(
new AnalysisDataPlotModule(settings.plotSettings()));
plotm->setFileName(fnAtomArea_);
- plotm->setTitle("Area per residue over the trajectory");
+ plotm->setTitle("Area per atom over the trajectory");
plotm->setXLabel("Atom");
plotm->setXFormat(8, 0);
plotm->setYLabel("Area (nm\\S2\\N)");
}
{
AnalysisDataAverageModulePointer avem(new AnalysisDataAverageModule);
+ int prevResind = -1;
+ int row = 0;
for (int i = 0; i < surfaceSel_.posCount(); ++i)
{
const int atomIndex = surfaceSel_.position(i).atomIndices()[0];
const int residueIndex = atoms.atom[atomIndex].resind;
- avem->setXAxisValue(i, atoms.resinfo[residueIndex].nr);
+ if (residueIndex != prevResind)
+ {
+ avem->setXAxisValue(row, atoms.resinfo[residueIndex].nr);
+ prevResind = residueIndex;
+ ++row;
+ }
}
residueArea_.addModule(avem);
if (!fnResidueArea_.empty())
AnalysisDataPlotModulePointer plotm(
new AnalysisDataPlotModule(settings.plotSettings()));
plotm->setFileName(fnResidueArea_);
- plotm->setTitle("Area per atom over the trajectory");
+ plotm->setTitle("Area per residue over the trajectory");
plotm->setXLabel("Residue");
plotm->setXFormat(8, 0);
plotm->setYLabel("Area (nm\\S2\\N)");