-
Notifications
You must be signed in to change notification settings - Fork 823
Closed
Labels
Description
Expected behavior
ag.unwrap should make the group's fragments whole. It does in version 1.1.1.
Actual behavior
In 2.0.0-dev0 an exception sometimes is raised that the group is not contiguous from bonds.
Code to reproduce the behavior
This was first reported by @hejamu in Discord. He has provided me with a LAMMPS example structure for which this occurs, but I have since been able to reproduce the error with 1hvr.pdb, which is already in the tests (with the CONECT datafile reference).
import MDAnalysis as mda
from MDAnalysis.tests.datafiles import CONECT
u = mda.Universe(CONECT)
u.atoms.unwrap()
## ValueError: AtomGroup was not contiguous from bonds, process failedCurrent version of MDAnalysis
2.0.0-dev0
Cause
A first inspection seems to indicate that unwrap is selecting the wrong set of atoms as a fragment to unwrap (in the 1hvr example only parts of the molecule have CONECT records). This is maybe related to the changes introduced in #3005, which touched this aspect of the code.
Reactions are currently unavailable