You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TEST_F(IndigoCoreFormatsTest,mol_saver_issue)
{
Molecule t_mol;
loadMolecule(R"( -INDIGO-07262316452D 6 6 0 0 0 0 0 0 0 0999 V2000 -1.4617 -0.6508 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0 0.0000 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 1.3856 -0.8000 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0 2.5747 0.2706 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0 1.9239 1.7323 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 0.3327 1.5650 0.0000 N 0 0 0 0 0 0 0 0 0 0 0 0 1 2 2 0 0 0 0 2 3 4 0 0 0 0 3 4 4 0 0 0 0 4 5 4 0 0 0 0 5 6 4 0 0 0 0 6 2 4 0 0 0 0M STY 4 1 DAT 2 DAT 3 DAT 4 DATM SLB 4 1 1 2 2 3 3 4 4M SAL 1 1 3M SDT 1 MRV_IMPLICIT_H M SDD 1 0.0000 0.0000 DA ALL 1 1 M SED 1 IMPL_H1M SAL 2 1 4M SDT 2 MRV_IMPLICIT_H M SDD 2 0.0000 0.0000 DA ALL 1 1 M SED 2 IMPL_H1M SAL 3 1 3M SDT 3 MRV_IMPLICIT_H M SDD 3 0.0000 0.0000 DA ALL 1 1 M SED 3 IMPL_H1M SAL 4 1 4M SDT 4 MRV_IMPLICIT_H M SDD 4 0.0000 0.0000 DA ALL 1 1 M SED 4 IMPL_H1M END)", t_mol);
ASSERT_EQ(t_mol.sgroups.getSGroupCount(), 0);
Array<char> out;
ArrayOutput std_out(out);
MolfileSaver saver(std_out);
ASSERT_EQ(t_mol.sgroups.getSGroupCount(), 0);
saver.saveMolecule(t_mol);
ASSERT_EQ(t_mol.sgroups.getSGroupCount(), 2);
saver.saveMolecule(t_mol);
ASSERT_EQ(t_mol.sgroups.getSGroupCount(), 4);
saver.saveMolecule(t_mol);
ASSERT_EQ(t_mol.sgroups.getSGroupCount(), 6);
}
This test passed which is wrong - Sgroup count should not increase after saveMolecule() and should keep value 0.
This is result of MolfileSaver option add_implicit_h incorect processing in saveMolecule().
bool add_implicit_h; // If true then MRV_IMPLICIT_H Data S-groups will be added for saving// the number of implicit H for aromatic atoms// (if it is required for correct de-aromatization) (default value is true)
Instead of adding Sgroups to molecule temporary MoleculeSGroups variable should be used.
The text was updated successfully, but these errors were encountered:
Create next UT in indigo-core-unit-tests:
This test passed which is wrong - Sgroup count should not increase after saveMolecule() and should keep value 0.
This is result of MolfileSaver option add_implicit_h incorect processing in saveMolecule().
Instead of adding Sgroups to molecule temporary MoleculeSGroups variable should be used.
The text was updated successfully, but these errors were encountered: