Skip to content

Conversation

@adw62
Copy link
Contributor

@adw62 adw62 commented Aug 2, 2022

Some programs such as MDAnalysis with generate mol2 files with blank lines between the ATOM BOND and SUBSTRUCTURE sections.

Loading these with parmed.load_file results in IndexError: list index out of range. See example file: l_H22.txt

I think the blank lines are in spec and there has been some discussions here: MDAnalysis/mdanalysis#3747

This PR adds a small change to mol2 parser that continues on blank lines and this allows the file to be loaded. Please let me know if there is a better solution or I can do something different.

Cheers,
Alex

@adw62 adw62 changed the title ignore blank likes in mol2 Ignore blank lines in mol2 Aug 2, 2022
@swails swails merged commit c11babc into ParmEd:master Aug 11, 2022
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

Successfully merging this pull request may close these issues.

2 participants