Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Bugfix/#2045 Export of unresolved monomer to everything except KET and IDT should cause specific error message (but it doesn't) #2806
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
base: master
Are you sure you want to change the base?
Bugfix/#2045 Export of unresolved monomer to everything except KET and IDT should cause specific error message (but it doesn't) #2806
Changes from all commits
6f54586
eb37624
1072a52
d744462
70c94e3
18dcaee
4527c8e
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This message looks wrong.
Looks like no exception thrown.
Could you please rewrite these tests like
just to be sure that exception thrown
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The exception is thrown in
void IndigoSmilesSaver::generateSmarts(IndigoObject& obj, Array<char>& out_buffer)
in indigo_severs.cpp.In this case, do I still need to write code in the way you suggest?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. Beacuse after
indigoLoadMoleculeFromFile
molecule not a KetDocument - but error message contains this type wich is strange.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've checked. Yes, it is not throwing an exception.
In
void IndigoSmilesSaver::generateSmarts(IndigoObject& obj, Array<char>& out_buffer)
inThe first one called is
void MolfileSaver::saveMolecule(Molecule& mol)
==>void MolfileSaver::saveMolecule(Molecule& mol)
==>void MolfileSaver::_validate(BaseMolecule& bmol)
The second one called is
void SmilesSaver::saveQueryMolecule(QueryMolecule& mol)
==>void SmilesSaver::_saveMolecule()
==>void SmilesSaver::_validate(BaseMolecule& bmol)
At the end of those calls
bool BaseMolecule::getUnresolvedTemplatesList(BaseMolecule& bmol, std::string& unresolved)
is calledThe first and the second ones have different behavior:
Could you tell, please, which behavior is expected and which one is not?
Maybe you have any other suggestions to fix the bug due to my lack of understanding of how the things are working.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove
if (!bmol.isQueryMolecule())
- looks like this is something from first versions without query molecules support.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getUnresolvedTemplatesList
should return correct list of unresolved templates.If it return wrong list - thois is a bug.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to
getUnresolvedTemplatesList
code it could return empty list if uresolved has no alias.Pleas add
hasUnresolvedTemplates
wich will return true if at least one unresolved template exists.And use it instead of
getUnresolvedTemplatesList