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

Fix #537 - handle missing and empty Element column in PDB files #540

Merged
merged 3 commits into from
Jul 27, 2016

Conversation

lafita
Copy link
Member

@lafita lafita commented Jul 27, 2016

The element information is filled using the Chemical Component Dictionary information, as discussed in #537.

element = Element.valueOfIgnoreCase(line.substring (76, 78).trim());
} catch (IllegalArgumentException e){}
String elementSymbol = line.substring(76, 78).trim();
if (elementSymbol.equals("")) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor comment: better use isEmpty() here

@josemduarte
Copy link
Contributor

Nice stuff! I think we could try to cherry pick this one into the bugfix branch. I think it shouldn't conflict too much despite the parser was changed a lot in 5.0. I'd say let's try cherry picking and if it isn't easy to merge then we can drop it.

@lafita
Copy link
Member Author

lafita commented Jul 27, 2016

I made the changes

@josemduarte josemduarte merged commit 0694acc into biojava:master Jul 27, 2016
@josemduarte
Copy link
Contributor

Thanks!

@josemduarte
Copy link
Contributor

Alright I've tried cherry picking back to bugfixes-4.2 but it was complicated. Let's just keep this for the master branch

@lafita lafita deleted the fix537 branch September 28, 2016 10:55
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