From 8abfe961aff91c7a96a2d1623cd2c589a31ead5b Mon Sep 17 00:00:00 2001 From: "njzjz-bot (driven by OpenClaw (model: custom-chat-jinzhezeng-group/gpt-5.5))[bot]" <48687836+njzjz-bot@users.noreply.github.com> Date: Sun, 14 Jun 2026 19:24:31 +0000 Subject: [PATCH] test(pt): document se_e3_tebd gr output The se_e3_tebd descriptor contracts three-body angular information into a rotationally invariant descriptor, so it does not expose a separate equivariant gr representation. Make the test assert this behavior explicitly and update the return-value docs. Authored by OpenClaw (model: custom-chat-jinzhezeng-group/gpt-5.5) --- deepmd/dpmodel/descriptor/se_t_tebd.py | 5 +++-- source/tests/pt_expt/descriptor/test_se_t_tebd.py | 15 +++++---------- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/deepmd/dpmodel/descriptor/se_t_tebd.py b/deepmd/dpmodel/descriptor/se_t_tebd.py index 3c972ba29c..cb174896cb 100644 --- a/deepmd/dpmodel/descriptor/se_t_tebd.py +++ b/deepmd/dpmodel/descriptor/se_t_tebd.py @@ -379,8 +379,9 @@ def call( descriptor The descriptor. shape: nf x nloc x (ng x axis_neuron) gr - The rotationally equivariant and permutationally invariant single particle - representation. shape: nf x nloc x ng x 3 + This descriptor returns None. se_e3_tebd contracts the three-body + angular information into a rotationally invariant descriptor and does + not expose a separate equivariant single-particle representation. g2 The rotationally invariant pair-partical representation. this descriptor returns None diff --git a/source/tests/pt_expt/descriptor/test_se_t_tebd.py b/source/tests/pt_expt/descriptor/test_se_t_tebd.py index 41643b41ef..dded75b8d5 100644 --- a/source/tests/pt_expt/descriptor/test_se_t_tebd.py +++ b/source/tests/pt_expt/descriptor/test_se_t_tebd.py @@ -91,8 +91,11 @@ def test_consistency(self, prec) -> None: self.atype_ext, self.nlist, ) - # se_t_tebd should return gr and sw, compare only descriptor and sw for now - # TODO: investigate why gr is None + # se_t_tebd contracts three-body angular information into a rotationally + # invariant descriptor, so it does not expose a separate equivariant + # single-particle representation (gr). Compare descriptor and sw here. + assert gr1 is None + assert gr2 is None np.testing.assert_allclose( rd1.detach().cpu().numpy(), rd2, @@ -100,14 +103,6 @@ def test_consistency(self, prec) -> None: atol=atol, err_msg=err_msg, ) - if gr1 is not None and gr2 is not None: - np.testing.assert_allclose( - gr1.detach().cpu().numpy(), - gr2, - rtol=rtol, - atol=atol, - err_msg=err_msg, - ) np.testing.assert_allclose( sw1.detach().cpu().numpy(), sw2,