From c5dd730856e0d506a8ca03ec985d9addcbc6589c Mon Sep 17 00:00:00 2001
From: Xavier Robin <xavier.robin@unibas.ch>
Date: Tue, 19 Sep 2023 11:33:02 +0200
Subject: [PATCH] test: fix invalid entity view.

Not sure why this doesn't cause an error here, but the code is invalid.
---
 modules/mol/alg/tests/test_ligand_scoring.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/modules/mol/alg/tests/test_ligand_scoring.py b/modules/mol/alg/tests/test_ligand_scoring.py
index 3896aa2fd..65249c2b5 100644
--- a/modules/mol/alg/tests/test_ligand_scoring.py
+++ b/modules/mol/alg/tests/test_ligand_scoring.py
@@ -196,8 +196,10 @@ class TestLigandScoring(unittest.TestCase):
         # Test that it works with views and only consider atoms in the view
         # Skip PA, PB and O[1-3]A and O[1-3]B in target and model
         # We assume atom index are fixed and won't change
-        trg_g3d1_sub = trg_g3d1.Select("aindex>6019").residues[0]
-        mdl_g3d_sub = mdl_g3d.Select("aindex>1447").residues[0]
+        trg_g3d1_sub_ent = trg_g3d1.Select("aindex>6019")
+        trg_g3d1_sub = trg_g3d1_sub_ent.residues[0]
+        mdl_g3d_sub_ent = mdl_g3d.Select("aindex>1447")
+        mdl_g3d_sub = mdl_g3d_sub_ent.residues[0]
 
         sym = ligand_scoring._ComputeSymmetries(mdl_g3d_sub, trg_g3d1_sub)
         assert len(sym) == 6
-- 
GitLab