Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in MolToMdaComponent #1

Open
anabiman opened this issue Feb 16, 2021 · 0 comments
Open

Bug in MolToMdaComponent #1

anabiman opened this issue Feb 16, 2021 · 0 comments

Comments

@anabiman
Copy link
Collaborator

anabiman commented Feb 16, 2021

Description

Converting MMElemental.Molecule to MdaMol yields an incorrect list of residues in MDAnalysis.Universe. The resindices list looks fishy.

Code snippet

mda_mol =  schema_mol.to_data("MDAnalysis")
uni = mda_mol.data
print(uni.atoms.resindices)
print(uni.atoms.residues)

Output

array([1314, 1314, 1314, ...,    3,    3,    3])
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/levnon/miniconda3/lib/python3.8/site-packages/MDAnalysis/core/groups.py", line 2321, in residues
    rg = self.universe.residues[unique_int_1d(self.resindices)]
  File "/home/levnon/miniconda3/lib/python3.8/site-packages/MDAnalysis/core/groups.py", line 549, in __getitem__
    return self._derived_class(self.ix[item], self.universe)
IndexError: index 1314 is out of bounds for axis 0 with size 329

Additional info

MDAnalysis.version = 1.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant