Skip to content

Ignore blank lines in mol2 #1263

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

Merged
merged 1 commit into from
Aug 11, 2022
Merged

Ignore blank lines in mol2 #1263

merged 1 commit into from
Aug 11, 2022

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