Skip to content

Commit 96d2f70

Browse files
andyclaude
andcommitted
Builder trace stress: gttitle checks the plotted series; the panel opens on Total Energy
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BTQ7mniRtDdhU7VF9tEVBD
1 parent a783788 commit 96d2f70

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

‎src/apps/builder/BuilderTraceStress.C‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,18 @@ bool Builder::traceStressCommand(SceneScript& s, const vector<string>& w)
217217
return true;
218218
}
219219

220+
// "gttitle <text>": the plot's title contains <text> (the series shown).
221+
if (c == "gttitle" && w.size() >= 2) {
222+
ewxPlotCtrl *plot = plotOf(gt);
223+
string want = w[1];
224+
for (size_t i = 2; i < w.size(); i++) want += " " + w[i];
225+
if (!plot) return s.fail("gttitle: no plot");
226+
string title = string(plot->GetPlotTitle().ToUTF8());
227+
if (title.find(want) == string::npos)
228+
return s.fail("gttitle: plot shows '" + title + "', want '" + want + "'");
229+
return true;
230+
}
231+
220232
// "gtpick <step|mid|last>": click the plot where that step's point is
221233
// drawn (zero-based; mid and last of the plotted points), as a user does; the molecule on screen must then be the
222234
// one the trace holds for that step.

‎tests/apps/geomtrace_stress.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ def script(calcs):
124124
"""The scene script: calcs is [(url, steps)], the first one opened."""
125125
(a, na), (b, nb), (c, nc) = calcs
126126
return "\n".join([
127-
"gtfocus", "gtsweep", "gtexpect %d" % na,
127+
"gtfocus", "gttitle Total Energy", "gtsweep", "gtexpect %d" % na,
128128
# clicking a point of the plot shows that step's geometry
129129
"gtpick 0", "gtpick mid", "gtpick last",
130130
"gtplay 300 1", "gtsweep", "gtstop",

0 commit comments

Comments
 (0)