Convert implicit hydrogens to explicit in tetrahedral elements.

Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
Minor cleanup and comments on removeHydrogens().

Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
Use org/cpy to refer to the two structures.

Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
Remove hydrogens in stereoelements.

Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
Rather than blindly remove hydrogens we now only remove hydrogens we can accurately represent as implicit. Previously with molecular hydrogen an empty structure was returned - molecular hydrogen is now preserved. This makes more sense as we can then convert to/from explicit hydrogen without losing atoms - an empty structure definitely doesn’t represent molecular hydrogen and so ‘add explicit hydrogens’ would not put back in the correct number of atoms.

Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
Updating other hydrogen removal methods to check if the hydrogen can actually be implicit. Also the removeNonChiralHydrogens now also checks double-bond stereo chemistry.

Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
Store stereo-elements in a set.

Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
When adding two containers - also add stereo elements.

Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
Friendlier atom cloning - still throws the exception but at least the cast can be removed.

Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
Friendlier bond cloning.

Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
Don’t clear the stereo elements - cloning messing things up here but is fixed now.

Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
Objects atoms when adjusting clone methods.

Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
required dependency

Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
Stereo elements are now in a set - swap if they are out of order.

Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
Hydrogen removal now correctly persists stereo chemistry.

Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
no longer need the timeout - default threshold is good enough.

Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
Not sure if this is correct - but there nether was a clone method for QueryAtom but builder3d tests complain otherwise. I ‘think’ is okay but don’t quote me on that.

Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
Fixing atom cloning.

Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>