Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
ChiahsinChu committed Dec 29, 2024
1 parent a5b7bf9 commit cda4dca
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions package/MDAnalysis/core/groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -3255,14 +3255,14 @@ def select_atoms(self, sel, *othersel, periodic=True, rtol=1e-05,
coordinate greater than 5.0; ``prop abs z <= 5.0`` selects all
atoms within -5.0 <= z <= 5.0.
relprop [abs] *property* *operator* *value* *selection*
selects atoms based on position relative to the center of
geometry (COG) of a given selection, using *property*
**x**, **y**, or **z** coordinate. Supports the **abs**
keyword (for absolute value) and the following
selects atoms based on position relative to the center of
geometry (COG) of a given selection, using *property*
**x**, **y**, or **z** coordinate. Supports the **abs**
keyword (for absolute value) and the following
*operators*: **<, >, <=, >=, ==, !=**.
For example, ``relprop z >= 5.0 protein`` selects all atoms
with z coordinate greater than 5.0 relative to the COG
of protein; ``relprop abs z <= 5.0 protein`` selects all
For example, ``relprop z >= 5.0 protein`` selects all atoms
with z coordinate greater than 5.0 relative to the COG
of protein; ``relprop abs z <= 5.0 protein`` selects all
atoms within -5.0 <= z <= 5.0 relative to the COG of protein.
sphzone *radius* *selection*
Selects all atoms that are within *radius* of the center of
Expand Down
2 changes: 1 addition & 1 deletion testsuite/MDAnalysisTests/core/test_atomselections.py
Original file line number Diff line number Diff line change
Expand Up @@ -1092,7 +1092,7 @@ def test_invalid_relprop_selection(self, universe):
universe.select_atoms("relprop parsnip < 2 index 0")
with pytest.raises(SelectionError, match="Unknown selection token"):
universe.select_atoms("relprop z < 2")
with pytest.raises(SelectionError, match="Expected one of x y z for property"):
with pytest.raises(SelectionError, match="Expected one of"):
universe.select_atoms("relprop id < 2 index 0")
empty_universe = mda.Universe.empty(
6, 2, atom_resindex=[0, 0, 0, 1, 1, 1]
Expand Down

0 comments on commit cda4dca

Please sign in to comment.