exa-analytics / exatomic

A unified platform for theoretical and computational chemists
https://exa-analytics.github.io/exatomic
Apache License 2.0
19 stars 12 forks source link

ADF Atom parser #165

Closed herbertludowieg closed 5 years ago

herbertludowieg commented 5 years ago

Describe the bug When parsing the atom tables it parses the fragments instead of the actual molecular coordinates. Changing the line

start = stop = found[0] + 2

to

start = stop = found[-1] + 2

parses the last fragment, which should correspond to the input geometry. However, there is no guarantee that the indexes on the table correspond to the actual indexes in the input coordinates.

To Reproduce Can use this file Frags_NiCO4.txt

from exatomic import adf

ed = adf.Output('Frags_NiCO4.txt')
ed.parse_atom()
ed.atom

With the original code this will give the first fragment calculation which is for CO.

By changing the code to what I outlined above there also comes the issue with the symbols, as will be shown in the screenshots, which then leads to issues with the Z column.

Expected behavior Parses the right coordinates and the indexes are guaranteed to be correct.

Screenshots This is the original behavior where the molecule is Ni(CO)4 atom_parser_issue_original This is the behavior when making the simple patch solution as outlined above atom_parser_issue_simple_patch

Desktop (please complete the following information):

Additional context This is related to what needs to be done for issue #159