Skip to content

chi1_selections fails for residues with CG1 #4108

@DanielJamesEvans

Description

@DanielJamesEvans

Expected behavior

I expect the single-residue chi1_selection and the multi-residue chi1_selections (notice the "s") to function identically for a given residue. Both should recognize CG1 as the fourth atom of the dihedral.

Actual behavior

The multi-residue chi1_selections returns None for residues with CG1. But the single-residue chi1_selection is correct, thanks to #3238.

Code to reproduce the behavior

import MDAnalysis as mda
from MDAnalysis.tests.datafiles import PSF, DCD
u = mda.Universe(PSF, DCD)

# This gives the correct result.
print(u.residues[38].chi1_selection())

# This incorrectly returns `None`.
print(u.residues[38:39].chi1_selections())

Current version of MDAnalysis

I'm using version MDAnalysis version 2.3.0. The bug is also present in the source code for 2.5.0-dev0.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions