From: SourceForge.net <no...@so...> - 2009-10-13 12:38:46
|
Patches item #2877780, was opened at 2009-10-13 13:02 Message generated for change (Comment added) made by egonw You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=320024&aid=2877780&group_id=20024 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: Needs Revision Status: Open Resolution: None Priority: 5 Private: No Submitted By: Stefan Kuhn (shk3) Assigned to: Nobody/Anonymous (nobody) Summary: The up_or_down is actually used somewhere Initial Comment: so I changed various classes to take account of it. ---------------------------------------------------------------------- >Comment By: Egon Willighagen (egonw) Date: 2009-10-13 14:38 Message: Ah, indeed. I stand corrected. Thanx for that clarification. These lines confused me: + case UP_OR_DOWN_INVERTED: + line += "4"; + break; as that snippet of code did not refer to the bond already being inverted in the output. ---------------------------------------------------------------------- Comment By: Stefan Kuhn (shk3) Date: 2009-10-13 14:16 Message: Please take an effort to understand the code you are talking about. Both, normal and inverted, are mapped to the same number, but the order of the atoms is different. Therefore, there are these lines in the mdl writer: if (bond.getStereo() == IBond.Stereo.UP_INVERTED || bond.getStereo() == IBond.Stereo.DOWN_INVERTED || bond.getStereo() == IBond.Stereo.UP_OR_DOWN_INVERTED) { // turn around atom coding to correct for inv stereo line = formatMDLInt(container.getAtomNumber(bond.getAtom(1)) + 1,3); line += formatMDLInt(container.getAtomNumber(bond.getAtom(0)) + 1,3); This turns round the atoms and then both, normal and inverted, for up, down and up_or_down can be expressed with the same figure in the stereo column ---------------------------------------------------------------------- Comment By: Egon Willighagen (egonw) Date: 2009-10-13 14:12 Message: Have not checked if DOWN_INVERTED is mapped to MDL stereo 6, but that would be an actual bug too... Check the note in the ctfile.pdf... which states that the pointy side is always at the first atom. So, MDL molfiles do not have an equivalent for *_INVERTED. ---------------------------------------------------------------------- Comment By: Stefan Kuhn (shk3) Date: 2009-10-13 14:09 Message: I don't understand this. According to MDL spec (http://www.symyx.com/downloads/public/ctfile/ctfile.pdf), 4 means either up or down pointing to the first atom, so both up_or_down and up_or_down_inverted translate to 4 the same way up and up_inverted both become 1 and down and down_inverted both become 6. Or what is your understanding of it? ---------------------------------------------------------------------- Comment By: Egon Willighagen (egonw) Date: 2009-10-13 13:46 Message: 0001 * patch does not apply to the 10-unsorted branch * please wrap lines to 80 chars 0002 looks fine 0003: * please consider patching the MDLV2000Reader instead * writing is broken: UP_OR_DOWN_INVERTED != MDL stereo 4 * missing unit tests for new functionality (MDL stereo 3) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=320024&aid=2877780&group_id=20024 |