Should Avogadro adjust hydrogens if new bond is drawn between existing atoms?
–
Regards,
Konstantin
Should Avogadro adjust hydrogens if new bond is drawn between existing atoms?
–
Regards,
Konstantin
Should Avogadro adjust hydrogens if new bond is drawn between existing atoms?
Of course.
If you want to add some sort of modifier (e.g., “shift-key drag = no adjust hydrogens”) that’s fine. But the current behavior is desired by most of the users I’ve tested. It’s why the “adjust hydrogens” is an option and easy to change.
-Geoff
05.11.2010, 17:38, “Geoffrey Hutchison” geoff.hutchison@gmail.com:
Should Avogadro adjust hydrogens if new bond is drawn between existing atoms?
Of course.
If you want to add some sort of modifier (e.g., “shift-key drag = no adjust hydrogens”) that’s fine. But the current behavior is desired by most of the users I’ve tested. It’s why the “adjust hydrogens” is an option and easy to change.
No, I just want to fix
https://sourceforge.net/tracker/?func=detail&aid=3091185&group_id=165310&atid=835077
I’ve already found solutions for similar cases when adjustment was done for H atoms, but
this case is different. When bond is drawn, all bonds are re-created, and after undo pointer to
bond which was actually drawn becomes invalid
–
Regards,
Konstantin
On Nov 5, 2010, at 10:51 AM, Konstantin Tokarev wrote:
I’ve already found solutions for similar cases when adjustment was done for H atoms, but
this case is different. When bond is drawn, all bonds are re-created, and after undo pointer to
bond which was actually drawn becomes invalid
That’s weird. There’s supposed to be a special case in the draw tool to detect a bond drawn to a hydrogen atom – for this use case.
I’d make sure the drawtool.cpp code is working right. It should realize that one or both atoms are hydrogen and not adjust the valence.
Thanks,
-Geoff
06.11.2010, 05:18, “Geoffrey Hutchison” :
On Nov 5, 2010, at 10:51 AM, Konstantin Tokarev wrote:
I’ve already found solutions for similar cases when adjustment was done for H atoms, but
this case is different. When bond is drawn, all bonds are re-created, and after undo pointer to
bond which was actually drawn becomes invalidThat’s weird. There’s supposed to be a special case in the draw tool to detect a bond drawn to a hydrogen atom – for this use case.
Right, there is a special case for drawing from H atom. However, it also crashes if bond is drawn from H to O
–
Regards,
Konstantin
On Nov 8, 2010, at 9:17 AM, Konstantin Tokarev wrote:
Right, there is a special case for drawing from H atom. However, it also crashes if bond is drawn from H to O
So that should be an easy patch, right?
Cheers,
-Geoff
09.11.2010, 04:26, “Geoffrey Hutchison” geoff.hutchison@gmail.com:
On Nov 8, 2010, at 9:17 AM, Konstantin Tokarev wrote:
Right, there is a special case for drawing from H atom. However, it also crashes if bond is drawn from H to O
So that should be an easy patch, right?
I don’t think so. I see nothing of “special cases” in drawtool.cpp is actually
working, and only direct intervention like I did in patch submitted to Gerrit
(sorry, I cannot give a link or number because Gerrit is down currently; it’s
submitted to 1.0 branch).
I’m interested in your opinion about that patch. Doing the same way, I can block
adjustment of hydrogens on both bond atoms when one of them is H, but it
will modify program logic more seriously
–
Regards,
Konstantin
09.11.2010, 10:35, “Konstantin Tokarev” annulen@yandex.ru:
09.11.2010, 04:26, “Geoffrey Hutchison” geoff.hutchison@gmail.com;:
On Nov 8, 2010, at 9:17 AM, Konstantin Tokarev wrote:
Right, there is a special case for drawing from H atom. However, it also crashes if bond is drawn from H to O
So that should be an easy patch, right?I don’t think so. I see nothing of “special cases” in drawtool.cpp is actually
working, and only direct intervention like I did in patch submitted to Gerrit
(sorry, I cannot give a link or number because Gerrit is down currently; it’s
submitted to 1.0 branch).
Gerrit is back, so here is a link:
http://review.avogadro.openmolecules.net:8080/#change,248
–
Regards,
Konstantin