Constructing empty universe and adding residue attributes gives error #4967
nambiarnik
started this conversation in
General
Replies: 4 comments 1 reply
|
Do you need to build a Universe with empty? Couldn't you create an AtomGroup ag = u.select_atoms(...)
new_u = mda.Merge(ag)
new_u.atoms.write("new.gro") |
0 replies
|
@nambiarnik did using If you think that there's a bug in |
0 replies
|
@orbeckst Merge() did work for my use case. I am not sure about Universe.empty() |
1 reply
|
Ok, thanks for the feedback. I'll convert the issue to a discussion. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Expected behavior
When I try to read a .gro file and create a new environment out of the data, It throws out errors whenever I use add_TopologyAttr function to specify residues or resids. I want to be able to use this data from .gro file to then write a duplicate .gro file, which will give me the opportunity to modify and add residues.
Actual behavior
After assigning resid or resname attributes of the new environment, throws out an index error whenever I try to call the residues or resids atomgroup of the new environment.
IndexError: index 400 is out of bounds for axis 0 with size 400index 400 is out of bounds for axis 0 with size 400
Code to reproduce the behavior
Current version of MDAnalysis
python -V)? 3.11All reactions