X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?a=blobdiff_plain;f=src%2Fgromacs%2Ftrajectoryanalysis%2Fmodules%2Fsasa.cpp;h=edff30830f3311f17a373206b4b51f39ceddcca0;hb=5750bfe806310856448a1e7baf46a7d648d1185e;hp=964910206941b4c7c53edf3f6c456aafd86455d5;hpb=3dadfbb969e79953a942885fb931908a36fcaf08;p=alexxy%2Fgromacs.git diff --git a/src/gromacs/trajectoryanalysis/modules/sasa.cpp b/src/gromacs/trajectoryanalysis/modules/sasa.cpp index 9649102069..edff30830f 100644 --- a/src/gromacs/trajectoryanalysis/modules/sasa.cpp +++ b/src/gromacs/trajectoryanalysis/modules/sasa.cpp @@ -655,7 +655,7 @@ Sasa::initAnalysis(const TrajectoryAnalysisSettings &settings, 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)"); @@ -667,11 +667,18 @@ Sasa::initAnalysis(const TrajectoryAnalysisSettings &settings, } { 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()) @@ -679,7 +686,7 @@ Sasa::initAnalysis(const TrajectoryAnalysisSettings &settings, 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)");