Skip to content

Commit a18feed

Browse files
ijpulidosatravitz
authored andcommitted
Removing unnecessary limit on resids (#1539)
* Removing unnecessary limit on resids indices gathering
1 parent 500e215 commit a18feed

File tree

2 files changed

+26
-6
lines changed

2 files changed

+26
-6
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
**Added:**
2+
3+
* <news item>
4+
5+
**Changed:**
6+
7+
* Remove unnecessary limit on residues ids (``resids``) when getting mappings from topology in ``topology_helpers.py`` utility module.
8+
9+
**Deprecated:**
10+
11+
* <news item>
12+
13+
**Removed:**
14+
15+
* <news item>
16+
17+
**Fixed:**
18+
19+
* <news item>
20+
21+
**Security:**
22+
23+
* <news item>

openfe/protocols/openmm_rfe/_rfe_utils/topologyhelpers.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -387,13 +387,10 @@ def _get_indices(topology, resids):
387387
----------
388388
topology : openmm.app.Topology
389389
Topology to search from.
390-
residue_name : str
391-
Name of the residue to get the indices for.
390+
resids : npt.NDArrayLike
391+
An array of residue indices which match the residues we want to get
392+
atom indices for.
392393
"""
393-
# TODO: remove, this shouldn't be necessary anymore
394-
if len(resids) > 1:
395-
raise ValueError("multiple residues were found")
396-
397394
# create list of openmm residues
398395
top_res = [r for r in topology.residues() if r.index in resids]
399396

0 commit comments

Comments
 (0)