Skip to content

Commit

Permalink
#1460 ImplicitH set to zero casue error loading query molecule from ket
Browse files Browse the repository at this point in the history
Fix bug. Add UT.
  • Loading branch information
AliaksandrDziarkach committed Dec 26, 2023
1 parent fd3fa7d commit 0ebaab1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
3.866025447845459,
-3.549999952316284,
0.0
]
],
"implicitHCount": 0
},
{
"label": "C",
Expand Down
2 changes: 1 addition & 1 deletion core/indigo-core/molecule/src/molecule_json_loader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ void MoleculeJsonLoader::parseAtoms(const rapidjson::Value& atoms, BaseMolecule&
else
{
int count = a["implicitHCount"].GetInt();
if (count < 1)
if (count < 0)
throw Error("Wrong value for implicitHCount: %d", count);
_pqmol->resetAtom(atom_idx,
QueryMolecule::Atom::und(_pqmol->releaseAtom(atom_idx), new QueryMolecule::Atom(QueryMolecule::ATOM_IMPLICIT_H, count)));
Expand Down

0 comments on commit 0ebaab1

Please sign in to comment.