Skip to content

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

Merged
josemduarte merged 3 commits into
biojava:masterfrom
lafita:fix537
Jul 27, 2016
Merged

josemduarte merged 3 commits into
biojava:masterfrom
lafita:fix537

Conversation

@lafita

@lafita lafita commented Jul 27, 2016

Copy link
Copy Markdown
Member

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
Copy Markdown
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
Copy Markdown
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

lafita commented Jul 27, 2016

Copy link
Copy Markdown
Member Author

I made the changes

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

Copy link
Copy Markdown
Contributor

Thanks!

@josemduarte

Copy link
Copy Markdown
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