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

bug in MDLParser.cpp when reading a rxn file in v3000 format that contains agents #4183

Closed
jungb-basf opened this issue May 26, 2021 · 1 comment
Assignees
Labels
Milestone

Comments

@jungb-basf
Copy link
Contributor

Error reading rxn files in V3000 format that contains agents

if a rxn file contains agents the function ParseV3000RxnBlock stops with the error message "BEGIN AGENT line not found",

see line 271:

if (tempStr.length()< 14 || tempStr.substr(0, 14) != "BEGIN AGENT") {
throw FileParseException("BEGIN AGENT line not found");
}

the string length should be compared with 11 instead of 14.

the same in line 298:

if (tempStr.length() < 12 || tempStr.substr(0, 12) != "END AGENT") {
throw FileParseException("END AGENT line not found");
}

please replace 12 by 9

Thanks
Brigitte

@jungb-basf jungb-basf added the bug label May 26, 2021
@bp-kelley bp-kelley self-assigned this May 26, 2021
@bp-kelley
Copy link
Contributor

Thanks good catch and diagnosis.

jungb-basf added a commit to jungb-basf/rdkit that referenced this issue Jun 11, 2021
jungb-basf added a commit to jungb-basf/rdkit that referenced this issue Jun 15, 2021
added testcase fixes rdkit#4183
@greglandrum greglandrum added this to the 2021_03_4 milestone Jun 17, 2021
greglandrum pushed a commit that referenced this issue Jul 9, 2021
* Update MDLParser.cpp

Fix length of expected strings "BEGIN AGENT" and "END AGENT"

* Add files via upload

* Delete v3k_with_agents.rxn

* fixes #4183

* Update testReaction.cpp

added testcase fixes #4183
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants